// npm package
@antv/g-plugin-control
A G plugin for orbit control
versions
250
maintainers
51
license
MIT
first publish
2021-07-15
publisher
wang1212
tarball
191,726 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).
- @2.1.1··AUTO-PUBLISHED·publisher: wang1212heuristic 75/100static flags 1llm benign (0.85) via ollamamature-packageosv-flagged:MAL-2026-3939public-github-push
→ No suspicious destination, no remote-exec shape — 2 known-vendor host(s).
// offending code· 1 file flaggedpatterns: 1
--- package/package.json (excerpt) --- { "name": "@antv/g-plugin-control", "version": "2.1.1", "description": "A G plugin for orbit control", "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": { "@babel/runtime": "^7.25.6", "hammerjs": "^2.0.8", "tslib": "^2.5.3", "@antv/g-lite": "2.7.0" }, "devDependencies": { "@types/hammerjs": "^2.0.36" }, "publishConfig": { "access": "public" }, "gitHead": "89a517f161e783e64278a4f0d800850db6b5b420", "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-control", "version": "2.1.1", "description": "A G plugin for orbit control", "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": { "@babel/runtime": "^7.25.6", "hammerjs": "^2.0.8", "tslib": "^2.5.3", "@antv/g-lite": "2.7.0" }, "devDependencies": { "@types/hammerjs": "^2.0.36" }, "publishConfig": { "access": "public" }, "gitHead": "89a517f161e783e64278a4f0d800850db6b5b420", "scripts": { "build:js": "rimraf dist && rollup -c", "build:types": "rimraf types && tsc --emitDeclarationOnly --- index.js (entry) --- /*! * @antv/g-plugin-control * @description A G plugin for orbit control * @version 2.1.1 * @date 12/24/2025, 11:56:21 AM * @author AntVis * @docs https://g.antv.antgroup.com/ */ 'use strict'; 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 Hammer = require('hammerjs'); var MOTION_FACTOR = 10; var ControlPlugin = /*#__PURE__*/function () { function ControlPlugin() { var _this = this; _classCallCheck(this, ControlPlugin); this.isMoving = false; this.lastX = -1; this.lastY = -1; this.onPanstart = function (e) { _this.lastX = e.center.x; _this.lastY = e.center.y; _this.isMoving = true; }; this.onPanmove = function (e) { // https://gist.github.com/handleman/3c99e754065f647b082f var isMac = _this.context.globalThis.navigator.platform.toUpperCase().indexOf('MAC') >= 0; _this.ctrlKey = e.srcEvent.ctrlKey; if (isMac && e.srcEvent.metaKey) { _this.ctr --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- dist/index.esm.js (bundled) --- /*! * @antv/g-plugin-control * @description A G plugin for orbit control * @version 2.1.1 * @date 12/24/2025, 11:56:21 AM * @author AntVis * @docs https://g.antv.antgroup.com/ */ 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 Hammer from 'hammerjs'; var MOTION_FACTOR = 10; var ControlPlugin = /*#__PURE__*/function () { function ControlPlugin() { var _this = this; _classCallCheck(this, ControlPlugin); this.isMoving = false; this.lastX = -1; this.lastY = -1; this.onPanstart = function (e) { _this.lastX = e.center.x; _this.lastY = e.center.y; _this.isMoving = true; }; this.onPanmove = function (e) { // https://gist.github.com/handleman/3c99e754065f647b082f var isMac = _this.context.globalThis.navigator.platform.toUpperCase().indexOf('MAC') >= 0; _this.ctrlKey = e.srcEvent.ctrlKey; if (isMac && e.srcEvent.metaKey) { _this.ctrlKey = true; } _this.altKey = e.srcEvent.altKey; _this.shiftKey = e.srcEvent.shiftKey; if (_this.isMoving) { var deltaX = e.center.x - _this.lastX; var deltaY = e.center.y - _this.lastY; _this.lastX = e.center.x; _this.lastY = e.center.y; if (_this.ctrlKey && !_this.shiftKey) { _this.dolly(deltaY); } else if (_this.shiftKey && !_this.ctrlKey) { _this.pan(deltaX, deltaY); } else if (_this.ctrlKey && _this.shiftKey) { _this.roll(deltaY); } else { _this.rotate(deltaX, deltaY); } } }; this.onPanend = function (e) { _this.isMoving = false; }; this.onPinch = function (e) { var deltaZ = (1 - e.scale) * 10; _this.dolly(deltaZ); }; --- dist/index.js (bundled) --- /*! * @antv/g-plugin-control * @description A G plugin for orbit control * @version 2.1.1 * @date 12/24/2025, 11:56:21 AM * @author AntVis * @docs https://g.antv.antgroup.com/ */ 'use strict'; 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 Hammer = require('hammerjs'); var MOTION_FACTOR = 10; var ControlPlugin = /*#__PURE__*/function () { function ControlPlugin() { var _this = this; _classCallCheck(this, ControlPlugin); this.isMoving = false; this.lastX = -1; this.lastY = -1; this.onPanstart = function (e) { _this.lastX = e.center.x; _this.lastY = e.center.y; _this.isMoving = true; }; this.onPanmove = function (e) { // https://gist.github.com/handleman/3c99e754065f647b082f var isMac = _this.context.globalThis.navigator.platform.toUpperCase().indexOf('MAC') >= 0; _this.ctrlKey = e.srcEvent.ctrlKey; if (isMac && e.srcEvent.metaKey) { _this.ctrlKey = true; } _this.altKey = e.srcEvent.altKey; _this.shiftKey = e.srcEvent.shiftKey; if (_this.isMoving) { var deltaX = e.center.x - _this.lastX; var deltaY = e.center.y - _this.lastY; _this.lastX = e.center.x; _this.lastY = e.center.y; if (_this.ctrlKey && !_this.shiftKey) { _this.dolly(deltaY); } else if (_this.shiftKey && !_this.ctrlKey) { _this.pan(deltaX, deltaY); } else if (_this.ctrlKey && _this.shiftKey) { _this.roll(deltaY); } else { _this.rotate(deltaX, deltaY); } } }; this.onPanend = function (e) { _this.isMoving = false; }; this.onPinch = function (e) { var deltaZ = (1 - e.scale) * 10; _this.dolly(delta --- dist/index.umd.min.js (bundled) --- /*! * @antv/g-plugin-control * @description A G plugin for orbit control * @version 2.1.1 * @date 12/24/2025, 11:56:21 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.Control={}),t.window.G)}(this,function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){return i="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},i(t)}function r(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==i(e)?e:e+""}function o(t,e){for(var n=0;e.length>n;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,r(i.key),i)}}function s(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(u=function(){return!!t})()}function c(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t,e){retu
