@pixerate/editor 0.59.0 → 0.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/THIRD_PARTY_NOTICES.md +2 -0
  2. package/dist/agent/index.cjs +111 -38
  3. package/dist/agent/index.cjs.map +1 -1
  4. package/dist/agent/index.d.cts +30 -2
  5. package/dist/agent/index.d.ts +30 -2
  6. package/dist/agent/index.js +96 -23
  7. package/dist/agent/index.js.map +1 -1
  8. package/dist/agent-caret-BmYhQF7L.d.cts +106 -0
  9. package/dist/agent-caret-BmYhQF7L.d.ts +106 -0
  10. package/dist/animation-editor/index.cjs +197 -82
  11. package/dist/animation-editor/index.cjs.map +1 -1
  12. package/dist/animation-editor/index.d.cts +136 -3
  13. package/dist/animation-editor/index.d.ts +136 -3
  14. package/dist/animation-editor/index.js +163 -48
  15. package/dist/animation-editor/index.js.map +1 -1
  16. package/dist/{chunk-LMUDHBWR.js → chunk-4YFMSPBU.js} +2 -2
  17. package/dist/{chunk-3I6V7PI4.cjs → chunk-7ZSU4MQZ.cjs} +45 -45
  18. package/dist/{chunk-3I6V7PI4.cjs.map → chunk-7ZSU4MQZ.cjs.map} +1 -1
  19. package/dist/{chunk-WLVZ235X.js → chunk-OK7T2LHK.js} +229 -2
  20. package/dist/chunk-OK7T2LHK.js.map +1 -0
  21. package/dist/{chunk-AHCENCU4.cjs → chunk-T4XWVPJK.cjs} +253 -26
  22. package/dist/chunk-T4XWVPJK.cjs.map +1 -0
  23. package/dist/extensions/index.cjs +27 -3
  24. package/dist/extensions/index.cjs.map +1 -1
  25. package/dist/extensions/index.d.cts +2 -1
  26. package/dist/extensions/index.d.ts +2 -1
  27. package/dist/extensions/index.js +26 -2
  28. package/dist/{index-CTCc3m3C.d.ts → index-B16wbOn_.d.ts} +1 -0
  29. package/dist/{index-BcHyG0Wq.d.cts → index-BAt14aIU.d.cts} +1 -0
  30. package/dist/index.cjs +32 -8
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.d.cts +3 -2
  33. package/dist/index.d.ts +3 -2
  34. package/dist/index.js +26 -2
  35. package/dist/index.js.map +1 -1
  36. package/package.json +1 -1
  37. package/dist/chunk-AHCENCU4.cjs.map +0 -1
  38. package/dist/chunk-WLVZ235X.js.map +0 -1
  39. /package/dist/{chunk-LMUDHBWR.js.map → chunk-4YFMSPBU.js.map} +0 -0
@@ -159,6 +159,13 @@ interface MotionDrawCommand extends MotionCommandBase {
159
159
  }
160
160
  /** Moves targets by an offset, or to a point (their centre lands there). */
161
161
  interface MotionMoveCommand extends MotionCommandBase {
162
+ /**
163
+ * `add` makes the change a layer over the pose instead of a change to it: it stacks on
164
+ * whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
165
+ * Default `replace` for move, rotate and scale (the later change takes over), `add` for
166
+ * pulse, shake, teeter, wave and wiggle.
167
+ */
168
+ blend?: 'replace' | 'add';
162
169
  type: 'move';
163
170
  by?: {
164
171
  x: number;
@@ -171,12 +178,26 @@ interface MotionMoveCommand extends MotionCommandBase {
171
178
  }
172
179
  /** Turns targets about their centre, by or to an angle in degrees (clockwise). */
173
180
  interface MotionRotateCommand extends MotionCommandBase {
181
+ /**
182
+ * `add` makes the change a layer over the pose instead of a change to it: it stacks on
183
+ * whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
184
+ * Default `replace` for move, rotate and scale (the later change takes over), `add` for
185
+ * pulse, shake, teeter, wave and wiggle.
186
+ */
187
+ blend?: 'replace' | 'add';
174
188
  type: 'rotate';
175
189
  by?: number;
176
190
  to?: number;
177
191
  }
178
192
  /** Scales targets about their centre (1 = rest size). */
179
193
  interface MotionScaleCommand extends MotionCommandBase {
194
+ /**
195
+ * `add` makes the change a layer over the pose instead of a change to it: it stacks on
196
+ * whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
197
+ * Default `replace` for move, rotate and scale (the later change takes over), `add` for
198
+ * pulse, shake, teeter, wave and wiggle.
199
+ */
200
+ blend?: 'replace' | 'add';
180
201
  type: 'scale';
181
202
  to: number | {
182
203
  x: number;
@@ -202,6 +223,17 @@ interface MotionMorphCommand extends MotionCommandBase {
202
223
  type: 'morph';
203
224
  into: string;
204
225
  }
226
+ /**
227
+ * Smart Animate: tweens a group into another group (`into`, usually hidden), part by part. Each
228
+ * part of the target takes the shape, paint and place of its partner in `into`, paired by name,
229
+ * then by id (`card-a-title` ↔ `card-b-title`), then by kind in order. Parts with no partner fade
230
+ * out; parts of `into` with no partner do not appear (`check` lists them).
231
+ */
232
+ interface MotionMatchCommand extends MotionCommandBase {
233
+ type: 'match';
234
+ /** Id of the group (or node) to become. */
235
+ into: string;
236
+ }
205
237
  /** Moves targets along a path node, centre on the path. */
206
238
  interface MotionFollowCommand extends MotionCommandBase {
207
239
  type: 'follow';
@@ -218,6 +250,13 @@ interface MotionFollowCommand extends MotionCommandBase {
218
250
  }
219
251
  /** Scales up and back, `count` times (draws the eye). */
220
252
  interface MotionPulseCommand extends MotionCommandBase {
253
+ /**
254
+ * `add` makes the change a layer over the pose instead of a change to it: it stacks on
255
+ * whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
256
+ * Default `replace` for move, rotate and scale (the later change takes over), `add` for
257
+ * pulse, shake, teeter, wave and wiggle.
258
+ */
259
+ blend?: 'replace' | 'add';
221
260
  type: 'pulse';
222
261
  /** Extra scale at the peak (default 0.15). */
223
262
  amount?: number;
@@ -225,6 +264,13 @@ interface MotionPulseCommand extends MotionCommandBase {
225
264
  }
226
265
  /** Shakes side to side (or up and down), settling. */
227
266
  interface MotionShakeCommand extends MotionCommandBase {
267
+ /**
268
+ * `add` makes the change a layer over the pose instead of a change to it: it stacks on
269
+ * whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
270
+ * Default `replace` for move, rotate and scale (the later change takes over), `add` for
271
+ * pulse, shake, teeter, wave and wiggle.
272
+ */
273
+ blend?: 'replace' | 'add';
228
274
  type: 'shake';
229
275
  /** Distance in document units (default 8). */
230
276
  amount?: number;
@@ -234,6 +280,13 @@ interface MotionShakeCommand extends MotionCommandBase {
234
280
  }
235
281
  /** Rocks about the centre by `angle` either way, settling (Flair's `emphasis.teeter`). */
236
282
  interface MotionTeeterCommand extends MotionCommandBase {
283
+ /**
284
+ * `add` makes the change a layer over the pose instead of a change to it: it stacks on
285
+ * whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
286
+ * Default `replace` for move, rotate and scale (the later change takes over), `add` for
287
+ * pulse, shake, teeter, wave and wiggle.
288
+ */
289
+ blend?: 'replace' | 'add';
237
290
  type: 'teeter';
238
291
  /** Degrees either way (default 8). */
239
292
  angle?: number;
@@ -242,6 +295,13 @@ interface MotionTeeterCommand extends MotionCommandBase {
242
295
  }
243
296
  /** Bobs up and down without settling, like something floating (Flair's `emphasis.wave`). */
244
297
  interface MotionWaveCommand extends MotionCommandBase {
298
+ /**
299
+ * `add` makes the change a layer over the pose instead of a change to it: it stacks on
300
+ * whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
301
+ * Default `replace` for move, rotate and scale (the later change takes over), `add` for
302
+ * pulse, shake, teeter, wave and wiggle.
303
+ */
304
+ blend?: 'replace' | 'add';
245
305
  type: 'wave';
246
306
  /** Height in document units (default 6). */
247
307
  amount?: number;
@@ -253,6 +313,13 @@ interface MotionWaveCommand extends MotionCommandBase {
253
313
  * `emphasis.wiggle`). The same seed always wanders the same way.
254
314
  */
255
315
  interface MotionWiggleCommand extends MotionCommandBase {
316
+ /**
317
+ * `add` makes the change a layer over the pose instead of a change to it: it stacks on
318
+ * whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
319
+ * Default `replace` for move, rotate and scale (the later change takes over), `add` for
320
+ * pulse, shake, teeter, wave and wiggle.
321
+ */
322
+ blend?: 'replace' | 'add';
256
323
  type: 'wiggle';
257
324
  /** Up to about this far, in document units (default 6). */
258
325
  amount?: number;
@@ -290,10 +357,11 @@ interface MotionWaitCommand {
290
357
  with?: 'after' | 'previous';
291
358
  note?: string;
292
359
  }
293
- type MotionCommand = MotionEnterCommand | MotionExitCommand | MotionDrawCommand | MotionMoveCommand | MotionRotateCommand | MotionScaleCommand | MotionFadeCommand | MotionStyleCommand | MotionMorphCommand | MotionFollowCommand | MotionPulseCommand | MotionShakeCommand | MotionTeeterCommand | MotionWaveCommand | MotionWiggleCommand | MotionColorPulseCommand | MotionEffectCommand | MotionWaitCommand;
360
+ type MotionCommand = MotionEnterCommand | MotionExitCommand | MotionDrawCommand | MotionMoveCommand | MotionRotateCommand | MotionScaleCommand | MotionFadeCommand | MotionStyleCommand | MotionMorphCommand | MotionMatchCommand | MotionFollowCommand | MotionPulseCommand | MotionShakeCommand | MotionTeeterCommand | MotionWaveCommand | MotionWiggleCommand | MotionColorPulseCommand | MotionEffectCommand | MotionWaitCommand;
294
361
  type MotionCommandType = MotionCommand['type'];
295
362
  declare const MOTION_COMMAND_TYPES: readonly MotionCommandType[];
296
363
  declare const MOTION_ENTER_STYLES: readonly MotionEnterStyle[];
364
+ declare const MOTION_BLENDS: readonly ["replace", "add"];
297
365
  declare const MOTION_REPEAT_MODES: readonly ["loop", "mirror", "offset"];
298
366
  declare const MOTION_EXIT_STYLES: readonly MotionExitStyle[];
299
367
  declare const MOTION_IRIS_SHAPES: readonly MotionIrisShape[];
@@ -368,6 +436,14 @@ declare const MOTION_ISSUE_CODES: {
368
436
  readonly severity: "error";
369
437
  readonly wording: "A morph names a shape the artwork does not have.";
370
438
  };
439
+ readonly 'match-self': {
440
+ readonly severity: "error";
441
+ readonly wording: "A match turns a group into itself or into a group it holds (or that holds it).";
442
+ };
443
+ readonly 'match-unpaired': {
444
+ readonly severity: "note";
445
+ readonly wording: "Parts of a match's \"into\" group have no partner in the target, so they do not appear.";
446
+ };
371
447
  readonly 'unknown-effect': {
372
448
  readonly severity: "error";
373
449
  readonly wording: "An effect command names an effect the node does not have.";
@@ -530,6 +606,12 @@ interface MotionSegment {
530
606
  steps?: number;
531
607
  /** Numbers change by a steady factor (`from·(to/from)^u`); a camera zooms at a steady rate. */
532
608
  geometric?: boolean;
609
+ /**
610
+ * `add`: the segment is a layer over the node's pose rather than a change to it. It lives on
611
+ * its own track (`motionAddTrackKey`), runs from 0 (offsets, turns) or 1 (scales), and what
612
+ * it adds stays once it ends, on top of whatever the pose does.
613
+ */
614
+ blend?: 'add';
533
615
  /** For `follow`: the path node id, and whether to turn with it. */
534
616
  path?: string;
535
617
  rotate?: boolean;
@@ -633,6 +715,15 @@ declare function activeSegment(track: readonly MotionSegment[] | undefined, time
633
715
  /** A track's value at `time`, or `undefined` when nothing animates it. `raw` ignores behaviours (see `segmentValue`). */
634
716
  declare function trackValue(track: readonly MotionSegment[] | undefined, time: number, raw?: boolean): MotionValue | undefined;
635
717
  declare const motionTrackKey: (node: string, property: MotionProperty) => string;
718
+ /** The track of a node property's additive layers (segments with `blend: 'add'`). */
719
+ declare const motionAddTrackKey: (node: string, property: MotionProperty) => string;
720
+ /** Properties that take additive layers: offsets and turns add, scales multiply. */
721
+ declare const MOTION_ADDITIVE_PROPERTIES: readonly MotionProperty[];
722
+ /**
723
+ * A property's value with its additive layers on top of `base` (its pose): every layer that has
724
+ * started adds its value (offsets, turns) or multiplies by it (scales). `raw` ignores behaviours.
725
+ */
726
+ declare function withMotionLayers(timeline: Pick<MotionTimeline, 'tracks'>, node: string, property: MotionProperty, base: number, time: number, raw?: boolean): number;
636
727
  /** Grows a rectangle to the artwork's aspect ratio (about its centre). */
637
728
  declare function fitMotionRect(rect: MotionRect, aspect: number): MotionRect;
638
729
  /** The rectangle a camera looks at, or `null` when it frames an unknown node. */
@@ -658,6 +749,23 @@ declare function compileMotionScene(scene: MotionScene): MotionTimeline;
658
749
  /** The shot playing at `time` (the last one at the end). */
659
750
  declare function motionShotAt(timeline: MotionTimeline, time: number): MotionShotTiming | undefined;
660
751
 
752
+ /** How the parts of one node pair with the parts of another for a `match` (Smart Animate). */
753
+ interface MotionMatch {
754
+ /** `[from id, into id]`: each part of the target and the part of `into` it becomes. */
755
+ pairs: [string, string][];
756
+ /** Parts of the target with no partner (they fade out). */
757
+ unpairedFrom: string[];
758
+ /** Parts of `into` with no partner (they cannot appear). */
759
+ unpairedInto: string[];
760
+ }
761
+ /**
762
+ * Pairs the parts of `from` with the parts of `into`, each part used once, in passes: the same
763
+ * `name`, then the same id once each group's own id is taken out, then the same kind in order.
764
+ * Paired groups pair their own parts the same way, so a part pairs with a part, never a group
765
+ * with a path. Two paths (or a path and a group with no children) pair whole.
766
+ */
767
+ declare function matchMotionNodes(from: VectorNode, into: VectorNode): MotionMatch;
768
+
661
769
  /**
662
770
  * A reveal clip (`wipe`, `iris`, `split`) in the units of the node's own box: 0–1 across it,
663
771
  * as SVG's `clipPathUnits="objectBoundingBox"` and Flair's clip reveals are.
@@ -1248,6 +1356,7 @@ declare function describeMotionShots(scene: MotionScene): {
1248
1356
  flairPrimitive?: string | undefined;
1249
1357
  start: number;
1250
1358
  end: number;
1359
+ blend?: "replace" | "add";
1251
1360
  type: "move";
1252
1361
  by?: {
1253
1362
  x: number;
@@ -1272,6 +1381,7 @@ declare function describeMotionShots(scene: MotionScene): {
1272
1381
  flairPrimitive?: string | undefined;
1273
1382
  start: number;
1274
1383
  end: number;
1384
+ blend?: "replace" | "add";
1275
1385
  type: "rotate";
1276
1386
  by?: number;
1277
1387
  to?: number;
@@ -1290,6 +1400,7 @@ declare function describeMotionShots(scene: MotionScene): {
1290
1400
  flairPrimitive?: string | undefined;
1291
1401
  start: number;
1292
1402
  end: number;
1403
+ blend?: "replace" | "add";
1293
1404
  type: "scale";
1294
1405
  to: number | {
1295
1406
  x: number;
@@ -1360,6 +1471,23 @@ declare function describeMotionShots(scene: MotionScene): {
1360
1471
  repeatMode?: "loop" | "mirror" | "offset";
1361
1472
  steps?: number;
1362
1473
  index: number;
1474
+ } | {
1475
+ flairPrimitive?: string | undefined;
1476
+ start: number;
1477
+ end: number;
1478
+ type: "match";
1479
+ into: string;
1480
+ targets: string[];
1481
+ duration?: number;
1482
+ delay?: number;
1483
+ stagger?: number;
1484
+ with?: "after" | "previous";
1485
+ ease?: AnimationEasing;
1486
+ note?: string;
1487
+ repeat?: number;
1488
+ repeatMode?: "loop" | "mirror" | "offset";
1489
+ steps?: number;
1490
+ index: number;
1363
1491
  } | {
1364
1492
  flairPrimitive?: string | undefined;
1365
1493
  start: number;
@@ -1384,6 +1512,7 @@ declare function describeMotionShots(scene: MotionScene): {
1384
1512
  flairPrimitive?: string | undefined;
1385
1513
  start: number;
1386
1514
  end: number;
1515
+ blend?: "replace" | "add";
1387
1516
  type: "pulse";
1388
1517
  amount?: number;
1389
1518
  count?: number;
@@ -1402,6 +1531,7 @@ declare function describeMotionShots(scene: MotionScene): {
1402
1531
  flairPrimitive?: string | undefined;
1403
1532
  start: number;
1404
1533
  end: number;
1534
+ blend?: "replace" | "add";
1405
1535
  type: "shake";
1406
1536
  amount?: number;
1407
1537
  count?: number;
@@ -1421,6 +1551,7 @@ declare function describeMotionShots(scene: MotionScene): {
1421
1551
  flairPrimitive?: string | undefined;
1422
1552
  start: number;
1423
1553
  end: number;
1554
+ blend?: "replace" | "add";
1424
1555
  type: "teeter";
1425
1556
  angle?: number;
1426
1557
  count?: number;
@@ -1439,6 +1570,7 @@ declare function describeMotionShots(scene: MotionScene): {
1439
1570
  flairPrimitive?: string | undefined;
1440
1571
  start: number;
1441
1572
  end: number;
1573
+ blend?: "replace" | "add";
1442
1574
  type: "wave";
1443
1575
  amount?: number;
1444
1576
  count?: number;
@@ -1457,6 +1589,7 @@ declare function describeMotionShots(scene: MotionScene): {
1457
1589
  flairPrimitive?: string | undefined;
1458
1590
  start: number;
1459
1591
  end: number;
1592
+ blend?: "replace" | "add";
1460
1593
  type: "wiggle";
1461
1594
  amount?: number;
1462
1595
  frequency?: number;
@@ -1542,6 +1675,6 @@ declare function createAnimationEditorToolProvider(controller: AnimationEditorCo
1542
1675
  * A short authoring guide for a model writing vector animations with the animation editor's
1543
1676
  * tools. Static, so it caches well as part of a system prompt.
1544
1677
  */
1545
- declare const ANIMATION_EDITOR_AGENT_INSTRUCTIONS = "You animate vector artwork. A scene is artwork (vector paths and groups, each with an id) plus shots.\n\nHow it plays\n- Shots play in order. A shot optionally moves the camera, plays its commands, then holds (default 600 ms).\n- Commands in a shot play one after another; give \"with\": \"previous\" to start one together with the command before, \"delay\" to wait, \"stagger\" to offset several targets.\n- Timing comes from the content: each command has a default length (enter 600 ms, move 700 ms, draw follows the path length). Only set \"duration\" to change the pace.\n- Anything that enters later is hidden until it enters. Things that never enter are visible from the start.\n- Every frame is a pure function of time: the same scene always plays the same frames.\n\nCommands\n- enter (fade, pop, grow, slide, draw) and exit (fade, shrink, slide, undraw) bring things in and out.\n- enter also reveals through a clip over the target's box: wipe (behind an edge travelling \"direction\", default right), iris (from the centre; \"shape\": circle or box) and split (from a line through the middle; \"orientation\": horizontal or vertical). exit wipe hides the same way. Reveals need a width and a height: use draw / undraw for a straight line.\n- draw draws strokes on to a fraction; move, rotate, scale and fade change the pose (about the centre); style blends solid colours and stroke width.\n- enter also has zoom (settles from larger) and rise (rises a short way, overshooting a touch); pop and zoom take a starting \"scale\".\n- morph turns a shape into another node's shape (keep the target hidden); follow moves along a path node (with \"rotate\", moves made meanwhile turn with the path).\n- Emphasis draws the eye and returns to rest: pulse (swell), shake (side to side, or \"axis\": \"vertical\"), teeter (rock), wave (bob, no settling), wiggle (seeded wander; the same seed wanders the same way) and color-pulse (tint and back).\n- Any command but enter and exit can \"repeat\" (loop, mirror back and forth, or offset to carry on: rotate by 90, repeat 4 is a full turn); \"duration\" is one cycle.\n- Springs (\"spring-gentle\", \"spring-quick\", \"spring-bouncy\", \"spring-slow\" or { \"type\": \"spring\", \u2026 }) feel physical; leave \"duration\" out and the spring sets it.\n- \"steps\": 12 (on a command, or for the whole scene with set_animation_settings) holds poses \"on twos\" for a hand-drawn look. \"geometric\": true on scale or a camera zooms at an even rate.\n- Commands share their names and defaults with Flair's motion primitives (get_animation shows each one's \"flairPrimitive\"), and emphasis, reveals and follows export to Flair exactly.\n- effect tweens a numeric parameter of a live path effect already on the node (twist angle, wiggle time, zig zag size).\n\nWorking method\n1. get_animation to learn the element ids (set_animation_artwork_svg first if there is no artwork: give every element you will animate an id; or import_flair_effect to start from a Flair effect and edit it).\n2. Plan a few shots, each one idea. Add them with insert_shots, or edit_animation to make several edits as one step (dry_run first when unsure).\n3. check_animation and fix every error and warning; render_animation_frame (shot + \"end\") to look at the result.\n4. To make a reusable Flair effect, set_animation_controls (colour controls stand for every use of their default colour) and export_flair_effect.\n\nKeep motion purposeful: one thing moving at a time reads best, ease-out for arrivals, ease-in for exits, and hold long enough to see each result.";
1678
+ declare const ANIMATION_EDITOR_AGENT_INSTRUCTIONS = "You animate vector artwork. A scene is artwork (vector paths and groups, each with an id) plus shots.\n\nHow it plays\n- Shots play in order. A shot optionally moves the camera, plays its commands, then holds (default 600 ms).\n- Commands in a shot play one after another; give \"with\": \"previous\" to start one together with the command before, \"delay\" to wait, \"stagger\" to offset several targets.\n- Timing comes from the content: each command has a default length (enter 600 ms, move 700 ms, draw follows the path length). Only set \"duration\" to change the pace.\n- Anything that enters later is hidden until it enters. Things that never enter are visible from the start.\n- Every frame is a pure function of time: the same scene always plays the same frames.\n\nCommands\n- enter (fade, pop, grow, slide, draw) and exit (fade, shrink, slide, undraw) bring things in and out.\n- enter also reveals through a clip over the target's box: wipe (behind an edge travelling \"direction\", default right), iris (from the centre; \"shape\": circle or box) and split (from a line through the middle; \"orientation\": horizontal or vertical). exit wipe hides the same way. Reveals need a width and a height: use draw / undraw for a straight line.\n- draw draws strokes on to a fraction; move, rotate, scale and fade change the pose (about the centre); style blends solid colours and stroke width.\n- enter also has zoom (settles from larger) and rise (rises a short way, overshooting a touch); pop and zoom take a starting \"scale\".\n- morph turns a shape into another node's shape (keep the target hidden); match does the same for a whole group, part by part (Smart Animate: draw the end state as a second, hidden group whose parts share names with the first); follow moves along a path node (with \"rotate\", moves made meanwhile turn with the path).\n- Emphasis draws the eye and returns to rest: pulse (swell), shake (side to side, or \"axis\": \"vertical\"), teeter (rock), wave (bob, no settling), wiggle (seeded wander; the same seed wanders the same way) and color-pulse (tint and back).\n- Emphasis stacks on other motion: a shake during a slide shakes as it slides. Give move, rotate or scale \"blend\": \"add\" to stack them too (what they add stays); \"blend\": \"replace\" makes a change take over instead.\n- Any command but enter and exit can \"repeat\" (loop, mirror back and forth, or offset to carry on: rotate by 90, repeat 4 is a full turn); \"duration\" is one cycle.\n- Springs (\"spring-gentle\", \"spring-quick\", \"spring-bouncy\", \"spring-slow\" or { \"type\": \"spring\", \u2026 }) feel physical; leave \"duration\" out and the spring sets it.\n- \"steps\": 12 (on a command, or for the whole scene with set_animation_settings) holds poses \"on twos\" for a hand-drawn look. \"geometric\": true on scale or a camera zooms at an even rate.\n- Commands share their names and defaults with Flair's motion primitives (get_animation shows each one's \"flairPrimitive\"), and emphasis, reveals and follows export to Flair exactly.\n- effect tweens a numeric parameter of a live path effect already on the node (twist angle, wiggle time, zig zag size).\n\nWorking method\n1. get_animation to learn the element ids (set_animation_artwork_svg first if there is no artwork: give every element you will animate an id; or import_flair_effect to start from a Flair effect and edit it).\n2. Plan a few shots, each one idea. Add them with insert_shots, or edit_animation to make several edits as one step (dry_run first when unsure).\n3. check_animation and fix every error and warning; render_animation_frame (shot + \"end\") to look at the result.\n4. To make a reusable Flair effect, set_animation_controls (colour controls stand for every use of their default colour) and export_flair_effect.\n\nKeep motion purposeful: one thing moving at a time reads best, ease-out for arrivals, ease-in for exits, and hold long enough to see each result.";
1546
1679
 
1547
- export { ANIMATION_EDITOR_AGENT_INSTRUCTIONS, AnimationEditorController, type AnimationEditorOptions, type AnimationEditorSelection, type AnimationEditorState, type AnimationEditorToolProviderOptions, FLAIR_EASES, FLAIR_EXPORT_VERSION, type FlairEase, type FlairEaseName, type FlairEffectDocument, type FlairEffectOptions, type FlairExportOptions, type FlairImportOptions, type FlairImportResult, type FlairMotionExport, type FlairSpringEase, type FlairSvgAnimation, type FlairSvgMotion, type FlairVectorEffect, MOTION_CAMERA_MS, MOTION_COMMAND_SCHEMA, MOTION_COMMAND_TYPES, MOTION_DEFAULT_DURATIONS, MOTION_DEFAULT_HOLD, MOTION_DIRECTIONS, MOTION_DRAW_EFFECT_ID, MOTION_DRAW_MS_PER_UNIT, MOTION_DRAW_RANGE, MOTION_EASE_IN_OUT, MOTION_EASE_OUT, MOTION_EDIT_OPS, MOTION_ENTER_STYLES, MOTION_EXIT_STYLES, MOTION_IRIS_SHAPES, MOTION_ISSUE_CODES, MOTION_MIN_CHANGE_MS, MOTION_REPEAT_MODES, MOTION_SPLIT_ORIENTATIONS, type MotionCamera, type MotionClipShape, type MotionColorPulseCommand, type MotionCommand, type MotionCommandBase, type MotionCommandTiming, type MotionCommandType, type MotionControl, type MotionDirection, type MotionDrawCommand, type MotionEdit, type MotionEditOp, type MotionEditResult, type MotionEffectCommand, type MotionEnterCommand, type MotionEnterStyle, type MotionExitCommand, type MotionExitStyle, type MotionFadeCommand, type MotionFollowCommand, type MotionFrame, type MotionFrameOptions, type MotionIrisShape, type MotionIssue, type MotionIssueCode, type MotionIssueSeverity, type MotionMorphCommand, type MotionMoveCommand, type MotionNodeEntry, type MotionPreset, type MotionProperty, type MotionPulseCommand, type MotionRect, type MotionReveal, type MotionRotateCommand, type MotionScaleCommand, type MotionScene, MotionSceneFormatError, type MotionSegment, type MotionShakeCommand, type MotionShot, type MotionShotTiming, type MotionSplitOrientation, type MotionStyleCommand, type MotionSvgOptions, type MotionTeeterCommand, type MotionTimeline, type MotionValue, type MotionWaitCommand, type MotionWaveCommand, type MotionWiggleCommand, activeSegment, applyMotionControlValues, applyMotionEdits, checkMotionScene, commandShapeProblems, compileMotionScene, createAnimationEditorToolProvider, createMotionScene, describeMotionElements, describeMotionShots, fitMotionRect, flairAtLeast, flairCurveFor, flairEaseFor, freshShotId, fromFlairSvgMotion, fromFlairVectorEffect, indexMotionNodes, interpolateMotionValue, isMotionCommand, isMotionShot, motionClipAttrs, motionCommandDuration, motionCommandRepeat, motionCycleDuration, motionFlairPrimitive, motionFollowRoute, motionFrameAt, motionFrameToSvg, motionIssue, motionIssueKey, motionIssueLine, motionNodeClips, motionNodeOffset, motionPathLength, motionRestValue, motionRevealClip, motionRevealPadding, motionSceneShapeProblems, motionSceneToJson, motionShotAt, motionTrackKey, namedWithSuggestion, parseMotionScene, resolveMotionCamera, segmentProgress, segmentValue, shotShapeProblems, suggestName, toFlairEffectDocument, toFlairSvgMotion, toFlairVectorEffect, trackValue, withViewBox };
1680
+ export { ANIMATION_EDITOR_AGENT_INSTRUCTIONS, AnimationEditorController, type AnimationEditorOptions, type AnimationEditorSelection, type AnimationEditorState, type AnimationEditorToolProviderOptions, FLAIR_EASES, FLAIR_EXPORT_VERSION, type FlairEase, type FlairEaseName, type FlairEffectDocument, type FlairEffectOptions, type FlairExportOptions, type FlairImportOptions, type FlairImportResult, type FlairMotionExport, type FlairSpringEase, type FlairSvgAnimation, type FlairSvgMotion, type FlairVectorEffect, MOTION_ADDITIVE_PROPERTIES, MOTION_BLENDS, MOTION_CAMERA_MS, MOTION_COMMAND_SCHEMA, MOTION_COMMAND_TYPES, MOTION_DEFAULT_DURATIONS, MOTION_DEFAULT_HOLD, MOTION_DIRECTIONS, MOTION_DRAW_EFFECT_ID, MOTION_DRAW_MS_PER_UNIT, MOTION_DRAW_RANGE, MOTION_EASE_IN_OUT, MOTION_EASE_OUT, MOTION_EDIT_OPS, MOTION_ENTER_STYLES, MOTION_EXIT_STYLES, MOTION_IRIS_SHAPES, MOTION_ISSUE_CODES, MOTION_MIN_CHANGE_MS, MOTION_REPEAT_MODES, MOTION_SPLIT_ORIENTATIONS, type MotionCamera, type MotionClipShape, type MotionColorPulseCommand, type MotionCommand, type MotionCommandBase, type MotionCommandTiming, type MotionCommandType, type MotionControl, type MotionDirection, type MotionDrawCommand, type MotionEdit, type MotionEditOp, type MotionEditResult, type MotionEffectCommand, type MotionEnterCommand, type MotionEnterStyle, type MotionExitCommand, type MotionExitStyle, type MotionFadeCommand, type MotionFollowCommand, type MotionFrame, type MotionFrameOptions, type MotionIrisShape, type MotionIssue, type MotionIssueCode, type MotionIssueSeverity, type MotionMatch, type MotionMatchCommand, type MotionMorphCommand, type MotionMoveCommand, type MotionNodeEntry, type MotionPreset, type MotionProperty, type MotionPulseCommand, type MotionRect, type MotionReveal, type MotionRotateCommand, type MotionScaleCommand, type MotionScene, MotionSceneFormatError, type MotionSegment, type MotionShakeCommand, type MotionShot, type MotionShotTiming, type MotionSplitOrientation, type MotionStyleCommand, type MotionSvgOptions, type MotionTeeterCommand, type MotionTimeline, type MotionValue, type MotionWaitCommand, type MotionWaveCommand, type MotionWiggleCommand, activeSegment, applyMotionControlValues, applyMotionEdits, checkMotionScene, commandShapeProblems, compileMotionScene, createAnimationEditorToolProvider, createMotionScene, describeMotionElements, describeMotionShots, fitMotionRect, flairAtLeast, flairCurveFor, flairEaseFor, freshShotId, fromFlairSvgMotion, fromFlairVectorEffect, indexMotionNodes, interpolateMotionValue, isMotionCommand, isMotionShot, matchMotionNodes, motionAddTrackKey, motionClipAttrs, motionCommandDuration, motionCommandRepeat, motionCycleDuration, motionFlairPrimitive, motionFollowRoute, motionFrameAt, motionFrameToSvg, motionIssue, motionIssueKey, motionIssueLine, motionNodeClips, motionNodeOffset, motionPathLength, motionRestValue, motionRevealClip, motionRevealPadding, motionSceneShapeProblems, motionSceneToJson, motionShotAt, motionTrackKey, namedWithSuggestion, parseMotionScene, resolveMotionCamera, segmentProgress, segmentValue, shotShapeProblems, suggestName, toFlairEffectDocument, toFlairSvgMotion, toFlairVectorEffect, trackValue, withMotionLayers, withViewBox };
@@ -159,6 +159,13 @@ interface MotionDrawCommand extends MotionCommandBase {
159
159
  }
160
160
  /** Moves targets by an offset, or to a point (their centre lands there). */
161
161
  interface MotionMoveCommand extends MotionCommandBase {
162
+ /**
163
+ * `add` makes the change a layer over the pose instead of a change to it: it stacks on
164
+ * whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
165
+ * Default `replace` for move, rotate and scale (the later change takes over), `add` for
166
+ * pulse, shake, teeter, wave and wiggle.
167
+ */
168
+ blend?: 'replace' | 'add';
162
169
  type: 'move';
163
170
  by?: {
164
171
  x: number;
@@ -171,12 +178,26 @@ interface MotionMoveCommand extends MotionCommandBase {
171
178
  }
172
179
  /** Turns targets about their centre, by or to an angle in degrees (clockwise). */
173
180
  interface MotionRotateCommand extends MotionCommandBase {
181
+ /**
182
+ * `add` makes the change a layer over the pose instead of a change to it: it stacks on
183
+ * whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
184
+ * Default `replace` for move, rotate and scale (the later change takes over), `add` for
185
+ * pulse, shake, teeter, wave and wiggle.
186
+ */
187
+ blend?: 'replace' | 'add';
174
188
  type: 'rotate';
175
189
  by?: number;
176
190
  to?: number;
177
191
  }
178
192
  /** Scales targets about their centre (1 = rest size). */
179
193
  interface MotionScaleCommand extends MotionCommandBase {
194
+ /**
195
+ * `add` makes the change a layer over the pose instead of a change to it: it stacks on
196
+ * whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
197
+ * Default `replace` for move, rotate and scale (the later change takes over), `add` for
198
+ * pulse, shake, teeter, wave and wiggle.
199
+ */
200
+ blend?: 'replace' | 'add';
180
201
  type: 'scale';
181
202
  to: number | {
182
203
  x: number;
@@ -202,6 +223,17 @@ interface MotionMorphCommand extends MotionCommandBase {
202
223
  type: 'morph';
203
224
  into: string;
204
225
  }
226
+ /**
227
+ * Smart Animate: tweens a group into another group (`into`, usually hidden), part by part. Each
228
+ * part of the target takes the shape, paint and place of its partner in `into`, paired by name,
229
+ * then by id (`card-a-title` ↔ `card-b-title`), then by kind in order. Parts with no partner fade
230
+ * out; parts of `into` with no partner do not appear (`check` lists them).
231
+ */
232
+ interface MotionMatchCommand extends MotionCommandBase {
233
+ type: 'match';
234
+ /** Id of the group (or node) to become. */
235
+ into: string;
236
+ }
205
237
  /** Moves targets along a path node, centre on the path. */
206
238
  interface MotionFollowCommand extends MotionCommandBase {
207
239
  type: 'follow';
@@ -218,6 +250,13 @@ interface MotionFollowCommand extends MotionCommandBase {
218
250
  }
219
251
  /** Scales up and back, `count` times (draws the eye). */
220
252
  interface MotionPulseCommand extends MotionCommandBase {
253
+ /**
254
+ * `add` makes the change a layer over the pose instead of a change to it: it stacks on
255
+ * whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
256
+ * Default `replace` for move, rotate and scale (the later change takes over), `add` for
257
+ * pulse, shake, teeter, wave and wiggle.
258
+ */
259
+ blend?: 'replace' | 'add';
221
260
  type: 'pulse';
222
261
  /** Extra scale at the peak (default 0.15). */
223
262
  amount?: number;
@@ -225,6 +264,13 @@ interface MotionPulseCommand extends MotionCommandBase {
225
264
  }
226
265
  /** Shakes side to side (or up and down), settling. */
227
266
  interface MotionShakeCommand extends MotionCommandBase {
267
+ /**
268
+ * `add` makes the change a layer over the pose instead of a change to it: it stacks on
269
+ * whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
270
+ * Default `replace` for move, rotate and scale (the later change takes over), `add` for
271
+ * pulse, shake, teeter, wave and wiggle.
272
+ */
273
+ blend?: 'replace' | 'add';
228
274
  type: 'shake';
229
275
  /** Distance in document units (default 8). */
230
276
  amount?: number;
@@ -234,6 +280,13 @@ interface MotionShakeCommand extends MotionCommandBase {
234
280
  }
235
281
  /** Rocks about the centre by `angle` either way, settling (Flair's `emphasis.teeter`). */
236
282
  interface MotionTeeterCommand extends MotionCommandBase {
283
+ /**
284
+ * `add` makes the change a layer over the pose instead of a change to it: it stacks on
285
+ * whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
286
+ * Default `replace` for move, rotate and scale (the later change takes over), `add` for
287
+ * pulse, shake, teeter, wave and wiggle.
288
+ */
289
+ blend?: 'replace' | 'add';
237
290
  type: 'teeter';
238
291
  /** Degrees either way (default 8). */
239
292
  angle?: number;
@@ -242,6 +295,13 @@ interface MotionTeeterCommand extends MotionCommandBase {
242
295
  }
243
296
  /** Bobs up and down without settling, like something floating (Flair's `emphasis.wave`). */
244
297
  interface MotionWaveCommand extends MotionCommandBase {
298
+ /**
299
+ * `add` makes the change a layer over the pose instead of a change to it: it stacks on
300
+ * whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
301
+ * Default `replace` for move, rotate and scale (the later change takes over), `add` for
302
+ * pulse, shake, teeter, wave and wiggle.
303
+ */
304
+ blend?: 'replace' | 'add';
245
305
  type: 'wave';
246
306
  /** Height in document units (default 6). */
247
307
  amount?: number;
@@ -253,6 +313,13 @@ interface MotionWaveCommand extends MotionCommandBase {
253
313
  * `emphasis.wiggle`). The same seed always wanders the same way.
254
314
  */
255
315
  interface MotionWiggleCommand extends MotionCommandBase {
316
+ /**
317
+ * `add` makes the change a layer over the pose instead of a change to it: it stacks on
318
+ * whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
319
+ * Default `replace` for move, rotate and scale (the later change takes over), `add` for
320
+ * pulse, shake, teeter, wave and wiggle.
321
+ */
322
+ blend?: 'replace' | 'add';
256
323
  type: 'wiggle';
257
324
  /** Up to about this far, in document units (default 6). */
258
325
  amount?: number;
@@ -290,10 +357,11 @@ interface MotionWaitCommand {
290
357
  with?: 'after' | 'previous';
291
358
  note?: string;
292
359
  }
293
- type MotionCommand = MotionEnterCommand | MotionExitCommand | MotionDrawCommand | MotionMoveCommand | MotionRotateCommand | MotionScaleCommand | MotionFadeCommand | MotionStyleCommand | MotionMorphCommand | MotionFollowCommand | MotionPulseCommand | MotionShakeCommand | MotionTeeterCommand | MotionWaveCommand | MotionWiggleCommand | MotionColorPulseCommand | MotionEffectCommand | MotionWaitCommand;
360
+ type MotionCommand = MotionEnterCommand | MotionExitCommand | MotionDrawCommand | MotionMoveCommand | MotionRotateCommand | MotionScaleCommand | MotionFadeCommand | MotionStyleCommand | MotionMorphCommand | MotionMatchCommand | MotionFollowCommand | MotionPulseCommand | MotionShakeCommand | MotionTeeterCommand | MotionWaveCommand | MotionWiggleCommand | MotionColorPulseCommand | MotionEffectCommand | MotionWaitCommand;
294
361
  type MotionCommandType = MotionCommand['type'];
295
362
  declare const MOTION_COMMAND_TYPES: readonly MotionCommandType[];
296
363
  declare const MOTION_ENTER_STYLES: readonly MotionEnterStyle[];
364
+ declare const MOTION_BLENDS: readonly ["replace", "add"];
297
365
  declare const MOTION_REPEAT_MODES: readonly ["loop", "mirror", "offset"];
298
366
  declare const MOTION_EXIT_STYLES: readonly MotionExitStyle[];
299
367
  declare const MOTION_IRIS_SHAPES: readonly MotionIrisShape[];
@@ -368,6 +436,14 @@ declare const MOTION_ISSUE_CODES: {
368
436
  readonly severity: "error";
369
437
  readonly wording: "A morph names a shape the artwork does not have.";
370
438
  };
439
+ readonly 'match-self': {
440
+ readonly severity: "error";
441
+ readonly wording: "A match turns a group into itself or into a group it holds (or that holds it).";
442
+ };
443
+ readonly 'match-unpaired': {
444
+ readonly severity: "note";
445
+ readonly wording: "Parts of a match's \"into\" group have no partner in the target, so they do not appear.";
446
+ };
371
447
  readonly 'unknown-effect': {
372
448
  readonly severity: "error";
373
449
  readonly wording: "An effect command names an effect the node does not have.";
@@ -530,6 +606,12 @@ interface MotionSegment {
530
606
  steps?: number;
531
607
  /** Numbers change by a steady factor (`from·(to/from)^u`); a camera zooms at a steady rate. */
532
608
  geometric?: boolean;
609
+ /**
610
+ * `add`: the segment is a layer over the node's pose rather than a change to it. It lives on
611
+ * its own track (`motionAddTrackKey`), runs from 0 (offsets, turns) or 1 (scales), and what
612
+ * it adds stays once it ends, on top of whatever the pose does.
613
+ */
614
+ blend?: 'add';
533
615
  /** For `follow`: the path node id, and whether to turn with it. */
534
616
  path?: string;
535
617
  rotate?: boolean;
@@ -633,6 +715,15 @@ declare function activeSegment(track: readonly MotionSegment[] | undefined, time
633
715
  /** A track's value at `time`, or `undefined` when nothing animates it. `raw` ignores behaviours (see `segmentValue`). */
634
716
  declare function trackValue(track: readonly MotionSegment[] | undefined, time: number, raw?: boolean): MotionValue | undefined;
635
717
  declare const motionTrackKey: (node: string, property: MotionProperty) => string;
718
+ /** The track of a node property's additive layers (segments with `blend: 'add'`). */
719
+ declare const motionAddTrackKey: (node: string, property: MotionProperty) => string;
720
+ /** Properties that take additive layers: offsets and turns add, scales multiply. */
721
+ declare const MOTION_ADDITIVE_PROPERTIES: readonly MotionProperty[];
722
+ /**
723
+ * A property's value with its additive layers on top of `base` (its pose): every layer that has
724
+ * started adds its value (offsets, turns) or multiplies by it (scales). `raw` ignores behaviours.
725
+ */
726
+ declare function withMotionLayers(timeline: Pick<MotionTimeline, 'tracks'>, node: string, property: MotionProperty, base: number, time: number, raw?: boolean): number;
636
727
  /** Grows a rectangle to the artwork's aspect ratio (about its centre). */
637
728
  declare function fitMotionRect(rect: MotionRect, aspect: number): MotionRect;
638
729
  /** The rectangle a camera looks at, or `null` when it frames an unknown node. */
@@ -658,6 +749,23 @@ declare function compileMotionScene(scene: MotionScene): MotionTimeline;
658
749
  /** The shot playing at `time` (the last one at the end). */
659
750
  declare function motionShotAt(timeline: MotionTimeline, time: number): MotionShotTiming | undefined;
660
751
 
752
+ /** How the parts of one node pair with the parts of another for a `match` (Smart Animate). */
753
+ interface MotionMatch {
754
+ /** `[from id, into id]`: each part of the target and the part of `into` it becomes. */
755
+ pairs: [string, string][];
756
+ /** Parts of the target with no partner (they fade out). */
757
+ unpairedFrom: string[];
758
+ /** Parts of `into` with no partner (they cannot appear). */
759
+ unpairedInto: string[];
760
+ }
761
+ /**
762
+ * Pairs the parts of `from` with the parts of `into`, each part used once, in passes: the same
763
+ * `name`, then the same id once each group's own id is taken out, then the same kind in order.
764
+ * Paired groups pair their own parts the same way, so a part pairs with a part, never a group
765
+ * with a path. Two paths (or a path and a group with no children) pair whole.
766
+ */
767
+ declare function matchMotionNodes(from: VectorNode, into: VectorNode): MotionMatch;
768
+
661
769
  /**
662
770
  * A reveal clip (`wipe`, `iris`, `split`) in the units of the node's own box: 0–1 across it,
663
771
  * as SVG's `clipPathUnits="objectBoundingBox"` and Flair's clip reveals are.
@@ -1248,6 +1356,7 @@ declare function describeMotionShots(scene: MotionScene): {
1248
1356
  flairPrimitive?: string | undefined;
1249
1357
  start: number;
1250
1358
  end: number;
1359
+ blend?: "replace" | "add";
1251
1360
  type: "move";
1252
1361
  by?: {
1253
1362
  x: number;
@@ -1272,6 +1381,7 @@ declare function describeMotionShots(scene: MotionScene): {
1272
1381
  flairPrimitive?: string | undefined;
1273
1382
  start: number;
1274
1383
  end: number;
1384
+ blend?: "replace" | "add";
1275
1385
  type: "rotate";
1276
1386
  by?: number;
1277
1387
  to?: number;
@@ -1290,6 +1400,7 @@ declare function describeMotionShots(scene: MotionScene): {
1290
1400
  flairPrimitive?: string | undefined;
1291
1401
  start: number;
1292
1402
  end: number;
1403
+ blend?: "replace" | "add";
1293
1404
  type: "scale";
1294
1405
  to: number | {
1295
1406
  x: number;
@@ -1360,6 +1471,23 @@ declare function describeMotionShots(scene: MotionScene): {
1360
1471
  repeatMode?: "loop" | "mirror" | "offset";
1361
1472
  steps?: number;
1362
1473
  index: number;
1474
+ } | {
1475
+ flairPrimitive?: string | undefined;
1476
+ start: number;
1477
+ end: number;
1478
+ type: "match";
1479
+ into: string;
1480
+ targets: string[];
1481
+ duration?: number;
1482
+ delay?: number;
1483
+ stagger?: number;
1484
+ with?: "after" | "previous";
1485
+ ease?: AnimationEasing;
1486
+ note?: string;
1487
+ repeat?: number;
1488
+ repeatMode?: "loop" | "mirror" | "offset";
1489
+ steps?: number;
1490
+ index: number;
1363
1491
  } | {
1364
1492
  flairPrimitive?: string | undefined;
1365
1493
  start: number;
@@ -1384,6 +1512,7 @@ declare function describeMotionShots(scene: MotionScene): {
1384
1512
  flairPrimitive?: string | undefined;
1385
1513
  start: number;
1386
1514
  end: number;
1515
+ blend?: "replace" | "add";
1387
1516
  type: "pulse";
1388
1517
  amount?: number;
1389
1518
  count?: number;
@@ -1402,6 +1531,7 @@ declare function describeMotionShots(scene: MotionScene): {
1402
1531
  flairPrimitive?: string | undefined;
1403
1532
  start: number;
1404
1533
  end: number;
1534
+ blend?: "replace" | "add";
1405
1535
  type: "shake";
1406
1536
  amount?: number;
1407
1537
  count?: number;
@@ -1421,6 +1551,7 @@ declare function describeMotionShots(scene: MotionScene): {
1421
1551
  flairPrimitive?: string | undefined;
1422
1552
  start: number;
1423
1553
  end: number;
1554
+ blend?: "replace" | "add";
1424
1555
  type: "teeter";
1425
1556
  angle?: number;
1426
1557
  count?: number;
@@ -1439,6 +1570,7 @@ declare function describeMotionShots(scene: MotionScene): {
1439
1570
  flairPrimitive?: string | undefined;
1440
1571
  start: number;
1441
1572
  end: number;
1573
+ blend?: "replace" | "add";
1442
1574
  type: "wave";
1443
1575
  amount?: number;
1444
1576
  count?: number;
@@ -1457,6 +1589,7 @@ declare function describeMotionShots(scene: MotionScene): {
1457
1589
  flairPrimitive?: string | undefined;
1458
1590
  start: number;
1459
1591
  end: number;
1592
+ blend?: "replace" | "add";
1460
1593
  type: "wiggle";
1461
1594
  amount?: number;
1462
1595
  frequency?: number;
@@ -1542,6 +1675,6 @@ declare function createAnimationEditorToolProvider(controller: AnimationEditorCo
1542
1675
  * A short authoring guide for a model writing vector animations with the animation editor's
1543
1676
  * tools. Static, so it caches well as part of a system prompt.
1544
1677
  */
1545
- declare const ANIMATION_EDITOR_AGENT_INSTRUCTIONS = "You animate vector artwork. A scene is artwork (vector paths and groups, each with an id) plus shots.\n\nHow it plays\n- Shots play in order. A shot optionally moves the camera, plays its commands, then holds (default 600 ms).\n- Commands in a shot play one after another; give \"with\": \"previous\" to start one together with the command before, \"delay\" to wait, \"stagger\" to offset several targets.\n- Timing comes from the content: each command has a default length (enter 600 ms, move 700 ms, draw follows the path length). Only set \"duration\" to change the pace.\n- Anything that enters later is hidden until it enters. Things that never enter are visible from the start.\n- Every frame is a pure function of time: the same scene always plays the same frames.\n\nCommands\n- enter (fade, pop, grow, slide, draw) and exit (fade, shrink, slide, undraw) bring things in and out.\n- enter also reveals through a clip over the target's box: wipe (behind an edge travelling \"direction\", default right), iris (from the centre; \"shape\": circle or box) and split (from a line through the middle; \"orientation\": horizontal or vertical). exit wipe hides the same way. Reveals need a width and a height: use draw / undraw for a straight line.\n- draw draws strokes on to a fraction; move, rotate, scale and fade change the pose (about the centre); style blends solid colours and stroke width.\n- enter also has zoom (settles from larger) and rise (rises a short way, overshooting a touch); pop and zoom take a starting \"scale\".\n- morph turns a shape into another node's shape (keep the target hidden); follow moves along a path node (with \"rotate\", moves made meanwhile turn with the path).\n- Emphasis draws the eye and returns to rest: pulse (swell), shake (side to side, or \"axis\": \"vertical\"), teeter (rock), wave (bob, no settling), wiggle (seeded wander; the same seed wanders the same way) and color-pulse (tint and back).\n- Any command but enter and exit can \"repeat\" (loop, mirror back and forth, or offset to carry on: rotate by 90, repeat 4 is a full turn); \"duration\" is one cycle.\n- Springs (\"spring-gentle\", \"spring-quick\", \"spring-bouncy\", \"spring-slow\" or { \"type\": \"spring\", \u2026 }) feel physical; leave \"duration\" out and the spring sets it.\n- \"steps\": 12 (on a command, or for the whole scene with set_animation_settings) holds poses \"on twos\" for a hand-drawn look. \"geometric\": true on scale or a camera zooms at an even rate.\n- Commands share their names and defaults with Flair's motion primitives (get_animation shows each one's \"flairPrimitive\"), and emphasis, reveals and follows export to Flair exactly.\n- effect tweens a numeric parameter of a live path effect already on the node (twist angle, wiggle time, zig zag size).\n\nWorking method\n1. get_animation to learn the element ids (set_animation_artwork_svg first if there is no artwork: give every element you will animate an id; or import_flair_effect to start from a Flair effect and edit it).\n2. Plan a few shots, each one idea. Add them with insert_shots, or edit_animation to make several edits as one step (dry_run first when unsure).\n3. check_animation and fix every error and warning; render_animation_frame (shot + \"end\") to look at the result.\n4. To make a reusable Flair effect, set_animation_controls (colour controls stand for every use of their default colour) and export_flair_effect.\n\nKeep motion purposeful: one thing moving at a time reads best, ease-out for arrivals, ease-in for exits, and hold long enough to see each result.";
1678
+ declare const ANIMATION_EDITOR_AGENT_INSTRUCTIONS = "You animate vector artwork. A scene is artwork (vector paths and groups, each with an id) plus shots.\n\nHow it plays\n- Shots play in order. A shot optionally moves the camera, plays its commands, then holds (default 600 ms).\n- Commands in a shot play one after another; give \"with\": \"previous\" to start one together with the command before, \"delay\" to wait, \"stagger\" to offset several targets.\n- Timing comes from the content: each command has a default length (enter 600 ms, move 700 ms, draw follows the path length). Only set \"duration\" to change the pace.\n- Anything that enters later is hidden until it enters. Things that never enter are visible from the start.\n- Every frame is a pure function of time: the same scene always plays the same frames.\n\nCommands\n- enter (fade, pop, grow, slide, draw) and exit (fade, shrink, slide, undraw) bring things in and out.\n- enter also reveals through a clip over the target's box: wipe (behind an edge travelling \"direction\", default right), iris (from the centre; \"shape\": circle or box) and split (from a line through the middle; \"orientation\": horizontal or vertical). exit wipe hides the same way. Reveals need a width and a height: use draw / undraw for a straight line.\n- draw draws strokes on to a fraction; move, rotate, scale and fade change the pose (about the centre); style blends solid colours and stroke width.\n- enter also has zoom (settles from larger) and rise (rises a short way, overshooting a touch); pop and zoom take a starting \"scale\".\n- morph turns a shape into another node's shape (keep the target hidden); match does the same for a whole group, part by part (Smart Animate: draw the end state as a second, hidden group whose parts share names with the first); follow moves along a path node (with \"rotate\", moves made meanwhile turn with the path).\n- Emphasis draws the eye and returns to rest: pulse (swell), shake (side to side, or \"axis\": \"vertical\"), teeter (rock), wave (bob, no settling), wiggle (seeded wander; the same seed wanders the same way) and color-pulse (tint and back).\n- Emphasis stacks on other motion: a shake during a slide shakes as it slides. Give move, rotate or scale \"blend\": \"add\" to stack them too (what they add stays); \"blend\": \"replace\" makes a change take over instead.\n- Any command but enter and exit can \"repeat\" (loop, mirror back and forth, or offset to carry on: rotate by 90, repeat 4 is a full turn); \"duration\" is one cycle.\n- Springs (\"spring-gentle\", \"spring-quick\", \"spring-bouncy\", \"spring-slow\" or { \"type\": \"spring\", \u2026 }) feel physical; leave \"duration\" out and the spring sets it.\n- \"steps\": 12 (on a command, or for the whole scene with set_animation_settings) holds poses \"on twos\" for a hand-drawn look. \"geometric\": true on scale or a camera zooms at an even rate.\n- Commands share their names and defaults with Flair's motion primitives (get_animation shows each one's \"flairPrimitive\"), and emphasis, reveals and follows export to Flair exactly.\n- effect tweens a numeric parameter of a live path effect already on the node (twist angle, wiggle time, zig zag size).\n\nWorking method\n1. get_animation to learn the element ids (set_animation_artwork_svg first if there is no artwork: give every element you will animate an id; or import_flair_effect to start from a Flair effect and edit it).\n2. Plan a few shots, each one idea. Add them with insert_shots, or edit_animation to make several edits as one step (dry_run first when unsure).\n3. check_animation and fix every error and warning; render_animation_frame (shot + \"end\") to look at the result.\n4. To make a reusable Flair effect, set_animation_controls (colour controls stand for every use of their default colour) and export_flair_effect.\n\nKeep motion purposeful: one thing moving at a time reads best, ease-out for arrivals, ease-in for exits, and hold long enough to see each result.";
1546
1679
 
1547
- export { ANIMATION_EDITOR_AGENT_INSTRUCTIONS, AnimationEditorController, type AnimationEditorOptions, type AnimationEditorSelection, type AnimationEditorState, type AnimationEditorToolProviderOptions, FLAIR_EASES, FLAIR_EXPORT_VERSION, type FlairEase, type FlairEaseName, type FlairEffectDocument, type FlairEffectOptions, type FlairExportOptions, type FlairImportOptions, type FlairImportResult, type FlairMotionExport, type FlairSpringEase, type FlairSvgAnimation, type FlairSvgMotion, type FlairVectorEffect, MOTION_CAMERA_MS, MOTION_COMMAND_SCHEMA, MOTION_COMMAND_TYPES, MOTION_DEFAULT_DURATIONS, MOTION_DEFAULT_HOLD, MOTION_DIRECTIONS, MOTION_DRAW_EFFECT_ID, MOTION_DRAW_MS_PER_UNIT, MOTION_DRAW_RANGE, MOTION_EASE_IN_OUT, MOTION_EASE_OUT, MOTION_EDIT_OPS, MOTION_ENTER_STYLES, MOTION_EXIT_STYLES, MOTION_IRIS_SHAPES, MOTION_ISSUE_CODES, MOTION_MIN_CHANGE_MS, MOTION_REPEAT_MODES, MOTION_SPLIT_ORIENTATIONS, type MotionCamera, type MotionClipShape, type MotionColorPulseCommand, type MotionCommand, type MotionCommandBase, type MotionCommandTiming, type MotionCommandType, type MotionControl, type MotionDirection, type MotionDrawCommand, type MotionEdit, type MotionEditOp, type MotionEditResult, type MotionEffectCommand, type MotionEnterCommand, type MotionEnterStyle, type MotionExitCommand, type MotionExitStyle, type MotionFadeCommand, type MotionFollowCommand, type MotionFrame, type MotionFrameOptions, type MotionIrisShape, type MotionIssue, type MotionIssueCode, type MotionIssueSeverity, type MotionMorphCommand, type MotionMoveCommand, type MotionNodeEntry, type MotionPreset, type MotionProperty, type MotionPulseCommand, type MotionRect, type MotionReveal, type MotionRotateCommand, type MotionScaleCommand, type MotionScene, MotionSceneFormatError, type MotionSegment, type MotionShakeCommand, type MotionShot, type MotionShotTiming, type MotionSplitOrientation, type MotionStyleCommand, type MotionSvgOptions, type MotionTeeterCommand, type MotionTimeline, type MotionValue, type MotionWaitCommand, type MotionWaveCommand, type MotionWiggleCommand, activeSegment, applyMotionControlValues, applyMotionEdits, checkMotionScene, commandShapeProblems, compileMotionScene, createAnimationEditorToolProvider, createMotionScene, describeMotionElements, describeMotionShots, fitMotionRect, flairAtLeast, flairCurveFor, flairEaseFor, freshShotId, fromFlairSvgMotion, fromFlairVectorEffect, indexMotionNodes, interpolateMotionValue, isMotionCommand, isMotionShot, motionClipAttrs, motionCommandDuration, motionCommandRepeat, motionCycleDuration, motionFlairPrimitive, motionFollowRoute, motionFrameAt, motionFrameToSvg, motionIssue, motionIssueKey, motionIssueLine, motionNodeClips, motionNodeOffset, motionPathLength, motionRestValue, motionRevealClip, motionRevealPadding, motionSceneShapeProblems, motionSceneToJson, motionShotAt, motionTrackKey, namedWithSuggestion, parseMotionScene, resolveMotionCamera, segmentProgress, segmentValue, shotShapeProblems, suggestName, toFlairEffectDocument, toFlairSvgMotion, toFlairVectorEffect, trackValue, withViewBox };
1680
+ export { ANIMATION_EDITOR_AGENT_INSTRUCTIONS, AnimationEditorController, type AnimationEditorOptions, type AnimationEditorSelection, type AnimationEditorState, type AnimationEditorToolProviderOptions, FLAIR_EASES, FLAIR_EXPORT_VERSION, type FlairEase, type FlairEaseName, type FlairEffectDocument, type FlairEffectOptions, type FlairExportOptions, type FlairImportOptions, type FlairImportResult, type FlairMotionExport, type FlairSpringEase, type FlairSvgAnimation, type FlairSvgMotion, type FlairVectorEffect, MOTION_ADDITIVE_PROPERTIES, MOTION_BLENDS, MOTION_CAMERA_MS, MOTION_COMMAND_SCHEMA, MOTION_COMMAND_TYPES, MOTION_DEFAULT_DURATIONS, MOTION_DEFAULT_HOLD, MOTION_DIRECTIONS, MOTION_DRAW_EFFECT_ID, MOTION_DRAW_MS_PER_UNIT, MOTION_DRAW_RANGE, MOTION_EASE_IN_OUT, MOTION_EASE_OUT, MOTION_EDIT_OPS, MOTION_ENTER_STYLES, MOTION_EXIT_STYLES, MOTION_IRIS_SHAPES, MOTION_ISSUE_CODES, MOTION_MIN_CHANGE_MS, MOTION_REPEAT_MODES, MOTION_SPLIT_ORIENTATIONS, type MotionCamera, type MotionClipShape, type MotionColorPulseCommand, type MotionCommand, type MotionCommandBase, type MotionCommandTiming, type MotionCommandType, type MotionControl, type MotionDirection, type MotionDrawCommand, type MotionEdit, type MotionEditOp, type MotionEditResult, type MotionEffectCommand, type MotionEnterCommand, type MotionEnterStyle, type MotionExitCommand, type MotionExitStyle, type MotionFadeCommand, type MotionFollowCommand, type MotionFrame, type MotionFrameOptions, type MotionIrisShape, type MotionIssue, type MotionIssueCode, type MotionIssueSeverity, type MotionMatch, type MotionMatchCommand, type MotionMorphCommand, type MotionMoveCommand, type MotionNodeEntry, type MotionPreset, type MotionProperty, type MotionPulseCommand, type MotionRect, type MotionReveal, type MotionRotateCommand, type MotionScaleCommand, type MotionScene, MotionSceneFormatError, type MotionSegment, type MotionShakeCommand, type MotionShot, type MotionShotTiming, type MotionSplitOrientation, type MotionStyleCommand, type MotionSvgOptions, type MotionTeeterCommand, type MotionTimeline, type MotionValue, type MotionWaitCommand, type MotionWaveCommand, type MotionWiggleCommand, activeSegment, applyMotionControlValues, applyMotionEdits, checkMotionScene, commandShapeProblems, compileMotionScene, createAnimationEditorToolProvider, createMotionScene, describeMotionElements, describeMotionShots, fitMotionRect, flairAtLeast, flairCurveFor, flairEaseFor, freshShotId, fromFlairSvgMotion, fromFlairVectorEffect, indexMotionNodes, interpolateMotionValue, isMotionCommand, isMotionShot, matchMotionNodes, motionAddTrackKey, motionClipAttrs, motionCommandDuration, motionCommandRepeat, motionCycleDuration, motionFlairPrimitive, motionFollowRoute, motionFrameAt, motionFrameToSvg, motionIssue, motionIssueKey, motionIssueLine, motionNodeClips, motionNodeOffset, motionPathLength, motionRestValue, motionRevealClip, motionRevealPadding, motionSceneShapeProblems, motionSceneToJson, motionShotAt, motionTrackKey, namedWithSuggestion, parseMotionScene, resolveMotionCamera, segmentProgress, segmentValue, shotShapeProblems, suggestName, toFlairEffectDocument, toFlairSvgMotion, toFlairVectorEffect, trackValue, withMotionLayers, withViewBox };