// npm 패키지
@antv/g-css-layout-api
A simple implementation of CSS Layout API.
버전
38
메인테이너
51
라이선스
MIT
최초 publish
2022-09-15
publisher
panyuqi
tarball
211,513 B
AUTO-PUBLISHED·1개 버전 인덱싱됨·최근 publish: 2023-05-24
// publisher 캠페인by panyuqi
이 계정에서 catch된 패키지 9건고립된 catch가 아닙니다. 동일 publisher가 8개의 다른 패키지를 추가로 발행했고, 모두 파이프라인이 catch했습니다 — 일회성이 아닌 조직적 캠페인의 형태. 아래 링크는 각 형제 catch의 분석으로 이동합니다.
// offending code· @1.0.38· 1 file flagged
llm: benign · 0.85→ 의심 전송지 없음, 원격 실행 형태 없음 — 2 known-vendor host(s).
- @1.0.38··AUTO-PUBLISHED·publisher: panyuqiheuristic 75/100static flags 1llm benign (0.85) via ollamamature-packageosv-flagged:MAL-2026-3915public-github-push
→ 의심 전송지 없음, 원격 실행 형태 없음 — 2 known-vendor host(s).
// offending code· 1 file flaggedpatterns: 1
--- package/package.json (excerpt) --- { "name": "@antv/g-css-layout-api", "version": "1.0.38", "description": "A simple implementation of CSS Layout API.", "keywords": [ "antv", "g", "rendering engine" ], "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", "sideEffects": true, "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" ], "scripts": { "sync": "tnpm sync" }, "peerDependencies": { "@antv/g-lite": "^1.0.0" }, "publishConfig": { "access": "public" }, "gitHead": "53932c66ed9f2cbc28993e1e359c8df27703fc52" } --- package.json (entry) --- { "name": "@antv/g-css-layout-api", "version": "1.0.38", "description": "A simple implementation of CSS Layout API.", "keywords": [ "antv", "g", "rendering engine" ], "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", "sideEffects": true, "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" ], "scripts": { "sync": "tnpm sync" }, "peerDependencies": { "@antv/g-lite": "^1.0.0" }, "publishConfig": { "access": "public" }, "gitHead": "53932c66ed9f2cbc28993e1e359c8df27703fc52" } --- index.js (entry) --- 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); // export const ContextNode = Syringe.defineToken(''); var FragmentResult = function FragmentResult(_layoutContext, _node, options) { this._layoutContext = void 0; this._node = void 0; this.options = void 0; this.layoutContext = void 0; this.inlineSize = void 0; this.blockSize = void 0; this.node = void 0; this.childFragments = void 0; this.data = void 0; this._layoutContext = _layoutContext; this._node = _node; this.options = options; this.layoutContext = _layoutContext; this.inlineSize = options === null || options === void 0 ? void 0 : options.inlineSize; this.blockSize = options === null || options === void 0 ? void 0 : options.blockSize; this.childFragments = options === null || options === void 0 ? void 0 : options.childFragments; this.data = options.data; this.node = _node; }; (function (LayoutTaskType) { LayoutTaskType["Layout"] = "layout"; LayoutTaskType["IntrinsicSizes"] = "intrinsic-sizes"; })(exports.LayoutTaskType || (exports.LayoutTaskType = {})); var ChildDisplayType; (function (ChildDisplayType) { ChildDisplayType[ChildDisplayType["block"] = 0] = --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- dist/FragmentResult.d.ts (bundled) --- import type { LayoutContext } from './LayoutContext'; import type { LayoutFragment } from './LayoutFragment'; import type { LayoutObject } from './LayoutObject'; export interface FragmentResultFactory { (options: FragmentResultOptions): FragmentResult; } /** * The web developer defined layout method can return either a FragmentResultOptions or a FragmentResult. */ export interface FragmentResultOptions<T = void> { inlineSize: number; blockSize: number; autoBlockSize: number; childFragments: LayoutFragment[]; data: T; } export declare class FragmentResult<T = void> { protected readonly _layoutContext: LayoutContext; protected readonly _node: LayoutObject; protected readonly options: FragmentResultOptions<T>; private layoutContext; readonly inlineSize: number; readonly blockSize: number; private node; childFragments: LayoutFragment[]; data: T; constructor(_layoutContext: LayoutContext, _node: LayoutObject, options: FragmentResultOptions<T>); } //# sourceMappingURL=FragmentResult.d.ts.map --- dist/LayoutChildren.d.ts (bundled) --- import type { LayoutContext } from './LayoutContext'; import type { LayoutFragment } from './LayoutFragment'; import type { LayoutObject } from './LayoutObject'; import type { IntrinsicSizes, LayoutConstraints } from './types'; export interface LayoutChildrenFactory { (options: LayoutChildrenOptions): LayoutChildren; } export interface LayoutChildrenOptions { node: LayoutObject; } export declare class LayoutChildren { protected readonly _layoutContext: LayoutContext; protected readonly options: LayoutChildrenOptions; node: LayoutObject; readonly styleMap: Map<string, any>; layoutContext: LayoutContext; constructor(_layoutContext: LayoutContext, options: LayoutChildrenOptions); intrinsicSizes(): Promise<IntrinsicSizes>; layoutNextFragment(constraints: LayoutConstraints): Promise<LayoutFragment>; } //# sourceMappingURL=LayoutChildren.d.ts.map --- dist/LayoutContext.d.ts (bundled) --- import type { FragmentResultFactory } from './FragmentResult'; import type { LayoutChildrenFactory } from './LayoutChildren'; import type { LayoutFragmentFactory } from './LayoutFragment'; import type { LayoutWorkTask } from './LayoutWorkTask'; import type { ContextId, LayoutTaskType } from './types'; export interface LayoutContextFactory { (options: { mode: LayoutTaskType; }): LayoutContext; } export interface LayoutContextOptions { mode: LayoutTaskType; layoutChildrenFactory: LayoutChildrenFactory; fragmentResultFactory: FragmentResultFactory; layoutFragmentFactory: LayoutFragmentFactory; } /** * 每次layout 有单独的 context */ export declare class LayoutContext { protected readonly options: LayoutContextOptions; contextId: ContextId; workQueue: LayoutWorkTask[]; mode: LayoutTaskType; layoutChildrenFactory: LayoutChildrenFactory; fragmentResultFactory: FragmentResultFactory; layoutFragmentFactory: LayoutFragmentFactory; constructor(options: LayoutContextOptions); appendWorkTask(work: LayoutWorkTask): void; clearWorkQueue(): void; } //# sourceMappingURL=LayoutContext.d.ts.map --- dist/LayoutDefinition.d.ts (bundled) --- import type { FragmentResult, FragmentResultOptions } from './FragmentResult'; import type { LayoutChildren } from './LayoutChildren'; import type { LayoutEdges } from './LayoutEdges'; import type { IntrinsicSizes, LayoutConstraints, LayoutOptions } from './types'; export declare abstract class AbstractLayoutDefinition { static inputProperties: string[]; static childrenInputProperties: string[]; static layoutOptions: LayoutOptions; abstract intrinsicSizes(children: LayoutChildren[], edges: LayoutEdges, styleMap: Map<string, any>): Promise<IntrinsicSizes>; abstract layout(children: LayoutChildren[], edges: LayoutEdges, constraints: LayoutConstraints, styleMap: Map<string, any>): Promise<FragmentResultOptions | FragmentResult>; } /** * internal use */ export type LayoutDefinitionCtor = { new (): AbstractLayoutDefinition; inputProperties: string[]; childrenInputProperties: string[]; layoutOptions: LayoutOptions; }; //# sourceMappingURL=LayoutDefinition.d.ts.map --- dist/LayoutEdges.d.ts (bundled) --- import type { LayoutObject } from './LayoutObject'; export interface LayoutEdgesFactory { (options: LayoutEdgesOptions): LayoutEdges; } export interface LayoutEdgesOptions { node: LayoutObject; } /** * https://drafts.css-houdini.org/css-layout-api/#layoutedges * the size of border, scrollbar, padding */ export declare class LayoutEdges { protected readonly options: LayoutEdgesOptions; readonly inlineStart: number; readonly inlineEnd: number; readonly blockStart: number; readonly blockEnd: number; readonly inline: number; readonly block: number; constructor(options: LayoutEdgesOptions); } //# sourceMappingURL=LayoutEdges.d.ts.map --- dist/LayoutEngine.d.ts (bundled) --- import type { LayoutRegistry } from '@antv/g-lite'; import type { LayoutContextFactory } from './LayoutContext'; import type { LayoutEdgesFactory } from './LayoutEdges'; import type { LayoutFragmentOptions } from './LayoutFragment'; import type { LayoutObject } from './LayoutObject'; import type { LayoutWorkTask } from './LayoutWorkTask'; import type { IntrinsicSizes, LayoutConstraints } from './types'; export declare class LayoutEngine { protected readonly _layoutRegistry: LayoutRegistry; protected readonly _layoutContextFactory: LayoutContextFactory; protected readonly _layoutEdgesFactory: LayoutEdgesFactory; protected layoutRegistry: LayoutRegistry; protected layoutContextFactory: LayoutContextFactory; protected layoutEdgesFactory: LayoutEdgesFactory; constructor(_layoutRegistry: LayoutRegistry, _layoutContextFactory: LayoutContextFactory, _layoutEdgesFactory: LayoutEdgesFactory); /** * This function takes the root of the box-tree, a LayoutConstraints object, and compute the position of every node in the tree * @param rootNode root node of the layout object tree * @param rootPageConstraints layout constraints * @returns */ computeLayout(rootNode: LayoutObject, rootPageConstraints: LayoutConstraints): Promise<void>; /** * calculate intrinsicSize of node tree, use depth dirst / post order traversal * @param rootNode */ determineAllIntrinsicSizes(rootNode: LayoutObject): Promise<void>; protected getLayoutDefinitionName(node: LayoutObject): any; /** * calculate the min/max content size of node * @param node current layout object * @param childNodes children of the current node */ protected determineIntrinsicSizes(node: LayoutObject, childNodes: LayoutObject[]): Promise<void>; protected invokeIntrinsicSizesCallback(layoutName: string, node: LayoutObject, childNodes: LayoutObject[]): Promise<void>; protected calc --- dist/LayoutFragment.d.ts (bundled) --- import type { LayoutContext } from './LayoutContext'; export interface LayoutFragmentFactory<T = void> { (options: LayoutFragmentOptions<T>): LayoutFragment<T>; } export interface LayoutFragmentOptions<T = void> { inlineSize: number; blockSize: number; data: T; } /** * 布局的结果 */ export declare class LayoutFragment<T = void> { protected readonly _layoutContext: LayoutContext; protected readonly options: LayoutFragmentOptions<T>; layoutContext: LayoutContext; readonly inlineSize: number; readonly blockSize: number; inlineOffset: number; blockOffset: number; data: T; constructor(_layoutContext: LayoutContext, options: LayoutFragmentOptions<T>); } //# sourceMappingURL=LayoutFragment.d.ts.map ---
