@pixerate/editor-react 0.166.0 → 0.167.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/canvas/index.cjs
CHANGED
|
@@ -31,23 +31,24 @@ 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: () =>
|
|
35
|
-
ANIMATION_DATA_KEY: () =>
|
|
36
|
-
ANIMATION_EASING_LABELS: () =>
|
|
37
|
-
ANIMATION_EASING_PRESETS: () =>
|
|
38
|
-
ANIMATION_TIME_EPSILON: () =>
|
|
39
|
-
AUTO_LAYOUT_DATA_KEY: () =>
|
|
34
|
+
ANIMATABLE_PROPERTIES: () => import_canvas38.ANIMATABLE_PROPERTIES,
|
|
35
|
+
ANIMATION_DATA_KEY: () => import_canvas38.ANIMATION_DATA_KEY,
|
|
36
|
+
ANIMATION_EASING_LABELS: () => import_canvas38.ANIMATION_EASING_LABELS,
|
|
37
|
+
ANIMATION_EASING_PRESETS: () => import_canvas38.ANIMATION_EASING_PRESETS,
|
|
38
|
+
ANIMATION_TIME_EPSILON: () => import_canvas38.ANIMATION_TIME_EPSILON,
|
|
39
|
+
AUTO_LAYOUT_DATA_KEY: () => import_canvas36.AUTO_LAYOUT_DATA_KEY,
|
|
40
40
|
AgentPresenceLayer: () => AgentPresenceLayer,
|
|
41
|
-
AnimationEditError: () =>
|
|
42
|
-
AnimationPlayer: () =>
|
|
41
|
+
AnimationEditError: () => import_canvas38.AnimationEditError,
|
|
42
|
+
AnimationPlayer: () => import_canvas38.AnimationPlayer,
|
|
43
43
|
AnimationTimeline: () => AnimationTimeline,
|
|
44
|
-
CANVAS_COMPONENT_DRAG_TYPE: () =>
|
|
45
|
-
CANVAS_GRADIENT_PRESETS: () =>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
CANVAS_COMPONENT_DRAG_TYPE: () => import_canvas39.CANVAS_COMPONENT_DRAG_TYPE,
|
|
45
|
+
CANVAS_GRADIENT_PRESETS: () => import_canvas39.CANVAS_GRADIENT_PRESETS,
|
|
46
|
+
CANVAS_PROPOSAL_CLASS: () => import_canvas40.CANVAS_PROPOSAL_CLASS,
|
|
47
|
+
CANVAS_TOKEN_PROPERTIES: () => import_canvas37.CANVAS_TOKEN_PROPERTIES,
|
|
48
|
+
CHILD_LAYOUT_DATA_KEY: () => import_canvas36.CHILD_LAYOUT_DATA_KEY,
|
|
49
|
+
CONNECTION_LINE_TYPES: () => import_canvas32.CONNECTION_LINE_TYPES,
|
|
50
|
+
CSS_ANIMATION_PROPERTIES: () => import_canvas38.CSS_ANIMATION_PROPERTIES,
|
|
51
|
+
CUBIC_BEZIER_PRESETS: () => import_canvas38.CUBIC_BEZIER_PRESETS,
|
|
51
52
|
CanvasComponentsPanel: () => CanvasComponentsPanel,
|
|
52
53
|
CanvasDrawLayer: () => CanvasDrawLayer,
|
|
53
54
|
CanvasEffectsPanel: () => CanvasEffectsPanel,
|
|
@@ -55,326 +56,330 @@ __export(canvas_exports, {
|
|
|
55
56
|
CanvasGuidesLayer: () => CanvasGuidesLayer,
|
|
56
57
|
CanvasInstanceInspector: () => CanvasInstanceInspector,
|
|
57
58
|
CanvasNodeEffectLayer: () => CanvasNodeEffectLayer,
|
|
58
|
-
CanvasScenesStore: () =>
|
|
59
|
-
DEFAULT_ARRANGE_SHORTCUTS: () =>
|
|
59
|
+
CanvasScenesStore: () => import_canvas32.CanvasScenesStore,
|
|
60
|
+
DEFAULT_ARRANGE_SHORTCUTS: () => import_canvas32.DEFAULT_ARRANGE_SHORTCUTS,
|
|
60
61
|
DiagramPresenceLayer: () => DiagramPresenceLayer,
|
|
61
|
-
MAX_KEYFRAME_REFS: () =>
|
|
62
|
-
ManualClock: () =>
|
|
62
|
+
MAX_KEYFRAME_REFS: () => import_canvas38.MAX_KEYFRAME_REFS,
|
|
63
|
+
ManualClock: () => import_canvas35.ManualClock,
|
|
63
64
|
MermaidDiagramGroup: () => MermaidDiagramGroup,
|
|
64
65
|
MermaidDiagramNode: () => MermaidDiagramNode,
|
|
65
66
|
MermaidFamilyScene: () => MermaidFamilyScene,
|
|
66
67
|
MermaidThumbnail: () => MermaidThumbnail,
|
|
67
68
|
PresenceLayer: () => PresenceLayer,
|
|
68
|
-
RESIZE_HANDLES: () =>
|
|
69
|
-
SHAPE_DATA_KEY: () =>
|
|
70
|
-
SHAPE_KINDS: () =>
|
|
71
|
-
SHAPE_NODE_TYPE: () =>
|
|
72
|
-
SHAPE_OPERATIONS: () =>
|
|
69
|
+
RESIZE_HANDLES: () => import_canvas31.RESIZE_HANDLES,
|
|
70
|
+
SHAPE_DATA_KEY: () => import_canvas33.SHAPE_DATA_KEY,
|
|
71
|
+
SHAPE_KINDS: () => import_canvas33.SHAPE_KINDS,
|
|
72
|
+
SHAPE_NODE_TYPE: () => import_canvas33.SHAPE_NODE_TYPE,
|
|
73
|
+
SHAPE_OPERATIONS: () => import_canvas33.SHAPE_OPERATIONS,
|
|
73
74
|
ShapeNode: () => ShapeNode,
|
|
74
75
|
ShapeNodeZoomContext: () => ShapeNodeZoomContext,
|
|
75
76
|
ShapeNodeZoomProvider: () => ShapeNodeZoomProvider,
|
|
76
|
-
TOKEN_BINDINGS_DATA_KEY: () =>
|
|
77
|
-
TOKEN_MODES_DATA_KEY: () =>
|
|
77
|
+
TOKEN_BINDINGS_DATA_KEY: () => import_canvas37.TOKEN_BINDINGS_DATA_KEY,
|
|
78
|
+
TOKEN_MODES_DATA_KEY: () => import_canvas37.TOKEN_MODES_DATA_KEY,
|
|
78
79
|
TokenBindingPicker: () => TokenBindingPicker,
|
|
79
80
|
TokenModeSwitcher: () => TokenModeSwitcher,
|
|
80
|
-
addCanvasVariant: () =>
|
|
81
|
-
addKeyframesAtTime: () =>
|
|
82
|
-
alignNodes: () =>
|
|
83
|
-
angleToSvgLinearCoords: () =>
|
|
84
|
-
animateNode: () =>
|
|
85
|
-
applyAnimation: () =>
|
|
86
|
-
applyAnimationOverrides: () =>
|
|
87
|
-
applyConstraints: () =>
|
|
88
|
-
applyNodeUpdates: () =>
|
|
89
|
-
applyShapeCombination: () =>
|
|
90
|
-
applyShapeReplacement: () =>
|
|
91
|
-
bezierPathArea: () =>
|
|
92
|
-
bezierPathBounds: () =>
|
|
93
|
-
bezierPathLength: () =>
|
|
94
|
-
bezierPathPointAtLength: () =>
|
|
95
|
-
bezierPathSignedArea: () =>
|
|
96
|
-
bezierPathToSvg: () =>
|
|
97
|
-
bindCanvasComponentProperty: () =>
|
|
98
|
-
bindCanvasToken: () =>
|
|
99
|
-
blendLayout: () =>
|
|
100
|
-
boundsOf: () =>
|
|
101
|
-
brushstrokeScaleBucket: () =>
|
|
102
|
-
brushstrokeSeed: () =>
|
|
103
|
-
calculateDagreReflowDisplacement: () =>
|
|
104
|
-
calculateDirectionalDisplacement: () =>
|
|
105
|
-
calculateReflowDisplacement: () =>
|
|
106
|
-
canCombineShapeNodes: () =>
|
|
107
|
-
canOffsetShapeNodes: () =>
|
|
108
|
-
canOutlineShapeNodeStrokes: () =>
|
|
109
|
-
canvasExplosionToolTarget: () =>
|
|
110
|
-
canvasHeight: () =>
|
|
111
|
-
centerNodes: () =>
|
|
112
|
-
centre: () =>
|
|
113
|
-
clampAnimationValue: () =>
|
|
114
|
-
clampLayoutSize: () =>
|
|
115
|
-
combineCanvasComponentsAsVariants: () =>
|
|
116
|
-
combineShapeNodes: () =>
|
|
117
|
-
computeCanvasExplosionLayout: () =>
|
|
118
|
-
computeNodesBoundingBox: () =>
|
|
119
|
-
computeSnapGuides: () =>
|
|
120
|
-
connectedOnly: () =>
|
|
121
|
-
copyKeyframes: () =>
|
|
122
|
-
countPathSegments: () =>
|
|
123
|
-
createAnimationPlayer: () =>
|
|
124
|
-
createBezierTrajectory: () =>
|
|
125
|
-
createCanvasAnimationController: () =>
|
|
126
|
-
createCanvasAutoLayoutController: () =>
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
81
|
+
addCanvasVariant: () => import_canvas39.addCanvasVariant,
|
|
82
|
+
addKeyframesAtTime: () => import_canvas38.addKeyframesAtTime,
|
|
83
|
+
alignNodes: () => import_canvas32.alignNodes,
|
|
84
|
+
angleToSvgLinearCoords: () => import_canvas39.angleToSvgLinearCoords,
|
|
85
|
+
animateNode: () => import_canvas38.animateNode,
|
|
86
|
+
applyAnimation: () => import_canvas38.applyAnimation,
|
|
87
|
+
applyAnimationOverrides: () => import_canvas38.applyAnimationOverrides,
|
|
88
|
+
applyConstraints: () => import_canvas36.applyConstraints,
|
|
89
|
+
applyNodeUpdates: () => import_canvas32.applyNodeUpdates,
|
|
90
|
+
applyShapeCombination: () => import_canvas33.applyShapeCombination,
|
|
91
|
+
applyShapeReplacement: () => import_canvas34.applyShapeReplacement,
|
|
92
|
+
bezierPathArea: () => import_canvas34.bezierPathArea,
|
|
93
|
+
bezierPathBounds: () => import_canvas34.bezierPathBounds,
|
|
94
|
+
bezierPathLength: () => import_canvas34.bezierPathLength,
|
|
95
|
+
bezierPathPointAtLength: () => import_canvas34.bezierPathPointAtLength,
|
|
96
|
+
bezierPathSignedArea: () => import_canvas34.bezierPathSignedArea,
|
|
97
|
+
bezierPathToSvg: () => import_canvas34.bezierPathToSvg,
|
|
98
|
+
bindCanvasComponentProperty: () => import_canvas39.bindCanvasComponentProperty,
|
|
99
|
+
bindCanvasToken: () => import_canvas37.bindCanvasToken,
|
|
100
|
+
blendLayout: () => import_canvas35.blendLayout,
|
|
101
|
+
boundsOf: () => import_canvas35.boundsOf,
|
|
102
|
+
brushstrokeScaleBucket: () => import_canvas39.brushstrokeScaleBucket,
|
|
103
|
+
brushstrokeSeed: () => import_canvas39.brushstrokeSeed,
|
|
104
|
+
calculateDagreReflowDisplacement: () => import_canvas35.calculateDagreReflowDisplacement,
|
|
105
|
+
calculateDirectionalDisplacement: () => import_canvas35.calculateDirectionalDisplacement,
|
|
106
|
+
calculateReflowDisplacement: () => import_canvas35.calculateReflowDisplacement,
|
|
107
|
+
canCombineShapeNodes: () => import_canvas33.canCombineShapeNodes,
|
|
108
|
+
canOffsetShapeNodes: () => import_canvas34.canOffsetShapeNodes,
|
|
109
|
+
canOutlineShapeNodeStrokes: () => import_canvas34.canOutlineShapeNodeStrokes,
|
|
110
|
+
canvasExplosionToolTarget: () => import_canvas30.canvasExplosionToolTarget,
|
|
111
|
+
canvasHeight: () => import_canvas35.canvasHeight,
|
|
112
|
+
centerNodes: () => import_canvas35.centerNodes,
|
|
113
|
+
centre: () => import_canvas35.centre,
|
|
114
|
+
clampAnimationValue: () => import_canvas38.clampAnimationValue,
|
|
115
|
+
clampLayoutSize: () => import_canvas36.clampLayoutSize,
|
|
116
|
+
combineCanvasComponentsAsVariants: () => import_canvas39.combineCanvasComponentsAsVariants,
|
|
117
|
+
combineShapeNodes: () => import_canvas33.combineShapeNodes,
|
|
118
|
+
computeCanvasExplosionLayout: () => import_canvas30.computeCanvasExplosionLayout,
|
|
119
|
+
computeNodesBoundingBox: () => import_canvas35.computeNodesBoundingBox,
|
|
120
|
+
computeSnapGuides: () => import_canvas32.computeSnapGuides,
|
|
121
|
+
connectedOnly: () => import_canvas35.connectedOnly,
|
|
122
|
+
copyKeyframes: () => import_canvas38.copyKeyframes,
|
|
123
|
+
countPathSegments: () => import_canvas34.countPathSegments,
|
|
124
|
+
createAnimationPlayer: () => import_canvas38.createAnimationPlayer,
|
|
125
|
+
createBezierTrajectory: () => import_canvas35.createBezierTrajectory,
|
|
126
|
+
createCanvasAnimationController: () => import_canvas38.createCanvasAnimationController,
|
|
127
|
+
createCanvasAutoLayoutController: () => import_canvas36.createCanvasAutoLayoutController,
|
|
128
|
+
createCanvasChangeFeed: () => import_canvas40.createCanvasChangeFeed,
|
|
129
|
+
createCanvasComponent: () => import_canvas39.createCanvasComponent,
|
|
130
|
+
createCanvasComponentsController: () => import_canvas39.createCanvasComponentsController,
|
|
131
|
+
createCanvasDrawController: () => import_canvas39.createCanvasDrawController,
|
|
132
|
+
createCanvasExplosionStateController: () => import_canvas30.createCanvasExplosionStateController,
|
|
133
|
+
createCanvasExplosionToolProvider: () => import_canvas30.createCanvasExplosionToolProvider,
|
|
134
|
+
createCanvasInstance: () => import_canvas39.createCanvasInstance,
|
|
135
|
+
createCanvasProposalToolProvider: () => import_canvas40.createCanvasProposalToolProvider,
|
|
136
|
+
createCanvasProposals: () => import_canvas40.createCanvasProposals,
|
|
137
|
+
createCanvasScenesStore: () => import_canvas32.createCanvasScenesStore,
|
|
138
|
+
createDefaultStrokeStyle: () => import_canvas39.createDefaultStrokeStyle,
|
|
139
|
+
createFanOutTrajectory: () => import_canvas35.createFanOutTrajectory,
|
|
140
|
+
createGuideIndex: () => import_canvas32.createGuideIndex,
|
|
141
|
+
createNodeGuideIndex: () => import_canvas32.createNodeGuideIndex,
|
|
142
|
+
cubicBezierAt: () => import_canvas38.cubicBezierAt,
|
|
143
|
+
cubicPointAt: () => import_canvas31.cubicPointAt,
|
|
144
|
+
cubicsToPathData: () => import_canvas31.cubicsToPathData,
|
|
145
|
+
dashContours: () => import_canvas34.dashContours,
|
|
146
|
+
defaultEasing: () => import_canvas35.defaultEasing,
|
|
147
|
+
deleteKeyframes: () => import_canvas38.deleteKeyframes,
|
|
148
|
+
detachCanvasInstance: () => import_canvas39.detachCanvasInstance,
|
|
149
|
+
detachTokenBindings: () => import_canvas37.detachTokenBindings,
|
|
150
|
+
distanceToBezierPath: () => import_canvas34.distanceToBezierPath,
|
|
151
|
+
distributeNodes: () => import_canvas32.distributeNodes,
|
|
152
|
+
dividePaths: () => import_canvas34.dividePaths,
|
|
153
|
+
dividePolygons: () => import_canvas33.dividePolygons,
|
|
154
|
+
easingFromInfluence: () => import_canvas38.easingFromInfluence,
|
|
155
|
+
easingLabel: () => import_canvas38.easingLabel,
|
|
156
|
+
easingToCss: () => import_canvas38.easingToCss,
|
|
157
|
+
ensureLayout: () => import_canvas35.ensureLayout,
|
|
158
|
+
estimateCanvasHeight: () => import_canvas35.estimateCanvasHeight,
|
|
159
|
+
estimateNodeSize: () => import_canvas35.estimateNodeSize,
|
|
160
|
+
evaluateAnimation: () => import_canvas38.evaluateAnimation,
|
|
161
|
+
evaluateEasing: () => import_canvas38.evaluateEasing,
|
|
162
|
+
evaluateTrack: () => import_canvas38.evaluateTrack,
|
|
163
|
+
excludePaths: () => import_canvas34.excludePaths,
|
|
164
|
+
explosionEdgeId: () => import_canvas30.explosionEdgeId,
|
|
165
|
+
exportCssAnimation: () => import_canvas38.exportCssAnimation,
|
|
166
|
+
findConnectorSnap: () => import_canvas32.findConnectorSnap,
|
|
167
|
+
findStrokesAtPoint: () => import_canvas39.findStrokesAtPoint,
|
|
168
|
+
fitCubicRun: () => import_canvas31.fitCubicRun,
|
|
169
|
+
fitCubics: () => import_canvas31.fitCubics,
|
|
170
|
+
fitFreehandPath: () => import_canvas31.fitFreehandPath,
|
|
171
|
+
fitPathData: () => import_canvas31.fitPathData,
|
|
172
|
+
fitViewportToNodes: () => import_canvas32.fitViewportToNodes,
|
|
173
|
+
fitViewportToRect: () => import_canvas32.fitViewportToRect,
|
|
174
|
+
flattenSvgPath: () => import_canvas33.flattenSvgPath,
|
|
175
|
+
flowSide: () => import_canvas35.flowSide,
|
|
176
|
+
formatAnimationTime: () => import_canvas38.formatAnimationTime,
|
|
177
|
+
formatOklab: () => import_canvas38.formatOklab,
|
|
178
|
+
freehandBrushstroke: () => import_canvas39.freehandBrushstroke,
|
|
179
|
+
getAbsolutePosition: () => import_canvas32.getAbsolutePosition,
|
|
180
|
+
getAnimatableProperty: () => import_canvas38.getAnimatableProperty,
|
|
181
|
+
getAnimatedProperties: () => import_canvas38.getAnimatedProperties,
|
|
182
|
+
getAnimatedValue: () => import_canvas38.getAnimatedValue,
|
|
183
|
+
getAnimationDuration: () => import_canvas38.getAnimationDuration,
|
|
184
|
+
getAnimationTrack: () => import_canvas38.getAnimationTrack,
|
|
185
|
+
getAutoLayout: () => import_canvas36.getAutoLayout,
|
|
186
|
+
getAutoLayoutGrid: () => import_canvas36.getAutoLayoutGrid,
|
|
187
|
+
getAutoLayoutInsertTarget: () => import_canvas36.getAutoLayoutInsertTarget,
|
|
188
|
+
getBindableTokenProperties: () => import_canvas37.getBindableTokenProperties,
|
|
189
|
+
getBrushedShapeSvg: () => import_canvas39.getBrushedShapeSvg,
|
|
190
|
+
getCanvasComponentDragId: () => import_canvas39.getCanvasComponentDragId,
|
|
191
|
+
getCanvasTokenProperty: () => import_canvas37.getCanvasTokenProperty,
|
|
192
|
+
getCenteredNodePosition: () => import_canvas35.getCenteredNodePosition,
|
|
193
|
+
getChildLayout: () => import_canvas36.getChildLayout,
|
|
194
|
+
getComponentSourceId: () => import_canvas39.getComponentSourceId,
|
|
195
|
+
getCssPropertyAnimations: () => import_canvas38.getCssPropertyAnimations,
|
|
196
|
+
getEffectiveTokenModes: () => import_canvas37.getEffectiveTokenModes,
|
|
197
|
+
getFlowChildren: () => import_canvas36.getFlowChildren,
|
|
198
|
+
getInstanceData: () => import_canvas39.getInstanceData,
|
|
199
|
+
getInstanceStatus: () => import_canvas39.getInstanceStatus,
|
|
200
|
+
getKeyframeTimes: () => import_canvas38.getKeyframeTimes,
|
|
201
|
+
getLayoutParent: () => import_canvas36.getLayoutParent,
|
|
202
|
+
getLayoutSizing: () => import_canvas36.getLayoutSizing,
|
|
203
|
+
getLayoutedNodes: () => import_canvas35.getLayoutedNodes,
|
|
204
|
+
getNextVariantValues: () => import_canvas39.getNextVariantValues,
|
|
205
|
+
getNodeAnimation: () => import_canvas38.getNodeAnimation,
|
|
206
|
+
getNodeOverrides: () => import_canvas39.getNodeOverrides,
|
|
207
|
+
getNodeRect: () => import_canvas32.getNodeRect,
|
|
208
|
+
getNodeShape: () => import_canvas33.getNodeShape,
|
|
209
|
+
getNodeSize: () => import_canvas32.getNodeSize,
|
|
210
|
+
getNodeTokenBindings: () => import_canvas37.getNodeTokenBindings,
|
|
211
|
+
getNodeTokenModes: () => import_canvas37.getNodeTokenModes,
|
|
212
|
+
getResizingNodeRect: () => import_canvas31.getResizingNodeRect,
|
|
213
|
+
getShapeRenderData: () => import_canvas33.getShapeRenderData,
|
|
214
|
+
getShapeSvg: () => import_canvas33.getShapeSvg,
|
|
215
|
+
getTimelineRows: () => import_canvas38.getTimelineRows,
|
|
216
|
+
getTimelineTicks: () => import_canvas38.getTimelineTicks,
|
|
217
|
+
getTokenPropertyScope: () => import_canvas37.getTokenPropertyScope,
|
|
218
|
+
getTokensForProperty: () => import_canvas37.getTokensForProperty,
|
|
219
|
+
gradientToSvgDef: () => import_canvas39.gradientToSvgDef,
|
|
220
|
+
handlePoint: () => import_canvas32.handlePoint,
|
|
221
|
+
hasVisibleStroke: () => import_canvas34.hasVisibleStroke,
|
|
222
|
+
inferResizeHandle: () => import_canvas31.inferResizeHandle,
|
|
223
|
+
inspectCanvasInstance: () => import_canvas39.inspectCanvasInstance,
|
|
224
|
+
inspectNodeTokens: () => import_canvas37.inspectNodeTokens,
|
|
225
|
+
interpolateAnimationValue: () => import_canvas38.interpolateAnimationValue,
|
|
226
|
+
intersectPaths: () => import_canvas34.intersectPaths,
|
|
227
|
+
intersectPolygons: () => import_canvas33.intersectPolygons,
|
|
228
|
+
invertNodeUpdates: () => import_canvas32.invertNodeUpdates,
|
|
229
|
+
isAnimationEasing: () => import_canvas38.isAnimationEasing,
|
|
230
|
+
isAnimationKeyframe: () => import_canvas38.isAnimationKeyframe,
|
|
231
|
+
isAutoLayoutFrame: () => import_canvas36.isAutoLayoutFrame,
|
|
232
|
+
isBrushedShape: () => import_canvas39.isBrushedShape,
|
|
233
|
+
isCanvasComponent: () => import_canvas39.isCanvasComponent,
|
|
234
|
+
isCanvasComponentSet: () => import_canvas39.isCanvasComponentSet,
|
|
235
|
+
isCanvasGradient: () => import_canvas39.isCanvasGradient,
|
|
236
|
+
isCanvasInstance: () => import_canvas39.isCanvasInstance,
|
|
237
|
+
isCssExportExact: () => import_canvas38.isCssExportExact,
|
|
238
|
+
isEventFromTextInput: () => import_canvas35.isEventFromTextInput,
|
|
239
|
+
isKeyframeSelected: () => import_canvas38.isKeyframeSelected,
|
|
240
|
+
isLocked: () => import_canvas32.isLocked,
|
|
241
|
+
isMeasureModifierHeld: () => import_canvas31.isMeasureModifierHeld,
|
|
242
|
+
isNodeAnimated: () => import_canvas38.isNodeAnimated,
|
|
243
|
+
isShapeDescription: () => import_canvas33.isShapeDescription,
|
|
244
|
+
isShapeNode: () => import_canvas33.isShapeNode,
|
|
245
|
+
isStraightCubic: () => import_canvas31.isStraightCubic,
|
|
246
|
+
isValidCanvasNode: () => import_canvas35.isValidCanvasNode,
|
|
247
|
+
isValidUrl: () => import_canvas35.isValidUrl,
|
|
248
|
+
layoutAll: () => import_canvas36.layoutAll,
|
|
249
|
+
layoutBounds: () => import_canvas35.layoutBounds,
|
|
250
|
+
layoutFrame: () => import_canvas36.layoutFrame,
|
|
251
|
+
layoutUp: () => import_canvas36.layoutUp,
|
|
252
|
+
layoutUpMany: () => import_canvas36.layoutUpMany,
|
|
253
|
+
linearPositionTrajectory: () => import_canvas35.linearPositionTrajectory,
|
|
254
|
+
linearTrajectory: () => import_canvas35.linearTrajectory,
|
|
255
|
+
listCanvasBrushes: () => import_canvas39.listCanvasBrushes,
|
|
256
|
+
listCanvasComponents: () => import_canvas39.listCanvasComponents,
|
|
257
|
+
loadCanvasBrushstrokeRenderer: () => import_canvas39.loadCanvasBrushstrokeRenderer,
|
|
258
|
+
lockNodes: () => import_canvas32.lockNodes,
|
|
259
|
+
makeSizingCoherent: () => import_canvas36.makeSizingCoherent,
|
|
260
|
+
matchArrangeShortcut: () => import_canvas32.matchArrangeShortcut,
|
|
261
|
+
matchSize: () => import_canvas32.matchSize,
|
|
262
|
+
measureBetween: () => import_canvas31.measureBetween,
|
|
263
|
+
measureLabel: () => import_canvas31.measureLabel,
|
|
264
|
+
measureSelection: () => import_canvas31.measureSelection,
|
|
265
|
+
measureToLine: () => import_canvas31.measureToLine,
|
|
266
|
+
mergeNodeUpdates: () => import_canvas36.mergeNodeUpdates,
|
|
263
267
|
mermaidNodeStyle: () => mermaidNodeStyle,
|
|
264
|
-
mixColorsOklab: () =>
|
|
265
|
-
moveKeyframes: () =>
|
|
266
|
-
moveLayoutChild: () =>
|
|
267
|
-
multiPolygonArea: () =>
|
|
268
|
-
multiPolygonBounds: () =>
|
|
269
|
-
nearestHandlePositions: () =>
|
|
270
|
-
nodeSizeOf: () =>
|
|
271
|
-
normalizeBezierPath: () =>
|
|
272
|
-
normalizeKeyframes: () =>
|
|
273
|
-
offsetPath: () =>
|
|
274
|
-
offsetShapeNodes: () =>
|
|
275
|
-
oklabToRgb: () =>
|
|
276
|
-
oppositePosition: () =>
|
|
277
|
-
outlineShapeNodeStrokes: () =>
|
|
278
|
-
outlineStroke: () =>
|
|
279
|
-
overlaps: () =>
|
|
280
|
-
parseCanvasClipboardData: () =>
|
|
281
|
-
parseCanvasScenes: () =>
|
|
282
|
-
parseCssEasing: () =>
|
|
283
|
-
parseCssGradient: () =>
|
|
284
|
-
parseKeyframeClipboard: () =>
|
|
285
|
-
parseOklab: () =>
|
|
286
|
-
parseSvgPath: () =>
|
|
287
|
-
pasteKeyframes: () =>
|
|
288
|
-
pathBoolean: () =>
|
|
289
|
-
pathDataToPolyline: () =>
|
|
290
|
-
placeBeside: () =>
|
|
291
|
-
playWebAnimations: () =>
|
|
292
|
-
pointInBezierPath: () =>
|
|
293
|
-
pointInMultiPolygon: () =>
|
|
294
|
-
pointInRings: () =>
|
|
295
|
-
pointerPenSample: () =>
|
|
296
|
-
polygonArea: () =>
|
|
297
|
-
polygonBoolean: () =>
|
|
298
|
-
polygonToSvgPath: () =>
|
|
299
|
-
positionToSide: () =>
|
|
300
|
-
profileAlongPolyline: () =>
|
|
301
|
-
pruneCanvasTokenModes: () =>
|
|
302
|
-
pushCanvasInstanceOverrides: () =>
|
|
303
|
-
readAnimatableValue: () =>
|
|
304
|
-
readNodeStyleProperty: () =>
|
|
305
|
-
readStyleSize: () =>
|
|
306
|
-
realClock: () =>
|
|
307
|
-
recordAnimationChanges: () =>
|
|
308
|
-
relayoutUpdates: () =>
|
|
309
|
-
remapPastedNodes: () =>
|
|
310
|
-
removeCanvasVariant: () =>
|
|
311
|
-
removeTrack: () =>
|
|
312
|
-
renameCanvasVariantProperty: () =>
|
|
313
|
-
renameCanvasVariantValue: () =>
|
|
314
|
-
renderCanvasBrushSwatch: () =>
|
|
315
|
-
renderShapeBrushstroke: () =>
|
|
316
|
-
reorderNodes: () =>
|
|
317
|
-
repositionNodesTo: () =>
|
|
318
|
-
resetCanvasInstanceOverrides: () =>
|
|
319
|
-
resizeHandleAxes: () =>
|
|
320
|
-
resolveCanvasGradient: () =>
|
|
321
|
-
resolveCanvasTokens: () =>
|
|
322
|
-
resolveEasing: () =>
|
|
323
|
-
resolvePadding: () =>
|
|
324
|
-
restoreCanvasMainComponent: () =>
|
|
325
|
-
revertShapeCombination: () =>
|
|
326
|
-
rgbToOklab: () =>
|
|
327
|
-
ringSignedArea: () =>
|
|
328
|
-
runMultiNodeTransition: () =>
|
|
329
|
-
sampleAnimationFrames: () =>
|
|
330
|
-
scaleKeyframes: () =>
|
|
331
|
-
serializeCanvasNodes: () =>
|
|
332
|
-
setCanvasComponentProperty: () =>
|
|
333
|
-
setCanvasInstanceProperties: () =>
|
|
334
|
-
setCanvasTokenMode: () =>
|
|
335
|
-
setCanvasVariantProperties: () =>
|
|
336
|
-
setKeyframe: () =>
|
|
337
|
-
setKeyframeEasing: () =>
|
|
338
|
-
setMotionPath: () =>
|
|
339
|
-
setTrackEnabled: () =>
|
|
340
|
-
shapeNodeToBezierPath: () =>
|
|
341
|
-
shapeNodeToPolygon: () =>
|
|
342
|
-
shapeToBezierPath: () =>
|
|
343
|
-
shapeToPolygon: () =>
|
|
344
|
-
sideToPosition: () =>
|
|
345
|
-
simplifyRing: () =>
|
|
346
|
-
snapKeyframeDelta: () =>
|
|
347
|
-
snapNodeDrag: () =>
|
|
348
|
-
snapNodeResize: () =>
|
|
349
|
-
snapResize: () =>
|
|
350
|
-
snapTimeToFrame: () =>
|
|
351
|
-
snapToGrid: () =>
|
|
352
|
-
springAt: () =>
|
|
353
|
-
streamlinePoints: () =>
|
|
354
|
-
strokeOutlineRings: () =>
|
|
355
|
-
strokePointsToPathData: () =>
|
|
356
|
-
strokeToShapeNode: () =>
|
|
357
|
-
subtractPaths: () =>
|
|
358
|
-
subtractPolygons: () =>
|
|
359
|
-
swapCanvasInstance: () =>
|
|
360
|
-
syncAllCanvasInstances: () =>
|
|
361
|
-
syncCanvasComponents: () =>
|
|
362
|
-
syncCanvasInstance: () =>
|
|
363
|
-
timeToX: () =>
|
|
364
|
-
toBezierPath: () =>
|
|
365
|
-
toWebAnimations: () =>
|
|
366
|
-
toggleLockNodes: () =>
|
|
367
|
-
transformBezierPath: () =>
|
|
368
|
-
unionPolygons: () =>
|
|
369
|
-
unitePaths: () =>
|
|
370
|
-
unlockNodes: () =>
|
|
371
|
-
updateKeyframe: () =>
|
|
268
|
+
mixColorsOklab: () => import_canvas38.mixColorsOklab,
|
|
269
|
+
moveKeyframes: () => import_canvas38.moveKeyframes,
|
|
270
|
+
moveLayoutChild: () => import_canvas36.moveLayoutChild,
|
|
271
|
+
multiPolygonArea: () => import_canvas33.multiPolygonArea,
|
|
272
|
+
multiPolygonBounds: () => import_canvas33.multiPolygonBounds,
|
|
273
|
+
nearestHandlePositions: () => import_canvas32.nearestHandlePositions,
|
|
274
|
+
nodeSizeOf: () => import_canvas35.nodeSizeOf,
|
|
275
|
+
normalizeBezierPath: () => import_canvas34.normalizeBezierPath,
|
|
276
|
+
normalizeKeyframes: () => import_canvas38.normalizeKeyframes,
|
|
277
|
+
offsetPath: () => import_canvas34.offsetPath,
|
|
278
|
+
offsetShapeNodes: () => import_canvas34.offsetShapeNodes,
|
|
279
|
+
oklabToRgb: () => import_canvas38.oklabToRgb,
|
|
280
|
+
oppositePosition: () => import_canvas32.oppositePosition,
|
|
281
|
+
outlineShapeNodeStrokes: () => import_canvas34.outlineShapeNodeStrokes,
|
|
282
|
+
outlineStroke: () => import_canvas34.outlineStroke,
|
|
283
|
+
overlaps: () => import_canvas35.overlaps,
|
|
284
|
+
parseCanvasClipboardData: () => import_canvas35.parseCanvasClipboardData,
|
|
285
|
+
parseCanvasScenes: () => import_canvas32.parseCanvasScenes,
|
|
286
|
+
parseCssEasing: () => import_canvas38.parseCssEasing,
|
|
287
|
+
parseCssGradient: () => import_canvas39.parseCssGradient,
|
|
288
|
+
parseKeyframeClipboard: () => import_canvas38.parseKeyframeClipboard,
|
|
289
|
+
parseOklab: () => import_canvas38.parseOklab,
|
|
290
|
+
parseSvgPath: () => import_canvas33.parseSvgPath,
|
|
291
|
+
pasteKeyframes: () => import_canvas38.pasteKeyframes,
|
|
292
|
+
pathBoolean: () => import_canvas34.pathBoolean,
|
|
293
|
+
pathDataToPolyline: () => import_canvas39.pathDataToPolyline,
|
|
294
|
+
placeBeside: () => import_canvas35.placeBeside,
|
|
295
|
+
playWebAnimations: () => import_canvas38.playWebAnimations,
|
|
296
|
+
pointInBezierPath: () => import_canvas34.pointInBezierPath,
|
|
297
|
+
pointInMultiPolygon: () => import_canvas33.pointInMultiPolygon,
|
|
298
|
+
pointInRings: () => import_canvas33.pointInRings,
|
|
299
|
+
pointerPenSample: () => import_canvas39.pointerPenSample,
|
|
300
|
+
polygonArea: () => import_canvas33.polygonArea,
|
|
301
|
+
polygonBoolean: () => import_canvas33.polygonBoolean,
|
|
302
|
+
polygonToSvgPath: () => import_canvas33.polygonToSvgPath,
|
|
303
|
+
positionToSide: () => import_canvas32.positionToSide,
|
|
304
|
+
profileAlongPolyline: () => import_canvas39.profileAlongPolyline,
|
|
305
|
+
pruneCanvasTokenModes: () => import_canvas37.pruneCanvasTokenModes,
|
|
306
|
+
pushCanvasInstanceOverrides: () => import_canvas39.pushCanvasInstanceOverrides,
|
|
307
|
+
readAnimatableValue: () => import_canvas38.readAnimatableValue,
|
|
308
|
+
readNodeStyleProperty: () => import_canvas37.readNodeStyleProperty,
|
|
309
|
+
readStyleSize: () => import_canvas32.readStyleSize,
|
|
310
|
+
realClock: () => import_canvas35.realClock,
|
|
311
|
+
recordAnimationChanges: () => import_canvas38.recordAnimationChanges,
|
|
312
|
+
relayoutUpdates: () => import_canvas36.relayoutUpdates,
|
|
313
|
+
remapPastedNodes: () => import_canvas35.remapPastedNodes,
|
|
314
|
+
removeCanvasVariant: () => import_canvas39.removeCanvasVariant,
|
|
315
|
+
removeTrack: () => import_canvas38.removeTrack,
|
|
316
|
+
renameCanvasVariantProperty: () => import_canvas39.renameCanvasVariantProperty,
|
|
317
|
+
renameCanvasVariantValue: () => import_canvas39.renameCanvasVariantValue,
|
|
318
|
+
renderCanvasBrushSwatch: () => import_canvas39.renderCanvasBrushSwatch,
|
|
319
|
+
renderShapeBrushstroke: () => import_canvas39.renderShapeBrushstroke,
|
|
320
|
+
reorderNodes: () => import_canvas32.reorderNodes,
|
|
321
|
+
repositionNodesTo: () => import_canvas35.repositionNodesTo,
|
|
322
|
+
resetCanvasInstanceOverrides: () => import_canvas39.resetCanvasInstanceOverrides,
|
|
323
|
+
resizeHandleAxes: () => import_canvas31.resizeHandleAxes,
|
|
324
|
+
resolveCanvasGradient: () => import_canvas39.resolveCanvasGradient,
|
|
325
|
+
resolveCanvasTokens: () => import_canvas37.resolveCanvasTokens,
|
|
326
|
+
resolveEasing: () => import_canvas38.resolveEasing,
|
|
327
|
+
resolvePadding: () => import_canvas36.resolvePadding,
|
|
328
|
+
restoreCanvasMainComponent: () => import_canvas39.restoreCanvasMainComponent,
|
|
329
|
+
revertShapeCombination: () => import_canvas33.revertShapeCombination,
|
|
330
|
+
rgbToOklab: () => import_canvas38.rgbToOklab,
|
|
331
|
+
ringSignedArea: () => import_canvas33.ringSignedArea,
|
|
332
|
+
runMultiNodeTransition: () => import_canvas35.runMultiNodeTransition,
|
|
333
|
+
sampleAnimationFrames: () => import_canvas38.sampleAnimationFrames,
|
|
334
|
+
scaleKeyframes: () => import_canvas38.scaleKeyframes,
|
|
335
|
+
serializeCanvasNodes: () => import_canvas35.serializeCanvasNodes,
|
|
336
|
+
setCanvasComponentProperty: () => import_canvas39.setCanvasComponentProperty,
|
|
337
|
+
setCanvasInstanceProperties: () => import_canvas39.setCanvasInstanceProperties,
|
|
338
|
+
setCanvasTokenMode: () => import_canvas37.setCanvasTokenMode,
|
|
339
|
+
setCanvasVariantProperties: () => import_canvas39.setCanvasVariantProperties,
|
|
340
|
+
setKeyframe: () => import_canvas38.setKeyframe,
|
|
341
|
+
setKeyframeEasing: () => import_canvas38.setKeyframeEasing,
|
|
342
|
+
setMotionPath: () => import_canvas38.setMotionPath,
|
|
343
|
+
setTrackEnabled: () => import_canvas38.setTrackEnabled,
|
|
344
|
+
shapeNodeToBezierPath: () => import_canvas34.shapeNodeToBezierPath,
|
|
345
|
+
shapeNodeToPolygon: () => import_canvas33.shapeNodeToPolygon,
|
|
346
|
+
shapeToBezierPath: () => import_canvas34.shapeToBezierPath,
|
|
347
|
+
shapeToPolygon: () => import_canvas33.shapeToPolygon,
|
|
348
|
+
sideToPosition: () => import_canvas32.sideToPosition,
|
|
349
|
+
simplifyRing: () => import_canvas33.simplifyRing,
|
|
350
|
+
snapKeyframeDelta: () => import_canvas38.snapKeyframeDelta,
|
|
351
|
+
snapNodeDrag: () => import_canvas32.snapNodeDrag,
|
|
352
|
+
snapNodeResize: () => import_canvas31.snapNodeResize,
|
|
353
|
+
snapResize: () => import_canvas31.snapResize,
|
|
354
|
+
snapTimeToFrame: () => import_canvas38.snapTimeToFrame,
|
|
355
|
+
snapToGrid: () => import_canvas31.snapToGrid,
|
|
356
|
+
springAt: () => import_canvas38.springAt,
|
|
357
|
+
streamlinePoints: () => import_canvas39.streamlinePoints,
|
|
358
|
+
strokeOutlineRings: () => import_canvas34.strokeOutlineRings,
|
|
359
|
+
strokePointsToPathData: () => import_canvas39.strokePointsToPathData,
|
|
360
|
+
strokeToShapeNode: () => import_canvas39.strokeToShapeNode,
|
|
361
|
+
subtractPaths: () => import_canvas34.subtractPaths,
|
|
362
|
+
subtractPolygons: () => import_canvas33.subtractPolygons,
|
|
363
|
+
swapCanvasInstance: () => import_canvas39.swapCanvasInstance,
|
|
364
|
+
syncAllCanvasInstances: () => import_canvas39.syncAllCanvasInstances,
|
|
365
|
+
syncCanvasComponents: () => import_canvas39.syncCanvasComponents,
|
|
366
|
+
syncCanvasInstance: () => import_canvas39.syncCanvasInstance,
|
|
367
|
+
timeToX: () => import_canvas38.timeToX,
|
|
368
|
+
toBezierPath: () => import_canvas34.toBezierPath,
|
|
369
|
+
toWebAnimations: () => import_canvas38.toWebAnimations,
|
|
370
|
+
toggleLockNodes: () => import_canvas32.toggleLockNodes,
|
|
371
|
+
transformBezierPath: () => import_canvas34.transformBezierPath,
|
|
372
|
+
unionPolygons: () => import_canvas33.unionPolygons,
|
|
373
|
+
unitePaths: () => import_canvas34.unitePaths,
|
|
374
|
+
unlockNodes: () => import_canvas32.unlockNodes,
|
|
375
|
+
updateKeyframe: () => import_canvas38.updateKeyframe,
|
|
372
376
|
useCanvasAnimation: () => useCanvasAnimation,
|
|
373
377
|
useCanvasArrange: () => useCanvasArrange,
|
|
374
378
|
useCanvasArrangeShortcuts: () => useCanvasArrangeShortcuts,
|
|
375
379
|
useCanvasAutoLayout: () => useCanvasAutoLayout,
|
|
376
380
|
useCanvasBrushes: () => useCanvasBrushes,
|
|
377
381
|
useCanvasCapture: () => useCanvasCapture,
|
|
382
|
+
useCanvasChangeFeed: () => useCanvasChangeFeed,
|
|
378
383
|
useCanvasClipboard: () => useCanvasClipboard,
|
|
379
384
|
useCanvasComponents: () => useCanvasComponents,
|
|
380
385
|
useCanvasDocking: () => useCanvasDocking,
|
|
@@ -389,6 +394,7 @@ __export(canvas_exports, {
|
|
|
389
394
|
useCanvasLayout: () => useCanvasLayout,
|
|
390
395
|
useCanvasMeasure: () => useCanvasMeasure,
|
|
391
396
|
useCanvasPlaybackSurface: () => useCanvasPlaybackSurface,
|
|
397
|
+
useCanvasProposals: () => useCanvasProposals,
|
|
392
398
|
useCanvasScenes: () => useCanvasScenes,
|
|
393
399
|
useCanvasShortcuts: () => useCanvasShortcuts,
|
|
394
400
|
useCanvasTokens: () => useCanvasTokens,
|
|
@@ -399,15 +405,15 @@ __export(canvas_exports, {
|
|
|
399
405
|
usePresenceState: () => usePresenceState,
|
|
400
406
|
useShapeBrushstroke: () => useShapeBrushstroke,
|
|
401
407
|
useStreamingCanvas: () => useStreamingCanvas,
|
|
402
|
-
validateCanvasBrush: () =>
|
|
403
|
-
validateCanvasBrushPaint: () =>
|
|
404
|
-
withNodeAnimation: () =>
|
|
405
|
-
withStyleSize: () =>
|
|
406
|
-
wouldCreateComponentCycle: () =>
|
|
407
|
-
wrapAnimationTime: () =>
|
|
408
|
-
writeNodeStyleProperty: () =>
|
|
409
|
-
xToTime: () =>
|
|
410
|
-
xorPolygons: () =>
|
|
408
|
+
validateCanvasBrush: () => import_canvas39.validateCanvasBrush,
|
|
409
|
+
validateCanvasBrushPaint: () => import_canvas39.validateCanvasBrushPaint,
|
|
410
|
+
withNodeAnimation: () => import_canvas38.withNodeAnimation,
|
|
411
|
+
withStyleSize: () => import_canvas32.withStyleSize,
|
|
412
|
+
wouldCreateComponentCycle: () => import_canvas39.wouldCreateComponentCycle,
|
|
413
|
+
wrapAnimationTime: () => import_canvas38.wrapAnimationTime,
|
|
414
|
+
writeNodeStyleProperty: () => import_canvas37.writeNodeStyleProperty,
|
|
415
|
+
xToTime: () => import_canvas38.xToTime,
|
|
416
|
+
xorPolygons: () => import_canvas33.xorPolygons
|
|
411
417
|
});
|
|
412
418
|
module.exports = __toCommonJS(canvas_exports);
|
|
413
419
|
|
|
@@ -1354,7 +1360,7 @@ function useCanvasExplosionState(options = {}) {
|
|
|
1354
1360
|
}
|
|
1355
1361
|
|
|
1356
1362
|
// src/canvas/index.ts
|
|
1357
|
-
var
|
|
1363
|
+
var import_canvas30 = require("@pixerate/editor/canvas");
|
|
1358
1364
|
|
|
1359
1365
|
// src/canvas/useCanvasArrange.ts
|
|
1360
1366
|
var import_react13 = require("react");
|
|
@@ -1909,8 +1915,8 @@ function useCanvasMeasure(options) {
|
|
|
1909
1915
|
}
|
|
1910
1916
|
|
|
1911
1917
|
// src/canvas/index.ts
|
|
1912
|
-
var import_canvas30 = require("@pixerate/editor/canvas");
|
|
1913
1918
|
var import_canvas31 = require("@pixerate/editor/canvas");
|
|
1919
|
+
var import_canvas32 = require("@pixerate/editor/canvas");
|
|
1914
1920
|
|
|
1915
1921
|
// src/canvas/ShapeNode.tsx
|
|
1916
1922
|
var import_canvas17 = require("@pixerate/editor/canvas");
|
|
@@ -3962,10 +3968,10 @@ function ShapeNode({ id, data, width, height, selected, className = "", children
|
|
|
3962
3968
|
}
|
|
3963
3969
|
|
|
3964
3970
|
// src/canvas/index.ts
|
|
3965
|
-
var import_canvas32 = require("@pixerate/editor/canvas");
|
|
3966
3971
|
var import_canvas33 = require("@pixerate/editor/canvas");
|
|
3967
3972
|
var import_canvas34 = require("@pixerate/editor/canvas");
|
|
3968
3973
|
var import_canvas35 = require("@pixerate/editor/canvas");
|
|
3974
|
+
var import_canvas36 = require("@pixerate/editor/canvas");
|
|
3969
3975
|
|
|
3970
3976
|
// src/canvas/useCanvasAutoLayout.ts
|
|
3971
3977
|
var import_react31 = require("react");
|
|
@@ -4177,7 +4183,7 @@ function TokenModeSwitcher({
|
|
|
4177
4183
|
}
|
|
4178
4184
|
|
|
4179
4185
|
// src/canvas/index.ts
|
|
4180
|
-
var
|
|
4186
|
+
var import_canvas37 = require("@pixerate/editor/canvas");
|
|
4181
4187
|
|
|
4182
4188
|
// src/canvas/useCanvasAnimation.ts
|
|
4183
4189
|
var import_react33 = require("react");
|
|
@@ -4431,7 +4437,7 @@ function AnimationTimeline({ animation, nodeIds, width = 360, snapThreshold = 8,
|
|
|
4431
4437
|
}
|
|
4432
4438
|
|
|
4433
4439
|
// src/canvas/index.ts
|
|
4434
|
-
var
|
|
4440
|
+
var import_canvas38 = require("@pixerate/editor/canvas");
|
|
4435
4441
|
|
|
4436
4442
|
// src/canvas/useCanvasComponents.ts
|
|
4437
4443
|
var import_react35 = require("react");
|
|
@@ -4842,7 +4848,7 @@ function CanvasInstanceInspector({
|
|
|
4842
4848
|
}
|
|
4843
4849
|
|
|
4844
4850
|
// src/canvas/index.ts
|
|
4845
|
-
var
|
|
4851
|
+
var import_canvas39 = require("@pixerate/editor/canvas");
|
|
4846
4852
|
|
|
4847
4853
|
// src/canvas/MermaidFamilyScene.tsx
|
|
4848
4854
|
var import_react37 = require("react");
|
|
@@ -5187,6 +5193,77 @@ function DiagramPresenceLayer({ presence, viewport, className = "" }) {
|
|
|
5187
5193
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { style: { position: "absolute", left: 14, top: 16, whiteSpace: "nowrap", borderRadius: 4, padding: "1px 6px", fontSize: 11, fontWeight: 600, color: "#ffffff", background: a.color }, children: a.message ?? a.name })
|
|
5188
5194
|
] }, a.id)) });
|
|
5189
5195
|
}
|
|
5196
|
+
|
|
5197
|
+
// src/canvas/useCanvasProposals.ts
|
|
5198
|
+
var import_react41 = require("react");
|
|
5199
|
+
var import_canvas29 = require("@pixerate/editor/canvas");
|
|
5200
|
+
function useCanvasProposals(options) {
|
|
5201
|
+
const latest = (0, import_react41.useRef)(options);
|
|
5202
|
+
latest.current = options;
|
|
5203
|
+
const live = (0, import_react41.useRef)({ nodes: options.nodes, edges: options.edges });
|
|
5204
|
+
live.current = { nodes: options.nodes, edges: options.edges };
|
|
5205
|
+
const storeRef = (0, import_react41.useRef)(null);
|
|
5206
|
+
if (storeRef.current === null) {
|
|
5207
|
+
storeRef.current = (0, import_canvas29.createCanvasProposals)({
|
|
5208
|
+
getNodes: () => live.current.nodes,
|
|
5209
|
+
getEdges: () => live.current.edges,
|
|
5210
|
+
setNodes: (nodes) => {
|
|
5211
|
+
live.current = { ...live.current, nodes };
|
|
5212
|
+
latest.current.setNodes(nodes);
|
|
5213
|
+
},
|
|
5214
|
+
setEdges: (edges) => {
|
|
5215
|
+
live.current = { ...live.current, edges };
|
|
5216
|
+
latest.current.setEdges(edges);
|
|
5217
|
+
},
|
|
5218
|
+
history: options.history,
|
|
5219
|
+
origin: options.origin,
|
|
5220
|
+
readOnly: () => latest.current.readOnly?.() ?? false,
|
|
5221
|
+
defaultNodeSize: options.defaultNodeSize,
|
|
5222
|
+
visibleRect: () => latest.current.visibleRect?.(),
|
|
5223
|
+
defaultNodeType: options.defaultNodeType,
|
|
5224
|
+
idGenerator: options.idGenerator
|
|
5225
|
+
});
|
|
5226
|
+
}
|
|
5227
|
+
const store = storeRef.current;
|
|
5228
|
+
const state = (0, import_react41.useSyncExternalStore)(store.subscribe, store.getState, store.getState);
|
|
5229
|
+
const view = (0, import_react41.useMemo)(() => store.withGhosts(options.nodes, options.edges), [store, state, options.nodes, options.edges]);
|
|
5230
|
+
return (0, import_react41.useMemo)(
|
|
5231
|
+
() => ({
|
|
5232
|
+
store,
|
|
5233
|
+
proposals: state.proposals,
|
|
5234
|
+
view,
|
|
5235
|
+
propose: store.propose,
|
|
5236
|
+
accept: store.accept,
|
|
5237
|
+
reject: store.reject,
|
|
5238
|
+
clear: store.clear
|
|
5239
|
+
}),
|
|
5240
|
+
[store, state, view]
|
|
5241
|
+
);
|
|
5242
|
+
}
|
|
5243
|
+
function useCanvasChangeFeed(options) {
|
|
5244
|
+
const latest = (0, import_react41.useRef)(options);
|
|
5245
|
+
latest.current = options;
|
|
5246
|
+
const [last, setLast] = (0, import_react41.useState)(null);
|
|
5247
|
+
const feed = (0, import_react41.useMemo)(
|
|
5248
|
+
() => (0, import_canvas29.createCanvasChangeFeed)({
|
|
5249
|
+
getNodes: () => latest.current.nodes,
|
|
5250
|
+
getEdges: () => latest.current.edges,
|
|
5251
|
+
ignoreNodeKeys: options.ignoreNodeKeys
|
|
5252
|
+
}),
|
|
5253
|
+
[]
|
|
5254
|
+
);
|
|
5255
|
+
(0, import_react41.useEffect)(() => options.history?.onCommit(feed.noteCommit), [feed, options.history]);
|
|
5256
|
+
(0, import_react41.useEffect)(() => {
|
|
5257
|
+
const change = feed.check();
|
|
5258
|
+
if (!change) return;
|
|
5259
|
+
setLast(change);
|
|
5260
|
+
latest.current.onChange?.(change);
|
|
5261
|
+
}, [feed, options.nodes, options.edges]);
|
|
5262
|
+
return { feed, last };
|
|
5263
|
+
}
|
|
5264
|
+
|
|
5265
|
+
// src/canvas/index.ts
|
|
5266
|
+
var import_canvas40 = require("@pixerate/editor/canvas");
|
|
5190
5267
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5191
5268
|
0 && (module.exports = {
|
|
5192
5269
|
ANIMATABLE_PROPERTIES,
|
|
@@ -5201,6 +5278,7 @@ function DiagramPresenceLayer({ presence, viewport, className = "" }) {
|
|
|
5201
5278
|
AnimationTimeline,
|
|
5202
5279
|
CANVAS_COMPONENT_DRAG_TYPE,
|
|
5203
5280
|
CANVAS_GRADIENT_PRESETS,
|
|
5281
|
+
CANVAS_PROPOSAL_CLASS,
|
|
5204
5282
|
CANVAS_TOKEN_PROPERTIES,
|
|
5205
5283
|
CHILD_LAYOUT_DATA_KEY,
|
|
5206
5284
|
CONNECTION_LINE_TYPES,
|
|
@@ -5282,12 +5360,15 @@ function DiagramPresenceLayer({ presence, viewport, className = "" }) {
|
|
|
5282
5360
|
createBezierTrajectory,
|
|
5283
5361
|
createCanvasAnimationController,
|
|
5284
5362
|
createCanvasAutoLayoutController,
|
|
5363
|
+
createCanvasChangeFeed,
|
|
5285
5364
|
createCanvasComponent,
|
|
5286
5365
|
createCanvasComponentsController,
|
|
5287
5366
|
createCanvasDrawController,
|
|
5288
5367
|
createCanvasExplosionStateController,
|
|
5289
5368
|
createCanvasExplosionToolProvider,
|
|
5290
5369
|
createCanvasInstance,
|
|
5370
|
+
createCanvasProposalToolProvider,
|
|
5371
|
+
createCanvasProposals,
|
|
5291
5372
|
createCanvasScenesStore,
|
|
5292
5373
|
createDefaultStrokeStyle,
|
|
5293
5374
|
createFanOutTrajectory,
|
|
@@ -5533,6 +5614,7 @@ function DiagramPresenceLayer({ presence, viewport, className = "" }) {
|
|
|
5533
5614
|
useCanvasAutoLayout,
|
|
5534
5615
|
useCanvasBrushes,
|
|
5535
5616
|
useCanvasCapture,
|
|
5617
|
+
useCanvasChangeFeed,
|
|
5536
5618
|
useCanvasClipboard,
|
|
5537
5619
|
useCanvasComponents,
|
|
5538
5620
|
useCanvasDocking,
|
|
@@ -5547,6 +5629,7 @@ function DiagramPresenceLayer({ presence, viewport, className = "" }) {
|
|
|
5547
5629
|
useCanvasLayout,
|
|
5548
5630
|
useCanvasMeasure,
|
|
5549
5631
|
useCanvasPlaybackSurface,
|
|
5632
|
+
useCanvasProposals,
|
|
5550
5633
|
useCanvasScenes,
|
|
5551
5634
|
useCanvasShortcuts,
|
|
5552
5635
|
useCanvasTokens,
|
package/dist/canvas/index.d.cts
CHANGED
|
@@ -43,3 +43,5 @@ export { MermaidThumbnail, type MermaidThumbnailProps } from './MermaidThumbnail
|
|
|
43
43
|
export { useDiagramDirector, usePresenceState, type UseDiagramDirectorOptions } from './useDiagramDirector.cjs';
|
|
44
44
|
export { DiagramPresenceLayer, type DiagramPresenceLayerProps } from './DiagramPresenceLayer.cjs';
|
|
45
45
|
export * from './CanvasEffects.cjs';
|
|
46
|
+
export { useCanvasProposals, useCanvasChangeFeed, type UseCanvasProposalsOptions, type CanvasProposalsHandle, type UseCanvasChangeFeedOptions } from './useCanvasProposals.cjs';
|
|
47
|
+
export { CANVAS_PROPOSAL_CLASS, createCanvasProposals, createCanvasChangeFeed, createCanvasProposalToolProvider, type CanvasProposal, type CanvasProposals, type CanvasProposalsOptions, type CanvasProposalsState, type CanvasProposalInput, type CanvasProposalNodeInput, type CanvasProposalEdgeInput, type CanvasProposalAcceptResult, type CanvasProposalToolProviderOptions, type CanvasChange, type CanvasChangeFeed, type CanvasChangeFeedOptions, type CanvasNodeChange, type CanvasEdgeChange } from '@pixerate/editor/canvas';
|
package/dist/canvas/index.d.ts
CHANGED
|
@@ -43,3 +43,5 @@ export { MermaidThumbnail, type MermaidThumbnailProps } from './MermaidThumbnail
|
|
|
43
43
|
export { useDiagramDirector, usePresenceState, type UseDiagramDirectorOptions } from './useDiagramDirector.js';
|
|
44
44
|
export { DiagramPresenceLayer, type DiagramPresenceLayerProps } from './DiagramPresenceLayer.js';
|
|
45
45
|
export * from './CanvasEffects.js';
|
|
46
|
+
export { useCanvasProposals, useCanvasChangeFeed, type UseCanvasProposalsOptions, type CanvasProposalsHandle, type UseCanvasChangeFeedOptions } from './useCanvasProposals.js';
|
|
47
|
+
export { CANVAS_PROPOSAL_CLASS, createCanvasProposals, createCanvasChangeFeed, createCanvasProposalToolProvider, type CanvasProposal, type CanvasProposals, type CanvasProposalsOptions, type CanvasProposalsState, type CanvasProposalInput, type CanvasProposalNodeInput, type CanvasProposalEdgeInput, type CanvasProposalAcceptResult, type CanvasProposalToolProviderOptions, type CanvasChange, type CanvasChangeFeed, type CanvasChangeFeedOptions, type CanvasNodeChange, type CanvasEdgeChange } from '@pixerate/editor/canvas';
|
package/dist/canvas/index.js
CHANGED
|
@@ -3366,6 +3366,85 @@ function DiagramPresenceLayer({ presence, viewport, className = "" }) {
|
|
|
3366
3366
|
/* @__PURE__ */ jsx13("span", { style: { position: "absolute", left: 14, top: 16, whiteSpace: "nowrap", borderRadius: 4, padding: "1px 6px", fontSize: 11, fontWeight: 600, color: "#ffffff", background: a.color }, children: a.message ?? a.name })
|
|
3367
3367
|
] }, a.id)) });
|
|
3368
3368
|
}
|
|
3369
|
+
|
|
3370
|
+
// src/canvas/useCanvasProposals.ts
|
|
3371
|
+
import { useEffect as useEffect16, useMemo as useMemo16, useRef as useRef22, useState as useState12, useSyncExternalStore as useSyncExternalStore7 } from "react";
|
|
3372
|
+
import {
|
|
3373
|
+
createCanvasChangeFeed,
|
|
3374
|
+
createCanvasProposals
|
|
3375
|
+
} from "@pixerate/editor/canvas";
|
|
3376
|
+
function useCanvasProposals(options) {
|
|
3377
|
+
const latest = useRef22(options);
|
|
3378
|
+
latest.current = options;
|
|
3379
|
+
const live = useRef22({ nodes: options.nodes, edges: options.edges });
|
|
3380
|
+
live.current = { nodes: options.nodes, edges: options.edges };
|
|
3381
|
+
const storeRef = useRef22(null);
|
|
3382
|
+
if (storeRef.current === null) {
|
|
3383
|
+
storeRef.current = createCanvasProposals({
|
|
3384
|
+
getNodes: () => live.current.nodes,
|
|
3385
|
+
getEdges: () => live.current.edges,
|
|
3386
|
+
setNodes: (nodes) => {
|
|
3387
|
+
live.current = { ...live.current, nodes };
|
|
3388
|
+
latest.current.setNodes(nodes);
|
|
3389
|
+
},
|
|
3390
|
+
setEdges: (edges) => {
|
|
3391
|
+
live.current = { ...live.current, edges };
|
|
3392
|
+
latest.current.setEdges(edges);
|
|
3393
|
+
},
|
|
3394
|
+
history: options.history,
|
|
3395
|
+
origin: options.origin,
|
|
3396
|
+
readOnly: () => latest.current.readOnly?.() ?? false,
|
|
3397
|
+
defaultNodeSize: options.defaultNodeSize,
|
|
3398
|
+
visibleRect: () => latest.current.visibleRect?.(),
|
|
3399
|
+
defaultNodeType: options.defaultNodeType,
|
|
3400
|
+
idGenerator: options.idGenerator
|
|
3401
|
+
});
|
|
3402
|
+
}
|
|
3403
|
+
const store = storeRef.current;
|
|
3404
|
+
const state = useSyncExternalStore7(store.subscribe, store.getState, store.getState);
|
|
3405
|
+
const view = useMemo16(() => store.withGhosts(options.nodes, options.edges), [store, state, options.nodes, options.edges]);
|
|
3406
|
+
return useMemo16(
|
|
3407
|
+
() => ({
|
|
3408
|
+
store,
|
|
3409
|
+
proposals: state.proposals,
|
|
3410
|
+
view,
|
|
3411
|
+
propose: store.propose,
|
|
3412
|
+
accept: store.accept,
|
|
3413
|
+
reject: store.reject,
|
|
3414
|
+
clear: store.clear
|
|
3415
|
+
}),
|
|
3416
|
+
[store, state, view]
|
|
3417
|
+
);
|
|
3418
|
+
}
|
|
3419
|
+
function useCanvasChangeFeed(options) {
|
|
3420
|
+
const latest = useRef22(options);
|
|
3421
|
+
latest.current = options;
|
|
3422
|
+
const [last, setLast] = useState12(null);
|
|
3423
|
+
const feed = useMemo16(
|
|
3424
|
+
() => createCanvasChangeFeed({
|
|
3425
|
+
getNodes: () => latest.current.nodes,
|
|
3426
|
+
getEdges: () => latest.current.edges,
|
|
3427
|
+
ignoreNodeKeys: options.ignoreNodeKeys
|
|
3428
|
+
}),
|
|
3429
|
+
[]
|
|
3430
|
+
);
|
|
3431
|
+
useEffect16(() => options.history?.onCommit(feed.noteCommit), [feed, options.history]);
|
|
3432
|
+
useEffect16(() => {
|
|
3433
|
+
const change = feed.check();
|
|
3434
|
+
if (!change) return;
|
|
3435
|
+
setLast(change);
|
|
3436
|
+
latest.current.onChange?.(change);
|
|
3437
|
+
}, [feed, options.nodes, options.edges]);
|
|
3438
|
+
return { feed, last };
|
|
3439
|
+
}
|
|
3440
|
+
|
|
3441
|
+
// src/canvas/index.ts
|
|
3442
|
+
import {
|
|
3443
|
+
CANVAS_PROPOSAL_CLASS,
|
|
3444
|
+
createCanvasProposals as createCanvasProposals2,
|
|
3445
|
+
createCanvasChangeFeed as createCanvasChangeFeed2,
|
|
3446
|
+
createCanvasProposalToolProvider
|
|
3447
|
+
} from "@pixerate/editor/canvas";
|
|
3369
3448
|
export {
|
|
3370
3449
|
ANIMATABLE_PROPERTIES,
|
|
3371
3450
|
ANIMATION_DATA_KEY,
|
|
@@ -3379,6 +3458,7 @@ export {
|
|
|
3379
3458
|
AnimationTimeline,
|
|
3380
3459
|
CANVAS_COMPONENT_DRAG_TYPE2 as CANVAS_COMPONENT_DRAG_TYPE,
|
|
3381
3460
|
CANVAS_GRADIENT_PRESETS,
|
|
3461
|
+
CANVAS_PROPOSAL_CLASS,
|
|
3382
3462
|
CANVAS_TOKEN_PROPERTIES,
|
|
3383
3463
|
CHILD_LAYOUT_DATA_KEY,
|
|
3384
3464
|
CONNECTION_LINE_TYPES,
|
|
@@ -3460,12 +3540,15 @@ export {
|
|
|
3460
3540
|
createBezierTrajectory,
|
|
3461
3541
|
createCanvasAnimationController2 as createCanvasAnimationController,
|
|
3462
3542
|
createCanvasAutoLayoutController2 as createCanvasAutoLayoutController,
|
|
3543
|
+
createCanvasChangeFeed2 as createCanvasChangeFeed,
|
|
3463
3544
|
createCanvasComponent,
|
|
3464
3545
|
createCanvasComponentsController2 as createCanvasComponentsController,
|
|
3465
3546
|
createCanvasDrawController2 as createCanvasDrawController,
|
|
3466
3547
|
createCanvasExplosionStateController2 as createCanvasExplosionStateController,
|
|
3467
3548
|
createCanvasExplosionToolProvider,
|
|
3468
3549
|
createCanvasInstance,
|
|
3550
|
+
createCanvasProposalToolProvider,
|
|
3551
|
+
createCanvasProposals2 as createCanvasProposals,
|
|
3469
3552
|
createCanvasScenesStore,
|
|
3470
3553
|
createDefaultStrokeStyle,
|
|
3471
3554
|
createFanOutTrajectory2 as createFanOutTrajectory,
|
|
@@ -3711,6 +3794,7 @@ export {
|
|
|
3711
3794
|
useCanvasAutoLayout,
|
|
3712
3795
|
useCanvasBrushes,
|
|
3713
3796
|
useCanvasCapture,
|
|
3797
|
+
useCanvasChangeFeed,
|
|
3714
3798
|
useCanvasClipboard,
|
|
3715
3799
|
useCanvasComponents,
|
|
3716
3800
|
useCanvasDocking,
|
|
@@ -3725,6 +3809,7 @@ export {
|
|
|
3725
3809
|
useCanvasLayout,
|
|
3726
3810
|
useCanvasMeasure,
|
|
3727
3811
|
useCanvasPlaybackSurface,
|
|
3812
|
+
useCanvasProposals,
|
|
3728
3813
|
useCanvasScenes,
|
|
3729
3814
|
useCanvasShortcuts,
|
|
3730
3815
|
useCanvasTokens,
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type CanvasChange, type CanvasChangeFeed, type CanvasEdge, type CanvasEdgeLike, type CanvasNode, type CanvasProposal, type CanvasProposals, type CanvasProposalsOptions } from '@pixerate/editor/canvas';
|
|
2
|
+
import type { HistoryCommitEvent } from '@pixerate/editor/history';
|
|
3
|
+
export interface UseCanvasProposalsOptions<TNode extends CanvasNode = CanvasNode, TEdge extends CanvasEdgeLike = CanvasEdge> extends Pick<CanvasProposalsOptions<TNode, TEdge>, 'history' | 'origin' | 'readOnly' | 'defaultNodeSize' | 'visibleRect' | 'defaultNodeType' | 'idGenerator'> {
|
|
4
|
+
nodes: TNode[];
|
|
5
|
+
edges: TEdge[];
|
|
6
|
+
setNodes: (nodes: TNode[]) => void;
|
|
7
|
+
setEdges: (edges: TEdge[]) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface CanvasProposalsHandle<TNode extends CanvasNode = CanvasNode, TEdge extends CanvasEdgeLike = CanvasEdge> {
|
|
10
|
+
/** The framework-free store (for `createCanvasProposalToolProvider` and agents). */
|
|
11
|
+
readonly store: CanvasProposals<TNode, TEdge>;
|
|
12
|
+
/** Pending proposals. */
|
|
13
|
+
proposals: readonly CanvasProposal<TNode, TEdge>[];
|
|
14
|
+
/** The canvas with the proposals drawn in as ghosts: render these instead of `nodes` / `edges`. */
|
|
15
|
+
view: {
|
|
16
|
+
nodes: TNode[];
|
|
17
|
+
edges: TEdge[];
|
|
18
|
+
};
|
|
19
|
+
propose: CanvasProposals<TNode, TEdge>['propose'];
|
|
20
|
+
accept: CanvasProposals<TNode, TEdge>['accept'];
|
|
21
|
+
reject: CanvasProposals<TNode, TEdge>['reject'];
|
|
22
|
+
clear: CanvasProposals<TNode, TEdge>['clear'];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Agent-suggested canvas additions for nodes and edges held in React state: ghosts the user
|
|
26
|
+
* accepts (one undo step on `history`, made by the proposer) or rejects. Render `view` instead of
|
|
27
|
+
* your nodes and edges so the ghosts show; changes React Flow reports for ghost ids are no-ops in
|
|
28
|
+
* `applyNodeChanges`. The same API as the Svelte `createCanvasProposalState`. Pass a stable
|
|
29
|
+
* `history`; the other options are read when used.
|
|
30
|
+
*/
|
|
31
|
+
export declare function useCanvasProposals<TNode extends CanvasNode = CanvasNode, TEdge extends CanvasEdgeLike = CanvasEdge>(options: UseCanvasProposalsOptions<TNode, TEdge>): CanvasProposalsHandle<TNode, TEdge>;
|
|
32
|
+
export interface UseCanvasChangeFeedOptions<TNode extends CanvasNode = CanvasNode, TEdge extends CanvasEdgeLike = CanvasEdge> {
|
|
33
|
+
nodes: TNode[];
|
|
34
|
+
edges: TEdge[];
|
|
35
|
+
/** The canvas history, for each change's origin (`user` or `agent:<id>`). Pass a stable one. */
|
|
36
|
+
history?: {
|
|
37
|
+
onCommit(listener: (event: HistoryCommitEvent) => void): () => void;
|
|
38
|
+
};
|
|
39
|
+
/** Node fields to ignore besides the runtime ones. Read once. */
|
|
40
|
+
ignoreNodeKeys?: readonly string[];
|
|
41
|
+
/** Called with each change, after the render that shows it. */
|
|
42
|
+
onChange?: (change: CanvasChange<TNode, TEdge>) => void;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* What changed on a canvas held in React state, after each render: nodes and edges added,
|
|
46
|
+
* removed or edited, the selection, and who made it. For agents that follow what the user does.
|
|
47
|
+
* Returns the latest change and the feed. The same API as the Svelte `createCanvasChangeWatcher`.
|
|
48
|
+
*/
|
|
49
|
+
export declare function useCanvasChangeFeed<TNode extends CanvasNode = CanvasNode, TEdge extends CanvasEdgeLike = CanvasEdge>(options: UseCanvasChangeFeedOptions<TNode, TEdge>): {
|
|
50
|
+
feed: CanvasChangeFeed<TNode, TEdge>;
|
|
51
|
+
last: CanvasChange<TNode, TEdge> | null;
|
|
52
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type CanvasChange, type CanvasChangeFeed, type CanvasEdge, type CanvasEdgeLike, type CanvasNode, type CanvasProposal, type CanvasProposals, type CanvasProposalsOptions } from '@pixerate/editor/canvas';
|
|
2
|
+
import type { HistoryCommitEvent } from '@pixerate/editor/history';
|
|
3
|
+
export interface UseCanvasProposalsOptions<TNode extends CanvasNode = CanvasNode, TEdge extends CanvasEdgeLike = CanvasEdge> extends Pick<CanvasProposalsOptions<TNode, TEdge>, 'history' | 'origin' | 'readOnly' | 'defaultNodeSize' | 'visibleRect' | 'defaultNodeType' | 'idGenerator'> {
|
|
4
|
+
nodes: TNode[];
|
|
5
|
+
edges: TEdge[];
|
|
6
|
+
setNodes: (nodes: TNode[]) => void;
|
|
7
|
+
setEdges: (edges: TEdge[]) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface CanvasProposalsHandle<TNode extends CanvasNode = CanvasNode, TEdge extends CanvasEdgeLike = CanvasEdge> {
|
|
10
|
+
/** The framework-free store (for `createCanvasProposalToolProvider` and agents). */
|
|
11
|
+
readonly store: CanvasProposals<TNode, TEdge>;
|
|
12
|
+
/** Pending proposals. */
|
|
13
|
+
proposals: readonly CanvasProposal<TNode, TEdge>[];
|
|
14
|
+
/** The canvas with the proposals drawn in as ghosts: render these instead of `nodes` / `edges`. */
|
|
15
|
+
view: {
|
|
16
|
+
nodes: TNode[];
|
|
17
|
+
edges: TEdge[];
|
|
18
|
+
};
|
|
19
|
+
propose: CanvasProposals<TNode, TEdge>['propose'];
|
|
20
|
+
accept: CanvasProposals<TNode, TEdge>['accept'];
|
|
21
|
+
reject: CanvasProposals<TNode, TEdge>['reject'];
|
|
22
|
+
clear: CanvasProposals<TNode, TEdge>['clear'];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Agent-suggested canvas additions for nodes and edges held in React state: ghosts the user
|
|
26
|
+
* accepts (one undo step on `history`, made by the proposer) or rejects. Render `view` instead of
|
|
27
|
+
* your nodes and edges so the ghosts show; changes React Flow reports for ghost ids are no-ops in
|
|
28
|
+
* `applyNodeChanges`. The same API as the Svelte `createCanvasProposalState`. Pass a stable
|
|
29
|
+
* `history`; the other options are read when used.
|
|
30
|
+
*/
|
|
31
|
+
export declare function useCanvasProposals<TNode extends CanvasNode = CanvasNode, TEdge extends CanvasEdgeLike = CanvasEdge>(options: UseCanvasProposalsOptions<TNode, TEdge>): CanvasProposalsHandle<TNode, TEdge>;
|
|
32
|
+
export interface UseCanvasChangeFeedOptions<TNode extends CanvasNode = CanvasNode, TEdge extends CanvasEdgeLike = CanvasEdge> {
|
|
33
|
+
nodes: TNode[];
|
|
34
|
+
edges: TEdge[];
|
|
35
|
+
/** The canvas history, for each change's origin (`user` or `agent:<id>`). Pass a stable one. */
|
|
36
|
+
history?: {
|
|
37
|
+
onCommit(listener: (event: HistoryCommitEvent) => void): () => void;
|
|
38
|
+
};
|
|
39
|
+
/** Node fields to ignore besides the runtime ones. Read once. */
|
|
40
|
+
ignoreNodeKeys?: readonly string[];
|
|
41
|
+
/** Called with each change, after the render that shows it. */
|
|
42
|
+
onChange?: (change: CanvasChange<TNode, TEdge>) => void;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* What changed on a canvas held in React state, after each render: nodes and edges added,
|
|
46
|
+
* removed or edited, the selection, and who made it. For agents that follow what the user does.
|
|
47
|
+
* Returns the latest change and the feed. The same API as the Svelte `createCanvasChangeWatcher`.
|
|
48
|
+
*/
|
|
49
|
+
export declare function useCanvasChangeFeed<TNode extends CanvasNode = CanvasNode, TEdge extends CanvasEdgeLike = CanvasEdge>(options: UseCanvasChangeFeedOptions<TNode, TEdge>): {
|
|
50
|
+
feed: CanvasChangeFeed<TNode, TEdge>;
|
|
51
|
+
last: CanvasChange<TNode, TEdge> | null;
|
|
52
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixerate/editor-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.167.0",
|
|
4
4
|
"description": "React bindings and prompt/rich-text components for @pixerate/editor",
|
|
5
5
|
"author": "Pixerate",
|
|
6
6
|
"license": "MIT",
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
"dependencies": {},
|
|
255
255
|
"peerDependencies": {
|
|
256
256
|
"@dagrejs/dagre": "^1.1.8",
|
|
257
|
-
"@pixerate/editor": ">=0.
|
|
257
|
+
"@pixerate/editor": ">=0.245.0 <1.0.0-0",
|
|
258
258
|
"@tiptap/core": "^2.27.3",
|
|
259
259
|
"@tiptap/extension-bubble-menu": "^2.27.3",
|
|
260
260
|
"@tiptap/extension-placeholder": "^2.27.3",
|
|
@@ -305,7 +305,7 @@
|
|
|
305
305
|
"tsup": "^9.0.0",
|
|
306
306
|
"typescript": "^5.7.3",
|
|
307
307
|
"vitest": "^5.0.5",
|
|
308
|
-
"@pixerate/editor": "0.
|
|
308
|
+
"@pixerate/editor": "0.245.0"
|
|
309
309
|
},
|
|
310
310
|
"scripts": {
|
|
311
311
|
"build": "tsup && tsc -p tsconfig.build.json && node ../../scripts/finalize-declarations.mjs dist",
|