// npm package
@antv/g-plugin-rough-svg-renderer
A G plugin of renderer implementation with rough.js
versions
207
maintainers
51
license
MIT
first publish
2022-05-07
publisher
wang1212
tarball
788,824 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 — 1 known-vendor host(s), 1 other host(s).
- @2.1.1··AUTO-PUBLISHED·publisher: wang1212heuristic 75/100static flags 1llm benign (0.85) via ollamamature-packageosv-flagged:MAL-2026-3952public-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-rough-svg-renderer", "version": "2.1.1", "description": "A G plugin of renderer implementation with rough.js", "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", "roughjs": "^4.5.2", "tslib": "^2.5.3", "@antv/g-lite": "2.7.0", "@antv/g-svg": "2.1.1" }, "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-rough-svg-renderer", "version": "2.1.1", "description": "A G plugin of renderer implementation with rough.js", "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", "roughjs": "^4.5.2", "tslib": "^2.5.3", "@antv/g-lite": "2.7.0", "@antv/g-svg": "2.1.1" }, "publishConfig": { "access": "public" }, "scripts": { "build:js": "rimraf dist && rollup -c", "build:types": "rimraf types && tsc --emitDeclarationOnly --noCheck", "build": "npm --- index.js (entry) --- /*! * @antv/g-plugin-rough-svg-renderer * @description A G plugin of renderer implementation with rough.js * @version 2.1.1 * @date 12/24/2025, 11:58:01 AM * @author AntVis * @docs https://g.antv.antgroup.com/ */ 'use strict'; 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 _slicedToArray = require('@babel/runtime/helpers/slicedToArray'); var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray'); var gSvg = require('@antv/g-svg'); var SUPPORTED_ROUGH_OPTIONS = ['bowing', 'roughness', 'fill', 'stroke', 'lineWidth', 'seed', 'fillStyle', 'fillWeight', 'hachureAngle', 'hachureGap', 'curveStepCount', 'curveFitting', 'lineDash', 'lineDashOffset', 'fillLineDash', 'fillLineDashOffset', 'disableMultiStroke', 'disableMultiStrokeFill', 'simplification', 'dashOffset', 'dashGap', 'zigzagOffset', 'preserveVertices']; function mergeOpacity(color, opacity) { // since rough.js doesn't support fill/strokeOpacity var col --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- dist/index.esm.js (bundled) --- /*! * @antv/g-plugin-rough-svg-renderer * @description A G plugin of renderer implementation with rough.js * @version 2.1.1 * @date 12/24/2025, 11:58:01 AM * @author AntVis * @docs https://g.antv.antgroup.com/ */ 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 { isCSSRGB, Shape, translatePathToString, AbstractRendererPlugin } from '@antv/g-lite'; import _slicedToArray from '@babel/runtime/helpers/slicedToArray'; import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray'; import { SVGRenderer } from '@antv/g-svg'; var SUPPORTED_ROUGH_OPTIONS = ['bowing', 'roughness', 'fill', 'stroke', 'lineWidth', 'seed', 'fillStyle', 'fillWeight', 'hachureAngle', 'hachureGap', 'curveStepCount', 'curveFitting', 'lineDash', 'lineDashOffset', 'fillLineDash', 'fillLineDashOffset', 'disableMultiStroke', 'disableMultiStrokeFill', 'simplification', 'dashOffset', 'dashGap', 'zigzagOffset', 'preserveVertices']; function mergeOpacity(color, opacity) { // since rough.js doesn't support fill/strokeOpacity var colorString = color.toString(); if (isCSSRGB(color)) { if (opacity !== 1) { var r = color.r, g = color.g, b = color.b, alpha = color.alpha; colorString = "rgba(".concat(r, ",").concat(g, ",").concat(b, ",").concat(Number(alpha) * opacity, ")"); } } return colorString; } var MIN_STROKE_WIDTH = 0.1; function generateRoughOptions(object) { var _ref = object.parsedStyle, fill = _ref.fill, stroke = _ref.stroke, _ref$fillOpacity = _ref.fillOpacity, fillOpacity = _ref$fillOpacity === void 0 ? 1 : _ref$fillOpacity, _ref$strokeOpacity = _ref.strokeOpacity, strokeOpacity = _ref$strokeOpacity === void 0 ? 1 : _ref$strokeOpacity, bowing = _ref.bowing, roughness = _ref.roughness, _ref$l --- dist/index.js (bundled) --- /*! * @antv/g-plugin-rough-svg-renderer * @description A G plugin of renderer implementation with rough.js * @version 2.1.1 * @date 12/24/2025, 11:58:01 AM * @author AntVis * @docs https://g.antv.antgroup.com/ */ 'use strict'; 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 _slicedToArray = require('@babel/runtime/helpers/slicedToArray'); var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray'); var gSvg = require('@antv/g-svg'); var SUPPORTED_ROUGH_OPTIONS = ['bowing', 'roughness', 'fill', 'stroke', 'lineWidth', 'seed', 'fillStyle', 'fillWeight', 'hachureAngle', 'hachureGap', 'curveStepCount', 'curveFitting', 'lineDash', 'lineDashOffset', 'fillLineDash', 'fillLineDashOffset', 'disableMultiStroke', 'disableMultiStrokeFill', 'simplification', 'dashOffset', 'dashGap', 'zigzagOffset', 'preserveVertices']; function mergeOpacity(color, opacity) { // since rough.js doesn't support fill/strokeOpacity var colorString = color.toString(); if (gLite.isCSSRGB(color)) { if (opacity !== 1) { var r = color.r, g = color.g, b = color.b, alpha = color.alpha; colorString = "rgba(".concat(r, ",").concat(g, ",").concat(b, ",").concat(Number(alpha) * opacity, ")"); } } return colorString; } var MIN_STROKE_WIDTH = 0.1; function generateRoughOptions(object) { var _ref = object.parsedStyle, fill = _ref.fill, stroke = _ref.stroke, _ref$fillOpacity = _ref.fillOpacity, fillOpacity = _ref$fillOpacity === void 0 ? 1 : _ref$fillOpacity, _ref$strokeOpacity = _ref.strokeOpacity, strokeOpacity = _ref$strokeOpacity === void 0 ? 1 : _ref$strokeOpacity, bowing = _ref.bowing, roughness = _ref.roughness, _ref$lineWidth = _ref.lineWidth, --- dist/index.umd.min.js (bundled) --- /*! * @antv/g-plugin-rough-svg-renderer * @description A G plugin of renderer implementation with rough.js * @version 2.1.1 * @date 12/24/2025, 11:58:01 AM * @author AntVis * @docs https://g.antv.antgroup.com/ */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g-lite"),require("@antv/g-svg")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite","@antv/g-svg"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.RoughSVGRenderer={}),t.window.G,t.window.G.SVG)}(this,function(t,e,s){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t){return r="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},r(t)}function o(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var s=t[Symbol.toPrimitive];if(void 0!==s){var n=s.call(t,e||"default");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}function a(t,e){for(var s=0;e.length>s;s++){var n=e[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,o(n.key),n)}}function i(t,e,s){return e&&a(t.prototype,e),s&&a(t,s),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(c=function(){return!!t})()}function l(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceErr
