// npm package
@antv/g-plugin-dragndrop
A G plugin for Drag n Drop implemented with PointerEvents
versions
170
maintainers
51
license
MIT
first publish
2022-05-23
publisher
wang1212
tarball
109,261 B
AUTO-PUBLISHED·1 version indexed·latest published 2025-12-24
// publisher campaignby wang1212
9 caught packages from this accountThis is not an isolated catch. The same publisher has shipped 8 other packages that our pipeline flagged — the shape of a coordinated campaign, not a one-off. Each link below opens that sibling's analysis.
// offending code· @2.1.1· 1 file flagged
llm: benign · 0.85→ No suspicious destination, no remote-exec shape — 2 known-vendor host(s), 1 other host(s).
- @2.1.1··AUTO-PUBLISHED·publisher: wang1212heuristic 75/100static flags 1llm benign (0.85) via ollamamature-packageosv-flagged:MAL-2026-3943public-github-push
→ No suspicious destination, no remote-exec shape — 2 known-vendor host(s), 1 other host(s).
// offending code· 1 file flaggedpatterns: 1
--- package/package.json (excerpt) --- { "name": "@antv/g-plugin-dragndrop", "version": "2.1.1", "description": "A G plugin for Drag n Drop implemented with PointerEvents", "keywords": [ "antv", "g" ], "homepage": "https://github.com/antvis/g#readme", "bugs": { "url": "https://github.com/antvis/g/issues" }, "repository": { "type": "git", "url": "git+https://github.com/antvis/g.git" }, "license": "MIT", "author": "https://github.com/orgs/antvis/people", "exports": { "types": "./types/index.d.ts", "import": "./dist/index.esm.js", "default": "./dist/index.js" }, "main": "dist/index.js", "unpkg": "dist/index.umd.min.js", "module": "dist/index.esm.js", "types": "types/index.d.ts", "files": [ "package.json", "dist", "types", "LICENSE", "README.md" ], "dependencies": { "@antv/util": "^3.3.5", "@babel/runtime": "^7.25.6", "tslib": "^2.5.3", "@antv/g-lite": "2.7.0" }, "publishConfig": { "access": "public" }, "scripts": { "build:js": "rimraf dist && rollup -c", "build:types": "rimraf types && tsc --emitDeclarationOnly --noCheck", "build": "npm run build:js && npm run build:types", "sync": "tnpm sync", "watch": "rollup -c -w" } } --- package.json (entry) --- { "name": "@antv/g-plugin-dragndrop", "version": "2.1.1", "description": "A G plugin for Drag n Drop implemented with PointerEvents", "keywords": [ "antv", "g" ], "homepage": "https://github.com/antvis/g#readme", "bugs": { "url": "https://github.com/antvis/g/issues" }, "repository": { "type": "git", "url": "git+https://github.com/antvis/g.git" }, "license": "MIT", "author": "https://github.com/orgs/antvis/people", "exports": { "types": "./types/index.d.ts", "import": "./dist/index.esm.js", "default": "./dist/index.js" }, "main": "dist/index.js", "unpkg": "dist/index.umd.min.js", "module": "dist/index.esm.js", "types": "types/index.d.ts", "files": [ "package.json", "dist", "types", "LICENSE", "README.md" ], "dependencies": { "@antv/util": "^3.3.5", "@babel/runtime": "^7.25.6", "tslib": "^2.5.3", "@antv/g-lite": "2.7.0" }, "publishConfig": { "access": "public" }, "scripts": { "build:js": "rimraf dist && rollup -c", "build:types": "rimraf types && tsc --emitDeclarationOnly --noCheck", "build": "npm run build:js && npm run build:types", "sync": "tnpm --- index.js (entry) --- /*! * @antv/g-plugin-dragndrop * @description A G plugin for Drag n Drop implemented with PointerEvents * @version 2.1.1 * @date 12/24/2025, 11:56:44 AM * @author AntVis * @docs https://g.antv.antgroup.com/ */ 'use strict'; var _objectSpread = require('@babel/runtime/helpers/objectSpread2'); var _classCallCheck = require('@babel/runtime/helpers/classCallCheck'); var _createClass = require('@babel/runtime/helpers/createClass'); var _callSuper = require('@babel/runtime/helpers/callSuper'); var _inherits = require('@babel/runtime/helpers/inherits'); var gLite = require('@antv/g-lite'); var _regeneratorRuntime = require('@babel/runtime/helpers/regeneratorRuntime'); var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator'); var util = require('@antv/util'); var DragndropPlugin = /*#__PURE__*/function () { function DragndropPlugin(dragndropPluginOptions) { _classCallCheck(this, DragndropPlugin); this.dragndropPluginOptions = dragndropPluginOptions; } return _createClass(DragndropPlugin, [{ key: "apply", value: function apply(context) { var _this = this; var renderingService = context.renderingService, renderingContext = --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- dist/index.esm.js (bundled) --- /*! * @antv/g-plugin-dragndrop * @description A G plugin for Drag n Drop implemented with PointerEvents * @version 2.1.1 * @date 12/24/2025, 11:56:44 AM * @author AntVis * @docs https://g.antv.antgroup.com/ */ import _objectSpread from '@babel/runtime/helpers/objectSpread2'; import _classCallCheck from '@babel/runtime/helpers/classCallCheck'; import _createClass from '@babel/runtime/helpers/createClass'; import _callSuper from '@babel/runtime/helpers/callSuper'; import _inherits from '@babel/runtime/helpers/inherits'; import { AbstractRendererPlugin } from '@antv/g-lite'; import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime'; import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator'; import { distanceSquareRoot } from '@antv/util'; var DragndropPlugin = /*#__PURE__*/function () { function DragndropPlugin(dragndropPluginOptions) { _classCallCheck(this, DragndropPlugin); this.dragndropPluginOptions = dragndropPluginOptions; } return _createClass(DragndropPlugin, [{ key: "apply", value: function apply(context) { var _this = this; var renderingService = context.renderingService, renderingContext = context.renderingContext; var document = renderingContext.root.ownerDocument; // TODO: should we add an option like `draggable` to Canvas var canvas = document.defaultView; var handlePointerdown = function handlePointerdown(event) { var target = event.target; var isDocument = target === document; var draggableEventTarget = isDocument && _this.dragndropPluginOptions.isDocumentDraggable ? document : target.closest && target.closest('[draggable=true]'); // `draggable` may be set on ancestor nodes: // @see https://github.com/antvis/G/issues/1088 if (draggableEventTarget) { // delay triggering dragstart event var dragstartTriggered = false; var dragstartTimeStamp = event.timeStamp; var --- dist/index.js (bundled) --- /*! * @antv/g-plugin-dragndrop * @description A G plugin for Drag n Drop implemented with PointerEvents * @version 2.1.1 * @date 12/24/2025, 11:56:44 AM * @author AntVis * @docs https://g.antv.antgroup.com/ */ 'use strict'; var _objectSpread = require('@babel/runtime/helpers/objectSpread2'); var _classCallCheck = require('@babel/runtime/helpers/classCallCheck'); var _createClass = require('@babel/runtime/helpers/createClass'); var _callSuper = require('@babel/runtime/helpers/callSuper'); var _inherits = require('@babel/runtime/helpers/inherits'); var gLite = require('@antv/g-lite'); var _regeneratorRuntime = require('@babel/runtime/helpers/regeneratorRuntime'); var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator'); var util = require('@antv/util'); var DragndropPlugin = /*#__PURE__*/function () { function DragndropPlugin(dragndropPluginOptions) { _classCallCheck(this, DragndropPlugin); this.dragndropPluginOptions = dragndropPluginOptions; } return _createClass(DragndropPlugin, [{ key: "apply", value: function apply(context) { var _this = this; var renderingService = context.renderingService, renderingContext = context.renderingContext; var document = renderingContext.root.ownerDocument; // TODO: should we add an option like `draggable` to Canvas var canvas = document.defaultView; var handlePointerdown = function handlePointerdown(event) { var target = event.target; var isDocument = target === document; var draggableEventTarget = isDocument && _this.dragndropPluginOptions.isDocumentDraggable ? document : target.closest && target.closest('[draggable=true]'); // `draggable` may be set on ancestor nodes: // @see https://github.com/antvis/G/issues/1088 if (draggableEventTarget) { // delay triggering dragstart event var dragstartTriggered = false; var dragstartTimeStamp = event.timeStamp; --- dist/index.umd.min.js (bundled) --- /*! * @antv/g-plugin-dragndrop * @description A G plugin for Drag n Drop implemented with PointerEvents * @version 2.1.1 * @date 12/24/2025, 11:56:44 AM * @author AntVis * @docs https://g.antv.antgroup.com/ */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g-lite")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.Dragndrop={}),t.window.G)}(this,function(t,e){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function r(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}function o(t,e,n){return(e=r(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;e.length>n;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,r(o.key),o)}}function a(t,e,n){return e&&c(t.prototype,e),n&&c(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,
