// npm 패키지
@antv/f6-core
A Graph Visualization Framework in JavaScript
버전
2
메인테이너
51
라이선스
MIT
최초 publish
2021-06-01
publisher
openwayne
tarball
1,095,877 B
AUTO-PUBLISHED·1개 버전 인덱싱됨·최근 publish: 2021-06-01
// publisher 캠페인by openwayne
이 계정에서 catch된 패키지 9건고립된 catch가 아닙니다. 동일 publisher가 8개의 다른 패키지를 추가로 발행했고, 모두 파이프라인이 catch했습니다 — 일회성이 아닌 조직적 캠페인의 형태. 아래 링크는 각 형제 catch의 분석으로 이동합니다.
// offending code· @0.0.2· no static-pattern hits
llm: benign · 0.85→ 의심 전송지 없음, 원격 실행 형태 없음 — 6 known-vendor host(s), 1 other host(s).
- @0.0.2··AUTO-PUBLISHED·publisher: openwayneheuristic 75/100static flags 0llm benign (0.85) via ollamaosv-flagged:MAL-2026-3902
→ 의심 전송지 없음, 원격 실행 형태 없음 — 6 known-vendor host(s), 1 other host(s).
// offending code· no static-pattern hits
--- package.json (entry) --- { "name": "@antv/f6-core", "version": "0.0.2", "description": "A Graph Visualization Framework in JavaScript", "keywords": [ "antv", "g6", "graph", "graph analysis", "graph editor", "graph visualization", "relational data" ], "homepage": "https://g6.antv.vision", "bugs": { "url": "https://github.com/antvis/f6/issues" }, "repository": { "type": "git", "url": "https://github.com/antvis/f6" }, "license": "MIT", "author": "https://github.com/orgs/antvis/people", "files": ["package.json", "es", "lib", "dist", "LICENSE", "README.md"], "main": "lib/index.js", "module": "es/index.js", "types": "lib/index.d.ts", "scripts": { "start": "father build --watch", "build": "npm run clean && father build", "ci": "npm run build && npm run coverage", "clean": "rimraf es lib", "coverage": "jest --coverage", "doc": "rimraf apis && typedoc", "lint": "eslint --ext .js,.jsx,.ts,.tsx --format=pretty \"./\"", "lint:src": "eslint --ext .ts --format=pretty \"./src\"", "prettier": "prettier -c --write \"**/*\"", "test": "jest", "test-live": "DEBUG_MODE=1 jest --watch ./tests/unit/graph/graph-s --- index.js (entry) --- "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); var _exportNames = { registerNode: true, registerCombo: true, registerEdge: true, registerBehavior: true, BaseGlobal: true, AbstractGraph: true, Shape: true, Arrow: true, Marker: true, Util: true, AbstractLayout: true, AbstractEvent: true, Node: true, Edge: true, Hull: true, Combo: true }; Object.defineProperty(exports, "AbstractGraph", { enumerable: true, get: function get() { return _graph.default; } }); Object.defineProperty(exports, "Shape", { enumerable: true, get: function get() { return _element.default; } }); Object.defineProperty(exports, "Arrow", { enumerable: true, get: function get() { return _element.Arrow; } }); Object.defineProperty(exports, "Marker", { --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- lib/element/nodes/simple-circle.js (bundled) --- "use strict"; var _tslib = require("tslib"); var _util = require("@antv/util"); var _global = _interopRequireDefault(require("../../global")); var _shape = _interopRequireDefault(require("../shape")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } // 带有图标的圆,可用于拓扑图中 _shape.default.registerNode('simple-circle', { // 自定义节点时的配置 options: { size: _global.default.defaultNode.size, style: { x: 0, y: 0, stroke: _global.default.defaultNode.style.stroke, fill: _global.default.defaultNode.style.fill, lineWidth: _global.default.defaultNode.style.lineWidth }, labelCfg: { style: { fill: _global.default.nodeLabel.style.fill, fontSize: _global.default.nodeLabel.style.fontSize } }, stateStyles: (0, _tslib.__assign)({}, _global.default.nodeStateStyles) }, shapeType: 'simple-circle', // 文本位置 labelPosition: 'center', drawShape: function drawShape(cfg, group) { var style = this.getShapeStyle(cfg); var keyShape = group.addShape('circle', { attrs: style, className: this.type + "-keyShape", draggable: true }); return keyShape; }, /** * 获取节点的样式,供基于该节点自定义时使用 * @param {Object} cfg 节点数据模型 * @return {Object} 节点的样式 */ getShapeStyle: function getShapeStyle(cfg) { var defaultStyle = this.getOptions(cfg).style; var strokeStyle = { stroke: cfg.color }; // 如果设置了color,则覆盖默认的stroke属性 var style = (0, _util.deepMix)({}, defaultStyle, strokeStyle); var size = this.getSize(cfg); var r = size[0] / 2; var styles = (0, _tslib.__assign)({ x: 0, y: 0, r: r }, style); return styles; }, update: function update(cfg, item) { var size = this.getSize(cfg); // 下面这些属性需要覆盖默认样式与目前样式,但若在 cfg 中有指定则应该被 cfg 的相应配置覆盖。 var strokeStyle = { stroke: cfg.color, r: size[0] / 2 }; // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的 --- es/element/nodes/simple-circle.js (bundled) --- import { __assign } from "tslib"; import { deepMix } from '@antv/util'; import Global from '../../global'; import Shape from '../shape'; // 带有图标的圆,可用于拓扑图中 Shape.registerNode('simple-circle', { // 自定义节点时的配置 options: { size: Global.defaultNode.size, style: { x: 0, y: 0, stroke: Global.defaultNode.style.stroke, fill: Global.defaultNode.style.fill, lineWidth: Global.defaultNode.style.lineWidth }, labelCfg: { style: { fill: Global.nodeLabel.style.fill, fontSize: Global.nodeLabel.style.fontSize } }, stateStyles: __assign({}, Global.nodeStateStyles) }, shapeType: 'simple-circle', // 文本位置 labelPosition: 'center', drawShape: function drawShape(cfg, group) { var style = this.getShapeStyle(cfg); var keyShape = group.addShape('circle', { attrs: style, className: this.type + "-keyShape", draggable: true }); return keyShape; }, /** * 获取节点的样式,供基于该节点自定义时使用 * @param {Object} cfg 节点数据模型 * @return {Object} 节点的样式 */ getShapeStyle: function getShapeStyle(cfg) { var defaultStyle = this.getOptions(cfg).style; var strokeStyle = { stroke: cfg.color }; // 如果设置了color,则覆盖默认的stroke属性 var style = deepMix({}, defaultStyle, strokeStyle); var size = this.getSize(cfg); var r = size[0] / 2; var styles = __assign({ x: 0, y: 0, r: r }, style); return styles; }, update: function update(cfg, item) { var size = this.getSize(cfg); // 下面这些属性需要覆盖默认样式与目前样式,但若在 cfg 中有指定则应该被 cfg 的相应配置覆盖。 var strokeStyle = { stroke: cfg.color, r: size[0] / 2 }; // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的属性,保留当前的配置。 var keyShape = item.get('keyShape'); var style = deepMix({}, keyShape.attr(), strokeStyle, cfg.style); this.updateShape(cfg, item, style, true); } }, 'single-node');
