// npm 패키지
@antv/x6-plugin-dnd
dnd plugin for X6
버전
11
메인테이너
51
라이선스
MIT
최초 publish
2022-10-31
publisher
newbyvector
tarball
91,524 B
AUTO-PUBLISHED·1개 버전 인덱싱됨·최근 publish: 2023-09-19
// publisher 캠페인by newbyvector
이 계정에서 catch된 패키지 9건고립된 catch가 아닙니다. 동일 publisher가 8개의 다른 패키지를 추가로 발행했고, 모두 파이프라인이 catch했습니다 — 일회성이 아닌 조직적 캠페인의 형태. 아래 링크는 각 형제 catch의 분석으로 이동합니다.
// offending code· @2.1.1· 1 file flagged
llm: benign · 0.85→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s), 1 other host(s).
- @2.1.1··AUTO-PUBLISHED·publisher: newbyvectorheuristic 75/100static flags 1llm benign (0.85) via ollamamature-packageosv-flagged:MAL-2026-4102public-github-push
→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s), 1 other host(s).
// offending code· 1 file flaggedpatterns: 1
--- package/package.json (excerpt) --- { "name": "@antv/x6-plugin-dnd", "version": "2.1.1", "description": "dnd plugin for X6", "main": "lib/index.js", "module": "es/index.js", "unpkg": "dist/index.js", "jsdelivr": "dist/index.js", "types": "lib/index.d.ts", "files": [ "dist", "es", "lib", "src" ], "keywords": [ "plugin", "dnd", "x6", "antv" ], "peerDependencies": { "@antv/x6": "^2.x" }, "devDependencies": { "@antv/x6": "^2.x" }, "author": { "name": "bubkoo", "email": "bubkoo.wy@gmail.com" }, "license": "MIT", "homepage": "https://x6.antv.antgroup.com/tutorial/plugins/dnd", "bugs": { "url": "https://github.com/antvis/x6/issues" }, "repository": { "type": "git", "url": "https://github.com/antvis/x6.git", "directory": "packages/x6-plugin-dnd" }, "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org" }, "scripts": { "clean:turbo": "rss", "clean:build": "rss", "clean:coverage": "rss", "clean": "rss", "build:esm": "rss", "build:cjs": "rss", "build:umd": "rss", "build:less": "rss", "build:dev": "rss", "build:watch": "rss", "build:watch:esm": "rss", "build:watch:cjs": "rss", "build": "rss", "prebuild": "rss", "test": "rss", "coveralls": "rss", "pretest": "rss" } } --- package.json (entry) --- { "name": "@antv/x6-plugin-dnd", "version": "2.1.1", "description": "dnd plugin for X6", "main": "lib/index.js", "module": "es/index.js", "unpkg": "dist/index.js", "jsdelivr": "dist/index.js", "types": "lib/index.d.ts", "files": [ "dist", "es", "lib", "src" ], "keywords": [ "plugin", "dnd", "x6", "antv" ], "peerDependencies": { "@antv/x6": "^2.x" }, "devDependencies": { "@antv/x6": "^2.x" }, "author": { "name": "bubkoo", "email": "bubkoo.wy@gmail.com" }, "license": "MIT", "homepage": "https://x6.antv.antgroup.com/tutorial/plugins/dnd", "bugs": { "url": "https://github.com/antvis/x6/issues" }, "repository": { "type": "git", "url": "https://github.com/antvis/x6.git", "directory": "packages/x6-plugin-dnd" }, "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org" }, "scripts": { "clean:turbo": "rss", "clean:build": "rss", "clean:coverage": "rss", "clean": "rss", "build:esm": "rss", "build:cjs": "rss", "build:umd": "rss", "build:less": "rss", "build:dev": "rss", "build:watch": "rss", "build:watc --- index.js (entry) --- "use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Dnd = void 0; const x6_1 = require("@antv/x6"); const raw_1 = require("./style/raw"); class Dnd extends x6_1.View { get targetScroller() { const target = this.options.target; const scroller = target.getPlugin('scroller'); return scroller; } get targetGraph() { return this.options.target; } get targetModel() { return this.targetGraph.model; } get snapline() { const target = this.options.target; const snapline = target.getPlugin('snapline'); return --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- dist/index.js (bundled) --- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/x6")):"function"==typeof define&&define.amd?define(["exports","@antv/x6"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).X6PluginDnd={},t.X6)}(this,(function(t,e){"use strict";class n extends e.View{get targetScroller(){return this.options.target.getPlugin("scroller")}get targetGraph(){return this.options.target}get targetModel(){return this.targetGraph.model}get snapline(){return this.options.target.getPlugin("snapline")}constructor(t){super(),this.name="dnd",this.options=Object.assign(Object.assign({},n.defaults),t),this.init()}init(){e.CssLoader.ensure(this.name,".x6-widget-dnd {\n position: absolute;\n top: -10000px;\n left: -10000px;\n z-index: 999999;\n display: none;\n cursor: move;\n opacity: 0.7;\n pointer-events: 'cursor';\n}\n.x6-widget-dnd.dragging {\n display: inline-block;\n}\n.x6-widget-dnd.dragging * {\n pointer-events: none !important;\n}\n.x6-widget-dnd .x6-graph {\n background: transparent;\n box-shadow: none;\n}\n"),this.container=document.createElement("div"),e.Dom.addClass(this.container,this.prefixClassName("widget-dnd")),this.draggingGraph=new e.Graph(Object.assign(Object.assign({},this.options.delegateGraphOptions),{container:document.createElement("div"),width:1,height:1,async:!1})),e.Dom.append(this.container,this.draggingGraph.container)}start(t,i){const o=i;o.preventDefault(),this.targetModel.startBatch("dnd"),e.Dom.addClass(this.container,"dragging"),e.Dom.appendTo(this.container,this.options.draggingContainer||document.body),this.sourceNode=t,this.prepareDragging(t,o.clientX,o.clientY);const s=this.updateNodePosition(o.clientX,o.clientY);this.isSnaplineEnabled()&&(this.snapline.captureCursorOffset({e:o,node:t,cell:t,view:this.draggingView,x:s.x,y:s.y}),this.draggingNode.on("change:position",this.snap,this)),this.delegateDocumentEvents(n.documentEvents,o.data)}isSnaplineEnabled(){return this.snapline&&this.snapline.isEnab
