// npm package
@antv/g-plugin-gesture
A G plugin for Gesture implemented with PointerEvents
versions
83
maintainers
51
license
MIT
first publish
2023-08-18
publisher
wang1212
tarball
161,891 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-3944public-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-gesture", "version": "2.1.1", "description": "A G plugin for Gesture 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": { "@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-gesture", "version": "2.1.1", "description": "A G plugin for Gesture 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": { "@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 --- index.js (entry) --- /*! * @antv/g-plugin-gesture * @description A G plugin for Gesture implemented with PointerEvents * @version 2.1.1 * @date 12/24/2025, 11:56:48 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 _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray'); /** * TODO: use clock from g later. */ var clock = typeof performance === 'object' && performance.now ? performance : Date; // 计算滑动的方向 var calcDirection = function calcDirection(start, end) { var xDistance = end.x - start.x; var yDistance = end.y - start.y; // x 的距离大于y 说明是横向,否则就是纵向 if (Math.abs(xDistance) > Math.abs(yDistance)) { return xDistance > 0 ? 'right' : 'left'; } return yDistance > 0 ? 'down' : 'up'; }; // 计算2点之间的距离 var calcDistance = function calcDistance(point1, point2) { var xDistance = Mat --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- dist/index.esm.js (bundled) --- /*! * @antv/g-plugin-gesture * @description A G plugin for Gesture implemented with PointerEvents * @version 2.1.1 * @date 12/24/2025, 11:56:48 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 _toConsumableArray from '@babel/runtime/helpers/toConsumableArray'; /** * TODO: use clock from g later. */ var clock = typeof performance === 'object' && performance.now ? performance : Date; // 计算滑动的方向 var calcDirection = function calcDirection(start, end) { var xDistance = end.x - start.x; var yDistance = end.y - start.y; // x 的距离大于y 说明是横向,否则就是纵向 if (Math.abs(xDistance) > Math.abs(yDistance)) { return xDistance > 0 ? 'right' : 'left'; } return yDistance > 0 ? 'down' : 'up'; }; // 计算2点之间的距离 var calcDistance = function calcDistance(point1, point2) { var xDistance = Math.abs(point2.x - point1.x); var yDistance = Math.abs(point2.y - point1.y); return Math.sqrt(xDistance * xDistance + yDistance * yDistance); }; var getCenter = function getCenter(point1, point2) { var x = point1.x + (point2.x - point1.x) / 2; var y = point1.y + (point2.y - point1.y) / 2; return { x: x, y: y }; }; var PRESS_DELAY = 250; var GesturePlugin = /*#__PURE__*/function () { function GesturePlugin(options) { var _this = this; _classCallCheck(this, GesturePlugin); this.evCache = []; this.startPoints = []; // 用来记录当前触发的事件 this.processEvent = {}; this.throttleTimer = 0; this.emitThrottles = []; this._start = function (ev, target) { // 每次触点开始都重置事件 _this.reset(); // 记录touch start 的时间 _this.startTime = clock.now(); v --- dist/index.js (bundled) --- /*! * @antv/g-plugin-gesture * @description A G plugin for Gesture implemented with PointerEvents * @version 2.1.1 * @date 12/24/2025, 11:56:48 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 _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray'); /** * TODO: use clock from g later. */ var clock = typeof performance === 'object' && performance.now ? performance : Date; // 计算滑动的方向 var calcDirection = function calcDirection(start, end) { var xDistance = end.x - start.x; var yDistance = end.y - start.y; // x 的距离大于y 说明是横向,否则就是纵向 if (Math.abs(xDistance) > Math.abs(yDistance)) { return xDistance > 0 ? 'right' : 'left'; } return yDistance > 0 ? 'down' : 'up'; }; // 计算2点之间的距离 var calcDistance = function calcDistance(point1, point2) { var xDistance = Math.abs(point2.x - point1.x); var yDistance = Math.abs(point2.y - point1.y); return Math.sqrt(xDistance * xDistance + yDistance * yDistance); }; var getCenter = function getCenter(point1, point2) { var x = point1.x + (point2.x - point1.x) / 2; var y = point1.y + (point2.y - point1.y) / 2; return { x: x, y: y }; }; var PRESS_DELAY = 250; var GesturePlugin = /*#__PURE__*/function () { function GesturePlugin(options) { var _this = this; _classCallCheck(this, GesturePlugin); this.evCache = []; this.startPoints = []; // 用来记录当前触发的事件 this.processEvent = {}; this.throttleTimer = 0; this.emitThrottles = []; this._start = function (ev, target) { // 每次触点开始都重置事件 _this.reset(); // 记录touch start 的时间 _this.startTime = clock --- dist/index.umd.min.js (bundled) --- /*! * @antv/g-plugin-gesture * @description A G plugin for Gesture implemented with PointerEvents * @version 2.1.1 * @date 12/24/2025, 11:56:48 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.Gesture={}),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 i=r.call(t,e||"default");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}function i(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 o(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 s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(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 u(t,e,n){return e&&a(t.prototype,e),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 l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],funct
