@pixerate/editor 0.256.0 → 0.257.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 (122) hide show
  1. package/dist/agent/index.cjs +40 -38
  2. package/dist/agent/index.js +9 -7
  3. package/dist/animation/index.cjs +4 -2
  4. package/dist/animation/index.js +4 -2
  5. package/dist/animation-editor/index.cjs +63 -61
  6. package/dist/animation-editor/index.js +7 -5
  7. package/dist/brushes/colour.d.cts +11 -0
  8. package/dist/brushes/colour.d.ts +11 -0
  9. package/dist/brushes/index.cjs +51 -30
  10. package/dist/brushes/index.d.cts +1 -0
  11. package/dist/brushes/index.d.ts +1 -0
  12. package/dist/brushes/index.js +25 -4
  13. package/dist/brushes/resolve.d.cts +2 -0
  14. package/dist/brushes/resolve.d.ts +2 -0
  15. package/dist/brushes/schema.d.cts +1 -0
  16. package/dist/brushes/schema.d.ts +1 -0
  17. package/dist/brushes/tools.d.cts +7 -0
  18. package/dist/brushes/tools.d.ts +7 -0
  19. package/dist/brushes/types.d.cts +10 -2
  20. package/dist/brushes/types.d.ts +10 -2
  21. package/dist/brushes/ui.d.cts +14 -3
  22. package/dist/brushes/ui.d.ts +14 -3
  23. package/dist/{brushstrokeRender-HCOQUSWW.js → brushstrokeRender-JI4W6F2G.js} +2 -2
  24. package/dist/{brushstrokeRender-ZZOXI5O5.cjs → brushstrokeRender-MQ6PSDM5.cjs} +11 -11
  25. package/dist/canvas/index.cjs +20 -18
  26. package/dist/canvas/index.js +7 -5
  27. package/dist/chart/index.cjs +159 -157
  28. package/dist/chart/index.js +9 -7
  29. package/dist/{chunk-7272D3K2.js → chunk-2EUW2XZX.js} +27 -276
  30. package/dist/{chunk-L6Y7TSQ4.js → chunk-2VJ6OVJV.js} +1 -1
  31. package/dist/{chunk-6ZZKRH7R.js → chunk-47V3WXDG.js} +2 -2
  32. package/dist/{chunk-H7ET2ISK.cjs → chunk-4IMD2TLY.cjs} +52 -52
  33. package/dist/{chunk-VUKUTT2W.js → chunk-4M4E3N6X.js} +1 -1
  34. package/dist/{chunk-TBAVCLEQ.cjs → chunk-5Q5MLXAD.cjs} +23 -23
  35. package/dist/{chunk-MONXNVZK.js → chunk-6I23ZCGK.js} +5 -3
  36. package/dist/{chunk-GOBOCZZI.js → chunk-6NQPKNUZ.js} +1 -1
  37. package/dist/{chunk-WYGSR3IJ.js → chunk-AORZ5M5C.js} +1 -1
  38. package/dist/chunk-AVTPZO4Z.cjs +142 -0
  39. package/dist/{chunk-WKMUBATU.js → chunk-C2WEIEUB.js} +1 -1
  40. package/dist/{chunk-P3K2JCJA.js → chunk-D5BXSOSU.js} +3 -3
  41. package/dist/chunk-E2V5DA3W.js +36 -0
  42. package/dist/{chunk-WZOGDKCQ.js → chunk-F7CPSRLN.js} +0 -133
  43. package/dist/chunk-FJBQTZS4.js +17 -0
  44. package/dist/{chunk-SOSBOS5T.cjs → chunk-G23BTQA5.cjs} +22 -22
  45. package/dist/{chunk-EUIDTZNQ.cjs → chunk-I3Y2Q3PM.cjs} +59 -308
  46. package/dist/{chunk-YHUMGBZD.js → chunk-ICTPLVSR.js} +22 -4
  47. package/dist/{chunk-LRNUZKWV.cjs → chunk-IPUTIUGQ.cjs} +1 -1
  48. package/dist/{chunk-6GRUVGKU.js → chunk-ITURMC2M.js} +3 -3
  49. package/dist/{chunk-HYWRU5VX.js → chunk-IXQZHCOF.js} +1 -1
  50. package/dist/chunk-J5UQHWVL.js +142 -0
  51. package/dist/{chunk-YBAPT7NL.js → chunk-JC2SHA4A.js} +1 -23
  52. package/dist/chunk-LRTR4ASZ.cjs +17 -0
  53. package/dist/{chunk-HUAISCUX.cjs → chunk-M2HG5DJ2.cjs} +18 -18
  54. package/dist/{chunk-N76AMOKE.cjs → chunk-MDLEGVEN.cjs} +42 -42
  55. package/dist/chunk-MEGSQUQO.cjs +36 -0
  56. package/dist/chunk-MLLTWAXH.cjs +276 -0
  57. package/dist/{chunk-RHPSE2YR.js → chunk-MQ6MGIQM.js} +2 -2
  58. package/dist/{chunk-PGPFWC35.cjs → chunk-MQGQTKVW.cjs} +51 -33
  59. package/dist/{chunk-5YWWQ36H.cjs → chunk-O3ZVZSNJ.cjs} +9 -9
  60. package/dist/{chunk-GCTUOTCW.cjs → chunk-P3PZ63M3.cjs} +35 -35
  61. package/dist/{chunk-WRZ6C4TU.cjs → chunk-P6WYDBTH.cjs} +4 -4
  62. package/dist/{chunk-CJ6TBL2N.cjs → chunk-RHEMMGCN.cjs} +16 -16
  63. package/dist/{chunk-HIMGBZAM.cjs → chunk-RSIKDWOP.cjs} +201 -38
  64. package/dist/{chunk-SABJMH6M.cjs → chunk-RVGP2XLF.cjs} +2 -135
  65. package/dist/{chunk-JVRLGV3C.js → chunk-SMTUQWGY.js} +184 -21
  66. package/dist/{chunk-DMTEQ6SH.js → chunk-SSFMWJDK.js} +4 -4
  67. package/dist/{chunk-TFF2GTGN.cjs → chunk-SXQHWXEL.cjs} +2 -24
  68. package/dist/{chunk-IWEVV63O.cjs → chunk-UEYLANO3.cjs} +18 -16
  69. package/dist/chunk-VR6OGHU5.js +276 -0
  70. package/dist/{chunk-AF23QK5F.js → chunk-YQ4PQTBB.js} +1 -1
  71. package/dist/{chunk-B7V34GIH.cjs → chunk-YSGW7VV4.cjs} +88 -88
  72. package/dist/{chunk-3NS5C7FB.cjs → chunk-YYBW6DF2.cjs} +76 -76
  73. package/dist/{chunk-UFEDHACQ.js → chunk-Z7BX4TWO.js} +2 -2
  74. package/dist/{chunk-RUONPPMC.cjs → chunk-ZSE25IZA.cjs} +8 -8
  75. package/dist/color/index.cjs +7 -3
  76. package/dist/color/index.js +18 -14
  77. package/dist/export/index.cjs +8 -6
  78. package/dist/export/index.js +7 -5
  79. package/dist/extensions/index.cjs +11 -9
  80. package/dist/extensions/index.js +10 -8
  81. package/dist/gradient/index.cjs +33 -31
  82. package/dist/gradient/index.js +5 -3
  83. package/dist/image-editor/brush-presets.d.cts +4 -1
  84. package/dist/image-editor/brush-presets.d.ts +4 -1
  85. package/dist/image-editor/controller.d.cts +10 -5
  86. package/dist/image-editor/controller.d.ts +10 -5
  87. package/dist/image-editor/index.cjs +1090 -1073
  88. package/dist/image-editor/index.js +37 -20
  89. package/dist/index.cjs +17 -15
  90. package/dist/index.js +11 -9
  91. package/dist/paint-editor/brushes.d.cts +18 -1
  92. package/dist/paint-editor/brushes.d.ts +18 -1
  93. package/dist/paint-editor/controller.d.cts +29 -0
  94. package/dist/paint-editor/controller.d.ts +29 -0
  95. package/dist/paint-editor/engine.d.cts +7 -0
  96. package/dist/paint-editor/engine.d.ts +7 -0
  97. package/dist/paint-editor/index.cjs +1443 -1280
  98. package/dist/paint-editor/index.js +1117 -954
  99. package/dist/paint-editor/mark-settings.d.cts +1 -1
  100. package/dist/paint-editor/mark-settings.d.ts +1 -1
  101. package/dist/paint-editor/procedural.d.cts +4 -2
  102. package/dist/paint-editor/procedural.d.ts +4 -2
  103. package/dist/paint-editor/stamp-tip.d.cts +45 -0
  104. package/dist/paint-editor/stamp-tip.d.ts +45 -0
  105. package/dist/paint-editor/stroke.d.cts +2 -0
  106. package/dist/paint-editor/stroke.d.ts +2 -0
  107. package/dist/stickers/index.cjs +4 -2
  108. package/dist/stickers/index.js +6 -4
  109. package/dist/typography/index.cjs +3 -2
  110. package/dist/typography/index.js +2 -1
  111. package/dist/vector/index.cjs +971 -969
  112. package/dist/vector/index.js +8 -6
  113. package/dist/video-editor/index.cjs +4 -2
  114. package/dist/video-editor/index.js +4 -2
  115. package/package.json +1 -1
  116. package/skills/pixerate-brushes/SKILL.md +21 -11
  117. package/skills/pixerate-brushes-design/SKILL.md +6 -2
  118. package/skills/pixerate-brushes-design/evals/canvas-chalk.json +8 -8
  119. package/skills/pixerate-canvas/SKILL.md +3 -2
  120. package/skills/pixerate-image-editor/SKILL.md +1 -1
  121. package/skills/pixerate-paint-editor/SKILL.md +4 -1
  122. package/skills/pixerate-vector/SKILL.md +1 -1
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2;
2
2
 
3
- var _chunkGCTUOTCWcjs = require('../chunk-GCTUOTCW.cjs');
3
+ var _chunkP3PZ63M3cjs = require('../chunk-P3PZ63M3.cjs');
4
4
 
5
5
 
6
6
 
@@ -39,8 +39,8 @@ var _chunk557BDWKOcjs = require('../chunk-557BDWKO.cjs');
39
39
 
40
40
 
41
41
 
42
- var _chunk5YWWQ36Hcjs = require('../chunk-5YWWQ36H.cjs');
43
- require('../chunk-HIMGBZAM.cjs');
42
+ var _chunkO3ZVZSNJcjs = require('../chunk-O3ZVZSNJ.cjs');
43
+ require('../chunk-RSIKDWOP.cjs');
44
44
  require('../chunk-JSDND7DF.cjs');
45
45
  require('../chunk-CVFAAZXE.cjs');
46
46
 
@@ -117,8 +117,10 @@ var _chunk4ZC5QJE2cjs = require('../chunk-4ZC5QJE2.cjs');
117
117
 
118
118
 
119
119
  var _chunkA6QWKBJPcjs = require('../chunk-A6QWKBJP.cjs');
120
- require('../chunk-EUIDTZNQ.cjs');
121
- require('../chunk-TFF2GTGN.cjs');
120
+ require('../chunk-I3Y2Q3PM.cjs');
121
+ require('../chunk-MEGSQUQO.cjs');
122
+ require('../chunk-MLLTWAXH.cjs');
123
+ require('../chunk-SXQHWXEL.cjs');
122
124
  require('../chunk-5UEFBM2M.cjs');
123
125
  require('../chunk-IPJ3TEYR.cjs');
124
126
 
@@ -702,7 +704,7 @@ function smoothMotionTimes(points, start, duration, pacing = "even") {
702
704
  function motionTextLayout(nodes, id) {
703
705
  const group = _optionalChain([nodes, 'access', _5 => _5.get, 'call', _6 => _6(id), 'optionalAccess', _7 => _7.node]);
704
706
  if (!group || group.type !== "group") return null;
705
- const letters = _chunk5YWWQ36Hcjs.collectPathNodes.call(void 0, group).map((p) => ({ id: p.id, b: _optionalChain([nodes, 'access', _8 => _8.get, 'call', _9 => _9(p.id), 'optionalAccess', _10 => _10.bounds]) })).filter((l) => !!l.b && l.b.width + l.b.height > 0);
707
+ const letters = _chunkO3ZVZSNJcjs.collectPathNodes.call(void 0, group).map((p) => ({ id: p.id, b: _optionalChain([nodes, 'access', _8 => _8.get, 'call', _9 => _9(p.id), 'optionalAccess', _10 => _10.bounds]) })).filter((l) => !!l.b && l.b.width + l.b.height > 0);
706
708
  if (!letters.length) return null;
707
709
  const lines = [];
708
710
  for (const l of [...letters].sort((a, c) => a.b.y + a.b.height / 2 - (c.b.y + c.b.height / 2))) {
@@ -787,21 +789,21 @@ function indexMotionNodes(nodes) {
787
789
  const out = /* @__PURE__ */ new Map();
788
790
  const walk = (list, parentWorld, ancestors) => {
789
791
  for (const node of list) {
790
- const local = _chunk5YWWQ36Hcjs.vectorNodeBounds.call(void 0, node);
791
- const bounds = _chunk5YWWQ36Hcjs.vectorNodeBounds.call(void 0, node, parentWorld);
792
+ const local = _chunkO3ZVZSNJcjs.vectorNodeBounds.call(void 0, node);
793
+ const bounds = _chunkO3ZVZSNJcjs.vectorNodeBounds.call(void 0, node, parentWorld);
792
794
  const center = local ? { x: local.x + local.width / 2, y: local.y + local.height / 2 } : { x: 0, y: 0 };
793
795
  if (!out.has(node.id)) out.set(node.id, { node, ancestors, parentWorld, center, bounds, box: local });
794
- if (node.type === "group") walk(node.children, _chunk5YWWQ36Hcjs.multiplyMatrices.call(void 0, _chunk5YWWQ36Hcjs.nodeMatrix.call(void 0, node), parentWorld), [...ancestors, node.id]);
796
+ if (node.type === "group") walk(node.children, _chunkO3ZVZSNJcjs.multiplyMatrices.call(void 0, _chunkO3ZVZSNJcjs.nodeMatrix.call(void 0, node), parentWorld), [...ancestors, node.id]);
795
797
  }
796
798
  };
797
- walk(nodes, _chunk5YWWQ36Hcjs.IDENTITY_MATRIX, []);
799
+ walk(nodes, _chunkO3ZVZSNJcjs.IDENTITY_MATRIX, []);
798
800
  indexCache.set(nodes, out);
799
801
  return out;
800
802
  }
801
803
  var solid = (paint) => typeof paint === "string" && paint !== "none" ? paint : void 0;
802
804
  function firstPaint(node, key) {
803
805
  if (node.type === "path") return solid(node[key]);
804
- for (const p of _chunk5YWWQ36Hcjs.collectPathNodes.call(void 0, node)) {
806
+ for (const p of _chunkO3ZVZSNJcjs.collectPathNodes.call(void 0, node)) {
805
807
  const s = solid(p[key]);
806
808
  if (s) return s;
807
809
  }
@@ -809,7 +811,7 @@ function firstPaint(node, key) {
809
811
  }
810
812
  function strokeReach(node) {
811
813
  let reach = 0;
812
- for (const p of node.type === "path" ? [node] : _chunk5YWWQ36Hcjs.collectPathNodes.call(void 0, node)) {
814
+ for (const p of node.type === "path" ? [node] : _chunkO3ZVZSNJcjs.collectPathNodes.call(void 0, node)) {
813
815
  if (p.stroke == null || p.stroke === "none") continue;
814
816
  const width = _nullishCoalesce(p.strokeWidth, () => ( 1));
815
817
  reach = Math.max(reach, p.strokeAlign === "outside" ? width : p.strokeAlign === "inside" ? 0 : width / 2);
@@ -879,7 +881,7 @@ function motionRestValue(entry, property, artwork) {
879
881
  case "stroke":
880
882
  return _nullishCoalesce((node && firstPaint(node, property)), () => ( "transparent"));
881
883
  case "strokeWidth": {
882
- const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ? _chunk5YWWQ36Hcjs.collectPathNodes.call(void 0, node)[0] : void 0;
884
+ const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ? _chunkO3ZVZSNJcjs.collectPathNodes.call(void 0, node)[0] : void 0;
883
885
  return _nullishCoalesce(_optionalChain([path, 'optionalAccess', _14 => _14.strokeWidth]), () => ( 1));
884
886
  }
885
887
  case "shape":
@@ -990,12 +992,12 @@ function resolveMotionCamera(camera, scene) {
990
992
  const r = camera;
991
993
  return { x: r.x, y: r.y, width: r.width, height: r.height };
992
994
  }
993
- function motionPathLength(node, parentWorld = _chunk5YWWQ36Hcjs.IDENTITY_MATRIX) {
995
+ function motionPathLength(node, parentWorld = _chunkO3ZVZSNJcjs.IDENTITY_MATRIX) {
994
996
  let longest = 0;
995
- const paths = node.type === "path" ? [node] : _chunk5YWWQ36Hcjs.collectPathNodes.call(void 0, node);
997
+ const paths = node.type === "path" ? [node] : _chunkO3ZVZSNJcjs.collectPathNodes.call(void 0, node);
996
998
  for (const p of paths) {
997
999
  try {
998
- longest = Math.max(longest, _chunkGF2RBSDMcjs.bezierPathLength.call(void 0, _chunk5YWWQ36Hcjs.vectorPathWorldBezier.call(void 0, p, parentWorld, { effects: false })));
1000
+ longest = Math.max(longest, _chunkGF2RBSDMcjs.bezierPathLength.call(void 0, _chunkO3ZVZSNJcjs.vectorPathWorldBezier.call(void 0, p, parentWorld, { effects: false })));
999
1001
  } catch (e2) {
1000
1002
  }
1001
1003
  }
@@ -1271,12 +1273,12 @@ function compileMotionScene(scene) {
1271
1273
  const order2 = _nullishCoalesce(o.order, () => ( "together"));
1272
1274
  const pace = _nullishCoalesce(o.pace, () => ( "time"));
1273
1275
  if (order2 === "together" && pace === "time") return null;
1274
- const paths = entry.node.type === "path" ? [entry.node] : _chunk5YWWQ36Hcjs.collectPathNodes.call(void 0, entry.node);
1276
+ const paths = entry.node.type === "path" ? [entry.node] : _chunkO3ZVZSNJcjs.collectPathNodes.call(void 0, entry.node);
1275
1277
  let list = paths.map((p) => {
1276
1278
  const at = nodes.get(p.id);
1277
1279
  let first = { x: 0, y: 0 };
1278
1280
  try {
1279
- const m = _chunk5YWWQ36Hcjs.vectorPathWorldBezier.call(void 0, p, _nullishCoalesce(_optionalChain([at, 'optionalAccess', _42 => _42.parentWorld]), () => ( _chunk5YWWQ36Hcjs.IDENTITY_MATRIX)), { effects: false })[0];
1281
+ const m = _chunkO3ZVZSNJcjs.vectorPathWorldBezier.call(void 0, p, _nullishCoalesce(_optionalChain([at, 'optionalAccess', _42 => _42.parentWorld]), () => ( _chunkO3ZVZSNJcjs.IDENTITY_MATRIX)), { effects: false })[0];
1280
1282
  if (m && m.type === "M") first = { x: m.x, y: m.y };
1281
1283
  } catch (e3) {
1282
1284
  }
@@ -1388,17 +1390,17 @@ function compileMotionScene(scene) {
1388
1390
  let dx = _nullishCoalesce(_optionalChain([command3, 'access', _45 => _45.by, 'optionalAccess', _46 => _46.x]), () => ( 0));
1389
1391
  let dy = _nullishCoalesce(_optionalChain([command3, 'access', _47 => _47.by, 'optionalAccess', _48 => _48.y]), () => ( 0));
1390
1392
  if (command3.to) {
1391
- const inv = _chunk5YWWQ36Hcjs.invertMatrix.call(void 0, entry.parentWorld);
1392
- const target = _chunk5YWWQ36Hcjs.applyMatrix.call(void 0, inv, command3.to);
1393
+ const inv = _chunkO3ZVZSNJcjs.invertMatrix.call(void 0, entry.parentWorld);
1394
+ const target = _chunkO3ZVZSNJcjs.applyMatrix.call(void 0, inv, command3.to);
1393
1395
  dx = target.x - (entry.center.x + num2("x"));
1394
1396
  dy = target.y - (entry.center.y + num2("y"));
1395
1397
  }
1396
1398
  if (_optionalChain([command3, 'access', _49 => _49.via, 'optionalAccess', _50 => _50.length])) {
1397
- const inv = _chunk5YWWQ36Hcjs.invertMatrix.call(void 0, entry.parentWorld);
1399
+ const inv = _chunkO3ZVZSNJcjs.invertMatrix.call(void 0, entry.parentWorld);
1398
1400
  const x0 = num2("x");
1399
1401
  const y0 = num2("y");
1400
1402
  const add = command3.blend === "add";
1401
- const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) => _chunk5YWWQ36Hcjs.applyMatrix.call(void 0, inv, p)).map((p) => ({ x: p.x - entry.center.x - x0, y: p.y - entry.center.y - y0 })), { x: dx, y: dy }];
1403
+ const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) => _chunkO3ZVZSNJcjs.applyMatrix.call(void 0, inv, p)).map((p) => ({ x: p.x - entry.center.x - x0, y: p.y - entry.center.y - y0 })), { x: dx, y: dy }];
1402
1404
  const times = _optionalChain([command3, 'access', _51 => _51.times, 'optionalAccess', _52 => _52.length]) === command3.via.length ? [start, ...command3.times.map((f) => start + f * (end - start)), end] : smoothMotionTimes(offsets, start, end - start, _nullishCoalesce(command3.pacing, () => ( "even")));
1403
1405
  for (const axis of ["x", "y"]) {
1404
1406
  const base = add ? 0 : axis === "x" ? x0 : y0;
@@ -2021,13 +2023,13 @@ function morphBetween(a, b) {
2021
2023
  let inner = morphCache.get(a);
2022
2024
  if (!inner) morphCache.set(a, inner = /* @__PURE__ */ new WeakMap());
2023
2025
  let morph = inner.get(b);
2024
- if (!morph) inner.set(b, morph = _chunkGCTUOTCWcjs.createVectorMorph.call(void 0, a, b, { id: a.id }));
2026
+ if (!morph) inner.set(b, morph = _chunkP3PZ63M3cjs.createVectorMorph.call(void 0, a, b, { id: a.id }));
2025
2027
  return morph;
2026
2028
  }
2027
2029
  function shapeIn(entry, shape) {
2028
2030
  if (shape === entry) return entry.node;
2029
- const m = _chunk5YWWQ36Hcjs.multiplyMatrices.call(void 0, _chunk5YWWQ36Hcjs.multiplyMatrices.call(void 0, _chunk5YWWQ36Hcjs.nodeMatrix.call(void 0, shape.node), shape.parentWorld), _chunk5YWWQ36Hcjs.invertMatrix.call(void 0, entry.parentWorld));
2030
- return { ...shape.node, ..._chunk5YWWQ36Hcjs.isIdentityMatrix.call(void 0, m) ? { transform: void 0 } : { transform: m } };
2031
+ const m = _chunkO3ZVZSNJcjs.multiplyMatrices.call(void 0, _chunkO3ZVZSNJcjs.multiplyMatrices.call(void 0, _chunkO3ZVZSNJcjs.nodeMatrix.call(void 0, shape.node), shape.parentWorld), _chunkO3ZVZSNJcjs.invertMatrix.call(void 0, entry.parentWorld));
2032
+ return { ...shape.node, ..._chunkO3ZVZSNJcjs.isIdentityMatrix.call(void 0, m) ? { transform: void 0 } : { transform: m } };
2031
2033
  }
2032
2034
  function shapeAt(entry, timeline, nodes, time) {
2033
2035
  const track = timeline.tracks.get(motionTrackKey(entry.node.id, "shape"));
@@ -2047,7 +2049,7 @@ function shapeAt(entry, timeline, nodes, time) {
2047
2049
  function motionFollowRoute(entry, path) {
2048
2050
  if (!path || path.node.type !== "path") return null;
2049
2051
  try {
2050
- return _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, _chunk5YWWQ36Hcjs.vectorPathWorldBezier.call(void 0, path.node, path.parentWorld, { effects: false }), _chunk5YWWQ36Hcjs.invertMatrix.call(void 0, entry.parentWorld));
2052
+ return _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, _chunkO3ZVZSNJcjs.vectorPathWorldBezier.call(void 0, path.node, path.parentWorld, { effects: false }), _chunkO3ZVZSNJcjs.invertMatrix.call(void 0, entry.parentWorld));
2051
2053
  } catch (e6) {
2052
2054
  return null;
2053
2055
  }
@@ -2081,9 +2083,9 @@ function motionNodeOffset(entry, timeline, time, nodes = indexMotionNodes([entry
2081
2083
  const scaleX = read("scaleX", 1);
2082
2084
  const scaleY = read("scaleY", 1);
2083
2085
  const c = entry.center;
2084
- let matrix = _chunk5YWWQ36Hcjs.multiplyMatrices.call(void 0, _chunk5YWWQ36Hcjs.multiplyMatrices.call(void 0, _chunk5YWWQ36Hcjs.scaleMatrix.call(void 0, scaleX, scaleY, c), _chunk5YWWQ36Hcjs.rotateMatrix.call(void 0, rotation, c)), _chunk5YWWQ36Hcjs.translateMatrix.call(void 0, dx, dy));
2086
+ let matrix = _chunkO3ZVZSNJcjs.multiplyMatrices.call(void 0, _chunkO3ZVZSNJcjs.multiplyMatrices.call(void 0, _chunkO3ZVZSNJcjs.scaleMatrix.call(void 0, scaleX, scaleY, c), _chunkO3ZVZSNJcjs.rotateMatrix.call(void 0, rotation, c)), _chunkO3ZVZSNJcjs.translateMatrix.call(void 0, dx, dy));
2085
2087
  const along = follow ? followAt(entry, timeline, nodes, time) : null;
2086
- if (along) matrix = _chunk5YWWQ36Hcjs.multiplyMatrices.call(void 0, matrix, _chunk5YWWQ36Hcjs.multiplyMatrices.call(void 0, _chunk5YWWQ36Hcjs.multiplyMatrices.call(void 0, _chunk5YWWQ36Hcjs.translateMatrix.call(void 0, -c.x, -c.y), _chunk5YWWQ36Hcjs.rotateMatrix.call(void 0, along.angle)), _chunk5YWWQ36Hcjs.translateMatrix.call(void 0, along.x, along.y)));
2088
+ if (along) matrix = _chunkO3ZVZSNJcjs.multiplyMatrices.call(void 0, matrix, _chunkO3ZVZSNJcjs.multiplyMatrices.call(void 0, _chunkO3ZVZSNJcjs.multiplyMatrices.call(void 0, _chunkO3ZVZSNJcjs.translateMatrix.call(void 0, -c.x, -c.y), _chunkO3ZVZSNJcjs.rotateMatrix.call(void 0, along.angle)), _chunkO3ZVZSNJcjs.translateMatrix.call(void 0, along.x, along.y)));
2087
2089
  return { matrix, dx, dy, rotation, scaleX, scaleY, follow: along };
2088
2090
  }
2089
2091
  function motionNodeClips(id, timeline, time) {
@@ -2150,7 +2152,7 @@ function motionFrameAt(scene, time, options = {}) {
2150
2152
  const start = Math.min(1, Math.max(0, typeof drawStart === "number" ? drawStart : 0));
2151
2153
  const end = Math.min(1, Math.max(0, typeof drawEnd === "number" ? drawEnd : 1));
2152
2154
  if (start > 0 || end < 1) {
2153
- const trim = _chunk5YWWQ36Hcjs.createVectorEffect.call(void 0, "trim", MOTION_DRAW_EFFECT_ID, { start: tidy(start * 100), end: tidy(end * 100) });
2155
+ const trim = _chunkO3ZVZSNJcjs.createVectorEffect.call(void 0, "trim", MOTION_DRAW_EFFECT_ID, { start: tidy(start * 100), end: tidy(end * 100) });
2154
2156
  p = { ...p, effects: [trim, ...(_nullishCoalesce(p.effects, () => ( []))).filter((e) => e.id !== MOTION_DRAW_EFFECT_ID)] };
2155
2157
  }
2156
2158
  }
@@ -2164,8 +2166,8 @@ function motionFrameAt(scene, time, options = {}) {
2164
2166
  if (o >= 1) delete out.opacity;
2165
2167
  }
2166
2168
  const offset = options.offsets === false ? null : motionNodeOffset(entry, timeline, time, nodes);
2167
- if (offset && !_chunk5YWWQ36Hcjs.isIdentityMatrix.call(void 0, offset.matrix)) {
2168
- const m = _chunk5YWWQ36Hcjs.multiplyMatrices.call(void 0, _chunk5YWWQ36Hcjs.nodeMatrix.call(void 0, out), offset.matrix).map(tidy);
2169
+ if (offset && !_chunkO3ZVZSNJcjs.isIdentityMatrix.call(void 0, offset.matrix)) {
2170
+ const m = _chunkO3ZVZSNJcjs.multiplyMatrices.call(void 0, _chunkO3ZVZSNJcjs.nodeMatrix.call(void 0, out), offset.matrix).map(tidy);
2169
2171
  out = { ...out, transform: m };
2170
2172
  }
2171
2173
  return out;
@@ -2186,8 +2188,8 @@ function motionFrameToSvg(scene, time, options = {}) {
2186
2188
  const wrap = { ...options.wrap };
2187
2189
  for (const [id, clips] of Object.entries(frame.clips))
2188
2190
  wrap[id] = [..._nullishCoalesce(wrap[id], () => ( [])), ...clips.map((clip, i) => ({ clip: { id: `${prefix}reveal-${id}-${i}`, shape: clip.shape, attrs: motionClipAttrs(clip) } }))];
2189
- if (!motionSceneHasLayers(scene)) return withCameraViewEffects(withViewBox(_chunk5YWWQ36Hcjs.vectorDocumentToSvg.call(void 0, frame.document, { ...options, wrap }), frame.camera), frame.view, frame.camera, prefix);
2190
- const art = _chunk5YWWQ36Hcjs.vectorDocumentToSvg.call(void 0, frame.document, { ...options, wrap, background: false });
2191
+ if (!motionSceneHasLayers(scene)) return withCameraViewEffects(withViewBox(_chunkO3ZVZSNJcjs.vectorDocumentToSvg.call(void 0, frame.document, { ...options, wrap }), frame.camera), frame.view, frame.camera, prefix);
2192
+ const art = _chunkO3ZVZSNJcjs.vectorDocumentToSvg.call(void 0, frame.document, { ...options, wrap, background: false });
2191
2193
  let svg = withViewBox(withMotionShotLayers(art, scene, time, frame.camera, options.layers, options.background !== false), frame.camera);
2192
2194
  const transition = options.transitions === false ? null : motionTransitionAt(scene, time);
2193
2195
  if (transition) {
@@ -2378,8 +2380,8 @@ function visibleAt(timeline, id, time, node) {
2378
2380
  if (Array.isArray(rect) && (rect[2] <= 1e-4 || rect[3] <= 1e-4)) return false;
2379
2381
  const circle = clip("clipCircle");
2380
2382
  if (Array.isArray(circle) && circle[2] <= 1e-4) return false;
2381
- const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" : _chunk5YWWQ36Hcjs.collectPathNodes.call(void 0, node).some((p) => p.fill && p.fill !== "none");
2382
- const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" || _chunk5YWWQ36Hcjs.collectPathNodes.call(void 0, node).length === 0 || _chunk5YWWQ36Hcjs.collectPathNodes.call(void 0, node).some((p) => {
2383
+ const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" : _chunkO3ZVZSNJcjs.collectPathNodes.call(void 0, node).some((p) => p.fill && p.fill !== "none");
2384
+ const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" || _chunkO3ZVZSNJcjs.collectPathNodes.call(void 0, node).length === 0 || _chunkO3ZVZSNJcjs.collectPathNodes.call(void 0, node).some((p) => {
2383
2385
  const v = trackValue(timeline.tracks.get(motionTrackKey(p.id, "drawEnd")), time);
2384
2386
  return typeof v !== "number" || v > 0.01;
2385
2387
  }));
@@ -2466,7 +2468,7 @@ function checkMotionScene(scene) {
2466
2468
  }
2467
2469
  for (const id of targets) {
2468
2470
  const node = nodes.get(id).node;
2469
- const paths = node.type === "path" ? [node] : _chunk5YWWQ36Hcjs.collectPathNodes.call(void 0, node);
2471
+ const paths = node.type === "path" ? [node] : _chunkO3ZVZSNJcjs.collectPathNodes.call(void 0, node);
2470
2472
  if (paths.some((p) => p[key] !== void 0 && p[key] !== null && typeof p[key] !== "string"))
2471
2473
  issues.push(_chunkDGWOGQJ5cjs.motionIssue.call(void 0, "paint-not-color", `"${id}" has a gradient ${key}; it switches to ${color} at the end instead of blending.`, { ...where, ids: [id] }));
2472
2474
  }
@@ -2479,7 +2481,7 @@ function checkMotionScene(scene) {
2479
2481
  else
2480
2482
  for (const id of targets) {
2481
2483
  const node = nodes.get(id).node;
2482
- const paths = node.type === "path" ? [node] : _chunk5YWWQ36Hcjs.collectPathNodes.call(void 0, node);
2484
+ const paths = node.type === "path" ? [node] : _chunkO3ZVZSNJcjs.collectPathNodes.call(void 0, node);
2483
2485
  if (paths.some((p) => typeof p[key] !== "string"))
2484
2486
  issues.push(_chunkDGWOGQJ5cjs.motionIssue.call(void 0, "paint-not-color", `"${id}" has a gradient or no ${key}, so a colour pulse cannot tint it; give it a solid ${key} or pulse the ${key === "fill" ? "stroke" : "fill"}.`, { ...where, ids: [id] }));
2485
2487
  }
@@ -2924,7 +2926,7 @@ function motionNodePose(scene, id, time) {
2924
2926
  if (!entry) throw new Error(`There is no element ${_chunkDGWOGQJ5cjs.namedWithSuggestion.call(void 0, id, [...indexMotionNodes(scene.artwork.nodes).keys()])} in the artwork.`);
2925
2927
  const timeline = compileMotionScene(scene);
2926
2928
  const drawn = indexMotionNodes(motionFrameAt(scene, time).document.nodes).get(id);
2927
- const centre = _chunk5YWWQ36Hcjs.applyMatrix.call(void 0, entry.parentWorld, { x: entry.center.x + motionPropertyValue(timeline, id, "x", time), y: entry.center.y + motionPropertyValue(timeline, id, "y", time) });
2929
+ const centre = _chunkO3ZVZSNJcjs.applyMatrix.call(void 0, entry.parentWorld, { x: entry.center.x + motionPropertyValue(timeline, id, "x", time), y: entry.center.y + motionPropertyValue(timeline, id, "y", time) });
2928
2930
  const paint = (property) => _nullishCoalesce(trackValue(timeline.tracks.get(motionTrackKey(id, property)), time), () => ( motionRestValue(entry, property, scene.artwork)));
2929
2931
  const fill = paint("fill");
2930
2932
  const stroke = paint("stroke");
@@ -3271,7 +3273,7 @@ function toFlairSvgMotion(scene, options = {}) {
3271
3273
  raw: (t) => transformAt(t, true)
3272
3274
  });
3273
3275
  }
3274
- const paths = node.type === "path" ? [node] : _chunk5YWWQ36Hcjs.collectPathNodes.call(void 0, node);
3276
+ const paths = node.type === "path" ? [node] : _chunkO3ZVZSNJcjs.collectPathNodes.call(void 0, node);
3275
3277
  for (const path of paths) {
3276
3278
  if (pathsSeen.has(path.id)) continue;
3277
3279
  pathsSeen.add(path.id);
@@ -3293,7 +3295,7 @@ function toFlairSvgMotion(scene, options = {}) {
3293
3295
  if (shapeSegments.length) {
3294
3296
  if (node.type !== "path") notes.push(`"${id}" is a group: its morph or effect animation is not exported (Flair tweens one path's "d").`);
3295
3297
  else {
3296
- const inverse = _chunk5YWWQ36Hcjs.invertMatrix.call(void 0, _chunk5YWWQ36Hcjs.nodeMatrix.call(void 0, node));
3298
+ const inverse = _chunkO3ZVZSNJcjs.invertMatrix.call(void 0, _chunkO3ZVZSNJcjs.nodeMatrix.call(void 0, node));
3297
3299
  channels.push({
3298
3300
  id,
3299
3301
  kind: "attr",
@@ -3302,9 +3304,9 @@ function toFlairSvgMotion(scene, options = {}) {
3302
3304
  exact: () => false,
3303
3305
  value: (t) => {
3304
3306
  const frame = motionFrameAt(scene, t, { draw: false, offsets: false });
3305
- const now = _chunk5YWWQ36Hcjs.expandVectorAppearance.call(void 0, _optionalChain([indexMotionNodes, 'call', _151 => _151(frame.document.nodes), 'access', _152 => _152.get, 'call', _153 => _153(id), 'optionalAccess', _154 => _154.node]));
3307
+ const now = _chunkO3ZVZSNJcjs.expandVectorAppearance.call(void 0, _optionalChain([indexMotionNodes, 'call', _151 => _151(frame.document.nodes), 'access', _152 => _152.get, 'call', _153 => _153(id), 'optionalAccess', _154 => _154.node]));
3306
3308
  if (!now || now.type !== "path") return "";
3307
- const bezier = _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, _chunk5YWWQ36Hcjs.vectorPathWorldBezier.call(void 0, now, _chunk5YWWQ36Hcjs.IDENTITY_MATRIX, { effects: false }), inverse);
3309
+ const bezier = _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, _chunkO3ZVZSNJcjs.vectorPathWorldBezier.call(void 0, now, _chunkO3ZVZSNJcjs.IDENTITY_MATRIX, { effects: false }), inverse);
3308
3310
  return _chunkGF2RBSDMcjs.bezierPathToSvg.call(void 0, bezier, { precision: Math.min(precision, 2) });
3309
3311
  }
3310
3312
  });
@@ -3444,7 +3446,7 @@ function toFlairSvgMotion(scene, options = {}) {
3444
3446
  }
3445
3447
  if (scene.motionBlur) notes.push("Motion blur is drawn on the stage only; Flair plays the scene sharp.");
3446
3448
  if (trigger && (_nullishCoalesce(scene.loop, () => ( "none"))) !== "none") notes.push(`The scene plays on ${trigger}, so its loop does not apply in Flair.`);
3447
- let svg = _chunk5YWWQ36Hcjs.vectorDocumentToSvg.call(void 0, { ...scene.artwork, nodes: _chunk5YWWQ36Hcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) }, { pretty: false, precision, wrap });
3449
+ let svg = _chunkO3ZVZSNJcjs.vectorDocumentToSvg.call(void 0, { ...scene.artwork, nodes: _chunkO3ZVZSNJcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) }, { pretty: false, precision, wrap });
3448
3450
  if (routes.length) svg = svg.replace(/^(<svg[^>]*>)/, `$1<defs>${routes.join("")}</defs>`);
3449
3451
  let motion = { svg, animate };
3450
3452
  if (_optionalChain([scene, 'access', _160 => _160.controls, 'optionalAccess', _161 => _161.length])) {
@@ -3542,14 +3544,14 @@ function easingOf(ease, fallback) {
3542
3544
  return fallback;
3543
3545
  }
3544
3546
  function poseOf(value, entry) {
3545
- const t = _chunk5YWWQ36Hcjs.parseSvgTransform.call(void 0, String(value));
3546
- const o = _chunk5YWWQ36Hcjs.multiplyMatrices.call(void 0, _nullishCoalesce(_chunk5YWWQ36Hcjs.invertMatrix.call(void 0, _chunk5YWWQ36Hcjs.nodeMatrix.call(void 0, entry.node)), () => ( [1, 0, 0, 1, 0, 0])), t);
3547
+ const t = _chunkO3ZVZSNJcjs.parseSvgTransform.call(void 0, String(value));
3548
+ const o = _chunkO3ZVZSNJcjs.multiplyMatrices.call(void 0, _nullishCoalesce(_chunkO3ZVZSNJcjs.invertMatrix.call(void 0, _chunkO3ZVZSNJcjs.nodeMatrix.call(void 0, entry.node)), () => ( [1, 0, 0, 1, 0, 0])), t);
3547
3549
  const sx = Math.hypot(o[0], o[1]);
3548
3550
  if (!(sx > 1e-9)) return null;
3549
3551
  const sy = (o[0] * o[3] - o[1] * o[2]) / sx;
3550
3552
  if (Math.abs(o[2] + o[1] / sx * sy) > 1e-6 || Math.abs(o[3] - o[0] / sx * sy) > 1e-6) return null;
3551
3553
  const c = entry.center;
3552
- const moved = _chunk5YWWQ36Hcjs.applyMatrix.call(void 0, o, c);
3554
+ const moved = _chunkO3ZVZSNJcjs.applyMatrix.call(void 0, o, c);
3553
3555
  return { dx: moved.x - c.x, dy: moved.y - c.y, rotation: Math.atan2(o[1], o[0]) * 180 / Math.PI, sx, sy };
3554
3556
  }
3555
3557
  var near = (a, b, eps = 1e-6) => Math.abs(a - b) < eps;
@@ -3634,7 +3636,7 @@ function fromFlairSvgMotion(input, options = {}) {
3634
3636
  const notes = [];
3635
3637
  if (!input || typeof input.svg !== "string") throw new Error('Give a Flair SvgMotion: { svg: "<svg \u2026>", animate: [ \u2026 ] }.');
3636
3638
  const { motion, controls } = resolvePlaceholders(input, notes);
3637
- const artwork = _chunk5YWWQ36Hcjs.parseVectorSvg.call(void 0, motion.svg);
3639
+ const artwork = _chunkO3ZVZSNJcjs.parseVectorSvg.call(void 0, motion.svg);
3638
3640
  const nodes = indexMotionNodes(artwork.nodes);
3639
3641
  const byStep = /* @__PURE__ */ new Map();
3640
3642
  for (const anim of _nullishCoalesce(motion.animate, () => ( []))) {
@@ -3881,9 +3883,9 @@ function toLottie(scene, options = {}) {
3881
3883
  const items = [];
3882
3884
  const shapeSegments = [...timeline.tracks.entries()].filter(([k]) => k.startsWith(`${path.id}\0`) && (k.endsWith("\0shape") || k.includes("\0effect:"))).flatMap(([, v]) => v);
3883
3885
  const geometryAt = (t) => {
3884
- if (!shapeSegments.length) return _chunk5YWWQ36Hcjs.vectorPathWorldBezier.call(void 0, path);
3886
+ if (!shapeSegments.length) return _chunkO3ZVZSNJcjs.vectorPathWorldBezier.call(void 0, path);
3885
3887
  const now = _optionalChain([indexMotionNodes, 'call', _170 => _170(motionFrameAt(scene, t, { draw: false, offsets: false }).document.nodes), 'access', _171 => _171.get, 'call', _172 => _172(path.id), 'optionalAccess', _173 => _173.node]);
3886
- return now && now.type === "path" ? _chunk5YWWQ36Hcjs.vectorPathWorldBezier.call(void 0, _chunk5YWWQ36Hcjs.expandVectorAppearances.call(void 0, [now])[0]) : _chunk5YWWQ36Hcjs.vectorPathWorldBezier.call(void 0, path);
3888
+ return now && now.type === "path" ? _chunkO3ZVZSNJcjs.vectorPathWorldBezier.call(void 0, _chunkO3ZVZSNJcjs.expandVectorAppearances.call(void 0, [now])[0]) : _chunkO3ZVZSNJcjs.vectorPathWorldBezier.call(void 0, path);
3887
3889
  };
3888
3890
  const rest = lottieContours(_chunkGF2RBSDMcjs.toBezierPath.call(void 0, geometryAt(0)), round4);
3889
3891
  rest.forEach((contour, n2) => {
@@ -3956,13 +3958,13 @@ function toLottie(scene, options = {}) {
3956
3958
  const innerTr = STATIC_TR();
3957
3959
  if (node.type === "path") inner = [...pathShapes(node)];
3958
3960
  else if (node.type === "text" || node.type === "instance") {
3959
- const drawn = _chunk5YWWQ36Hcjs.expandVectorAppearance.call(void 0, node);
3961
+ const drawn = _chunkO3ZVZSNJcjs.expandVectorAppearance.call(void 0, node);
3960
3962
  inner = drawn.type === "path" ? [...pathShapes(drawn)] : drawn.children.filter((c) => c.type === "path").reverse().flatMap((c) => [...pathShapes(c)]);
3961
- notes.push(`"${node.id}": text is exported as its outlines${_chunk5YWWQ36Hcjs.vectorTextHasOutlines.call(void 0, ) ? "" : " (glyph boxes: set an outline text shaper for real glyphs)"}.`);
3963
+ notes.push(`"${node.id}": text is exported as its outlines${_chunkO3ZVZSNJcjs.vectorTextHasOutlines.call(void 0, ) ? "" : " (glyph boxes: set an outline text shaper for real glyphs)"}.`);
3962
3964
  } else {
3963
3965
  inner = shown(node.children).reverse().map(nodeGroup);
3964
- const m = _chunk5YWWQ36Hcjs.nodeMatrix.call(void 0, node);
3965
- if (m !== _chunk5YWWQ36Hcjs.IDENTITY_MATRIX) {
3966
+ const m = _chunkO3ZVZSNJcjs.nodeMatrix.call(void 0, node);
3967
+ if (m !== _chunkO3ZVZSNJcjs.IDENTITY_MATRIX) {
3966
3968
  const parts = staticParts(m);
3967
3969
  if (!parts) notes.push(`"${node.id}": its transform skews, which is not exported; it is drawn without the skew.`);
3968
3970
  else {
@@ -3975,7 +3977,7 @@ function toLottie(scene, options = {}) {
3975
3977
  const body = { ty: "gr", nm: `${node.id} (own)`, it: [...inner, innerTr] };
3976
3978
  return { ty: "gr", nm: _nullishCoalesce(node.name, () => ( node.id)), it: [body, poseTransform(entry)] };
3977
3979
  };
3978
- const artwork = { ...scene.artwork, nodes: _chunk5YWWQ36Hcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) };
3980
+ const artwork = { ...scene.artwork, nodes: _chunkO3ZVZSNJcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) };
3979
3981
  const content = shown(artwork.nodes).reverse().map(nodeGroup);
3980
3982
  if (artwork.background && rgba(artwork.background))
3981
3983
  content.push({ ty: "gr", nm: "Background", it: [{ ty: "rc", nm: "Background", p: { a: 0, k: [artwork.width / 2, artwork.height / 2] }, s: { a: 0, k: [artwork.width, artwork.height] }, r: { a: 0, k: 0 } }, { ty: "fl", c: { a: 0, k: rgba(artwork.background).map(round4) }, o: { a: 0, k: 100 }, r: 1 }, STATIC_TR()] });
@@ -4074,11 +4076,11 @@ function preset(prst, w, h) {
4074
4076
  const poly = (pts) => [{ closed: true, anchors: pts.map(([x, y]) => ({ x, y })) }];
4075
4077
  switch (prst) {
4076
4078
  case "rect":
4077
- return [_chunk5YWWQ36Hcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
4079
+ return [_chunkO3ZVZSNJcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
4078
4080
  case "roundRect":
4079
- return [_chunk5YWWQ36Hcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h }, Math.min(w, h) * 0.16667)];
4081
+ return [_chunkO3ZVZSNJcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h }, Math.min(w, h) * 0.16667)];
4080
4082
  case "ellipse":
4081
- return [_chunk5YWWQ36Hcjs.ellipseSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
4083
+ return [_chunkO3ZVZSNJcjs.ellipseSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
4082
4084
  case "triangle":
4083
4085
  return poly([[w / 2, 0], [w, h], [0, h]]);
4084
4086
  case "rtTriangle":
@@ -4186,7 +4188,7 @@ function shapes(ctx, tree, map) {
4186
4188
  let subpaths = cust ? custom(cust, w, h) : prst ? preset(prst, w, h) : null;
4187
4189
  if (!subpaths) {
4188
4190
  if (prst) ctx.notes.push(`"${name}" is a ${prst}, drawn as its bounding rectangle.`);
4189
- subpaths = [_chunk5YWWQ36Hcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
4191
+ subpaths = [_chunkO3ZVZSNJcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
4190
4192
  }
4191
4193
  const style = kid(el, "style");
4192
4194
  const fill = kid(spPr, "noFill") ? null : _nullishCoalesce(colour(ctx, kid(spPr, "solidFill")), () => ( (el.localName === "cxnSp" ? null : colour(ctx, kid(style, "fillRef")))));
@@ -4575,7 +4577,7 @@ function nextMotionEffectInstance(scene) {
4575
4577
  walk(scene.artwork.nodes);
4576
4578
  for (let i = 1; ; i++) if (!used.has(`fx${i}`)) return `fx${i}`;
4577
4579
  }
4578
- var motionArtworkSvg = (artwork) => _chunk5YWWQ36Hcjs.vectorDocumentToSvg.call(void 0, artwork);
4580
+ var motionArtworkSvg = (artwork) => _chunkO3ZVZSNJcjs.vectorDocumentToSvg.call(void 0, artwork);
4579
4581
  var tag = (commands, source) => commands.map((c) => c.type === "wait" ? c : { ...c, source });
4580
4582
  function motionCommandsFromEffect(artwork, motion, source) {
4581
4583
  const imported = fromFlairSvgMotion({ svg: motionArtworkSvg(artwork), animate: [..._nullishCoalesce(motion.animate, () => ( []))] });
@@ -4919,7 +4921,7 @@ var AnimationEditorController = (_class2 = class {
4919
4921
  const entry = indexMotionNodes(this.scene.artwork.nodes).get(options.path.node);
4920
4922
  if (!entry) throw new Error(`There is no node "${options.path.node}"; find_animation_elements lists the artwork's nodes.`);
4921
4923
  if (entry.node.type !== "path") throw new Error(`Node "${options.path.node}" is a ${entry.node.type}, not a path; pass a path node (find_animation_elements shows each node's type).`);
4922
- value = _chunkGF2RBSDMcjs.bezierPathToSvg.call(void 0, _chunk5YWWQ36Hcjs.vectorPathWorldBezier.call(void 0, entry.node, entry.parentWorld, { effects: false }));
4924
+ value = _chunkGF2RBSDMcjs.bezierPathToSvg.call(void 0, _chunkO3ZVZSNJcjs.vectorPathWorldBezier.call(void 0, entry.node, entry.parentWorld, { effects: false }));
4923
4925
  place ??= "viewBox";
4924
4926
  } else {
4925
4927
  const provider = this.effects.require();
@@ -6180,7 +6182,7 @@ function createAnimationEditorToolProvider(controller, options = {}) {
6180
6182
  handler: ({ svg }) => {
6181
6183
  let artwork;
6182
6184
  try {
6183
- artwork = _chunk5YWWQ36Hcjs.parseVectorSvg.call(void 0, svg);
6185
+ artwork = _chunkO3ZVZSNJcjs.parseVectorSvg.call(void 0, svg);
6184
6186
  } catch (error) {
6185
6187
  throw new Error(`The SVG could not be read: ${error.message}. Nothing was changed.`);
6186
6188
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createVectorMorph
3
- } from "../chunk-HYWRU5VX.js";
3
+ } from "../chunk-IXQZHCOF.js";
4
4
  import {
5
5
  MOTION_ISSUE_CODES,
6
6
  motionIssue,
@@ -39,8 +39,8 @@ import {
39
39
  vectorNodeBounds,
40
40
  vectorPathWorldBezier,
41
41
  vectorTextHasOutlines
42
- } from "../chunk-AF23QK5F.js";
43
- import "../chunk-JVRLGV3C.js";
42
+ } from "../chunk-YQ4PQTBB.js";
43
+ import "../chunk-SMTUQWGY.js";
44
44
  import "../chunk-APX63ILU.js";
45
45
  import "../chunk-M6DNZNVY.js";
46
46
  import {
@@ -117,8 +117,10 @@ import {
117
117
  normalizeTokenColor,
118
118
  rgbaToHex
119
119
  } from "../chunk-2WPNAGHI.js";
120
- import "../chunk-7272D3K2.js";
121
- import "../chunk-YBAPT7NL.js";
120
+ import "../chunk-2EUW2XZX.js";
121
+ import "../chunk-E2V5DA3W.js";
122
+ import "../chunk-VR6OGHU5.js";
123
+ import "../chunk-JC2SHA4A.js";
122
124
  import "../chunk-MHLU6GRJ.js";
123
125
  import "../chunk-6ONMQ6WF.js";
124
126
 
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Brush colours for hosts: a brush's solid or light / dark colour as the #rrggbb a host paints
3
+ * with, resolved for its colour scheme when the brush is chosen or a stroke starts (and recorded
4
+ * then, so replays stay exact).
5
+ */
6
+ import { type ColorScheme } from '../color/dual.cjs';
7
+ /**
8
+ * A brush colour as #rrggbb for `scheme`: a solid colour (hex, `#rrggbbaa`, `rgba()`; alpha is
9
+ * the brush's opacity's business) or a light / dark pair; `null` for gradients and effect paint.
10
+ */
11
+ export declare function brushColourHex(value: unknown, scheme: ColorScheme): string | null;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Brush colours for hosts: a brush's solid or light / dark colour as the #rrggbb a host paints
3
+ * with, resolved for its colour scheme when the brush is chosen or a stroke starts (and recorded
4
+ * then, so replays stay exact).
5
+ */
6
+ import { type ColorScheme } from '../color/dual.js';
7
+ /**
8
+ * A brush colour as #rrggbb for `scheme`: a solid colour (hex, `#rrggbbaa`, `rgba()`; alpha is
9
+ * the brush's opacity's business) or a light / dark pair; `null` for gradients and effect paint.
10
+ */
11
+ export declare function brushColourHex(value: unknown, scheme: ColorScheme): string | null;