@pixerate/editor 0.126.0 → 0.128.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 (125) hide show
  1. package/dist/agent/index.cjs +2 -2
  2. package/dist/agent/index.d.cts +3 -3
  3. package/dist/agent/index.d.ts +3 -3
  4. package/dist/agent/index.js +1 -1
  5. package/dist/animation/index.d.cts +2 -3
  6. package/dist/animation/index.d.ts +2 -3
  7. package/dist/animation-editor/index.cjs +63 -63
  8. package/dist/animation-editor/index.cjs.map +1 -1
  9. package/dist/animation-editor/index.d.cts +7 -9
  10. package/dist/animation-editor/index.d.ts +7 -9
  11. package/dist/animation-editor/index.js +10 -10
  12. package/dist/{arrange-BlfgJ_wt.d.ts → arrange-BUREmgD9.d.ts} +1 -1
  13. package/dist/{arrange-CD6Gh-pd.d.cts → arrange-CKXK_hf7.d.cts} +1 -1
  14. package/dist/{bezier-CWv6LQal.d.ts → bezier-CvgQiYRg.d.cts} +23 -3
  15. package/dist/{bezier-CBzKKDjl.d.cts → bezier-DP4NnJp3.d.ts} +23 -3
  16. package/dist/{brushTypes-IG7ZZjIN.d.cts → brushTypes-C7N3EBK7.d.cts} +56 -1
  17. package/dist/{brushTypes-IG7ZZjIN.d.ts → brushTypes-C7N3EBK7.d.ts} +56 -1
  18. package/dist/{brushstrokeRender-EELTV7U4.cjs → brushstrokeRender-JNHVEUFG.cjs} +29 -10
  19. package/dist/brushstrokeRender-JNHVEUFG.cjs.map +1 -0
  20. package/dist/{brushstrokeRender-LRV7GXGD.js → brushstrokeRender-SII6MG4R.js} +25 -6
  21. package/dist/brushstrokeRender-SII6MG4R.js.map +1 -0
  22. package/dist/{builtins-DMIsnNst.d.cts → builtins-Cc-bH-3U.d.cts} +3 -2
  23. package/dist/{builtins-B5-ipm5u.d.ts → builtins-ZU1GJnUA.d.ts} +3 -2
  24. package/dist/canvas/index.cjs +435 -38
  25. package/dist/canvas/index.cjs.map +1 -1
  26. package/dist/canvas/index.d.cts +206 -16
  27. package/dist/canvas/index.d.ts +206 -16
  28. package/dist/canvas/index.js +408 -11
  29. package/dist/canvas/index.js.map +1 -1
  30. package/dist/{chunk-MPQAO33O.js → chunk-A6KHMKI4.js} +3 -3
  31. package/dist/{chunk-V5YGPRCZ.cjs → chunk-BEGEWQHD.cjs} +41 -41
  32. package/dist/{chunk-V5YGPRCZ.cjs.map → chunk-BEGEWQHD.cjs.map} +1 -1
  33. package/dist/{chunk-N3FVUOZD.cjs → chunk-BJTCSLF6.cjs} +7 -7
  34. package/dist/{chunk-N3FVUOZD.cjs.map → chunk-BJTCSLF6.cjs.map} +1 -1
  35. package/dist/{chunk-7LQO6OHH.cjs → chunk-DDSO4HS7.cjs} +9 -5
  36. package/dist/chunk-DDSO4HS7.cjs.map +1 -0
  37. package/dist/{chunk-AKU2KQ47.cjs → chunk-DFSZO2B5.cjs} +70 -3
  38. package/dist/chunk-DFSZO2B5.cjs.map +1 -0
  39. package/dist/{chunk-WUDPFWAN.js → chunk-F7Q2NE2Y.js} +3 -3
  40. package/dist/{chunk-GUZ47CJM.cjs → chunk-IZ4WRXZA.cjs} +1 -1
  41. package/dist/{chunk-GUZ47CJM.cjs.map → chunk-IZ4WRXZA.cjs.map} +1 -1
  42. package/dist/{chunk-GLWZXQ4Q.js → chunk-KHNZ6MOU.js} +1 -1
  43. package/dist/chunk-KHNZ6MOU.js.map +1 -0
  44. package/dist/{chunk-GCJWMEYW.cjs → chunk-KSJLDRHK.cjs} +46 -46
  45. package/dist/{chunk-GCJWMEYW.cjs.map → chunk-KSJLDRHK.cjs.map} +1 -1
  46. package/dist/{chunk-2SDGZAJR.js → chunk-LSXXAJG3.js} +70 -3
  47. package/dist/chunk-LSXXAJG3.js.map +1 -0
  48. package/dist/{chunk-QQKTOA4U.cjs → chunk-ORE334I6.cjs} +132 -132
  49. package/dist/{chunk-QQKTOA4U.cjs.map → chunk-ORE334I6.cjs.map} +1 -1
  50. package/dist/{chunk-X6KTSFAE.js → chunk-Q4NBEVV5.js} +2 -2
  51. package/dist/{chunk-FPRIUR4T.js → chunk-ROZFX4QI.js} +3 -3
  52. package/dist/{chunk-J67OLQUQ.js → chunk-SVYE5HIM.js} +7 -3
  53. package/dist/chunk-SVYE5HIM.js.map +1 -0
  54. package/dist/{chunk-O5RVCDEC.cjs → chunk-XLUYXUBD.cjs} +88 -88
  55. package/dist/{chunk-O5RVCDEC.cjs.map → chunk-XLUYXUBD.cjs.map} +1 -1
  56. package/dist/{chunk-FG274FYT.js → chunk-YGJIER2R.js} +2 -2
  57. package/dist/commands/index.cjs +2 -2
  58. package/dist/commands/index.d.cts +3 -3
  59. package/dist/commands/index.d.ts +3 -3
  60. package/dist/commands/index.js +1 -1
  61. package/dist/effects/index.d.cts +6 -38
  62. package/dist/effects/index.d.ts +6 -38
  63. package/dist/evaluate-BbCeF6pt.d.ts +114 -0
  64. package/dist/evaluate-BsxYieLN.d.cts +114 -0
  65. package/dist/{export-Bp7ji2r4.d.cts → export-BkYQvV56.d.cts} +4 -4
  66. package/dist/{export-DVl4fWy5.d.cts → export-Cbr9IqpJ.d.cts} +1 -1
  67. package/dist/{export-C1s4eolZ.d.ts → export-ClPKUB-v.d.ts} +1 -1
  68. package/dist/{export-DAyPY94f.d.ts → export-DHrFJ8r_.d.ts} +4 -4
  69. package/dist/{helpers-i95Ob6Vi.d.cts → helpers-C5aAd44p.d.cts} +67 -4
  70. package/dist/{helpers-BBLlekuM.d.ts → helpers-CPWcK504.d.ts} +67 -4
  71. package/dist/image-editor/index.cjs +606 -606
  72. package/dist/image-editor/index.cjs.map +1 -1
  73. package/dist/image-editor/index.d.cts +12 -14
  74. package/dist/image-editor/index.d.ts +12 -14
  75. package/dist/image-editor/index.js +4 -4
  76. package/dist/{opentype-D80AVmMu.d.cts → opentype-BOewaGQx.d.cts} +1 -1
  77. package/dist/{opentype-14PDI5D2.d.ts → opentype-sQrF3Ry1.d.ts} +1 -1
  78. package/dist/paint/index.d.cts +2 -2
  79. package/dist/paint/index.d.ts +2 -2
  80. package/dist/paint-editor/index.cjs +9 -9
  81. package/dist/paint-editor/index.cjs.map +1 -1
  82. package/dist/paint-editor/index.d.cts +9 -11
  83. package/dist/paint-editor/index.d.ts +9 -11
  84. package/dist/paint-editor/index.js +4 -4
  85. package/dist/{pathfinder-DjISxkUv.d.ts → pathfinder-BwJx0_zM.d.ts} +2 -2
  86. package/dist/{pathfinder-C0UoFypx.d.cts → pathfinder-CnkW7zLI.d.cts} +2 -2
  87. package/dist/{player-cGLrngL_.d.ts → player-BK2kKbfd.d.ts} +1 -1
  88. package/dist/{player-CBtEoU2x.d.cts → player-CmbY3218.d.cts} +1 -1
  89. package/dist/pool-C7GtrL34.d.cts +34 -0
  90. package/dist/pool-CTrtciaN.d.ts +34 -0
  91. package/dist/{rand-CfinE-1c.d.cts → rand-DTXAssW1.d.cts} +4 -4
  92. package/dist/{rand-DtazXGOB.d.ts → rand-pQQ2sJTk.d.ts} +4 -4
  93. package/dist/{svg-DJKriJ4A.d.ts → svg-C4LlFnEw.d.cts} +2 -3
  94. package/dist/{svg-BkRL-fZJ.d.cts → svg-CUzZa0EO.d.ts} +2 -3
  95. package/dist/{tools-CM8Oe8F3.d.ts → tools-AugT22z3.d.ts} +1 -1
  96. package/dist/{tools-DZCv2kX1.d.cts → tools-BpCmUNxb.d.cts} +1 -1
  97. package/dist/vector/index.cjs +918 -918
  98. package/dist/vector/index.cjs.map +1 -1
  99. package/dist/vector/index.d.cts +11 -13
  100. package/dist/vector/index.d.ts +11 -13
  101. package/dist/vector/index.js +11 -11
  102. package/dist/video-editor/index.d.cts +6 -8
  103. package/dist/video-editor/index.d.ts +6 -8
  104. package/dist/{warp-k_PdtXOG.d.ts → warp-CIsO617e.d.ts} +1 -1
  105. package/dist/{warp-CH9MM435.d.cts → warp-D62N_5VK.d.cts} +1 -1
  106. package/package.json +1 -1
  107. package/skills/pixerate-canvas/SKILL.md +30 -2
  108. package/dist/behavior-Ymbld6jL.d.cts +0 -60
  109. package/dist/behavior-Ymbld6jL.d.ts +0 -60
  110. package/dist/brushstrokeRender-EELTV7U4.cjs.map +0 -1
  111. package/dist/brushstrokeRender-LRV7GXGD.js.map +0 -1
  112. package/dist/chunk-2SDGZAJR.js.map +0 -1
  113. package/dist/chunk-7LQO6OHH.cjs.map +0 -1
  114. package/dist/chunk-AKU2KQ47.cjs.map +0 -1
  115. package/dist/chunk-GLWZXQ4Q.js.map +0 -1
  116. package/dist/chunk-J67OLQUQ.js.map +0 -1
  117. package/dist/evaluate-2S3vSPLy.d.cts +0 -55
  118. package/dist/evaluate-CfmT6xA3.d.ts +0 -55
  119. package/dist/gradient-KDfCvhuj.d.cts +0 -66
  120. package/dist/gradient-KDfCvhuj.d.ts +0 -66
  121. /package/dist/{chunk-MPQAO33O.js.map → chunk-A6KHMKI4.js.map} +0 -0
  122. /package/dist/{chunk-WUDPFWAN.js.map → chunk-F7Q2NE2Y.js.map} +0 -0
  123. /package/dist/{chunk-X6KTSFAE.js.map → chunk-Q4NBEVV5.js.map} +0 -0
  124. /package/dist/{chunk-FPRIUR4T.js.map → chunk-ROZFX4QI.js.map} +0 -0
  125. /package/dist/{chunk-FG274FYT.js.map → chunk-YGJIER2R.js.map} +0 -0
@@ -1,29 +1,31 @@
1
- import { R as Rect, b as CanvasNode, X as XYPosition, e as CanvasEdge, I as IncrementalLayoutOptions, S as Side, f as CanvasLayoutOptions, g as PlaceBesideOptions, T as TrajectoryFunction, F as FanOutTrajectoryOptions, N as NodeTransition, c as CanvasNodeStyle, h as ReflowDisplacementOptions, D as DirectionalDisplacementOptions, i as CanvasClipboardPayload, j as Position, P as Point, C as CanvasBrush, d as CanvasBrushstroke, a as CanvasBrushPreset } from '../brushTypes-IG7ZZjIN.js';
2
- export { k as CanvasBrushSettings, l as CanvasDockingCallbacks, m as CollapseNodeOptions, n as DisplacementDirection, o as DockStrategy, E as ExplodeNodeOptions, p as ExplosionSnapshot, G as GraphDifferences, q as TrajectoryPoint } from '../brushTypes-IG7ZZjIN.js';
3
- import { C as Clock, b as AnimationPlayerState, A as AnimationPlayer } from '../player-cGLrngL_.js';
4
- export { a as AnimationPlayerOptions, M as ManualClock, c as createAnimationPlayer, p as pageHidden, r as realClock } from '../player-cGLrngL_.js';
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-BlfgJ_wt.js';
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-BlfgJ_wt.js';
1
+ import { R as Rect, c as CanvasNode, X as XYPosition, f as CanvasEdge, I as IncrementalLayoutOptions, S as Side, g as CanvasLayoutOptions, h as PlaceBesideOptions, T as TrajectoryFunction, F as FanOutTrajectoryOptions, N as NodeTransition, d as CanvasNodeStyle, i as ReflowDisplacementOptions, D as DirectionalDisplacementOptions, j as CanvasClipboardPayload, k as Position, P as Point, C as CanvasBrush, a as CanvasBrushPaint, e as CanvasBrushstroke, b as CanvasBrushPreset } from '../brushTypes-C7N3EBK7.js';
2
+ export { l as CanvasBrushPaintMapping, m as CanvasBrushPaintStop, n as CanvasBrushSettings, o as CanvasDockingCallbacks, p as CollapseNodeOptions, q as DisplacementDirection, r as DockStrategy, E as ExplodeNodeOptions, s as ExplosionSnapshot, G as GraphDifferences, t as TrajectoryPoint } from '../brushTypes-C7N3EBK7.js';
3
+ import { C as Clock, b as AnimationPlayerState, A as AnimationPlayer } from '../player-BK2kKbfd.js';
4
+ export { a as AnimationPlayerOptions, M as ManualClock, c as createAnimationPlayer, p as pageHidden, r as realClock } from '../player-BK2kKbfd.js';
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-BUREmgD9.js';
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-BUREmgD9.js';
7
7
  import { C as Command, M as MergedExecutionOptions } from '../types-DsiXGmjo.js';
8
- import { S as ShapeDescription, B as BezierPath, b as PolygonFillRule, e as PolygonRing, f as ShapeSize, a as BezierPathInput, g as PathShape } from '../bezier-CWv6LQal.js';
9
- export { A as AffineMatrix, h as BezierCommand, d as BezierContour, i as BezierPathToSvgOptions, c as BezierSegment, E as EllipseShape, F as FlattenOptions, G as GetShapeRenderDataOptions, M as MultiPolygon, j as PathCommand, k as PathPointAtLength, P as PolygonBooleanOperation, l as PolygonBooleanOptions, m as PolygonInput, n as PolygonOperand, o as PolygonPiece, p as PolygonToPathOptions, q as PolygonWithHoles, R as RectShape, r as RegularPolygonShape, s as SHAPE_KINDS, t as ShapeKind, u as ShapePaint, v as ShapeRenderData, w as StarShape, x as arcToCubics, y as bezierPathBounds, z as bezierPathLength, C as bezierPathPointAtLength, D as bezierPathSignedArea, H as bezierPathToSvg, I as closeContour, J as contourSignedArea, K as contoursToPath, L as countPathSegments, N as distanceToBezierPath, O as dividePolygons, Q as flattenSvgPath, T as formatNumber, U as getShapeRenderData, V as getShapeSvg, W as intersectPolygons, X as isShapeDescription, Y as multiPolygonArea, Z as multiPolygonBounds, _ as parseSvgPath, $ as pathToContours, a0 as pointInBezierPath, a1 as pointInMultiPolygon, a2 as pointInRings, a3 as polygonArea, a4 as polygonBoolean, a5 as polygonToSvgPath, a6 as ringSignedArea, a7 as segmentBounds, a8 as segmentCurvature, a9 as segmentDerivative, aa as segmentExtrema, ab as segmentLength, ac as segmentNearest, ad as segmentParamAtLength, ae as segmentPoint, af as segmentTangent, ag as shapeToPolygon, ah as simplifyRing, ai as splitSegment, aj as subSegment, ak as subtractPolygons, al as toBezierPath, am as transformBezierPath, an as trimSegments, ao as unionPolygons, ap as windingNumber, aq as xorPolygons } from '../bezier-CWv6LQal.js';
10
- import { S as StrokeJoin, a as StrokeCap } from '../pathfinder-DjISxkUv.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-DjISxkUv.js';
8
+ import { S as ShapeDescription, B as BezierPath, b as PolygonFillRule, e as PolygonRing, f as ShapeSize, a as BezierPathInput, g as PathShape, C as CanvasShapeEffect } from '../bezier-DP4NnJp3.js';
9
+ export { A as AffineMatrix, h as BezierCommand, d as BezierContour, i as BezierPathToSvgOptions, c as BezierSegment, E as EllipseShape, F as FlattenOptions, G as GetShapeRenderDataOptions, M as MultiPolygon, j as PathCommand, k as PathPointAtLength, P as PolygonBooleanOperation, l as PolygonBooleanOptions, m as PolygonInput, n as PolygonOperand, o as PolygonPiece, p as PolygonToPathOptions, q as PolygonWithHoles, R as RectShape, r as RegularPolygonShape, s as SHAPE_KINDS, t as ShapeKind, u as ShapePaint, v as ShapeRenderData, w as StarShape, x as arcToCubics, y as bezierPathBounds, z as bezierPathLength, D as bezierPathPointAtLength, H as bezierPathSignedArea, I as bezierPathToSvg, J as closeContour, K as contourSignedArea, L as contoursToPath, N as countPathSegments, O as distanceToBezierPath, Q as dividePolygons, T as flattenSvgPath, U as formatNumber, V as getShapeRenderData, W as getShapeSvg, X as intersectPolygons, Y as isShapeDescription, Z as multiPolygonArea, _ as multiPolygonBounds, $ as parseSvgPath, a0 as pathToContours, a1 as pointInBezierPath, a2 as pointInMultiPolygon, a3 as pointInRings, a4 as polygonArea, a5 as polygonBoolean, a6 as polygonToSvgPath, a7 as ringSignedArea, a8 as segmentBounds, a9 as segmentCurvature, aa as segmentDerivative, ab as segmentExtrema, ac as segmentLength, ad as segmentNearest, ae as segmentParamAtLength, af as segmentPoint, ag as segmentTangent, ah as shapeToPolygon, ai as simplifyRing, aj as splitSegment, ak as subSegment, al as subtractPolygons, am as toBezierPath, an as transformBezierPath, ao as trimSegments, ap as unionPolygons, aq as windingNumber, ar as xorPolygons } from '../bezier-DP4NnJp3.js';
10
+ import { S as StrokeJoin, a as StrokeCap } from '../pathfinder-BwJx0_zM.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-BwJx0_zM.js';
12
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';
13
13
  import { b as AnimationEasing } from '../easing-lM0Xo9Ni.js';
14
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 SPRING_PRESETS, e as SpringEasing, f as cubicBezierAt, g as easingFromInfluence, h as easingLabel, i as easingToCss, j as elasticAt, k as evaluateEasing, l as isAnimationEasing, p as parseCssEasing, r as resolveEasing, m as reverseCubicBezier, s as springAt, n as springSettleMs } from '../easing-lM0Xo9Ni.js';
15
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 AnimationValueType, d as AnimationValue, c as AnimationTrack, b as AnimationLoopMode } from '../evaluate-CfmT6xA3.js';
17
- export { A as ANIMATION_TIME_EPSILON, a as AnimationKeyframe, f as evaluateTrack, i as interpolateAnimationValue, g as isAnimationKeyframe, n as normalizeKeyframes, w as wrapAnimationTime } from '../evaluate-CfmT6xA3.js';
18
- import { C as CanvasGradientDef } from '../gradient-KDfCvhuj.js';
19
- export { a as CANVAS_GRADIENT_PRESETS, b as CanvasLinearGradient, c as CanvasRadialGradient, G as GradientStop, P as PIXERATE_BRAND_GRADIENT, S as SvgGradientDef, d as SvgGradientStop, e as angleToSvgLinearCoords, g as gradientToSvgDef, i as isCanvasGradient, p as parseCssGradient, r as resolveCanvasGradient } from '../gradient-KDfCvhuj.js';
16
+ import { e as AnimationValueType, d as AnimationValue, c as AnimationTrack, b as AnimationLoopMode } from '../evaluate-BbCeF6pt.js';
17
+ export { A as ANIMATION_TIME_EPSILON, a as AnimationKeyframe, h as evaluateTrack, j as interpolateAnimationValue, k as isAnimationKeyframe, n as normalizeKeyframes, w as wrapAnimationTime } from '../evaluate-BbCeF6pt.js';
18
+ import { C as CanvasGradientDef, E as EffectProvider, v as EffectsSlot, e as EffectValue, b as EffectPixels } from '../helpers-CPWcK504.js';
19
+ export { cM as CANVAS_GRADIENT_PRESETS, cN as CanvasLinearGradient, cO as CanvasRadialGradient, cP as GradientStop, cQ as PIXERATE_BRAND_GRADIENT, S as SvgGradientDef, cR as SvgGradientStop, cS as angleToSvgLinearCoords, cT as gradientToSvgDef, cU as isCanvasGradient, cV as parseCssGradient, cW as resolveCanvasGradient } from '../helpers-CPWcK504.js';
20
20
  import { P as Point$1, G as GraphNode, D as DiagramFamily, a as DiagramGraph, b as DiagramMeta, c as GraphGroup, d as GraphEdge, E as EdgePattern, A as ArrowHead, M as MermaidDocument, e as EditOp } from '../types-DYkjhzdz.js';
21
21
  import { a as CapturedImage, g as CaptureToolProviderOptions, b as CaptureSurface } from '../capture-wwNGaW05.js';
22
22
  import { R as RasterizeElementOptions } from '../dom-capture-7Wvf6Tyg.js';
23
23
  import { a as AgentToolProvider } from '../registry-D-4fit9C.js';
24
+ import { E as EffectRendererPool } from '../pool-CTrtciaN.js';
24
25
  export { b as brushstrokeScaleBucket } from '../brushstroke-scale-B6XAdPSY.js';
25
26
  import { n as ChartSpec } from '../types-BRp-6zkY.js';
26
27
  import '../schema-Di0CS6Pe.js';
28
+ import '../types-CwMPoRMU.js';
27
29
 
28
30
  declare const DEFAULT_NODE_WIDTH = 200;
29
31
  declare const DEFAULT_NODE_HEIGHT = 60;
@@ -480,6 +482,22 @@ interface CanvasScene {
480
482
  viewport: CanvasViewport;
481
483
  /** Optional nodes the scene is about, e.g. to re-fit the scene after they move. */
482
484
  nodeIds?: string[];
485
+ /**
486
+ * A provider transition effect (see `@pixerate/editor/effects`) played when the canvas moves
487
+ * to this scene. Kept, and ignored, without an effects provider.
488
+ */
489
+ transition?: CanvasSceneTransition;
490
+ }
491
+ /** A transition effect into a scene (see `CanvasScene.transition`). */
492
+ interface CanvasSceneTransition {
493
+ /** The provider's transition effect id. */
494
+ effect: string;
495
+ provider?: string;
496
+ name?: string;
497
+ /** Control values (over the effect's defaults). */
498
+ values: Record<string, number | string | boolean | readonly number[]>;
499
+ /** Length in ms (default 600). */
500
+ duration?: number;
483
501
  }
484
502
  interface CanvasScenesState {
485
503
  scenes: readonly CanvasScene[];
@@ -2744,6 +2762,11 @@ interface FreehandStrokeStyle {
2744
2762
  * paths, exactly as before.
2745
2763
  */
2746
2764
  brush?: CanvasBrush;
2765
+ /**
2766
+ * Gradient paint (or one colour) for a brushed stroke instead of `color`, sampled dab by dab
2767
+ * along the path; `color` still gives the alpha and fills `paint` stops. Only with `brush`.
2768
+ */
2769
+ paint?: CanvasBrushPaint;
2747
2770
  }
2748
2771
  /** Pen data for one freehand point (Pointer Events: pressure 0..1, tilt in degrees). */
2749
2772
  interface FreehandPenSample {
@@ -2865,6 +2888,8 @@ interface CanvasBrushstrokeRenderer {
2865
2888
  listCanvasBrushes(): CanvasBrushPreset[];
2866
2889
  /** Throws for an unknown or non-dry brush; the result is the paint engine's brush. */
2867
2890
  resolveCanvasBrush(brush: CanvasBrush, width: number): unknown;
2891
+ /** Throws for paint that is not a colour or gradient paint a canvas stroke can use; the result is the paint engine's `PaintSource`. */
2892
+ resolveCanvasPaint(paint: unknown): unknown;
2868
2893
  renderShapeBrushstrokeNow(shape: BrushedPathShape, scale: number): CanvasBrushstrokeImage | null;
2869
2894
  brushedShapeSvgNow(shape: BrushedPathShape, size: ShapeSize, scale: number): string;
2870
2895
  }
@@ -2880,6 +2905,11 @@ declare function listCanvasBrushes(): Promise<CanvasBrushPreset[]>;
2880
2905
  * an object throw an error saying which presets can be used.
2881
2906
  */
2882
2907
  declare function validateCanvasBrush(brush: CanvasBrush): Promise<void>;
2908
+ /**
2909
+ * Checks a brushed stroke's `paint` (a colour or gradient paint): bad stops, an unknown mapping,
2910
+ * or a mapping that needs timed samples (`velocity`, `time`) throw an error saying what to use.
2911
+ */
2912
+ declare function validateCanvasBrushPaint(paint: CanvasBrushPaint): Promise<void>;
2883
2913
  interface RenderShapeBrushstrokeOptions {
2884
2914
  /** Image pixels per path unit; pass `brushstrokeScaleBucket(zoom × node scale, devicePixelRatio)` (default 1). */
2885
2915
  scale?: number;
@@ -2907,7 +2937,7 @@ interface DrawStrokeInput {
2907
2937
  points: readonly Point[];
2908
2938
  /** `pen` (default) or `highlighter`: picks the default style. */
2909
2939
  tool?: 'pen' | 'highlighter';
2910
- /** Style over the tool's defaults (colour, width, opacity, cap, join, brush). */
2940
+ /** Style over the tool's defaults (colour, width, opacity, cap, join, brush, paint). */
2911
2941
  style?: Partial<FreehandStrokeStyle>;
2912
2942
  /** Pressure 0..1 spread evenly along the stroke (one value is constant). Brushed strokes only. */
2913
2943
  pressure?: readonly number[];
@@ -3845,4 +3875,164 @@ interface CanvasCaptureToolProviderOptions<TNode extends CanvasNode = CanvasNode
3845
3875
  */
3846
3876
  declare function createCanvasCaptureToolProvider<TNode extends CanvasNode = CanvasNode>(options: CanvasCaptureToolProviderOptions<TNode>): AgentToolProvider;
3847
3877
 
3848
- 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, BUILTIN_FAMILY_SCENES, BezierPath, BezierPathInput, type BrushedPathShape, CANVAS_CAPTURE_CHROME_SELECTORS, CANVAS_CAPTURE_OVERLAY_SELECTORS, CANVAS_CAPTURE_VIEWPORT_SELECTOR, 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, CSS_VARIABLE_DIAGRAM_SCENE_THEME, type CanvasAgentCursor, type CanvasAnimationController, type CanvasAnimationControllerOptions, type CanvasAnimationState, CanvasArrangeAction, type CanvasArrangeController, type CanvasArrangeControllerOptions, type CanvasAutoLayoutController, type CanvasAutoLayoutControllerOptions, CanvasBrush, CanvasBrushPreset, CanvasBrushstroke, type CanvasBrushstrokeImage, type CanvasBrushstrokeRenderer, type CanvasCaptureSurfaceOptions, type CanvasCaptureToolProviderOptions, type CanvasCaptureViewport, 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 CanvasDragBounds, type CanvasDragBoundsModifiers, 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_MARKER_IDS, DIAGRAM_RASTER_MAX_SIZE, DIAGRAM_SCENE_DARK_THEME, DIAGRAM_SCENE_LIGHT_THEME, DIAGRAM_SVG_DARK_THEME, DIAGRAM_SVG_LIGHT_THEME, DIAGRAM_TITLE_TARGET, type DiagramBounds, type DiagramCanvasHeightOptions, type DiagramCircleMark, type DiagramLayout, type DiagramLayoutOptions, type DiagramLineMark, type DiagramMark, type DiagramPathMark, type DiagramRectMark, type DiagramScene, type DiagramSceneOptions, type DiagramSceneTheme, type DiagramSize, DiagramStream, type DiagramStreamResult, type DiagramSvg, type DiagramSvgOptions, type DiagramSvgTheme, type DiagramTextMark, DirectionalDisplacementOptions, DistributeAxis, DistributeMode, DistributeNodesOptions, type DownloadDiagramPngOptions, type DrawStrokeInput, type DrawStrokeResult, type EvaluateAnimationOptions, type FamilyScene, type FamilySceneInput, FanOutTrajectoryOptions, type FitCubicsOptions, type FitPathDataOptions, type FitViewportOptions, type FreehandDrawOptions, type FreehandPenSample, type FreehandPointerLike, 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 MermaidSceneOptions, type MermaidShapePaint, type MermaidShapePath, type MoveKeyframesResult, type MultiNodeTransitionOptions, type NodeAnimation, NodeRectOptions, NodeTransition, type OffsetShapeNodesOptions, type OutlineShapeStrokesOptions, PathShape, PlaceBesideOptions, Point, PolygonFillRule, PolygonRing, Position, type PositionChangeLike, RESIZE_HANDLES, type RasterImage, type RasterizeSvgOptions, type RecordAnimationOptions, Rect, ReflowDisplacementOptions, type RenderShapeBrushstrokeOptions, 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, architectureScene, autoLayoutDiagram, bindCanvasComponentProperty, bindCanvasToken, blendDiagramLayout, blendLayout, boundsOf, c4Scene, calculateCursorArrowRotation, calculateCurvedPath, calculateDagreReflowDisplacement, calculateDirectionalDisplacement, canCombineShapeNodes, canOffsetShapeNodes, canOutlineShapeNodeStrokes, canvasHeight, canvasNodeCaptureRect, centerNodes, centre, clampAnimationValue, clampLayoutSize, collectDescendantIds, combineCanvasComponentsAsVariants, combineShapeNodes, computeDragBounds, computeDragBoundsFromPoints, computeNodesBoundingBox, computeSnapGuides, connectedDiagramOnly, connectedOnly, copyKeyframes, createBezierTrajectory, createCanvasAnimationController, createCanvasArrangeController, createCanvasAutoLayoutController, createCanvasCaptureSurface, createCanvasCaptureToolProvider, createCanvasComponent, createCanvasComponentsController, createCanvasDrawController, createCanvasInstance, createCanvasScenesStore, createDefaultStrokeStyle, createFanOutTrajectory, createGuideIndex, createNodeGuideIndex, cubicPointAt, cubicsToPathData, defaultEasing, deleteKeyframes, detachCanvasInstance, detachTokenBindings, diagramCanvasHeight, diagramFileName, diagramGroupSize, diagramImageSize, diagramLayoutBounds, diagramMarksBounds, diagramMarksToSvg, diagramRenameOp, diagramTargetLabel, diagramTextBaseline, diffOverrideGroups, downloadDiagramPng, easeDiagramTween, ensureDiagramLayout, ensureLayout, estimateCanvasHeight, estimateDiagramCanvasHeight, estimateDiagramNodeSize, estimateNodeSize, estimateTextWidth, evaluateAnimation, exportCssAnimation, familySceneFromLayout, findConnectorSnap, findStrokesAtPoint, findVariant, fitCubicRun, fitCubicWithTangents, fitCubics, fitFreehandPath, fitPathData, fitViewportToNodes, fitViewportToRect, flowSide, formatAgentCursorName, formatAnimationTime, formatVariantName, freehandBrushstroke, ganttScene, getAgentCardAnchor, getAnimatableProperty, getAnimatedProperties, getAnimatedValue, getAnimationDuration, getAnimationTrack, getAutoLayout, getAutoLayoutGrid, getAutoLayoutInsertTarget, getBindableTokenProperties, getBrushedShapeSvg, getCanvasComponentDragId, getCanvasTokenProperty, getCenteredNodePosition, getChildLayout, getComponentData, getComponentInstances, getComponentPropertyDefs, getComponentPropertyRefs, getComponentSourceId, getCssPropertyAnimations, getCursorTransitionDuration, getDefaultVariant, getEffectiveTokenModes, getFamilyScene, 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, gitGraphScene, handlePoint, hasFamilyScene, hasVisibleStroke, hashString, hatchPath, inferResizeHandle, inspectCanvasInstance, inspectNodeTokens, isAgentCursor, isAutoLayoutFrame, isBrushedShape, isCanvasComponent, isCanvasComponentSet, isCanvasInstance, isCssExportExact, isEventFromTextInput, isInsideInstance, isKeyframeSelected, isMeasureModifierHeld, isNodeAnimated, isShapeNode, isStraightCubic, isValidCanvasEdge, isValidCanvasNode, isValidCanvasScene, isValidUrl, journeyScene, layoutAll, layoutBounds, layoutFrame, layoutUp, layoutUpMany, linearPositionTrajectory, linearTrajectory, listCanvasBrushes, listCanvasComponents, loadCanvasBrushstrokeRenderer, makeSizingCoherent, measureBetween, measureLabel, measureSelection, measureToLine, mergeNodeUpdates, mermaidEdgeDash, mermaidEdgeMarker, mermaidEdgeWidth, mermaidFlowEdges, mermaidFlowNodes, mermaidLabelLines, mermaidMarkerId, mermaidMovesFromCanvas, mermaidNodeMembers, mermaidNodePaint, mermaidShapePaths, mermaidThumbnailSvg, mermaidToCanvas, mermaidToScene, mermaidToSvg, mindmapScene, moveKeyframes, moveLayoutChild, nearestHandlePositions, offsetShapeNodes, oppositePosition, outlineShapeNodeStrokes, overlaps, parseCanvasClipboardData, parseCanvasScenes, parseKeyframeClipboard, parseMermaidStyles, parseNodeStyleDeclarations, parseVariantName, pasteKeyframes, pathDataToPolyline, pieScene, placeBeside, playWebAnimations, pointerPenSample, positionToSide, profileAlongPolyline, pruneCanvasTokenModes, pushCanvasInstanceOverrides, quadrantScene, radarChartSpec, radarScene, rasterSize, rasterizeSvg, readAnimatableValue, readNodeStyleProperty, readOverrideGroup, recordAnimationChanges, registerFamilyScene, relayoutUpdates, remapPastedNodes, removeCanvasVariant, removeTrack, renameCanvasVariantProperty, renameCanvasVariantValue, renderShapeBrushstroke, repositionNodesTo, resetCanvasInstanceOverrides, resizeHandleAxes, resolveCanvasTokens, resolveMermaidStyles, resolvePadding, restoreCanvasMainComponent, revertShapeCombination, runMultiNodeTransition, sampleAnimationFrames, scaleKeyframes, sceneColor, sequenceScene, 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, timelineScene, toWebAnimations, updateKeyframe, validateCanvasBrush, withNodeAnimation, withStyleOpacity, wouldCreateComponentCycle, writeNodeStyleProperty, writeOverrideGroup, xToTime, xyChartScene, xyChartSpec };
3878
+ /** The uses each place takes. */
3879
+ declare const CANVAS_EFFECT_PLACES: {
3880
+ /** Paints a shape's inside. */
3881
+ readonly fill: readonly ["generator", "interactive"];
3882
+ /** Draws over a node's box. */
3883
+ readonly overlay: readonly ["overlay", "title", "interactive", "generator"];
3884
+ readonly transition: readonly ["transition"];
3885
+ };
3886
+ type CanvasEffectPlace = keyof typeof CANVAS_EFFECT_PLACES;
3887
+ /** The shape effect of a node, if it has one. */
3888
+ declare function canvasNodeEffect(node: CanvasNode): CanvasShapeEffect | undefined;
3889
+ interface CanvasEffectsControllerOptions<TNode extends CanvasNode = CanvasNode> {
3890
+ getNodes: () => TNode[];
3891
+ setNodes: (nodes: TNode[]) => void;
3892
+ /** When set, every change is one undoable command. */
3893
+ history?: {
3894
+ execute(command: Command): void;
3895
+ };
3896
+ /** The Scenes store, for transitions between scenes. */
3897
+ scenes?: CanvasScenesStore;
3898
+ /** An effects provider (optional; set or change it later with `setEffectsProvider`). */
3899
+ effects?: EffectProvider | null;
3900
+ }
3901
+ /** Headless effects for a canvas (see the module comment). */
3902
+ declare function createCanvasEffectsController<TNode extends CanvasNode = CanvasNode>(options: CanvasEffectsControllerOptions<TNode>): {
3903
+ /** The provider slot. */
3904
+ effects: EffectsSlot;
3905
+ readonly effectsProvider: EffectProvider | null;
3906
+ /** Registers (or with `null` removes) the effects provider. */
3907
+ setEffectsProvider(provider: EffectProvider | null): void;
3908
+ /** Registers `provider` and returns a function that removes it again. */
3909
+ useEffects(provider: EffectProvider): () => void;
3910
+ /** The shape nodes that carry effects (or one node's). */
3911
+ list(nodeId?: string): {
3912
+ nodeId: string;
3913
+ effect: CanvasShapeEffect;
3914
+ }[];
3915
+ /**
3916
+ * Draws a provider effect on a shape node: `fill` paints its inside (generators), `overlay`
3917
+ * draws over its box (overlays, titles, interactive effects). Replaces any effect it had. One
3918
+ * undoable step. Returns the effect.
3919
+ */
3920
+ applyNodeEffect(nodeId: string, effect: string, opts?: {
3921
+ mode?: "fill" | "overlay";
3922
+ values?: Record<string, EffectValue>;
3923
+ opacity?: number;
3924
+ }): Promise<CanvasShapeEffect>;
3925
+ /** Changes a node's effect: `values` merged (`null` resets), `mode`, `opacity`, `playing`. One undoable step. */
3926
+ updateNodeEffect(nodeId: string, changes: {
3927
+ values?: Record<string, EffectValue | null>;
3928
+ mode?: "fill" | "overlay";
3929
+ opacity?: number;
3930
+ playing?: boolean;
3931
+ }): Promise<CanvasShapeEffect>;
3932
+ /** Removes a node's effect (works without a provider). One undoable step. */
3933
+ removeNodeEffect(nodeId: string): CanvasShapeEffect;
3934
+ /** The scenes, in order (empty without a Scenes store). */
3935
+ scenes(): readonly CanvasScene[];
3936
+ /** The transition into a scene, if it has one. */
3937
+ sceneTransition(sceneId: string): CanvasSceneTransition | undefined;
3938
+ /**
3939
+ * Sets (or with `effect` null removes) the provider transition played when the canvas moves to
3940
+ * a scene. Returns the transition.
3941
+ */
3942
+ setSceneTransition(sceneId: string, effect: string | null, opts?: {
3943
+ values?: Record<string, EffectValue>;
3944
+ duration?: number;
3945
+ }): Promise<CanvasSceneTransition | null>;
3946
+ };
3947
+ type CanvasEffectsController<TNode extends CanvasNode = CanvasNode> = ReturnType<typeof createCanvasEffectsController<TNode>>;
3948
+
3949
+ /**
3950
+ * Plays provider effects on a canvas element, for the framework bindings: a node's effect drawn
3951
+ * frame by frame (`runCanvasNodeEffect`), and a scene transition between two pictures
3952
+ * (`playCanvasSceneTransition`). Renders go through an `EffectRendererPool`, so a page full of
3953
+ * effects stays within the browser's WebGL context limit.
3954
+ */
3955
+
3956
+ /** Where frames are drawn: a `<canvas>` (or anything with a 2D context of that shape). */
3957
+ interface CanvasEffectTarget {
3958
+ width: number;
3959
+ height: number;
3960
+ getContext(id: '2d'): {
3961
+ putImageData(image: ImageData, x: number, y: number): void;
3962
+ } | null;
3963
+ }
3964
+ interface CanvasEffectClock {
3965
+ now(): number;
3966
+ frame(callback: () => void): () => void;
3967
+ }
3968
+ /** One pool for the canvas effects of a page. */
3969
+ declare const canvasEffectsPool: EffectRendererPool;
3970
+ /**
3971
+ * Draws a node's effect into `target` (sized to the node in device pixels): one frame for a still
3972
+ * effect or when `playing` is false, else a frame per animation frame (one render in flight at a
3973
+ * time) until `stop`. `onError` hears a failed render, after which drawing stops.
3974
+ */
3975
+ declare function runCanvasNodeEffect(options: {
3976
+ provider: EffectProvider;
3977
+ effect: CanvasShapeEffect;
3978
+ target: CanvasEffectTarget;
3979
+ animate?: boolean;
3980
+ clock?: CanvasEffectClock;
3981
+ pool?: EffectRendererPool;
3982
+ onError?: (error: unknown) => void;
3983
+ }): {
3984
+ stop(): void;
3985
+ };
3986
+ /** Plays a scene transition from `from` to `to` (same size as `target`), resolving when it ends. */
3987
+ declare function playCanvasSceneTransition(options: {
3988
+ provider: EffectProvider;
3989
+ transition: CanvasSceneTransition;
3990
+ from: EffectPixels;
3991
+ to: EffectPixels;
3992
+ target: CanvasEffectTarget;
3993
+ clock?: CanvasEffectClock;
3994
+ pool?: EffectRendererPool;
3995
+ }): Promise<void>;
3996
+ /**
3997
+ * The pixels of a DOM element as it looks now (the canvas view, for a scene transition), at
3998
+ * `width × height` device pixels. Browser only; overlays marked `data-capture="overlay"` are left out.
3999
+ */
4000
+ declare function captureCanvasView(element: HTMLElement, size: {
4001
+ width: number;
4002
+ height: number;
4003
+ }): Promise<EffectPixels>;
4004
+ /**
4005
+ * Moves a canvas view to a scene through its transition: captures the view, `jump`s there (no
4006
+ * animated move), waits for the view to draw, captures it again and plays the transition on an
4007
+ * overlay canvas laid over `element` (removed afterwards). Falls back to just jumping when
4008
+ * anything is missing or fails.
4009
+ */
4010
+ declare function transitionCanvasView(options: {
4011
+ provider: EffectProvider;
4012
+ transition: CanvasSceneTransition;
4013
+ element: HTMLElement;
4014
+ jump: () => void;
4015
+ scale?: number;
4016
+ clock?: CanvasEffectClock;
4017
+ }): Promise<void>;
4018
+
4019
+ /**
4020
+ * Agent tools for provider effects on the canvas: the shared effect tools on shape nodes
4021
+ * (`apply_effect` fills a shape with a generator or lays an overlay over it), plus
4022
+ * `set_canvas_effect_mode`, `list_scene_transitions` and `set_scene_transition`.
4023
+ */
4024
+
4025
+ interface CanvasEffectsToolProviderOptions {
4026
+ /** Provider id (unique per registry). Default `canvas-effects`. */
4027
+ id?: string;
4028
+ /** Always prefix tool names with `<namespace>__`. */
4029
+ namespace?: string;
4030
+ /** The canvas cannot be edited: write tools are hidden. A string is the reason. */
4031
+ readOnly?: boolean | string | (() => boolean | string);
4032
+ /** Lets the tool list follow changes (e.g. the host's node store subscribe). */
4033
+ subscribe?: (notify: () => void) => () => void;
4034
+ }
4035
+ /** The effect tools for a canvas (see the module comment). */
4036
+ declare function createCanvasEffectsToolProvider(controller: CanvasEffectsController, options?: CanvasEffectsToolProviderOptions): AgentToolProvider;
4037
+
4038
+ 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, BUILTIN_FAMILY_SCENES, BezierPath, BezierPathInput, type BrushedPathShape, CANVAS_CAPTURE_CHROME_SELECTORS, CANVAS_CAPTURE_OVERLAY_SELECTORS, CANVAS_CAPTURE_VIEWPORT_SELECTOR, CANVAS_COMPONENT_DRAG_TYPE, CANVAS_EFFECT_PLACES, 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, CSS_VARIABLE_DIAGRAM_SCENE_THEME, type CanvasAgentCursor, type CanvasAnimationController, type CanvasAnimationControllerOptions, type CanvasAnimationState, CanvasArrangeAction, type CanvasArrangeController, type CanvasArrangeControllerOptions, type CanvasAutoLayoutController, type CanvasAutoLayoutControllerOptions, CanvasBrush, CanvasBrushPaint, CanvasBrushPreset, CanvasBrushstroke, type CanvasBrushstrokeImage, type CanvasBrushstrokeRenderer, type CanvasCaptureSurfaceOptions, type CanvasCaptureToolProviderOptions, type CanvasCaptureViewport, 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 CanvasDragBounds, type CanvasDragBoundsModifiers, type CanvasDrawController, type CanvasDrawControllerOptions, CanvasEdge, type CanvasEffectClock, type CanvasEffectPlace, type CanvasEffectTarget, type CanvasEffectsController, type CanvasEffectsControllerOptions, type CanvasEffectsToolProviderOptions, CanvasGradientDef, type CanvasHeightOptions, type CanvasInstanceData, type CanvasInstanceInfo, type CanvasInstancePropertyInfo, CanvasLayoutOptions, CanvasNode, CanvasNodeStyle, CanvasNodeUpdate, type CanvasScene, type CanvasSceneTransition, type CanvasScenesOptions, type CanvasScenesState, CanvasScenesStore, CanvasShapeEffect, 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_MARKER_IDS, DIAGRAM_RASTER_MAX_SIZE, DIAGRAM_SCENE_DARK_THEME, DIAGRAM_SCENE_LIGHT_THEME, DIAGRAM_SVG_DARK_THEME, DIAGRAM_SVG_LIGHT_THEME, DIAGRAM_TITLE_TARGET, type DiagramBounds, type DiagramCanvasHeightOptions, type DiagramCircleMark, type DiagramLayout, type DiagramLayoutOptions, type DiagramLineMark, type DiagramMark, type DiagramPathMark, type DiagramRectMark, type DiagramScene, type DiagramSceneOptions, type DiagramSceneTheme, type DiagramSize, DiagramStream, type DiagramStreamResult, type DiagramSvg, type DiagramSvgOptions, type DiagramSvgTheme, type DiagramTextMark, DirectionalDisplacementOptions, DistributeAxis, DistributeMode, DistributeNodesOptions, type DownloadDiagramPngOptions, type DrawStrokeInput, type DrawStrokeResult, type EvaluateAnimationOptions, type FamilyScene, type FamilySceneInput, FanOutTrajectoryOptions, type FitCubicsOptions, type FitPathDataOptions, type FitViewportOptions, type FreehandDrawOptions, type FreehandPenSample, type FreehandPointerLike, 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 MermaidSceneOptions, type MermaidShapePaint, type MermaidShapePath, type MoveKeyframesResult, type MultiNodeTransitionOptions, type NodeAnimation, NodeRectOptions, NodeTransition, type OffsetShapeNodesOptions, type OutlineShapeStrokesOptions, PathShape, PlaceBesideOptions, Point, PolygonFillRule, PolygonRing, Position, type PositionChangeLike, RESIZE_HANDLES, type RasterImage, type RasterizeSvgOptions, type RecordAnimationOptions, Rect, ReflowDisplacementOptions, type RenderShapeBrushstrokeOptions, 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, architectureScene, autoLayoutDiagram, bindCanvasComponentProperty, bindCanvasToken, blendDiagramLayout, blendLayout, boundsOf, c4Scene, calculateCursorArrowRotation, calculateCurvedPath, calculateDagreReflowDisplacement, calculateDirectionalDisplacement, canCombineShapeNodes, canOffsetShapeNodes, canOutlineShapeNodeStrokes, canvasEffectsPool, canvasHeight, canvasNodeCaptureRect, canvasNodeEffect, captureCanvasView, centerNodes, centre, clampAnimationValue, clampLayoutSize, collectDescendantIds, combineCanvasComponentsAsVariants, combineShapeNodes, computeDragBounds, computeDragBoundsFromPoints, computeNodesBoundingBox, computeSnapGuides, connectedDiagramOnly, connectedOnly, copyKeyframes, createBezierTrajectory, createCanvasAnimationController, createCanvasArrangeController, createCanvasAutoLayoutController, createCanvasCaptureSurface, createCanvasCaptureToolProvider, createCanvasComponent, createCanvasComponentsController, createCanvasDrawController, createCanvasEffectsController, createCanvasEffectsToolProvider, createCanvasInstance, createCanvasScenesStore, createDefaultStrokeStyle, createFanOutTrajectory, createGuideIndex, createNodeGuideIndex, cubicPointAt, cubicsToPathData, defaultEasing, deleteKeyframes, detachCanvasInstance, detachTokenBindings, diagramCanvasHeight, diagramFileName, diagramGroupSize, diagramImageSize, diagramLayoutBounds, diagramMarksBounds, diagramMarksToSvg, diagramRenameOp, diagramTargetLabel, diagramTextBaseline, diffOverrideGroups, downloadDiagramPng, easeDiagramTween, ensureDiagramLayout, ensureLayout, estimateCanvasHeight, estimateDiagramCanvasHeight, estimateDiagramNodeSize, estimateNodeSize, estimateTextWidth, evaluateAnimation, exportCssAnimation, familySceneFromLayout, findConnectorSnap, findStrokesAtPoint, findVariant, fitCubicRun, fitCubicWithTangents, fitCubics, fitFreehandPath, fitPathData, fitViewportToNodes, fitViewportToRect, flowSide, formatAgentCursorName, formatAnimationTime, formatVariantName, freehandBrushstroke, ganttScene, getAgentCardAnchor, getAnimatableProperty, getAnimatedProperties, getAnimatedValue, getAnimationDuration, getAnimationTrack, getAutoLayout, getAutoLayoutGrid, getAutoLayoutInsertTarget, getBindableTokenProperties, getBrushedShapeSvg, getCanvasComponentDragId, getCanvasTokenProperty, getCenteredNodePosition, getChildLayout, getComponentData, getComponentInstances, getComponentPropertyDefs, getComponentPropertyRefs, getComponentSourceId, getCssPropertyAnimations, getCursorTransitionDuration, getDefaultVariant, getEffectiveTokenModes, getFamilyScene, 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, gitGraphScene, handlePoint, hasFamilyScene, hasVisibleStroke, hashString, hatchPath, inferResizeHandle, inspectCanvasInstance, inspectNodeTokens, isAgentCursor, isAutoLayoutFrame, isBrushedShape, isCanvasComponent, isCanvasComponentSet, isCanvasInstance, isCssExportExact, isEventFromTextInput, isInsideInstance, isKeyframeSelected, isMeasureModifierHeld, isNodeAnimated, isShapeNode, isStraightCubic, isValidCanvasEdge, isValidCanvasNode, isValidCanvasScene, isValidUrl, journeyScene, layoutAll, layoutBounds, layoutFrame, layoutUp, layoutUpMany, linearPositionTrajectory, linearTrajectory, listCanvasBrushes, listCanvasComponents, loadCanvasBrushstrokeRenderer, makeSizingCoherent, measureBetween, measureLabel, measureSelection, measureToLine, mergeNodeUpdates, mermaidEdgeDash, mermaidEdgeMarker, mermaidEdgeWidth, mermaidFlowEdges, mermaidFlowNodes, mermaidLabelLines, mermaidMarkerId, mermaidMovesFromCanvas, mermaidNodeMembers, mermaidNodePaint, mermaidShapePaths, mermaidThumbnailSvg, mermaidToCanvas, mermaidToScene, mermaidToSvg, mindmapScene, moveKeyframes, moveLayoutChild, nearestHandlePositions, offsetShapeNodes, oppositePosition, outlineShapeNodeStrokes, overlaps, parseCanvasClipboardData, parseCanvasScenes, parseKeyframeClipboard, parseMermaidStyles, parseNodeStyleDeclarations, parseVariantName, pasteKeyframes, pathDataToPolyline, pieScene, placeBeside, playCanvasSceneTransition, playWebAnimations, pointerPenSample, positionToSide, profileAlongPolyline, pruneCanvasTokenModes, pushCanvasInstanceOverrides, quadrantScene, radarChartSpec, radarScene, rasterSize, rasterizeSvg, readAnimatableValue, readNodeStyleProperty, readOverrideGroup, recordAnimationChanges, registerFamilyScene, relayoutUpdates, remapPastedNodes, removeCanvasVariant, removeTrack, renameCanvasVariantProperty, renameCanvasVariantValue, renderShapeBrushstroke, repositionNodesTo, resetCanvasInstanceOverrides, resizeHandleAxes, resolveCanvasTokens, resolveMermaidStyles, resolvePadding, restoreCanvasMainComponent, revertShapeCombination, runCanvasNodeEffect, runMultiNodeTransition, sampleAnimationFrames, scaleKeyframes, sceneColor, sequenceScene, 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, timelineScene, toWebAnimations, transitionCanvasView, updateKeyframe, validateCanvasBrush, validateCanvasBrushPaint, withNodeAnimation, withStyleOpacity, wouldCreateComponentCycle, writeNodeStyleProperty, writeOverrideGroup, xToTime, xyChartScene, xyChartSpec };