// npm package
@antv/x6-plugin-keyboard
keyboard plugin for X6
weekly
4,249
monthly
16,514
versions
18
maintainers
51
license
MIT
first publish
2022-09-13
publisher
newbyvector
tarball
62,158 B
AUTO-PUBLISHED·1 version indexed·latest published 2024-01-24
// publisher campaignby newbyvector
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.2.3· 1 file flagged
llm: benign · 0.85→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s), 1 other host(s).
- @2.2.3··AUTO-PUBLISHED·publisher: newbyvectorheuristic 75/100static flags 1llm benign (0.85) via ollamapopularity:highmature-packageosv-flagged:MAL-2026-4105public-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/x6-plugin-keyboard", "version": "2.2.3", "description": "keyboard 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", "keyboard", "x6", "antv" ], "dependencies": { "mousetrap": "^1.6.5" }, "peerDependencies": { "@antv/x6": "^2.x" }, "devDependencies": { "@antv/x6": "^2.x", "@types/mousetrap": "^1.6.11" }, "author": { "name": "bubkoo", "email": "bubkoo.wy@gmail.com" }, "license": "MIT", "homepage": "https://x6.antv.antgroup.com/tutorial/plugins/keyboard", "bugs": { "url": "https://github.com/antvis/x6/issues" }, "repository": { "type": "git", "url": "https://github.com/antvis/x6.git", "directory": "packages/x6-plugin-keyboard" }, "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: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-keyboard", "version": "2.2.3", "description": "keyboard 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", "keyboard", "x6", "antv" ], "dependencies": { "mousetrap": "^1.6.5" }, "peerDependencies": { "@antv/x6": "^2.x" }, "devDependencies": { "@antv/x6": "^2.x", "@types/mousetrap": "^1.6.11" }, "author": { "name": "bubkoo", "email": "bubkoo.wy@gmail.com" }, "license": "MIT", "homepage": "https://x6.antv.antgroup.com/tutorial/plugins/keyboard", "bugs": { "url": "https://github.com/antvis/x6/issues" }, "repository": { "type": "git", "url": "https://github.com/antvis/x6.git", "directory": "packages/x6-plugin-keyboard" }, "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", --- 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.Keyboard = void 0; const x6_1 = require("@antv/x6"); const keyboard_1 = require("./keyboard"); require("./api"); class Keyboard extends x6_1.Disposable { constructor(options = {}) { super(); this.name = 'keyboard'; this.options = Object.assign({ enabled: true }, options); } init(graph) { this.keyboardImpl = new keyboard_1.KeyboardImpl(Object.assign(Object.assign({}, this.options), { graph })); } // #region api isEnabled() { return !this.keyboardImpl.disabled; } enabl --- 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).X6PluginKeyboard={},t.X6)}(this,(function(t,e){"use strict";function n(t,e,n,r){var i,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s}var r={};!function(t){!function(e,n,r){if(e){for(var i,o={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},s={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},a={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},l={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},c=1;c<20;++c)o[111+c]="f"+c;for(c=0;c<=9;++c)o[c+96]=c.toString();y.prototype.bind=function(t,e,n){var r=this;return t=t instanceof Array?t:[t],r._bindMultiple.call(r,t,e,n),r},y.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},y.prototype.trigger=function(t,e){var n=this;return n._directMap[t+":"+e]&&n._directMap[t+":"+e]({},t),n},y.prototype.reset=function(){var t=this;return t._callbacks={},t._directMap={},t},y.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(b(e,this.target))return!1;if("composedPath"in t&&"function"==typeof t.composedPath){var n=t.composedPath()[0];n!==t.target&&(e=n)}r
