// npm package
@antv/x6-geometry
Geometry operations for X6
weekly
12,750
monthly
48,400
versions
25
maintainers
51
license
MIT
first publish
2021-03-23
publisher
newbyvector
tarball
1,612,357 B
AUTO-PUBLISHED·1 version indexed·latest published 2023-04-12
// 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.0.5· 1 file flagged
llm: benign · 0.85→ No suspicious destination, no remote-exec shape — 2 known-vendor host(s), 1 other host(s).
- @2.0.5··AUTO-PUBLISHED·publisher: newbyvectorheuristic 75/100static flags 1llm benign (0.85) via ollamarecent-owner-changepopularity:very-highmature-packageosv-flagged:MAL-2026-3840public-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) --- { "version": "2.0.5", "name": "@antv/x6-geometry", "description": "Geometry operations 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": [ "geometry", "shape", "x6", "antv" ], "author": { "name": "bubkoo", "email": "bubkoo.wy@gmail.com" }, "license": "MIT", "homepage": "https://x6.antv.antgroup.com", "bugs": { "url": "https://github.com/antvis/x6/issues" }, "repository": { "type": "git", "url": "https://github.com/antvis/x6.git", "directory": "packages/x6-geometry" }, "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) --- { "version": "2.0.5", "name": "@antv/x6-geometry", "description": "Geometry operations 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": [ "geometry", "shape", "x6", "antv" ], "author": { "name": "bubkoo", "email": "bubkoo.wy@gmail.com" }, "license": "MIT", "homepage": "https://x6.antv.antgroup.com", "bugs": { "url": "https://github.com/antvis/x6/issues" }, "repository": { "type": "git", "url": "https://github.com/antvis/x6.git", "directory": "packages/x6-geometry" }, "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", "pret --- index.js (entry) --- "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./angle"), exports); __exportStar(require("./point"), exports); __exportStar(require("./line"), exports); __exportStar(require("./ellipse"), exports); __exportStar(require("./rectangle"), exports); __exportStar(require("./path"), exports); __exportStar(require("./curve"), exports); __exportStar(require("./polyline"), exports); __exportStar(require("./util"), exports); //# sourceMappingURL=index.js.map --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- dist/index.js (bundled) --- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).X6Geometry={})}(this,(function(t){"use strict";var e,n;t.Angle=void 0,(e=t.Angle||(t.Angle={})).toDeg=function(t){return 180*t/Math.PI%360},e.toRad=function(t,e=!1){return(e?t:t%360)*Math.PI/180},e.normalize=function(t){return t%360+(t<0?360:0)},t.GeometryUtil=void 0,(n=t.GeometryUtil||(t.GeometryUtil={})).round=function(t,e=0){return Number.isInteger(t)?t:+t.toFixed(e)},n.random=function(t,e){let n,i;if(null==e?(i=null==t?1:t,n=0):(i=e,n=null==t?0:t),i<n){const t=n;n=i,i=t}return Math.floor(Math.random()*(i-n+1)+n)},n.clamp=function(t,e,n){return Number.isNaN(t)?NaN:Number.isNaN(e)||Number.isNaN(n)?0:e<n?t<e?e:t>n?n:t:t<n?n:t>e?e:t},n.snapToGrid=function(t,e){return e*Math.round(t/e)},n.containsPoint=function(t,e){return null!=e&&null!=t&&e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height},n.squaredLength=function(t,e){const n=t.x-e.x,i=t.y-e.y;return n*n+i*i};class i{valueOf(){return this.toJSON()}toString(){return JSON.stringify(this.toJSON())}}class s extends i{constructor(t,e){super(),this.x=null==t?0:t,this.y=null==e?0:e}round(e=0){return this.x=t.GeometryUtil.round(this.x,e),this.y=t.GeometryUtil.round(this.y,e),this}add(t,e){const n=s.create(t,e);return this.x+=n.x,this.y+=n.y,this}update(t,e){const n=s.create(t,e);return this.x=n.x,this.y=n.y,this}translate(t,e){const n=s.create(t,e);return this.x+=n.x,this.y+=n.y,this}rotate(t,e){const n=s.rotate(this,t,e);return this.x=n.x,this.y=n.y,this}scale(t,e,n=new s){const i=s.create(n);return this.x=i.x+t*(this.x-i.x),this.y=i.y+e*(this.y-i.y),this}closest(t){if(1===t.length)return s.create(t[0]);let e=null,n=1/0;return t.forEach((t=>{const i=this.squaredDistance(t);i<n&&(e=t,n=i)})),e?s.create(e):null}distance(t){return Math.sqrt(this.squaredDistance(t))}squaredDistance(t){const e=s.create(t),n=this.x-e.x,i=this.y-e.
