@pixerate/editor 0.53.0 → 0.55.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.
Files changed (129) hide show
  1. package/dist/agent/index.cjs +20 -12
  2. package/dist/agent/index.cjs.map +1 -1
  3. package/dist/agent/index.d.cts +4 -3
  4. package/dist/agent/index.d.ts +4 -3
  5. package/dist/agent/index.js +18 -10
  6. package/dist/agent/index.js.map +1 -1
  7. package/dist/animation/index.cjs +16 -2
  8. package/dist/animation/index.cjs.map +1 -1
  9. package/dist/animation/index.d.cts +4 -226
  10. package/dist/animation/index.d.ts +4 -226
  11. package/dist/animation/index.js +15 -1
  12. package/dist/animation-editor/index.cjs +2221 -0
  13. package/dist/animation-editor/index.cjs.map +1 -0
  14. package/dist/animation-editor/index.d.cts +1117 -0
  15. package/dist/animation-editor/index.d.ts +1117 -0
  16. package/dist/animation-editor/index.js +2221 -0
  17. package/dist/animation-editor/index.js.map +1 -0
  18. package/dist/bezier-BfwIbVTl.d.cts +548 -0
  19. package/dist/bezier-DYBvLgUH.d.ts +548 -0
  20. package/dist/bridge/cli.cjs +36 -0
  21. package/dist/bridge/cli.cjs.map +1 -0
  22. package/dist/bridge/cli.d.cts +1 -0
  23. package/dist/bridge/cli.d.ts +1 -0
  24. package/dist/bridge/cli.js +36 -0
  25. package/dist/bridge/cli.js.map +1 -0
  26. package/dist/bridge/index.cjs +16 -0
  27. package/dist/bridge/index.cjs.map +1 -0
  28. package/dist/bridge/index.d.cts +65 -0
  29. package/dist/bridge/index.d.ts +65 -0
  30. package/dist/bridge/index.js +16 -0
  31. package/dist/bridge/index.js.map +1 -0
  32. package/dist/bridge-client-C5OziCRK.d.cts +148 -0
  33. package/dist/bridge-client-C5dRjrz5.d.ts +148 -0
  34. package/dist/canvas/index.cjs +1564 -557
  35. package/dist/canvas/index.cjs.map +1 -1
  36. package/dist/canvas/index.d.cts +411 -7
  37. package/dist/canvas/index.d.ts +411 -7
  38. package/dist/canvas/index.js +1559 -552
  39. package/dist/canvas/index.js.map +1 -1
  40. package/dist/chart/index.cjs +34 -76
  41. package/dist/chart/index.cjs.map +1 -1
  42. package/dist/chart/index.d.cts +9 -38
  43. package/dist/chart/index.d.ts +9 -38
  44. package/dist/chart/index.js +23 -65
  45. package/dist/chart/index.js.map +1 -1
  46. package/dist/chunk-AWKPSOSX.js +401 -0
  47. package/dist/chunk-AWKPSOSX.js.map +1 -0
  48. package/dist/chunk-B6DSIEXA.js +96 -0
  49. package/dist/chunk-B6DSIEXA.js.map +1 -0
  50. package/dist/chunk-EGFUVXKK.cjs +96 -0
  51. package/dist/chunk-EGFUVXKK.cjs.map +1 -0
  52. package/dist/{chunk-AMWXSYCI.js → chunk-GPWNYQ7R.js} +2 -370
  53. package/dist/chunk-GPWNYQ7R.js.map +1 -0
  54. package/dist/{chunk-TO22LX34.js → chunk-GTMJ4Y3S.js} +2208 -2920
  55. package/dist/chunk-GTMJ4Y3S.js.map +1 -0
  56. package/dist/chunk-H5K77C7Y.cjs +3848 -0
  57. package/dist/chunk-H5K77C7Y.cjs.map +1 -0
  58. package/dist/chunk-K73CKYUM.cjs +458 -0
  59. package/dist/chunk-K73CKYUM.cjs.map +1 -0
  60. package/dist/chunk-MLREO6J3.cjs +737 -0
  61. package/dist/chunk-MLREO6J3.cjs.map +1 -0
  62. package/dist/chunk-NONDTTH7.js +5979 -0
  63. package/dist/chunk-NONDTTH7.js.map +1 -0
  64. package/dist/chunk-NV22EMOZ.cjs +401 -0
  65. package/dist/chunk-NV22EMOZ.cjs.map +1 -0
  66. package/dist/{chunk-YNSK4MGT.cjs → chunk-O2UH7LZE.cjs} +1549 -2261
  67. package/dist/chunk-O2UH7LZE.cjs.map +1 -0
  68. package/dist/chunk-PTMIGXZ2.js +467 -0
  69. package/dist/chunk-PTMIGXZ2.js.map +1 -0
  70. package/dist/chunk-QIWFEEWG.cjs +467 -0
  71. package/dist/chunk-QIWFEEWG.cjs.map +1 -0
  72. package/dist/chunk-VWZB6BCY.js +737 -0
  73. package/dist/chunk-VWZB6BCY.js.map +1 -0
  74. package/dist/chunk-WWJNC7SX.js +3848 -0
  75. package/dist/chunk-WWJNC7SX.js.map +1 -0
  76. package/dist/chunk-XCXQDPID.cjs +5979 -0
  77. package/dist/chunk-XCXQDPID.cjs.map +1 -0
  78. package/dist/color-E9pwm--w.d.cts +33 -0
  79. package/dist/color-E9pwm--w.d.ts +33 -0
  80. package/dist/commands/index.cjs +2 -2
  81. package/dist/commands/index.cjs.map +1 -1
  82. package/dist/commands/index.d.cts +1 -1
  83. package/dist/commands/index.d.ts +1 -1
  84. package/dist/commands/index.js +3 -3
  85. package/dist/diagram/index.cjs +1167 -0
  86. package/dist/diagram/index.cjs.map +1 -0
  87. package/dist/diagram/index.d.cts +810 -0
  88. package/dist/diagram/index.d.ts +810 -0
  89. package/dist/diagram/index.js +1167 -0
  90. package/dist/diagram/index.js.map +1 -0
  91. package/dist/{easing-DTmX99QG.d.cts → easing-CNGk-W6d.d.cts} +1 -1
  92. package/dist/{easing-DTmX99QG.d.ts → easing-CNGk-W6d.d.ts} +1 -1
  93. package/dist/generation/index.d.cts +2 -2
  94. package/dist/generation/index.d.ts +2 -2
  95. package/dist/image-editor/index.d.cts +1 -1
  96. package/dist/image-editor/index.d.ts +1 -1
  97. package/dist/parameters/index.d.cts +1 -1
  98. package/dist/parameters/index.d.ts +1 -1
  99. package/dist/pathfinder-BZL8aSu0.d.cts +469 -0
  100. package/dist/pathfinder-CNtsbCRK.d.ts +469 -0
  101. package/dist/player-Dg0FT0UI.d.cts +193 -0
  102. package/dist/player-W-5DX3Go.d.ts +193 -0
  103. package/dist/presence-Cb6WhcrQ.d.cts +77 -0
  104. package/dist/presence-Cb6WhcrQ.d.ts +77 -0
  105. package/dist/{registry-CSlH4iUn.d.ts → registry-7AZFuand.d.ts} +1 -1
  106. package/dist/{registry-B4l-lYts.d.cts → registry-DIpIaCkH.d.cts} +1 -1
  107. package/dist/svg-CLg2zqZA.d.cts +847 -0
  108. package/dist/svg-CPK82TtU.d.ts +847 -0
  109. package/dist/tools/index.cjs +10 -2
  110. package/dist/tools/index.cjs.map +1 -1
  111. package/dist/tools/index.d.cts +3 -74
  112. package/dist/tools/index.d.ts +3 -74
  113. package/dist/tools/index.js +12 -4
  114. package/dist/types-BULrFyuQ.d.cts +316 -0
  115. package/dist/types-BULrFyuQ.d.ts +316 -0
  116. package/dist/vector/index.cjs +1328 -6752
  117. package/dist/vector/index.cjs.map +1 -1
  118. package/dist/vector/index.d.cts +7 -847
  119. package/dist/vector/index.d.ts +7 -847
  120. package/dist/vector/index.js +645 -6069
  121. package/dist/vector/index.js.map +1 -1
  122. package/package.json +19 -1
  123. package/dist/chunk-AMWXSYCI.js.map +0 -1
  124. package/dist/chunk-TO22LX34.js.map +0 -1
  125. package/dist/chunk-XFYUFVAX.cjs +0 -826
  126. package/dist/chunk-XFYUFVAX.cjs.map +0 -1
  127. package/dist/chunk-YNSK4MGT.cjs.map +0 -1
  128. package/dist/pathfinder-B9xh_pCZ.d.ts +0 -1013
  129. package/dist/pathfinder-QdG70sr9.d.cts +0 -1013
@@ -1,15 +1,19 @@
1
1
  import { R as Rect, C as CanvasNode, X as XYPosition, b as CanvasEdge, I as IncrementalLayoutOptions, S as Side, c as CanvasLayoutOptions, d as PlaceBesideOptions, T as TrajectoryFunction, F as FanOutTrajectoryOptions, N as NodeTransition, a as CanvasNodeStyle, e as ReflowDisplacementOptions, D as DirectionalDisplacementOptions, f as CanvasClipboardPayload, g as Position, P as Point } from '../types-BFkYA4eF.js';
2
2
  export { h as CanvasDockingCallbacks, i as CollapseNodeOptions, j as DisplacementDirection, k as DockStrategy, E as ExplodeNodeOptions, l as ExplosionSnapshot, G as GraphDifferences, m as TrajectoryPoint } from '../types-BFkYA4eF.js';
3
- import { Clock, AnimationValueType, AnimationValue, AnimationTrack, AnimationLoopMode, AnimationPlayerState, AnimationPlayer } from '../animation/index.js';
4
- export { ANIMATION_TIME_EPSILON, AnimationKeyframe, AnimationPlayerOptions, ManualClock, OklabColor, createAnimationPlayer, evaluateTrack, formatOklab, interpolateAnimationValue, isAnimationKeyframe, mixColorsOklab, normalizeKeyframes, oklabToRgb, pageHidden, parseOklab, realClock, rgbToOklab, wrapAnimationTime } from '../animation/index.js';
3
+ import { C as Clock, h as AnimationValueType, g as AnimationValue, f as AnimationTrack, b as AnimationLoopMode, e as AnimationPlayerState, c as AnimationPlayer } from '../player-W-5DX3Go.js';
4
+ export { A as ANIMATION_TIME_EPSILON, a as AnimationKeyframe, d as AnimationPlayerOptions, M as ManualClock, i as createAnimationPlayer, j as evaluateTrack, k as interpolateAnimationValue, l as isAnimationKeyframe, n as normalizeKeyframes, p as pageHidden, r as realClock, w as wrapAnimationTime } from '../player-W-5DX3Go.js';
5
5
  import { b as CanvasNodeUpdate, N as NodeRectOptions, A as AlignEdge, c as AlignNodesOptions, D as DistributeAxis, a as DistributeMode, d as DistributeNodesOptions, S as SizeDimension, M as MatchSizeOptions, Z as ZOrderOperation, C as CanvasArrangeAction } from '../arrange-BPAXGdMm.js';
6
6
  export { e as ArrangeShortcutBinding, f as DEFAULT_ARRANGE_SHORTCUTS, L as LOCKED_DATA_KEY, g as LOCKED_PREVIOUS_FLAGS_KEY, h as alignNodes, i as applyNodeUpdates, j as createNodeLookup, k as distributeNodes, l as getAbsolutePosition, m as getNodeRect, n as getNodeSize, o as invertNodeUpdates, p as isLocked, q as lockNodes, r as matchArrangeShortcut, s as matchSize, t as readStyleSize, u as reorderNodes, v as toggleLockNodes, w as unlockNodes, x as withStyleSize } from '../arrange-BPAXGdMm.js';
7
7
  import { C as Command, M as MergedExecutionOptions } from '../types-DsiXGmjo.js';
8
- import { b as StrokeJoin, c as StrokeCap, g as ShapeDescription, a as BezierPath, h as PolygonFillRule, i as PolygonRing, j as ShapeSize, B as BezierPathInput, C as CanvasGradientDef } from '../pathfinder-B9xh_pCZ.js';
9
- export { A as AffineMatrix, k as BezierCommand, l as BezierContour, m as BezierPathToSvgOptions, d as BezierSegment, n as CANVAS_GRADIENT_PRESETS, o as CanvasLinearGradient, p as CanvasRadialGradient, D as DashedPath, q as DividePathsResult, E as EllipseShape, F as FlattenOptions, G as GetShapeRenderDataOptions, r as GradientStop, M as MultiPolygon, O as OffsetPathOptions, s as OutlineStrokeOptions, t as PATHFINDER_OPERATIONS, u as PIXERATE_BRAND_GRADIENT, v as PathBooleanOperation, w as PathBooleanResult, x as PathCommand, y as PathOperand, z as PathOperandInput, H as PathOpsError, I as PathOpsOptions, J as PathOpsReport, K as PathPiece, L as PathPointAtLength, N as PathSelectResult, Q as PathShape, e as PathfinderOperation, R as PathfinderPiece, T as PathfinderResult, f as PathfinderShape, U as PlanarChain, V as PlanarFace, W as PlanarInput, P as PlanarMap, X as PlanarMapOptions, Y as PlanarSplitEdge, Z as PlanarSplitResult, _ as PolygonBooleanOperation, $ as PolygonBooleanOptions, a0 as PolygonInput, a1 as PolygonOperand, a2 as PolygonPiece, a3 as PolygonToPathOptions, a4 as PolygonWithHoles, a5 as RectShape, a6 as RegularPolygonShape, a7 as SHAPE_KINDS, a8 as SegmentIntersection, a9 as ShapeKind, aa as ShapePaint, ab as ShapeRenderData, ac as StarShape, S as SvgGradientDef, ad as SvgGradientStop, ae as angleToSvgLinearCoords, af as arcToCubics, ag as bezierPathArea, ah as bezierPathBounds, ai as bezierPathLength, aj as bezierPathPointAtLength, ak as bezierPathSignedArea, al as bezierPathToSvg, am as closeContour, an as contourEnclosesArea, ao as contourSignedArea, ap as contoursToPath, aq as countPathSegments, ar as cutOutPiece, as as dashContours, at as distanceToBezierPath, au as dividePaths, av as dividePolygons, aw as excludePaths, ax as flattenSvgPath, ay as formatNumber, az as getShapeRenderData, aA as getShapeSvg, aB as gradientToSvgDef, aC as interiorPoint, aD as intersectPaths, aE as intersectPolygons, aF as isCanvasGradient, aG as isShapeDescription, aH as multiPolygonArea, aI as multiPolygonBounds, aJ as normalizeBezierPath, aK as offsetPath, aL as outlineStroke, aM as parseCssGradient, aN as parseSvgPath, aO as pathBoolean, aP as pathBooleanSelect, aQ as pathToContours, aR as pathfinder, aS as planarSplit, aT as pointInBezierPath, aU as pointInMultiPolygon, aV as pointInRings, aW as polygonArea, aX as polygonBoolean, aY as polygonToSvgPath, aZ as resolveCanvasGradient, a_ as ringSignedArea, a$ as segmentBounds, b0 as segmentCurvature, b1 as segmentDerivative, b2 as segmentExtrema, b3 as segmentIntersections, b4 as segmentLength, b5 as segmentNearest, b6 as segmentParamAtLength, b7 as segmentPoint, b8 as segmentTangent, b9 as shapeToPolygon, ba as simplifyRing, bb as splitSegment, bc as strokeOutlineRings, bd as subSegment, be as subtractPaths, bf as subtractPolygons, bg as toBezierPath, bh as transformBezierPath, bi as trimSegments, bj as unionPolygons, bk as unitePaths, bl as windingNumber, bm as xorPolygons } from '../pathfinder-B9xh_pCZ.js';
8
+ import { e as ShapeDescription, B as BezierPath, b as PolygonFillRule, f as PolygonRing, g as ShapeSize, a as BezierPathInput, C as CanvasGradientDef } from '../bezier-DYBvLgUH.js';
9
+ export { A as AffineMatrix, h as BezierCommand, d as BezierContour, i as BezierPathToSvgOptions, c as BezierSegment, j as CANVAS_GRADIENT_PRESETS, k as CanvasLinearGradient, l as CanvasRadialGradient, E as EllipseShape, F as FlattenOptions, G as GetShapeRenderDataOptions, m as GradientStop, M as MultiPolygon, n as PIXERATE_BRAND_GRADIENT, o as PathCommand, p as PathPointAtLength, q as PathShape, P as PolygonBooleanOperation, r as PolygonBooleanOptions, s as PolygonInput, t as PolygonOperand, u as PolygonPiece, v as PolygonToPathOptions, w as PolygonWithHoles, R as RectShape, x as RegularPolygonShape, y as SHAPE_KINDS, z as ShapeKind, D as ShapePaint, H as ShapeRenderData, I as StarShape, S as SvgGradientDef, J as SvgGradientStop, K as angleToSvgLinearCoords, L as arcToCubics, N as bezierPathBounds, O as bezierPathLength, Q as bezierPathPointAtLength, T as bezierPathSignedArea, U as bezierPathToSvg, V as closeContour, W as contourSignedArea, X as contoursToPath, Y as countPathSegments, Z as distanceToBezierPath, _ as dividePolygons, $ as flattenSvgPath, a0 as formatNumber, a1 as getShapeRenderData, a2 as getShapeSvg, a3 as gradientToSvgDef, a4 as intersectPolygons, a5 as isCanvasGradient, a6 as isShapeDescription, a7 as multiPolygonArea, a8 as multiPolygonBounds, a9 as parseCssGradient, aa as parseSvgPath, ab as pathToContours, ac as pointInBezierPath, ad as pointInMultiPolygon, ae as pointInRings, af as polygonArea, ag as polygonBoolean, ah as polygonToSvgPath, ai as resolveCanvasGradient, aj as ringSignedArea, ak as segmentBounds, al as segmentCurvature, am as segmentDerivative, an as segmentExtrema, ao as segmentLength, ap as segmentNearest, aq as segmentParamAtLength, ar as segmentPoint, as as segmentTangent, at as shapeToPolygon, au as simplifyRing, av as splitSegment, aw as subSegment, ax as subtractPolygons, ay as toBezierPath, az as transformBezierPath, aA as trimSegments, aB as unionPolygons, aC as windingNumber, aD as xorPolygons } from '../bezier-DYBvLgUH.js';
10
+ import { S as StrokeJoin, a as StrokeCap } from '../pathfinder-CNtsbCRK.js';
11
+ export { D as DashedPath, d as DividePathsResult, O as OffsetPathOptions, e as OutlineStrokeOptions, f as PATHFINDER_OPERATIONS, g as PathBooleanOperation, h as PathBooleanResult, i as PathOperand, j as PathOperandInput, k as PathOpsError, l as PathOpsOptions, m as PathOpsReport, n as PathPiece, o as PathSelectResult, b as PathfinderOperation, p as PathfinderPiece, q as PathfinderResult, c as PathfinderShape, r as PlanarChain, s as PlanarFace, t as PlanarInput, P as PlanarMap, u as PlanarMapOptions, v as PlanarSplitEdge, w as PlanarSplitResult, x as SegmentIntersection, y as bezierPathArea, z as contourEnclosesArea, A as cutOutPiece, B as dashContours, C as dividePaths, E as excludePaths, F as interiorPoint, G as intersectPaths, H as normalizeBezierPath, I as offsetPath, J as outlineStroke, K as pathBoolean, L as pathBooleanSelect, M as pathfinder, N as planarSplit, Q as segmentIntersections, R as strokeOutlineRings, T as subtractPaths, U as unitePaths } from '../pathfinder-CNtsbCRK.js';
10
12
  import { d as TokenModeContext, r as TokenType, o as TokenScope, f as TokenLiteral, c as TokenVariable, e as TokenResolution, T as TokenState } from '../model-C1zApQM8.js';
11
- import { A as AnimationEasing } from '../easing-DTmX99QG.js';
12
- export { a as ANIMATION_EASING_LABELS, b as ANIMATION_EASING_PRESETS, c as AnimationEasingPreset, C as CUBIC_BEZIER_PRESETS, d as CubicBezierEasing, E as ElasticEasing, S as SpringEasing, e as cubicBezierAt, f as easingFromInfluence, g as easingLabel, h as easingToCss, i as elasticAt, j as evaluateEasing, k as isAnimationEasing, p as parseCssEasing, r as resolveEasing, s as springAt } from '../easing-DTmX99QG.js';
13
+ import { b as AnimationEasing } from '../easing-CNGk-W6d.js';
14
+ export { A as ANIMATION_EASING_LABELS, a as ANIMATION_EASING_PRESETS, c as AnimationEasingPreset, C as CUBIC_BEZIER_PRESETS, d as CubicBezierEasing, E as ElasticEasing, S as SpringEasing, e as cubicBezierAt, f as easingFromInfluence, g as easingLabel, h as easingToCss, i as elasticAt, j as evaluateEasing, k as isAnimationEasing, p as parseCssEasing, r as resolveEasing, s as springAt } from '../easing-CNGk-W6d.js';
15
+ export { O as OklabColor, f as formatOklab, m as mixColorsOklab, o as oklabToRgb, p as parseOklab, r as rgbToOklab } from '../color-E9pwm--w.js';
16
+ import { e as Point$1, l as GraphNode, f as DiagramGraph, c as DiagramMeta, k as GraphGroup, G as GraphEdge, d as EdgePattern, A as ArrowHead, a as MermaidDocument, E as EditOp } from '../types-BULrFyuQ.js';
13
17
 
14
18
  declare const DEFAULT_NODE_WIDTH = 200;
15
19
  declare const DEFAULT_NODE_HEIGHT = 60;
@@ -2810,6 +2814,406 @@ declare function createCanvasDrawController<TNode extends CanvasNode = CanvasNod
2810
2814
  };
2811
2815
  type CanvasDrawController = ReturnType<typeof createCanvasDrawController>;
2812
2816
 
2817
+ /**
2818
+
2819
+ * Automatic layout of a Mermaid diagram graph with dagre, honouring nested groups and per-group
2820
+ * direction overrides. Pure functions — no React, no DOM.
2821
+ *
2822
+ * @module
2823
+ */
2824
+ interface DiagramSize {
2825
+ width: number;
2826
+ height: number;
2827
+ }
2828
+ interface DiagramLayoutOptions {
2829
+ /** Node size estimator; defaults to {@link estimateDiagramNodeSize}. */
2830
+ measure?: (node: GraphNode) => DiagramSize;
2831
+ /** Gap between nodes in a rank, in px (default 48). */
2832
+ nodeSep?: number;
2833
+ /** Gap between ranks, in px (default 72). */
2834
+ rankSep?: number;
2835
+ /** Padding inside groups around their children (default 24). */
2836
+ groupPadding?: number;
2837
+ /** Height reserved for a group's title (default 32). */
2838
+ groupTitleHeight?: number;
2839
+ }
2840
+ declare const DEFAULT_DIAGRAM_NODE_WIDTH = 160;
2841
+ declare const DEFAULT_DIAGRAM_NODE_HEIGHT = 56;
2842
+ /** Rough text-metric size estimate (no DOM). Hosts can supply real measurements. */
2843
+ declare function estimateDiagramNodeSize(node: GraphNode): DiagramSize;
2844
+ /** An image node's picture size: Mermaid's `w` / `h`, else 96 square (or `w` square). */
2845
+ declare function diagramImageSize(node: GraphNode): DiagramSize;
2846
+ interface DiagramLayout {
2847
+ /** Top-left positions in absolute canvas coordinates. */
2848
+ positions: Record<string, Point$1>;
2849
+ /** Sizes for nodes and groups. */
2850
+ sizes: Record<string, DiagramSize>;
2851
+ }
2852
+ /**
2853
+ * Lays out a graph. Nested groups are laid out recursively: each group's
2854
+ * children are arranged with the group's own direction, the group then takes
2855
+ * part in its parent's layout as a single box.
2856
+ */
2857
+ declare function autoLayoutDiagram(graph: DiagramGraph, options?: DiagramLayoutOptions): DiagramLayout;
2858
+ /**
2859
+ * Returns positions for every node/group: stored metadata where available,
2860
+ * auto-layout for the rest. New nodes are placed near their neighbours so a
2861
+ * partially laid-out diagram does not jump.
2862
+ */
2863
+ declare function ensureDiagramLayout(graph: DiagramGraph, meta: DiagramMeta, options?: DiagramLayoutOptions): DiagramLayout;
2864
+ /** Bounding box of a group's descendants, with padding. */
2865
+ declare function diagramGroupSize(groupId: string, graph: DiagramGraph, positions: Record<string, Point$1>, sizes: Record<string, DiagramSize>, meta: DiagramMeta, pad?: number, titleH?: number): DiagramSize;
2866
+
2867
+ /**
2868
+ * Projection of a Mermaid diagram graph onto canvas (React Flow / Svelte Flow) nodes and edges.
2869
+ * Kept free of React so it can be unit-tested and reused (e.g. for export).
2870
+ *
2871
+ * @module
2872
+ */
2873
+ interface MermaidNodeData extends Record<string, unknown> {
2874
+ node: GraphNode;
2875
+ family: string;
2876
+ /** Resolved `classDef` styles for the node's classes, merged with inline styles. */
2877
+ resolvedStyles: Record<string, string>;
2878
+ editable: boolean;
2879
+ }
2880
+ interface MermaidGroupData extends Record<string, unknown> {
2881
+ group: GraphGroup;
2882
+ family: string;
2883
+ resolvedStyles: Record<string, string>;
2884
+ editable: boolean;
2885
+ }
2886
+ interface MermaidEdgeData extends Record<string, unknown> {
2887
+ edge: GraphEdge;
2888
+ family: string;
2889
+ resolvedStyles: Record<string, string>;
2890
+ editable: boolean;
2891
+ }
2892
+ interface MermaidFlowNode {
2893
+ id: string;
2894
+ /** `mermaid-node` / `mermaid-group`, or a family canvas node type. */
2895
+ type: string;
2896
+ position: {
2897
+ x: number;
2898
+ y: number;
2899
+ };
2900
+ data: MermaidNodeData | MermaidGroupData | Record<string, unknown>;
2901
+ parentId?: string;
2902
+ width: number;
2903
+ height: number;
2904
+ style?: Record<string, string | number>;
2905
+ draggable: boolean;
2906
+ selectable: boolean;
2907
+ connectable: boolean;
2908
+ zIndex: number;
2909
+ extent?: "parent";
2910
+ className?: string;
2911
+ }
2912
+ interface MermaidFlowEdge {
2913
+ id: string;
2914
+ /** `mermaid-edge`, or a family canvas edge type. */
2915
+ type: string;
2916
+ source: string;
2917
+ target: string;
2918
+ data: MermaidEdgeData;
2919
+ label?: string;
2920
+ selectable: boolean;
2921
+ reconnectable: boolean;
2922
+ zIndex: number;
2923
+ sourceHandle?: string;
2924
+ targetHandle?: string;
2925
+ className?: string;
2926
+ }
2927
+ /** Parses `fill:#f9f,stroke:#333,stroke-width:4px` into an object. */
2928
+ declare function parseMermaidStyles(styles: string[]): Record<string, string>;
2929
+ declare function resolveMermaidStyles(classes: string[], inline: string[], classDefs: Record<string, string[]>): Record<string, string>;
2930
+ interface MermaidFlowOptions {
2931
+ editable?: boolean;
2932
+ /** Override positions (e.g. during a drag). Absolute coordinates. */
2933
+ positions?: Record<string, Point$1>;
2934
+ sizes?: Record<string, DiagramSize>;
2935
+ }
2936
+ /**
2937
+ * Converts the graph + layout into React Flow nodes. Positions in the layout
2938
+ * are absolute; React Flow wants child positions relative to the parent, so
2939
+ * they are converted here.
2940
+ */
2941
+ declare function mermaidFlowNodes(graph: DiagramGraph, layout: DiagramLayout, options?: MermaidFlowOptions): MermaidFlowNode[];
2942
+ declare function mermaidFlowEdges(graph: DiagramGraph, options?: MermaidFlowOptions): MermaidFlowEdge[];
2943
+ /** SVG marker id for an arrow head (markers are defined once by the canvas). */
2944
+ declare function mermaidMarkerId(head: ArrowHead, side: "start" | "end"): string | undefined;
2945
+ declare function mermaidEdgeDash(pattern: EdgePattern): string | undefined;
2946
+ declare function mermaidEdgeWidth(pattern: EdgePattern): number;
2947
+
2948
+ /**
2949
+ * Helpers for showing a laid-out diagram outside the editor: sizing an inline
2950
+ * viewer to its content, animating between two layouts, and trimming a graph
2951
+ * that is still being streamed in. Pure functions — no React, no DOM.
2952
+ *
2953
+ * @module
2954
+ */
2955
+ interface DiagramBounds {
2956
+ x: number;
2957
+ y: number;
2958
+ width: number;
2959
+ height: number;
2960
+ }
2961
+ /** Extent of every positioned node and group, or `null` for an empty layout. */
2962
+ declare function diagramLayoutBounds(layout: DiagramLayout): DiagramBounds | null;
2963
+ interface DiagramCanvasHeightOptions {
2964
+ /** Smallest height returned (default 320). */
2965
+ min?: number;
2966
+ /** Largest height returned; taller content is zoomed out (default 560). */
2967
+ max?: number;
2968
+ /** Room added around the content (default 48). */
2969
+ padding?: number;
2970
+ }
2971
+ /** Container height that shows a layout at 1:1 where it fits, clamped. */
2972
+ declare function diagramCanvasHeight(layout: DiagramLayout, options?: DiagramCanvasHeightOptions): number;
2973
+ /**
2974
+ * Height to reserve before the asynchronous layout resolves, from the graph's
2975
+ * counts alone. Uses the same clamp as {@link diagramCanvasHeight}, so the container
2976
+ * does not jump when the layout lands.
2977
+ */
2978
+ declare function estimateDiagramCanvasHeight(graph: DiagramGraph, options?: DiagramCanvasHeightOptions): number;
2979
+ /**
2980
+ * A layout partway between two others, for animating a re-layout: ids in both
2981
+ * interpolate at `t` (0 = `from`, 1 = `to`), ids new in `to` start at their
2982
+ * target, and ids missing from `to` drop out.
2983
+ */
2984
+ declare function blendDiagramLayout(from: DiagramLayout, to: DiagramLayout, t: number): DiagramLayout;
2985
+ /**
2986
+ * The graph without nodes that no edge touches yet. While a diagram streams
2987
+ * in, a node usually arrives a line before the edge that places it; showing it
2988
+ * alone makes the layout jump twice. Groups are kept when they (or a nested
2989
+ * group) still contain a node.
2990
+ */
2991
+ declare function connectedDiagramOnly(graph: DiagramGraph): DiagramGraph;
2992
+
2993
+ interface DiagramStreamResult {
2994
+ /** The diagram as far as it has arrived (its graph trimmed while incomplete). */
2995
+ document: MermaidDocument;
2996
+ /** Layout for `document.graph`, or `null` before any node can be placed. */
2997
+ layout: DiagramLayout | null;
2998
+ /** True when the layout differs from the previous result (start a tween). */
2999
+ relaid: boolean;
3000
+ }
3001
+ /**
3002
+ * Turns Mermaid text that is still being written (e.g. streamed from a model) into a
3003
+ * diagram and a layout to draw. While incomplete, nodes no edge touches yet are held
3004
+ * back (a node usually arrives a line before the edge that places it, and showing it
3005
+ * alone makes the layout jump twice). Layouts are only recomputed when nodes, edges or
3006
+ * groups change, so label text streaming in does not move anything.
3007
+ */
3008
+ declare class DiagramStream {
3009
+ private readonly options;
3010
+ private lastKey;
3011
+ private layout;
3012
+ constructor(options?: DiagramLayoutOptions);
3013
+ /** Reads the source so far. `complete` when nothing more will arrive. */
3014
+ update(source: string, complete?: boolean): DiagramStreamResult;
3015
+ /** Forgets the previous layout (a new source). */
3016
+ reset(): void;
3017
+ }
3018
+ /**
3019
+ * The diagram text in a reply that is still arriving: the body of the first ```mermaid
3020
+ * (or unmarked) fence, even before it is closed, or the whole text when there is no fence.
3021
+ * Prose before the fence (a model's "Here is the plan:") is skipped.
3022
+ */
3023
+ declare function streamedDiagramText(source: string): string;
3024
+ /** Ease-out cubic, for layout tweens. */
3025
+ declare const easeDiagramTween: (t: number) => number;
3026
+
3027
+ /**
3028
+ * How a path is painted: `shape` with the node's fill and border, `line` with the border
3029
+ * only, `filled` solid in the border colour (state start / end dots, fork bars), `hidden`
3030
+ * not at all (text nodes keep a hit area).
3031
+ */
3032
+ type MermaidShapePaint = 'shape' | 'line' | 'filled' | 'hidden';
3033
+ interface MermaidShapePath {
3034
+ d: string;
3035
+ paint: MermaidShapePaint;
3036
+ }
3037
+ /**
3038
+ * Draws a Mermaid flowchart / state / class / ER shape (canonical names, see
3039
+ * `FLOWCHART_SHAPES` and `STATE_SHAPES`) as SVG paths that fill a `width × height`
3040
+ * box, inset by `inset` so strokes are not clipped. Unknown shapes draw a rectangle.
3041
+ */
3042
+ declare function mermaidShapePaths(shape: string, width: number, height: number, inset?: number): MermaidShapePath[];
3043
+ /**
3044
+ * The arrow marker to draw for a Mermaid arrow head on a canvas edge: `arrowclosed` for
3045
+ * the filled heads (`-->`, `<|--`, ER cardinalities fall back to it), `arrow` for open
3046
+ * ones, or `null` for none. Canvas libraries map these to their own marker types.
3047
+ */
3048
+ declare function mermaidEdgeMarker(head: string): 'arrow' | 'arrowclosed' | null;
3049
+ /**
3050
+ * The CSS custom properties and colours a Mermaid node paints with, from its resolved
3051
+ * `style` / `classDef` declarations. Unstyled nodes use the host's `--card`, `--foreground`
3052
+ * and `--primary` colours (with fallbacks), so they follow the app theme.
3053
+ */
3054
+ declare function mermaidNodePaint(styles?: Record<string, string>, selected?: boolean): Record<string, string>;
3055
+ /** How each {@link MermaidShapePaint} fills and strokes, as CSS declarations. */
3056
+ declare const MERMAID_SHAPE_PAINT: Record<MermaidShapePaint, {
3057
+ fill: string;
3058
+ stroke: string;
3059
+ }>;
3060
+ /** A Mermaid label as plain lines: `<br>` splits lines, other tags and markdown-string quotes are dropped. */
3061
+ declare function mermaidLabelLines(label: string): string[];
3062
+ /** Class members / ER attributes of a node, one display line each. */
3063
+ declare function mermaidNodeMembers(data: Record<string, unknown> | undefined): string[];
3064
+
3065
+ /** Concrete colours (no CSS variables), so the SVG draws the same as a file, an `<img>` or a PNG. */
3066
+ interface DiagramSvgTheme {
3067
+ background: string;
3068
+ nodeFill: string;
3069
+ nodeStroke: string;
3070
+ text: string;
3071
+ edge: string;
3072
+ edgeLabelBackground: string;
3073
+ groupFill: string;
3074
+ groupStroke: string;
3075
+ groupText: string;
3076
+ fontFamily: string;
3077
+ fontSize: number;
3078
+ }
3079
+ declare const DIAGRAM_SVG_LIGHT_THEME: DiagramSvgTheme;
3080
+ declare const DIAGRAM_SVG_DARK_THEME: DiagramSvgTheme;
3081
+ interface DiagramSvgOptions extends DiagramLayoutOptions {
3082
+ /** A layout to draw instead of computing one (e.g. the canvas' current layout). */
3083
+ layout?: DiagramLayout;
3084
+ theme?: Partial<DiagramSvgTheme>;
3085
+ /** Room around the diagram in px (default 16). */
3086
+ padding?: number;
3087
+ /**
3088
+ * Fit inside this box (a thumbnail): the SVG's `width` / `height` shrink to fit, keeping the
3089
+ * aspect ratio; the drawing is not enlarged. Default: natural size.
3090
+ */
3091
+ maxWidth?: number;
3092
+ maxHeight?: number;
3093
+ /** Accessible name (`<title>`); default the diagram's title or family. */
3094
+ title?: string;
3095
+ /** Leave out the background rectangle (transparent). */
3096
+ transparent?: boolean;
3097
+ }
3098
+ interface DiagramSvg {
3099
+ svg: string;
3100
+ /** The SVG's `width` / `height` attributes (after fitting). */
3101
+ width: number;
3102
+ height: number;
3103
+ /** Natural size of the drawing (before fitting), in px. */
3104
+ naturalWidth: number;
3105
+ naturalHeight: number;
3106
+ }
3107
+ /**
3108
+ * Draws a Mermaid diagram (flowchart, state, class, ER) as a standalone SVG: groups, nodes in
3109
+ * their Mermaid shapes with `style` / `classDef` colours, labels, class members and ER
3110
+ * attributes, and edges with labels, line patterns and arrow heads. Uses stored
3111
+ * `%% @pixerate` positions (auto-layout for the rest), so it matches the canvas. Pure: no DOM.
3112
+ */
3113
+ declare function mermaidToSvg(doc: MermaidDocument, options?: DiagramSvgOptions): DiagramSvg;
3114
+ /** A small preview of a diagram: `mermaidToSvg` fitted inside `maxWidth` × `maxHeight` (default 240 × 160). */
3115
+ declare function mermaidThumbnailSvg(doc: MermaidDocument, options?: DiagramSvgOptions): DiagramSvg;
3116
+ /** Longest side, in pixels, of a rasterized diagram unless `maxSize` says otherwise. */
3117
+ declare const DIAGRAM_RASTER_MAX_SIZE = 2048;
3118
+ interface RasterizeSvgOptions {
3119
+ /** Size of the SVG in CSS pixels. */
3120
+ width: number;
3121
+ height: number;
3122
+ /** Pixels per CSS pixel (default 2), reduced so the longest side stays within `maxSize`. */
3123
+ scale?: number;
3124
+ /** Longest side of the image in pixels (default 2048). */
3125
+ maxSize?: number;
3126
+ /** Fill behind the drawing (default white; `transparent` keeps the alpha channel). */
3127
+ background?: string;
3128
+ /** Document to create the canvas and image in (default: the global one). */
3129
+ document?: Document;
3130
+ }
3131
+ interface RasterImage {
3132
+ /** Base64 PNG, without the `data:` prefix. */
3133
+ data: string;
3134
+ mimeType: 'image/png';
3135
+ width: number;
3136
+ height: number;
3137
+ }
3138
+ /** Pixel size of the image for an SVG of `width` × `height`: `scale` × the size, longest side ≤ `maxSize`. */
3139
+ declare function rasterSize(width: number, height: number, scale?: number, maxSize?: number): {
3140
+ width: number;
3141
+ height: number;
3142
+ scale: number;
3143
+ };
3144
+ /**
3145
+ * Turns a standalone SVG (e.g. `mermaidToSvg(...).svg`) into a PNG in the browser: draws it
3146
+ * through an `Image` onto a canvas at `scale` (longest side ≤ `maxSize`) over `background`.
3147
+ * The SVG must use concrete colours (CSS variables do not apply inside an image). Throws a
3148
+ * sentence saying what to do instead when there is no DOM.
3149
+ */
3150
+ declare function rasterizeSvg(svg: string, options: RasterizeSvgOptions): Promise<RasterImage>;
3151
+ /** A file name for a diagram: its title in lower case with dashes, else its family, plus the extension. */
3152
+ declare function diagramFileName(doc: Pick<MermaidDocument, 'family' | 'graph'>, extension: string): string;
3153
+ interface DownloadDiagramPngOptions extends DiagramSvgOptions, Omit<RasterizeSvgOptions, 'width' | 'height'> {
3154
+ /** File name (default: the diagram title, else `<family>-diagram`, plus `.png`). */
3155
+ filename?: string;
3156
+ }
3157
+ /** Renders a diagram to PNG and saves it through a download link. Returns the image and file name. */
3158
+ declare function downloadDiagramPng(doc: MermaidDocument, options?: DownloadDiagramPngOptions): Promise<RasterImage & {
3159
+ filename: string;
3160
+ }>;
3161
+
3162
+ /**
3163
+ * Mermaid diagrams on the canvas: lays out a `MermaidDocument` (dagre, nested groups,
3164
+ * stored `%% @pixerate` positions blended with auto-layout for new nodes), projects it
3165
+ * onto canvas nodes and edges, maps canvas drags back to `moveNodes` edits, and streams
3166
+ * diagrams that are still being written. Ported from Ursula.
3167
+ */
3168
+
3169
+ interface MermaidCanvasOptions extends DiagramLayoutOptions {
3170
+ /** Nodes can be dragged, connected and selected (default false). */
3171
+ editable?: boolean;
3172
+ /** A layout to draw instead of computing one (e.g. a tween frame). */
3173
+ layout?: DiagramLayout;
3174
+ }
3175
+ interface MermaidCanvas {
3176
+ nodes: MermaidFlowNode[];
3177
+ edges: MermaidFlowEdge[];
3178
+ /** Absolute positions and sizes of every node and group. */
3179
+ layout: DiagramLayout;
3180
+ }
3181
+ /**
3182
+ * Lays out a Mermaid document and returns canvas nodes (groups first, child positions
3183
+ * relative to their parent as React Flow / Svelte Flow expect) and edges.
3184
+ */
3185
+ declare function mermaidToCanvas(doc: MermaidDocument, options?: MermaidCanvasOptions): MermaidCanvas;
3186
+ interface MermaidMovesOptions {
3187
+ /**
3188
+ * Positions already stored in the document (`doc.meta.layout`). Nodes that are laid out
3189
+ * automatically and not yet stored are pinned where they are, so moving one node does
3190
+ * not shift the others (new nodes are blended in around stored ones).
3191
+ */
3192
+ stored?: Readonly<Record<string, Point$1>>;
3193
+ }
3194
+ /**
3195
+ * The `moveNodes` edit for canvas nodes that were dragged: converts their positions
3196
+ * (relative to their parent) back to absolute coordinates. Returns `null` when nothing
3197
+ * moved by at least half a pixel.
3198
+ */
3199
+ declare function mermaidMovesFromCanvas(layout: DiagramLayout, moved: ReadonlyArray<{
3200
+ id: string;
3201
+ position: {
3202
+ x: number;
3203
+ y: number;
3204
+ };
3205
+ parentId?: string;
3206
+ }>, all?: ReadonlyArray<{
3207
+ id: string;
3208
+ position: {
3209
+ x: number;
3210
+ y: number;
3211
+ };
3212
+ parentId?: string;
3213
+ }>, options?: MermaidMovesOptions): Extract<EditOp, {
3214
+ type: 'moveNodes';
3215
+ }> | null;
3216
+
2813
3217
  /**
2814
3218
  * UI-agnostic agent presence trajectory, inspection anchor, and cursor rotation math.
2815
3219
  */
@@ -2916,4 +3320,4 @@ declare function formatAgentCursorName(nameOrUsername?: string | null): string;
2916
3320
  */
2917
3321
  declare function isAgentCursor(cursor: Partial<CanvasAgentCursor>): boolean;
2918
3322
 
2919
- export { ANIMATABLE_PROPERTIES, ANIMATION_DATA_KEY, AUTO_LAYOUT_DATA_KEY, type AddCanvasVariantOptions, AlignEdge, AlignNodesOptions, type AnimatableProperty, type AnimateNodeOptions, type AnimationDocument, AnimationEasing, AnimationEditError, type AnimationEditErrorCode, type AnimationFrame, type AnimationHistoryTarget, type AnimationKeyframeClipboard, AnimationLoopMode, type AnimationMotionPath, type AnimationOverrides, AnimationPlayer, AnimationPlayerState, type AnimationPropertyOptions, type AnimationStop, AnimationTrack, AnimationValue, AnimationValueType, type ArrangeHistoryTarget, type AutoLayout, type AutoLayoutAlignContent, type AutoLayoutAlignCross, type AutoLayoutAlignMain, type AutoLayoutCellAlign, type AutoLayoutChild, type AutoLayoutConstraints, type AutoLayoutGrid, type AutoLayoutGridArea, type AutoLayoutGridCell, type AutoLayoutGridGeometry, type AutoLayoutGridTrack, type AutoLayoutHorizontalConstraint, type AutoLayoutInsertTarget, type AutoLayoutMeasure, type AutoLayoutMode, type AutoLayoutOptions, type AutoLayoutPadding, type AutoLayoutSize, type AutoLayoutSizing, type AutoLayoutSizingPair, type AutoLayoutVerticalConstraint, BezierPath, BezierPathInput, CANVAS_COMPONENT_DRAG_TYPE, CANVAS_TOKEN_PROPERTIES, CARD_INSPECTION_ZONES, CHILD_LAYOUT_DATA_KEY, COMPONENT_DATA_KEY, COMPONENT_OVERRIDES_DATA_KEY, COMPONENT_PROPERTY_REFS_DATA_KEY, COMPONENT_SET_DATA_KEY, COMPONENT_SOURCE_DATA_KEY, CONNECTION_LINE_TYPES, CSS_ANIMATION_PROPERTIES, type CanvasAgentCursor, type CanvasAnimationController, type CanvasAnimationControllerOptions, type CanvasAnimationState, CanvasArrangeAction, type CanvasArrangeController, type CanvasArrangeControllerOptions, type CanvasAutoLayoutController, type CanvasAutoLayoutControllerOptions, CanvasClipboardPayload, type CanvasComponentData, type CanvasComponentErrorCode, type CanvasComponentInfo, type CanvasComponentPropertyDef, type CanvasComponentPropertyField, type CanvasComponentPropertyType, type CanvasComponentPropertyValue, type CanvasComponentResult, type CanvasComponentSetData, type CanvasComponentSetInfo, type CanvasComponentSyncOptions, type CanvasComponentsController, type CanvasComponentsControllerOptions, type CanvasConnectionLineType, type CanvasDrawController, type CanvasDrawControllerOptions, CanvasEdge, CanvasGradientDef, type CanvasHeightOptions, type CanvasInstanceData, type CanvasInstanceInfo, type CanvasInstancePropertyInfo, CanvasLayoutOptions, CanvasNode, CanvasNodeStyle, CanvasNodeUpdate, type CanvasScene, type CanvasScenesOptions, type CanvasScenesState, CanvasScenesStore, type CanvasTokenBindingInfo, type CanvasTokenOptions, type CanvasTokenProperty, type CanvasViewport, type CardInspectionZone, Clock, type CombineShapeNodesOptions, type CombineShapeNodesRefusal, type CombineShapeNodesResult, type ConnectorSnap, type ConnectorSnapOptions, type ConnectorSnapTarget, type CreateCanvasComponentOptions, type CreateCanvasInstanceOptions, type CssAnimationExport, type CssExportOptions, type CssPropertyAnimation, type CubicSegment, type CurvedPathOptions, DEFAULT_CURSOR_INACTIVITY_MS, DEFAULT_NODE_HEIGHT, DEFAULT_NODE_WIDTH, DEFAULT_PLACEMENT_GAP, DirectionalDisplacementOptions, DistributeAxis, DistributeMode, DistributeNodesOptions, type EvaluateAnimationOptions, FanOutTrajectoryOptions, type FitCubicsOptions, type FitPathDataOptions, type FitViewportOptions, type FreehandDrawOptions, type FreehandStroke, type FreehandStrokeStyle, type FreehandTool, type GuideIndex, type GuideLine, type HatchOptions, INSTANCE_DATA_KEY, IncrementalLayoutOptions, type KeyframeDragState, type KeyframePatch, type KeyframeRangeOptions, type KeyframeRef, type KeyframeSnap, MAX_KEYFRAME_REFS, MatchSizeOptions, type MeasureGuide, type MeasureSelectionOptions, type MeasureSelectionResult, type MoveKeyframesResult, type MultiNodeTransitionOptions, type NodeAnimation, NodeRectOptions, NodeTransition, type OffsetShapeNodesOptions, type OutlineShapeStrokesOptions, PlaceBesideOptions, Point, PolygonFillRule, PolygonRing, Position, type PositionChangeLike, RESIZE_HANDLES, type RecordAnimationOptions, Rect, ReflowDisplacementOptions, type ResizeHandle, SHAPE_DATA_KEY, SHAPE_NODE_TYPE, SHAPE_OPERATIONS, type SampleAnimationOptions, type ScaleKeyframesOptions, type SerializedCanvasScenes, type SetCanvasVariantPropertiesOptions, type SetKeyframeOptions, ShapeDescription, type ShapeNodePolygonOptions, type ShapeOperation, type ShapePathEditOperation, type ShapePathEditRefusal, type ShapePathEditResult, ShapeSize, Side, SizeDimension, type SnapGuidesOptions, type SnapNodeDragOptions, type SnapNodeDragResult, type SnapNodeResizeOptions, type SnapNodeResizeResult, type SnapResizeOptions, type SnapResizeResult, type SnapResult, StreamingLayoutManager, type StreamingLayoutManagerOptions, StrokeCap, StrokeJoin, type StrokeToShapeNodeOptions, TOKEN_BINDINGS_DATA_KEY, TOKEN_MODES_DATA_KEY, type TimelineKeyframe, type TimelineRow, type TimelineRowsOptions, TrajectoryFunction, type WebAnimationSpec, XYPosition, ZOrderOperation, addCanvasVariant, addKeyframesAtTime, animateNode, applyAnimation, applyAnimationOverrides, applyConstraints, applyShapeCombination, applyShapeReplacement, bindCanvasComponentProperty, bindCanvasToken, blendLayout, boundsOf, calculateCursorArrowRotation, calculateCurvedPath, calculateDagreReflowDisplacement, calculateDirectionalDisplacement, canCombineShapeNodes, canOffsetShapeNodes, canOutlineShapeNodeStrokes, canvasHeight, centerNodes, centre, clampAnimationValue, clampLayoutSize, collectDescendantIds, combineCanvasComponentsAsVariants, combineShapeNodes, computeNodesBoundingBox, computeSnapGuides, connectedOnly, copyKeyframes, createBezierTrajectory, createCanvasAnimationController, createCanvasArrangeController, createCanvasAutoLayoutController, createCanvasComponent, createCanvasComponentsController, createCanvasDrawController, createCanvasInstance, createCanvasScenesStore, createDefaultStrokeStyle, createFanOutTrajectory, createGuideIndex, createNodeGuideIndex, cubicPointAt, cubicsToPathData, defaultEasing, deleteKeyframes, detachCanvasInstance, detachTokenBindings, diffOverrideGroups, ensureLayout, estimateCanvasHeight, estimateNodeSize, evaluateAnimation, exportCssAnimation, findConnectorSnap, findStrokesAtPoint, findVariant, fitCubicRun, fitCubicWithTangents, fitCubics, fitFreehandPath, fitPathData, fitViewportToNodes, fitViewportToRect, flowSide, formatAgentCursorName, formatAnimationTime, formatVariantName, getAgentCardAnchor, getAnimatableProperty, getAnimatedProperties, getAnimatedValue, getAnimationDuration, getAnimationTrack, getAutoLayout, getAutoLayoutGrid, getAutoLayoutInsertTarget, getBindableTokenProperties, getCanvasComponentDragId, getCanvasTokenProperty, getCenteredNodePosition, getChildLayout, getComponentData, getComponentInstances, getComponentPropertyDefs, getComponentPropertyRefs, getComponentSourceId, getCssPropertyAnimations, getCursorTransitionDuration, getDefaultVariant, getEffectiveTokenModes, getFlowChildren, getInstanceData, getInstanceProperties, getInstanceStatus, getKeyframeTimes, getLayerName, getLayoutParent, getLayoutSizing, getLayoutedNodes, getNaturalMovementTiming, getNextVariantValues, getNodeAnimation, getNodeOverrides, getNodeShape, getNodeTokenBindings, getNodeTokenModes, getOwningComponent, getOwningInstance, getResizingNodeRect, getRootInstance, getTimelineRows, getTimelineTicks, getTokenPropertyScope, getTokensForProperty, getVariantConflicts, getVariantOptions, getVariantSet, getVariantValues, handlePoint, hasVisibleStroke, hashString, hatchPath, inferResizeHandle, inspectCanvasInstance, inspectNodeTokens, isAgentCursor, isAutoLayoutFrame, isCanvasComponent, isCanvasComponentSet, isCanvasInstance, isCssExportExact, isEventFromTextInput, isInsideInstance, isKeyframeSelected, isMeasureModifierHeld, isNodeAnimated, isShapeNode, isStraightCubic, isValidCanvasEdge, isValidCanvasNode, isValidCanvasScene, isValidUrl, layoutAll, layoutBounds, layoutFrame, layoutUp, layoutUpMany, linearPositionTrajectory, linearTrajectory, listCanvasComponents, makeSizingCoherent, measureBetween, measureLabel, measureSelection, measureToLine, mergeNodeUpdates, moveKeyframes, moveLayoutChild, nearestHandlePositions, offsetShapeNodes, oppositePosition, outlineShapeNodeStrokes, overlaps, parseCanvasClipboardData, parseCanvasScenes, parseKeyframeClipboard, parseNodeStyleDeclarations, parseVariantName, pasteKeyframes, placeBeside, playWebAnimations, positionToSide, pruneCanvasTokenModes, pushCanvasInstanceOverrides, readAnimatableValue, readNodeStyleProperty, readOverrideGroup, recordAnimationChanges, relayoutUpdates, remapPastedNodes, removeCanvasVariant, removeTrack, renameCanvasVariantProperty, renameCanvasVariantValue, repositionNodesTo, resetCanvasInstanceOverrides, resizeHandleAxes, resolveCanvasTokens, resolvePadding, restoreCanvasMainComponent, revertShapeCombination, runMultiNodeTransition, sampleAnimationFrames, scaleKeyframes, serializeCanvasNodes, setCanvasComponentProperty, setCanvasInstanceProperties, setCanvasTokenMode, setCanvasVariantProperties, setKeyframe, setKeyframeEasing, setMotionPath, setTrackEnabled, shapeNodeToBezierPath, shapeNodeToPolygon, shapeToBezierPath, sideToPosition, snapKeyframeDelta, snapNodeDrag, snapNodeResize, snapResize, snapTimeToFrame, snapToGrid, streamlinePoints, strokeBoundingBox, strokePointsToPathData, strokeToShapeNode, swapCanvasInstance, syncAllCanvasInstances, syncCanvasComponents, syncCanvasInstance, timeToX, toWebAnimations, updateKeyframe, withNodeAnimation, withStyleOpacity, wouldCreateComponentCycle, writeNodeStyleProperty, writeOverrideGroup, xToTime };
3323
+ export { ANIMATABLE_PROPERTIES, ANIMATION_DATA_KEY, AUTO_LAYOUT_DATA_KEY, type AddCanvasVariantOptions, AlignEdge, AlignNodesOptions, type AnimatableProperty, type AnimateNodeOptions, type AnimationDocument, AnimationEasing, AnimationEditError, type AnimationEditErrorCode, type AnimationFrame, type AnimationHistoryTarget, type AnimationKeyframeClipboard, AnimationLoopMode, type AnimationMotionPath, type AnimationOverrides, AnimationPlayer, AnimationPlayerState, type AnimationPropertyOptions, type AnimationStop, AnimationTrack, AnimationValue, AnimationValueType, type ArrangeHistoryTarget, type AutoLayout, type AutoLayoutAlignContent, type AutoLayoutAlignCross, type AutoLayoutAlignMain, type AutoLayoutCellAlign, type AutoLayoutChild, type AutoLayoutConstraints, type AutoLayoutGrid, type AutoLayoutGridArea, type AutoLayoutGridCell, type AutoLayoutGridGeometry, type AutoLayoutGridTrack, type AutoLayoutHorizontalConstraint, type AutoLayoutInsertTarget, type AutoLayoutMeasure, type AutoLayoutMode, type AutoLayoutOptions, type AutoLayoutPadding, type AutoLayoutSize, type AutoLayoutSizing, type AutoLayoutSizingPair, type AutoLayoutVerticalConstraint, BezierPath, BezierPathInput, CANVAS_COMPONENT_DRAG_TYPE, CANVAS_TOKEN_PROPERTIES, CARD_INSPECTION_ZONES, CHILD_LAYOUT_DATA_KEY, COMPONENT_DATA_KEY, COMPONENT_OVERRIDES_DATA_KEY, COMPONENT_PROPERTY_REFS_DATA_KEY, COMPONENT_SET_DATA_KEY, COMPONENT_SOURCE_DATA_KEY, CONNECTION_LINE_TYPES, CSS_ANIMATION_PROPERTIES, type CanvasAgentCursor, type CanvasAnimationController, type CanvasAnimationControllerOptions, type CanvasAnimationState, CanvasArrangeAction, type CanvasArrangeController, type CanvasArrangeControllerOptions, type CanvasAutoLayoutController, type CanvasAutoLayoutControllerOptions, CanvasClipboardPayload, type CanvasComponentData, type CanvasComponentErrorCode, type CanvasComponentInfo, type CanvasComponentPropertyDef, type CanvasComponentPropertyField, type CanvasComponentPropertyType, type CanvasComponentPropertyValue, type CanvasComponentResult, type CanvasComponentSetData, type CanvasComponentSetInfo, type CanvasComponentSyncOptions, type CanvasComponentsController, type CanvasComponentsControllerOptions, type CanvasConnectionLineType, type CanvasDrawController, type CanvasDrawControllerOptions, CanvasEdge, CanvasGradientDef, type CanvasHeightOptions, type CanvasInstanceData, type CanvasInstanceInfo, type CanvasInstancePropertyInfo, CanvasLayoutOptions, CanvasNode, CanvasNodeStyle, CanvasNodeUpdate, type CanvasScene, type CanvasScenesOptions, type CanvasScenesState, CanvasScenesStore, type CanvasTokenBindingInfo, type CanvasTokenOptions, type CanvasTokenProperty, type CanvasViewport, type CardInspectionZone, Clock, type CombineShapeNodesOptions, type CombineShapeNodesRefusal, type CombineShapeNodesResult, type ConnectorSnap, type ConnectorSnapOptions, type ConnectorSnapTarget, type CreateCanvasComponentOptions, type CreateCanvasInstanceOptions, type CssAnimationExport, type CssExportOptions, type CssPropertyAnimation, type CubicSegment, type CurvedPathOptions, DEFAULT_CURSOR_INACTIVITY_MS, DEFAULT_DIAGRAM_NODE_HEIGHT, DEFAULT_DIAGRAM_NODE_WIDTH, DEFAULT_NODE_HEIGHT, DEFAULT_NODE_WIDTH, DEFAULT_PLACEMENT_GAP, DIAGRAM_RASTER_MAX_SIZE, DIAGRAM_SVG_DARK_THEME, DIAGRAM_SVG_LIGHT_THEME, type DiagramBounds, type DiagramCanvasHeightOptions, type DiagramLayout, type DiagramLayoutOptions, type DiagramSize, DiagramStream, type DiagramStreamResult, type DiagramSvg, type DiagramSvgOptions, type DiagramSvgTheme, DirectionalDisplacementOptions, DistributeAxis, DistributeMode, DistributeNodesOptions, type DownloadDiagramPngOptions, type EvaluateAnimationOptions, FanOutTrajectoryOptions, type FitCubicsOptions, type FitPathDataOptions, type FitViewportOptions, type FreehandDrawOptions, type FreehandStroke, type FreehandStrokeStyle, type FreehandTool, type GuideIndex, type GuideLine, type HatchOptions, INSTANCE_DATA_KEY, IncrementalLayoutOptions, type KeyframeDragState, type KeyframePatch, type KeyframeRangeOptions, type KeyframeRef, type KeyframeSnap, MAX_KEYFRAME_REFS, MERMAID_SHAPE_PAINT, MatchSizeOptions, type MeasureGuide, type MeasureSelectionOptions, type MeasureSelectionResult, type MermaidCanvas, type MermaidCanvasOptions, type MermaidEdgeData, type MermaidFlowEdge, type MermaidFlowNode, type MermaidFlowOptions, type MermaidGroupData, type MermaidMovesOptions, type MermaidNodeData, type MermaidShapePaint, type MermaidShapePath, type MoveKeyframesResult, type MultiNodeTransitionOptions, type NodeAnimation, NodeRectOptions, NodeTransition, type OffsetShapeNodesOptions, type OutlineShapeStrokesOptions, PlaceBesideOptions, Point, PolygonFillRule, PolygonRing, Position, type PositionChangeLike, RESIZE_HANDLES, type RasterImage, type RasterizeSvgOptions, type RecordAnimationOptions, Rect, ReflowDisplacementOptions, type ResizeHandle, SHAPE_DATA_KEY, SHAPE_NODE_TYPE, SHAPE_OPERATIONS, type SampleAnimationOptions, type ScaleKeyframesOptions, type SerializedCanvasScenes, type SetCanvasVariantPropertiesOptions, type SetKeyframeOptions, ShapeDescription, type ShapeNodePolygonOptions, type ShapeOperation, type ShapePathEditOperation, type ShapePathEditRefusal, type ShapePathEditResult, ShapeSize, Side, SizeDimension, type SnapGuidesOptions, type SnapNodeDragOptions, type SnapNodeDragResult, type SnapNodeResizeOptions, type SnapNodeResizeResult, type SnapResizeOptions, type SnapResizeResult, type SnapResult, StreamingLayoutManager, type StreamingLayoutManagerOptions, StrokeCap, StrokeJoin, type StrokeToShapeNodeOptions, TOKEN_BINDINGS_DATA_KEY, TOKEN_MODES_DATA_KEY, type TimelineKeyframe, type TimelineRow, type TimelineRowsOptions, TrajectoryFunction, type WebAnimationSpec, XYPosition, ZOrderOperation, addCanvasVariant, addKeyframesAtTime, animateNode, applyAnimation, applyAnimationOverrides, applyConstraints, applyShapeCombination, applyShapeReplacement, autoLayoutDiagram, bindCanvasComponentProperty, bindCanvasToken, blendDiagramLayout, blendLayout, boundsOf, calculateCursorArrowRotation, calculateCurvedPath, calculateDagreReflowDisplacement, calculateDirectionalDisplacement, canCombineShapeNodes, canOffsetShapeNodes, canOutlineShapeNodeStrokes, canvasHeight, centerNodes, centre, clampAnimationValue, clampLayoutSize, collectDescendantIds, combineCanvasComponentsAsVariants, combineShapeNodes, computeNodesBoundingBox, computeSnapGuides, connectedDiagramOnly, connectedOnly, copyKeyframes, createBezierTrajectory, createCanvasAnimationController, createCanvasArrangeController, createCanvasAutoLayoutController, createCanvasComponent, createCanvasComponentsController, createCanvasDrawController, createCanvasInstance, createCanvasScenesStore, createDefaultStrokeStyle, createFanOutTrajectory, createGuideIndex, createNodeGuideIndex, cubicPointAt, cubicsToPathData, defaultEasing, deleteKeyframes, detachCanvasInstance, detachTokenBindings, diagramCanvasHeight, diagramFileName, diagramGroupSize, diagramImageSize, diagramLayoutBounds, diffOverrideGroups, downloadDiagramPng, easeDiagramTween, ensureDiagramLayout, ensureLayout, estimateCanvasHeight, estimateDiagramCanvasHeight, estimateDiagramNodeSize, estimateNodeSize, evaluateAnimation, exportCssAnimation, findConnectorSnap, findStrokesAtPoint, findVariant, fitCubicRun, fitCubicWithTangents, fitCubics, fitFreehandPath, fitPathData, fitViewportToNodes, fitViewportToRect, flowSide, formatAgentCursorName, formatAnimationTime, formatVariantName, getAgentCardAnchor, getAnimatableProperty, getAnimatedProperties, getAnimatedValue, getAnimationDuration, getAnimationTrack, getAutoLayout, getAutoLayoutGrid, getAutoLayoutInsertTarget, getBindableTokenProperties, getCanvasComponentDragId, getCanvasTokenProperty, getCenteredNodePosition, getChildLayout, getComponentData, getComponentInstances, getComponentPropertyDefs, getComponentPropertyRefs, getComponentSourceId, getCssPropertyAnimations, getCursorTransitionDuration, getDefaultVariant, getEffectiveTokenModes, getFlowChildren, getInstanceData, getInstanceProperties, getInstanceStatus, getKeyframeTimes, getLayerName, getLayoutParent, getLayoutSizing, getLayoutedNodes, getNaturalMovementTiming, getNextVariantValues, getNodeAnimation, getNodeOverrides, getNodeShape, getNodeTokenBindings, getNodeTokenModes, getOwningComponent, getOwningInstance, getResizingNodeRect, getRootInstance, getTimelineRows, getTimelineTicks, getTokenPropertyScope, getTokensForProperty, getVariantConflicts, getVariantOptions, getVariantSet, getVariantValues, handlePoint, hasVisibleStroke, hashString, hatchPath, inferResizeHandle, inspectCanvasInstance, inspectNodeTokens, isAgentCursor, isAutoLayoutFrame, isCanvasComponent, isCanvasComponentSet, isCanvasInstance, isCssExportExact, isEventFromTextInput, isInsideInstance, isKeyframeSelected, isMeasureModifierHeld, isNodeAnimated, isShapeNode, isStraightCubic, isValidCanvasEdge, isValidCanvasNode, isValidCanvasScene, isValidUrl, layoutAll, layoutBounds, layoutFrame, layoutUp, layoutUpMany, linearPositionTrajectory, linearTrajectory, listCanvasComponents, makeSizingCoherent, measureBetween, measureLabel, measureSelection, measureToLine, mergeNodeUpdates, mermaidEdgeDash, mermaidEdgeMarker, mermaidEdgeWidth, mermaidFlowEdges, mermaidFlowNodes, mermaidLabelLines, mermaidMarkerId, mermaidMovesFromCanvas, mermaidNodeMembers, mermaidNodePaint, mermaidShapePaths, mermaidThumbnailSvg, mermaidToCanvas, mermaidToSvg, moveKeyframes, moveLayoutChild, nearestHandlePositions, offsetShapeNodes, oppositePosition, outlineShapeNodeStrokes, overlaps, parseCanvasClipboardData, parseCanvasScenes, parseKeyframeClipboard, parseMermaidStyles, parseNodeStyleDeclarations, parseVariantName, pasteKeyframes, placeBeside, playWebAnimations, positionToSide, pruneCanvasTokenModes, pushCanvasInstanceOverrides, rasterSize, rasterizeSvg, readAnimatableValue, readNodeStyleProperty, readOverrideGroup, recordAnimationChanges, relayoutUpdates, remapPastedNodes, removeCanvasVariant, removeTrack, renameCanvasVariantProperty, renameCanvasVariantValue, repositionNodesTo, resetCanvasInstanceOverrides, resizeHandleAxes, resolveCanvasTokens, resolveMermaidStyles, resolvePadding, restoreCanvasMainComponent, revertShapeCombination, runMultiNodeTransition, sampleAnimationFrames, scaleKeyframes, serializeCanvasNodes, setCanvasComponentProperty, setCanvasInstanceProperties, setCanvasTokenMode, setCanvasVariantProperties, setKeyframe, setKeyframeEasing, setMotionPath, setTrackEnabled, shapeNodeToBezierPath, shapeNodeToPolygon, shapeToBezierPath, sideToPosition, snapKeyframeDelta, snapNodeDrag, snapNodeResize, snapResize, snapTimeToFrame, snapToGrid, streamedDiagramText, streamlinePoints, strokeBoundingBox, strokePointsToPathData, strokeToShapeNode, swapCanvasInstance, syncAllCanvasInstances, syncCanvasComponents, syncCanvasInstance, timeToX, toWebAnimations, updateKeyframe, withNodeAnimation, withStyleOpacity, wouldCreateComponentCycle, writeNodeStyleProperty, writeOverrideGroup, xToTime };