// npm package
@antv/g6-react-node
Using React Component to Define Your G6 Graph Node
weekly
472
monthly
1,235
versions
12
maintainers
51
license
MIT
first publish
2021-02-25
publisher
iaaron
tarball
153,463 B
AUTO-PUBLISHED·1 version indexed·latest published 2023-12-13
// publisher campaignby iaaron
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.4.8· 1 file flagged
llm: benign · 0.85→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s).
- @1.4.8··AUTO-PUBLISHED·publisher: iaaronheuristic 75/100static flags 1llm benign (0.85) via ollamamature-packageosv-flagged:MAL-2026-3995install-path-npm-publish
→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s).
// offending code· 1 file flaggedpatterns: 1
--- package/package.json (excerpt) --- { "name": "@antv/g6-react-node", "description": "Using React Component to Define Your G6 Graph Node", "version": "1.4.8", "license": "MIT", "main": "dist/index.js", "module": "dist/index.esm.js", "typings": "dist/index.d.ts", "gitHooks": { "pre-commit": "lint-staged" }, "lint-staged": { "*.{js,jsx,less,md,json}": [ "prettier --write" ], "*.ts?(x)": [ "prettier --parser=typescript --write" ] }, "dependencies": { "@antv/g-base": "^0.5.1", "@antv/g-canvas": "^0.5.2", "@types/yoga-layout": "^1.9.3", "react": "^16.12.0", "yoga-layout-prebuilt": "^1.10.0", "@antv/g6-core": "0.8.24" }, "devDependencies": { "@typescript-eslint/eslint-plugin": "^4.11.1", "@umijs/test": "^3.0.5", "csstype": "^3.1.3", "dumi": "^1.1.1", "father-build": "^1.17.2", "gh-pages": "^3.0.0", "lint-staged": "^10.0.7", "prettier": "^1.19.1", "yorkie": "^2.0.0" }, "scripts": { "start": "dumi dev", "build": "father-build", "deploy": "npm run docs:build && npm run docs:deploy", "release": "npm run build && npm publish", "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"", "docs:build": "dumi build", "docs:deploy": "gh-pages -d docs-dist", "test": "umi-test", "test:coverage": "umi-test --coverage" } } --- package.json (entry) --- { "name": "@antv/g6-react-node", "description": "Using React Component to Define Your G6 Graph Node", "version": "1.4.8", "license": "MIT", "main": "dist/index.js", "module": "dist/index.esm.js", "typings": "dist/index.d.ts", "gitHooks": { "pre-commit": "lint-staged" }, "lint-staged": { "*.{js,jsx,less,md,json}": [ "prettier --write" ], "*.ts?(x)": [ "prettier --parser=typescript --write" ] }, "dependencies": { "@antv/g-base": "^0.5.1", "@antv/g-canvas": "^0.5.2", "@types/yoga-layout": "^1.9.3", "react": "^16.12.0", "yoga-layout-prebuilt": "^1.10.0", "@antv/g6-core": "0.8.24" }, "devDependencies": { "@typescript-eslint/eslint-plugin": "^4.11.1", "@umijs/test": "^3.0.5", "csstype": "^3.1.3", "dumi": "^1.1.1", "father-build": "^1.17.2", "gh-pages": "^3.0.0", "lint-staged": "^10.0.7", "prettier": "^1.19.1", "yorkie": "^2.0.0" }, "scripts": { "start": "dumi dev", "build": "father-build", "deploy": "npm run docs:build && npm run docs:deploy", "release": "npm run build && npm publish", "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,j --- index.js (entry) --- 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var React = _interopDefault(require('react')); var Yoga = require('yoga-layout-prebuilt'); var Yoga__default = _interopDefault(Yoga); var g6Core = require('@antv/g6-core'); function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(functio --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- dist/index.d.ts (bundled) --- export * from './ReactNode'; --- dist/index.esm.js (bundled) --- import React from 'react'; import Yoga__default, { ALIGN_AUTO, ALIGN_BASELINE, ALIGN_CENTER, ALIGN_FLEX_END, ALIGN_FLEX_START, ALIGN_SPACE_AROUND, ALIGN_SPACE_BETWEEN, ALIGN_STRETCH, DISPLAY_NONE, DISPLAY_FLEX, FLEX_DIRECTION_COLUMN, FLEX_DIRECTION_COLUMN_REVERSE, FLEX_DIRECTION_ROW, FLEX_DIRECTION_ROW_REVERSE, WRAP_NO_WRAP, WRAP_WRAP, WRAP_WRAP_REVERSE, JUSTIFY_CENTER, JUSTIFY_FLEX_END, JUSTIFY_FLEX_START, JUSTIFY_SPACE_AROUND, JUSTIFY_SPACE_BETWEEN, JUSTIFY_SPACE_EVENLY, Node } from 'yoga-layout-prebuilt'; import { Util } from '@antv/g6-core'; function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _typeof(o) { --- dist/index.js (bundled) --- 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var React = _interopDefault(require('react')); var Yoga = require('yoga-layout-prebuilt'); var Yoga__default = _interopDefault(Yoga); var g6Core = require('@antv/g6-core'); function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return --- dist/Register/event.d.ts (bundled) --- import { IShape } from '@antv/g-base'; import { IAbstractGraph, IG6GraphEvent, Item } from '@antv/g6-core'; export declare type ShapeEventListner = (event: IG6GraphEvent, node: Item | null, shape: IShape, graph: IAbstractGraph) => void; export interface EventAttrs { onClick?: ShapeEventListner; onDBClick?: ShapeEventListner; onMouseEnter?: ShapeEventListner; onMouseMove?: ShapeEventListner; onMouseOut?: ShapeEventListner; onMouseOver?: ShapeEventListner; onMouseLeave?: ShapeEventListner; onMouseDown?: ShapeEventListner; onMouseUp?: ShapeEventListner; onDragStart?: ShapeEventListner; onDrag?: ShapeEventListner; onDragEnd?: ShapeEventListner; onDragEnter?: ShapeEventListner; onDragLeave?: ShapeEventListner; onDragOver?: ShapeEventListner; onDrop?: ShapeEventListner; onContextMenu?: ShapeEventListner; } export declare function appenAutoShapeListener(graph: IAbstractGraph): void; --- dist/Register/getDataFromReactNode.d.ts (bundled) --- import { ReactElement } from 'react'; import { LayoutAttrs } from '../Layout/LayoutEnums'; export interface RawNode { type: string; attrs: { [key: string]: any; } & Partial<LayoutAttrs>; children: RawNode[]; props: { [key: string]: any; }; } declare const getShapeFromReact: (REl: ReactElement) => RawNode; export default getShapeFromReact; --- dist/Register/register.d.ts (bundled) --- import React, { ReactElement } from 'react'; import { ModelConfig } from '@antv/g6-core/lib'; import { LayoutedNode } from '@/Layout/getPositionsUsingYoga'; export declare const registerNodeReact: (el: ReactElement) => LayoutedNode; export declare function createNodeFromReact(Component: React.FC<{ cfg: ModelConfig; }>): { [key: string]: any; }; --- dist/ReactNode/Group.d.ts (bundled) --- import { EventAttrs } from '../Register/event'; import { AnimationConfig } from '../Animation/animate'; import React from 'react'; interface GroupProps { /** * @description.en-US The unique id of this group * @description.zh-CN 唯一id */ id?: string; /** * @description.en-US The name of the shape which can be not unique. * @description.zh-CN 图形名字,可以不唯一 */ name?: string; /** * @description.en-US Whether the group/shape is visible * @description.zh-CN 图形/组是否可见 */ visible?: boolean; /** * @description.en-US Whether the group is capturable * @description.zh-CN 图形/组是否捕捉事件 */ capture?: boolean; /** * @description.en-US Whether the group is allowed to response dragstart, drag, and dragend events. * @description.zh-CN 图形/组是否响应拖拽事件 */ draggable?: boolean; /** * @description.en-US The visual layer index of the group * @description.zh-CN 图形/组的层级 */ zIndex?: number; /** * @description.en-US animation config * @description.zh-CN 动画设置 */ animation?: Partial<AnimationConfig>; /** * @description.en-US Nodes wrapped within the component * @description.zh-CN 组件内包装的节点 */ children?: React.ReactNode; } export declare type CommonProps = GroupProps & EventAttrs; declare const Group: React.FC<GroupProps>; export default Group; --- dist/ReactNode/demo.d.ts (bundled) --- /// <reference types="react" /> export declare const G6MiniDemo: ({ nodeType, count, height, }: { nodeType: string; count: number; height: number; }) => JSX.Element; --- dist/ReactNode/index.d.ts (bundled) --- export { default as Group } from './Group'; export { default as Circle } from './Shape/Circle'; export { default as Ellipse } from './Shape/Ellipse'; export { default as Image } from './Shape/Image'; export { d
