@open-pencil/scene-graph 0.13.2 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/arrow-caps.d.ts +44 -0
- package/dist/arrow-caps.d.ts.map +1 -0
- package/dist/arrow-caps.js +131 -0
- package/dist/arrow-caps.js.map +1 -0
- package/dist/chunks/checkpoint.js +78 -0
- package/dist/chunks/checkpoint.js.map +1 -0
- package/dist/chunks/components/properties.js +1571 -0
- package/dist/chunks/components/properties.js.map +1 -0
- package/dist/chunks/coordinate.js +87 -33
- package/dist/chunks/coordinate.js.map +1 -1
- package/dist/chunks/font-style.js +2 -1
- package/dist/chunks/font-style.js.map +1 -1
- package/dist/chunks/index.js +1283 -0
- package/dist/chunks/index.js.map +1 -0
- package/dist/constants.js +1 -18
- package/dist/constants2.d.ts +0 -1
- package/dist/constants2.d.ts.map +1 -1
- package/dist/coordinate.d.ts +107 -11
- package/dist/coordinate.d.ts.map +1 -1
- package/dist/coordinate.js +2 -2
- package/dist/coordinate2.d.ts +2 -2
- package/dist/copy.d.ts +2 -2
- package/dist/copy.js +2 -2
- package/dist/geometry.d.ts +2 -2
- package/dist/geometry.js +2 -431
- package/dist/guides.d.ts +2 -0
- package/dist/guides.js +0 -0
- package/dist/guides2.d.ts +11 -0
- package/dist/guides2.d.ts.map +1 -0
- package/dist/hit-test.d.ts +1 -2
- package/dist/hit-test.d.ts.map +1 -1
- package/dist/hit-test.js +26 -14
- package/dist/hit-test.js.map +1 -1
- package/dist/images.js +0 -1
- package/dist/images.js.map +1 -1
- package/dist/images2.d.ts.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.js +5 -6
- package/dist/instances.d.ts +2 -2
- package/dist/instances.js +2 -2
- package/dist/layout-guides.d.ts +2 -0
- package/dist/layout-guides.js +2 -0
- package/dist/layout-guides2.d.ts +16 -0
- package/dist/layout-guides2.d.ts.map +1 -0
- package/dist/matrix2.d.ts +0 -1
- package/dist/matrix2.d.ts.map +1 -1
- package/dist/node-defaults.d.ts +1 -2
- package/dist/node-defaults.d.ts.map +1 -1
- package/dist/node-defaults.js +1 -1
- package/dist/parse-path.d.ts +1 -2
- package/dist/parse-path.d.ts.map +1 -1
- package/dist/parse-path.js.map +1 -1
- package/dist/preview.d.ts +2 -12
- package/dist/preview.js +1 -1
- package/dist/preview2.d.ts +12 -0
- package/dist/preview2.d.ts.map +1 -0
- package/dist/primitives2.d.ts.map +1 -1
- package/dist/resize.d.ts +18 -4
- package/dist/resize.d.ts.map +1 -1
- package/dist/resize.js +70 -22
- package/dist/resize.js.map +1 -1
- package/dist/snap.js +1 -1
- package/dist/source-metadata.d.ts +1 -2
- package/dist/source-metadata.d.ts.map +1 -1
- package/dist/source-metadata.js +1 -1
- package/dist/text-picture.d.ts +13 -2
- package/dist/text-picture.d.ts.map +1 -1
- package/dist/text-picture.js +2 -2
- package/dist/types.d.ts +499 -2
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -1296
- package/dist/types2.d.ts +2 -430
- package/dist/undo.js +1 -1
- package/dist/undo2.d.ts +5 -0
- package/dist/undo2.d.ts.map +1 -1
- package/dist/variables.d.ts +1 -2
- package/dist/variables.d.ts.map +1 -1
- package/dist/variables.js +1 -1
- package/dist/variant-name.d.ts.map +1 -1
- package/dist/variant-properties.d.ts +10 -0
- package/dist/variant-properties.d.ts.map +1 -0
- package/dist/variant-properties.js +39 -0
- package/dist/variant-properties.js.map +1 -0
- package/dist/vector-network.js +1 -1
- package/dist/vector-network2.d.ts +1 -2
- package/dist/vector-network2.d.ts.map +1 -1
- package/package.json +40 -15
- package/src/arrow-caps.ts +146 -0
- package/src/bindings.ts +20 -0
- package/src/checkpoint.ts +123 -0
- package/src/components/properties.ts +238 -0
- package/src/constants.ts +6 -0
- package/src/coordinate.ts +226 -0
- package/src/copy.ts +294 -0
- package/src/events.ts +21 -0
- package/src/export-scale.ts +16 -0
- package/src/font-style.ts +77 -0
- package/src/geometry.ts +530 -0
- package/src/guides.ts +8 -0
- package/src/hit-test.ts +205 -0
- package/src/images.ts +34 -0
- package/src/index.ts +686 -0
- package/src/instance-overrides.test.ts +67 -0
- package/src/instance-overrides.ts +152 -0
- package/src/instances.ts +480 -0
- package/src/layout-guides.ts +103 -0
- package/src/matrix.ts +116 -0
- package/src/mutation-impact.ts +70 -0
- package/src/node-defaults.ts +186 -0
- package/src/parse-path.ts +191 -0
- package/src/preview.ts +80 -0
- package/src/primitives.ts +42 -0
- package/src/resize.ts +302 -0
- package/src/shared-styles.ts +73 -0
- package/src/snap.ts +129 -0
- package/src/source-metadata.ts +8 -0
- package/src/text-picture.ts +65 -0
- package/src/types.ts +635 -0
- package/src/undo.ts +171 -0
- package/src/variables.ts +399 -0
- package/src/variant-name.ts +15 -0
- package/src/variant-properties.ts +48 -0
- package/src/vector-network.ts +293 -0
- package/dist/chunks/copy.js +0 -576
- package/dist/chunks/copy.js.map +0 -1
- package/dist/constants.js.map +0 -1
- package/dist/geometry.js.map +0 -1
- package/dist/preview.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/types2.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["Variables.createVariable","Variables.createCollection","Variables.getActiveModeId","Variables.getNodeVariableModeId","Variables.resolveVariable","Variables.resolveColorVariable","Variables.resolveNumberVariable","Variables.resolveColorVariableForNode","Variables.resolveNumberVariableForNode","Variables.getVariablesForCollection","Variables.getVariablesByType","HitTest.hitTest","HitTest.hitTestDeep","HitTest.hitTestFrame","Instances.createInstance","Instances.getMainComponent","Instances.getInstances"],"sources":["../../src/mutation-impact.ts","../../src/snap.ts","../../src/layout-guides.ts","../../src/shared-styles.ts","../../src/undo.ts","../../src/text-picture.ts","../../src/preview.ts","../../src/source-metadata.ts","../../src/variables.ts","../../src/index.ts"],"sourcesContent":["import type { SceneGraph } from './index'\n\nexport interface SceneMutationImpact {\n changedNodeIds: Set<string>\n previousParentIds: Set<string>\n currentParentIds: Set<string>\n createdNodeIds: Set<string>\n deletedNodeIds: Set<string>\n}\n\nexport function createSceneMutationImpact(): SceneMutationImpact {\n return {\n changedNodeIds: new Set(),\n previousParentIds: new Set(),\n currentParentIds: new Set(),\n createdNodeIds: new Set(),\n deletedNodeIds: new Set()\n }\n}\n\nexport type MutationImpactListener = (impact: SceneMutationImpact) => void\n\nexport interface CollectedSceneMutation<T> {\n result: T\n impact: SceneMutationImpact\n}\n\n/** Collects the actual graph nodes and parent containers touched by an operation. */\nexport async function collectSceneMutation<T>(\n graph: SceneGraph,\n operation: () => T | Promise<T>\n): Promise<CollectedSceneMutation<T>> {\n const impact = createSceneMutationImpact()\n const unbind = graph.onNodeEvents({\n created: (node) => {\n impact.createdNodeIds.add(node.id)\n impact.changedNodeIds.add(node.id)\n if (node.parentId) impact.currentParentIds.add(node.parentId)\n },\n updated: (id) => impact.changedNodeIds.add(id),\n deleted: (id, parentId) => {\n if (parentId) impact.previousParentIds.add(parentId)\n impact.deletedNodeIds.add(id)\n impact.changedNodeIds.add(id)\n },\n reparented: (nodeId, oldParentId, newParentId) => {\n impact.changedNodeIds.add(nodeId)\n if (oldParentId) impact.previousParentIds.add(oldParentId)\n impact.currentParentIds.add(newParentId)\n },\n reordered: (nodeId, parentId, _index, previousParentId) => {\n impact.changedNodeIds.add(nodeId)\n if (previousParentId && previousParentId !== parentId) {\n impact.previousParentIds.add(previousParentId)\n }\n impact.currentParentIds.add(parentId)\n }\n })\n try {\n return { result: await operation(), impact }\n } finally {\n unbind()\n }\n}\n\nexport function mutationLayoutScopeIds(impact: SceneMutationImpact): string[] {\n return [\n ...new Set([...impact.changedNodeIds, ...impact.previousParentIds, ...impact.currentParentIds])\n ]\n}\n","import type { SceneNode } from './'\nimport { rotatedBBox } from './geometry'\nimport type { Rect } from './primitives'\n\nconst DEFAULT_SNAP_THRESHOLD = 5\n\nexport interface SnapGuide {\n axis: 'x' | 'y'\n position: number\n from: number\n to: number\n}\n\nexport interface SnapResult {\n dx: number\n dy: number\n guides: SnapGuide[]\n}\n\nfunction getEdges(node: SceneNode) {\n return rotatedBBox(node.x, node.y, node.width, node.height, node.rotation)\n}\n\n// Pairwise edge/center matching intentionally keeps both axes in one pass.\n// eslint-disable-next-line complexity\nexport function computeSnap(\n movingIds: Set<string>,\n movingBounds: Rect,\n allNodes: SceneNode[],\n threshold = DEFAULT_SNAP_THRESHOLD\n): SnapResult {\n const targets = allNodes.filter((n) => !movingIds.has(n.id))\n if (targets.length === 0) return { dx: 0, dy: 0, guides: [] }\n\n const m = {\n left: movingBounds.x,\n right: movingBounds.x + movingBounds.width,\n centerX: movingBounds.x + movingBounds.width / 2,\n top: movingBounds.y,\n bottom: movingBounds.y + movingBounds.height,\n centerY: movingBounds.y + movingBounds.height / 2\n }\n\n let bestDx = Infinity\n let bestDy = Infinity\n const guides: SnapGuide[] = []\n\n for (const target of targets) {\n const t = getEdges(target)\n\n // X-axis snapping: left-to-left, left-to-right, right-to-left, right-to-right, center-to-center\n const xPairs: [number, number][] = [\n [m.left, t.left],\n [m.left, t.right],\n [m.right, t.left],\n [m.right, t.right],\n [m.centerX, t.centerX]\n ]\n\n for (const [mVal, tVal] of xPairs) {\n const d = tVal - mVal\n if (Math.abs(d) < threshold && Math.abs(d) <= Math.abs(bestDx)) {\n if (Math.abs(d) < Math.abs(bestDx)) {\n bestDx = d\n guides.length = guides.filter((g) => g.axis === 'y').length\n ? guides.length\n : guides.length\n // Remove old x guides if we found a closer snap\n for (let i = guides.length - 1; i >= 0; i--) {\n if (guides[i].axis === 'x') guides.splice(i, 1)\n }\n }\n if (Math.abs(d) === Math.abs(bestDx)) {\n const minY = Math.min(m.top, t.top)\n const maxY = Math.max(m.bottom, t.bottom)\n guides.push({ axis: 'x', position: tVal, from: minY, to: maxY })\n }\n }\n }\n\n // Y-axis snapping\n const yPairs: [number, number][] = [\n [m.top, t.top],\n [m.top, t.bottom],\n [m.bottom, t.top],\n [m.bottom, t.bottom],\n [m.centerY, t.centerY]\n ]\n\n for (const [mVal, tVal] of yPairs) {\n const d = tVal - mVal\n if (Math.abs(d) < threshold && Math.abs(d) <= Math.abs(bestDy)) {\n if (Math.abs(d) < Math.abs(bestDy)) {\n for (let i = guides.length - 1; i >= 0; i--) {\n if (guides[i].axis === 'y') guides.splice(i, 1)\n }\n bestDy = d\n }\n if (Math.abs(d) === Math.abs(bestDy)) {\n const minX = Math.min(m.left, t.left)\n const maxX = Math.max(m.right, t.right)\n guides.push({ axis: 'y', position: tVal, from: minX, to: maxX })\n }\n }\n }\n }\n\n return {\n dx: Math.abs(bestDx) <= threshold ? bestDx : 0,\n dy: Math.abs(bestDy) <= threshold ? bestDy : 0,\n guides\n }\n}\n\nexport function computeSelectionBounds(nodes: SceneNode[]): Rect | null {\n if (nodes.length === 0) return null\n let minX = Infinity\n let minY = Infinity\n let maxX = -Infinity\n let maxY = -Infinity\n for (const n of nodes) {\n const edges = getEdges(n)\n minX = Math.min(minX, edges.left)\n minY = Math.min(minY, edges.top)\n maxX = Math.max(maxX, edges.right)\n maxY = Math.max(maxY, edges.bottom)\n }\n return { x: minX, y: minY, width: maxX - minX, height: maxY - minY }\n}\n","import type { LayoutGrid, SceneNode } from './types'\n\nexport interface LayoutGuideLine {\n axis: 'x' | 'y'\n position: number\n}\n\nconst MAX_LAYOUT_GUIDE_LINES = 10_000\n\nfunction normalizedCount(grid: LayoutGrid): number {\n const value = grid.count ?? grid.numSections ?? 1\n if (!Number.isFinite(value)) return 0\n return Math.min(MAX_LAYOUT_GUIDE_LINES, Math.max(0, Math.floor(value)))\n}\n\nfunction pattern(grid: LayoutGrid): 'COLUMNS' | 'ROWS' | 'GRID' {\n if (grid.pattern === 'GRID' || grid.pattern === 'ROWS') return grid.pattern\n if (grid.axis === 'Y') return 'ROWS'\n return 'COLUMNS'\n}\n\nfunction alignment(grid: LayoutGrid): 'MIN' | 'CENTER' | 'MAX' | 'STRETCH' {\n const value = grid.alignment ?? grid.type\n if (value === 'CENTER' || value === 'MAX' || value === 'STRETCH') return value\n return 'MIN'\n}\n\nfunction sectionSize(nodeSize: number, grid: LayoutGrid): number {\n const fixed = grid.sectionSize ?? 0\n if (alignment(grid) !== 'STRETCH') return fixed\n const count = normalizedCount(grid)\n const gutter = grid.gutterSize ?? 0\n const offset = grid.offset ?? 0\n return (nodeSize - offset * 2 - Math.max(0, count - 1) * gutter) / count\n}\n\nfunction start(nodeSize: number, grid: LayoutGrid, size: number): number {\n const count = normalizedCount(grid)\n const gutter = grid.gutterSize ?? 0\n const offset = grid.offset ?? 0\n const span = count * size + Math.max(0, count - 1) * gutter\n if (alignment(grid) === 'CENTER') return (nodeSize - span) / 2 + offset\n if (alignment(grid) === 'MAX') return nodeSize - span - offset\n return offset\n}\n\nexport interface LayoutGuideSection {\n axis: 'x' | 'y'\n start: number\n end: number\n}\n\nexport function layoutGuideSections(\n node: Pick<SceneNode, 'width' | 'height'>,\n grid: LayoutGrid\n): LayoutGuideSection[] {\n if (grid.visible === false || pattern(grid) === 'GRID') return []\n const axis = pattern(grid) === 'ROWS' ? 'y' : 'x'\n const nodeSize = axis === 'x' ? node.width : node.height\n const size = sectionSize(nodeSize, grid)\n const count = normalizedCount(grid)\n if (count <= 0 || size <= 0) return []\n const first = start(nodeSize, grid, size)\n const step = size + (grid.gutterSize ?? 0)\n return Array.from({ length: count }, (_, index) => {\n const sectionStart = first + index * step\n return { axis, start: sectionStart, end: sectionStart + size }\n })\n}\n\nexport function layoutGuideLines(node: Pick<SceneNode, 'width' | 'height'>, grid: LayoutGrid) {\n if (grid.visible === false) return []\n const gridPattern = pattern(grid)\n const lines: LayoutGuideLine[] = []\n if (gridPattern === 'GRID') {\n const size = grid.sectionSize ?? 0\n if (size <= 0) return lines\n for (\n let index = 0, x = grid.offset ?? 0;\n x <= node.width && index < MAX_LAYOUT_GUIDE_LINES;\n index++, x += size\n ) {\n lines.push({ axis: 'x', position: x })\n }\n for (\n let index = 0, y = grid.offset ?? 0;\n y <= node.height && index < MAX_LAYOUT_GUIDE_LINES;\n index++, y += size\n ) {\n lines.push({ axis: 'y', position: y })\n }\n return lines\n }\n\n const sections = layoutGuideSections(node, grid)\n for (const section of sections) {\n lines.push(\n { axis: section.axis, position: section.start },\n { axis: section.axis, position: section.end }\n )\n }\n return lines\n}\n","import type { SceneGraph, SceneNode, SharedStyle, SharedStyleKind, SharedStyleType } from './index'\n\nconst STYLE_REF_KEYS = {\n fill: 'fillStyleId',\n stroke: 'strokeStyleId',\n text: 'textStyleId',\n effect: 'effectStyleId',\n grid: 'gridStyleId'\n} as const satisfies Record<SharedStyleKind, keyof SceneNode>\n\nconst STYLE_TYPES = {\n fill: 'FILL',\n stroke: 'FILL',\n text: 'TEXT',\n effect: 'EFFECT',\n grid: 'GRID'\n} as const satisfies Record<SharedStyleKind, SharedStyleType>\n\nconst TEXT_STYLE_KEYS = new Set<keyof SceneNode>([\n 'fontFamily',\n 'fontWeight',\n 'italic',\n 'fontSize',\n 'lineHeight',\n 'letterSpacing',\n 'textDecoration',\n 'textCase',\n 'fontFeatures'\n])\n\nexport function sharedStyleRefKey(kind: SharedStyleKind): (typeof STYLE_REF_KEYS)[SharedStyleKind] {\n return STYLE_REF_KEYS[kind]\n}\n\nexport function sharedStyleTypeForKind(kind: SharedStyleKind): SharedStyleType {\n return STYLE_TYPES[kind]\n}\n\nexport function getSharedStyles(graph: SceneGraph, kind: SharedStyleKind): SharedStyle[] {\n const type = sharedStyleTypeForKind(kind)\n const styles: SharedStyle[] = []\n for (const node of graph.getAllNodes()) {\n if (node.sharedStyleType !== type || !node.source.id) continue\n styles.push({ id: node.source.id, nodeId: node.id, name: node.name, type })\n }\n return styles.sort((left, right) => left.name.localeCompare(right.name))\n}\n\nexport function styleDetachmentChanges(\n node: SceneNode,\n changes: Partial<SceneNode>\n): Partial<SceneNode> {\n const next = { ...changes }\n if ('fills' in changes && !('fillStyleId' in changes) && node.fillStyleId) {\n next.fillStyleId = null\n }\n if ('strokes' in changes && !('strokeStyleId' in changes) && node.strokeStyleId) {\n next.strokeStyleId = null\n }\n if ('effects' in changes && !('effectStyleId' in changes) && node.effectStyleId) {\n next.effectStyleId = null\n }\n if ('layoutGrids' in changes && !('gridStyleId' in changes) && node.gridStyleId) {\n next.gridStyleId = null\n }\n const changesTextStyle = (Object.keys(changes) as (keyof SceneNode)[]).some((key) =>\n TEXT_STYLE_KEYS.has(key)\n )\n if (changesTextStyle && !('textStyleId' in changes) && node.textStyleId) {\n next.textStyleId = null\n }\n return next\n}\n","export interface UndoEntry {\n label: string\n forward: () => void\n inverse: () => void\n coalesceKey?: string\n}\n\nexport interface UndoManagerOptions {\n limit?: number\n /** Called after recording, undoing, redoing, or clearing committed history. */\n onChange?: () => void\n}\n\ninterface UndoBatch {\n label: string\n entries: UndoEntry[]\n coalesceKey?: string\n}\n\nconst DEFAULT_HISTORY_LIMIT = 200\n\nexport class UndoManager {\n private undoStack: UndoEntry[] = []\n private redoStack: UndoEntry[] = []\n private batches: UndoBatch[] = []\n private readonly limit: number\n private readonly onChange: (() => void) | undefined\n\n constructor(options: UndoManagerOptions = {}) {\n this.limit = options.limit ?? DEFAULT_HISTORY_LIMIT\n this.onChange = options.onChange\n }\n\n apply(entry: UndoEntry): void {\n this.execute(entry)\n }\n\n execute(entry: UndoEntry): void {\n entry.forward()\n this.record(entry)\n }\n\n push(entry: UndoEntry): void {\n this.record(entry)\n }\n\n record(entry: UndoEntry): void {\n const batch = this.currentBatch\n if (batch) {\n batch.entries.push(entry)\n return\n }\n this.pushUndoEntry(entry)\n }\n\n undo(): string | null {\n const entry = this.undoStack.pop()\n if (!entry) return null\n entry.inverse()\n this.redoStack.push(entry)\n this.onChange?.()\n return entry.label\n }\n\n redo(): string | null {\n const entry = this.redoStack.pop()\n if (!entry) return null\n entry.forward()\n this.undoStack.push(entry)\n this.onChange?.()\n return entry.label\n }\n\n beginBatch(label: string, coalesceKey?: string): void {\n this.batches.push({ label, entries: [], coalesceKey })\n }\n\n commitBatch(): void {\n const batch = this.batches.pop()\n if (!batch || batch.entries.length === 0) return\n\n const entry = this.createBatchEntry(batch)\n const parentBatch = this.currentBatch\n if (parentBatch) parentBatch.entries.push(entry)\n else this.pushUndoEntry(entry)\n }\n\n runBatch<T>(label: string, fn: () => T, coalesceKey?: string): T {\n this.beginBatch(label, coalesceKey)\n try {\n const result = fn()\n this.commitBatch()\n return result\n } catch (error) {\n this.rollbackBatch()\n throw error\n }\n }\n\n rollbackBatch(): void {\n const batch = this.batches.pop()\n if (!batch) return\n for (const entry of batch.entries.toReversed()) entry.inverse()\n }\n\n /** Abandon provisional history without replaying it or changing committed undo/redo entries. */\n discardBatches(): void {\n this.batches = []\n }\n\n clear(): void {\n this.undoStack = []\n this.redoStack = []\n this.discardBatches()\n this.onChange?.()\n }\n\n get isBatching(): boolean {\n return this.batches.length > 0\n }\n\n get canUndo(): boolean {\n return this.undoStack.length > 0\n }\n\n get canRedo(): boolean {\n return this.redoStack.length > 0\n }\n\n get undoLabel(): string | null {\n return this.undoStack.at(-1)?.label ?? null\n }\n\n get redoLabel(): string | null {\n return this.redoStack.at(-1)?.label ?? null\n }\n\n private get currentBatch(): UndoBatch | null {\n return this.batches.at(-1) ?? null\n }\n\n private createBatchEntry(batch: UndoBatch): UndoEntry {\n return {\n label: batch.label,\n forward: () => batch.entries.forEach((entry) => entry.forward()),\n inverse: () => batch.entries.toReversed().forEach((entry) => entry.inverse()),\n coalesceKey: batch.coalesceKey\n }\n }\n\n private pushUndoEntry(entry: UndoEntry): void {\n const previous = this.undoStack.at(-1)\n if (entry.coalesceKey && previous?.coalesceKey === entry.coalesceKey) {\n this.undoStack[this.undoStack.length - 1] = {\n ...entry,\n inverse: previous.inverse\n }\n } else {\n this.undoStack.push(entry)\n }\n this.redoStack = []\n this.trimUndoStack()\n this.onChange?.()\n }\n\n private trimUndoStack(): void {\n if (!Number.isFinite(this.limit) || this.limit <= 0) return\n const overflow = this.undoStack.length - this.limit\n if (overflow > 0) this.undoStack.splice(0, overflow)\n }\n}\n","import type { SceneNode } from './types'\n\n/**\n * Invalidate cached Skia textPicture (Paragraph snapshot). Includes width/height\n * because wrapping/layout depends on the box.\n */\nexport const TEXT_PICTURE_KEYS: ReadonlySet<string> = new Set([\n 'text',\n 'fontSize',\n 'fontFamily',\n 'fontWeight',\n 'italic',\n 'textAlignHorizontal',\n 'textDirection',\n 'textAlignVertical',\n 'lineHeight',\n 'letterSpacing',\n 'textDecoration',\n 'textCase',\n 'styleRuns',\n 'fills',\n 'width',\n 'height'\n])\n\nexport const GLYPH_AFFECTING_KEYS: ReadonlySet<string> = new Set([\n 'text',\n 'fontSize',\n 'fontFamily',\n 'fontWeight',\n 'italic',\n 'textDirection',\n 'lineHeight',\n 'letterSpacing',\n 'textCase',\n 'styleRuns'\n])\n\n/**\n * Shared by SceneGraph.updateNode and updateNodePreview (drag hot path) so the\n * two invalidation rules cannot drift. Glyphs are kept when the caller\n * replaces them in the same update (resize supplies scaled copies).\n */\nexport function textCacheInvalidationChanges(\n node: SceneNode,\n changes: Partial<SceneNode>\n): Partial<SceneNode> {\n const invalidated: Partial<SceneNode> = {}\n const keys = Object.keys(changes)\n if (node.textPicture && keys.some((key) => TEXT_PICTURE_KEYS.has(key)))\n invalidated.textPicture = null\n const glyphsInvalidated = keys.some((key) => GLYPH_AFFECTING_KEYS.has(key))\n // A successful path-text edit supplies reflowed glyphs in `changes`. Every\n // other mutation path must drop stale baked glyphs and path identity rather\n // than pair new text/style with old visible outlines.\n if (node.derivedTextGlyphs && glyphsInvalidated && !changes.derivedTextGlyphs) {\n invalidated.derivedTextGlyphs = null\n invalidated.textPathData = null\n }\n return invalidated\n}\n\nexport function invalidateTextCaches(node: SceneNode, changes: Partial<SceneNode>): void {\n Object.assign(node, textCacheInvalidationChanges(node, changes))\n}\n","import { textCacheInvalidationChanges } from './text-picture'\nimport type { SceneNode } from './types'\nimport { normalizeVectorNetwork } from './vector-network'\n\nexport type NodePreviewObserver = (node: SceneNode, changes: Partial<SceneNode>) => void\n\ntype PreviewGraph = {\n nodes: Map<string, SceneNode>\n positionPreviewVersion: number\n clearAbsPosCache: () => void\n}\n\nconst LAYOUT_AFFECTING_KEYS = new Set<string>([\n 'x',\n 'y',\n 'width',\n 'height',\n 'rotation',\n 'flipX',\n 'flipY',\n 'parentId',\n 'childIds',\n 'layoutMode',\n 'layoutDirection',\n 'layoutWrap',\n 'primaryAxisSizing',\n 'counterAxisSizing',\n 'itemSpacing',\n 'counterAxisSpacing',\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'paddingLeft',\n 'layoutGrow',\n 'layoutAlignSelf',\n 'layoutPositioning',\n 'minWidth',\n 'maxWidth',\n 'minHeight',\n 'maxHeight',\n 'visible',\n 'text',\n 'fontSize',\n 'lineHeight',\n 'letterSpacing',\n 'styleRuns',\n 'textAutoResize'\n])\n\nexport function updateNodePreview(\n graph: PreviewGraph,\n id: string,\n changes: Partial<SceneNode>,\n beforeUpdate?: NodePreviewObserver\n): Partial<SceneNode> | null {\n const node = graph.nodes.get(id)\n if (!node) return null\n changes = Object.fromEntries(\n (Object.entries(changes) as Array<[string, unknown]>).filter(([, value]) => value !== undefined)\n ) as Partial<SceneNode>\n if ((Object.keys(changes) as (keyof SceneNode)[]).every((key) => node[key] === changes[key])) {\n return null\n }\n const affectsLayout = Object.keys(changes).some((key) => LAYOUT_AFFECTING_KEYS.has(key))\n if (affectsLayout) graph.clearAbsPosCache()\n let normalizedChanges = changes\n if (node.type === 'TEXT') {\n normalizedChanges = { ...textCacheInvalidationChanges(node, changes), ...changes }\n }\n if (changes.vectorNetwork) {\n normalizedChanges = {\n ...normalizedChanges,\n vectorNetwork: normalizeVectorNetwork(changes.vectorNetwork)\n }\n }\n beforeUpdate?.(node, normalizedChanges)\n graph.positionPreviewVersion++\n Object.assign(node, normalizedChanges)\n return normalizedChanges\n}\n","import type { SceneNode } from './types'\n\nexport function markSourceFieldsEdited(node: SceneNode, changeKeys: string[]): void {\n if (changeKeys.length === 0) return\n const editedFields = new Set(node.source.editedFields)\n for (const key of changeKeys) editedFields.add(key)\n node.source.editedFields = [...editedFields]\n}\n","import { omit, omitBy } from 'es-toolkit/object'\n\nimport { BLACK } from './constants'\nimport type { SceneGraph } from './index'\nimport { setInstanceOverride } from './instance-overrides'\nimport type { Color } from './primitives'\nimport type { Variable, VariableCollection, VariableType, VariableValue } from './types'\n\nexport function addVariable(graph: SceneGraph, variable: Variable): void {\n graph.variables.set(variable.id, variable)\n const collection = graph.variableCollections.get(variable.collectionId)\n if (collection && !collection.variableIds.includes(variable.id)) {\n collection.variableIds.push(variable.id)\n }\n}\n\nexport function removeVariable(graph: SceneGraph, id: string): void {\n const variable = graph.variables.get(id)\n if (!variable) return\n graph.variables.delete(id)\n const collection = graph.variableCollections.get(variable.collectionId)\n if (collection) {\n collection.variableIds = collection.variableIds.filter((vid) => vid !== id)\n }\n for (const node of graph.nodes.values()) {\n const hadBinding = Object.values(node.boundVariables).includes(id)\n if (!hadBinding) continue\n node.boundVariables = omitBy(node.boundVariables, (varId) => varId === id) as Record<\n string,\n string\n >\n graph.emitter.emit('node:updated', node.id, { boundVariables: { ...node.boundVariables } })\n markBoundVariablesOverrideOnInstance(graph, node.id)\n }\n}\n\nexport function addCollection(graph: SceneGraph, collection: VariableCollection): void {\n graph.variableCollections.set(collection.id, collection)\n if (!graph.activeMode.has(collection.id)) {\n graph.activeMode.set(collection.id, collection.defaultModeId)\n }\n}\n\nfunction defaultVariableValue(type: VariableType, value?: VariableValue): VariableValue {\n if (value !== undefined) return value\n if (type === 'COLOR') return { ...BLACK }\n if (type === 'FLOAT') return 0\n if (type === 'BOOLEAN') return false\n return ''\n}\n\nexport function createVariable(\n graph: SceneGraph,\n generateId: () => string,\n name: string,\n type: VariableType,\n collectionId: string,\n value?: VariableValue\n): Variable {\n const collection = graph.variableCollections.get(collectionId)\n if (!collection) throw new Error(`Collection \"${collectionId}\" not found`)\n const id = generateId()\n const defaultValue = defaultVariableValue(type, value)\n const valuesByMode: Record<string, VariableValue> = {}\n for (const mode of collection.modes) {\n valuesByMode[mode.modeId] = structuredClone(defaultValue)\n }\n const variable: Variable = {\n id,\n name,\n type,\n collectionId,\n valuesByMode,\n description: '',\n hiddenFromPublishing: false\n }\n addVariable(graph, variable)\n return variable\n}\n\nexport function createCollection(\n graph: SceneGraph,\n generateId: () => string,\n name: string\n): VariableCollection {\n const id = generateId()\n const modeId = generateId()\n const collection: VariableCollection = {\n id,\n name,\n modes: [{ modeId, name: 'Mode 1' }],\n defaultModeId: modeId,\n variableIds: []\n }\n addCollection(graph, collection)\n return collection\n}\n\nexport function removeCollection(graph: SceneGraph, id: string): void {\n const collection = graph.variableCollections.get(id)\n if (collection) {\n for (const varId of Array.from(collection.variableIds)) {\n removeVariable(graph, varId)\n }\n }\n graph.variableCollections.delete(id)\n graph.activeMode.delete(id)\n}\n\nexport function getActiveModeId(graph: SceneGraph, collectionId: string): string {\n const mode = graph.activeMode.get(collectionId)\n if (mode) return mode\n const collection = graph.variableCollections.get(collectionId)\n return collection?.defaultModeId ?? ''\n}\n\nexport function getNodeVariableModeId(\n graph: SceneGraph,\n nodeId: string,\n collectionId: string\n): string {\n let node = graph.nodes.get(nodeId)\n while (node) {\n const modeId = node.variableModes[collectionId]\n if (modeId) return modeId\n node = node.parentId ? graph.nodes.get(node.parentId) : undefined\n }\n return getActiveModeId(graph, collectionId)\n}\n\nexport function setActiveMode(graph: SceneGraph, collectionId: string, modeId: string): void {\n graph.activeMode.set(collectionId, modeId)\n}\n\nexport function addMode(\n graph: SceneGraph,\n collectionId: string,\n modeId: string,\n name: string,\n sourceMode?: string\n): void {\n const collection = graph.variableCollections.get(collectionId)\n if (!collection) return\n collection.modes.push({ modeId, name })\n const sourceModeId = sourceMode ?? collection.defaultModeId\n for (const varId of collection.variableIds) {\n const variable = graph.variables.get(varId)\n if (!variable) continue\n variable.valuesByMode[modeId] = structuredClone(\n variable.valuesByMode[sourceModeId] ?? Object.values(variable.valuesByMode)[0]\n )\n }\n}\n\nexport function removeMode(graph: SceneGraph, collectionId: string, modeId: string): void {\n const collection = graph.variableCollections.get(collectionId)\n if (!collection || collection.modes.length <= 1) return\n collection.modes = collection.modes.filter((m) => m.modeId !== modeId)\n if (collection.defaultModeId === modeId) {\n collection.defaultModeId = collection.modes[0].modeId\n }\n for (const varId of collection.variableIds) {\n const variable = graph.variables.get(varId)\n if (variable) variable.valuesByMode = omit(variable.valuesByMode, [modeId])\n }\n if (graph.activeMode.get(collectionId) === modeId) {\n graph.activeMode.set(collectionId, collection.defaultModeId)\n }\n}\n\nexport function renameMode(\n graph: SceneGraph,\n collectionId: string,\n modeId: string,\n name: string\n): void {\n const collection = graph.variableCollections.get(collectionId)\n if (!collection) return\n const mode = collection.modes.find((m) => m.modeId === modeId)\n if (mode) mode.name = name\n}\n\nexport function setDefaultMode(graph: SceneGraph, collectionId: string, modeId: string): void {\n const collection = graph.variableCollections.get(collectionId)\n if (!collection) return\n if (!collection.modes.some((m) => m.modeId === modeId)) return\n collection.defaultModeId = modeId\n}\n\nexport function resolveVariable(\n graph: SceneGraph,\n variableId: string,\n modeId?: string,\n visited?: Set<string>\n): VariableValue | undefined {\n if (visited?.has(variableId)) return undefined\n const variable = graph.variables.get(variableId)\n if (!variable) return undefined\n const collection = graph.variableCollections.get(variable.collectionId)\n const preferredModeId = modeId ?? getActiveModeId(graph, variable.collectionId)\n const fallbackModeId = collection?.defaultModeId\n let value = Object.hasOwn(variable.valuesByMode, preferredModeId)\n ? variable.valuesByMode[preferredModeId]\n : undefined\n if (\n value === undefined &&\n fallbackModeId &&\n Object.hasOwn(variable.valuesByMode, fallbackModeId)\n ) {\n value = variable.valuesByMode[fallbackModeId]\n }\n value ??= Object.values(variable.valuesByMode)[0]\n if (value && typeof value === 'object' && 'aliasId' in value) {\n const seen = visited ?? new Set<string>()\n seen.add(variableId)\n return resolveVariable(graph, value.aliasId, preferredModeId, seen)\n }\n return value\n}\n\nexport function resolveColorVariable(graph: SceneGraph, variableId: string): Color | undefined {\n const value = resolveVariable(graph, variableId)\n if (value && typeof value === 'object' && 'r' in value) return value\n return undefined\n}\n\nexport function resolveNumberVariable(graph: SceneGraph, variableId: string): number | undefined {\n const value = resolveVariable(graph, variableId)\n return typeof value === 'number' ? value : undefined\n}\n\nexport function resolveColorVariableForNode(\n graph: SceneGraph,\n nodeId: string,\n variableId: string\n): Color | undefined {\n const variable = graph.variables.get(variableId)\n if (!variable) return undefined\n const modeId = getNodeVariableModeId(graph, nodeId, variable.collectionId)\n const value = resolveVariable(graph, variableId, modeId)\n if (value && typeof value === 'object' && 'r' in value) return value\n return undefined\n}\n\nexport function resolveNumberVariableForNode(\n graph: SceneGraph,\n nodeId: string,\n variableId: string\n): number | undefined {\n const variable = graph.variables.get(variableId)\n if (!variable) return undefined\n const modeId = getNodeVariableModeId(graph, nodeId, variable.collectionId)\n const value = resolveVariable(graph, variableId, modeId)\n return typeof value === 'number' ? value : undefined\n}\n\nexport function getVariablesForCollection(graph: SceneGraph, collectionId: string): Variable[] {\n const collection = graph.variableCollections.get(collectionId)\n if (!collection) return []\n return collection.variableIds\n .map((id) => graph.variables.get(id))\n .filter((v): v is Variable => v !== undefined)\n}\n\nexport function getVariablesByType(graph: SceneGraph, type: VariableType): Variable[] {\n return [...graph.variables.values()].filter((v) => v.type === type)\n}\n\nconst SCALAR_BINDING_FIELDS: ReadonlySet<string> = new Set([\n 'opacity',\n 'width',\n 'height',\n 'cornerRadius',\n 'fontSize',\n 'letterSpacing',\n 'lineHeight',\n 'itemSpacing',\n 'strokeWeight',\n 'paddingLeft',\n 'paddingRight',\n 'paddingTop',\n 'paddingBottom',\n 'counterAxisSpacing',\n 'topLeftRadius',\n 'topRightRadius',\n 'bottomLeftRadius',\n 'bottomRightRadius',\n 'rotation',\n 'x',\n 'y',\n 'minWidth',\n 'maxWidth',\n 'minHeight',\n 'maxHeight',\n 'borderTopWeight',\n 'borderBottomWeight',\n 'borderLeftWeight',\n 'borderRightWeight',\n 'gridRowGap',\n 'gridColumnGap'\n])\n\nconst STRING_BINDING_FIELDS: ReadonlySet<string> = new Set(['fontFamily'])\n\nconst BOOLEAN_BINDING_FIELDS: ReadonlySet<string> = new Set(['visible'])\n\nexport function bindVariable(\n graph: SceneGraph,\n nodeId: string,\n field: string,\n variableId: string\n): void {\n const node = graph.nodes.get(nodeId)\n if (!node) return\n\n // Validate variable exists\n const variable = graph.variables.get(variableId)\n if (!variable) {\n throw new Error(`Variable \"${variableId}\" not found`)\n }\n\n // Color fields require COLOR variable type\n const colorFieldMatch = field.match(/^(fills|strokes)\\/(\\d+)\\/color$/)\n if (colorFieldMatch) {\n if (variable.type !== 'COLOR') {\n throw new Error(`Cannot bind ${variable.type} variable to color field \"${field}\"`)\n }\n // Validate index is within current array bounds\n const arrayKey = colorFieldMatch[1] as 'fills' | 'strokes'\n const index = Number.parseInt(colorFieldMatch[2], 10)\n const currentLength = (node[arrayKey] as unknown[] | undefined)?.length ?? 0\n if (index >= currentLength) {\n throw new Error(`Index ${index} out of range for ${arrayKey} (length ${currentLength})`)\n }\n // Auto-remove top-level dead binding (e.g. 'fills') when setting indexed binding\n const topLevelKey = colorFieldMatch[1]\n if (topLevelKey in node.boundVariables) {\n node.boundVariables = omit(node.boundVariables, [topLevelKey])\n }\n }\n\n if (SCALAR_BINDING_FIELDS.has(field) && variable.type !== 'FLOAT') {\n throw new Error(`Cannot bind ${variable.type} variable to scalar field \"${field}\"`)\n }\n\n if (STRING_BINDING_FIELDS.has(field) && variable.type !== 'STRING') {\n throw new Error(`Cannot bind ${variable.type} variable to string field \"${field}\"`)\n }\n\n if (BOOLEAN_BINDING_FIELDS.has(field) && variable.type !== 'BOOLEAN') {\n throw new Error(`Cannot bind ${variable.type} variable to boolean field \"${field}\"`)\n }\n\n const isKnownField =\n SCALAR_BINDING_FIELDS.has(field) ||\n STRING_BINDING_FIELDS.has(field) ||\n BOOLEAN_BINDING_FIELDS.has(field) ||\n colorFieldMatch\n\n if (!isKnownField) {\n throw new Error(`Unknown binding field \"${field}\"`)\n }\n\n node.boundVariables = { ...node.boundVariables, [field]: variableId }\n graph.emitter.emit('node:updated', nodeId, { boundVariables: { ...node.boundVariables } })\n markBoundVariablesOverrideOnInstance(graph, nodeId)\n}\n\nexport function unbindVariable(graph: SceneGraph, nodeId: string, field: string): void {\n const node = graph.nodes.get(nodeId)\n if (!node) return\n if (!(field in node.boundVariables)) return\n node.boundVariables = omit(node.boundVariables, [field])\n graph.emitter.emit('node:updated', nodeId, { boundVariables: { ...node.boundVariables } })\n markBoundVariablesOverrideOnInstance(graph, nodeId)\n}\n\nfunction markBoundVariablesOverrideOnInstance(graph: SceneGraph, nodeId: string): void {\n const node = graph.nodes.get(nodeId)\n if (!node) return\n\n // Mark the field on the canonical structured state.\n if (node.type === 'INSTANCE') {\n setInstanceOverride(node.instanceOverrides, node.id, node.id, 'boundVariables')\n return\n }\n\n // Walk up to the owning instance for descendant fields.\n let current = node\n while (current.parentId) {\n const parent = graph.nodes.get(current.parentId)\n if (!parent) break\n if (parent.type === 'INSTANCE') {\n setInstanceOverride(parent.instanceOverrides, parent.id, nodeId, 'boundVariables')\n break\n }\n current = parent\n }\n}\n","/* eslint-disable max-lines -- SceneGraph exposes a stable facade over domain modules */\nexport * from './mutation-impact'\nexport * from './instance-overrides'\nexport * from './images'\nexport * from './components/properties'\nexport * from './copy'\nexport {\n copyInstanceComponentProps,\n hasInstanceOverride,\n INSTANCE_SYNC_FIELDS,\n INSTANCE_SYNC_PROPS,\n INSTANCE_SYNC_TEXT_PROPS,\n recordInstanceOverride\n} from './instances'\nexport {\n clearInstanceOverrides,\n cloneInstanceOverrideState,\n forEachInstanceOverride,\n getInstanceOverride,\n setInstanceOverride,\n type InstanceOverrideState\n} from './instance-overrides'\nexport * from './snap'\nexport * from './export-scale'\nexport * from './coordinate'\nexport * from './constants'\nexport * from './geometry'\nexport * from './guides'\nexport * from './layout-guides'\nexport * from './font-style'\nexport * from './shared-styles'\nexport { default as TransformMatrix } from './matrix'\nexport type { Mat3 } from './matrix'\nexport { UndoManager, type UndoEntry, type UndoManagerOptions } from './undo'\n\nimport { createNanoEvents } from 'nanoevents'\n\nimport { removeStaleBindings } from './bindings'\nimport { cloneNodeProps } from './copy'\nimport { bindNodeEvents } from './events'\nimport * as HitTest from './hit-test'\nimport * as Instances from './instances'\nimport { CONTAINER_TYPES, createDefaultNode } from './node-defaults'\nimport { updateNodePreview, type NodePreviewObserver } from './preview'\nimport { styleDetachmentChanges } from './shared-styles'\nimport { markSourceFieldsEdited } from './source-metadata'\nimport { GLYPH_AFFECTING_KEYS, invalidateTextCaches, TEXT_PICTURE_KEYS } from './text-picture'\nimport * as Variables from './variables'\nimport { normalizeVectorNetwork } from './vector-network'\n\nexport type { GUID, Color, Size, Vector } from './primitives'\nexport * from './types'\n\nimport type { Emitter } from 'nanoevents'\n\nimport { getAbsolutePosition } from './coordinate'\nimport type { Color, Rect, Vector } from './primitives'\nimport type {\n DocumentColorSpace,\n EnabledLibraryBinding,\n NodeType,\n SceneGraphEventHandlers,\n SceneGraphEvents,\n SceneNode,\n SourceMetadata,\n Variable,\n VariableCollection,\n VariableType,\n VariableValue\n} from './types'\n\nexport {\n cloneVectorNetwork,\n mergeVectorNetworks,\n normalizeVectorNetwork,\n transformVectorNetwork,\n validateVectorNetwork,\n vectorNetworksEqual\n} from './vector-network'\n\nlet nextLocalID = 1\n\nexport function generateId(): string {\n return `0:${nextLocalID++}`\n}\n\nfunction stripUndefinedProps<T extends object>(obj: T): T {\n const result = {} as T\n for (const key of Object.keys(obj) as (keyof T)[]) {\n const val = obj[key]\n if (val !== undefined) {\n result[key] = val\n }\n }\n return result\n}\n\nexport { captureGraphCheckpoint } from './checkpoint'\n\nexport class SceneGraph {\n nodes = new Map<string, SceneNode>()\n images = new Map<string, Uint8Array>()\n variables = new Map<string, Variable>()\n variableCollections = new Map<string, VariableCollection>()\n activeMode = new Map<string, string>()\n rootId: string\n figKiwiVersion: number | null = null\n /** Deflated kiwi schema bytes from the original .fig file, preserved for roundtrip fidelity. */\n figSchemaDeflated: Uint8Array | null = null\n documentColorSpace: DocumentColorSpace = 'display-p3'\n enabledLibraries = new Map<string, EnabledLibraryBinding>()\n readonly emitter: Emitter<SceneGraphEvents> = createNanoEvents()\n private absPosCache = new Map<string, Vector>()\n private previewMutationDepth = 0\n private previewObservers: NodePreviewObserver[] = []\n private sourceMetadataPreservationDepth = 0\n private layoutMutationDepth = 0\n positionPreviewVersion = 0\n instanceIndex = new Map<string, Set<string>>()\n\n constructor() {\n const root = createDefaultNode(generateId, 'FRAME', {\n name: 'Document',\n width: 0,\n height: 0\n })\n this.rootId = root.id\n this.nodes.set(root.id, root)\n\n this.addPage('Page 1')\n }\n addPage(name: string): SceneNode {\n return this.createNode('CANVAS', this.rootId, { name, width: 0, height: 0 })\n }\n\n getPages(includeInternal = false): SceneNode[] {\n return this.getChildren(this.rootId).filter(\n (n) => n.type === 'CANVAS' && (includeInternal || !n.internalOnly)\n )\n }\n getAllNodes(): Iterable<SceneNode> {\n return this.nodes.values()\n }\n getNode(id: string): SceneNode | undefined {\n return this.nodes.get(id)\n }\n onNodeEvents(handlers: SceneGraphEventHandlers): () => void {\n return bindNodeEvents(this.emitter, handlers)\n }\n\n countDescendants(nodeId: string): number {\n const node = this.nodes.get(nodeId)\n if (!node) return 0\n let count = 0\n const stack = [...node.childIds]\n while (stack.length > 0) {\n const id = stack.pop()\n if (id === undefined) break\n count++\n const child = this.nodes.get(id)\n if (child) {\n for (const childId of child.childIds) {\n stack.push(childId)\n }\n }\n }\n return count\n }\n addVariable(variable: Variable): void {\n Variables.addVariable(this, variable)\n }\n removeVariable(id: string): void {\n Variables.removeVariable(this, id)\n }\n addCollection(collection: VariableCollection): void {\n Variables.addCollection(this, collection)\n }\n createVariable(\n name: string,\n type: VariableType,\n collectionId: string,\n value?: VariableValue\n ): Variable {\n return Variables.createVariable(this, generateId, name, type, collectionId, value)\n }\n\n createCollection(name: string): VariableCollection {\n return Variables.createCollection(this, generateId, name)\n }\n\n removeCollection(id: string): void {\n Variables.removeCollection(this, id)\n }\n\n getActiveModeId(collectionId: string): string {\n return Variables.getActiveModeId(this, collectionId)\n }\n\n getNodeVariableModeId(nodeId: string, collectionId: string): string {\n return Variables.getNodeVariableModeId(this, nodeId, collectionId)\n }\n\n setActiveMode(collectionId: string, modeId: string): void {\n Variables.setActiveMode(this, collectionId, modeId)\n }\n\n addMode(collectionId: string, modeId: string, name: string, sourceMode?: string): void {\n Variables.addMode(this, collectionId, modeId, name, sourceMode)\n }\n\n removeMode(collectionId: string, modeId: string): void {\n Variables.removeMode(this, collectionId, modeId)\n }\n\n renameMode(collectionId: string, modeId: string, name: string): void {\n Variables.renameMode(this, collectionId, modeId, name)\n }\n\n setDefaultMode(collectionId: string, modeId: string): void {\n Variables.setDefaultMode(this, collectionId, modeId)\n }\n\n resolveVariable(\n variableId: string,\n modeId?: string,\n visited?: Set<string>\n ): VariableValue | undefined {\n return Variables.resolveVariable(this, variableId, modeId, visited)\n }\n\n resolveColorVariable(variableId: string): Color | undefined {\n return Variables.resolveColorVariable(this, variableId)\n }\n\n resolveNumberVariable(variableId: string): number | undefined {\n return Variables.resolveNumberVariable(this, variableId)\n }\n\n resolveColorVariableForNode(nodeId: string, variableId: string): Color | undefined {\n return Variables.resolveColorVariableForNode(this, nodeId, variableId)\n }\n\n resolveNumberVariableForNode(nodeId: string, variableId: string): number | undefined {\n return Variables.resolveNumberVariableForNode(this, nodeId, variableId)\n }\n\n getVariablesForCollection(collectionId: string): Variable[] {\n return Variables.getVariablesForCollection(this, collectionId)\n }\n\n getVariablesByType(type: VariableType): Variable[] {\n return Variables.getVariablesByType(this, type)\n }\n\n bindVariable(nodeId: string, field: string, variableId: string): void {\n Variables.bindVariable(this, nodeId, field, variableId)\n }\n\n unbindVariable(nodeId: string, field: string): void {\n Variables.unbindVariable(this, nodeId, field)\n }\n\n getChildren(id: string): SceneNode[] {\n const node = this.nodes.get(id)\n if (!node) return []\n return node.childIds\n .map((cid) => this.nodes.get(cid))\n .filter((n): n is SceneNode => n !== undefined)\n }\n\n isContainer(id: string): boolean {\n const node = this.nodes.get(id)\n return node ? CONTAINER_TYPES.has(node.type) : false\n }\n\n isDescendant(childId: string, ancestorId: string): boolean {\n let current = this.nodes.get(childId)\n while (current) {\n if (current.id === ancestorId) return true\n current = current.parentId ? this.nodes.get(current.parentId) : undefined\n }\n return false\n }\n\n clearAbsPosCache(): void {\n this.absPosCache.clear()\n }\n\n getAbsolutePosition(id: string): Vector {\n const cached = this.absPosCache.get(id)\n if (cached) return cached\n\n const node = this.getNode(id)\n if (!node) return { x: 0, y: 0 }\n\n const result = getAbsolutePosition(node, this)\n this.absPosCache.set(id, result)\n return result\n }\n\n getAbsoluteBounds(id: string): Rect {\n const pos = this.getAbsolutePosition(id)\n const node = this.nodes.get(id)\n return {\n x: pos.x,\n y: pos.y,\n width: node?.width ?? 0,\n height: node?.height ?? 0\n }\n }\n private generateNodeId(): string {\n let id = generateId()\n while (this.nodes.has(id)) id = generateId()\n return id\n }\n private registerNode(node: SceneNode, parentId: string | null): SceneNode {\n node.parentId = parentId\n this.nodes.set(node.id, node)\n if (node.type === 'INSTANCE' && node.componentId) {\n let set = this.instanceIndex.get(node.componentId)\n if (!set) {\n set = new Set()\n this.instanceIndex.set(node.componentId, set)\n }\n set.add(node.id)\n }\n this.emitter.emit('node:created', node)\n return node\n }\n createNode(type: NodeType, parentId: string, overrides: Partial<SceneNode> = {}): SceneNode {\n const node = createDefaultNode(() => this.generateNodeId(), type, overrides)\n this.nodes.get(parentId)?.childIds.push(node.id)\n return this.registerNode(node, parentId)\n }\n createNodeWithId(\n id: string,\n type: NodeType,\n parentId: string | null,\n overrides: Partial<SceneNode> = {}\n ): SceneNode {\n const node = createDefaultNode(() => id, type, overrides)\n node.id = id\n const parent = parentId ? this.nodes.get(parentId) : undefined\n if (parent && !parent.childIds.includes(id)) parent.childIds.push(id)\n return this.registerNode(node, parentId)\n }\n\n static TEXT_PICTURE_KEYS: ReadonlySet<string> = TEXT_PICTURE_KEYS\n static GLYPH_AFFECTING_KEYS: ReadonlySet<string> = GLYPH_AFFECTING_KEYS\n\n static LAYOUT_AFFECTING_KEYS: ReadonlySet<string> = new Set([\n 'x',\n 'y',\n 'width',\n 'height',\n 'rotation',\n 'flipX',\n 'flipY',\n 'layoutMode',\n 'layoutDirection',\n 'itemSpacing',\n 'counterAxisSpacing',\n 'paddingLeft',\n 'paddingRight',\n 'paddingTop',\n 'paddingBottom',\n 'primaryAxisAlign',\n 'counterAxisAlign',\n 'counterAxisAlignContent',\n 'layoutWrap',\n 'primaryAxisSizing',\n 'counterAxisSizing',\n 'layoutPositioning',\n 'layoutGrow',\n 'layoutAlignSelf',\n 'strokesIncludedInLayout',\n 'horizontalConstraint',\n 'verticalConstraint',\n 'gridTemplateColumns',\n 'gridTemplateRows',\n 'gridColumnGap',\n 'gridRowGap',\n 'gridPosition',\n 'minWidth',\n 'maxWidth',\n 'minHeight',\n 'maxHeight'\n ])\n\n runPreviewUpdates(fn: () => void, beforeUpdate?: NodePreviewObserver): void {\n this.previewMutationDepth++\n if (beforeUpdate) this.previewObservers.push(beforeUpdate)\n try {\n fn()\n } finally {\n if (beforeUpdate) this.previewObservers.pop()\n this.previewMutationDepth--\n }\n }\n preserveSourceMetadataDuring(fn: () => void): void {\n this.sourceMetadataPreservationDepth++\n try {\n fn()\n } finally {\n this.sourceMetadataPreservationDepth--\n }\n }\n withLayoutMutations(fn: () => void): void {\n this.layoutMutationDepth++\n try {\n fn()\n } finally {\n this.layoutMutationDepth--\n }\n }\n get isApplyingLayout(): boolean {\n return this.layoutMutationDepth > 0\n }\n updateNodePositionPreview(id: string, x: number, y: number): void {\n this.updateNodePreview(id, { x, y })\n }\n updateNodePreview(id: string, changes: Partial<SceneNode>): void {\n const appliedChanges = updateNodePreview(this, id, changes, (node, applied) => {\n for (const observe of this.previewObservers) observe(node, applied)\n })\n if (appliedChanges) this.emitter.emit('node:previewUpdated', id, appliedChanges)\n }\n\n updateNode(id: string, changes: Partial<SceneNode>): void {\n if (this.previewMutationDepth > 0) {\n this.updateNodePreview(id, changes)\n return\n }\n\n const node = this.nodes.get(id)\n if (!node) return\n changes = stripUndefinedProps(styleDetachmentChanges(node, stripUndefinedProps(changes)))\n this.applyNodeChanges(node, changes)\n }\n\n /** Replay captured properties without dropping explicit undefined values or absent keys. */\n restoreNodeProperties(\n id: string,\n changes: Partial<SceneNode>,\n absent: readonly (keyof SceneNode)[]\n ): void {\n const node = this.nodes.get(id)\n if (node) this.applyNodeChanges(node, changes, absent)\n }\n\n private applyNodeChanges(\n node: SceneNode,\n changes: Partial<SceneNode>,\n absent: readonly (keyof SceneNode)[] = []\n ): void {\n const { id } = node\n // Include removed keys in cache invalidation and update notifications.\n if (absent.length) {\n changes = { ...changes }\n for (const key of absent) Reflect.set(changes, key, undefined)\n }\n\n // Only clear absPosCache when layout-affecting properties change.\n // Fills, strokes, effects, plugin data changes do NOT affect absolute position.\n const affectsLayout = Object.keys(changes).some((k) => SceneGraph.LAYOUT_AFFECTING_KEYS.has(k))\n if (affectsLayout) this.absPosCache.clear()\n if (\n node.type === 'INSTANCE' &&\n 'componentId' in changes &&\n changes.componentId !== node.componentId\n ) {\n if (node.componentId) this.instanceIndex.get(node.componentId)?.delete(id)\n if (changes.componentId) {\n let set = this.instanceIndex.get(changes.componentId)\n if (!set) {\n set = new Set()\n this.instanceIndex.set(changes.componentId, set)\n }\n set.add(id)\n }\n }\n if (node.type === 'TEXT') invalidateTextCaches(node, changes)\n if (this.sourceMetadataPreservationDepth === 0) {\n markSourceFieldsEdited(node, Object.keys(changes))\n }\n if (changes.vectorNetwork) {\n changes = { ...changes, vectorNetwork: normalizeVectorNetwork(changes.vectorNetwork) }\n }\n Object.assign(node, changes)\n if (changes.fills) removeStaleBindings(node, 'fills', changes)\n if (changes.strokes) removeStaleBindings(node, 'strokes', changes)\n for (const key of absent) Reflect.deleteProperty(node, key)\n this.emitter.emit('node:updated', id, changes)\n }\n\n reparentNode(nodeId: string, newParentId: string): void {\n const node = this.nodes.get(nodeId)\n if (!node || nodeId === this.rootId) return\n if (this.isDescendant(newParentId, nodeId)) return\n\n const oldParent = node.parentId ? this.nodes.get(node.parentId) : undefined\n const newParent = this.nodes.get(newParentId)\n if (!newParent) return\n if (node.parentId === newParentId) return\n\n const oldParentId = node.parentId\n this.absPosCache.clear()\n\n const absPos = this.getAbsolutePosition(nodeId)\n const newParentNode = this.nodes.get(newParentId)\n const newParentAbs =\n newParentId === this.rootId || newParentNode?.type === 'CANVAS'\n ? { x: 0, y: 0 }\n : this.getAbsolutePosition(newParentId)\n\n if (oldParent) {\n oldParent.childIds = oldParent.childIds.filter((cid) => cid !== nodeId)\n }\n\n node.parentId = newParentId\n newParent.childIds.push(nodeId)\n\n node.x = absPos.x - newParentAbs.x\n node.y = absPos.y - newParentAbs.y\n\n this.emitter.emit('node:reparented', nodeId, oldParentId, newParentId)\n }\n\n reorderChild(nodeId: string, parentId: string, insertIndex: number): void {\n const node = this.nodes.get(nodeId)\n if (!node) return\n\n const previousParentId = node.parentId\n const oldParent = previousParentId ? this.nodes.get(previousParentId) : undefined\n const newParent = this.nodes.get(parentId)\n if (!newParent || this.isDescendant(parentId, nodeId)) return\n\n // Remove from old parent\n if (oldParent) {\n oldParent.childIds = oldParent.childIds.filter((cid) => cid !== nodeId)\n }\n\n // If same parent, adjust index since we removed the item\n let idx = insertIndex\n if (\n oldParent === newParent &&\n idx > (!oldParent.childIds.includes(nodeId) ? idx : oldParent.childIds.length)\n ) {\n // Already removed above, no adjustment needed\n }\n\n node.parentId = parentId\n this.absPosCache.clear()\n idx = Math.min(idx, newParent.childIds.length)\n newParent.childIds.splice(idx, 0, nodeId)\n\n this.emitter.emit('node:reordered', nodeId, parentId, idx, previousParentId)\n }\n\n insertChildAt(childId: string, parentId: string, index: number): void {\n const node = this.getNode(childId)\n const newParent = this.getNode(parentId)\n if (!node || !newParent || childId === parentId || this.isDescendant(parentId, childId)) return\n const previousParentId = node.parentId\n const oldParent = previousParentId ? this.getNode(previousParentId) : undefined\n if (oldParent) {\n oldParent.childIds = oldParent.childIds.filter((id) => id !== childId)\n }\n newParent.childIds = newParent.childIds.filter((id) => id !== childId)\n newParent.childIds.splice(index, 0, childId)\n node.parentId = parentId\n this.clearAbsPosCache()\n this.emitter.emit('node:reordered', childId, parentId, index, previousParentId)\n }\n\n deleteNode(id: string): void {\n const node = this.nodes.get(id)\n if (!node || id === this.rootId) return\n\n if (node.parentId) {\n const parent = this.nodes.get(node.parentId)\n if (parent) {\n parent.childIds = parent.childIds.filter((cid) => cid !== id)\n }\n }\n\n for (const childId of Array.from(node.childIds)) {\n this.deleteNode(childId)\n }\n\n if (node.type === 'INSTANCE' && node.componentId) {\n this.instanceIndex.get(node.componentId)?.delete(id)\n }\n this.nodes.delete(id)\n this.emitter.emit('node:deleted', id, node.parentId)\n }\n\n hitTest(px: number, py: number, scopeId?: string): SceneNode | null {\n return HitTest.hitTest(this, px, py, scopeId)\n }\n\n hitTestDeep(px: number, py: number, scopeId?: string): SceneNode | null {\n return HitTest.hitTestDeep(this, px, py, scopeId)\n }\n\n hitTestFrame(\n px: number,\n py: number,\n excludeIds: Set<string>,\n scopeId?: string\n ): SceneNode | null {\n return HitTest.hitTestFrame(this, px, py, excludeIds, scopeId)\n }\n\n cloneTree(\n sourceId: string,\n parentId: string,\n overrides: Partial<SceneNode> = {}\n ): SceneNode | null {\n const src = this.nodes.get(sourceId)\n if (!src) return null\n\n const props = cloneNodeProps(src, null)\n // Null out Figma source identifiers so the clone is treated as local.\n // `as SourceMetadata` required: cloneNodeProps returns Partial<SceneNode>,\n // so props.source is SourceMetadata | undefined, but we know it's always set.\n props.source = { ...(props.source as SourceMetadata), id: null, orderKey: null }\n const clone = this.createNode(src.type, parentId, { ...props, ...overrides })\n\n for (const childId of src.childIds) {\n this.cloneTree(childId, clone.id)\n }\n\n return clone\n }\n\n createInstance(\n componentId: string,\n parentId: string,\n overrides: Partial<SceneNode> = {}\n ): SceneNode | null {\n return Instances.createInstance(this, componentId, parentId, overrides)\n }\n\n populateInstanceChildren(\n instanceId: string,\n componentId: string,\n mode: Instances.NodeCloneMode = 'deep'\n ): void {\n Instances.populateInstanceChildren(this, instanceId, componentId, mode)\n }\n\n swapInstanceComponent(instanceId: string, componentId: string): void {\n Instances.swapInstanceComponent(this, instanceId, componentId)\n }\n\n syncInstances(componentId: string): void {\n Instances.syncInstances(this, componentId)\n }\n\n detachInstance(instanceId: string): void {\n Instances.detachInstance(this, instanceId)\n }\n\n getMainComponent(instanceId: string): SceneNode | undefined {\n return Instances.getMainComponent(this, instanceId)\n }\n\n getInstances(componentId: string): SceneNode[] {\n return Instances.getInstances(this, componentId)\n }\n\n flattenTree(parentId?: string, depth = 0): Array<{ node: SceneNode; depth: number }> {\n const id = parentId ?? this.rootId\n const parent = this.nodes.get(id)\n if (!parent) return []\n const result: Array<{ node: SceneNode; depth: number }> = []\n for (const childId of parent.childIds) {\n const child = this.nodes.get(childId)\n if (!child) continue\n result.push({ node: child, depth })\n if (child.childIds.length > 0) result.push(...this.flattenTree(childId, depth + 1))\n }\n return result\n }\n}\n"],"mappings":";;;;;;;;AAUA,SAAgB,4BAAiD;CAC/D,OAAO;EACL,gCAAgB,IAAI,IAAI;EACxB,mCAAmB,IAAI,IAAI;EAC3B,kCAAkB,IAAI,IAAI;EAC1B,gCAAgB,IAAI,IAAI;EACxB,gCAAgB,IAAI,IAAI;CAC1B;AACF;;AAUA,eAAsB,qBACpB,OACA,WACoC;CACpC,MAAM,SAAS,0BAA0B;CACzC,MAAM,SAAS,MAAM,aAAa;EAChC,UAAU,SAAS;GACjB,OAAO,eAAe,IAAI,KAAK,EAAE;GACjC,OAAO,eAAe,IAAI,KAAK,EAAE;GACjC,IAAI,KAAK,UAAU,OAAO,iBAAiB,IAAI,KAAK,QAAQ;EAC9D;EACA,UAAU,OAAO,OAAO,eAAe,IAAI,EAAE;EAC7C,UAAU,IAAI,aAAa;GACzB,IAAI,UAAU,OAAO,kBAAkB,IAAI,QAAQ;GACnD,OAAO,eAAe,IAAI,EAAE;GAC5B,OAAO,eA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
|
-
const TRANSPARENT = {
|
|
9
|
-
r: 0,
|
|
10
|
-
g: 0,
|
|
11
|
-
b: 0,
|
|
12
|
-
a: 0
|
|
13
|
-
};
|
|
14
|
-
const DEFAULT_FONT_FAMILY = "Inter";
|
|
15
|
-
const DEFAULT_STROKE_MITER_LIMIT = 4;
|
|
16
|
-
//#endregion
|
|
1
|
+
import { BLACK, DEFAULT_FONT_FAMILY, DEFAULT_STROKE_MITER_LIMIT, TRANSPARENT } from "./chunks/components/properties.js";
|
|
17
2
|
export { BLACK, DEFAULT_FONT_FAMILY, DEFAULT_STROKE_MITER_LIMIT, TRANSPARENT };
|
|
18
|
-
|
|
19
|
-
//# sourceMappingURL=constants.js.map
|
package/dist/constants2.d.ts
CHANGED
package/dist/constants2.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants2.d.ts","names":[],"sources":["../src/constants.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants2.d.ts","names":[],"sources":["../src/constants.ts"],"mappings":";;cAEa,OAAO;cACP,aAAa;cACb;cACA"}
|
package/dist/coordinate.d.ts
CHANGED
|
@@ -1,8 +1,40 @@
|
|
|
1
1
|
import { Color, Rect, Vector } from "./primitives2.js";
|
|
2
|
+
import { ComponentPropertyDefinition, ComponentPropertyReferenceField, DerivedTextGlyph, DocumentColorSpace, Effect, EnabledLibraryBinding, Fill, GeometryPath, LayoutGrid, NodeType, SceneGraphEventHandlers, SceneGraphEvents, SceneNode, SharedStyle, SharedStyleKind, SharedStyleType, Stroke, StrokeCap, StyleRun, Variable, VariableCollection, VariableType, VariableValue, VectorNetwork } from "./types.js";
|
|
2
3
|
import { Mat3 } from "./matrix2.js";
|
|
3
|
-
import {
|
|
4
|
+
import { NodePreviewObserver } from "./preview2.js";
|
|
4
5
|
import { Emitter } from "nanoevents";
|
|
5
|
-
|
|
6
|
+
//#region src/mutation-impact.d.ts
|
|
7
|
+
interface SceneMutationImpact {
|
|
8
|
+
changedNodeIds: Set<string>;
|
|
9
|
+
previousParentIds: Set<string>;
|
|
10
|
+
currentParentIds: Set<string>;
|
|
11
|
+
createdNodeIds: Set<string>;
|
|
12
|
+
deletedNodeIds: Set<string>;
|
|
13
|
+
}
|
|
14
|
+
declare function createSceneMutationImpact(): SceneMutationImpact;
|
|
15
|
+
type MutationImpactListener = (impact: SceneMutationImpact) => void;
|
|
16
|
+
interface CollectedSceneMutation<T> {
|
|
17
|
+
result: T;
|
|
18
|
+
impact: SceneMutationImpact;
|
|
19
|
+
}
|
|
20
|
+
/** Collects the actual graph nodes and parent containers touched by an operation. */
|
|
21
|
+
declare function collectSceneMutation<T>(graph: SceneGraph, operation: () => T | Promise<T>): Promise<CollectedSceneMutation<T>>;
|
|
22
|
+
declare function mutationLayoutScopeIds(impact: SceneMutationImpact): string[];
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/components/properties.d.ts
|
|
25
|
+
interface ComponentPropertyTarget {
|
|
26
|
+
node: SceneNode;
|
|
27
|
+
field: ComponentPropertyReferenceField;
|
|
28
|
+
source: SceneNode;
|
|
29
|
+
}
|
|
30
|
+
declare function componentPropertyOwners(graph: SceneGraph, instance: SceneNode): SceneNode[];
|
|
31
|
+
declare function componentPropertyDefinitions(graph: SceneGraph, instance: SceneNode): ComponentPropertyDefinition[];
|
|
32
|
+
declare function resolveComponentPropertyValue(graph: SceneGraph, value: string): SceneNode | null;
|
|
33
|
+
declare function findComponentPropertyTarget(graph: SceneGraph, instance: SceneNode, propertyId: string): ComponentPropertyTarget | null;
|
|
34
|
+
declare function findComponentPropertyTargets(graph: SceneGraph, instance: SceneNode, propertyId: string): ComponentPropertyTarget[];
|
|
35
|
+
declare function applyComponentPropertyValue(graph: SceneGraph, instanceId: string, definition: ComponentPropertyDefinition, value: string): SceneNode | null;
|
|
36
|
+
declare function removeComponentProperty(graph: SceneGraph, ownerId: string, propertyId: string): boolean;
|
|
37
|
+
//#endregion
|
|
6
38
|
//#region src/copy.d.ts
|
|
7
39
|
declare function copyFill(f: Fill): Fill;
|
|
8
40
|
declare function copyStroke(s: Stroke): Stroke;
|
|
@@ -18,8 +50,21 @@ declare function copyEffects(effects: Effect[]): Effect[];
|
|
|
18
50
|
declare function copyLayoutGrids(grids: LayoutGrid[]): LayoutGrid[];
|
|
19
51
|
declare function copyStyleRuns(runs: StyleRun[]): StyleRun[];
|
|
20
52
|
declare function copyGeometryPaths(paths: GeometryPath[]): GeometryPath[];
|
|
21
|
-
/**
|
|
22
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Affine-transform every coordinate pair in a path command blob (returns a
|
|
55
|
+
* copy): (x, y) → (m00·x + m01·y + tx, m10·x + m11·y + ty).
|
|
56
|
+
* Command layout: 1=move/2=line (1 pair), 3=quad (2 pairs), 4=cubic (3 pairs)
|
|
57
|
+
* — font-glyph blobs are quad-heavy, so skipping command 3 desyncs the walk.
|
|
58
|
+
*/
|
|
59
|
+
declare function transformGeometryBlob(blob: Uint8Array, m00: number, m01: number, m10: number, m11: number, tx?: number, ty?: number): Uint8Array;
|
|
60
|
+
declare function transformGeometryPaths(paths: GeometryPath[], m00: number, m01: number, m10: number, m11: number, tx?: number, ty?: number): GeometryPath[];
|
|
61
|
+
/**
|
|
62
|
+
* Scale path command blob coordinates by (sx, sy).
|
|
63
|
+
* Identity scale returns a deep copy (same as copyGeometryPaths).
|
|
64
|
+
*/
|
|
65
|
+
declare function scaleGeometryPaths(paths: GeometryPath[], sx: number, sy: number): GeometryPath[];
|
|
66
|
+
/** Deep-copy path-text glyphs (fresh commandsBlob buffers). */
|
|
67
|
+
declare function copyDerivedGlyphs(glyphs: DerivedTextGlyph[] | null): DerivedTextGlyph[] | null;
|
|
23
68
|
/**
|
|
24
69
|
* Build the init props for a deep-copy clone of `src`.
|
|
25
70
|
* Shares logic between SceneGraph.cloneTree and instance child cloning.
|
|
@@ -31,6 +76,9 @@ type NodeCloneMode = 'deep' | 'fig-import';
|
|
|
31
76
|
declare function cloneNodeProps(src: SceneNode, componentId: string | null, mode?: NodeCloneMode): Partial<SceneNode>;
|
|
32
77
|
//#endregion
|
|
33
78
|
//#region src/instances.d.ts
|
|
79
|
+
declare const INSTANCE_SYNC_TEXT_PROPS: readonly ["name", "text", "fontSize", "fontWeight", "fontFamily", "textDirection"];
|
|
80
|
+
declare const INSTANCE_SYNC_PROPS: (keyof SceneNode)[];
|
|
81
|
+
declare const INSTANCE_SYNC_FIELDS: readonly [...(keyof SceneNode)[], "name", "text", "fontSize", "fontWeight", "fontFamily", "textDirection"];
|
|
34
82
|
declare function copyInstanceComponentProps(component: SceneNode): Partial<SceneNode>;
|
|
35
83
|
declare function createInstance(graph: SceneGraph, componentId: string, parentId: string, overrides?: Partial<SceneNode>): SceneNode | null;
|
|
36
84
|
declare function populateInstanceChildren(graph: SceneGraph, instanceId: string, componentId: string, mode?: NodeCloneMode): void;
|
|
@@ -39,6 +87,14 @@ declare function syncInstances(graph: SceneGraph, componentId: string): void;
|
|
|
39
87
|
declare function detachInstance(graph: SceneGraph, instanceId: string): void;
|
|
40
88
|
declare function getMainComponent(graph: SceneGraph, instanceId: string): SceneNode | undefined;
|
|
41
89
|
declare function getInstances(graph: SceneGraph, componentId: string): SceneNode[];
|
|
90
|
+
/** Nearest INSTANCE at or above `nodeId` — self, parent, grandparent, etc. */
|
|
91
|
+
declare function findInstanceAncestor(graph: SceneGraph, nodeId: string): SceneNode | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* True when a node field is protected from instance synchronization.
|
|
94
|
+
*/
|
|
95
|
+
declare function hasInstanceOverride(graph: SceneGraph, nodeId: string, field: string): boolean;
|
|
96
|
+
declare function recordInstanceOverrideValue(graph: SceneGraph, nodeId: string, field: string, value: unknown): void;
|
|
97
|
+
declare function recordInstanceOverride(graph: SceneGraph, nodeId: string, fields: Iterable<string>): void;
|
|
42
98
|
//#endregion
|
|
43
99
|
//#region src/snap.d.ts
|
|
44
100
|
interface SnapGuide {
|
|
@@ -52,7 +108,7 @@ interface SnapResult {
|
|
|
52
108
|
dy: number;
|
|
53
109
|
guides: SnapGuide[];
|
|
54
110
|
}
|
|
55
|
-
declare function computeSnap(movingIds: Set<string>, movingBounds: Rect, allNodes: SceneNode[]): SnapResult;
|
|
111
|
+
declare function computeSnap(movingIds: Set<string>, movingBounds: Rect, allNodes: SceneNode[], threshold?: number): SnapResult;
|
|
56
112
|
declare function computeSelectionBounds(nodes: SceneNode[]): Rect | null;
|
|
57
113
|
//#endregion
|
|
58
114
|
//#region src/export-scale.d.ts
|
|
@@ -94,7 +150,7 @@ declare function polygonVertices(node: {
|
|
|
94
150
|
type: string;
|
|
95
151
|
starInnerRadius: number;
|
|
96
152
|
}): Vector[];
|
|
97
|
-
declare function strokeOverflow(strokes?: Stroke[]): number;
|
|
153
|
+
declare function strokeOverflow(strokes?: Stroke[], fallbackCap?: StrokeCap, network?: VectorNetwork | null): number;
|
|
98
154
|
declare function effectOverflow(effects?: Effect[]): {
|
|
99
155
|
left: number;
|
|
100
156
|
right: number;
|
|
@@ -112,6 +168,8 @@ declare function computeVisualBounds(nodes: Iterable<{
|
|
|
112
168
|
height: number;
|
|
113
169
|
rotation?: number;
|
|
114
170
|
strokes?: Stroke[];
|
|
171
|
+
strokeCap?: StrokeCap;
|
|
172
|
+
vectorNetwork?: VectorNetwork | null;
|
|
115
173
|
effects?: Effect[];
|
|
116
174
|
}>, getAbsolutePosition: (id: string) => Vector): Rect;
|
|
117
175
|
interface VisualBoundsNode {
|
|
@@ -122,6 +180,8 @@ interface VisualBoundsNode {
|
|
|
122
180
|
flipX?: boolean;
|
|
123
181
|
flipY?: boolean;
|
|
124
182
|
strokes?: Stroke[];
|
|
183
|
+
strokeCap?: StrokeCap;
|
|
184
|
+
vectorNetwork?: VectorNetwork | null;
|
|
125
185
|
effects?: Effect[];
|
|
126
186
|
fillGeometry?: Array<{
|
|
127
187
|
commandsBlob: Uint8Array;
|
|
@@ -140,6 +200,12 @@ interface VisualBoundsNode {
|
|
|
140
200
|
}
|
|
141
201
|
declare function unionVisualBounds(a: VisualBounds | null, b: VisualBounds | null): VisualBounds | null;
|
|
142
202
|
declare function intersectVisualBounds(a: VisualBounds, b: VisualBounds): VisualBounds | null;
|
|
203
|
+
/**
|
|
204
|
+
* Coordinate pairs per path blob command: 0=close, 1=move, 2=line,
|
|
205
|
+
* 3=quad (glyph-derived blobs are quad-heavy), 4=cubic. Unknown → null so
|
|
206
|
+
* walkers stop instead of desyncing into coordinate bytes.
|
|
207
|
+
*/
|
|
208
|
+
declare function geometryCommandCoordCount(command: number): number | null;
|
|
143
209
|
declare function geometryBlobBounds(paths: Array<{
|
|
144
210
|
commandsBlob: Uint8Array;
|
|
145
211
|
}>): Rect | null;
|
|
@@ -201,6 +267,15 @@ declare function sharedStyleTypeForKind(kind: SharedStyleKind): SharedStyleType;
|
|
|
201
267
|
declare function getSharedStyles(graph: SceneGraph, kind: SharedStyleKind): SharedStyle[];
|
|
202
268
|
declare function styleDetachmentChanges(node: SceneNode, changes: Partial<SceneNode>): Partial<SceneNode>;
|
|
203
269
|
//#endregion
|
|
270
|
+
//#region src/checkpoint.d.ts
|
|
271
|
+
/** Capture rollback state without changing graph or surviving object identities. */
|
|
272
|
+
declare function captureGraphCheckpoint(graph: SceneGraph): {
|
|
273
|
+
nodes: Map<string, SceneNode>;
|
|
274
|
+
variables: Map<string, Variable>;
|
|
275
|
+
assertPropertiesOnly: () => void;
|
|
276
|
+
restore: () => void;
|
|
277
|
+
};
|
|
278
|
+
//#endregion
|
|
204
279
|
//#region src/index.d.ts
|
|
205
280
|
declare function generateId(): string;
|
|
206
281
|
declare class SceneGraph {
|
|
@@ -214,9 +289,11 @@ declare class SceneGraph {
|
|
|
214
289
|
/** Deflated kiwi schema bytes from the original .fig file, preserved for roundtrip fidelity. */
|
|
215
290
|
figSchemaDeflated: Uint8Array | null;
|
|
216
291
|
documentColorSpace: DocumentColorSpace;
|
|
292
|
+
enabledLibraries: Map<string, EnabledLibraryBinding>;
|
|
217
293
|
readonly emitter: Emitter<SceneGraphEvents>;
|
|
218
294
|
private absPosCache;
|
|
219
295
|
private previewMutationDepth;
|
|
296
|
+
private previewObservers;
|
|
220
297
|
private sourceMetadataPreservationDepth;
|
|
221
298
|
private layoutMutationDepth;
|
|
222
299
|
positionPreviewVersion: number;
|
|
@@ -263,13 +340,16 @@ declare class SceneGraph {
|
|
|
263
340
|
static TEXT_PICTURE_KEYS: ReadonlySet<string>;
|
|
264
341
|
static GLYPH_AFFECTING_KEYS: ReadonlySet<string>;
|
|
265
342
|
static LAYOUT_AFFECTING_KEYS: ReadonlySet<string>;
|
|
266
|
-
runPreviewUpdates(fn: () => void): void;
|
|
343
|
+
runPreviewUpdates(fn: () => void, beforeUpdate?: NodePreviewObserver): void;
|
|
267
344
|
preserveSourceMetadataDuring(fn: () => void): void;
|
|
268
345
|
withLayoutMutations(fn: () => void): void;
|
|
269
346
|
get isApplyingLayout(): boolean;
|
|
270
347
|
updateNodePositionPreview(id: string, x: number, y: number): void;
|
|
271
348
|
updateNodePreview(id: string, changes: Partial<SceneNode>): void;
|
|
272
349
|
updateNode(id: string, changes: Partial<SceneNode>): void;
|
|
350
|
+
/** Replay captured properties without dropping explicit undefined values or absent keys. */
|
|
351
|
+
restoreNodeProperties(id: string, changes: Partial<SceneNode>, absent: readonly (keyof SceneNode)[]): void;
|
|
352
|
+
private applyNodeChanges;
|
|
273
353
|
reparentNode(nodeId: string, newParentId: string): void;
|
|
274
354
|
reorderChild(nodeId: string, parentId: string, insertIndex: number): void;
|
|
275
355
|
insertChildAt(childId: string, parentId: string, index: number): void;
|
|
@@ -292,7 +372,13 @@ declare class SceneGraph {
|
|
|
292
372
|
}
|
|
293
373
|
//#endregion
|
|
294
374
|
//#region src/coordinate.d.ts
|
|
295
|
-
declare function getWorldMatrix(node: SceneNode, graph: SceneGraph): Mat3;
|
|
375
|
+
declare function getWorldMatrix(node: SceneNode, graph: Pick<SceneGraph, 'getNode'>): Mat3;
|
|
376
|
+
declare function getAxisAlignedWorldBounds(node: SceneNode, graph: Pick<SceneGraph, 'getNode'>): {
|
|
377
|
+
x: number;
|
|
378
|
+
y: number;
|
|
379
|
+
width: number;
|
|
380
|
+
height: number;
|
|
381
|
+
};
|
|
296
382
|
declare function getAbsolutePosition(node: SceneNode, graph: SceneGraph): Vector;
|
|
297
383
|
declare function getAbsoluteRotation(node: SceneNode, graph: SceneGraph): number;
|
|
298
384
|
declare function getAbsolutePositionFull(node: SceneNode, graph: SceneGraph): {
|
|
@@ -306,14 +392,24 @@ declare function getAbsolutePositionFull(node: SceneNode, graph: SceneGraph): {
|
|
|
306
392
|
centerX: number;
|
|
307
393
|
centerY: number;
|
|
308
394
|
};
|
|
309
|
-
|
|
395
|
+
/** Lines retain their origin pivot; other shapes rotate around their center. */
|
|
396
|
+
declare function getNodeRotationOrigin(node: SceneNode): Vector;
|
|
397
|
+
/** Position can be applied separately by renderers before setting up local opacity layers. */
|
|
398
|
+
declare function getNodeLocalMatrix(n: SceneNode, position?: Vector): Mat3;
|
|
310
399
|
declare function getNodeWorldBounds(node: SceneNode): {
|
|
311
400
|
x: number;
|
|
312
401
|
y: number;
|
|
313
402
|
width: number;
|
|
314
403
|
height: number;
|
|
315
404
|
};
|
|
316
|
-
|
|
405
|
+
/**
|
|
406
|
+
* World-space positions of the 8 selection handles. `localRect` overrides the
|
|
407
|
+
* node-local box the handles sit on — text-on-path draws its handles on the
|
|
408
|
+
* glyph-fitted path box, not node bounds, so its hit-test must pass that box
|
|
409
|
+
* or the visible handles are ~25px off and unclickable. Defaults to full node
|
|
410
|
+
* bounds.
|
|
411
|
+
*/
|
|
412
|
+
declare function getWorldHandles(node: SceneNode, graph: Pick<SceneGraph, 'getNode'>, localRect?: Rect): {
|
|
317
413
|
nw: {
|
|
318
414
|
x: number;
|
|
319
415
|
y: number;
|
|
@@ -348,5 +444,5 @@ declare function getWorldHandles(node: SceneNode, graph: SceneGraph): {
|
|
|
348
444
|
};
|
|
349
445
|
};
|
|
350
446
|
//#endregion
|
|
351
|
-
export { FONT_WEIGHT_NAMES, FontFamilyStyle, MAX_EXPORT_SCALE, MIN_EXPORT_SCALE, NodeCloneMode, ParsedFontStyle, SceneGraph, SnapGuide, SnapResult, VisualBounds, VisualBoundsNode, clampExportScale, clipBoundsToPolygon, clipPolygon, cloneNodeProps, computeAbsoluteBounds, computeBounds, computeDescendantVisualBounds, computeSelectionBounds, computeSnap, computeVisualBounds, copyEffect, copyEffects, copyFill, copyFills, copyGeometryPaths, copyInstanceComponentProps, copyLayoutGrids, copyStroke, copyStrokes, copyStyleRun, copyStyleRuns, createInstance, degToRad, detachInstance, effectOverflow, generateId, geometryBlobBounds, getAbsolutePosition, getAbsolutePositionFull, getAbsoluteRotation, getInstances, getMainComponent, getNodeLocalMatrix, getNodeWorldBounds, getSharedStyles, getWorldHandles, getWorldMatrix, hasSameCopySource, intersectVisualBounds, isValidExportScale, markCopySource, nodeVisualBounds, normalizeFontFamily, normalizeFontStyleName, parseFontStyle, polygonVertices, populateInstanceChildren, radToDeg, rotatePoint, rotatedBBox, rotatedCorners, scaleGeometryPaths, sharedStyleRefKey, sharedStyleTypeForKind, strokeOverflow, styleDetachmentChanges, styleToVariant, styleToWeight, swapInstanceComponent, syncInstances, unionVisualBounds, weightToStyle };
|
|
447
|
+
export { CollectedSceneMutation, ComponentPropertyTarget, FONT_WEIGHT_NAMES, FontFamilyStyle, INSTANCE_SYNC_FIELDS, INSTANCE_SYNC_PROPS, INSTANCE_SYNC_TEXT_PROPS, MAX_EXPORT_SCALE, MIN_EXPORT_SCALE, MutationImpactListener, NodeCloneMode, ParsedFontStyle, SceneGraph, SceneMutationImpact, SnapGuide, SnapResult, VisualBounds, VisualBoundsNode, applyComponentPropertyValue, captureGraphCheckpoint, clampExportScale, clipBoundsToPolygon, clipPolygon, cloneNodeProps, collectSceneMutation, componentPropertyDefinitions, componentPropertyOwners, computeAbsoluteBounds, computeBounds, computeDescendantVisualBounds, computeSelectionBounds, computeSnap, computeVisualBounds, copyDerivedGlyphs, copyEffect, copyEffects, copyFill, copyFills, copyGeometryPaths, copyInstanceComponentProps, copyLayoutGrids, copyStroke, copyStrokes, copyStyleRun, copyStyleRuns, createInstance, createSceneMutationImpact, degToRad, detachInstance, effectOverflow, findComponentPropertyTarget, findComponentPropertyTargets, findInstanceAncestor, generateId, geometryBlobBounds, geometryCommandCoordCount, getAbsolutePosition, getAbsolutePositionFull, getAbsoluteRotation, getAxisAlignedWorldBounds, getInstances, getMainComponent, getNodeLocalMatrix, getNodeRotationOrigin, getNodeWorldBounds, getSharedStyles, getWorldHandles, getWorldMatrix, hasInstanceOverride, hasSameCopySource, intersectVisualBounds, isValidExportScale, markCopySource, mutationLayoutScopeIds, nodeVisualBounds, normalizeFontFamily, normalizeFontStyleName, parseFontStyle, polygonVertices, populateInstanceChildren, radToDeg, recordInstanceOverride, recordInstanceOverrideValue, removeComponentProperty, resolveComponentPropertyValue, rotatePoint, rotatedBBox, rotatedCorners, scaleGeometryPaths, sharedStyleRefKey, sharedStyleTypeForKind, strokeOverflow, styleDetachmentChanges, styleToVariant, styleToWeight, swapInstanceComponent, syncInstances, transformGeometryBlob, transformGeometryPaths, unionVisualBounds, weightToStyle };
|
|
352
448
|
//# sourceMappingURL=coordinate.d.ts.map
|
package/dist/coordinate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinate.d.ts","names":[],"sources":["../src/copy.ts","../src/instances.ts","../src/snap.ts","../src/export-scale.ts","../src/geometry.ts","../src/font-style.ts","../src/shared-styles.ts","../src/index.ts","../src/coordinate.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"coordinate.d.ts","names":[],"sources":["../src/mutation-impact.ts","../src/components/properties.ts","../src/copy.ts","../src/instances.ts","../src/snap.ts","../src/export-scale.ts","../src/geometry.ts","../src/font-style.ts","../src/shared-styles.ts","../src/checkpoint.ts","../src/index.ts","../src/coordinate.ts"],"mappings":";;;;;;UAEiB;EACf,gBAAgB;EAChB,mBAAmB;EACnB,kBAAkB;EAClB,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qBACA,kBACA,YAAW,QAAQ,aAClB;EAIH,yBACE,oBACA,qBACA,OAAM;EAKR,sBAAsB,oBAAoB;EAI1C,cAAc;EAId,eAAe;EAIf,iBAAiB,qBAAqB;EAItC,aAAa,sBAAsB;EAInC,YAAY,mBAAmB,iBAAY;IAAQ,MAAM;IAAW;;;;;iBC5pBtD,eAAe,MAAM,WAAW,OAAO,KAAK,yBAAyB;iBAoBrE,0BAA0B,MAAM,WAAW,OAAO,KAAK;;;;;;iBAqBvD,oBAAoB,MAAM,WAAW,OAAO,aAAa;iBASzD,oBAAoB,MAAM,WAAW,OAAO;iBAW5C,wBAAwB,MAAM,WAAW,OAAO;;;;;;;;;;;;iBA2DhD,sBAAsB,MAAM,YAAY;;iBAKxC,mBAAmB,GAAG,WAAW,WAAU,SAAU;iBAcrD,mBAAmB,MAAM;;;;;;;;;;;;;iBAmCzB,gBACd,MAAM,WACN,OAAO,KAAK,wBACZ,YAAY"}
|
package/dist/coordinate.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { getAbsolutePosition, getAbsolutePositionFull, getAbsoluteRotation, getNodeLocalMatrix, getNodeWorldBounds, getWorldHandles, getWorldMatrix } from "./chunks/coordinate.js";
|
|
2
|
-
export { getAbsolutePosition, getAbsolutePositionFull, getAbsoluteRotation, getNodeLocalMatrix, getNodeWorldBounds, getWorldHandles, getWorldMatrix };
|
|
1
|
+
import { getAbsolutePosition, getAbsolutePositionFull, getAbsoluteRotation, getAxisAlignedWorldBounds, getNodeLocalMatrix, getNodeRotationOrigin, getNodeWorldBounds, getWorldHandles, getWorldMatrix } from "./chunks/coordinate.js";
|
|
2
|
+
export { getAbsolutePosition, getAbsolutePositionFull, getAbsoluteRotation, getAxisAlignedWorldBounds, getNodeLocalMatrix, getNodeRotationOrigin, getNodeWorldBounds, getWorldHandles, getWorldMatrix };
|
package/dist/coordinate2.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { getAbsolutePosition, getAbsolutePositionFull, getAbsoluteRotation, getNodeLocalMatrix, getNodeWorldBounds, getWorldHandles, getWorldMatrix } from "./coordinate.js";
|
|
2
|
-
export { getAbsolutePosition, getAbsolutePositionFull, getAbsoluteRotation, getNodeLocalMatrix, getNodeWorldBounds, getWorldHandles, getWorldMatrix };
|
|
1
|
+
import { getAbsolutePosition, getAbsolutePositionFull, getAbsoluteRotation, getAxisAlignedWorldBounds, getNodeLocalMatrix, getNodeRotationOrigin, getNodeWorldBounds, getWorldHandles, getWorldMatrix } from "./coordinate.js";
|
|
2
|
+
export { getAbsolutePosition, getAbsolutePositionFull, getAbsoluteRotation, getAxisAlignedWorldBounds, getNodeLocalMatrix, getNodeRotationOrigin, getNodeWorldBounds, getWorldHandles, getWorldMatrix };
|
package/dist/copy.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NodeCloneMode, cloneNodeProps, copyEffect, copyEffects, copyFill, copyFills, copyGeometryPaths, copyLayoutGrids, copyStroke, copyStrokes, copyStyleRun, copyStyleRuns, hasSameCopySource, markCopySource, scaleGeometryPaths } from "./coordinate.js";
|
|
2
|
-
export { NodeCloneMode, cloneNodeProps, copyEffect, copyEffects, copyFill, copyFills, copyGeometryPaths, copyLayoutGrids, copyStroke, copyStrokes, copyStyleRun, copyStyleRuns, hasSameCopySource, markCopySource, scaleGeometryPaths };
|
|
1
|
+
import { NodeCloneMode, cloneNodeProps, copyDerivedGlyphs, copyEffect, copyEffects, copyFill, copyFills, copyGeometryPaths, copyLayoutGrids, copyStroke, copyStrokes, copyStyleRun, copyStyleRuns, hasSameCopySource, markCopySource, scaleGeometryPaths, transformGeometryBlob, transformGeometryPaths } from "./coordinate.js";
|
|
2
|
+
export { NodeCloneMode, cloneNodeProps, copyDerivedGlyphs, copyEffect, copyEffects, copyFill, copyFills, copyGeometryPaths, copyLayoutGrids, copyStroke, copyStrokes, copyStyleRun, copyStyleRuns, hasSameCopySource, markCopySource, scaleGeometryPaths, transformGeometryBlob, transformGeometryPaths };
|
package/dist/copy.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { cloneNodeProps, copyEffect, copyEffects, copyFill, copyFills, copyGeometryPaths, copyLayoutGrids, copyStroke, copyStrokes, copyStyleRun, copyStyleRuns, hasSameCopySource, markCopySource, scaleGeometryPaths } from "./chunks/
|
|
2
|
-
export { cloneNodeProps, copyEffect, copyEffects, copyFill, copyFills, copyGeometryPaths, copyLayoutGrids, copyStroke, copyStrokes, copyStyleRun, copyStyleRuns, hasSameCopySource, markCopySource, scaleGeometryPaths };
|
|
1
|
+
import { cloneNodeProps, copyDerivedGlyphs, copyEffect, copyEffects, copyFill, copyFills, copyGeometryPaths, copyLayoutGrids, copyStroke, copyStrokes, copyStyleRun, copyStyleRuns, hasSameCopySource, markCopySource, scaleGeometryPaths, transformGeometryBlob, transformGeometryPaths } from "./chunks/components/properties.js";
|
|
2
|
+
export { cloneNodeProps, copyDerivedGlyphs, copyEffect, copyEffects, copyFill, copyFills, copyGeometryPaths, copyLayoutGrids, copyStroke, copyStrokes, copyStyleRun, copyStyleRuns, hasSameCopySource, markCopySource, scaleGeometryPaths, transformGeometryBlob, transformGeometryPaths };
|
package/dist/geometry.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { VisualBounds, VisualBoundsNode, clipBoundsToPolygon, clipPolygon, computeAbsoluteBounds, computeBounds, computeDescendantVisualBounds, computeVisualBounds, degToRad, effectOverflow, geometryBlobBounds, intersectVisualBounds, nodeVisualBounds, polygonVertices, radToDeg, rotatePoint, rotatedBBox, rotatedCorners, strokeOverflow, unionVisualBounds } from "./coordinate.js";
|
|
2
|
-
export { VisualBounds, VisualBoundsNode, clipBoundsToPolygon, clipPolygon, computeAbsoluteBounds, computeBounds, computeDescendantVisualBounds, computeVisualBounds, degToRad, effectOverflow, geometryBlobBounds, intersectVisualBounds, nodeVisualBounds, polygonVertices, radToDeg, rotatePoint, rotatedBBox, rotatedCorners, strokeOverflow, unionVisualBounds };
|
|
1
|
+
import { VisualBounds, VisualBoundsNode, clipBoundsToPolygon, clipPolygon, computeAbsoluteBounds, computeBounds, computeDescendantVisualBounds, computeVisualBounds, degToRad, effectOverflow, geometryBlobBounds, geometryCommandCoordCount, intersectVisualBounds, nodeVisualBounds, polygonVertices, radToDeg, rotatePoint, rotatedBBox, rotatedCorners, strokeOverflow, unionVisualBounds } from "./coordinate.js";
|
|
2
|
+
export { VisualBounds, VisualBoundsNode, clipBoundsToPolygon, clipPolygon, computeAbsoluteBounds, computeBounds, computeDescendantVisualBounds, computeVisualBounds, degToRad, effectOverflow, geometryBlobBounds, geometryCommandCoordCount, intersectVisualBounds, nodeVisualBounds, polygonVertices, radToDeg, rotatePoint, rotatedBBox, rotatedCorners, strokeOverflow, unionVisualBounds };
|