@pixerate/editor-react 0.17.0 → 0.18.1
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/README.md +3 -1
- package/dist/canvas/index.cjs +880 -193
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +214 -3
- package/dist/canvas/index.d.ts +214 -3
- package/dist/canvas/index.js +699 -0
- package/dist/canvas/index.js.map +1 -1
- package/dist/{chunk-JR5ZBDR7.js → chunk-34HEZX7J.js} +206 -74
- package/dist/chunk-34HEZX7J.js.map +1 -0
- package/dist/index.cjs +1437 -1109
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +104 -5
- package/dist/index.d.ts +104 -5
- package/dist/index.js +350 -146
- package/dist/index.js.map +1 -1
- package/dist/spreadsheet/index.cjs +261 -135
- package/dist/spreadsheet/index.cjs.map +1 -1
- package/dist/spreadsheet/index.d.cts +39 -3
- package/dist/spreadsheet/index.d.ts +39 -3
- package/dist/spreadsheet/index.js +5 -3
- package/package.json +2 -2
- package/dist/chunk-JR5ZBDR7.js.map +0 -1
package/dist/canvas/index.cjs
CHANGED
|
@@ -20,198 +20,300 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/canvas/index.ts
|
|
21
21
|
var canvas_exports = {};
|
|
22
22
|
__export(canvas_exports, {
|
|
23
|
-
|
|
23
|
+
ANIMATABLE_PROPERTIES: () => import_canvas24.ANIMATABLE_PROPERTIES,
|
|
24
|
+
ANIMATION_DATA_KEY: () => import_canvas24.ANIMATION_DATA_KEY,
|
|
25
|
+
ANIMATION_EASING_LABELS: () => import_canvas24.ANIMATION_EASING_LABELS,
|
|
26
|
+
ANIMATION_EASING_PRESETS: () => import_canvas24.ANIMATION_EASING_PRESETS,
|
|
27
|
+
ANIMATION_TIME_EPSILON: () => import_canvas24.ANIMATION_TIME_EPSILON,
|
|
28
|
+
AUTO_LAYOUT_DATA_KEY: () => import_canvas22.AUTO_LAYOUT_DATA_KEY,
|
|
24
29
|
AgentPresenceLayer: () => AgentPresenceLayer,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
AnimationEditError: () => import_canvas24.AnimationEditError,
|
|
31
|
+
AnimationPlayer: () => import_canvas24.AnimationPlayer,
|
|
32
|
+
AnimationTimeline: () => AnimationTimeline,
|
|
33
|
+
CANVAS_COMPONENT_DRAG_TYPE: () => import_canvas25.CANVAS_COMPONENT_DRAG_TYPE,
|
|
34
|
+
CANVAS_TOKEN_PROPERTIES: () => import_canvas23.CANVAS_TOKEN_PROPERTIES,
|
|
35
|
+
CHILD_LAYOUT_DATA_KEY: () => import_canvas22.CHILD_LAYOUT_DATA_KEY,
|
|
36
|
+
CONNECTION_LINE_TYPES: () => import_canvas18.CONNECTION_LINE_TYPES,
|
|
37
|
+
CSS_ANIMATION_PROPERTIES: () => import_canvas24.CSS_ANIMATION_PROPERTIES,
|
|
38
|
+
CUBIC_BEZIER_PRESETS: () => import_canvas24.CUBIC_BEZIER_PRESETS,
|
|
39
|
+
CanvasComponentsPanel: () => CanvasComponentsPanel,
|
|
28
40
|
CanvasGuidesLayer: () => CanvasGuidesLayer,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
41
|
+
CanvasInstanceInspector: () => CanvasInstanceInspector,
|
|
42
|
+
CanvasScenesStore: () => import_canvas18.CanvasScenesStore,
|
|
43
|
+
DEFAULT_ARRANGE_SHORTCUTS: () => import_canvas18.DEFAULT_ARRANGE_SHORTCUTS,
|
|
44
|
+
MAX_KEYFRAME_REFS: () => import_canvas24.MAX_KEYFRAME_REFS,
|
|
45
|
+
ManualClock: () => import_canvas21.ManualClock,
|
|
46
|
+
RESIZE_HANDLES: () => import_canvas17.RESIZE_HANDLES,
|
|
47
|
+
SHAPE_DATA_KEY: () => import_canvas19.SHAPE_DATA_KEY,
|
|
48
|
+
SHAPE_KINDS: () => import_canvas19.SHAPE_KINDS,
|
|
49
|
+
SHAPE_NODE_TYPE: () => import_canvas19.SHAPE_NODE_TYPE,
|
|
50
|
+
SHAPE_OPERATIONS: () => import_canvas19.SHAPE_OPERATIONS,
|
|
37
51
|
ShapeNode: () => ShapeNode,
|
|
38
|
-
TOKEN_BINDINGS_DATA_KEY: () =>
|
|
39
|
-
TOKEN_MODES_DATA_KEY: () =>
|
|
52
|
+
TOKEN_BINDINGS_DATA_KEY: () => import_canvas23.TOKEN_BINDINGS_DATA_KEY,
|
|
53
|
+
TOKEN_MODES_DATA_KEY: () => import_canvas23.TOKEN_MODES_DATA_KEY,
|
|
40
54
|
TokenBindingPicker: () => TokenBindingPicker,
|
|
41
55
|
TokenModeSwitcher: () => TokenModeSwitcher,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
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
|
-
|
|
56
|
+
addKeyframesAtTime: () => import_canvas24.addKeyframesAtTime,
|
|
57
|
+
alignNodes: () => import_canvas18.alignNodes,
|
|
58
|
+
animateNode: () => import_canvas24.animateNode,
|
|
59
|
+
applyAnimation: () => import_canvas24.applyAnimation,
|
|
60
|
+
applyAnimationOverrides: () => import_canvas24.applyAnimationOverrides,
|
|
61
|
+
applyConstraints: () => import_canvas22.applyConstraints,
|
|
62
|
+
applyNodeUpdates: () => import_canvas18.applyNodeUpdates,
|
|
63
|
+
applyShapeCombination: () => import_canvas19.applyShapeCombination,
|
|
64
|
+
applyShapeReplacement: () => import_canvas20.applyShapeReplacement,
|
|
65
|
+
bezierPathArea: () => import_canvas20.bezierPathArea,
|
|
66
|
+
bezierPathBounds: () => import_canvas20.bezierPathBounds,
|
|
67
|
+
bezierPathLength: () => import_canvas20.bezierPathLength,
|
|
68
|
+
bezierPathPointAtLength: () => import_canvas20.bezierPathPointAtLength,
|
|
69
|
+
bezierPathSignedArea: () => import_canvas20.bezierPathSignedArea,
|
|
70
|
+
bezierPathToSvg: () => import_canvas20.bezierPathToSvg,
|
|
71
|
+
bindCanvasComponentProperty: () => import_canvas25.bindCanvasComponentProperty,
|
|
72
|
+
bindCanvasToken: () => import_canvas23.bindCanvasToken,
|
|
73
|
+
blendLayout: () => import_canvas21.blendLayout,
|
|
74
|
+
boundsOf: () => import_canvas21.boundsOf,
|
|
75
|
+
calculateDagreReflowDisplacement: () => import_canvas21.calculateDagreReflowDisplacement,
|
|
76
|
+
calculateDirectionalDisplacement: () => import_canvas21.calculateDirectionalDisplacement,
|
|
77
|
+
canCombineShapeNodes: () => import_canvas19.canCombineShapeNodes,
|
|
78
|
+
canOffsetShapeNodes: () => import_canvas20.canOffsetShapeNodes,
|
|
79
|
+
canOutlineShapeNodeStrokes: () => import_canvas20.canOutlineShapeNodeStrokes,
|
|
80
|
+
canvasHeight: () => import_canvas21.canvasHeight,
|
|
81
|
+
centerNodes: () => import_canvas21.centerNodes,
|
|
82
|
+
centre: () => import_canvas21.centre,
|
|
83
|
+
clampAnimationValue: () => import_canvas24.clampAnimationValue,
|
|
84
|
+
clampLayoutSize: () => import_canvas22.clampLayoutSize,
|
|
85
|
+
combineCanvasComponentsAsVariants: () => import_canvas25.combineCanvasComponentsAsVariants,
|
|
86
|
+
combineShapeNodes: () => import_canvas19.combineShapeNodes,
|
|
87
|
+
computeNodesBoundingBox: () => import_canvas21.computeNodesBoundingBox,
|
|
88
|
+
computeSnapGuides: () => import_canvas18.computeSnapGuides,
|
|
89
|
+
connectedOnly: () => import_canvas21.connectedOnly,
|
|
90
|
+
copyKeyframes: () => import_canvas24.copyKeyframes,
|
|
91
|
+
countPathSegments: () => import_canvas20.countPathSegments,
|
|
92
|
+
createAnimationPlayer: () => import_canvas24.createAnimationPlayer,
|
|
93
|
+
createBezierTrajectory: () => import_canvas21.createBezierTrajectory,
|
|
94
|
+
createCanvasAnimationController: () => import_canvas24.createCanvasAnimationController,
|
|
95
|
+
createCanvasAutoLayoutController: () => import_canvas22.createCanvasAutoLayoutController,
|
|
96
|
+
createCanvasComponent: () => import_canvas25.createCanvasComponent,
|
|
97
|
+
createCanvasComponentsController: () => import_canvas25.createCanvasComponentsController,
|
|
98
|
+
createCanvasInstance: () => import_canvas25.createCanvasInstance,
|
|
99
|
+
createCanvasScenesStore: () => import_canvas18.createCanvasScenesStore,
|
|
100
|
+
createFanOutTrajectory: () => import_canvas21.createFanOutTrajectory,
|
|
101
|
+
createGuideIndex: () => import_canvas18.createGuideIndex,
|
|
102
|
+
createNodeGuideIndex: () => import_canvas18.createNodeGuideIndex,
|
|
103
|
+
cubicBezierAt: () => import_canvas24.cubicBezierAt,
|
|
104
|
+
cubicPointAt: () => import_canvas17.cubicPointAt,
|
|
105
|
+
cubicsToPathData: () => import_canvas17.cubicsToPathData,
|
|
106
|
+
dashContours: () => import_canvas20.dashContours,
|
|
107
|
+
defaultEasing: () => import_canvas21.defaultEasing,
|
|
108
|
+
deleteKeyframes: () => import_canvas24.deleteKeyframes,
|
|
109
|
+
detachCanvasInstance: () => import_canvas25.detachCanvasInstance,
|
|
110
|
+
detachTokenBindings: () => import_canvas23.detachTokenBindings,
|
|
111
|
+
distanceToBezierPath: () => import_canvas20.distanceToBezierPath,
|
|
112
|
+
distributeNodes: () => import_canvas18.distributeNodes,
|
|
113
|
+
dividePaths: () => import_canvas20.dividePaths,
|
|
114
|
+
dividePolygons: () => import_canvas19.dividePolygons,
|
|
115
|
+
easingFromInfluence: () => import_canvas24.easingFromInfluence,
|
|
116
|
+
easingLabel: () => import_canvas24.easingLabel,
|
|
117
|
+
easingToCss: () => import_canvas24.easingToCss,
|
|
118
|
+
ensureLayout: () => import_canvas21.ensureLayout,
|
|
119
|
+
estimateCanvasHeight: () => import_canvas21.estimateCanvasHeight,
|
|
120
|
+
estimateNodeSize: () => import_canvas21.estimateNodeSize,
|
|
121
|
+
evaluateAnimation: () => import_canvas24.evaluateAnimation,
|
|
122
|
+
evaluateEasing: () => import_canvas24.evaluateEasing,
|
|
123
|
+
evaluateTrack: () => import_canvas24.evaluateTrack,
|
|
124
|
+
excludePaths: () => import_canvas20.excludePaths,
|
|
125
|
+
exportCssAnimation: () => import_canvas24.exportCssAnimation,
|
|
126
|
+
findConnectorSnap: () => import_canvas18.findConnectorSnap,
|
|
127
|
+
fitCubicRun: () => import_canvas17.fitCubicRun,
|
|
128
|
+
fitCubics: () => import_canvas17.fitCubics,
|
|
129
|
+
fitFreehandPath: () => import_canvas17.fitFreehandPath,
|
|
130
|
+
fitPathData: () => import_canvas17.fitPathData,
|
|
131
|
+
fitViewportToNodes: () => import_canvas18.fitViewportToNodes,
|
|
132
|
+
fitViewportToRect: () => import_canvas18.fitViewportToRect,
|
|
133
|
+
flattenSvgPath: () => import_canvas19.flattenSvgPath,
|
|
134
|
+
flowSide: () => import_canvas21.flowSide,
|
|
135
|
+
formatAnimationTime: () => import_canvas24.formatAnimationTime,
|
|
136
|
+
formatOklab: () => import_canvas24.formatOklab,
|
|
137
|
+
getAbsolutePosition: () => import_canvas18.getAbsolutePosition,
|
|
138
|
+
getAnimatableProperty: () => import_canvas24.getAnimatableProperty,
|
|
139
|
+
getAnimatedProperties: () => import_canvas24.getAnimatedProperties,
|
|
140
|
+
getAnimatedValue: () => import_canvas24.getAnimatedValue,
|
|
141
|
+
getAnimationDuration: () => import_canvas24.getAnimationDuration,
|
|
142
|
+
getAnimationTrack: () => import_canvas24.getAnimationTrack,
|
|
143
|
+
getAutoLayout: () => import_canvas22.getAutoLayout,
|
|
144
|
+
getAutoLayoutGrid: () => import_canvas22.getAutoLayoutGrid,
|
|
145
|
+
getAutoLayoutInsertTarget: () => import_canvas22.getAutoLayoutInsertTarget,
|
|
146
|
+
getBindableTokenProperties: () => import_canvas23.getBindableTokenProperties,
|
|
147
|
+
getCanvasComponentDragId: () => import_canvas25.getCanvasComponentDragId,
|
|
148
|
+
getCanvasTokenProperty: () => import_canvas23.getCanvasTokenProperty,
|
|
149
|
+
getCenteredNodePosition: () => import_canvas21.getCenteredNodePosition,
|
|
150
|
+
getChildLayout: () => import_canvas22.getChildLayout,
|
|
151
|
+
getComponentSourceId: () => import_canvas25.getComponentSourceId,
|
|
152
|
+
getCssPropertyAnimations: () => import_canvas24.getCssPropertyAnimations,
|
|
153
|
+
getEffectiveTokenModes: () => import_canvas23.getEffectiveTokenModes,
|
|
154
|
+
getFlowChildren: () => import_canvas22.getFlowChildren,
|
|
155
|
+
getInstanceData: () => import_canvas25.getInstanceData,
|
|
156
|
+
getInstanceStatus: () => import_canvas25.getInstanceStatus,
|
|
157
|
+
getKeyframeTimes: () => import_canvas24.getKeyframeTimes,
|
|
158
|
+
getLayoutParent: () => import_canvas22.getLayoutParent,
|
|
159
|
+
getLayoutSizing: () => import_canvas22.getLayoutSizing,
|
|
160
|
+
getLayoutedNodes: () => import_canvas21.getLayoutedNodes,
|
|
161
|
+
getNodeAnimation: () => import_canvas24.getNodeAnimation,
|
|
162
|
+
getNodeOverrides: () => import_canvas25.getNodeOverrides,
|
|
163
|
+
getNodeRect: () => import_canvas18.getNodeRect,
|
|
164
|
+
getNodeShape: () => import_canvas19.getNodeShape,
|
|
165
|
+
getNodeSize: () => import_canvas18.getNodeSize,
|
|
166
|
+
getNodeTokenBindings: () => import_canvas23.getNodeTokenBindings,
|
|
167
|
+
getNodeTokenModes: () => import_canvas23.getNodeTokenModes,
|
|
168
|
+
getResizingNodeRect: () => import_canvas17.getResizingNodeRect,
|
|
169
|
+
getShapeRenderData: () => import_canvas19.getShapeRenderData,
|
|
170
|
+
getShapeSvg: () => import_canvas19.getShapeSvg,
|
|
171
|
+
getTimelineRows: () => import_canvas24.getTimelineRows,
|
|
172
|
+
getTimelineTicks: () => import_canvas24.getTimelineTicks,
|
|
173
|
+
getTokenPropertyScope: () => import_canvas23.getTokenPropertyScope,
|
|
174
|
+
getTokensForProperty: () => import_canvas23.getTokensForProperty,
|
|
175
|
+
handlePoint: () => import_canvas18.handlePoint,
|
|
176
|
+
hasVisibleStroke: () => import_canvas20.hasVisibleStroke,
|
|
177
|
+
inferResizeHandle: () => import_canvas17.inferResizeHandle,
|
|
178
|
+
inspectCanvasInstance: () => import_canvas25.inspectCanvasInstance,
|
|
179
|
+
inspectNodeTokens: () => import_canvas23.inspectNodeTokens,
|
|
180
|
+
interpolateAnimationValue: () => import_canvas24.interpolateAnimationValue,
|
|
181
|
+
intersectPaths: () => import_canvas20.intersectPaths,
|
|
182
|
+
intersectPolygons: () => import_canvas19.intersectPolygons,
|
|
183
|
+
invertNodeUpdates: () => import_canvas18.invertNodeUpdates,
|
|
184
|
+
isAnimationEasing: () => import_canvas24.isAnimationEasing,
|
|
185
|
+
isAnimationKeyframe: () => import_canvas24.isAnimationKeyframe,
|
|
186
|
+
isAutoLayoutFrame: () => import_canvas22.isAutoLayoutFrame,
|
|
187
|
+
isCanvasComponent: () => import_canvas25.isCanvasComponent,
|
|
188
|
+
isCanvasComponentSet: () => import_canvas25.isCanvasComponentSet,
|
|
189
|
+
isCanvasInstance: () => import_canvas25.isCanvasInstance,
|
|
190
|
+
isCssExportExact: () => import_canvas24.isCssExportExact,
|
|
191
|
+
isEventFromTextInput: () => import_canvas21.isEventFromTextInput,
|
|
192
|
+
isKeyframeSelected: () => import_canvas24.isKeyframeSelected,
|
|
193
|
+
isLocked: () => import_canvas18.isLocked,
|
|
194
|
+
isMeasureModifierHeld: () => import_canvas17.isMeasureModifierHeld,
|
|
195
|
+
isNodeAnimated: () => import_canvas24.isNodeAnimated,
|
|
196
|
+
isShapeDescription: () => import_canvas19.isShapeDescription,
|
|
197
|
+
isShapeNode: () => import_canvas19.isShapeNode,
|
|
198
|
+
isStraightCubic: () => import_canvas17.isStraightCubic,
|
|
199
|
+
isValidCanvasNode: () => import_canvas21.isValidCanvasNode,
|
|
200
|
+
isValidUrl: () => import_canvas21.isValidUrl,
|
|
201
|
+
layoutAll: () => import_canvas22.layoutAll,
|
|
202
|
+
layoutBounds: () => import_canvas21.layoutBounds,
|
|
203
|
+
layoutFrame: () => import_canvas22.layoutFrame,
|
|
204
|
+
layoutUp: () => import_canvas22.layoutUp,
|
|
205
|
+
layoutUpMany: () => import_canvas22.layoutUpMany,
|
|
206
|
+
linearPositionTrajectory: () => import_canvas21.linearPositionTrajectory,
|
|
207
|
+
linearTrajectory: () => import_canvas21.linearTrajectory,
|
|
208
|
+
listCanvasComponents: () => import_canvas25.listCanvasComponents,
|
|
209
|
+
lockNodes: () => import_canvas18.lockNodes,
|
|
210
|
+
makeSizingCoherent: () => import_canvas22.makeSizingCoherent,
|
|
211
|
+
matchArrangeShortcut: () => import_canvas18.matchArrangeShortcut,
|
|
212
|
+
matchSize: () => import_canvas18.matchSize,
|
|
213
|
+
measureBetween: () => import_canvas17.measureBetween,
|
|
214
|
+
measureLabel: () => import_canvas17.measureLabel,
|
|
215
|
+
measureSelection: () => import_canvas17.measureSelection,
|
|
216
|
+
measureToLine: () => import_canvas17.measureToLine,
|
|
217
|
+
mergeNodeUpdates: () => import_canvas22.mergeNodeUpdates,
|
|
218
|
+
mixColorsOklab: () => import_canvas24.mixColorsOklab,
|
|
219
|
+
moveKeyframes: () => import_canvas24.moveKeyframes,
|
|
220
|
+
moveLayoutChild: () => import_canvas22.moveLayoutChild,
|
|
221
|
+
multiPolygonArea: () => import_canvas19.multiPolygonArea,
|
|
222
|
+
multiPolygonBounds: () => import_canvas19.multiPolygonBounds,
|
|
223
|
+
nearestHandlePositions: () => import_canvas18.nearestHandlePositions,
|
|
224
|
+
normalizeBezierPath: () => import_canvas20.normalizeBezierPath,
|
|
225
|
+
normalizeKeyframes: () => import_canvas24.normalizeKeyframes,
|
|
226
|
+
offsetPath: () => import_canvas20.offsetPath,
|
|
227
|
+
offsetShapeNodes: () => import_canvas20.offsetShapeNodes,
|
|
228
|
+
oklabToRgb: () => import_canvas24.oklabToRgb,
|
|
229
|
+
oppositePosition: () => import_canvas18.oppositePosition,
|
|
230
|
+
outlineShapeNodeStrokes: () => import_canvas20.outlineShapeNodeStrokes,
|
|
231
|
+
outlineStroke: () => import_canvas20.outlineStroke,
|
|
232
|
+
overlaps: () => import_canvas21.overlaps,
|
|
233
|
+
parseCanvasClipboardData: () => import_canvas21.parseCanvasClipboardData,
|
|
234
|
+
parseCanvasScenes: () => import_canvas18.parseCanvasScenes,
|
|
235
|
+
parseCssEasing: () => import_canvas24.parseCssEasing,
|
|
236
|
+
parseKeyframeClipboard: () => import_canvas24.parseKeyframeClipboard,
|
|
237
|
+
parseOklab: () => import_canvas24.parseOklab,
|
|
238
|
+
parseSvgPath: () => import_canvas19.parseSvgPath,
|
|
239
|
+
pasteKeyframes: () => import_canvas24.pasteKeyframes,
|
|
240
|
+
pathBoolean: () => import_canvas20.pathBoolean,
|
|
241
|
+
placeBeside: () => import_canvas21.placeBeside,
|
|
242
|
+
playWebAnimations: () => import_canvas24.playWebAnimations,
|
|
243
|
+
pointInBezierPath: () => import_canvas20.pointInBezierPath,
|
|
244
|
+
pointInMultiPolygon: () => import_canvas19.pointInMultiPolygon,
|
|
245
|
+
pointInRings: () => import_canvas19.pointInRings,
|
|
246
|
+
polygonArea: () => import_canvas19.polygonArea,
|
|
247
|
+
polygonBoolean: () => import_canvas19.polygonBoolean,
|
|
248
|
+
polygonToSvgPath: () => import_canvas19.polygonToSvgPath,
|
|
249
|
+
positionToSide: () => import_canvas18.positionToSide,
|
|
250
|
+
pruneCanvasTokenModes: () => import_canvas23.pruneCanvasTokenModes,
|
|
251
|
+
pushCanvasInstanceOverrides: () => import_canvas25.pushCanvasInstanceOverrides,
|
|
252
|
+
readAnimatableValue: () => import_canvas24.readAnimatableValue,
|
|
253
|
+
readNodeStyleProperty: () => import_canvas23.readNodeStyleProperty,
|
|
254
|
+
readStyleSize: () => import_canvas18.readStyleSize,
|
|
255
|
+
realClock: () => import_canvas21.realClock,
|
|
256
|
+
recordAnimationChanges: () => import_canvas24.recordAnimationChanges,
|
|
257
|
+
relayoutUpdates: () => import_canvas22.relayoutUpdates,
|
|
258
|
+
remapPastedNodes: () => import_canvas21.remapPastedNodes,
|
|
259
|
+
removeTrack: () => import_canvas24.removeTrack,
|
|
260
|
+
reorderNodes: () => import_canvas18.reorderNodes,
|
|
261
|
+
repositionNodesTo: () => import_canvas21.repositionNodesTo,
|
|
262
|
+
resetCanvasInstanceOverrides: () => import_canvas25.resetCanvasInstanceOverrides,
|
|
263
|
+
resizeHandleAxes: () => import_canvas17.resizeHandleAxes,
|
|
264
|
+
resolveCanvasTokens: () => import_canvas23.resolveCanvasTokens,
|
|
265
|
+
resolveEasing: () => import_canvas24.resolveEasing,
|
|
266
|
+
resolvePadding: () => import_canvas22.resolvePadding,
|
|
267
|
+
restoreCanvasMainComponent: () => import_canvas25.restoreCanvasMainComponent,
|
|
268
|
+
revertShapeCombination: () => import_canvas19.revertShapeCombination,
|
|
269
|
+
rgbToOklab: () => import_canvas24.rgbToOklab,
|
|
270
|
+
ringSignedArea: () => import_canvas19.ringSignedArea,
|
|
271
|
+
runMultiNodeTransition: () => import_canvas21.runMultiNodeTransition,
|
|
272
|
+
sampleAnimationFrames: () => import_canvas24.sampleAnimationFrames,
|
|
273
|
+
scaleKeyframes: () => import_canvas24.scaleKeyframes,
|
|
274
|
+
serializeCanvasNodes: () => import_canvas21.serializeCanvasNodes,
|
|
275
|
+
setCanvasComponentProperty: () => import_canvas25.setCanvasComponentProperty,
|
|
276
|
+
setCanvasInstanceProperties: () => import_canvas25.setCanvasInstanceProperties,
|
|
277
|
+
setCanvasTokenMode: () => import_canvas23.setCanvasTokenMode,
|
|
278
|
+
setKeyframe: () => import_canvas24.setKeyframe,
|
|
279
|
+
setKeyframeEasing: () => import_canvas24.setKeyframeEasing,
|
|
280
|
+
setMotionPath: () => import_canvas24.setMotionPath,
|
|
281
|
+
setTrackEnabled: () => import_canvas24.setTrackEnabled,
|
|
282
|
+
shapeNodeToBezierPath: () => import_canvas20.shapeNodeToBezierPath,
|
|
283
|
+
shapeNodeToPolygon: () => import_canvas19.shapeNodeToPolygon,
|
|
284
|
+
shapeToBezierPath: () => import_canvas20.shapeToBezierPath,
|
|
285
|
+
shapeToPolygon: () => import_canvas19.shapeToPolygon,
|
|
286
|
+
sideToPosition: () => import_canvas18.sideToPosition,
|
|
287
|
+
simplifyRing: () => import_canvas19.simplifyRing,
|
|
288
|
+
snapKeyframeDelta: () => import_canvas24.snapKeyframeDelta,
|
|
289
|
+
snapNodeDrag: () => import_canvas18.snapNodeDrag,
|
|
290
|
+
snapNodeResize: () => import_canvas17.snapNodeResize,
|
|
291
|
+
snapResize: () => import_canvas17.snapResize,
|
|
292
|
+
snapTimeToFrame: () => import_canvas24.snapTimeToFrame,
|
|
293
|
+
snapToGrid: () => import_canvas17.snapToGrid,
|
|
294
|
+
springAt: () => import_canvas24.springAt,
|
|
295
|
+
strokeOutlineRings: () => import_canvas20.strokeOutlineRings,
|
|
296
|
+
subtractPaths: () => import_canvas20.subtractPaths,
|
|
297
|
+
subtractPolygons: () => import_canvas19.subtractPolygons,
|
|
298
|
+
swapCanvasInstance: () => import_canvas25.swapCanvasInstance,
|
|
299
|
+
syncAllCanvasInstances: () => import_canvas25.syncAllCanvasInstances,
|
|
300
|
+
syncCanvasComponents: () => import_canvas25.syncCanvasComponents,
|
|
301
|
+
syncCanvasInstance: () => import_canvas25.syncCanvasInstance,
|
|
302
|
+
timeToX: () => import_canvas24.timeToX,
|
|
303
|
+
toBezierPath: () => import_canvas20.toBezierPath,
|
|
304
|
+
toWebAnimations: () => import_canvas24.toWebAnimations,
|
|
305
|
+
toggleLockNodes: () => import_canvas18.toggleLockNodes,
|
|
306
|
+
transformBezierPath: () => import_canvas20.transformBezierPath,
|
|
307
|
+
unionPolygons: () => import_canvas19.unionPolygons,
|
|
308
|
+
unitePaths: () => import_canvas20.unitePaths,
|
|
309
|
+
unlockNodes: () => import_canvas18.unlockNodes,
|
|
310
|
+
updateKeyframe: () => import_canvas24.updateKeyframe,
|
|
311
|
+
useCanvasAnimation: () => useCanvasAnimation,
|
|
211
312
|
useCanvasArrange: () => useCanvasArrange,
|
|
212
313
|
useCanvasArrangeShortcuts: () => useCanvasArrangeShortcuts,
|
|
213
314
|
useCanvasAutoLayout: () => useCanvasAutoLayout,
|
|
214
315
|
useCanvasClipboard: () => useCanvasClipboard,
|
|
316
|
+
useCanvasComponents: () => useCanvasComponents,
|
|
215
317
|
useCanvasDocking: () => useCanvasDocking,
|
|
216
318
|
useCanvasExplosion: () => useCanvasExplosion,
|
|
217
319
|
useCanvasGraph: () => useCanvasGraph,
|
|
@@ -221,9 +323,13 @@ __export(canvas_exports, {
|
|
|
221
323
|
useCanvasShortcuts: () => useCanvasShortcuts,
|
|
222
324
|
useCanvasTokens: () => useCanvasTokens,
|
|
223
325
|
useStreamingCanvas: () => useStreamingCanvas,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
326
|
+
withNodeAnimation: () => import_canvas24.withNodeAnimation,
|
|
327
|
+
withStyleSize: () => import_canvas18.withStyleSize,
|
|
328
|
+
wouldCreateComponentCycle: () => import_canvas25.wouldCreateComponentCycle,
|
|
329
|
+
wrapAnimationTime: () => import_canvas24.wrapAnimationTime,
|
|
330
|
+
writeNodeStyleProperty: () => import_canvas23.writeNodeStyleProperty,
|
|
331
|
+
xToTime: () => import_canvas24.xToTime,
|
|
332
|
+
xorPolygons: () => import_canvas19.xorPolygons
|
|
227
333
|
});
|
|
228
334
|
module.exports = __toCommonJS(canvas_exports);
|
|
229
335
|
|
|
@@ -1236,8 +1342,8 @@ function useCanvasMeasure(options) {
|
|
|
1236
1342
|
}
|
|
1237
1343
|
|
|
1238
1344
|
// src/canvas/index.ts
|
|
1239
|
-
var
|
|
1240
|
-
var
|
|
1345
|
+
var import_canvas17 = require("@pixerate/editor/canvas");
|
|
1346
|
+
var import_canvas18 = require("@pixerate/editor/canvas");
|
|
1241
1347
|
|
|
1242
1348
|
// src/canvas/ShapeNode.tsx
|
|
1243
1349
|
var import_canvas9 = require("@pixerate/editor/canvas");
|
|
@@ -1285,10 +1391,10 @@ function ShapeNode({ data, width, height, selected, className = "", children })
|
|
|
1285
1391
|
}
|
|
1286
1392
|
|
|
1287
1393
|
// src/canvas/index.ts
|
|
1288
|
-
var
|
|
1289
|
-
var
|
|
1290
|
-
var
|
|
1291
|
-
var
|
|
1394
|
+
var import_canvas19 = require("@pixerate/editor/canvas");
|
|
1395
|
+
var import_canvas20 = require("@pixerate/editor/canvas");
|
|
1396
|
+
var import_canvas21 = require("@pixerate/editor/canvas");
|
|
1397
|
+
var import_canvas22 = require("@pixerate/editor/canvas");
|
|
1292
1398
|
|
|
1293
1399
|
// src/canvas/useCanvasAutoLayout.ts
|
|
1294
1400
|
var import_react11 = require("react");
|
|
@@ -1500,17 +1606,506 @@ function TokenModeSwitcher({
|
|
|
1500
1606
|
}
|
|
1501
1607
|
|
|
1502
1608
|
// src/canvas/index.ts
|
|
1503
|
-
var
|
|
1609
|
+
var import_canvas23 = require("@pixerate/editor/canvas");
|
|
1610
|
+
|
|
1611
|
+
// src/canvas/useCanvasAnimation.ts
|
|
1612
|
+
var import_react13 = require("react");
|
|
1613
|
+
var import_canvas13 = require("@pixerate/editor/canvas");
|
|
1614
|
+
function useCanvasAnimation(options) {
|
|
1615
|
+
const nodesRef = (0, import_react13.useRef)(options.nodes);
|
|
1616
|
+
nodesRef.current = options.nodes;
|
|
1617
|
+
const optionsRef = (0, import_react13.useRef)(options);
|
|
1618
|
+
optionsRef.current = options;
|
|
1619
|
+
const controller = (0, import_react13.useMemo)(
|
|
1620
|
+
() => (0, import_canvas13.createCanvasAnimationController)({
|
|
1621
|
+
getNodes: () => nodesRef.current,
|
|
1622
|
+
setNodes: (next) => {
|
|
1623
|
+
nodesRef.current = next;
|
|
1624
|
+
optionsRef.current.setNodes(next);
|
|
1625
|
+
},
|
|
1626
|
+
get history() {
|
|
1627
|
+
return optionsRef.current.history;
|
|
1628
|
+
},
|
|
1629
|
+
get getSelectedIds() {
|
|
1630
|
+
return optionsRef.current.getSelectedIds;
|
|
1631
|
+
},
|
|
1632
|
+
get properties() {
|
|
1633
|
+
return optionsRef.current.properties;
|
|
1634
|
+
},
|
|
1635
|
+
clock: options.clock,
|
|
1636
|
+
duration: options.duration,
|
|
1637
|
+
minDuration: options.minDuration,
|
|
1638
|
+
loop: options.loop,
|
|
1639
|
+
playbackRate: options.playbackRate,
|
|
1640
|
+
fps: options.fps,
|
|
1641
|
+
recording: options.recording,
|
|
1642
|
+
onTime: (time) => optionsRef.current.onTime?.(time)
|
|
1643
|
+
}),
|
|
1644
|
+
[]
|
|
1645
|
+
);
|
|
1646
|
+
(0, import_react13.useEffect)(() => () => controller.destroy(), [controller]);
|
|
1647
|
+
(0, import_react13.useEffect)(() => {
|
|
1648
|
+
if (options.loop !== void 0) controller.setLoop(options.loop);
|
|
1649
|
+
}, [controller, options.loop]);
|
|
1650
|
+
(0, import_react13.useEffect)(() => {
|
|
1651
|
+
if (options.playbackRate !== void 0) controller.setPlaybackRate(options.playbackRate);
|
|
1652
|
+
}, [controller, options.playbackRate]);
|
|
1653
|
+
(0, import_react13.useEffect)(() => {
|
|
1654
|
+
if (options.recording !== void 0) controller.setRecording(options.recording);
|
|
1655
|
+
}, [controller, options.recording]);
|
|
1656
|
+
const state = (0, import_react13.useSyncExternalStore)(
|
|
1657
|
+
(listener) => controller.subscribe(listener),
|
|
1658
|
+
() => controller.getState(),
|
|
1659
|
+
() => controller.getState()
|
|
1660
|
+
);
|
|
1661
|
+
(0, import_react13.useEffect)(() => {
|
|
1662
|
+
controller.refresh();
|
|
1663
|
+
}, [controller, options.nodes]);
|
|
1664
|
+
const displayNodes = (0, import_react13.useMemo)(() => controller.display(options.nodes), [controller, options.nodes, state.time]);
|
|
1665
|
+
return (0, import_react13.useMemo)(
|
|
1666
|
+
() => ({
|
|
1667
|
+
...controller,
|
|
1668
|
+
state,
|
|
1669
|
+
time: state.time,
|
|
1670
|
+
playing: state.playing,
|
|
1671
|
+
recording: state.recording,
|
|
1672
|
+
duration: state.duration,
|
|
1673
|
+
selection: state.selection,
|
|
1674
|
+
drag: state.drag,
|
|
1675
|
+
/** The nodes evaluated at the playhead; render these. */
|
|
1676
|
+
displayNodes,
|
|
1677
|
+
get clipboard() {
|
|
1678
|
+
return controller.clipboard;
|
|
1679
|
+
}
|
|
1680
|
+
}),
|
|
1681
|
+
[controller, state, displayNodes]
|
|
1682
|
+
);
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
// src/canvas/AnimationTimeline.tsx
|
|
1686
|
+
var import_react14 = require("react");
|
|
1687
|
+
var import_canvas14 = require("@pixerate/editor/canvas");
|
|
1688
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1689
|
+
var LOOP_LABELS = { none: "Once", loop: "Loop", "ping-pong": "Ping-pong" };
|
|
1690
|
+
var easingValue = (easing) => typeof easing === "string" ? easing : easing ? "custom" : "linear";
|
|
1691
|
+
function AnimationTimeline({ animation, nodeIds, width = 360, snapThreshold = 8, labelOf, className = "" }) {
|
|
1692
|
+
const { state } = animation;
|
|
1693
|
+
const duration = state.duration;
|
|
1694
|
+
const rows = animation.timelineRows(nodeIds ?? void 0, labelOf ? { labelOf } : {});
|
|
1695
|
+
const ticks = (0, import_canvas14.getTimelineTicks)(duration, width);
|
|
1696
|
+
const selectedEasing = (() => {
|
|
1697
|
+
const first = state.selection[0];
|
|
1698
|
+
if (!first) return "";
|
|
1699
|
+
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);
|
|
1700
|
+
return "";
|
|
1701
|
+
})();
|
|
1702
|
+
const dragRef = (0, import_react14.useRef)(null);
|
|
1703
|
+
(0, import_react14.useEffect)(() => {
|
|
1704
|
+
const onKey = (event) => {
|
|
1705
|
+
if (event.key === "Escape" && dragRef.current) {
|
|
1706
|
+
dragRef.current = null;
|
|
1707
|
+
animation.cancelKeyframeDrag();
|
|
1708
|
+
}
|
|
1709
|
+
};
|
|
1710
|
+
window.addEventListener("keydown", onKey);
|
|
1711
|
+
return () => window.removeEventListener("keydown", onKey);
|
|
1712
|
+
}, [animation]);
|
|
1713
|
+
const onRulerDown = (event) => {
|
|
1714
|
+
const lane = event.currentTarget;
|
|
1715
|
+
const left = lane.getBoundingClientRect().left;
|
|
1716
|
+
animation.scrub((0, import_canvas14.xToTime)(event.clientX - left, duration, width));
|
|
1717
|
+
const move = (e) => animation.scrub((0, import_canvas14.xToTime)(e.clientX - left, duration, width));
|
|
1718
|
+
const up = () => {
|
|
1719
|
+
window.removeEventListener("pointermove", move);
|
|
1720
|
+
window.removeEventListener("pointerup", up);
|
|
1721
|
+
animation.endScrub();
|
|
1722
|
+
};
|
|
1723
|
+
window.addEventListener("pointermove", move);
|
|
1724
|
+
window.addEventListener("pointerup", up);
|
|
1725
|
+
};
|
|
1726
|
+
const onKeyDown = (ref) => (event) => {
|
|
1727
|
+
event.stopPropagation();
|
|
1728
|
+
event.preventDefault();
|
|
1729
|
+
if (event.shiftKey || event.metaKey || event.ctrlKey) {
|
|
1730
|
+
animation.selectKeyframes([ref], "toggle");
|
|
1731
|
+
return;
|
|
1732
|
+
}
|
|
1733
|
+
animation.beginKeyframeDrag([ref]);
|
|
1734
|
+
dragRef.current = { startX: event.clientX };
|
|
1735
|
+
const msPerPx = width > 0 ? duration / width : 0;
|
|
1736
|
+
const move = (e) => {
|
|
1737
|
+
if (!dragRef.current) return;
|
|
1738
|
+
animation.updateKeyframeDrag((e.clientX - dragRef.current.startX) * msPerPx, { snap: !e.altKey, thresholdMs: snapThreshold * msPerPx });
|
|
1739
|
+
};
|
|
1740
|
+
const up = () => {
|
|
1741
|
+
window.removeEventListener("pointermove", move);
|
|
1742
|
+
window.removeEventListener("pointerup", up);
|
|
1743
|
+
if (!dragRef.current) return;
|
|
1744
|
+
dragRef.current = null;
|
|
1745
|
+
animation.endKeyframeDrag();
|
|
1746
|
+
};
|
|
1747
|
+
window.addEventListener("pointermove", move);
|
|
1748
|
+
window.addEventListener("pointerup", up);
|
|
1749
|
+
};
|
|
1750
|
+
const onTimelineKey = (event) => {
|
|
1751
|
+
if ((event.key === "Delete" || event.key === "Backspace") && state.selection.length > 0) {
|
|
1752
|
+
event.preventDefault();
|
|
1753
|
+
animation.deleteKeyframes();
|
|
1754
|
+
}
|
|
1755
|
+
};
|
|
1756
|
+
const btn = "rounded border border-border px-2 py-0.5 text-xs hover:bg-muted disabled:opacity-50";
|
|
1757
|
+
const playheadX = (0, import_canvas14.timeToX)(state.time, duration, width);
|
|
1758
|
+
const labelWidth = 120;
|
|
1759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { "data-animation-timeline": "", className: `flex flex-col gap-1 text-xs text-foreground ${className}`, tabIndex: 0, onKeyDown: onTimelineKey, children: [
|
|
1760
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-wrap items-center gap-2", role: "toolbar", "aria-label": "Animation", children: [
|
|
1761
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", className: btn, "data-action": "toggle-play", "aria-label": state.playing ? "Pause" : "Play", onClick: () => animation.toggle(), children: state.playing ? "\u275A\u275A" : "\u25B6" }),
|
|
1762
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1763
|
+
"button",
|
|
1764
|
+
{
|
|
1765
|
+
type: "button",
|
|
1766
|
+
className: `${btn} ${state.recording ? "text-red-500" : ""}`,
|
|
1767
|
+
"data-action": "record",
|
|
1768
|
+
"aria-pressed": state.recording,
|
|
1769
|
+
"aria-label": "Record keyframes",
|
|
1770
|
+
onClick: () => animation.toggleRecording(),
|
|
1771
|
+
children: "\u25CF Rec"
|
|
1772
|
+
}
|
|
1773
|
+
),
|
|
1774
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { type: "button", className: btn, "data-action": "add-keyframe", onClick: () => animation.addKeyframe(), children: "\u25C6 Key" }),
|
|
1775
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { "data-time": "", className: "tabular-nums text-muted-foreground", children: [
|
|
1776
|
+
(0, import_canvas14.formatAnimationTime)(state.time),
|
|
1777
|
+
" / ",
|
|
1778
|
+
(0, import_canvas14.formatAnimationTime)(duration)
|
|
1779
|
+
] }),
|
|
1780
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1781
|
+
"select",
|
|
1782
|
+
{
|
|
1783
|
+
"aria-label": "Easing",
|
|
1784
|
+
"data-easing-picker": "",
|
|
1785
|
+
className: "rounded border border-border bg-background px-1 py-0.5",
|
|
1786
|
+
value: selectedEasing,
|
|
1787
|
+
disabled: state.selection.length === 0,
|
|
1788
|
+
onChange: (e) => e.target.value && e.target.value !== "custom" && animation.setEasing(e.target.value),
|
|
1789
|
+
children: [
|
|
1790
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "", children: "Easing\u2026" }),
|
|
1791
|
+
import_canvas14.ANIMATION_EASING_PRESETS.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: preset, children: import_canvas14.ANIMATION_EASING_LABELS[preset] }, preset)),
|
|
1792
|
+
selectedEasing === "custom" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: "custom", children: "Custom" }) : null
|
|
1793
|
+
]
|
|
1794
|
+
}
|
|
1795
|
+
),
|
|
1796
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1797
|
+
"select",
|
|
1798
|
+
{
|
|
1799
|
+
"aria-label": "Loop",
|
|
1800
|
+
"data-loop-picker": "",
|
|
1801
|
+
className: "rounded border border-border bg-background px-1 py-0.5",
|
|
1802
|
+
value: state.loop,
|
|
1803
|
+
onChange: (e) => animation.setLoop(e.target.value),
|
|
1804
|
+
children: Object.keys(LOOP_LABELS).map((mode) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("option", { value: mode, children: LOOP_LABELS[mode] }, mode))
|
|
1805
|
+
}
|
|
1806
|
+
)
|
|
1807
|
+
] }),
|
|
1808
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex", children: [
|
|
1809
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { width: labelWidth }, className: "shrink-0" }),
|
|
1810
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
1811
|
+
"div",
|
|
1812
|
+
{
|
|
1813
|
+
"data-timeline-ruler": "",
|
|
1814
|
+
className: "relative h-5 cursor-ew-resize border-b border-border",
|
|
1815
|
+
style: { width },
|
|
1816
|
+
onPointerDown: onRulerDown,
|
|
1817
|
+
children: [
|
|
1818
|
+
ticks.map((tick) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "absolute top-0 -translate-x-1/2 text-[10px] text-muted-foreground", style: { left: tick.x }, children: tick.label }, tick.time)),
|
|
1819
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { "data-playhead": "", className: "absolute top-0 h-5 w-px bg-red-500", style: { left: playheadX } })
|
|
1820
|
+
]
|
|
1821
|
+
}
|
|
1822
|
+
)
|
|
1823
|
+
] }),
|
|
1824
|
+
rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-muted-foreground", "data-timeline-empty": "", children: "Select an animated node, or press \u25C6 Key to add a keyframe." }) : rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center", "data-track": row.id, children: [
|
|
1825
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { className: "flex shrink-0 items-center gap-1 truncate pr-2", style: { width: labelWidth }, title: `${row.nodeLabel} \xB7 ${row.label}`, children: [
|
|
1826
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1827
|
+
"input",
|
|
1828
|
+
{
|
|
1829
|
+
type: "checkbox",
|
|
1830
|
+
"aria-label": `Enable ${row.label}`,
|
|
1831
|
+
checked: row.enabled,
|
|
1832
|
+
onChange: (e) => animation.setTrackEnabled(row.nodeId, row.property, e.target.checked)
|
|
1833
|
+
}
|
|
1834
|
+
),
|
|
1835
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "truncate", children: [
|
|
1836
|
+
rows.filter((r) => r.nodeId === row.nodeId).length < rows.length ? `${row.nodeLabel} \xB7 ` : "",
|
|
1837
|
+
row.label
|
|
1838
|
+
] })
|
|
1839
|
+
] }),
|
|
1840
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { "data-lane": "", className: `relative h-5 rounded bg-muted/40 ${row.enabled ? "" : "opacity-50"}`, style: { width }, children: [
|
|
1841
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "pointer-events-none absolute top-0 h-5 w-px bg-red-500/60", style: { left: playheadX } }),
|
|
1842
|
+
state.drag?.target != null ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { "data-snap-target": "", className: "pointer-events-none absolute top-0 h-5 w-px bg-sky-400", style: { left: (0, import_canvas14.timeToX)(state.drag.target, duration, width) } }) : null,
|
|
1843
|
+
row.keyframes.map((k) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
1844
|
+
"button",
|
|
1845
|
+
{
|
|
1846
|
+
type: "button",
|
|
1847
|
+
"data-keyframe": k.ref.time,
|
|
1848
|
+
"aria-pressed": k.selected,
|
|
1849
|
+
"aria-label": `${row.label} keyframe at ${(0, import_canvas14.formatAnimationTime)(k.ref.time)}`,
|
|
1850
|
+
title: `${(0, import_canvas14.formatAnimationTime)(k.time)} \xB7 ${String(k.value)}`,
|
|
1851
|
+
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]"}`,
|
|
1852
|
+
style: { left: (0, import_canvas14.timeToX)(k.time, duration, width) },
|
|
1853
|
+
onPointerDown: onKeyDown(k.ref)
|
|
1854
|
+
},
|
|
1855
|
+
k.ref.time
|
|
1856
|
+
))
|
|
1857
|
+
] })
|
|
1858
|
+
] }, row.id))
|
|
1859
|
+
] });
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
// src/canvas/index.ts
|
|
1863
|
+
var import_canvas24 = require("@pixerate/editor/canvas");
|
|
1864
|
+
|
|
1865
|
+
// src/canvas/useCanvasComponents.ts
|
|
1866
|
+
var import_react15 = require("react");
|
|
1867
|
+
var import_canvas15 = require("@pixerate/editor/canvas");
|
|
1868
|
+
function useCanvasComponents(options) {
|
|
1869
|
+
const nodesRef = (0, import_react15.useRef)(options.nodes);
|
|
1870
|
+
nodesRef.current = options.nodes;
|
|
1871
|
+
const optionsRef = (0, import_react15.useRef)(options);
|
|
1872
|
+
optionsRef.current = options;
|
|
1873
|
+
const controller = (0, import_react15.useMemo)(
|
|
1874
|
+
() => (0, import_canvas15.createCanvasComponentsController)({
|
|
1875
|
+
getNodes: () => nodesRef.current,
|
|
1876
|
+
setNodes: (next) => {
|
|
1877
|
+
nodesRef.current = next;
|
|
1878
|
+
optionsRef.current.setNodes(next);
|
|
1879
|
+
},
|
|
1880
|
+
get history() {
|
|
1881
|
+
return optionsRef.current.history;
|
|
1882
|
+
},
|
|
1883
|
+
get getSelectedIds() {
|
|
1884
|
+
return optionsRef.current.getSelectedIds;
|
|
1885
|
+
},
|
|
1886
|
+
onReveal: (node) => optionsRef.current.onReveal?.(node),
|
|
1887
|
+
get idGenerator() {
|
|
1888
|
+
return optionsRef.current.idGenerator;
|
|
1889
|
+
},
|
|
1890
|
+
get textTypes() {
|
|
1891
|
+
return optionsRef.current.textTypes;
|
|
1892
|
+
},
|
|
1893
|
+
get layout() {
|
|
1894
|
+
return optionsRef.current.layout;
|
|
1895
|
+
},
|
|
1896
|
+
get tokens() {
|
|
1897
|
+
return optionsRef.current.tokens;
|
|
1898
|
+
}
|
|
1899
|
+
}),
|
|
1900
|
+
[]
|
|
1901
|
+
);
|
|
1902
|
+
(0, import_react15.useLayoutEffect)(() => {
|
|
1903
|
+
if (optionsRef.current.autoSync !== false) controller.sync();
|
|
1904
|
+
}, [options.nodes, controller]);
|
|
1905
|
+
return controller;
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
// src/canvas/CanvasComponentsPanel.tsx
|
|
1909
|
+
var import_react16 = require("react");
|
|
1910
|
+
var import_canvas16 = require("@pixerate/editor/canvas");
|
|
1911
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1912
|
+
function CanvasComponentsPanel({
|
|
1913
|
+
nodes,
|
|
1914
|
+
onInsert,
|
|
1915
|
+
search = true,
|
|
1916
|
+
className = ""
|
|
1917
|
+
}) {
|
|
1918
|
+
const [query, setQuery] = (0, import_react16.useState)("");
|
|
1919
|
+
const { components, sets } = (0, import_canvas16.listCanvasComponents)(nodes);
|
|
1920
|
+
const q = query.trim().toLowerCase();
|
|
1921
|
+
const match = (name) => !q || name.toLowerCase().includes(q);
|
|
1922
|
+
const lone = components.filter((c) => !c.setId && match(c.name));
|
|
1923
|
+
const shownSets = sets.filter((s) => match(s.name) || s.variants.some((v) => match(v.name)));
|
|
1924
|
+
const item = (id, name, count, extra = {}) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1925
|
+
"button",
|
|
1926
|
+
{
|
|
1927
|
+
type: "button",
|
|
1928
|
+
draggable: true,
|
|
1929
|
+
"data-component-id": id,
|
|
1930
|
+
...extra,
|
|
1931
|
+
className: "flex w-full items-center justify-between gap-2 rounded px-2 py-1 text-left text-xs hover:bg-muted",
|
|
1932
|
+
title: `Insert an instance of ${name}`,
|
|
1933
|
+
onClick: () => onInsert(id),
|
|
1934
|
+
onDragStart: (e) => {
|
|
1935
|
+
e.dataTransfer.setData(import_canvas16.CANVAS_COMPONENT_DRAG_TYPE, id);
|
|
1936
|
+
e.dataTransfer.setData("text/plain", name);
|
|
1937
|
+
e.dataTransfer.effectAllowed = "copy";
|
|
1938
|
+
},
|
|
1939
|
+
children: [
|
|
1940
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "truncate", children: [
|
|
1941
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { "aria-hidden": true, className: "mr-1 text-muted-foreground", children: "\u25C7" }),
|
|
1942
|
+
name
|
|
1943
|
+
] }),
|
|
1944
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-[10px] text-muted-foreground", "data-instance-count": "", children: count })
|
|
1945
|
+
]
|
|
1946
|
+
},
|
|
1947
|
+
id
|
|
1948
|
+
);
|
|
1949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { "data-components-panel": "", className: `flex flex-col gap-1 text-xs text-foreground ${className}`, children: [
|
|
1950
|
+
search ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1951
|
+
"input",
|
|
1952
|
+
{
|
|
1953
|
+
type: "search",
|
|
1954
|
+
"aria-label": "Search components",
|
|
1955
|
+
placeholder: "Search components",
|
|
1956
|
+
className: "rounded border border-border bg-background px-2 py-1 text-xs",
|
|
1957
|
+
onInput: (e) => setQuery(e.target.value)
|
|
1958
|
+
}
|
|
1959
|
+
) : null,
|
|
1960
|
+
shownSets.map((set) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { "data-component-set": set.id, className: "flex flex-col", children: [
|
|
1961
|
+
item(set.id, set.name, set.variants.reduce((sum, v) => sum + v.instanceCount, 0), { "data-kind": "set" }),
|
|
1962
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "ml-3 flex flex-col border-l border-border pl-1", children: set.variants.map((v) => item(v.id, v.name, v.instanceCount, { "data-kind": "variant" })) })
|
|
1963
|
+
] }, set.id)),
|
|
1964
|
+
lone.map((c) => item(c.id, c.name, c.instanceCount, { "data-kind": "component" })),
|
|
1965
|
+
components.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-muted-foreground", children: "No components yet. Select a frame and choose Create Component." }) : null
|
|
1966
|
+
] });
|
|
1967
|
+
}
|
|
1968
|
+
function CanvasInstanceInspector({
|
|
1969
|
+
nodes,
|
|
1970
|
+
nodeId,
|
|
1971
|
+
components,
|
|
1972
|
+
onError,
|
|
1973
|
+
className = ""
|
|
1974
|
+
}) {
|
|
1975
|
+
const info = nodeId ? (0, import_canvas16.inspectCanvasInstance)(nodes, nodeId) : void 0;
|
|
1976
|
+
if (!info) return null;
|
|
1977
|
+
const report = (result) => {
|
|
1978
|
+
if (result && !result.ok && result.reason) onError?.(result.reason);
|
|
1979
|
+
};
|
|
1980
|
+
const setProp = (name, value) => report(components.setInstanceProperties({ [name]: value }, [info.id]));
|
|
1981
|
+
const allComponents = (0, import_canvas16.listCanvasComponents)(nodes).components;
|
|
1982
|
+
const linked = info.status === "linked";
|
|
1983
|
+
const btn = "rounded border border-border px-2 py-0.5 text-xs hover:bg-muted disabled:opacity-40";
|
|
1984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { "data-instance-inspector": "", "data-instance-id": info.id, className: `flex flex-col gap-2 text-xs text-foreground ${className}`, children: [
|
|
1985
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
1986
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "truncate font-medium", "data-instance-main": "", children: linked ? info.componentName : "Main component missing" }),
|
|
1987
|
+
info.nested ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-muted-foreground", children: "Nested" }) : null
|
|
1988
|
+
] }),
|
|
1989
|
+
info.variantOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: "flex items-center gap-2", "data-variant-property": option.name, children: [
|
|
1990
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "w-24 shrink-0 truncate text-muted-foreground", children: option.name }),
|
|
1991
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1992
|
+
"select",
|
|
1993
|
+
{
|
|
1994
|
+
"aria-label": `${option.name} variant`,
|
|
1995
|
+
className: "min-w-0 flex-1 rounded border border-border bg-background px-1 py-0.5 text-xs",
|
|
1996
|
+
value: info.variant[option.name] ?? "",
|
|
1997
|
+
onChange: (e) => setProp(option.name, e.currentTarget.value),
|
|
1998
|
+
children: option.values.map((v) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("option", { value: v, children: v }, v))
|
|
1999
|
+
}
|
|
2000
|
+
)
|
|
2001
|
+
] }, option.name)),
|
|
2002
|
+
info.properties.map((p) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: "flex items-center gap-2", "data-component-property": p.name, children: [
|
|
2003
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "w-24 shrink-0 truncate text-muted-foreground", children: p.name }),
|
|
2004
|
+
p.type === "boolean" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("input", { type: "checkbox", "aria-label": p.name, checked: p.value === true, onChange: (e) => setProp(p.name, e.currentTarget.checked) }) : p.type === "text" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2005
|
+
"input",
|
|
2006
|
+
{
|
|
2007
|
+
type: "text",
|
|
2008
|
+
"aria-label": p.name,
|
|
2009
|
+
defaultValue: String(p.value),
|
|
2010
|
+
className: "min-w-0 flex-1 rounded border border-border bg-background px-1 py-0.5 text-xs",
|
|
2011
|
+
onBlur: (e) => {
|
|
2012
|
+
if (e.currentTarget.value !== p.value) setProp(p.name, e.currentTarget.value);
|
|
2013
|
+
},
|
|
2014
|
+
onKeyDown: (e) => {
|
|
2015
|
+
if (e.key === "Enter") e.currentTarget.blur();
|
|
2016
|
+
}
|
|
2017
|
+
},
|
|
2018
|
+
String(p.value)
|
|
2019
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2020
|
+
"select",
|
|
2021
|
+
{
|
|
2022
|
+
"aria-label": p.name,
|
|
2023
|
+
className: "min-w-0 flex-1 rounded border border-border bg-background px-1 py-0.5 text-xs",
|
|
2024
|
+
value: String(p.value),
|
|
2025
|
+
onChange: (e) => setProp(p.name, e.currentTarget.value),
|
|
2026
|
+
children: allComponents.filter((c) => !p.preferred?.length || p.preferred.includes(c.id) || c.id === p.value).map((c) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("option", { value: c.id, children: c.name }, c.id))
|
|
2027
|
+
}
|
|
2028
|
+
)
|
|
2029
|
+
] }, p.name)),
|
|
2030
|
+
info.overrides.length ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col gap-1", "data-instance-overrides": "", children: [
|
|
2031
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-muted-foreground", children: "Overrides" }),
|
|
2032
|
+
info.overrides.map((o) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-wrap items-center gap-1", "data-override-layer": o.id, children: [
|
|
2033
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "mr-1 truncate", children: o.name }),
|
|
2034
|
+
o.groups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
2035
|
+
"button",
|
|
2036
|
+
{
|
|
2037
|
+
type: "button",
|
|
2038
|
+
className: "rounded bg-muted px-1 text-[10px]",
|
|
2039
|
+
"data-override-group": g,
|
|
2040
|
+
title: `Reset ${g}`,
|
|
2041
|
+
onClick: () => report(components.resetOverrides(o.id, g)),
|
|
2042
|
+
children: [
|
|
2043
|
+
g,
|
|
2044
|
+
" \xD7"
|
|
2045
|
+
]
|
|
2046
|
+
},
|
|
2047
|
+
g
|
|
2048
|
+
))
|
|
2049
|
+
] }, o.id))
|
|
2050
|
+
] }) : null,
|
|
2051
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-wrap gap-1", children: [
|
|
2052
|
+
linked ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
2053
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", { type: "button", className: btn, "data-action": "reset", onClick: () => report(components.resetOverrides(info.id)), children: "Reset all" }),
|
|
2054
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", { type: "button", className: btn, "data-action": "go-to-main", onClick: () => components.goToMainComponent(info.id), children: "Go to main" }),
|
|
2055
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2056
|
+
"button",
|
|
2057
|
+
{
|
|
2058
|
+
type: "button",
|
|
2059
|
+
className: btn,
|
|
2060
|
+
"data-action": "push",
|
|
2061
|
+
disabled: info.overrides.length === 0,
|
|
2062
|
+
onClick: () => report(components.pushOverrides(info.rootId)),
|
|
2063
|
+
children: "Push changes"
|
|
2064
|
+
}
|
|
2065
|
+
)
|
|
2066
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("button", { type: "button", className: btn, "data-action": "restore", onClick: () => report(components.restoreMainComponent(info.rootId)), children: "Restore main component" }),
|
|
2067
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2068
|
+
"button",
|
|
2069
|
+
{
|
|
2070
|
+
type: "button",
|
|
2071
|
+
className: btn,
|
|
2072
|
+
"data-action": "detach",
|
|
2073
|
+
disabled: info.nested,
|
|
2074
|
+
title: info.nested ? "Detach the outer instance first" : void 0,
|
|
2075
|
+
onClick: () => report(components.detachInstance([info.id])),
|
|
2076
|
+
children: "Detach"
|
|
2077
|
+
}
|
|
2078
|
+
)
|
|
2079
|
+
] })
|
|
2080
|
+
] });
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
// src/canvas/index.ts
|
|
2084
|
+
var import_canvas25 = require("@pixerate/editor/canvas");
|
|
1504
2085
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1505
2086
|
0 && (module.exports = {
|
|
2087
|
+
ANIMATABLE_PROPERTIES,
|
|
2088
|
+
ANIMATION_DATA_KEY,
|
|
2089
|
+
ANIMATION_EASING_LABELS,
|
|
2090
|
+
ANIMATION_EASING_PRESETS,
|
|
2091
|
+
ANIMATION_TIME_EPSILON,
|
|
1506
2092
|
AUTO_LAYOUT_DATA_KEY,
|
|
1507
2093
|
AgentPresenceLayer,
|
|
2094
|
+
AnimationEditError,
|
|
2095
|
+
AnimationPlayer,
|
|
2096
|
+
AnimationTimeline,
|
|
2097
|
+
CANVAS_COMPONENT_DRAG_TYPE,
|
|
1508
2098
|
CANVAS_TOKEN_PROPERTIES,
|
|
1509
2099
|
CHILD_LAYOUT_DATA_KEY,
|
|
1510
2100
|
CONNECTION_LINE_TYPES,
|
|
2101
|
+
CSS_ANIMATION_PROPERTIES,
|
|
2102
|
+
CUBIC_BEZIER_PRESETS,
|
|
2103
|
+
CanvasComponentsPanel,
|
|
1511
2104
|
CanvasGuidesLayer,
|
|
2105
|
+
CanvasInstanceInspector,
|
|
1512
2106
|
CanvasScenesStore,
|
|
1513
2107
|
DEFAULT_ARRANGE_SHORTCUTS,
|
|
2108
|
+
MAX_KEYFRAME_REFS,
|
|
1514
2109
|
ManualClock,
|
|
1515
2110
|
RESIZE_HANDLES,
|
|
1516
2111
|
SHAPE_DATA_KEY,
|
|
@@ -1522,7 +2117,11 @@ var import_canvas19 = require("@pixerate/editor/canvas");
|
|
|
1522
2117
|
TOKEN_MODES_DATA_KEY,
|
|
1523
2118
|
TokenBindingPicker,
|
|
1524
2119
|
TokenModeSwitcher,
|
|
2120
|
+
addKeyframesAtTime,
|
|
1525
2121
|
alignNodes,
|
|
2122
|
+
animateNode,
|
|
2123
|
+
applyAnimation,
|
|
2124
|
+
applyAnimationOverrides,
|
|
1526
2125
|
applyConstraints,
|
|
1527
2126
|
applyNodeUpdates,
|
|
1528
2127
|
applyShapeCombination,
|
|
@@ -1533,6 +2132,7 @@ var import_canvas19 = require("@pixerate/editor/canvas");
|
|
|
1533
2132
|
bezierPathPointAtLength,
|
|
1534
2133
|
bezierPathSignedArea,
|
|
1535
2134
|
bezierPathToSvg,
|
|
2135
|
+
bindCanvasComponentProperty,
|
|
1536
2136
|
bindCanvasToken,
|
|
1537
2137
|
blendLayout,
|
|
1538
2138
|
boundsOf,
|
|
@@ -1544,31 +2144,49 @@ var import_canvas19 = require("@pixerate/editor/canvas");
|
|
|
1544
2144
|
canvasHeight,
|
|
1545
2145
|
centerNodes,
|
|
1546
2146
|
centre,
|
|
2147
|
+
clampAnimationValue,
|
|
1547
2148
|
clampLayoutSize,
|
|
2149
|
+
combineCanvasComponentsAsVariants,
|
|
1548
2150
|
combineShapeNodes,
|
|
1549
2151
|
computeNodesBoundingBox,
|
|
1550
2152
|
computeSnapGuides,
|
|
1551
2153
|
connectedOnly,
|
|
2154
|
+
copyKeyframes,
|
|
1552
2155
|
countPathSegments,
|
|
2156
|
+
createAnimationPlayer,
|
|
1553
2157
|
createBezierTrajectory,
|
|
2158
|
+
createCanvasAnimationController,
|
|
1554
2159
|
createCanvasAutoLayoutController,
|
|
2160
|
+
createCanvasComponent,
|
|
2161
|
+
createCanvasComponentsController,
|
|
2162
|
+
createCanvasInstance,
|
|
1555
2163
|
createCanvasScenesStore,
|
|
1556
2164
|
createFanOutTrajectory,
|
|
1557
2165
|
createGuideIndex,
|
|
1558
2166
|
createNodeGuideIndex,
|
|
2167
|
+
cubicBezierAt,
|
|
1559
2168
|
cubicPointAt,
|
|
1560
2169
|
cubicsToPathData,
|
|
1561
2170
|
dashContours,
|
|
1562
2171
|
defaultEasing,
|
|
2172
|
+
deleteKeyframes,
|
|
2173
|
+
detachCanvasInstance,
|
|
1563
2174
|
detachTokenBindings,
|
|
1564
2175
|
distanceToBezierPath,
|
|
1565
2176
|
distributeNodes,
|
|
1566
2177
|
dividePaths,
|
|
1567
2178
|
dividePolygons,
|
|
2179
|
+
easingFromInfluence,
|
|
2180
|
+
easingLabel,
|
|
2181
|
+
easingToCss,
|
|
1568
2182
|
ensureLayout,
|
|
1569
2183
|
estimateCanvasHeight,
|
|
1570
2184
|
estimateNodeSize,
|
|
2185
|
+
evaluateAnimation,
|
|
2186
|
+
evaluateEasing,
|
|
2187
|
+
evaluateTrack,
|
|
1571
2188
|
excludePaths,
|
|
2189
|
+
exportCssAnimation,
|
|
1572
2190
|
findConnectorSnap,
|
|
1573
2191
|
fitCubicRun,
|
|
1574
2192
|
fitCubics,
|
|
@@ -1578,19 +2196,34 @@ var import_canvas19 = require("@pixerate/editor/canvas");
|
|
|
1578
2196
|
fitViewportToRect,
|
|
1579
2197
|
flattenSvgPath,
|
|
1580
2198
|
flowSide,
|
|
2199
|
+
formatAnimationTime,
|
|
2200
|
+
formatOklab,
|
|
1581
2201
|
getAbsolutePosition,
|
|
2202
|
+
getAnimatableProperty,
|
|
2203
|
+
getAnimatedProperties,
|
|
2204
|
+
getAnimatedValue,
|
|
2205
|
+
getAnimationDuration,
|
|
2206
|
+
getAnimationTrack,
|
|
1582
2207
|
getAutoLayout,
|
|
1583
2208
|
getAutoLayoutGrid,
|
|
1584
2209
|
getAutoLayoutInsertTarget,
|
|
1585
2210
|
getBindableTokenProperties,
|
|
2211
|
+
getCanvasComponentDragId,
|
|
1586
2212
|
getCanvasTokenProperty,
|
|
1587
2213
|
getCenteredNodePosition,
|
|
1588
2214
|
getChildLayout,
|
|
2215
|
+
getComponentSourceId,
|
|
2216
|
+
getCssPropertyAnimations,
|
|
1589
2217
|
getEffectiveTokenModes,
|
|
1590
2218
|
getFlowChildren,
|
|
2219
|
+
getInstanceData,
|
|
2220
|
+
getInstanceStatus,
|
|
2221
|
+
getKeyframeTimes,
|
|
1591
2222
|
getLayoutParent,
|
|
1592
2223
|
getLayoutSizing,
|
|
1593
2224
|
getLayoutedNodes,
|
|
2225
|
+
getNodeAnimation,
|
|
2226
|
+
getNodeOverrides,
|
|
1594
2227
|
getNodeRect,
|
|
1595
2228
|
getNodeShape,
|
|
1596
2229
|
getNodeSize,
|
|
@@ -1599,19 +2232,31 @@ var import_canvas19 = require("@pixerate/editor/canvas");
|
|
|
1599
2232
|
getResizingNodeRect,
|
|
1600
2233
|
getShapeRenderData,
|
|
1601
2234
|
getShapeSvg,
|
|
2235
|
+
getTimelineRows,
|
|
2236
|
+
getTimelineTicks,
|
|
1602
2237
|
getTokenPropertyScope,
|
|
1603
2238
|
getTokensForProperty,
|
|
1604
2239
|
handlePoint,
|
|
1605
2240
|
hasVisibleStroke,
|
|
1606
2241
|
inferResizeHandle,
|
|
2242
|
+
inspectCanvasInstance,
|
|
1607
2243
|
inspectNodeTokens,
|
|
2244
|
+
interpolateAnimationValue,
|
|
1608
2245
|
intersectPaths,
|
|
1609
2246
|
intersectPolygons,
|
|
1610
2247
|
invertNodeUpdates,
|
|
2248
|
+
isAnimationEasing,
|
|
2249
|
+
isAnimationKeyframe,
|
|
1611
2250
|
isAutoLayoutFrame,
|
|
2251
|
+
isCanvasComponent,
|
|
2252
|
+
isCanvasComponentSet,
|
|
2253
|
+
isCanvasInstance,
|
|
2254
|
+
isCssExportExact,
|
|
1612
2255
|
isEventFromTextInput,
|
|
2256
|
+
isKeyframeSelected,
|
|
1613
2257
|
isLocked,
|
|
1614
2258
|
isMeasureModifierHeld,
|
|
2259
|
+
isNodeAnimated,
|
|
1615
2260
|
isShapeDescription,
|
|
1616
2261
|
isShapeNode,
|
|
1617
2262
|
isStraightCubic,
|
|
@@ -1624,6 +2269,7 @@ var import_canvas19 = require("@pixerate/editor/canvas");
|
|
|
1624
2269
|
layoutUpMany,
|
|
1625
2270
|
linearPositionTrajectory,
|
|
1626
2271
|
linearTrajectory,
|
|
2272
|
+
listCanvasComponents,
|
|
1627
2273
|
lockNodes,
|
|
1628
2274
|
makeSizingCoherent,
|
|
1629
2275
|
matchArrangeShortcut,
|
|
@@ -1633,22 +2279,31 @@ var import_canvas19 = require("@pixerate/editor/canvas");
|
|
|
1633
2279
|
measureSelection,
|
|
1634
2280
|
measureToLine,
|
|
1635
2281
|
mergeNodeUpdates,
|
|
2282
|
+
mixColorsOklab,
|
|
2283
|
+
moveKeyframes,
|
|
1636
2284
|
moveLayoutChild,
|
|
1637
2285
|
multiPolygonArea,
|
|
1638
2286
|
multiPolygonBounds,
|
|
1639
2287
|
nearestHandlePositions,
|
|
1640
2288
|
normalizeBezierPath,
|
|
2289
|
+
normalizeKeyframes,
|
|
1641
2290
|
offsetPath,
|
|
1642
2291
|
offsetShapeNodes,
|
|
2292
|
+
oklabToRgb,
|
|
1643
2293
|
oppositePosition,
|
|
1644
2294
|
outlineShapeNodeStrokes,
|
|
1645
2295
|
outlineStroke,
|
|
1646
2296
|
overlaps,
|
|
1647
2297
|
parseCanvasClipboardData,
|
|
1648
2298
|
parseCanvasScenes,
|
|
2299
|
+
parseCssEasing,
|
|
2300
|
+
parseKeyframeClipboard,
|
|
2301
|
+
parseOklab,
|
|
1649
2302
|
parseSvgPath,
|
|
2303
|
+
pasteKeyframes,
|
|
1650
2304
|
pathBoolean,
|
|
1651
2305
|
placeBeside,
|
|
2306
|
+
playWebAnimations,
|
|
1652
2307
|
pointInBezierPath,
|
|
1653
2308
|
pointInMultiPolygon,
|
|
1654
2309
|
pointInRings,
|
|
@@ -1657,44 +2312,72 @@ var import_canvas19 = require("@pixerate/editor/canvas");
|
|
|
1657
2312
|
polygonToSvgPath,
|
|
1658
2313
|
positionToSide,
|
|
1659
2314
|
pruneCanvasTokenModes,
|
|
2315
|
+
pushCanvasInstanceOverrides,
|
|
2316
|
+
readAnimatableValue,
|
|
1660
2317
|
readNodeStyleProperty,
|
|
1661
2318
|
readStyleSize,
|
|
1662
2319
|
realClock,
|
|
2320
|
+
recordAnimationChanges,
|
|
1663
2321
|
relayoutUpdates,
|
|
1664
2322
|
remapPastedNodes,
|
|
2323
|
+
removeTrack,
|
|
1665
2324
|
reorderNodes,
|
|
1666
2325
|
repositionNodesTo,
|
|
2326
|
+
resetCanvasInstanceOverrides,
|
|
1667
2327
|
resizeHandleAxes,
|
|
1668
2328
|
resolveCanvasTokens,
|
|
2329
|
+
resolveEasing,
|
|
1669
2330
|
resolvePadding,
|
|
2331
|
+
restoreCanvasMainComponent,
|
|
1670
2332
|
revertShapeCombination,
|
|
2333
|
+
rgbToOklab,
|
|
1671
2334
|
ringSignedArea,
|
|
1672
2335
|
runMultiNodeTransition,
|
|
2336
|
+
sampleAnimationFrames,
|
|
2337
|
+
scaleKeyframes,
|
|
1673
2338
|
serializeCanvasNodes,
|
|
2339
|
+
setCanvasComponentProperty,
|
|
2340
|
+
setCanvasInstanceProperties,
|
|
1674
2341
|
setCanvasTokenMode,
|
|
2342
|
+
setKeyframe,
|
|
2343
|
+
setKeyframeEasing,
|
|
2344
|
+
setMotionPath,
|
|
2345
|
+
setTrackEnabled,
|
|
1675
2346
|
shapeNodeToBezierPath,
|
|
1676
2347
|
shapeNodeToPolygon,
|
|
1677
2348
|
shapeToBezierPath,
|
|
1678
2349
|
shapeToPolygon,
|
|
1679
2350
|
sideToPosition,
|
|
1680
2351
|
simplifyRing,
|
|
2352
|
+
snapKeyframeDelta,
|
|
1681
2353
|
snapNodeDrag,
|
|
1682
2354
|
snapNodeResize,
|
|
1683
2355
|
snapResize,
|
|
2356
|
+
snapTimeToFrame,
|
|
1684
2357
|
snapToGrid,
|
|
2358
|
+
springAt,
|
|
1685
2359
|
strokeOutlineRings,
|
|
1686
2360
|
subtractPaths,
|
|
1687
2361
|
subtractPolygons,
|
|
2362
|
+
swapCanvasInstance,
|
|
2363
|
+
syncAllCanvasInstances,
|
|
2364
|
+
syncCanvasComponents,
|
|
2365
|
+
syncCanvasInstance,
|
|
2366
|
+
timeToX,
|
|
1688
2367
|
toBezierPath,
|
|
2368
|
+
toWebAnimations,
|
|
1689
2369
|
toggleLockNodes,
|
|
1690
2370
|
transformBezierPath,
|
|
1691
2371
|
unionPolygons,
|
|
1692
2372
|
unitePaths,
|
|
1693
2373
|
unlockNodes,
|
|
2374
|
+
updateKeyframe,
|
|
2375
|
+
useCanvasAnimation,
|
|
1694
2376
|
useCanvasArrange,
|
|
1695
2377
|
useCanvasArrangeShortcuts,
|
|
1696
2378
|
useCanvasAutoLayout,
|
|
1697
2379
|
useCanvasClipboard,
|
|
2380
|
+
useCanvasComponents,
|
|
1698
2381
|
useCanvasDocking,
|
|
1699
2382
|
useCanvasExplosion,
|
|
1700
2383
|
useCanvasGraph,
|
|
@@ -1704,8 +2387,12 @@ var import_canvas19 = require("@pixerate/editor/canvas");
|
|
|
1704
2387
|
useCanvasShortcuts,
|
|
1705
2388
|
useCanvasTokens,
|
|
1706
2389
|
useStreamingCanvas,
|
|
2390
|
+
withNodeAnimation,
|
|
1707
2391
|
withStyleSize,
|
|
2392
|
+
wouldCreateComponentCycle,
|
|
2393
|
+
wrapAnimationTime,
|
|
1708
2394
|
writeNodeStyleProperty,
|
|
2395
|
+
xToTime,
|
|
1709
2396
|
xorPolygons
|
|
1710
2397
|
});
|
|
1711
2398
|
//# sourceMappingURL=index.cjs.map
|