@pixerate/editor-react 0.101.0 → 0.103.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.
@@ -31,23 +31,23 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  // src/canvas/index.ts
32
32
  var canvas_exports = {};
33
33
  __export(canvas_exports, {
34
- ANIMATABLE_PROPERTIES: () => import_canvas34.ANIMATABLE_PROPERTIES,
35
- ANIMATION_DATA_KEY: () => import_canvas34.ANIMATION_DATA_KEY,
36
- ANIMATION_EASING_LABELS: () => import_canvas34.ANIMATION_EASING_LABELS,
37
- ANIMATION_EASING_PRESETS: () => import_canvas34.ANIMATION_EASING_PRESETS,
38
- ANIMATION_TIME_EPSILON: () => import_canvas34.ANIMATION_TIME_EPSILON,
39
- AUTO_LAYOUT_DATA_KEY: () => import_canvas32.AUTO_LAYOUT_DATA_KEY,
34
+ ANIMATABLE_PROPERTIES: () => import_canvas35.ANIMATABLE_PROPERTIES,
35
+ ANIMATION_DATA_KEY: () => import_canvas35.ANIMATION_DATA_KEY,
36
+ ANIMATION_EASING_LABELS: () => import_canvas35.ANIMATION_EASING_LABELS,
37
+ ANIMATION_EASING_PRESETS: () => import_canvas35.ANIMATION_EASING_PRESETS,
38
+ ANIMATION_TIME_EPSILON: () => import_canvas35.ANIMATION_TIME_EPSILON,
39
+ AUTO_LAYOUT_DATA_KEY: () => import_canvas33.AUTO_LAYOUT_DATA_KEY,
40
40
  AgentPresenceLayer: () => AgentPresenceLayer,
41
- AnimationEditError: () => import_canvas34.AnimationEditError,
42
- AnimationPlayer: () => import_canvas34.AnimationPlayer,
41
+ AnimationEditError: () => import_canvas35.AnimationEditError,
42
+ AnimationPlayer: () => import_canvas35.AnimationPlayer,
43
43
  AnimationTimeline: () => AnimationTimeline,
44
- CANVAS_COMPONENT_DRAG_TYPE: () => import_canvas35.CANVAS_COMPONENT_DRAG_TYPE,
45
- CANVAS_GRADIENT_PRESETS: () => import_canvas35.CANVAS_GRADIENT_PRESETS,
46
- CANVAS_TOKEN_PROPERTIES: () => import_canvas33.CANVAS_TOKEN_PROPERTIES,
47
- CHILD_LAYOUT_DATA_KEY: () => import_canvas32.CHILD_LAYOUT_DATA_KEY,
48
- CONNECTION_LINE_TYPES: () => import_canvas28.CONNECTION_LINE_TYPES,
49
- CSS_ANIMATION_PROPERTIES: () => import_canvas34.CSS_ANIMATION_PROPERTIES,
50
- CUBIC_BEZIER_PRESETS: () => import_canvas34.CUBIC_BEZIER_PRESETS,
44
+ CANVAS_COMPONENT_DRAG_TYPE: () => import_canvas36.CANVAS_COMPONENT_DRAG_TYPE,
45
+ CANVAS_GRADIENT_PRESETS: () => import_canvas36.CANVAS_GRADIENT_PRESETS,
46
+ CANVAS_TOKEN_PROPERTIES: () => import_canvas34.CANVAS_TOKEN_PROPERTIES,
47
+ CHILD_LAYOUT_DATA_KEY: () => import_canvas33.CHILD_LAYOUT_DATA_KEY,
48
+ CONNECTION_LINE_TYPES: () => import_canvas29.CONNECTION_LINE_TYPES,
49
+ CSS_ANIMATION_PROPERTIES: () => import_canvas35.CSS_ANIMATION_PROPERTIES,
50
+ CUBIC_BEZIER_PRESETS: () => import_canvas35.CUBIC_BEZIER_PRESETS,
51
51
  CanvasComponentsPanel: () => CanvasComponentsPanel,
52
52
  CanvasDrawLayer: () => CanvasDrawLayer,
53
53
  CanvasEffectsPanel: () => CanvasEffectsPanel,
@@ -55,313 +55,313 @@ __export(canvas_exports, {
55
55
  CanvasGuidesLayer: () => CanvasGuidesLayer,
56
56
  CanvasInstanceInspector: () => CanvasInstanceInspector,
57
57
  CanvasNodeEffectLayer: () => CanvasNodeEffectLayer,
58
- CanvasScenesStore: () => import_canvas28.CanvasScenesStore,
59
- DEFAULT_ARRANGE_SHORTCUTS: () => import_canvas28.DEFAULT_ARRANGE_SHORTCUTS,
58
+ CanvasScenesStore: () => import_canvas29.CanvasScenesStore,
59
+ DEFAULT_ARRANGE_SHORTCUTS: () => import_canvas29.DEFAULT_ARRANGE_SHORTCUTS,
60
60
  DiagramPresenceLayer: () => DiagramPresenceLayer,
61
- MAX_KEYFRAME_REFS: () => import_canvas34.MAX_KEYFRAME_REFS,
62
- ManualClock: () => import_canvas31.ManualClock,
61
+ MAX_KEYFRAME_REFS: () => import_canvas35.MAX_KEYFRAME_REFS,
62
+ ManualClock: () => import_canvas32.ManualClock,
63
63
  MermaidDiagramGroup: () => MermaidDiagramGroup,
64
64
  MermaidDiagramNode: () => MermaidDiagramNode,
65
65
  MermaidFamilyScene: () => MermaidFamilyScene,
66
66
  MermaidThumbnail: () => MermaidThumbnail,
67
67
  PresenceLayer: () => PresenceLayer,
68
- RESIZE_HANDLES: () => import_canvas27.RESIZE_HANDLES,
69
- SHAPE_DATA_KEY: () => import_canvas29.SHAPE_DATA_KEY,
70
- SHAPE_KINDS: () => import_canvas29.SHAPE_KINDS,
71
- SHAPE_NODE_TYPE: () => import_canvas29.SHAPE_NODE_TYPE,
72
- SHAPE_OPERATIONS: () => import_canvas29.SHAPE_OPERATIONS,
68
+ RESIZE_HANDLES: () => import_canvas28.RESIZE_HANDLES,
69
+ SHAPE_DATA_KEY: () => import_canvas30.SHAPE_DATA_KEY,
70
+ SHAPE_KINDS: () => import_canvas30.SHAPE_KINDS,
71
+ SHAPE_NODE_TYPE: () => import_canvas30.SHAPE_NODE_TYPE,
72
+ SHAPE_OPERATIONS: () => import_canvas30.SHAPE_OPERATIONS,
73
73
  ShapeNode: () => ShapeNode,
74
74
  ShapeNodeZoomContext: () => ShapeNodeZoomContext,
75
75
  ShapeNodeZoomProvider: () => ShapeNodeZoomProvider,
76
- TOKEN_BINDINGS_DATA_KEY: () => import_canvas33.TOKEN_BINDINGS_DATA_KEY,
77
- TOKEN_MODES_DATA_KEY: () => import_canvas33.TOKEN_MODES_DATA_KEY,
76
+ TOKEN_BINDINGS_DATA_KEY: () => import_canvas34.TOKEN_BINDINGS_DATA_KEY,
77
+ TOKEN_MODES_DATA_KEY: () => import_canvas34.TOKEN_MODES_DATA_KEY,
78
78
  TokenBindingPicker: () => TokenBindingPicker,
79
79
  TokenModeSwitcher: () => TokenModeSwitcher,
80
- addCanvasVariant: () => import_canvas35.addCanvasVariant,
81
- addKeyframesAtTime: () => import_canvas34.addKeyframesAtTime,
82
- alignNodes: () => import_canvas28.alignNodes,
83
- angleToSvgLinearCoords: () => import_canvas35.angleToSvgLinearCoords,
84
- animateNode: () => import_canvas34.animateNode,
85
- applyAnimation: () => import_canvas34.applyAnimation,
86
- applyAnimationOverrides: () => import_canvas34.applyAnimationOverrides,
87
- applyConstraints: () => import_canvas32.applyConstraints,
88
- applyNodeUpdates: () => import_canvas28.applyNodeUpdates,
89
- applyShapeCombination: () => import_canvas29.applyShapeCombination,
90
- applyShapeReplacement: () => import_canvas30.applyShapeReplacement,
91
- bezierPathArea: () => import_canvas30.bezierPathArea,
92
- bezierPathBounds: () => import_canvas30.bezierPathBounds,
93
- bezierPathLength: () => import_canvas30.bezierPathLength,
94
- bezierPathPointAtLength: () => import_canvas30.bezierPathPointAtLength,
95
- bezierPathSignedArea: () => import_canvas30.bezierPathSignedArea,
96
- bezierPathToSvg: () => import_canvas30.bezierPathToSvg,
97
- bindCanvasComponentProperty: () => import_canvas35.bindCanvasComponentProperty,
98
- bindCanvasToken: () => import_canvas33.bindCanvasToken,
99
- blendLayout: () => import_canvas31.blendLayout,
100
- boundsOf: () => import_canvas31.boundsOf,
101
- brushstrokeScaleBucket: () => import_canvas35.brushstrokeScaleBucket,
102
- brushstrokeSeed: () => import_canvas35.brushstrokeSeed,
103
- calculateDagreReflowDisplacement: () => import_canvas31.calculateDagreReflowDisplacement,
104
- calculateDirectionalDisplacement: () => import_canvas31.calculateDirectionalDisplacement,
105
- canCombineShapeNodes: () => import_canvas29.canCombineShapeNodes,
106
- canOffsetShapeNodes: () => import_canvas30.canOffsetShapeNodes,
107
- canOutlineShapeNodeStrokes: () => import_canvas30.canOutlineShapeNodeStrokes,
108
- canvasHeight: () => import_canvas31.canvasHeight,
109
- centerNodes: () => import_canvas31.centerNodes,
110
- centre: () => import_canvas31.centre,
111
- clampAnimationValue: () => import_canvas34.clampAnimationValue,
112
- clampLayoutSize: () => import_canvas32.clampLayoutSize,
113
- combineCanvasComponentsAsVariants: () => import_canvas35.combineCanvasComponentsAsVariants,
114
- combineShapeNodes: () => import_canvas29.combineShapeNodes,
115
- computeNodesBoundingBox: () => import_canvas31.computeNodesBoundingBox,
116
- computeSnapGuides: () => import_canvas28.computeSnapGuides,
117
- connectedOnly: () => import_canvas31.connectedOnly,
118
- copyKeyframes: () => import_canvas34.copyKeyframes,
119
- countPathSegments: () => import_canvas30.countPathSegments,
120
- createAnimationPlayer: () => import_canvas34.createAnimationPlayer,
121
- createBezierTrajectory: () => import_canvas31.createBezierTrajectory,
122
- createCanvasAnimationController: () => import_canvas34.createCanvasAnimationController,
123
- createCanvasAutoLayoutController: () => import_canvas32.createCanvasAutoLayoutController,
124
- createCanvasComponent: () => import_canvas35.createCanvasComponent,
125
- createCanvasComponentsController: () => import_canvas35.createCanvasComponentsController,
126
- createCanvasDrawController: () => import_canvas35.createCanvasDrawController,
127
- createCanvasInstance: () => import_canvas35.createCanvasInstance,
128
- createCanvasScenesStore: () => import_canvas28.createCanvasScenesStore,
129
- createDefaultStrokeStyle: () => import_canvas35.createDefaultStrokeStyle,
130
- createFanOutTrajectory: () => import_canvas31.createFanOutTrajectory,
131
- createGuideIndex: () => import_canvas28.createGuideIndex,
132
- createNodeGuideIndex: () => import_canvas28.createNodeGuideIndex,
133
- cubicBezierAt: () => import_canvas34.cubicBezierAt,
134
- cubicPointAt: () => import_canvas27.cubicPointAt,
135
- cubicsToPathData: () => import_canvas27.cubicsToPathData,
136
- dashContours: () => import_canvas30.dashContours,
137
- defaultEasing: () => import_canvas31.defaultEasing,
138
- deleteKeyframes: () => import_canvas34.deleteKeyframes,
139
- detachCanvasInstance: () => import_canvas35.detachCanvasInstance,
140
- detachTokenBindings: () => import_canvas33.detachTokenBindings,
141
- distanceToBezierPath: () => import_canvas30.distanceToBezierPath,
142
- distributeNodes: () => import_canvas28.distributeNodes,
143
- dividePaths: () => import_canvas30.dividePaths,
144
- dividePolygons: () => import_canvas29.dividePolygons,
145
- easingFromInfluence: () => import_canvas34.easingFromInfluence,
146
- easingLabel: () => import_canvas34.easingLabel,
147
- easingToCss: () => import_canvas34.easingToCss,
148
- ensureLayout: () => import_canvas31.ensureLayout,
149
- estimateCanvasHeight: () => import_canvas31.estimateCanvasHeight,
150
- estimateNodeSize: () => import_canvas31.estimateNodeSize,
151
- evaluateAnimation: () => import_canvas34.evaluateAnimation,
152
- evaluateEasing: () => import_canvas34.evaluateEasing,
153
- evaluateTrack: () => import_canvas34.evaluateTrack,
154
- excludePaths: () => import_canvas30.excludePaths,
155
- exportCssAnimation: () => import_canvas34.exportCssAnimation,
156
- findConnectorSnap: () => import_canvas28.findConnectorSnap,
157
- findStrokesAtPoint: () => import_canvas35.findStrokesAtPoint,
158
- fitCubicRun: () => import_canvas27.fitCubicRun,
159
- fitCubics: () => import_canvas27.fitCubics,
160
- fitFreehandPath: () => import_canvas27.fitFreehandPath,
161
- fitPathData: () => import_canvas27.fitPathData,
162
- fitViewportToNodes: () => import_canvas28.fitViewportToNodes,
163
- fitViewportToRect: () => import_canvas28.fitViewportToRect,
164
- flattenSvgPath: () => import_canvas29.flattenSvgPath,
165
- flowSide: () => import_canvas31.flowSide,
166
- formatAnimationTime: () => import_canvas34.formatAnimationTime,
167
- formatOklab: () => import_canvas34.formatOklab,
168
- freehandBrushstroke: () => import_canvas35.freehandBrushstroke,
169
- getAbsolutePosition: () => import_canvas28.getAbsolutePosition,
170
- getAnimatableProperty: () => import_canvas34.getAnimatableProperty,
171
- getAnimatedProperties: () => import_canvas34.getAnimatedProperties,
172
- getAnimatedValue: () => import_canvas34.getAnimatedValue,
173
- getAnimationDuration: () => import_canvas34.getAnimationDuration,
174
- getAnimationTrack: () => import_canvas34.getAnimationTrack,
175
- getAutoLayout: () => import_canvas32.getAutoLayout,
176
- getAutoLayoutGrid: () => import_canvas32.getAutoLayoutGrid,
177
- getAutoLayoutInsertTarget: () => import_canvas32.getAutoLayoutInsertTarget,
178
- getBindableTokenProperties: () => import_canvas33.getBindableTokenProperties,
179
- getBrushedShapeSvg: () => import_canvas35.getBrushedShapeSvg,
180
- getCanvasComponentDragId: () => import_canvas35.getCanvasComponentDragId,
181
- getCanvasTokenProperty: () => import_canvas33.getCanvasTokenProperty,
182
- getCenteredNodePosition: () => import_canvas31.getCenteredNodePosition,
183
- getChildLayout: () => import_canvas32.getChildLayout,
184
- getComponentSourceId: () => import_canvas35.getComponentSourceId,
185
- getCssPropertyAnimations: () => import_canvas34.getCssPropertyAnimations,
186
- getEffectiveTokenModes: () => import_canvas33.getEffectiveTokenModes,
187
- getFlowChildren: () => import_canvas32.getFlowChildren,
188
- getInstanceData: () => import_canvas35.getInstanceData,
189
- getInstanceStatus: () => import_canvas35.getInstanceStatus,
190
- getKeyframeTimes: () => import_canvas34.getKeyframeTimes,
191
- getLayoutParent: () => import_canvas32.getLayoutParent,
192
- getLayoutSizing: () => import_canvas32.getLayoutSizing,
193
- getLayoutedNodes: () => import_canvas31.getLayoutedNodes,
194
- getNextVariantValues: () => import_canvas35.getNextVariantValues,
195
- getNodeAnimation: () => import_canvas34.getNodeAnimation,
196
- getNodeOverrides: () => import_canvas35.getNodeOverrides,
197
- getNodeRect: () => import_canvas28.getNodeRect,
198
- getNodeShape: () => import_canvas29.getNodeShape,
199
- getNodeSize: () => import_canvas28.getNodeSize,
200
- getNodeTokenBindings: () => import_canvas33.getNodeTokenBindings,
201
- getNodeTokenModes: () => import_canvas33.getNodeTokenModes,
202
- getResizingNodeRect: () => import_canvas27.getResizingNodeRect,
203
- getShapeRenderData: () => import_canvas29.getShapeRenderData,
204
- getShapeSvg: () => import_canvas29.getShapeSvg,
205
- getTimelineRows: () => import_canvas34.getTimelineRows,
206
- getTimelineTicks: () => import_canvas34.getTimelineTicks,
207
- getTokenPropertyScope: () => import_canvas33.getTokenPropertyScope,
208
- getTokensForProperty: () => import_canvas33.getTokensForProperty,
209
- gradientToSvgDef: () => import_canvas35.gradientToSvgDef,
210
- handlePoint: () => import_canvas28.handlePoint,
211
- hasVisibleStroke: () => import_canvas30.hasVisibleStroke,
212
- inferResizeHandle: () => import_canvas27.inferResizeHandle,
213
- inspectCanvasInstance: () => import_canvas35.inspectCanvasInstance,
214
- inspectNodeTokens: () => import_canvas33.inspectNodeTokens,
215
- interpolateAnimationValue: () => import_canvas34.interpolateAnimationValue,
216
- intersectPaths: () => import_canvas30.intersectPaths,
217
- intersectPolygons: () => import_canvas29.intersectPolygons,
218
- invertNodeUpdates: () => import_canvas28.invertNodeUpdates,
219
- isAnimationEasing: () => import_canvas34.isAnimationEasing,
220
- isAnimationKeyframe: () => import_canvas34.isAnimationKeyframe,
221
- isAutoLayoutFrame: () => import_canvas32.isAutoLayoutFrame,
222
- isBrushedShape: () => import_canvas35.isBrushedShape,
223
- isCanvasComponent: () => import_canvas35.isCanvasComponent,
224
- isCanvasComponentSet: () => import_canvas35.isCanvasComponentSet,
225
- isCanvasGradient: () => import_canvas35.isCanvasGradient,
226
- isCanvasInstance: () => import_canvas35.isCanvasInstance,
227
- isCssExportExact: () => import_canvas34.isCssExportExact,
228
- isEventFromTextInput: () => import_canvas31.isEventFromTextInput,
229
- isKeyframeSelected: () => import_canvas34.isKeyframeSelected,
230
- isLocked: () => import_canvas28.isLocked,
231
- isMeasureModifierHeld: () => import_canvas27.isMeasureModifierHeld,
232
- isNodeAnimated: () => import_canvas34.isNodeAnimated,
233
- isShapeDescription: () => import_canvas29.isShapeDescription,
234
- isShapeNode: () => import_canvas29.isShapeNode,
235
- isStraightCubic: () => import_canvas27.isStraightCubic,
236
- isValidCanvasNode: () => import_canvas31.isValidCanvasNode,
237
- isValidUrl: () => import_canvas31.isValidUrl,
238
- layoutAll: () => import_canvas32.layoutAll,
239
- layoutBounds: () => import_canvas31.layoutBounds,
240
- layoutFrame: () => import_canvas32.layoutFrame,
241
- layoutUp: () => import_canvas32.layoutUp,
242
- layoutUpMany: () => import_canvas32.layoutUpMany,
243
- linearPositionTrajectory: () => import_canvas31.linearPositionTrajectory,
244
- linearTrajectory: () => import_canvas31.linearTrajectory,
245
- listCanvasBrushes: () => import_canvas35.listCanvasBrushes,
246
- listCanvasComponents: () => import_canvas35.listCanvasComponents,
247
- loadCanvasBrushstrokeRenderer: () => import_canvas35.loadCanvasBrushstrokeRenderer,
248
- lockNodes: () => import_canvas28.lockNodes,
249
- makeSizingCoherent: () => import_canvas32.makeSizingCoherent,
250
- matchArrangeShortcut: () => import_canvas28.matchArrangeShortcut,
251
- matchSize: () => import_canvas28.matchSize,
252
- measureBetween: () => import_canvas27.measureBetween,
253
- measureLabel: () => import_canvas27.measureLabel,
254
- measureSelection: () => import_canvas27.measureSelection,
255
- measureToLine: () => import_canvas27.measureToLine,
256
- mergeNodeUpdates: () => import_canvas32.mergeNodeUpdates,
80
+ addCanvasVariant: () => import_canvas36.addCanvasVariant,
81
+ addKeyframesAtTime: () => import_canvas35.addKeyframesAtTime,
82
+ alignNodes: () => import_canvas29.alignNodes,
83
+ angleToSvgLinearCoords: () => import_canvas36.angleToSvgLinearCoords,
84
+ animateNode: () => import_canvas35.animateNode,
85
+ applyAnimation: () => import_canvas35.applyAnimation,
86
+ applyAnimationOverrides: () => import_canvas35.applyAnimationOverrides,
87
+ applyConstraints: () => import_canvas33.applyConstraints,
88
+ applyNodeUpdates: () => import_canvas29.applyNodeUpdates,
89
+ applyShapeCombination: () => import_canvas30.applyShapeCombination,
90
+ applyShapeReplacement: () => import_canvas31.applyShapeReplacement,
91
+ bezierPathArea: () => import_canvas31.bezierPathArea,
92
+ bezierPathBounds: () => import_canvas31.bezierPathBounds,
93
+ bezierPathLength: () => import_canvas31.bezierPathLength,
94
+ bezierPathPointAtLength: () => import_canvas31.bezierPathPointAtLength,
95
+ bezierPathSignedArea: () => import_canvas31.bezierPathSignedArea,
96
+ bezierPathToSvg: () => import_canvas31.bezierPathToSvg,
97
+ bindCanvasComponentProperty: () => import_canvas36.bindCanvasComponentProperty,
98
+ bindCanvasToken: () => import_canvas34.bindCanvasToken,
99
+ blendLayout: () => import_canvas32.blendLayout,
100
+ boundsOf: () => import_canvas32.boundsOf,
101
+ brushstrokeScaleBucket: () => import_canvas36.brushstrokeScaleBucket,
102
+ brushstrokeSeed: () => import_canvas36.brushstrokeSeed,
103
+ calculateDagreReflowDisplacement: () => import_canvas32.calculateDagreReflowDisplacement,
104
+ calculateDirectionalDisplacement: () => import_canvas32.calculateDirectionalDisplacement,
105
+ canCombineShapeNodes: () => import_canvas30.canCombineShapeNodes,
106
+ canOffsetShapeNodes: () => import_canvas31.canOffsetShapeNodes,
107
+ canOutlineShapeNodeStrokes: () => import_canvas31.canOutlineShapeNodeStrokes,
108
+ canvasHeight: () => import_canvas32.canvasHeight,
109
+ centerNodes: () => import_canvas32.centerNodes,
110
+ centre: () => import_canvas32.centre,
111
+ clampAnimationValue: () => import_canvas35.clampAnimationValue,
112
+ clampLayoutSize: () => import_canvas33.clampLayoutSize,
113
+ combineCanvasComponentsAsVariants: () => import_canvas36.combineCanvasComponentsAsVariants,
114
+ combineShapeNodes: () => import_canvas30.combineShapeNodes,
115
+ computeNodesBoundingBox: () => import_canvas32.computeNodesBoundingBox,
116
+ computeSnapGuides: () => import_canvas29.computeSnapGuides,
117
+ connectedOnly: () => import_canvas32.connectedOnly,
118
+ copyKeyframes: () => import_canvas35.copyKeyframes,
119
+ countPathSegments: () => import_canvas31.countPathSegments,
120
+ createAnimationPlayer: () => import_canvas35.createAnimationPlayer,
121
+ createBezierTrajectory: () => import_canvas32.createBezierTrajectory,
122
+ createCanvasAnimationController: () => import_canvas35.createCanvasAnimationController,
123
+ createCanvasAutoLayoutController: () => import_canvas33.createCanvasAutoLayoutController,
124
+ createCanvasComponent: () => import_canvas36.createCanvasComponent,
125
+ createCanvasComponentsController: () => import_canvas36.createCanvasComponentsController,
126
+ createCanvasDrawController: () => import_canvas36.createCanvasDrawController,
127
+ createCanvasInstance: () => import_canvas36.createCanvasInstance,
128
+ createCanvasScenesStore: () => import_canvas29.createCanvasScenesStore,
129
+ createDefaultStrokeStyle: () => import_canvas36.createDefaultStrokeStyle,
130
+ createFanOutTrajectory: () => import_canvas32.createFanOutTrajectory,
131
+ createGuideIndex: () => import_canvas29.createGuideIndex,
132
+ createNodeGuideIndex: () => import_canvas29.createNodeGuideIndex,
133
+ cubicBezierAt: () => import_canvas35.cubicBezierAt,
134
+ cubicPointAt: () => import_canvas28.cubicPointAt,
135
+ cubicsToPathData: () => import_canvas28.cubicsToPathData,
136
+ dashContours: () => import_canvas31.dashContours,
137
+ defaultEasing: () => import_canvas32.defaultEasing,
138
+ deleteKeyframes: () => import_canvas35.deleteKeyframes,
139
+ detachCanvasInstance: () => import_canvas36.detachCanvasInstance,
140
+ detachTokenBindings: () => import_canvas34.detachTokenBindings,
141
+ distanceToBezierPath: () => import_canvas31.distanceToBezierPath,
142
+ distributeNodes: () => import_canvas29.distributeNodes,
143
+ dividePaths: () => import_canvas31.dividePaths,
144
+ dividePolygons: () => import_canvas30.dividePolygons,
145
+ easingFromInfluence: () => import_canvas35.easingFromInfluence,
146
+ easingLabel: () => import_canvas35.easingLabel,
147
+ easingToCss: () => import_canvas35.easingToCss,
148
+ ensureLayout: () => import_canvas32.ensureLayout,
149
+ estimateCanvasHeight: () => import_canvas32.estimateCanvasHeight,
150
+ estimateNodeSize: () => import_canvas32.estimateNodeSize,
151
+ evaluateAnimation: () => import_canvas35.evaluateAnimation,
152
+ evaluateEasing: () => import_canvas35.evaluateEasing,
153
+ evaluateTrack: () => import_canvas35.evaluateTrack,
154
+ excludePaths: () => import_canvas31.excludePaths,
155
+ exportCssAnimation: () => import_canvas35.exportCssAnimation,
156
+ findConnectorSnap: () => import_canvas29.findConnectorSnap,
157
+ findStrokesAtPoint: () => import_canvas36.findStrokesAtPoint,
158
+ fitCubicRun: () => import_canvas28.fitCubicRun,
159
+ fitCubics: () => import_canvas28.fitCubics,
160
+ fitFreehandPath: () => import_canvas28.fitFreehandPath,
161
+ fitPathData: () => import_canvas28.fitPathData,
162
+ fitViewportToNodes: () => import_canvas29.fitViewportToNodes,
163
+ fitViewportToRect: () => import_canvas29.fitViewportToRect,
164
+ flattenSvgPath: () => import_canvas30.flattenSvgPath,
165
+ flowSide: () => import_canvas32.flowSide,
166
+ formatAnimationTime: () => import_canvas35.formatAnimationTime,
167
+ formatOklab: () => import_canvas35.formatOklab,
168
+ freehandBrushstroke: () => import_canvas36.freehandBrushstroke,
169
+ getAbsolutePosition: () => import_canvas29.getAbsolutePosition,
170
+ getAnimatableProperty: () => import_canvas35.getAnimatableProperty,
171
+ getAnimatedProperties: () => import_canvas35.getAnimatedProperties,
172
+ getAnimatedValue: () => import_canvas35.getAnimatedValue,
173
+ getAnimationDuration: () => import_canvas35.getAnimationDuration,
174
+ getAnimationTrack: () => import_canvas35.getAnimationTrack,
175
+ getAutoLayout: () => import_canvas33.getAutoLayout,
176
+ getAutoLayoutGrid: () => import_canvas33.getAutoLayoutGrid,
177
+ getAutoLayoutInsertTarget: () => import_canvas33.getAutoLayoutInsertTarget,
178
+ getBindableTokenProperties: () => import_canvas34.getBindableTokenProperties,
179
+ getBrushedShapeSvg: () => import_canvas36.getBrushedShapeSvg,
180
+ getCanvasComponentDragId: () => import_canvas36.getCanvasComponentDragId,
181
+ getCanvasTokenProperty: () => import_canvas34.getCanvasTokenProperty,
182
+ getCenteredNodePosition: () => import_canvas32.getCenteredNodePosition,
183
+ getChildLayout: () => import_canvas33.getChildLayout,
184
+ getComponentSourceId: () => import_canvas36.getComponentSourceId,
185
+ getCssPropertyAnimations: () => import_canvas35.getCssPropertyAnimations,
186
+ getEffectiveTokenModes: () => import_canvas34.getEffectiveTokenModes,
187
+ getFlowChildren: () => import_canvas33.getFlowChildren,
188
+ getInstanceData: () => import_canvas36.getInstanceData,
189
+ getInstanceStatus: () => import_canvas36.getInstanceStatus,
190
+ getKeyframeTimes: () => import_canvas35.getKeyframeTimes,
191
+ getLayoutParent: () => import_canvas33.getLayoutParent,
192
+ getLayoutSizing: () => import_canvas33.getLayoutSizing,
193
+ getLayoutedNodes: () => import_canvas32.getLayoutedNodes,
194
+ getNextVariantValues: () => import_canvas36.getNextVariantValues,
195
+ getNodeAnimation: () => import_canvas35.getNodeAnimation,
196
+ getNodeOverrides: () => import_canvas36.getNodeOverrides,
197
+ getNodeRect: () => import_canvas29.getNodeRect,
198
+ getNodeShape: () => import_canvas30.getNodeShape,
199
+ getNodeSize: () => import_canvas29.getNodeSize,
200
+ getNodeTokenBindings: () => import_canvas34.getNodeTokenBindings,
201
+ getNodeTokenModes: () => import_canvas34.getNodeTokenModes,
202
+ getResizingNodeRect: () => import_canvas28.getResizingNodeRect,
203
+ getShapeRenderData: () => import_canvas30.getShapeRenderData,
204
+ getShapeSvg: () => import_canvas30.getShapeSvg,
205
+ getTimelineRows: () => import_canvas35.getTimelineRows,
206
+ getTimelineTicks: () => import_canvas35.getTimelineTicks,
207
+ getTokenPropertyScope: () => import_canvas34.getTokenPropertyScope,
208
+ getTokensForProperty: () => import_canvas34.getTokensForProperty,
209
+ gradientToSvgDef: () => import_canvas36.gradientToSvgDef,
210
+ handlePoint: () => import_canvas29.handlePoint,
211
+ hasVisibleStroke: () => import_canvas31.hasVisibleStroke,
212
+ inferResizeHandle: () => import_canvas28.inferResizeHandle,
213
+ inspectCanvasInstance: () => import_canvas36.inspectCanvasInstance,
214
+ inspectNodeTokens: () => import_canvas34.inspectNodeTokens,
215
+ interpolateAnimationValue: () => import_canvas35.interpolateAnimationValue,
216
+ intersectPaths: () => import_canvas31.intersectPaths,
217
+ intersectPolygons: () => import_canvas30.intersectPolygons,
218
+ invertNodeUpdates: () => import_canvas29.invertNodeUpdates,
219
+ isAnimationEasing: () => import_canvas35.isAnimationEasing,
220
+ isAnimationKeyframe: () => import_canvas35.isAnimationKeyframe,
221
+ isAutoLayoutFrame: () => import_canvas33.isAutoLayoutFrame,
222
+ isBrushedShape: () => import_canvas36.isBrushedShape,
223
+ isCanvasComponent: () => import_canvas36.isCanvasComponent,
224
+ isCanvasComponentSet: () => import_canvas36.isCanvasComponentSet,
225
+ isCanvasGradient: () => import_canvas36.isCanvasGradient,
226
+ isCanvasInstance: () => import_canvas36.isCanvasInstance,
227
+ isCssExportExact: () => import_canvas35.isCssExportExact,
228
+ isEventFromTextInput: () => import_canvas32.isEventFromTextInput,
229
+ isKeyframeSelected: () => import_canvas35.isKeyframeSelected,
230
+ isLocked: () => import_canvas29.isLocked,
231
+ isMeasureModifierHeld: () => import_canvas28.isMeasureModifierHeld,
232
+ isNodeAnimated: () => import_canvas35.isNodeAnimated,
233
+ isShapeDescription: () => import_canvas30.isShapeDescription,
234
+ isShapeNode: () => import_canvas30.isShapeNode,
235
+ isStraightCubic: () => import_canvas28.isStraightCubic,
236
+ isValidCanvasNode: () => import_canvas32.isValidCanvasNode,
237
+ isValidUrl: () => import_canvas32.isValidUrl,
238
+ layoutAll: () => import_canvas33.layoutAll,
239
+ layoutBounds: () => import_canvas32.layoutBounds,
240
+ layoutFrame: () => import_canvas33.layoutFrame,
241
+ layoutUp: () => import_canvas33.layoutUp,
242
+ layoutUpMany: () => import_canvas33.layoutUpMany,
243
+ linearPositionTrajectory: () => import_canvas32.linearPositionTrajectory,
244
+ linearTrajectory: () => import_canvas32.linearTrajectory,
245
+ listCanvasBrushes: () => import_canvas36.listCanvasBrushes,
246
+ listCanvasComponents: () => import_canvas36.listCanvasComponents,
247
+ loadCanvasBrushstrokeRenderer: () => import_canvas36.loadCanvasBrushstrokeRenderer,
248
+ lockNodes: () => import_canvas29.lockNodes,
249
+ makeSizingCoherent: () => import_canvas33.makeSizingCoherent,
250
+ matchArrangeShortcut: () => import_canvas29.matchArrangeShortcut,
251
+ matchSize: () => import_canvas29.matchSize,
252
+ measureBetween: () => import_canvas28.measureBetween,
253
+ measureLabel: () => import_canvas28.measureLabel,
254
+ measureSelection: () => import_canvas28.measureSelection,
255
+ measureToLine: () => import_canvas28.measureToLine,
256
+ mergeNodeUpdates: () => import_canvas33.mergeNodeUpdates,
257
257
  mermaidNodeStyle: () => mermaidNodeStyle,
258
- mixColorsOklab: () => import_canvas34.mixColorsOklab,
259
- moveKeyframes: () => import_canvas34.moveKeyframes,
260
- moveLayoutChild: () => import_canvas32.moveLayoutChild,
261
- multiPolygonArea: () => import_canvas29.multiPolygonArea,
262
- multiPolygonBounds: () => import_canvas29.multiPolygonBounds,
263
- nearestHandlePositions: () => import_canvas28.nearestHandlePositions,
264
- normalizeBezierPath: () => import_canvas30.normalizeBezierPath,
265
- normalizeKeyframes: () => import_canvas34.normalizeKeyframes,
266
- offsetPath: () => import_canvas30.offsetPath,
267
- offsetShapeNodes: () => import_canvas30.offsetShapeNodes,
268
- oklabToRgb: () => import_canvas34.oklabToRgb,
269
- oppositePosition: () => import_canvas28.oppositePosition,
270
- outlineShapeNodeStrokes: () => import_canvas30.outlineShapeNodeStrokes,
271
- outlineStroke: () => import_canvas30.outlineStroke,
272
- overlaps: () => import_canvas31.overlaps,
273
- parseCanvasClipboardData: () => import_canvas31.parseCanvasClipboardData,
274
- parseCanvasScenes: () => import_canvas28.parseCanvasScenes,
275
- parseCssEasing: () => import_canvas34.parseCssEasing,
276
- parseCssGradient: () => import_canvas35.parseCssGradient,
277
- parseKeyframeClipboard: () => import_canvas34.parseKeyframeClipboard,
278
- parseOklab: () => import_canvas34.parseOklab,
279
- parseSvgPath: () => import_canvas29.parseSvgPath,
280
- pasteKeyframes: () => import_canvas34.pasteKeyframes,
281
- pathBoolean: () => import_canvas30.pathBoolean,
282
- pathDataToPolyline: () => import_canvas35.pathDataToPolyline,
283
- placeBeside: () => import_canvas31.placeBeside,
284
- playWebAnimations: () => import_canvas34.playWebAnimations,
285
- pointInBezierPath: () => import_canvas30.pointInBezierPath,
286
- pointInMultiPolygon: () => import_canvas29.pointInMultiPolygon,
287
- pointInRings: () => import_canvas29.pointInRings,
288
- pointerPenSample: () => import_canvas35.pointerPenSample,
289
- polygonArea: () => import_canvas29.polygonArea,
290
- polygonBoolean: () => import_canvas29.polygonBoolean,
291
- polygonToSvgPath: () => import_canvas29.polygonToSvgPath,
292
- positionToSide: () => import_canvas28.positionToSide,
293
- profileAlongPolyline: () => import_canvas35.profileAlongPolyline,
294
- pruneCanvasTokenModes: () => import_canvas33.pruneCanvasTokenModes,
295
- pushCanvasInstanceOverrides: () => import_canvas35.pushCanvasInstanceOverrides,
296
- readAnimatableValue: () => import_canvas34.readAnimatableValue,
297
- readNodeStyleProperty: () => import_canvas33.readNodeStyleProperty,
298
- readStyleSize: () => import_canvas28.readStyleSize,
299
- realClock: () => import_canvas31.realClock,
300
- recordAnimationChanges: () => import_canvas34.recordAnimationChanges,
301
- relayoutUpdates: () => import_canvas32.relayoutUpdates,
302
- remapPastedNodes: () => import_canvas31.remapPastedNodes,
303
- removeCanvasVariant: () => import_canvas35.removeCanvasVariant,
304
- removeTrack: () => import_canvas34.removeTrack,
305
- renameCanvasVariantProperty: () => import_canvas35.renameCanvasVariantProperty,
306
- renameCanvasVariantValue: () => import_canvas35.renameCanvasVariantValue,
307
- renderCanvasBrushSwatch: () => import_canvas35.renderCanvasBrushSwatch,
308
- renderShapeBrushstroke: () => import_canvas35.renderShapeBrushstroke,
309
- reorderNodes: () => import_canvas28.reorderNodes,
310
- repositionNodesTo: () => import_canvas31.repositionNodesTo,
311
- resetCanvasInstanceOverrides: () => import_canvas35.resetCanvasInstanceOverrides,
312
- resizeHandleAxes: () => import_canvas27.resizeHandleAxes,
313
- resolveCanvasGradient: () => import_canvas35.resolveCanvasGradient,
314
- resolveCanvasTokens: () => import_canvas33.resolveCanvasTokens,
315
- resolveEasing: () => import_canvas34.resolveEasing,
316
- resolvePadding: () => import_canvas32.resolvePadding,
317
- restoreCanvasMainComponent: () => import_canvas35.restoreCanvasMainComponent,
318
- revertShapeCombination: () => import_canvas29.revertShapeCombination,
319
- rgbToOklab: () => import_canvas34.rgbToOklab,
320
- ringSignedArea: () => import_canvas29.ringSignedArea,
321
- runMultiNodeTransition: () => import_canvas31.runMultiNodeTransition,
322
- sampleAnimationFrames: () => import_canvas34.sampleAnimationFrames,
323
- scaleKeyframes: () => import_canvas34.scaleKeyframes,
324
- serializeCanvasNodes: () => import_canvas31.serializeCanvasNodes,
325
- setCanvasComponentProperty: () => import_canvas35.setCanvasComponentProperty,
326
- setCanvasInstanceProperties: () => import_canvas35.setCanvasInstanceProperties,
327
- setCanvasTokenMode: () => import_canvas33.setCanvasTokenMode,
328
- setCanvasVariantProperties: () => import_canvas35.setCanvasVariantProperties,
329
- setKeyframe: () => import_canvas34.setKeyframe,
330
- setKeyframeEasing: () => import_canvas34.setKeyframeEasing,
331
- setMotionPath: () => import_canvas34.setMotionPath,
332
- setTrackEnabled: () => import_canvas34.setTrackEnabled,
333
- shapeNodeToBezierPath: () => import_canvas30.shapeNodeToBezierPath,
334
- shapeNodeToPolygon: () => import_canvas29.shapeNodeToPolygon,
335
- shapeToBezierPath: () => import_canvas30.shapeToBezierPath,
336
- shapeToPolygon: () => import_canvas29.shapeToPolygon,
337
- sideToPosition: () => import_canvas28.sideToPosition,
338
- simplifyRing: () => import_canvas29.simplifyRing,
339
- snapKeyframeDelta: () => import_canvas34.snapKeyframeDelta,
340
- snapNodeDrag: () => import_canvas28.snapNodeDrag,
341
- snapNodeResize: () => import_canvas27.snapNodeResize,
342
- snapResize: () => import_canvas27.snapResize,
343
- snapTimeToFrame: () => import_canvas34.snapTimeToFrame,
344
- snapToGrid: () => import_canvas27.snapToGrid,
345
- springAt: () => import_canvas34.springAt,
346
- streamlinePoints: () => import_canvas35.streamlinePoints,
347
- strokeOutlineRings: () => import_canvas30.strokeOutlineRings,
348
- strokePointsToPathData: () => import_canvas35.strokePointsToPathData,
349
- strokeToShapeNode: () => import_canvas35.strokeToShapeNode,
350
- subtractPaths: () => import_canvas30.subtractPaths,
351
- subtractPolygons: () => import_canvas29.subtractPolygons,
352
- swapCanvasInstance: () => import_canvas35.swapCanvasInstance,
353
- syncAllCanvasInstances: () => import_canvas35.syncAllCanvasInstances,
354
- syncCanvasComponents: () => import_canvas35.syncCanvasComponents,
355
- syncCanvasInstance: () => import_canvas35.syncCanvasInstance,
356
- timeToX: () => import_canvas34.timeToX,
357
- toBezierPath: () => import_canvas30.toBezierPath,
358
- toWebAnimations: () => import_canvas34.toWebAnimations,
359
- toggleLockNodes: () => import_canvas28.toggleLockNodes,
360
- transformBezierPath: () => import_canvas30.transformBezierPath,
361
- unionPolygons: () => import_canvas29.unionPolygons,
362
- unitePaths: () => import_canvas30.unitePaths,
363
- unlockNodes: () => import_canvas28.unlockNodes,
364
- updateKeyframe: () => import_canvas34.updateKeyframe,
258
+ mixColorsOklab: () => import_canvas35.mixColorsOklab,
259
+ moveKeyframes: () => import_canvas35.moveKeyframes,
260
+ moveLayoutChild: () => import_canvas33.moveLayoutChild,
261
+ multiPolygonArea: () => import_canvas30.multiPolygonArea,
262
+ multiPolygonBounds: () => import_canvas30.multiPolygonBounds,
263
+ nearestHandlePositions: () => import_canvas29.nearestHandlePositions,
264
+ normalizeBezierPath: () => import_canvas31.normalizeBezierPath,
265
+ normalizeKeyframes: () => import_canvas35.normalizeKeyframes,
266
+ offsetPath: () => import_canvas31.offsetPath,
267
+ offsetShapeNodes: () => import_canvas31.offsetShapeNodes,
268
+ oklabToRgb: () => import_canvas35.oklabToRgb,
269
+ oppositePosition: () => import_canvas29.oppositePosition,
270
+ outlineShapeNodeStrokes: () => import_canvas31.outlineShapeNodeStrokes,
271
+ outlineStroke: () => import_canvas31.outlineStroke,
272
+ overlaps: () => import_canvas32.overlaps,
273
+ parseCanvasClipboardData: () => import_canvas32.parseCanvasClipboardData,
274
+ parseCanvasScenes: () => import_canvas29.parseCanvasScenes,
275
+ parseCssEasing: () => import_canvas35.parseCssEasing,
276
+ parseCssGradient: () => import_canvas36.parseCssGradient,
277
+ parseKeyframeClipboard: () => import_canvas35.parseKeyframeClipboard,
278
+ parseOklab: () => import_canvas35.parseOklab,
279
+ parseSvgPath: () => import_canvas30.parseSvgPath,
280
+ pasteKeyframes: () => import_canvas35.pasteKeyframes,
281
+ pathBoolean: () => import_canvas31.pathBoolean,
282
+ pathDataToPolyline: () => import_canvas36.pathDataToPolyline,
283
+ placeBeside: () => import_canvas32.placeBeside,
284
+ playWebAnimations: () => import_canvas35.playWebAnimations,
285
+ pointInBezierPath: () => import_canvas31.pointInBezierPath,
286
+ pointInMultiPolygon: () => import_canvas30.pointInMultiPolygon,
287
+ pointInRings: () => import_canvas30.pointInRings,
288
+ pointerPenSample: () => import_canvas36.pointerPenSample,
289
+ polygonArea: () => import_canvas30.polygonArea,
290
+ polygonBoolean: () => import_canvas30.polygonBoolean,
291
+ polygonToSvgPath: () => import_canvas30.polygonToSvgPath,
292
+ positionToSide: () => import_canvas29.positionToSide,
293
+ profileAlongPolyline: () => import_canvas36.profileAlongPolyline,
294
+ pruneCanvasTokenModes: () => import_canvas34.pruneCanvasTokenModes,
295
+ pushCanvasInstanceOverrides: () => import_canvas36.pushCanvasInstanceOverrides,
296
+ readAnimatableValue: () => import_canvas35.readAnimatableValue,
297
+ readNodeStyleProperty: () => import_canvas34.readNodeStyleProperty,
298
+ readStyleSize: () => import_canvas29.readStyleSize,
299
+ realClock: () => import_canvas32.realClock,
300
+ recordAnimationChanges: () => import_canvas35.recordAnimationChanges,
301
+ relayoutUpdates: () => import_canvas33.relayoutUpdates,
302
+ remapPastedNodes: () => import_canvas32.remapPastedNodes,
303
+ removeCanvasVariant: () => import_canvas36.removeCanvasVariant,
304
+ removeTrack: () => import_canvas35.removeTrack,
305
+ renameCanvasVariantProperty: () => import_canvas36.renameCanvasVariantProperty,
306
+ renameCanvasVariantValue: () => import_canvas36.renameCanvasVariantValue,
307
+ renderCanvasBrushSwatch: () => import_canvas36.renderCanvasBrushSwatch,
308
+ renderShapeBrushstroke: () => import_canvas36.renderShapeBrushstroke,
309
+ reorderNodes: () => import_canvas29.reorderNodes,
310
+ repositionNodesTo: () => import_canvas32.repositionNodesTo,
311
+ resetCanvasInstanceOverrides: () => import_canvas36.resetCanvasInstanceOverrides,
312
+ resizeHandleAxes: () => import_canvas28.resizeHandleAxes,
313
+ resolveCanvasGradient: () => import_canvas36.resolveCanvasGradient,
314
+ resolveCanvasTokens: () => import_canvas34.resolveCanvasTokens,
315
+ resolveEasing: () => import_canvas35.resolveEasing,
316
+ resolvePadding: () => import_canvas33.resolvePadding,
317
+ restoreCanvasMainComponent: () => import_canvas36.restoreCanvasMainComponent,
318
+ revertShapeCombination: () => import_canvas30.revertShapeCombination,
319
+ rgbToOklab: () => import_canvas35.rgbToOklab,
320
+ ringSignedArea: () => import_canvas30.ringSignedArea,
321
+ runMultiNodeTransition: () => import_canvas32.runMultiNodeTransition,
322
+ sampleAnimationFrames: () => import_canvas35.sampleAnimationFrames,
323
+ scaleKeyframes: () => import_canvas35.scaleKeyframes,
324
+ serializeCanvasNodes: () => import_canvas32.serializeCanvasNodes,
325
+ setCanvasComponentProperty: () => import_canvas36.setCanvasComponentProperty,
326
+ setCanvasInstanceProperties: () => import_canvas36.setCanvasInstanceProperties,
327
+ setCanvasTokenMode: () => import_canvas34.setCanvasTokenMode,
328
+ setCanvasVariantProperties: () => import_canvas36.setCanvasVariantProperties,
329
+ setKeyframe: () => import_canvas35.setKeyframe,
330
+ setKeyframeEasing: () => import_canvas35.setKeyframeEasing,
331
+ setMotionPath: () => import_canvas35.setMotionPath,
332
+ setTrackEnabled: () => import_canvas35.setTrackEnabled,
333
+ shapeNodeToBezierPath: () => import_canvas31.shapeNodeToBezierPath,
334
+ shapeNodeToPolygon: () => import_canvas30.shapeNodeToPolygon,
335
+ shapeToBezierPath: () => import_canvas31.shapeToBezierPath,
336
+ shapeToPolygon: () => import_canvas30.shapeToPolygon,
337
+ sideToPosition: () => import_canvas29.sideToPosition,
338
+ simplifyRing: () => import_canvas30.simplifyRing,
339
+ snapKeyframeDelta: () => import_canvas35.snapKeyframeDelta,
340
+ snapNodeDrag: () => import_canvas29.snapNodeDrag,
341
+ snapNodeResize: () => import_canvas28.snapNodeResize,
342
+ snapResize: () => import_canvas28.snapResize,
343
+ snapTimeToFrame: () => import_canvas35.snapTimeToFrame,
344
+ snapToGrid: () => import_canvas28.snapToGrid,
345
+ springAt: () => import_canvas35.springAt,
346
+ streamlinePoints: () => import_canvas36.streamlinePoints,
347
+ strokeOutlineRings: () => import_canvas31.strokeOutlineRings,
348
+ strokePointsToPathData: () => import_canvas36.strokePointsToPathData,
349
+ strokeToShapeNode: () => import_canvas36.strokeToShapeNode,
350
+ subtractPaths: () => import_canvas31.subtractPaths,
351
+ subtractPolygons: () => import_canvas30.subtractPolygons,
352
+ swapCanvasInstance: () => import_canvas36.swapCanvasInstance,
353
+ syncAllCanvasInstances: () => import_canvas36.syncAllCanvasInstances,
354
+ syncCanvasComponents: () => import_canvas36.syncCanvasComponents,
355
+ syncCanvasInstance: () => import_canvas36.syncCanvasInstance,
356
+ timeToX: () => import_canvas35.timeToX,
357
+ toBezierPath: () => import_canvas31.toBezierPath,
358
+ toWebAnimations: () => import_canvas35.toWebAnimations,
359
+ toggleLockNodes: () => import_canvas29.toggleLockNodes,
360
+ transformBezierPath: () => import_canvas31.transformBezierPath,
361
+ unionPolygons: () => import_canvas30.unionPolygons,
362
+ unitePaths: () => import_canvas31.unitePaths,
363
+ unlockNodes: () => import_canvas29.unlockNodes,
364
+ updateKeyframe: () => import_canvas35.updateKeyframe,
365
365
  useCanvasAnimation: () => useCanvasAnimation,
366
366
  useCanvasArrange: () => useCanvasArrange,
367
367
  useCanvasArrangeShortcuts: () => useCanvasArrangeShortcuts,
@@ -372,6 +372,7 @@ __export(canvas_exports, {
372
372
  useCanvasComponents: () => useCanvasComponents,
373
373
  useCanvasDocking: () => useCanvasDocking,
374
374
  useCanvasDraw: () => useCanvasDraw,
375
+ useCanvasEditorDocument: () => useCanvasEditorDocument,
375
376
  useCanvasEffects: () => useCanvasEffects,
376
377
  useCanvasEffectsProviderContext: () => useCanvasEffectsProviderContext,
377
378
  useCanvasEffectsTools: () => useCanvasEffectsTools,
@@ -390,15 +391,15 @@ __export(canvas_exports, {
390
391
  usePresenceState: () => usePresenceState,
391
392
  useShapeBrushstroke: () => useShapeBrushstroke,
392
393
  useStreamingCanvas: () => useStreamingCanvas,
393
- validateCanvasBrush: () => import_canvas35.validateCanvasBrush,
394
- validateCanvasBrushPaint: () => import_canvas35.validateCanvasBrushPaint,
395
- withNodeAnimation: () => import_canvas34.withNodeAnimation,
396
- withStyleSize: () => import_canvas28.withStyleSize,
397
- wouldCreateComponentCycle: () => import_canvas35.wouldCreateComponentCycle,
398
- wrapAnimationTime: () => import_canvas34.wrapAnimationTime,
399
- writeNodeStyleProperty: () => import_canvas33.writeNodeStyleProperty,
400
- xToTime: () => import_canvas34.xToTime,
401
- xorPolygons: () => import_canvas29.xorPolygons
394
+ validateCanvasBrush: () => import_canvas36.validateCanvasBrush,
395
+ validateCanvasBrushPaint: () => import_canvas36.validateCanvasBrushPaint,
396
+ withNodeAnimation: () => import_canvas35.withNodeAnimation,
397
+ withStyleSize: () => import_canvas29.withStyleSize,
398
+ wouldCreateComponentCycle: () => import_canvas36.wouldCreateComponentCycle,
399
+ wrapAnimationTime: () => import_canvas35.wrapAnimationTime,
400
+ writeNodeStyleProperty: () => import_canvas34.writeNodeStyleProperty,
401
+ xToTime: () => import_canvas35.xToTime,
402
+ xorPolygons: () => import_canvas30.xorPolygons
402
403
  });
403
404
  module.exports = __toCommonJS(canvas_exports);
404
405
 
@@ -1446,6 +1447,45 @@ function useCanvasCapture(options) {
1446
1447
  }, [options.id, options.namespace]);
1447
1448
  }
1448
1449
 
1450
+ // src/canvas/useCanvasEditorDocument.ts
1451
+ var import_react15 = require("react");
1452
+ var import_canvas10 = require("@pixerate/editor/canvas");
1453
+ var contentKey = (nodes, edges) => JSON.stringify([
1454
+ nodes.map(({ selected: _s, dragging: _d, measured: _m, resizing: _r, ...rest }) => rest),
1455
+ edges.map(({ selected: _s, ...rest }) => rest)
1456
+ ]);
1457
+ function useCanvasEditorDocument(options) {
1458
+ const latest = (0, import_react15.useRef)(options);
1459
+ latest.current = options;
1460
+ const listeners = (0, import_react15.useRef)(/* @__PURE__ */ new Set());
1461
+ const doc = (0, import_react15.useMemo)(
1462
+ () => (0, import_canvas10.createCanvasEditorDocument)({
1463
+ getNodes: () => latest.current.nodes,
1464
+ setNodes: (nodes) => latest.current.setNodes(nodes),
1465
+ getEdges: () => latest.current.edges,
1466
+ setEdges: (edges) => latest.current.setEdges(edges),
1467
+ history: options.history,
1468
+ scenes: options.scenes,
1469
+ readOnly: () => latest.current.readOnly?.() ?? false,
1470
+ subscribe: (listener) => {
1471
+ listeners.current.add(listener);
1472
+ return () => listeners.current.delete(listener);
1473
+ }
1474
+ }),
1475
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1476
+ [options.history, options.scenes]
1477
+ );
1478
+ (0, import_react15.useEffect)(() => () => doc.destroy(), [doc]);
1479
+ const lastKey = (0, import_react15.useRef)(null);
1480
+ (0, import_react15.useEffect)(() => {
1481
+ if (options.nodes.some((n) => n.dragging)) return;
1482
+ const key = contentKey(options.nodes, options.edges);
1483
+ if (lastKey.current !== null && key !== lastKey.current) listeners.current.forEach((listener) => listener());
1484
+ lastKey.current = key;
1485
+ }, [options.nodes, options.edges]);
1486
+ return doc;
1487
+ }
1488
+
1449
1489
  // src/canvas/CanvasGuidesLayer.tsx
1450
1490
  var import_jsx_runtime4 = require("react/jsx-runtime");
1451
1491
  var DEFAULT_VIEWPORT = { x: 0, y: 0, zoom: 1 };
@@ -1530,17 +1570,17 @@ function CanvasGuidesLayer({
1530
1570
  }
1531
1571
 
1532
1572
  // src/canvas/useCanvasDraw.ts
1533
- var import_react15 = require("react");
1534
- var import_canvas10 = require("@pixerate/editor/canvas");
1573
+ var import_react16 = require("react");
1574
+ var import_canvas11 = require("@pixerate/editor/canvas");
1535
1575
  function useCanvasDraw(options) {
1536
- const nodesRef = (0, import_react15.useRef)(options.nodes);
1576
+ const nodesRef = (0, import_react16.useRef)(options.nodes);
1537
1577
  nodesRef.current = options.nodes;
1538
- const optionsRef = (0, import_react15.useRef)(options);
1578
+ const optionsRef = (0, import_react16.useRef)(options);
1539
1579
  optionsRef.current = options;
1540
- const [tool, setToolState] = (0, import_react15.useState)(options.initialTool ?? "select");
1541
- const [activeStroke, setActiveStroke] = (0, import_react15.useState)(null);
1542
- const controller = (0, import_react15.useMemo)(
1543
- () => (0, import_canvas10.createCanvasDrawController)({
1580
+ const [tool, setToolState] = (0, import_react16.useState)(options.initialTool ?? "select");
1581
+ const [activeStroke, setActiveStroke] = (0, import_react16.useState)(null);
1582
+ const controller = (0, import_react16.useMemo)(
1583
+ () => (0, import_canvas11.createCanvasDrawController)({
1544
1584
  getNodes: () => nodesRef.current,
1545
1585
  setNodes: (next) => {
1546
1586
  nodesRef.current = next;
@@ -1561,13 +1601,13 @@ function useCanvasDraw(options) {
1561
1601
  }),
1562
1602
  []
1563
1603
  );
1564
- const [style, setStyleState] = (0, import_react15.useState)(controller.style);
1565
- (0, import_react15.useEffect)(() => {
1604
+ const [style, setStyleState] = (0, import_react16.useState)(controller.style);
1605
+ (0, import_react16.useEffect)(() => {
1566
1606
  if (options.initialTool && options.initialTool !== controller.tool) {
1567
1607
  controller.setTool(options.initialTool);
1568
1608
  }
1569
1609
  }, [options.initialTool, controller]);
1570
- return (0, import_react15.useMemo)(
1610
+ return (0, import_react16.useMemo)(
1571
1611
  () => ({
1572
1612
  tool,
1573
1613
  style,
@@ -1588,8 +1628,8 @@ function useCanvasDraw(options) {
1588
1628
  }
1589
1629
 
1590
1630
  // src/canvas/CanvasDrawLayer.tsx
1591
- var import_react16 = require("react");
1592
- var import_canvas11 = require("@pixerate/editor/canvas");
1631
+ var import_react17 = require("react");
1632
+ var import_canvas12 = require("@pixerate/editor/canvas");
1593
1633
  var import_jsx_runtime5 = require("react/jsx-runtime");
1594
1634
  var DEFAULT_VIEWPORT2 = { x: 0, y: 0, zoom: 1 };
1595
1635
  function CanvasDrawLayer({
@@ -1600,10 +1640,10 @@ function CanvasDrawLayer({
1600
1640
  cursor,
1601
1641
  eraserRadius = 12
1602
1642
  }) {
1603
- const svgRef = (0, import_react16.useRef)(null);
1604
- const [spaceHeld, setSpaceHeld] = (0, import_react16.useState)(false);
1605
- const [eraserPos, setEraserPos] = (0, import_react16.useState)(null);
1606
- (0, import_react16.useEffect)(() => {
1643
+ const svgRef = (0, import_react17.useRef)(null);
1644
+ const [spaceHeld, setSpaceHeld] = (0, import_react17.useState)(false);
1645
+ const [eraserPos, setEraserPos] = (0, import_react17.useState)(null);
1646
+ (0, import_react17.useEffect)(() => {
1607
1647
  function onKeyDown(e) {
1608
1648
  if (e.code === "Space" && !e.repeat) {
1609
1649
  const tag = e.target?.tagName;
@@ -1625,7 +1665,7 @@ function CanvasDrawLayer({
1625
1665
  window.removeEventListener("keyup", onKeyUp);
1626
1666
  };
1627
1667
  }, []);
1628
- const clientToFlow = (0, import_react16.useCallback)(
1668
+ const clientToFlow = (0, import_react17.useCallback)(
1629
1669
  (clientX, clientY) => {
1630
1670
  if (!svgRef.current) return [0, 0];
1631
1671
  const rect = svgRef.current.getBoundingClientRect();
@@ -1645,7 +1685,7 @@ function CanvasDrawLayer({
1645
1685
  e.stopPropagation();
1646
1686
  e.target.setPointerCapture?.(e.pointerId);
1647
1687
  const flowPt = clientToFlow(e.clientX, e.clientY);
1648
- draw.startStroke(flowPt, (0, import_canvas11.pointerPenSample)(e));
1688
+ draw.startStroke(flowPt, (0, import_canvas12.pointerPenSample)(e));
1649
1689
  if (draw.tool === "eraser") {
1650
1690
  setEraserPos([e.clientX, e.clientY]);
1651
1691
  }
@@ -1660,7 +1700,7 @@ function CanvasDrawLayer({
1660
1700
  e.stopPropagation();
1661
1701
  const events = draw.style.brush !== void 0 ? e.nativeEvent.getCoalescedEvents?.() ?? [] : [];
1662
1702
  for (const ev of events.length ? events : [e.nativeEvent]) {
1663
- draw.continueStroke(clientToFlow(ev.clientX, ev.clientY), (0, import_canvas11.pointerPenSample)(ev));
1703
+ draw.continueStroke(clientToFlow(ev.clientX, ev.clientY), (0, import_canvas12.pointerPenSample)(ev));
1664
1704
  }
1665
1705
  }
1666
1706
  };
@@ -1678,9 +1718,9 @@ function CanvasDrawLayer({
1678
1718
  setEraserPos(null);
1679
1719
  };
1680
1720
  const resolvedCursor = cursor ? cursor : spaceHeld ? "grab" : draw.tool === "eraser" ? "crosshair" : draw.tool === "pen" || draw.tool === "highlighter" ? "crosshair" : "default";
1681
- const strokePath = draw.activeStroke ? (0, import_canvas11.strokePointsToPathData)(draw.activeStroke.points) : null;
1682
- const activeGradient = draw.activeStroke ? (0, import_canvas11.resolveCanvasGradient)(draw.activeStroke.style.gradient ?? draw.activeStroke.style.color) : null;
1683
- const resolvedGradientDef = activeGradient ? (0, import_canvas11.gradientToSvgDef)(activeGradient, "active-draw-stroke-gradient") : null;
1721
+ const strokePath = draw.activeStroke ? (0, import_canvas12.strokePointsToPathData)(draw.activeStroke.points) : null;
1722
+ const activeGradient = draw.activeStroke ? (0, import_canvas12.resolveCanvasGradient)(draw.activeStroke.style.gradient ?? draw.activeStroke.style.color) : null;
1723
+ const resolvedGradientDef = activeGradient ? (0, import_canvas12.gradientToSvgDef)(activeGradient, "active-draw-stroke-gradient") : null;
1684
1724
  const strokePaint = resolvedGradientDef ? `url(#${resolvedGradientDef.id})` : draw.activeStroke ? draw.activeStroke.style.color : "currentColor";
1685
1725
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1686
1726
  "svg",
@@ -1740,20 +1780,20 @@ function CanvasDrawLayer({
1740
1780
  }
1741
1781
 
1742
1782
  // src/canvas/useCanvasMeasure.ts
1743
- var import_react17 = require("react");
1744
- var import_canvas12 = require("@pixerate/editor/canvas");
1783
+ var import_react18 = require("react");
1784
+ var import_canvas13 = require("@pixerate/editor/canvas");
1745
1785
  var EMPTY = { guides: [], target: null, selection: null };
1746
1786
  function useCanvasMeasure(options) {
1747
1787
  const { nodes, enabled = true, requireModifier = true, targetElement, rectOptions } = options;
1748
- const [hoveredId, setHoveredId] = (0, import_react17.useState)(null);
1749
- const [modifier, setModifier] = (0, import_react17.useState)(false);
1750
- const optionsRef = (0, import_react17.useRef)(options);
1788
+ const [hoveredId, setHoveredId] = (0, import_react18.useState)(null);
1789
+ const [modifier, setModifier] = (0, import_react18.useState)(false);
1790
+ const optionsRef = (0, import_react18.useRef)(options);
1751
1791
  optionsRef.current = options;
1752
- (0, import_react17.useEffect)(() => {
1792
+ (0, import_react18.useEffect)(() => {
1753
1793
  if (!enabled) return;
1754
1794
  const target = targetElement ?? (typeof window !== "undefined" ? window : null);
1755
1795
  if (!target) return;
1756
- const onKey = (event) => setModifier((0, import_canvas12.isMeasureModifierHeld)(event));
1796
+ const onKey = (event) => setModifier((0, import_canvas13.isMeasureModifierHeld)(event));
1757
1797
  const onBlur = () => setModifier(false);
1758
1798
  target.addEventListener("keydown", onKey);
1759
1799
  target.addEventListener("keyup", onKey);
@@ -1766,16 +1806,16 @@ function useCanvasMeasure(options) {
1766
1806
  };
1767
1807
  }, [enabled, targetElement]);
1768
1808
  const active = enabled && (!requireModifier || modifier);
1769
- const result = (0, import_react17.useMemo)(() => {
1809
+ const result = (0, import_react18.useMemo)(() => {
1770
1810
  if (!active) return EMPTY;
1771
1811
  const ids = optionsRef.current.getSelectedIds?.() ?? nodes.filter((n) => n.selected).map((n) => n.id);
1772
- return (0, import_canvas12.measureSelection)(nodes, ids, hoveredId, rectOptions);
1812
+ return (0, import_canvas13.measureSelection)(nodes, ids, hoveredId, rectOptions);
1773
1813
  }, [active, nodes, hoveredId, rectOptions]);
1774
- const onNodeMouseEnter = (0, import_react17.useCallback)((event, node) => {
1814
+ const onNodeMouseEnter = (0, import_react18.useCallback)((event, node) => {
1775
1815
  setHoveredId(node.id);
1776
1816
  if (event && typeof event.altKey === "boolean") setModifier(event.altKey);
1777
1817
  }, []);
1778
- const onNodeMouseLeave = (0, import_react17.useCallback)((_event, node) => {
1818
+ const onNodeMouseLeave = (0, import_react18.useCallback)((_event, node) => {
1779
1819
  setHoveredId((current) => current === node.id ? null : current);
1780
1820
  }, []);
1781
1821
  return {
@@ -1795,39 +1835,39 @@ function useCanvasMeasure(options) {
1795
1835
  }
1796
1836
 
1797
1837
  // src/canvas/index.ts
1798
- var import_canvas27 = require("@pixerate/editor/canvas");
1799
1838
  var import_canvas28 = require("@pixerate/editor/canvas");
1839
+ var import_canvas29 = require("@pixerate/editor/canvas");
1800
1840
 
1801
1841
  // src/canvas/ShapeNode.tsx
1802
- var import_canvas15 = require("@pixerate/editor/canvas");
1842
+ var import_canvas16 = require("@pixerate/editor/canvas");
1803
1843
 
1804
1844
  // src/canvas/useShapeBrushstroke.tsx
1805
- var import_react18 = require("react");
1806
- var import_canvas13 = require("@pixerate/editor/canvas");
1845
+ var import_react19 = require("react");
1846
+ var import_canvas14 = require("@pixerate/editor/canvas");
1807
1847
  var import_jsx_runtime6 = require("react/jsx-runtime");
1808
- var ShapeNodeZoomContext = (0, import_react18.createContext)(1);
1848
+ var ShapeNodeZoomContext = (0, import_react19.createContext)(1);
1809
1849
  function ShapeNodeZoomProvider({ zoom, children }) {
1810
- const bucket = (0, import_canvas13.brushstrokeScaleBucket)(zoom);
1850
+ const bucket = (0, import_canvas14.brushstrokeScaleBucket)(zoom);
1811
1851
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ShapeNodeZoomContext.Provider, { value: bucket, children });
1812
1852
  }
1813
1853
  function useShapeBrushstroke(shape, width, height, position) {
1814
- const zoom = (0, import_react18.useContext)(ShapeNodeZoomContext);
1815
- const brushed = (0, import_canvas13.isBrushedShape)(shape) ? shape : null;
1854
+ const zoom = (0, import_react19.useContext)(ShapeNodeZoomContext);
1855
+ const brushed = (0, import_canvas14.isBrushedShape)(shape) ? shape : null;
1816
1856
  const vb = brushed?.viewBox;
1817
1857
  const nodeScale = vb && width && height && vb[2] > 0 && vb[3] > 0 ? Math.max(width / vb[2], height / vb[3]) : 1;
1818
1858
  const dpr = typeof window !== "undefined" ? window.devicePixelRatio || 1 : 1;
1819
- const scale = (0, import_canvas13.brushstrokeScaleBucket)(zoom * nodeScale, dpr);
1859
+ const scale = (0, import_canvas14.brushstrokeScaleBucket)(zoom * nodeScale, dpr);
1820
1860
  const unit = vb && width && vb[2] > 0 ? width / vb[2] : 1;
1821
1861
  const ox = Math.round((position?.x ?? 0) - (vb?.[0] ?? 0) * unit);
1822
1862
  const oy = Math.round((position?.y ?? 0) - (vb?.[1] ?? 0) * unit);
1823
- const [image, setImage] = (0, import_react18.useState)(null);
1824
- (0, import_react18.useEffect)(() => {
1863
+ const [image, setImage] = (0, import_react19.useState)(null);
1864
+ (0, import_react19.useEffect)(() => {
1825
1865
  if (!brushed) {
1826
1866
  setImage(null);
1827
1867
  return;
1828
1868
  }
1829
1869
  let live = true;
1830
- (0, import_canvas13.renderShapeBrushstroke)(brushed, { scale, origin: { x: ox, y: oy }, unit }).then(
1870
+ (0, import_canvas14.renderShapeBrushstroke)(brushed, { scale, origin: { x: ox, y: oy }, unit }).then(
1831
1871
  (img) => live && setImage(img),
1832
1872
  (error) => {
1833
1873
  if (!live) return;
@@ -1842,12 +1882,12 @@ function useShapeBrushstroke(shape, width, height, position) {
1842
1882
  return image;
1843
1883
  }
1844
1884
  function useCanvasBrushes(options = {}) {
1845
- const [state, setState] = (0, import_react18.useState)({ brushes: [], loading: true, error: null });
1885
+ const [state, setState] = (0, import_react19.useState)({ brushes: [], loading: true, error: null });
1846
1886
  const swatches = options.swatches ? JSON.stringify(options.swatches) : "";
1847
- (0, import_react18.useEffect)(() => {
1887
+ (0, import_react19.useEffect)(() => {
1848
1888
  let live = true;
1849
1889
  const opts = swatches ? JSON.parse(swatches) : null;
1850
- (0, import_canvas13.listCanvasBrushes)().then(async (list) => opts ? Promise.all(list.map(async (b) => ({ ...b, swatch: await (0, import_canvas13.renderCanvasBrushSwatch)(b.id, opts) }))) : list).then(
1890
+ (0, import_canvas14.listCanvasBrushes)().then(async (list) => opts ? Promise.all(list.map(async (b) => ({ ...b, swatch: await (0, import_canvas14.renderCanvasBrushSwatch)(b.id, opts) }))) : list).then(
1851
1891
  (brushes) => live && setState({ brushes, loading: false, error: null }),
1852
1892
  (error) => live && setState({ brushes: [], loading: false, error: error instanceof Error ? error.message : String(error) })
1853
1893
  );
@@ -1855,19 +1895,19 @@ function useCanvasBrushes(options = {}) {
1855
1895
  live = false;
1856
1896
  };
1857
1897
  }, [swatches]);
1858
- return (0, import_react18.useMemo)(() => state, [state]);
1898
+ return (0, import_react19.useMemo)(() => state, [state]);
1859
1899
  }
1860
1900
 
1861
1901
  // src/canvas/CanvasEffects.tsx
1862
- var import_react27 = require("react");
1863
- var import_canvas14 = require("@pixerate/editor/canvas");
1902
+ var import_react28 = require("react");
1903
+ var import_canvas15 = require("@pixerate/editor/canvas");
1864
1904
 
1865
1905
  // src/effects/useEffects.ts
1866
- var import_react19 = require("react");
1906
+ var import_react20 = require("react");
1867
1907
  function useEffectDescription(provider, effect) {
1868
- const [state, setState] = (0, import_react19.useState)({ key: "", description: null, error: null });
1908
+ const [state, setState] = (0, import_react20.useState)({ key: "", description: null, error: null });
1869
1909
  const key = provider && effect ? `${provider.id}:${effect}` : "";
1870
- (0, import_react19.useEffect)(() => {
1910
+ (0, import_react20.useEffect)(() => {
1871
1911
  if (!provider || !effect) return;
1872
1912
  let live = true;
1873
1913
  Promise.resolve().then(() => provider.describe(effect)).then(
@@ -1882,13 +1922,13 @@ function useEffectDescription(provider, effect) {
1882
1922
  }
1883
1923
 
1884
1924
  // src/effects/EffectThumbnail.tsx
1885
- var import_react20 = require("react");
1925
+ var import_react21 = require("react");
1886
1926
  var import_effects = require("@pixerate/editor/effects");
1887
1927
  var import_jsx_runtime7 = require("react/jsx-runtime");
1888
1928
  function EffectThumbnail({ provider, effect, width = 96, height = 54, className = "" }) {
1889
- const ref = (0, import_react20.useRef)(null);
1890
- const [failed, setFailed] = (0, import_react20.useState)(effect.kind === "motion");
1891
- (0, import_react20.useEffect)(() => {
1929
+ const ref = (0, import_react21.useRef)(null);
1930
+ const [failed, setFailed] = (0, import_react21.useState)(effect.kind === "motion");
1931
+ (0, import_react21.useEffect)(() => {
1892
1932
  if (effect.kind === "motion") return;
1893
1933
  let live = true;
1894
1934
  (0, import_effects.renderEffectThumbnail)(provider, effect, { width, height }).then(
@@ -1915,16 +1955,16 @@ function EffectThumbnail({ provider, effect, width = 96, height = 54, className
1915
1955
  }
1916
1956
 
1917
1957
  // src/effects/EffectsBrowser.tsx
1918
- var import_react21 = require("react");
1958
+ var import_react22 = require("react");
1919
1959
  var import_effects2 = require("@pixerate/editor/effects");
1920
1960
  var import_jsx_runtime8 = require("react/jsx-runtime");
1921
1961
  function EffectsBrowser({ provider, uses, kinds, onPick, thumbnails = true, title = "Effects", className = "" }) {
1922
- const [all, setAll] = (0, import_react21.useState)([]);
1923
- const [query, setQuery] = (0, import_react21.useState)("");
1924
- const [category, setCategory] = (0, import_react21.useState)("");
1925
- const [use, setUse] = (0, import_react21.useState)("");
1926
- const [error, setError] = (0, import_react21.useState)(null);
1927
- (0, import_react21.useEffect)(() => {
1962
+ const [all, setAll] = (0, import_react22.useState)([]);
1963
+ const [query, setQuery] = (0, import_react22.useState)("");
1964
+ const [category, setCategory] = (0, import_react22.useState)("");
1965
+ const [use, setUse] = (0, import_react22.useState)("");
1966
+ const [error, setError] = (0, import_react22.useState)(null);
1967
+ (0, import_react22.useEffect)(() => {
1928
1968
  if (!provider) return setAll([]);
1929
1969
  let live = true;
1930
1970
  Promise.resolve().then(() => provider.list()).then(
@@ -1935,8 +1975,8 @@ function EffectsBrowser({ provider, uses, kinds, onPick, thumbnails = true, titl
1935
1975
  live = false;
1936
1976
  };
1937
1977
  }, [provider]);
1938
- const [found, setFound] = (0, import_react21.useState)([]);
1939
- (0, import_react21.useEffect)(() => {
1978
+ const [found, setFound] = (0, import_react22.useState)([]);
1979
+ (0, import_react22.useEffect)(() => {
1940
1980
  if (!provider) return setFound([]);
1941
1981
  let live = true;
1942
1982
  Promise.resolve().then(() => provider.search(query, { ...category ? { category } : {}, ...use ? { use } : {} })).then((list) => live && setFound(list), () => live && setFound([]));
@@ -1945,7 +1985,7 @@ function EffectsBrowser({ provider, uses, kinds, onPick, thumbnails = true, titl
1945
1985
  };
1946
1986
  }, [provider, query, category, use]);
1947
1987
  const allowed = (e) => (!kinds || kinds.includes(e.kind)) && (uses ? e.kind !== "motion" || uses.includes("motion") : e.kind !== "motion") && (!uses || e.uses.some((u) => uses.includes(u)));
1948
- const categories = (0, import_react21.useMemo)(() => [...new Set(all.filter(allowed).map((e) => e.category))], [all, uses, kinds]);
1988
+ const categories = (0, import_react22.useMemo)(() => [...new Set(all.filter(allowed).map((e) => e.category))], [all, uses, kinds]);
1949
1989
  const shown = found.filter(allowed);
1950
1990
  if (!provider)
1951
1991
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: `rounded-md border border-dashed border-border p-3 text-xs text-muted-foreground ${className}`, "data-effects-browser": "", "data-effects-unavailable": "", children: "No effects provider is registered, so effects cannot be added. Effects already in the document are kept." });
@@ -1993,12 +2033,12 @@ function EffectsBrowser({ provider, uses, kinds, onPick, thumbnails = true, titl
1993
2033
  }
1994
2034
 
1995
2035
  // src/effects/EffectParameters.tsx
1996
- var import_react26 = __toESM(require("react"), 1);
2036
+ var import_react27 = __toESM(require("react"), 1);
1997
2037
  var import_effects3 = require("@pixerate/editor/effects");
1998
2038
  var import_parameters2 = require("@pixerate/editor/parameters");
1999
2039
 
2000
2040
  // src/parameters/fields.tsx
2001
- var import_react25 = require("react");
2041
+ var import_react26 = require("react");
2002
2042
  var import_parameters = require("@pixerate/editor/parameters");
2003
2043
 
2004
2044
  // src/color/index.ts
@@ -2011,7 +2051,7 @@ __export(color_exports, {
2011
2051
  });
2012
2052
 
2013
2053
  // src/color/ColorPicker.tsx
2014
- var import_react22 = require("react");
2054
+ var import_react23 = require("react");
2015
2055
  var import_color = require("@pixerate/editor/color");
2016
2056
  var import_jsx_runtime9 = require("react/jsx-runtime");
2017
2057
  var LOCAL_STORAGE_KEY = "pixerate:color:recent";
@@ -2051,24 +2091,24 @@ var ColorPicker = ({
2051
2091
  id,
2052
2092
  "aria-label": ariaLabel = "Color picker"
2053
2093
  }) => {
2054
- const generatedId = (0, import_react22.useId)();
2094
+ const generatedId = (0, import_react23.useId)();
2055
2095
  const pickerId = id || generatedId;
2056
- const [pickerState, setPickerState] = (0, import_react22.useState)(
2096
+ const [pickerState, setPickerState] = (0, import_react23.useState)(
2057
2097
  () => (0, import_color.pickerStateFromColor)(value) ?? DEFAULT_PICKER_STATE
2058
2098
  );
2059
- const stateRef = (0, import_react22.useRef)(pickerState);
2099
+ const stateRef = (0, import_react23.useRef)(pickerState);
2060
2100
  stateRef.current = pickerState;
2061
- (0, import_react22.useEffect)(() => {
2101
+ (0, import_react23.useEffect)(() => {
2062
2102
  const next = (0, import_color.pickerStateFromColor)(value, stateRef.current);
2063
2103
  if (next) {
2064
2104
  setPickerState(next);
2065
2105
  }
2066
2106
  }, [value]);
2067
- const [internalRecent, setInternalRecent] = (0, import_react22.useState)(
2107
+ const [internalRecent, setInternalRecent] = (0, import_react23.useState)(
2068
2108
  () => controlledRecent ? [] : readLocalRecents()
2069
2109
  );
2070
2110
  const activeRecent = controlledRecent ?? internalRecent;
2071
- const recordRecent = (0, import_react22.useCallback)(
2111
+ const recordRecent = (0, import_react23.useCallback)(
2072
2112
  (color) => {
2073
2113
  const updated = (0, import_color.pushRecentColor)(activeRecent, color, 12);
2074
2114
  if (!controlledRecent) {
@@ -2079,11 +2119,11 @@ var ColorPicker = ({
2079
2119
  },
2080
2120
  [activeRecent, controlledRecent, onRecentChange]
2081
2121
  );
2082
- const [textDraft, setTextDraft] = (0, import_react22.useState)(value);
2083
- const [isInvalid, setIsInvalid] = (0, import_react22.useState)(false);
2084
- const [isClipped, setIsClipped] = (0, import_react22.useState)(false);
2085
- const isTypingRef = (0, import_react22.useRef)(false);
2086
- (0, import_react22.useEffect)(() => {
2122
+ const [textDraft, setTextDraft] = (0, import_react23.useState)(value);
2123
+ const [isInvalid, setIsInvalid] = (0, import_react23.useState)(false);
2124
+ const [isClipped, setIsClipped] = (0, import_react23.useState)(false);
2125
+ const isTypingRef = (0, import_react23.useRef)(false);
2126
+ (0, import_react23.useEffect)(() => {
2087
2127
  if (!isTypingRef.current) {
2088
2128
  setTextDraft(value);
2089
2129
  setIsInvalid(false);
@@ -2091,11 +2131,11 @@ var ColorPicker = ({
2091
2131
  setIsClipped(Boolean(parsed && !(0, import_color.inSrgbGamut)(parsed)));
2092
2132
  }
2093
2133
  }, [value]);
2094
- const [hasEyeDropper, setHasEyeDropper] = (0, import_react22.useState)(false);
2095
- (0, import_react22.useEffect)(() => {
2134
+ const [hasEyeDropper, setHasEyeDropper] = (0, import_react23.useState)(false);
2135
+ (0, import_react23.useEffect)(() => {
2096
2136
  setHasEyeDropper(typeof window !== "undefined" && "EyeDropper" in window);
2097
2137
  }, []);
2098
- const emitColorChange = (0, import_react22.useCallback)(
2138
+ const emitColorChange = (0, import_react23.useCallback)(
2099
2139
  (nextState) => {
2100
2140
  setPickerState(nextState);
2101
2141
  const hex = (0, import_color.pickerStateToHex)(nextState, alpha);
@@ -2103,10 +2143,10 @@ var ColorPicker = ({
2103
2143
  },
2104
2144
  [alpha, onChange]
2105
2145
  );
2106
- const latest = (0, import_react22.useRef)({ emitColorChange, recordRecent, onGestureEnd, alpha });
2146
+ const latest = (0, import_react23.useRef)({ emitColorChange, recordRecent, onGestureEnd, alpha });
2107
2147
  latest.current = { emitColorChange, recordRecent, onGestureEnd, alpha };
2108
- const endDragRef = (0, import_react22.useRef)(null);
2109
- (0, import_react22.useEffect)(() => () => endDragRef.current?.(), []);
2148
+ const endDragRef = (0, import_react23.useRef)(null);
2149
+ (0, import_react23.useEffect)(() => () => endDragRef.current?.(), []);
2110
2150
  const startDrag = (e, next) => {
2111
2151
  if (disabled) return;
2112
2152
  e.preventDefault();
@@ -2208,7 +2248,7 @@ var ColorPicker = ({
2208
2248
  } catch {
2209
2249
  }
2210
2250
  };
2211
- const contrastResult = (0, import_react22.useMemo)(() => {
2251
+ const contrastResult = (0, import_react23.useMemo)(() => {
2212
2252
  if (!contrastAgainst) return null;
2213
2253
  const fg = (0, import_color.parseColor)(value);
2214
2254
  const bg = (0, import_color.parseColor)(contrastAgainst);
@@ -2635,7 +2675,7 @@ var ColorPicker = ({
2635
2675
  };
2636
2676
 
2637
2677
  // src/color/DualColorPicker.tsx
2638
- var import_react23 = require("react");
2678
+ var import_react24 = require("react");
2639
2679
  var import_color2 = require("@pixerate/editor/color");
2640
2680
  var import_jsx_runtime10 = require("react/jsx-runtime");
2641
2681
  function DualColorPicker({
@@ -2652,8 +2692,8 @@ function DualColorPicker({
2652
2692
  disabled = false,
2653
2693
  className = ""
2654
2694
  }) {
2655
- const sameId = (0, import_react23.useId)();
2656
- const [internalScheme, setInternalScheme] = (0, import_react23.useState)("light");
2695
+ const sameId = (0, import_react24.useId)();
2696
+ const [internalScheme, setInternalScheme] = (0, import_react24.useState)("light");
2657
2697
  const activeScheme = controlledScheme ?? internalScheme;
2658
2698
  const handleSchemeSelect = (nextScheme) => {
2659
2699
  if (onSchemeChange) {
@@ -2664,7 +2704,7 @@ function DualColorPicker({
2664
2704
  };
2665
2705
  const dual = (0, import_color2.normalizeDualColor)(value) ?? { light: "#000000", dark: "#000000" };
2666
2706
  const isSame = dual.light.toLowerCase() === dual.dark.toLowerCase();
2667
- const [sameInBoth, setSameInBoth] = (0, import_react23.useState)(isSame);
2707
+ const [sameInBoth, setSameInBoth] = (0, import_react24.useState)(isSame);
2668
2708
  const handleSameToggle = (e) => {
2669
2709
  const nextSame = e.target.checked;
2670
2710
  setSameInBoth(nextSame);
@@ -2973,7 +3013,7 @@ function DualColorPicker({
2973
3013
  }
2974
3014
 
2975
3015
  // src/color/useColorScheme.ts
2976
- var import_react24 = require("react");
3016
+ var import_react25 = require("react");
2977
3017
  var import_color3 = require("@pixerate/editor/color");
2978
3018
  function getSnapshot(attribute) {
2979
3019
  if (typeof window === "undefined" || typeof document === "undefined") {
@@ -2998,7 +3038,7 @@ function getServerSnapshot() {
2998
3038
  function useColorScheme(options) {
2999
3039
  const override = options?.override;
3000
3040
  const attribute = options?.attribute;
3001
- const subscribe = (0, import_react24.useMemo)(() => {
3041
+ const subscribe = (0, import_react25.useMemo)(() => {
3002
3042
  return (callback) => {
3003
3043
  if (typeof window === "undefined" || typeof document === "undefined") {
3004
3044
  return () => {
@@ -3024,7 +3064,7 @@ function useColorScheme(options) {
3024
3064
  };
3025
3065
  };
3026
3066
  }, [attribute]);
3027
- const detected = (0, import_react24.useSyncExternalStore)(
3067
+ const detected = (0, import_react25.useSyncExternalStore)(
3028
3068
  subscribe,
3029
3069
  () => getSnapshot(attribute),
3030
3070
  getServerSnapshot
@@ -3104,7 +3144,7 @@ function ParameterNumberInput({
3104
3144
  }
3105
3145
  function ParameterSlider(props) {
3106
3146
  const { field, value, onChange, onGestureStart, onGestureEnd, disabled } = props;
3107
- const dragging = (0, import_react25.useRef)(false);
3147
+ const dragging = (0, import_react26.useRef)(false);
3108
3148
  const end = () => {
3109
3149
  if (!dragging.current) return;
3110
3150
  dragging.current = false;
@@ -3197,17 +3237,17 @@ function ParameterSelect({ field, value, onChange, disabled, id }) {
3197
3237
  );
3198
3238
  }
3199
3239
  function ParameterColor({ field, value, onChange, onGestureStart, onGestureEnd, disabled, id }) {
3200
- const [open, setOpen] = (0, import_react25.useState)(false);
3201
- const containerRef = (0, import_react25.useRef)(null);
3202
- const buttonRef = (0, import_react25.useRef)(null);
3203
- const popoverRef = (0, import_react25.useRef)(null);
3240
+ const [open, setOpen] = (0, import_react26.useState)(false);
3241
+ const containerRef = (0, import_react26.useRef)(null);
3242
+ const buttonRef = (0, import_react26.useRef)(null);
3243
+ const popoverRef = (0, import_react26.useRef)(null);
3204
3244
  const alpha = !!field.alpha;
3205
3245
  const hex = (0, import_parameters.normalizeHexColor)(value, true) ?? "#000000ff";
3206
3246
  const rgb = hex.slice(0, 7);
3207
3247
  const shown = alpha ? hex : rgb;
3208
3248
  const off = disabled || field.readOnly;
3209
3249
  const name = (0, import_parameters.parameterLabel)(field);
3210
- (0, import_react25.useEffect)(() => {
3250
+ (0, import_react26.useEffect)(() => {
3211
3251
  if (!open) return;
3212
3252
  const onPointerDown = (e) => {
3213
3253
  if (containerRef.current && !containerRef.current.contains(e.target)) {
@@ -3417,10 +3457,10 @@ function EffectParameters({
3417
3457
  disabled = false,
3418
3458
  className = ""
3419
3459
  }) {
3420
- const fields = (0, import_react26.useMemo)(() => (0, import_effects3.effectParameterFields)(description), [description]);
3421
- const idBase = (0, import_react26.useId)();
3422
- const gesture = import_react26.default.useRef(null);
3423
- const count = import_react26.default.useRef(0);
3460
+ const fields = (0, import_react27.useMemo)(() => (0, import_effects3.effectParameterFields)(description), [description]);
3461
+ const idBase = (0, import_react27.useId)();
3462
+ const gesture = import_react27.default.useRef(null);
3463
+ const count = import_react27.default.useRef(0);
3424
3464
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: `space-y-2 ${className}`, "data-effect-parameters": description.id, children: [
3425
3465
  (onPreset || onPresetName) && description.presets.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
3426
3466
  "select",
@@ -3478,27 +3518,27 @@ function EffectParameters({
3478
3518
 
3479
3519
  // src/canvas/CanvasEffects.tsx
3480
3520
  var import_jsx_runtime13 = require("react/jsx-runtime");
3481
- var ProviderContext = (0, import_react27.createContext)(null);
3521
+ var ProviderContext = (0, import_react28.createContext)(null);
3482
3522
  function CanvasEffectsProvider({ provider, children }) {
3483
3523
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ProviderContext.Provider, { value: provider ?? null, children });
3484
3524
  }
3485
- var useCanvasEffectsProviderContext = () => (0, import_react27.useContext)(ProviderContext);
3525
+ var useCanvasEffectsProviderContext = () => (0, import_react28.useContext)(ProviderContext);
3486
3526
  function CanvasNodeEffectLayer({ effect, width, height, clipPath, clipTransform }) {
3487
3527
  const provider = useCanvasEffectsProviderContext();
3488
- const ref = (0, import_react27.useRef)(null);
3489
- const [failed, setFailed] = (0, import_react27.useState)(false);
3528
+ const ref = (0, import_react28.useRef)(null);
3529
+ const [failed, setFailed] = (0, import_react28.useState)(false);
3490
3530
  const dpr = typeof window !== "undefined" ? Math.min(2, window.devicePixelRatio || 1) : 1;
3491
3531
  const pw = Math.max(1, Math.round(width * dpr));
3492
3532
  const ph = Math.max(1, Math.round(height * dpr));
3493
3533
  const key = JSON.stringify(effect);
3494
- (0, import_react27.useEffect)(() => {
3534
+ (0, import_react28.useEffect)(() => {
3495
3535
  const canvas2 = ref.current;
3496
3536
  if (!provider || !canvas2) return;
3497
3537
  setFailed(false);
3498
- const run = (0, import_canvas14.runCanvasNodeEffect)({ provider, effect, target: canvas2, onError: () => setFailed(true) });
3538
+ const run = (0, import_canvas15.runCanvasNodeEffect)({ provider, effect, target: canvas2, onError: () => setFailed(true) });
3499
3539
  return () => run.stop();
3500
3540
  }, [provider, key, pw, ph]);
3501
- const clipId = (0, import_react27.useMemo)(() => `pixerate-effect-clip-${Math.random().toString(36).slice(2)}`, []);
3541
+ const clipId = (0, import_react28.useMemo)(() => `pixerate-effect-clip-${Math.random().toString(36).slice(2)}`, []);
3502
3542
  if (!provider || failed || !(width > 0 && height > 0)) return null;
3503
3543
  const style = { position: "absolute", inset: 0, width: "100%", height: "100%", pointerEvents: "none", opacity: effect.opacity ?? 1 };
3504
3544
  const canvas = /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("canvas", { ref, width: pw, height: ph, style: { width: "100%", height: "100%", display: "block" }, "data-canvas-effect": effect.effect });
@@ -3509,10 +3549,10 @@ function CanvasNodeEffectLayer({ effect, width, height, clipPath, clipTransform
3509
3549
  ] });
3510
3550
  }
3511
3551
  function useCanvasEffects(options) {
3512
- const opts = (0, import_react27.useRef)(options);
3552
+ const opts = (0, import_react28.useRef)(options);
3513
3553
  opts.current = options;
3514
- const controller = (0, import_react27.useMemo)(
3515
- () => (0, import_canvas14.createCanvasEffectsController)({
3554
+ const controller = (0, import_react28.useMemo)(
3555
+ () => (0, import_canvas15.createCanvasEffectsController)({
3516
3556
  getNodes: () => opts.current.getNodes(),
3517
3557
  setNodes: (n) => opts.current.setNodes(n),
3518
3558
  history: { execute: (c) => opts.current.history ? opts.current.history.execute(c) : c.execute() },
@@ -3522,7 +3562,7 @@ function useCanvasEffects(options) {
3522
3562
  }),
3523
3563
  []
3524
3564
  );
3525
- (0, import_react27.useEffect)(() => {
3565
+ (0, import_react28.useEffect)(() => {
3526
3566
  if (!options.effects) return;
3527
3567
  return controller.useEffects(options.effects);
3528
3568
  }, [controller, options.effects]);
@@ -3530,15 +3570,15 @@ function useCanvasEffects(options) {
3530
3570
  }
3531
3571
  function useCanvasEffectsTools(registry, controller, options = {}) {
3532
3572
  const { id, namespace, readOnly, subscribe } = options;
3533
- (0, import_react27.useEffect)(() => {
3573
+ (0, import_react28.useEffect)(() => {
3534
3574
  if (!registry) return;
3535
- return registry.register((0, import_canvas14.createCanvasEffectsToolProvider)(controller, { id, namespace, readOnly, subscribe }));
3575
+ return registry.register((0, import_canvas15.createCanvasEffectsToolProvider)(controller, { id, namespace, readOnly, subscribe }));
3536
3576
  }, [registry, controller, id, namespace, readOnly, subscribe]);
3537
3577
  }
3538
3578
  var btn = "rounded border border-border px-1.5 py-0.5 text-[11px] disabled:opacity-40";
3539
3579
  function Controls({ controller, nodeId, effect }) {
3540
3580
  const { description, error } = useEffectDescription(controller.effectsProvider, effect.effect);
3541
- const [message, setMessage] = (0, import_react27.useState)(null);
3581
+ const [message, setMessage] = (0, import_react28.useState)(null);
3542
3582
  const run = (work) => void work.then(() => setMessage(null), (e) => setMessage(e instanceof Error ? e.message : String(e)));
3543
3583
  if (error) return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-[11px] text-amber-500", children: error });
3544
3584
  if (!description) return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-[11px] text-muted-foreground", children: "Loading\u2026" });
@@ -3557,16 +3597,16 @@ function Controls({ controller, nodeId, effect }) {
3557
3597
  ] });
3558
3598
  }
3559
3599
  function CanvasEffectsPanel({ controller, nodeId, shape, sceneId, className = "" }) {
3560
- const [, setTick] = (0, import_react27.useState)(0);
3561
- (0, import_react27.useEffect)(() => controller.effects.subscribe(() => setTick((n) => n + 1)), [controller]);
3600
+ const [, setTick] = (0, import_react28.useState)(0);
3601
+ (0, import_react28.useEffect)(() => controller.effects.subscribe(() => setTick((n) => n + 1)), [controller]);
3562
3602
  const provider = controller.effectsProvider;
3563
- const [browse, setBrowse] = (0, import_react27.useState)(null);
3564
- const [message, setMessage] = (0, import_react27.useState)(null);
3603
+ const [browse, setBrowse] = (0, import_react28.useState)(null);
3604
+ const [message, setMessage] = (0, import_react28.useState)(null);
3565
3605
  const run = (work) => {
3566
3606
  setMessage(null);
3567
3607
  Promise.resolve().then(work).then(() => setTick((n) => n + 1), (e) => setMessage(e instanceof Error ? e.message : String(e)));
3568
3608
  };
3569
- const effect = (0, import_canvas14.isShapeDescription)(shape) ? shape.effect : void 0;
3609
+ const effect = (0, import_canvas15.isShapeDescription)(shape) ? shape.effect : void 0;
3570
3610
  const transition = sceneId ? controller.sceneTransition(sceneId) : void 0;
3571
3611
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("section", { className: `flex flex-col gap-2 text-xs ${className}`, "aria-label": "Canvas effects", "data-canvas-effects": "", children: [
3572
3612
  /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-wrap items-center gap-1", children: [
@@ -3618,9 +3658,9 @@ function CanvasEffectsPanel({ controller, nodeId, shape, sceneId, className = ""
3618
3658
  var import_jsx_runtime14 = require("react/jsx-runtime");
3619
3659
  function ShapeNode({ id, data, width, height, selected, className = "", children, positionAbsoluteX, positionAbsoluteY }) {
3620
3660
  const shape = data?.shape;
3621
- const brushImage = useShapeBrushstroke((0, import_canvas15.isShapeDescription)(shape) ? shape : null, width, height, { x: positionAbsoluteX ?? 0, y: positionAbsoluteY ?? 0 });
3622
- if (!(0, import_canvas15.isShapeDescription)(shape)) return null;
3623
- const render = (0, import_canvas15.getShapeRenderData)(shape, { width, height }, { id: id || data?.id });
3661
+ const brushImage = useShapeBrushstroke((0, import_canvas16.isShapeDescription)(shape) ? shape : null, width, height, { x: positionAbsoluteX ?? 0, y: positionAbsoluteY ?? 0 });
3662
+ if (!(0, import_canvas16.isShapeDescription)(shape)) return null;
3663
+ const render = (0, import_canvas16.getShapeRenderData)(shape, { width, height }, { id: id || data?.id });
3624
3664
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
3625
3665
  "div",
3626
3666
  {
@@ -3683,22 +3723,22 @@ function ShapeNode({ id, data, width, height, selected, className = "", children
3683
3723
  }
3684
3724
 
3685
3725
  // src/canvas/index.ts
3686
- var import_canvas29 = require("@pixerate/editor/canvas");
3687
3726
  var import_canvas30 = require("@pixerate/editor/canvas");
3688
3727
  var import_canvas31 = require("@pixerate/editor/canvas");
3689
3728
  var import_canvas32 = require("@pixerate/editor/canvas");
3729
+ var import_canvas33 = require("@pixerate/editor/canvas");
3690
3730
 
3691
3731
  // src/canvas/useCanvasAutoLayout.ts
3692
- var import_react28 = require("react");
3693
- var import_canvas16 = require("@pixerate/editor/canvas");
3732
+ var import_react29 = require("react");
3733
+ var import_canvas17 = require("@pixerate/editor/canvas");
3694
3734
  function useCanvasAutoLayout(options) {
3695
- const [guides, setGuides] = (0, import_react28.useState)([]);
3696
- const nodesRef = (0, import_react28.useRef)(options.nodes);
3735
+ const [guides, setGuides] = (0, import_react29.useState)([]);
3736
+ const nodesRef = (0, import_react29.useRef)(options.nodes);
3697
3737
  nodesRef.current = options.nodes;
3698
- const optionsRef = (0, import_react28.useRef)(options);
3738
+ const optionsRef = (0, import_react29.useRef)(options);
3699
3739
  optionsRef.current = options;
3700
- const controller = (0, import_react28.useMemo)(
3701
- () => (0, import_canvas16.createCanvasAutoLayoutController)({
3740
+ const controller = (0, import_react29.useMemo)(
3741
+ () => (0, import_canvas17.createCanvasAutoLayoutController)({
3702
3742
  getNodes: () => nodesRef.current,
3703
3743
  setNodes: (next) => {
3704
3744
  nodesRef.current = next;
@@ -3723,10 +3763,10 @@ function useCanvasAutoLayout(options) {
3723
3763
  }),
3724
3764
  []
3725
3765
  );
3726
- (0, import_react28.useLayoutEffect)(() => {
3766
+ (0, import_react29.useLayoutEffect)(() => {
3727
3767
  if (controller.hasPending) controller.flush();
3728
3768
  }, [options.nodes, controller]);
3729
- return (0, import_react28.useMemo)(
3769
+ return (0, import_react29.useMemo)(
3730
3770
  () => ({
3731
3771
  ...controller,
3732
3772
  /** Drop marker of the active reorder drag (flow coordinates). */
@@ -3740,47 +3780,47 @@ function useCanvasAutoLayout(options) {
3740
3780
  }
3741
3781
 
3742
3782
  // src/canvas/useCanvasTokens.ts
3743
- var import_react29 = require("react");
3744
- var import_canvas17 = require("@pixerate/editor/canvas");
3783
+ var import_react30 = require("react");
3784
+ var import_canvas18 = require("@pixerate/editor/canvas");
3745
3785
  function useCanvasTokens(options) {
3746
3786
  const { store, nodes, setNodes, modes, properties } = options;
3747
- const state = (0, import_react29.useSyncExternalStore)(store.subscribe, store.getState, store.getState);
3748
- const latest = (0, import_react29.useRef)({ nodes, setNodes, modes, properties });
3787
+ const state = (0, import_react30.useSyncExternalStore)(store.subscribe, store.getState, store.getState);
3788
+ const latest = (0, import_react30.useRef)({ nodes, setNodes, modes, properties });
3749
3789
  latest.current = { nodes, setNodes, modes, properties };
3750
3790
  const opts = () => ({ modes: latest.current.modes, properties: latest.current.properties });
3751
- (0, import_react29.useEffect)(
3791
+ (0, import_react30.useEffect)(
3752
3792
  () => store.subscribe((event) => {
3753
3793
  if (event.deletedVariableIds.length === 0) return;
3754
- latest.current.setNodes((prev) => (0, import_canvas17.detachTokenBindings)(prev, event.previous, event.deletedVariableIds, opts()));
3794
+ latest.current.setNodes((prev) => (0, import_canvas18.detachTokenBindings)(prev, event.previous, event.deletedVariableIds, opts()));
3755
3795
  }),
3756
3796
  // eslint-disable-next-line react-hooks/exhaustive-deps
3757
3797
  [store]
3758
3798
  );
3759
3799
  const modesKey = JSON.stringify(modes ?? {});
3760
- (0, import_react29.useEffect)(() => {
3761
- const next = (0, import_canvas17.resolveCanvasTokens)(nodes, state, opts());
3800
+ (0, import_react30.useEffect)(() => {
3801
+ const next = (0, import_canvas18.resolveCanvasTokens)(nodes, state, opts());
3762
3802
  if (next !== nodes) setNodes(next);
3763
3803
  }, [nodes, state, modesKey, properties]);
3764
- const bind = (0, import_react29.useCallback)(
3804
+ const bind = (0, import_react30.useCallback)(
3765
3805
  (ids, propertyKey, variableId) => {
3766
- const next = (0, import_canvas17.bindCanvasToken)(latest.current.nodes, ids, propertyKey, variableId, store.getState(), opts());
3806
+ const next = (0, import_canvas18.bindCanvasToken)(latest.current.nodes, ids, propertyKey, variableId, store.getState(), opts());
3767
3807
  if (next !== latest.current.nodes) latest.current.setNodes(next);
3768
3808
  },
3769
3809
  // eslint-disable-next-line react-hooks/exhaustive-deps
3770
3810
  [store]
3771
3811
  );
3772
- const setMode = (0, import_react29.useCallback)(
3812
+ const setMode = (0, import_react30.useCallback)(
3773
3813
  (ids, collectionId, modeId) => {
3774
- const next = (0, import_canvas17.setCanvasTokenMode)(latest.current.nodes, ids, collectionId, modeId, store.getState(), opts());
3814
+ const next = (0, import_canvas18.setCanvasTokenMode)(latest.current.nodes, ids, collectionId, modeId, store.getState(), opts());
3775
3815
  if (next !== latest.current.nodes) latest.current.setNodes(next);
3776
3816
  },
3777
3817
  // eslint-disable-next-line react-hooks/exhaustive-deps
3778
3818
  [store]
3779
3819
  );
3780
- const modesOf = (0, import_react29.useCallback)(
3820
+ const modesOf = (0, import_react30.useCallback)(
3781
3821
  (nodeId) => {
3782
3822
  const node = latest.current.nodes.find((n) => n.id === nodeId);
3783
- return node ? (0, import_canvas17.getEffectiveTokenModes)(node, latest.current.nodes, store.getState(), opts()) : {};
3823
+ return node ? (0, import_canvas18.getEffectiveTokenModes)(node, latest.current.nodes, store.getState(), opts()) : {};
3784
3824
  },
3785
3825
  // eslint-disable-next-line react-hooks/exhaustive-deps
3786
3826
  [store]
@@ -3789,7 +3829,7 @@ function useCanvasTokens(options) {
3789
3829
  }
3790
3830
 
3791
3831
  // src/canvas/TokenBindingPicker.tsx
3792
- var import_canvas18 = require("@pixerate/editor/canvas");
3832
+ var import_canvas19 = require("@pixerate/editor/canvas");
3793
3833
  var import_tokens = require("@pixerate/editor/tokens");
3794
3834
  var import_jsx_runtime15 = require("react/jsx-runtime");
3795
3835
  function TokenBindingPicker({
@@ -3805,14 +3845,14 @@ function TokenBindingPicker({
3805
3845
  const selected = nodes.filter((n) => selectedIds.includes(n.id));
3806
3846
  const first = selected[0];
3807
3847
  if (!first) return null;
3808
- let rows = (0, import_canvas18.getBindableTokenProperties)(first, options);
3848
+ let rows = (0, import_canvas19.getBindableTokenProperties)(first, options);
3809
3849
  if (properties) rows = properties.map((key) => rows.find((p) => p.key === key)).filter((p) => !!p);
3810
- const modes = (0, import_canvas18.getEffectiveTokenModes)(first, nodes, state, options);
3850
+ const modes = (0, import_canvas19.getEffectiveTokenModes)(first, nodes, state, options);
3811
3851
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { "data-token-binding-picker": "", className: `flex flex-col gap-1 text-xs text-foreground ${className}`, children: [
3812
3852
  rows.map((property) => {
3813
- const ids = new Set(selected.map((n) => (0, import_canvas18.getNodeTokenBindings)(n)[property.key] ?? ""));
3853
+ const ids = new Set(selected.map((n) => (0, import_canvas19.getNodeTokenBindings)(n)[property.key] ?? ""));
3814
3854
  const value = ids.size === 1 ? [...ids][0] : "__mixed";
3815
- const candidates = (0, import_canvas18.getTokensForProperty)(state, property, first);
3855
+ const candidates = (0, import_canvas19.getTokensForProperty)(state, property, first);
3816
3856
  const resolved = value && value !== "__mixed" ? (0, import_tokens.resolveToken)(state, value, modes) : null;
3817
3857
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { className: "flex items-center gap-2", "data-token-property": property.key, children: [
3818
3858
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "w-28 shrink-0 text-muted-foreground", children: property.label }),
@@ -3825,7 +3865,7 @@ function TokenBindingPicker({
3825
3865
  onChange: (e) => {
3826
3866
  const id = e.currentTarget.value || null;
3827
3867
  try {
3828
- onChange((0, import_canvas18.bindCanvasToken)(nodes, selectedIds, property.key, id, state, options));
3868
+ onChange((0, import_canvas19.bindCanvasToken)(nodes, selectedIds, property.key, id, state, options));
3829
3869
  } catch (error) {
3830
3870
  onError?.(error);
3831
3871
  }
@@ -3867,9 +3907,9 @@ function TokenModeSwitcher({
3867
3907
  }) {
3868
3908
  const first = nodes.find((n) => nodeIds.includes(n.id));
3869
3909
  if (!first) return null;
3870
- const own = (0, import_canvas18.getNodeTokenModes)(first);
3910
+ const own = (0, import_canvas19.getNodeTokenModes)(first);
3871
3911
  const parent = first.parentId ? nodes.find((n) => n.id === first.parentId) : void 0;
3872
- const inherited = parent ? (0, import_canvas18.getEffectiveTokenModes)(parent, nodes, state, options) : { ...options.modes };
3912
+ const inherited = parent ? (0, import_canvas19.getEffectiveTokenModes)(parent, nodes, state, options) : { ...options.modes };
3873
3913
  const collections = state.collections.filter((c) => showSingleMode || c.modes.length > 1);
3874
3914
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { "data-token-mode-switcher": "", className: `flex flex-col gap-1 text-xs text-foreground ${className}`, children: collections.map((collection) => {
3875
3915
  const auto = (0, import_tokens.getCurrentMode)(collection, inherited);
@@ -3882,7 +3922,7 @@ function TokenModeSwitcher({
3882
3922
  "aria-label": `${collection.name} mode`,
3883
3923
  className: "min-w-0 flex-1 rounded border border-border bg-background px-1 py-0.5 text-xs",
3884
3924
  value: explicit,
3885
- onChange: (e) => onChange((0, import_canvas18.setCanvasTokenMode)(nodes, nodeIds, collection.id, e.currentTarget.value || null, state, options)),
3925
+ onChange: (e) => onChange((0, import_canvas19.setCanvasTokenMode)(nodes, nodeIds, collection.id, e.currentTarget.value || null, state, options)),
3886
3926
  children: [
3887
3927
  /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("option", { value: "", children: [
3888
3928
  "Auto (",
@@ -3898,18 +3938,18 @@ function TokenModeSwitcher({
3898
3938
  }
3899
3939
 
3900
3940
  // src/canvas/index.ts
3901
- var import_canvas33 = require("@pixerate/editor/canvas");
3941
+ var import_canvas34 = require("@pixerate/editor/canvas");
3902
3942
 
3903
3943
  // src/canvas/useCanvasAnimation.ts
3904
- var import_react30 = require("react");
3905
- var import_canvas19 = require("@pixerate/editor/canvas");
3944
+ var import_react31 = require("react");
3945
+ var import_canvas20 = require("@pixerate/editor/canvas");
3906
3946
  function useCanvasAnimation(options) {
3907
- const nodesRef = (0, import_react30.useRef)(options.nodes);
3947
+ const nodesRef = (0, import_react31.useRef)(options.nodes);
3908
3948
  nodesRef.current = options.nodes;
3909
- const optionsRef = (0, import_react30.useRef)(options);
3949
+ const optionsRef = (0, import_react31.useRef)(options);
3910
3950
  optionsRef.current = options;
3911
- const controller = (0, import_react30.useMemo)(
3912
- () => (0, import_canvas19.createCanvasAnimationController)({
3951
+ const controller = (0, import_react31.useMemo)(
3952
+ () => (0, import_canvas20.createCanvasAnimationController)({
3913
3953
  getNodes: () => nodesRef.current,
3914
3954
  setNodes: (next) => {
3915
3955
  nodesRef.current = next;
@@ -3935,26 +3975,26 @@ function useCanvasAnimation(options) {
3935
3975
  }),
3936
3976
  []
3937
3977
  );
3938
- (0, import_react30.useEffect)(() => () => controller.destroy(), [controller]);
3939
- (0, import_react30.useEffect)(() => {
3978
+ (0, import_react31.useEffect)(() => () => controller.destroy(), [controller]);
3979
+ (0, import_react31.useEffect)(() => {
3940
3980
  if (options.loop !== void 0) controller.setLoop(options.loop);
3941
3981
  }, [controller, options.loop]);
3942
- (0, import_react30.useEffect)(() => {
3982
+ (0, import_react31.useEffect)(() => {
3943
3983
  if (options.playbackRate !== void 0) controller.setPlaybackRate(options.playbackRate);
3944
3984
  }, [controller, options.playbackRate]);
3945
- (0, import_react30.useEffect)(() => {
3985
+ (0, import_react31.useEffect)(() => {
3946
3986
  if (options.recording !== void 0) controller.setRecording(options.recording);
3947
3987
  }, [controller, options.recording]);
3948
- const state = (0, import_react30.useSyncExternalStore)(
3988
+ const state = (0, import_react31.useSyncExternalStore)(
3949
3989
  (listener) => controller.subscribe(listener),
3950
3990
  () => controller.getState(),
3951
3991
  () => controller.getState()
3952
3992
  );
3953
- (0, import_react30.useEffect)(() => {
3993
+ (0, import_react31.useEffect)(() => {
3954
3994
  controller.refresh();
3955
3995
  }, [controller, options.nodes]);
3956
- const displayNodes = (0, import_react30.useMemo)(() => controller.display(options.nodes), [controller, options.nodes, state.time]);
3957
- return (0, import_react30.useMemo)(
3996
+ const displayNodes = (0, import_react31.useMemo)(() => controller.display(options.nodes), [controller, options.nodes, state.time]);
3997
+ return (0, import_react31.useMemo)(
3958
3998
  () => ({
3959
3999
  ...controller,
3960
4000
  state,
@@ -3975,8 +4015,8 @@ function useCanvasAnimation(options) {
3975
4015
  }
3976
4016
 
3977
4017
  // src/canvas/AnimationTimeline.tsx
3978
- var import_react31 = require("react");
3979
- var import_canvas20 = require("@pixerate/editor/canvas");
4018
+ var import_react32 = require("react");
4019
+ var import_canvas21 = require("@pixerate/editor/canvas");
3980
4020
  var import_jsx_runtime16 = require("react/jsx-runtime");
3981
4021
  var LOOP_LABELS = { none: "Once", loop: "Loop", "ping-pong": "Ping-pong" };
3982
4022
  var easingValue = (easing) => typeof easing === "string" ? easing : easing ? "custom" : "linear";
@@ -3984,15 +4024,15 @@ function AnimationTimeline({ animation, nodeIds, width = 360, snapThreshold = 8,
3984
4024
  const { state } = animation;
3985
4025
  const duration = state.duration;
3986
4026
  const rows = animation.timelineRows(nodeIds ?? void 0, labelOf ? { labelOf } : {});
3987
- const ticks = (0, import_canvas20.getTimelineTicks)(duration, width);
4027
+ const ticks = (0, import_canvas21.getTimelineTicks)(duration, width);
3988
4028
  const selectedEasing = (() => {
3989
4029
  const first = state.selection[0];
3990
4030
  if (!first) return "";
3991
4031
  for (const row of rows) for (const k of row.keyframes) if (k.selected && k.ref.property === first.property && k.ref.nodeId === first.nodeId) return easingValue(k.easing);
3992
4032
  return "";
3993
4033
  })();
3994
- const dragRef = (0, import_react31.useRef)(null);
3995
- (0, import_react31.useEffect)(() => {
4034
+ const dragRef = (0, import_react32.useRef)(null);
4035
+ (0, import_react32.useEffect)(() => {
3996
4036
  const onKey = (event) => {
3997
4037
  if (event.key === "Escape" && dragRef.current) {
3998
4038
  dragRef.current = null;
@@ -4005,8 +4045,8 @@ function AnimationTimeline({ animation, nodeIds, width = 360, snapThreshold = 8,
4005
4045
  const onRulerDown = (event) => {
4006
4046
  const lane = event.currentTarget;
4007
4047
  const left = lane.getBoundingClientRect().left;
4008
- animation.scrub((0, import_canvas20.xToTime)(event.clientX - left, duration, width));
4009
- const move = (e) => animation.scrub((0, import_canvas20.xToTime)(e.clientX - left, duration, width));
4048
+ animation.scrub((0, import_canvas21.xToTime)(event.clientX - left, duration, width));
4049
+ const move = (e) => animation.scrub((0, import_canvas21.xToTime)(e.clientX - left, duration, width));
4010
4050
  const up = () => {
4011
4051
  window.removeEventListener("pointermove", move);
4012
4052
  window.removeEventListener("pointerup", up);
@@ -4046,7 +4086,7 @@ function AnimationTimeline({ animation, nodeIds, width = 360, snapThreshold = 8,
4046
4086
  }
4047
4087
  };
4048
4088
  const btn2 = "rounded border border-border px-2 py-0.5 text-xs hover:bg-muted disabled:opacity-50";
4049
- const playheadX = (0, import_canvas20.timeToX)(state.time, duration, width);
4089
+ const playheadX = (0, import_canvas21.timeToX)(state.time, duration, width);
4050
4090
  const labelWidth = 120;
4051
4091
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { "data-animation-timeline": "", className: `flex flex-col gap-1 text-xs text-foreground ${className}`, tabIndex: 0, onKeyDown: onTimelineKey, children: [
4052
4092
  /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-wrap items-center gap-2", role: "toolbar", "aria-label": "Animation", children: [
@@ -4065,9 +4105,9 @@ function AnimationTimeline({ animation, nodeIds, width = 360, snapThreshold = 8,
4065
4105
  ),
4066
4106
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { type: "button", className: btn2, "data-action": "add-keyframe", onClick: () => animation.addKeyframe(), children: "\u25C6 Key" }),
4067
4107
  /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { "data-time": "", className: "tabular-nums text-muted-foreground", children: [
4068
- (0, import_canvas20.formatAnimationTime)(state.time),
4108
+ (0, import_canvas21.formatAnimationTime)(state.time),
4069
4109
  " / ",
4070
- (0, import_canvas20.formatAnimationTime)(duration)
4110
+ (0, import_canvas21.formatAnimationTime)(duration)
4071
4111
  ] }),
4072
4112
  /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
4073
4113
  "select",
@@ -4080,7 +4120,7 @@ function AnimationTimeline({ animation, nodeIds, width = 360, snapThreshold = 8,
4080
4120
  onChange: (e) => e.target.value && e.target.value !== "custom" && animation.setEasing(e.target.value),
4081
4121
  children: [
4082
4122
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "", children: "Easing\u2026" }),
4083
- import_canvas20.ANIMATION_EASING_PRESETS.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: preset, children: import_canvas20.ANIMATION_EASING_LABELS[preset] }, preset)),
4123
+ import_canvas21.ANIMATION_EASING_PRESETS.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: preset, children: import_canvas21.ANIMATION_EASING_LABELS[preset] }, preset)),
4084
4124
  selectedEasing === "custom" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "custom", children: "Custom" }) : null
4085
4125
  ]
4086
4126
  }
@@ -4131,17 +4171,17 @@ function AnimationTimeline({ animation, nodeIds, width = 360, snapThreshold = 8,
4131
4171
  ] }),
4132
4172
  /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { "data-lane": "", className: `relative h-5 rounded bg-muted/40 ${row.enabled ? "" : "opacity-50"}`, style: { width }, children: [
4133
4173
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "pointer-events-none absolute top-0 h-5 w-px bg-red-500/60", style: { left: playheadX } }),
4134
- state.drag?.target != null ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { "data-snap-target": "", className: "pointer-events-none absolute top-0 h-5 w-px bg-sky-400", style: { left: (0, import_canvas20.timeToX)(state.drag.target, duration, width) } }) : null,
4174
+ state.drag?.target != null ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { "data-snap-target": "", className: "pointer-events-none absolute top-0 h-5 w-px bg-sky-400", style: { left: (0, import_canvas21.timeToX)(state.drag.target, duration, width) } }) : null,
4135
4175
  row.keyframes.map((k) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
4136
4176
  "button",
4137
4177
  {
4138
4178
  type: "button",
4139
4179
  "data-keyframe": k.ref.time,
4140
4180
  "aria-pressed": k.selected,
4141
- "aria-label": `${row.label} keyframe at ${(0, import_canvas20.formatAnimationTime)(k.ref.time)}`,
4142
- title: `${(0, import_canvas20.formatAnimationTime)(k.time)} \xB7 ${String(k.value)}`,
4181
+ "aria-label": `${row.label} keyframe at ${(0, import_canvas21.formatAnimationTime)(k.ref.time)}`,
4182
+ title: `${(0, import_canvas21.formatAnimationTime)(k.time)} \xB7 ${String(k.value)}`,
4143
4183
  className: `absolute top-1/2 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 rotate-45 border ${k.selected ? "border-sky-300 bg-sky-500" : "border-foreground/60 bg-background"} ${k.easing === "hold" ? "rounded-none" : "rounded-[1px]"}`,
4144
- style: { left: (0, import_canvas20.timeToX)(k.time, duration, width) },
4184
+ style: { left: (0, import_canvas21.timeToX)(k.time, duration, width) },
4145
4185
  onPointerDown: onKeyDown(k.ref)
4146
4186
  },
4147
4187
  k.ref.time
@@ -4152,18 +4192,18 @@ function AnimationTimeline({ animation, nodeIds, width = 360, snapThreshold = 8,
4152
4192
  }
4153
4193
 
4154
4194
  // src/canvas/index.ts
4155
- var import_canvas34 = require("@pixerate/editor/canvas");
4195
+ var import_canvas35 = require("@pixerate/editor/canvas");
4156
4196
 
4157
4197
  // src/canvas/useCanvasComponents.ts
4158
- var import_react32 = require("react");
4159
- var import_canvas21 = require("@pixerate/editor/canvas");
4198
+ var import_react33 = require("react");
4199
+ var import_canvas22 = require("@pixerate/editor/canvas");
4160
4200
  function useCanvasComponents(options) {
4161
- const nodesRef = (0, import_react32.useRef)(options.nodes);
4201
+ const nodesRef = (0, import_react33.useRef)(options.nodes);
4162
4202
  nodesRef.current = options.nodes;
4163
- const optionsRef = (0, import_react32.useRef)(options);
4203
+ const optionsRef = (0, import_react33.useRef)(options);
4164
4204
  optionsRef.current = options;
4165
- const controller = (0, import_react32.useMemo)(
4166
- () => (0, import_canvas21.createCanvasComponentsController)({
4205
+ const controller = (0, import_react33.useMemo)(
4206
+ () => (0, import_canvas22.createCanvasComponentsController)({
4167
4207
  getNodes: () => nodesRef.current,
4168
4208
  setNodes: (next) => {
4169
4209
  nodesRef.current = next;
@@ -4191,15 +4231,15 @@ function useCanvasComponents(options) {
4191
4231
  }),
4192
4232
  []
4193
4233
  );
4194
- (0, import_react32.useLayoutEffect)(() => {
4234
+ (0, import_react33.useLayoutEffect)(() => {
4195
4235
  if (optionsRef.current.autoSync !== false) controller.sync();
4196
4236
  }, [options.nodes, controller]);
4197
4237
  return controller;
4198
4238
  }
4199
4239
 
4200
4240
  // src/canvas/CanvasComponentsPanel.tsx
4201
- var import_react33 = require("react");
4202
- var import_canvas22 = require("@pixerate/editor/canvas");
4241
+ var import_react34 = require("react");
4242
+ var import_canvas23 = require("@pixerate/editor/canvas");
4203
4243
  var import_jsx_runtime17 = require("react/jsx-runtime");
4204
4244
  function InlineField({ value, label, onCommit }) {
4205
4245
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
@@ -4233,11 +4273,11 @@ function CanvasComponentsPanel({
4233
4273
  search = true,
4234
4274
  className = ""
4235
4275
  }) {
4236
- const [query, setQuery] = (0, import_react33.useState)("");
4237
- const [propsOpen, setPropsOpen] = (0, import_react33.useState)(null);
4238
- const [menuFor, setMenuFor] = (0, import_react33.useState)(null);
4239
- const [editing, setEditing] = (0, import_react33.useState)(null);
4240
- const { components: all, sets } = (0, import_canvas22.listCanvasComponents)(nodes);
4276
+ const [query, setQuery] = (0, import_react34.useState)("");
4277
+ const [propsOpen, setPropsOpen] = (0, import_react34.useState)(null);
4278
+ const [menuFor, setMenuFor] = (0, import_react34.useState)(null);
4279
+ const [editing, setEditing] = (0, import_react34.useState)(null);
4280
+ const { components: all, sets } = (0, import_canvas23.listCanvasComponents)(nodes);
4241
4281
  const q = query.trim().toLowerCase();
4242
4282
  const match = (name) => !q || name.toLowerCase().includes(q);
4243
4283
  const lone = all.filter((c) => !c.setId && match(c.name));
@@ -4260,7 +4300,7 @@ function CanvasComponentsPanel({
4260
4300
  onClick: () => onInsert(id),
4261
4301
  onContextMenu,
4262
4302
  onDragStart: (e) => {
4263
- e.dataTransfer.setData(import_canvas22.CANVAS_COMPONENT_DRAG_TYPE, id);
4303
+ e.dataTransfer.setData(import_canvas23.CANVAS_COMPONENT_DRAG_TYPE, id);
4264
4304
  e.dataTransfer.setData("text/plain", name);
4265
4305
  e.dataTransfer.effectAllowed = "copy";
4266
4306
  },
@@ -4454,13 +4494,13 @@ function CanvasInstanceInspector({
4454
4494
  onError,
4455
4495
  className = ""
4456
4496
  }) {
4457
- const info = nodeId ? (0, import_canvas22.inspectCanvasInstance)(nodes, nodeId) : void 0;
4497
+ const info = nodeId ? (0, import_canvas23.inspectCanvasInstance)(nodes, nodeId) : void 0;
4458
4498
  if (!info) return null;
4459
4499
  const report = (result) => {
4460
4500
  if (result && !result.ok && result.reason) onError?.(result.reason);
4461
4501
  };
4462
4502
  const setProp = (name, value) => report(components.setInstanceProperties({ [name]: value }, [info.id]));
4463
- const allComponents = (0, import_canvas22.listCanvasComponents)(nodes).components;
4503
+ const allComponents = (0, import_canvas23.listCanvasComponents)(nodes).components;
4464
4504
  const linked = info.status === "linked";
4465
4505
  const btn2 = "rounded border border-border px-2 py-0.5 text-xs hover:bg-muted disabled:opacity-40";
4466
4506
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { "data-instance-inspector": "", "data-instance-id": info.id, className: `flex flex-col gap-2 text-xs text-foreground ${className}`, children: [
@@ -4563,11 +4603,11 @@ function CanvasInstanceInspector({
4563
4603
  }
4564
4604
 
4565
4605
  // src/canvas/index.ts
4566
- var import_canvas35 = require("@pixerate/editor/canvas");
4606
+ var import_canvas36 = require("@pixerate/editor/canvas");
4567
4607
 
4568
4608
  // src/canvas/MermaidFamilyScene.tsx
4569
- var import_react34 = require("react");
4570
- var import_canvas23 = require("@pixerate/editor/canvas");
4609
+ var import_react35 = require("react");
4610
+ var import_canvas24 = require("@pixerate/editor/canvas");
4571
4611
  var import_jsx_runtime18 = require("react/jsx-runtime");
4572
4612
  function MermaidFamilyScene({
4573
4613
  scene,
@@ -4581,7 +4621,7 @@ function MermaidFamilyScene({
4581
4621
  style,
4582
4622
  title
4583
4623
  }) {
4584
- const uid = (0, import_react34.useId)().replace(/:/g, "");
4624
+ const uid = (0, import_react35.useId)().replace(/:/g, "");
4585
4625
  const marker = (kind) => kind ? `url(#${uid}-${kind})` : void 0;
4586
4626
  const x = scene.x - padding;
4587
4627
  const y = scene.y - padding;
@@ -4674,7 +4714,7 @@ function MermaidFamilyScene({
4674
4714
  x: mark.x,
4675
4715
  y: mark.y,
4676
4716
  textAnchor: mark.anchor,
4677
- dominantBaseline: (0, import_canvas23.diagramTextBaseline)(mark.baseline),
4717
+ dominantBaseline: (0, import_canvas24.diagramTextBaseline)(mark.baseline),
4678
4718
  transform: mark.rotate ? `rotate(${mark.rotate} ${mark.x} ${mark.y})` : void 0,
4679
4719
  style: {
4680
4720
  fill: mark.selected ? selectionColor : mark.fill,
@@ -4695,14 +4735,14 @@ function MermaidFamilyScene({
4695
4735
  }
4696
4736
 
4697
4737
  // src/canvas/useMermaidDiagram.ts
4698
- var import_react35 = require("react");
4738
+ var import_react36 = require("react");
4699
4739
  var import_diagram = require("@pixerate/editor/diagram");
4700
- var import_canvas24 = require("@pixerate/editor/canvas");
4740
+ var import_canvas25 = require("@pixerate/editor/canvas");
4701
4741
  function useDiagramState(controller) {
4702
- return (0, import_react35.useSyncExternalStore)(controller.subscribe, controller.getState, controller.getState);
4742
+ return (0, import_react36.useSyncExternalStore)(controller.subscribe, controller.getState, controller.getState);
4703
4743
  }
4704
4744
  function useMermaidDiagram(controllerOrOptions = {}, view = {}) {
4705
- const own = (0, import_react35.useRef)(null);
4745
+ const own = (0, import_react36.useRef)(null);
4706
4746
  let controller;
4707
4747
  if (controllerOrOptions instanceof import_diagram.DiagramController) controller = controllerOrOptions;
4708
4748
  else {
@@ -4712,26 +4752,26 @@ function useMermaidDiagram(controllerOrOptions = {}, view = {}) {
4712
4752
  const layoutOptions = (controllerOrOptions instanceof import_diagram.DiagramController ? void 0 : controllerOrOptions.layoutOptions) ?? view.layoutOptions;
4713
4753
  const sceneTheme = (controllerOrOptions instanceof import_diagram.DiagramController ? void 0 : controllerOrOptions.sceneTheme) ?? view.sceneTheme;
4714
4754
  const state = useDiagramState(controller);
4715
- const editorDocument = (0, import_react35.useMemo)(() => (0, import_diagram.createDiagramEditorDocument)(controller), [controller]);
4716
- (0, import_react35.useEffect)(() => () => editorDocument.destroy(), [editorDocument]);
4717
- const canvas = (0, import_react35.useMemo)(
4718
- () => (0, import_canvas24.mermaidToCanvas)(state.document, { ...layoutOptions, editable: state.editable }),
4755
+ const editorDocument = (0, import_react36.useMemo)(() => (0, import_diagram.createDiagramEditorDocument)(controller), [controller]);
4756
+ (0, import_react36.useEffect)(() => () => editorDocument.destroy(), [editorDocument]);
4757
+ const canvas = (0, import_react36.useMemo)(
4758
+ () => (0, import_canvas25.mermaidToCanvas)(state.document, { ...layoutOptions, editable: state.editable }),
4719
4759
  // eslint-disable-next-line react-hooks/exhaustive-deps
4720
4760
  [state.document, state.editable]
4721
4761
  );
4722
- const scene = (0, import_react35.useMemo)(
4723
- () => state.document.tier === "editable" ? (0, import_canvas24.familySceneFromLayout)(state.document.family, state.document.graph, canvas.layout, { theme: { ...import_canvas24.CSS_VARIABLE_DIAGRAM_SCENE_THEME, ...sceneTheme }, selection: state.selection }) : null,
4762
+ const scene = (0, import_react36.useMemo)(
4763
+ () => state.document.tier === "editable" ? (0, import_canvas25.familySceneFromLayout)(state.document.family, state.document.graph, canvas.layout, { theme: { ...import_canvas25.CSS_VARIABLE_DIAGRAM_SCENE_THEME, ...sceneTheme }, selection: state.selection }) : null,
4724
4764
  // eslint-disable-next-line react-hooks/exhaustive-deps
4725
4765
  [state.document, canvas.layout, state.selection]
4726
4766
  );
4727
- const layoutRef = (0, import_react35.useRef)(canvas.layout);
4767
+ const layoutRef = (0, import_react36.useRef)(canvas.layout);
4728
4768
  layoutRef.current = canvas.layout;
4729
- const actions = (0, import_react35.useMemo)(
4769
+ const actions = (0, import_react36.useMemo)(
4730
4770
  () => ({
4731
4771
  apply: (ops, label) => controller.apply(ops, label),
4732
4772
  load: (source, options) => controller.load(source, options),
4733
4773
  moveNodes: (moved, all = moved) => {
4734
- const op = (0, import_canvas24.mermaidMovesFromCanvas)(layoutRef.current, moved, all, { stored: controller.getDocument().meta.layout ?? {} });
4774
+ const op = (0, import_canvas25.mermaidMovesFromCanvas)(layoutRef.current, moved, all, { stored: controller.getDocument().meta.layout ?? {} });
4735
4775
  return op ? controller.apply(op, "Move") : null;
4736
4776
  },
4737
4777
  connect: (source, target, label) => controller.apply({ type: "addEdge", edge: { source, target, ...label ? { label } : {} } }, "Connect"),
@@ -4750,7 +4790,7 @@ function useMermaidDiagram(controllerOrOptions = {}, view = {}) {
4750
4790
  "Rename"
4751
4791
  ),
4752
4792
  renameTarget: (target, label) => {
4753
- const op = (0, import_canvas24.diagramRenameOp)(controller.getDocument(), target, label);
4793
+ const op = (0, import_canvas25.diagramRenameOp)(controller.getDocument(), target, label);
4754
4794
  return op ? controller.apply(op, "Rename") : null;
4755
4795
  },
4756
4796
  select: (ids) => controller.select(ids),
@@ -4763,13 +4803,13 @@ function useMermaidDiagram(controllerOrOptions = {}, view = {}) {
4763
4803
  }
4764
4804
  function useMermaidStream(source, options = {}) {
4765
4805
  const { complete = false, duration = 300, ...layoutOptions } = options;
4766
- const stream = (0, import_react35.useRef)(null);
4767
- if (!stream.current) stream.current = new import_canvas24.DiagramStream(layoutOptions);
4768
- const result = (0, import_react35.useMemo)(() => stream.current.update(source, complete), [source, complete]);
4769
- const [shown, setShown] = (0, import_react35.useState)({ layout: result.layout, settled: true });
4770
- const shownRef = (0, import_react35.useRef)(shown.layout);
4806
+ const stream = (0, import_react36.useRef)(null);
4807
+ if (!stream.current) stream.current = new import_canvas25.DiagramStream(layoutOptions);
4808
+ const result = (0, import_react36.useMemo)(() => stream.current.update(source, complete), [source, complete]);
4809
+ const [shown, setShown] = (0, import_react36.useState)({ layout: result.layout, settled: true });
4810
+ const shownRef = (0, import_react36.useRef)(shown.layout);
4771
4811
  shownRef.current = shown.layout;
4772
- (0, import_react35.useEffect)(() => {
4812
+ (0, import_react36.useEffect)(() => {
4773
4813
  const target = result.layout;
4774
4814
  if (!target) return setShown({ layout: null, settled: true });
4775
4815
  const from = shownRef.current;
@@ -4779,14 +4819,14 @@ function useMermaidStream(source, options = {}) {
4779
4819
  const start = performance.now();
4780
4820
  const step = () => {
4781
4821
  const t = Math.min(1, (performance.now() - start) / duration);
4782
- setShown({ layout: (0, import_canvas24.blendDiagramLayout)(from, target, (0, import_canvas24.easeDiagramTween)(t)), settled: t >= 1 });
4822
+ setShown({ layout: (0, import_canvas25.blendDiagramLayout)(from, target, (0, import_canvas25.easeDiagramTween)(t)), settled: t >= 1 });
4783
4823
  if (t < 1) frame = requestAnimationFrame(step);
4784
4824
  };
4785
4825
  frame = requestAnimationFrame(step);
4786
4826
  return () => cancelAnimationFrame(frame);
4787
4827
  }, [result.layout, duration]);
4788
4828
  const doc = result.document.tier === "editable" ? result.document : null;
4789
- const canvas = (0, import_react35.useMemo)(() => {
4829
+ const canvas = (0, import_react36.useMemo)(() => {
4790
4830
  if (!doc || !shown.layout) return { nodes: [], edges: [] };
4791
4831
  const placed = new Set(Object.keys(shown.layout.positions));
4792
4832
  const graph = {
@@ -4795,23 +4835,23 @@ function useMermaidStream(source, options = {}) {
4795
4835
  groups: doc.graph.groups.filter((g) => placed.has(g.id)),
4796
4836
  edges: doc.graph.edges.filter((e) => placed.has(e.source) && placed.has(e.target))
4797
4837
  };
4798
- return (0, import_canvas24.mermaidToCanvas)({ ...doc, graph }, { layout: shown.layout });
4838
+ return (0, import_canvas25.mermaidToCanvas)({ ...doc, graph }, { layout: shown.layout });
4799
4839
  }, [doc, shown.layout]);
4800
4840
  return { document: doc, ...canvas, layout: shown.layout, settled: shown.settled };
4801
4841
  }
4802
4842
 
4803
4843
  // src/canvas/MermaidDiagramNode.tsx
4804
- var import_canvas25 = require("@pixerate/editor/canvas");
4844
+ var import_canvas26 = require("@pixerate/editor/canvas");
4805
4845
  var import_jsx_runtime19 = require("react/jsx-runtime");
4806
4846
  function mermaidNodeStyle(styles = {}, selected = false) {
4807
- const paint = (0, import_canvas25.mermaidNodePaint)(styles, selected);
4847
+ const paint = (0, import_canvas26.mermaidNodePaint)(styles, selected);
4808
4848
  const { color, "stroke-width": strokeWidth, "stroke-dasharray": strokeDasharray, ...vars } = paint;
4809
4849
  return { ...vars, color, strokeWidth, strokeDasharray };
4810
4850
  }
4811
4851
  function MermaidDiagramNode({ data, width = 160, height = 56, selected, className = "", children }) {
4812
4852
  const node = data.node;
4813
4853
  if (!node) return null;
4814
- const members = (0, import_canvas25.mermaidNodeMembers)(node.data);
4854
+ const members = (0, import_canvas26.mermaidNodeMembers)(node.data);
4815
4855
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
4816
4856
  "div",
4817
4857
  {
@@ -4820,13 +4860,13 @@ function MermaidDiagramNode({ data, width = 160, height = 56, selected, classNam
4820
4860
  "data-selected": selected ? "true" : void 0,
4821
4861
  style: { position: "relative", width: "100%", height: "100%", ...mermaidNodeStyle(data.resolvedStyles, selected) },
4822
4862
  children: [
4823
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("svg", { viewBox: `0 0 ${width} ${height}`, preserveAspectRatio: "none", width: "100%", height: "100%", style: { position: "absolute", inset: 0, overflow: "visible" }, "aria-hidden": "true", children: (0, import_canvas25.mermaidShapePaths)(node.shape, width, height).map((path, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: path.d, style: { ...import_canvas25.MERMAID_SHAPE_PAINT[path.paint], vectorEffect: "non-scaling-stroke" } }, i)) }),
4863
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("svg", { viewBox: `0 0 ${width} ${height}`, preserveAspectRatio: "none", width: "100%", height: "100%", style: { position: "absolute", inset: 0, overflow: "visible" }, "aria-hidden": "true", children: (0, import_canvas26.mermaidShapePaths)(node.shape, width, height).map((path, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: path.d, style: { ...import_canvas26.MERMAID_SHAPE_PAINT[path.paint], vectorEffect: "non-scaling-stroke" } }, i)) }),
4824
4864
  /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
4825
4865
  "div",
4826
4866
  {
4827
4867
  style: { position: "relative", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: members.length ? "flex-start" : "center", height: "100%", padding: "6px 10px", boxSizing: "border-box", fontSize: 13, lineHeight: 1.3, textAlign: "center", pointerEvents: "none" },
4828
4868
  children: [
4829
- (0, import_canvas25.mermaidLabelLines)(node.label).map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { style: { fontWeight: members.length ? 600 : void 0 }, children: line }, i)),
4869
+ (0, import_canvas26.mermaidLabelLines)(node.label).map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { style: { fontWeight: members.length ? 600 : void 0 }, children: line }, i)),
4830
4870
  members.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { style: { alignSelf: "stretch", marginTop: 4, paddingTop: 4, borderTop: "1px solid var(--pixerate-diagram-node-border)", textAlign: "left", fontSize: 12 }, children: members.map((m, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { children: m }, i)) })
4831
4871
  ]
4832
4872
  }
@@ -4854,7 +4894,7 @@ function MermaidDiagramGroup({ data, selected, className = "", children }) {
4854
4894
  color: data.resolvedStyles?.color ?? "var(--muted-foreground, #475569)"
4855
4895
  },
4856
4896
  children: [
4857
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { style: { padding: "6px 10px", fontSize: 12, fontWeight: 600 }, children: (0, import_canvas25.mermaidLabelLines)(group.label).join(" ") }),
4897
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { style: { padding: "6px 10px", fontSize: 12, fontWeight: 600 }, children: (0, import_canvas26.mermaidLabelLines)(group.label).join(" ") }),
4858
4898
  children
4859
4899
  ]
4860
4900
  }
@@ -4862,15 +4902,15 @@ function MermaidDiagramGroup({ data, selected, className = "", children }) {
4862
4902
  }
4863
4903
 
4864
4904
  // src/canvas/MermaidThumbnail.tsx
4865
- var import_react36 = require("react");
4905
+ var import_react37 = require("react");
4866
4906
  var import_diagram2 = require("@pixerate/editor/diagram");
4867
- var import_canvas26 = require("@pixerate/editor/canvas");
4907
+ var import_canvas27 = require("@pixerate/editor/canvas");
4868
4908
  var import_jsx_runtime20 = require("react/jsx-runtime");
4869
4909
  function MermaidThumbnail({ source, className = "", fallback = null, ...options }) {
4870
- const doc = (0, import_react36.useMemo)(() => typeof source === "string" ? (0, import_diagram2.parseMermaid)(source) : source, [source]);
4910
+ const doc = (0, import_react37.useMemo)(() => typeof source === "string" ? (0, import_diagram2.parseMermaid)(source) : source, [source]);
4871
4911
  const key = JSON.stringify(options);
4872
- const drawn = (0, import_react36.useMemo)(
4873
- () => doc.tier === "editable" && doc.graph.nodes.length ? (0, import_canvas26.mermaidThumbnailSvg)(doc, options) : null,
4912
+ const drawn = (0, import_react37.useMemo)(
4913
+ () => doc.tier === "editable" && doc.graph.nodes.length ? (0, import_canvas27.mermaidThumbnailSvg)(doc, options) : null,
4874
4914
  // eslint-disable-next-line react-hooks/exhaustive-deps
4875
4915
  [doc, key]
4876
4916
  );
@@ -4879,12 +4919,12 @@ function MermaidThumbnail({ source, className = "", fallback = null, ...options
4879
4919
  }
4880
4920
 
4881
4921
  // src/canvas/useDiagramDirector.ts
4882
- var import_react37 = require("react");
4922
+ var import_react38 = require("react");
4883
4923
  var import_diagram3 = require("@pixerate/editor/diagram");
4884
4924
  function useDiagramDirector(controller, options) {
4885
- const placement = (0, import_react37.useRef)(options.placement);
4925
+ const placement = (0, import_react38.useRef)(options.placement);
4886
4926
  placement.current = options.placement;
4887
- const ref = (0, import_react37.useRef)(null);
4927
+ const ref = (0, import_react38.useRef)(null);
4888
4928
  if (!ref.current) {
4889
4929
  const presence = new import_diagram3.PresenceStore();
4890
4930
  ref.current = {
@@ -4895,7 +4935,7 @@ function useDiagramDirector(controller, options) {
4895
4935
  return ref.current;
4896
4936
  }
4897
4937
  function usePresenceState(presence) {
4898
- return (0, import_react37.useSyncExternalStore)(presence.subscribe, presence.getState, presence.getState);
4938
+ return (0, import_react38.useSyncExternalStore)(presence.subscribe, presence.getState, presence.getState);
4899
4939
  }
4900
4940
 
4901
4941
  // src/canvas/DiagramPresenceLayer.tsx
@@ -5251,6 +5291,7 @@ function DiagramPresenceLayer({ presence, viewport, className = "" }) {
5251
5291
  useCanvasComponents,
5252
5292
  useCanvasDocking,
5253
5293
  useCanvasDraw,
5294
+ useCanvasEditorDocument,
5254
5295
  useCanvasEffects,
5255
5296
  useCanvasEffectsProviderContext,
5256
5297
  useCanvasEffectsTools,