// npm package
@antv/g-plugin-canvas-picker
A G plugin for picking in canvas
versions
259
maintainers
51
license
MIT
first publish
2021-06-02
publisher
alex_zjt
tarball
425,290 B
AUTO-PUBLISHED·1 version indexed·latest published 2025-12-15
// publisher campaignby alex_zjt
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.28-beta.0· 1 file flagged
llm: benign · 0.85→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s), 1 other host(s).
- @2.1.28-beta.0··AUTO-PUBLISHED·publisher: alex_zjtheuristic 75/100static flags 1llm benign (0.85) via ollamamature-packageosv-flagged:MAL-2026-3936public-github-push
→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s), 1 other host(s).
// offending code· 1 file flaggedpatterns: 1
--- package/package.json (excerpt) --- { "name": "@antv/g-plugin-canvas-picker", "version": "2.1.28-beta.0", "description": "A G plugin for picking in canvas", "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", "gl-matrix": "^3.4.3", "tslib": "^2.5.3", "@antv/g-lite": "2.3.3-beta.2", "@antv/g-plugin-canvas-renderer": "2.3.4-beta.0", "@antv/g-plugin-canvas-path-generator": "2.1.23-beta.0", "@antv/g-math": "3.0.2-beta.0" }, "publishConfig": { "access": "public" }, "gitHead": "89a517f161e783e64278a4f0d800850db6b5b420", "scripts": { "build:types": "tsc --emitDeclarationOnly --noCheck", "build": "npm run clean && npm run build:types && rollup -c", "clean": "rimraf dist", "sync": "tnpm sync", "watch": "rollup -c -w" } } --- package.json (entry) --- { "name": "@antv/g-plugin-canvas-picker", "version": "2.1.28-beta.0", "description": "A G plugin for picking in canvas", "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", "gl-matrix": "^3.4.3", "tslib": "^2.5.3", "@antv/g-lite": "2.3.3-beta.2", "@antv/g-plugin-canvas-renderer": "2.3.4-beta.0", "@antv/g-plugin-canvas-path-generator": "2.1.23-beta.0", "@antv/g-math": "3.0.2-beta.0" }, "publishConfig": { "access": "public" }, "gitHead": "89a517f161e783e64278 --- index.js (entry) --- /*! * @antv/g-plugin-canvas-picker * @description A G plugin for picking in canvas * @version 2.1.28-beta.0 * @date 12/12/2025, 2:50:29 PM * @author AntVis * @docs https://g.antv.antgroup.com/ */ 'use strict'; var _defineProperty = require('@babel/runtime/helpers/defineProperty'); 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 _createForOfIteratorHelper = require('@babel/runtime/helpers/createForOfIteratorHelper'); var _regeneratorRuntime = require('@babel/runtime/helpers/regeneratorRuntime'); var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator'); var glMatrix = require('gl-matrix'); var _slicedToArray = require('@babel/runtime/helpers/slicedToArray'); var gMath = require('@antv/g-math'); var util = require('@antv/util'); var _objectSpread = require('@babel/runtime/helpers/objectSpread2'); var tmpVec3a = glMatrix.vec3.create(); var tmpVec3b = glMatrix.vec3.create(); var tmpVec3c = glMatrix.vec3.create() --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- dist/index.esm.js (bundled) --- /*! * @antv/g-plugin-canvas-picker * @description A G plugin for picking in canvas * @version 2.1.28-beta.0 * @date 12/12/2025, 2:50:29 PM * @author AntVis * @docs https://g.antv.antgroup.com/ */ import _defineProperty from '@babel/runtime/helpers/defineProperty'; 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 { findClosestClipPathTarget, Point, isFillOrStrokeAffected, getOrCalculatePathTotalLength, Shape, AbstractRendererPlugin } from '@antv/g-lite'; import _createForOfIteratorHelper from '@babel/runtime/helpers/createForOfIteratorHelper'; import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime'; import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator'; import { vec3, mat4 } from 'gl-matrix'; import _slicedToArray from '@babel/runtime/helpers/slicedToArray'; import { distance, linePointToLine, cubicPointDistance, quadPointDistance } from '@antv/g-math'; import { arcToCubic, clamp } from '@antv/util'; import _objectSpread from '@babel/runtime/helpers/objectSpread2'; var tmpVec3a = vec3.create(); var tmpVec3b = vec3.create(); var tmpVec3c = vec3.create(); var tmpMat4 = mat4.create(); /** * pick shape(s) with Mouse/Touch event * * 1. find AABB with r-tree * 2. do math calculation with geometry in an accurate way */ var CanvasPickerPlugin = /*#__PURE__*/function () { function CanvasPickerPlugin() { var _this = this; _classCallCheck(this, CanvasPickerPlugin); this.isHit = function (displayObject, position, worldTransform, isClipPath) { // use picker for current shape's type var pick = _this.context.pointInPathPickerFactory[displayObject.nodeName]; if (pick) { // invert with world matrix var invertWorldMat = mat4.invert(tmpMat4, worldTransform); // transform client --- dist/index.js (bundled) --- /*! * @antv/g-plugin-canvas-picker * @description A G plugin for picking in canvas * @version 2.1.28-beta.0 * @date 12/12/2025, 2:50:29 PM * @author AntVis * @docs https://g.antv.antgroup.com/ */ 'use strict'; var _defineProperty = require('@babel/runtime/helpers/defineProperty'); 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 _createForOfIteratorHelper = require('@babel/runtime/helpers/createForOfIteratorHelper'); var _regeneratorRuntime = require('@babel/runtime/helpers/regeneratorRuntime'); var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator'); var glMatrix = require('gl-matrix'); var _slicedToArray = require('@babel/runtime/helpers/slicedToArray'); var gMath = require('@antv/g-math'); var util = require('@antv/util'); var _objectSpread = require('@babel/runtime/helpers/objectSpread2'); var tmpVec3a = glMatrix.vec3.create(); var tmpVec3b = glMatrix.vec3.create(); var tmpVec3c = glMatrix.vec3.create(); var tmpMat4 = glMatrix.mat4.create(); /** * pick shape(s) with Mouse/Touch event * * 1. find AABB with r-tree * 2. do math calculation with geometry in an accurate way */ var CanvasPickerPlugin = /*#__PURE__*/function () { function CanvasPickerPlugin() { var _this = this; _classCallCheck(this, CanvasPickerPlugin); this.isHit = function (displayObject, position, worldTransform, isClipPath) { // use picker for current shape's type var pick = _this.context.pointInPathPickerFactory[displayObject.nodeName]; if (pick) { // invert with world matrix var invertWorldMat = glMatrix.mat4.invert(tmpMat4, worldTransform); // transform client position to local space, do picking in local space var localPosition = glMatrix.vec3.transfo --- dist/index.umd.min.js (bundled) --- /*! * @antv/g-plugin-canvas-picker * @description A G plugin for picking in canvas * @version 2.1.28-beta.0 * @date 12/12/2025, 2:50:29 PM * @author AntVis * @docs https://g.antv.antgroup.com/ */ !function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@antv/g-lite")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite"],r):r(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.CanvasPicker={}),t.window.G)}(this,function(t,r){"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 e(t){var r=function(t,r){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,r||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==n(r)?r:r+""}function o(t,r,n){return(r=e(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function i(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function a(t,r){for(var n=0;r.length>n;n++){var o=r[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,e(o.key),o)}}function u(t,r,n){return r&&a(t.prototype,r),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(f=function(){return!!t})()}function l(t,r){if(r&&("object"==n(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");retur
