// npm package
@antv/g-mobile
A renderer implemented with Canvas2D API in mobile environment
versions
62
maintainers
51
license
MIT
first publish
2021-03-09
publisher
panyuqi
tarball
35,194 B
AUTO-PUBLISHED·1 version indexed·latest published 2022-05-24
// publisher campaignby panyuqi
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· @1.1.5· 1 file flagged
llm: benign · 0.85→ No suspicious destination, no remote-exec shape — 2 known-vendor host(s).
- @1.1.5··AUTO-PUBLISHED·publisher: panyuqiheuristic 75/100static flags 1llm benign (0.85) via ollamamature-packageosv-flagged:MAL-2026-3924public-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-mobile", "version": "1.1.5", "description": "A renderer implemented with Canvas2D API in mobile environment", "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", "main": "dist/index.js", "unpkg": "dist/index.umd.min.js", "module": "dist/index.esm.js", "types": "dist/index.d.ts", "files": [ "package.json", "dist", "LICENSE", "README.md" ], "dependencies": { "eventemitter3": "^4.0.0", "tslib": "^2.3.1" }, "devDependencies": { "@types/gl-matrix": "^2.4.5", "@types/jest": "^25.0.0" }, "peerDependencies": { "@antv/g": "^5.0.1", "mana-syringe": "^0.3.0" }, "publishConfig": { "access": "public" }, "gitHead": "f5f33290d3601bd78f0312324dec992798c6de7b" } --- package.json (entry) --- { "name": "@antv/g-mobile", "version": "1.1.5", "description": "A renderer implemented with Canvas2D API in mobile environment", "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", "main": "dist/index.js", "unpkg": "dist/index.umd.min.js", "module": "dist/index.esm.js", "types": "dist/index.d.ts", "files": [ "package.json", "dist", "LICENSE", "README.md" ], "dependencies": { "eventemitter3": "^4.0.0", "tslib": "^2.3.1" }, "devDependencies": { "@types/gl-matrix": "^2.4.5", "@types/jest": "^25.0.0" }, "peerDependencies": { "@antv/g": "^5.0.1", "mana-syringe": "^0.3.0" }, "publishConfig": { "access": "public" }, "gitHead": "f5f33290d3601bd78f0312324dec992798c6de7b" } --- index.js (entry) --- 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var g = require('@antv/g'); var eventemitter3 = require('eventemitter3'); function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function getStyle(el, property) { if (el.currentStyle) { return el.currentStyle[property]; } if (window && window.document) { return document.defaultView.getComputedStyle(el, null).getPropertyValue(property); } } function getWidth(el) { var width = getStyle --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- dist/canvas-element.d.ts (bundled) --- declare const _default: { create(ctx: RenderingContext): HTMLCanvasElement; }; export default _default; //# sourceMappingURL=canvas-element.d.ts.map --- dist/canvas.d.ts (bundled) --- import type { CanvasConfig as BaseConfig } from '@antv/g'; import { Canvas } from '@antv/g'; export interface CanvasConfig extends BaseConfig { context?: RenderingContext; devicePixelRatio: number; } declare class MobileCanvas extends Canvas { constructor(config: CanvasConfig); } export default MobileCanvas; //# sourceMappingURL=canvas.d.ts.map --- dist/index.d.ts (bundled) --- export * from '@antv/g'; export { default as Canvas } from './canvas'; //# sourceMappingURL=index.d.ts.map --- dist/index.esm.js (bundled) --- import { Canvas } from '@antv/g'; export * from '@antv/g'; import { EventEmitter } from 'eventemitter3'; function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function getStyle(el, property) { if (el.currentStyle) { return el.currentStyle[property]; } if (window && window.document) { return document.defaultView.getComputedStyle(el, null).getPropertyValue(property); } } function getWidth(el) { var width = getStyle(el, 'width'); if (width === 'auto') { width = el.offsetWidth; } return parseFloat(width); } function getHeight(el) { var height = getStyle(el, 'height'); if (height === 'auto') { height = el.offsetHeight; } return parseFloat(height); } function normContext(ctx, devicePixelRatio) { ctx.canvas.width = getWidth(ctx.canvas) * devicePixelRatio || ctx.canvas.width || 0; ctx.canvas.height = getHeight(ctx.canvas) * devicePixelRatio || ctx.canvas.height || 0; return ctx; } var CanvasElement = /*#__PURE__*/function () { function CanvasElement(ctx) { this.context = void 0; this.width = void 0; this.height = void 0; this.isCanvasElement = true; this.emitter = new EventEmitter(); this.context = ctx; // canvas实际的宽高 (width/height) * pixelRatio // 有可能是 node canvas 创建的 context 对象 var --- dist/index.js (bundled) --- 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var g = require('@antv/g'); var eventemitter3 = require('eventemitter3'); function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function getStyle(el, property) { if (el.currentStyle) { return el.currentStyle[property]; } if (window && window.document) { return document.defaultView.getComputedStyle(el, null).getPropertyValue(property); } } function getWidth(el) { var width = getStyle(el, 'width'); if (width === 'auto') { width = el.offsetWidth; } return parseFloat(width); } function getHeight(el) { var height = getStyle(el, 'height'); if (height === 'auto') { height = el.offsetHeight; } return parseFloat(height); } function normContext(ctx, devicePixelRatio) { ctx.canvas.width = getWidth(ctx.canvas) * devicePixelRatio || ctx.canvas.width || 0; ctx.canvas.height = getHeight(ctx.canvas) * devicePixelRatio || ctx.canvas.height || 0; return ctx; } var CanvasElement = /*#__PURE__*/function () { function CanvasElement(ctx) { this.context = void 0; this.width = void 0; this.height = void 0; this.isCanvasElement = true; this.emitter = new eventemitter3.EventEmitter(); this.context = ctx; // canvas实际的宽高 (width/height --- dist/index.umd.js (bundled) --- (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@antv/g')) : typeof define === 'function' && define.amd ? define(['exports', '@antv/g'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.G = global.G || {}, global.G.Mobile = {}), global.window.G)); }(this, (function (exports, g) { 'use strict'; function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function getStyle(el, property) { if (el.currentStyle) { return el.currentStyle[property]; } if (window && window.document) { return document.defaultView.getComputedStyle(el, null).getPropertyValue(property); } } function getWidth(el) { var width = getStyle(el, 'width'); if (width === 'auto') { width = el.offsetWidth; } return parseFloat(width); } function getHeight(el) { var height = getStyle(el, 'height'); if (height === 'auto') { height = el.offsetHeight; } return parseFloat(height); } function normContext(ctx, devicePixelRatio) { ctx.canvas.width = getWidth(ctx.canvas) * devicePixelRatio || ctx.canvas.width || 0; ctx.canvas.height = getHei --- dist/index.umd.min.js (bundled) --- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g")):"function"==typeof define&&define.amd?define(["exports","@antv/g"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.Mobile={}),t.window.G)}(this,(function(t,e){"use strict";function n(){return n=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},n.apply(this,arguments)}function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}function o(t,e){return t.currentStyle?t.currentStyle[e]:window&&window.document?document.defaultView.getComputedStyle(t,null).getPropertyValue(e):void 0}function i(t,e){var n,r;return t.canvas.width=("auto"===(r=o(n=t.canvas,"width"))&&(r=n.offsetWidth),parseFloat(r)*e||t.canvas.width||0),t.canvas.height=function(t){var e=o(t,"height");return"auto"===e&&(e=t.offsetHeight),parseFloat(e)}(t.canvas)*e||t.canvas.height||0,t}var s=function(t,e,n){return t(n={path:e,exports:{},require:function(t,e){return function()
