@pixerate/editor 0.135.0 → 0.136.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 (99) hide show
  1. package/dist/animation-editor/index.cjs +58 -55
  2. package/dist/animation-editor/index.cjs.map +1 -1
  3. package/dist/animation-editor/index.d.cts +8 -5
  4. package/dist/animation-editor/index.d.ts +8 -5
  5. package/dist/animation-editor/index.js +5 -2
  6. package/dist/animation-editor/index.js.map +1 -1
  7. package/dist/{bezier-J8i4uqSH.d.cts → bezier-CdccFsF8.d.cts} +1 -1
  8. package/dist/{bezier-lNEOp0Jx.d.ts → bezier-DG9qNZQV.d.ts} +1 -1
  9. package/dist/canvas/index.d.cts +10 -7
  10. package/dist/canvas/index.d.ts +10 -7
  11. package/dist/{chunk-Z2H7KECK.cjs → chunk-2R3UW57U.cjs} +13 -2
  12. package/dist/chunk-2R3UW57U.cjs.map +1 -0
  13. package/dist/{chunk-ESIWZMMK.js → chunk-6QQR4LKE.js} +2 -2
  14. package/dist/chunk-A3BVTI3G.js +150 -0
  15. package/dist/chunk-A3BVTI3G.js.map +1 -0
  16. package/dist/{chunk-T6TV6HY6.cjs → chunk-B2CUCM7Y.cjs} +36 -36
  17. package/dist/{chunk-T6TV6HY6.cjs.map → chunk-B2CUCM7Y.cjs.map} +1 -1
  18. package/dist/chunk-ECCXGELC.cjs +727 -0
  19. package/dist/chunk-ECCXGELC.cjs.map +1 -0
  20. package/dist/{chunk-OXSV64JX.js → chunk-G6IKY6PL.js} +4 -4
  21. package/dist/chunk-I52DRGGJ.js +727 -0
  22. package/dist/chunk-I52DRGGJ.js.map +1 -0
  23. package/dist/{chunk-YAFS2QFZ.cjs → chunk-JLGNZMUV.cjs} +82 -82
  24. package/dist/{chunk-YAFS2QFZ.cjs.map → chunk-JLGNZMUV.cjs.map} +1 -1
  25. package/dist/{chunk-7RJ6P7MI.js → chunk-KZXLZCQ7.js} +2 -2
  26. package/dist/{chunk-HHTCDFZC.js → chunk-MAHQC3SK.js} +13 -2
  27. package/dist/chunk-MAHQC3SK.js.map +1 -0
  28. package/dist/{chunk-FWEO3HSL.js → chunk-PQQF5KOW.js} +8 -8
  29. package/dist/chunk-Q6OUXEK3.cjs +150 -0
  30. package/dist/chunk-Q6OUXEK3.cjs.map +1 -0
  31. package/dist/{chunk-P3RQ5UJE.cjs → chunk-UTQKC66X.cjs} +4 -4
  32. package/dist/{chunk-P3RQ5UJE.cjs.map → chunk-UTQKC66X.cjs.map} +1 -1
  33. package/dist/{chunk-J3B45HTA.cjs → chunk-XB25WOC2.cjs} +6 -6
  34. package/dist/{chunk-J3B45HTA.cjs.map → chunk-XB25WOC2.cjs.map} +1 -1
  35. package/dist/effects/index.d.cts +7 -4
  36. package/dist/effects/index.d.ts +7 -4
  37. package/dist/{export-AZSwX087.d.cts → export-BOheWw2R.d.cts} +3 -3
  38. package/dist/{export-BDkyDNM8.d.ts → export-ByKKIA2S.d.ts} +3 -3
  39. package/dist/{export-KzubBKo7.d.cts → export-CEYeRQXH.d.cts} +1 -1
  40. package/dist/{export-DMeG6E06.d.ts → export-Ds7zgGD8.d.ts} +1 -1
  41. package/dist/extensions/index.cjs +3 -3
  42. package/dist/extensions/index.cjs.map +1 -1
  43. package/dist/extensions/index.js +2 -2
  44. package/dist/generation/index.cjs +150 -945
  45. package/dist/generation/index.cjs.map +1 -1
  46. package/dist/generation/index.d.cts +3 -423
  47. package/dist/generation/index.d.ts +3 -423
  48. package/dist/generation/index.js +59 -854
  49. package/dist/generation/index.js.map +1 -1
  50. package/dist/grammar/index.cjs +3 -3
  51. package/dist/grammar/index.cjs.map +1 -1
  52. package/dist/grammar/index.js +2 -2
  53. package/dist/{helpers-Coa4e2j_.d.ts → helpers--ns3W2D7.d.ts} +7 -1
  54. package/dist/{helpers-DHl28yLO.d.cts → helpers-BVkU4oUi.d.cts} +7 -1
  55. package/dist/image-editor/index.cjs +617 -614
  56. package/dist/image-editor/index.cjs.map +1 -1
  57. package/dist/image-editor/index.d.cts +11 -8
  58. package/dist/image-editor/index.d.ts +11 -8
  59. package/dist/image-editor/index.js +5 -2
  60. package/dist/image-editor/index.js.map +1 -1
  61. package/dist/index.cjs +28 -28
  62. package/dist/index.cjs.map +1 -1
  63. package/dist/index.js +36 -36
  64. package/dist/{opentype-Dfcx6wFx.d.ts → opentype-DfoVYgmG.d.ts} +1 -1
  65. package/dist/{opentype-BWR7Qv8W.d.cts → opentype-yi-Kz4ND.d.cts} +1 -1
  66. package/dist/paint-editor/index.cjs +10 -7
  67. package/dist/paint-editor/index.cjs.map +1 -1
  68. package/dist/paint-editor/index.d.cts +8 -5
  69. package/dist/paint-editor/index.d.ts +8 -5
  70. package/dist/paint-editor/index.js +5 -2
  71. package/dist/paint-editor/index.js.map +1 -1
  72. package/dist/{pathfinder-D8KQ6blQ.d.cts → pathfinder-7JkMwYvC.d.cts} +1 -1
  73. package/dist/{pathfinder-Celbi3e6.d.ts → pathfinder-GM3UWdBZ.d.ts} +1 -1
  74. package/dist/{pool-BfuxBKTd.d.cts → pool-04qp8iW4.d.cts} +1 -1
  75. package/dist/{pool-8JZGWHvR.d.ts → pool-CkTxlLMC.d.ts} +1 -1
  76. package/dist/provenance-DmlcgdzT.d.cts +426 -0
  77. package/dist/provenance-uh5r2TQ8.d.ts +426 -0
  78. package/dist/{svg-pwXWq6s2.d.cts → svg-BDDKvWWY.d.cts} +2 -2
  79. package/dist/{svg-CxxqG3_W.d.ts → svg-rV6_HPmn.d.ts} +2 -2
  80. package/dist/{tools-3EBjR91b.d.cts → tools-BAjSbTdY.d.cts} +1 -1
  81. package/dist/{tools-y1M6O3UT.d.ts → tools-DPYerqeR.d.ts} +1 -1
  82. package/dist/vector/index.cjs +2684 -1860
  83. package/dist/vector/index.cjs.map +1 -1
  84. package/dist/vector/index.d.cts +313 -71
  85. package/dist/vector/index.d.ts +313 -71
  86. package/dist/vector/index.js +4700 -3876
  87. package/dist/vector/index.js.map +1 -1
  88. package/dist/video-editor/index.d.cts +7 -4
  89. package/dist/video-editor/index.d.ts +7 -4
  90. package/dist/{warp-Ceqdz7kj.d.cts → warp-DQh9R7Ie.d.cts} +1 -1
  91. package/dist/{warp-C1gwu2G_.d.ts → warp-XVL6SpSh.d.ts} +1 -1
  92. package/package.json +1 -1
  93. package/skills/pixerate-vector/SKILL.md +14 -0
  94. package/dist/chunk-HHTCDFZC.js.map +0 -1
  95. package/dist/chunk-Z2H7KECK.cjs.map +0 -1
  96. /package/dist/{chunk-ESIWZMMK.js.map → chunk-6QQR4LKE.js.map} +0 -0
  97. /package/dist/{chunk-OXSV64JX.js.map → chunk-G6IKY6PL.js.map} +0 -0
  98. /package/dist/{chunk-7RJ6P7MI.js.map → chunk-KZXLZCQ7.js.map} +0 -0
  99. /package/dist/{chunk-FWEO3HSL.js.map → chunk-PQQF5KOW.js.map} +0 -0
@@ -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;
2
2
 
3
- var _chunkT6TV6HY6cjs = require('../chunk-T6TV6HY6.cjs');
3
+ var _chunkB2CUCM7Ycjs = require('../chunk-B2CUCM7Y.cjs');
4
4
 
5
5
 
6
6
 
@@ -31,7 +31,8 @@ var _chunkWAJQKWQUcjs = require('../chunk-WAJQKWQU.cjs');
31
31
 
32
32
 
33
33
 
34
- var _chunkZ2H7KECKcjs = require('../chunk-Z2H7KECK.cjs');
34
+ var _chunk2R3UW57Ucjs = require('../chunk-2R3UW57U.cjs');
35
+ require('../chunk-Q6OUXEK3.cjs');
35
36
 
36
37
 
37
38
 
@@ -48,9 +49,11 @@ require('../chunk-IZ4WRXZA.cjs');
48
49
 
49
50
  var _chunkJODTP4DPcjs = require('../chunk-JODTP4DP.cjs');
50
51
  require('../chunk-RIWPYSKU.cjs');
52
+ require('../chunk-FD4LPFAE.cjs');
51
53
 
52
54
 
53
55
  var _chunkEMQWJA3Gcjs = require('../chunk-EMQWJA3G.cjs');
56
+ require('../chunk-MKA3AHLV.cjs');
54
57
 
55
58
 
56
59
  var _chunkQKLRAA4Tcjs = require('../chunk-QKLRAA4T.cjs');
@@ -573,7 +576,7 @@ function smoothMotionTimes(points, start, duration, pacing = "even") {
573
576
  function motionTextLayout(nodes, id) {
574
577
  const group = _optionalChain([nodes, 'access', _5 => _5.get, 'call', _6 => _6(id), 'optionalAccess', _7 => _7.node]);
575
578
  if (!group || group.type !== "group") return null;
576
- const letters = _chunkZ2H7KECKcjs.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);
579
+ const letters = _chunk2R3UW57Ucjs.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);
577
580
  if (!letters.length) return null;
578
581
  const lines = [];
579
582
  for (const l of [...letters].sort((a, c) => a.b.y + a.b.height / 2 - (c.b.y + c.b.height / 2))) {
@@ -658,21 +661,21 @@ function indexMotionNodes(nodes) {
658
661
  const out = /* @__PURE__ */ new Map();
659
662
  const walk = (list, parentWorld, ancestors) => {
660
663
  for (const node of list) {
661
- const local = _chunkZ2H7KECKcjs.vectorNodeBounds.call(void 0, node);
662
- const bounds = _chunkZ2H7KECKcjs.vectorNodeBounds.call(void 0, node, parentWorld);
664
+ const local = _chunk2R3UW57Ucjs.vectorNodeBounds.call(void 0, node);
665
+ const bounds = _chunk2R3UW57Ucjs.vectorNodeBounds.call(void 0, node, parentWorld);
663
666
  const center = local ? { x: local.x + local.width / 2, y: local.y + local.height / 2 } : { x: 0, y: 0 };
664
667
  if (!out.has(node.id)) out.set(node.id, { node, ancestors, parentWorld, center, bounds, box: local });
665
- if (node.type === "group") walk(node.children, _chunkZ2H7KECKcjs.multiplyMatrices.call(void 0, _chunkZ2H7KECKcjs.nodeMatrix.call(void 0, node), parentWorld), [...ancestors, node.id]);
668
+ if (node.type === "group") walk(node.children, _chunk2R3UW57Ucjs.multiplyMatrices.call(void 0, _chunk2R3UW57Ucjs.nodeMatrix.call(void 0, node), parentWorld), [...ancestors, node.id]);
666
669
  }
667
670
  };
668
- walk(nodes, _chunkZ2H7KECKcjs.IDENTITY_MATRIX, []);
671
+ walk(nodes, _chunk2R3UW57Ucjs.IDENTITY_MATRIX, []);
669
672
  indexCache.set(nodes, out);
670
673
  return out;
671
674
  }
672
675
  var solid = (paint) => typeof paint === "string" && paint !== "none" ? paint : void 0;
673
676
  function firstPaint(node, key) {
674
677
  if (node.type === "path") return solid(node[key]);
675
- for (const p of _chunkZ2H7KECKcjs.collectPathNodes.call(void 0, node)) {
678
+ for (const p of _chunk2R3UW57Ucjs.collectPathNodes.call(void 0, node)) {
676
679
  const s = solid(p[key]);
677
680
  if (s) return s;
678
681
  }
@@ -680,7 +683,7 @@ function firstPaint(node, key) {
680
683
  }
681
684
  function strokeReach(node) {
682
685
  let reach = 0;
683
- for (const p of node.type === "path" ? [node] : _chunkZ2H7KECKcjs.collectPathNodes.call(void 0, node)) {
686
+ for (const p of node.type === "path" ? [node] : _chunk2R3UW57Ucjs.collectPathNodes.call(void 0, node)) {
684
687
  if (p.stroke == null || p.stroke === "none") continue;
685
688
  const width = _nullishCoalesce(p.strokeWidth, () => ( 1));
686
689
  reach = Math.max(reach, p.strokeAlign === "outside" ? width : p.strokeAlign === "inside" ? 0 : width / 2);
@@ -750,7 +753,7 @@ function motionRestValue(entry, property, artwork) {
750
753
  case "stroke":
751
754
  return _nullishCoalesce((node && firstPaint(node, property)), () => ( "transparent"));
752
755
  case "strokeWidth": {
753
- const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ? _chunkZ2H7KECKcjs.collectPathNodes.call(void 0, node)[0] : void 0;
756
+ const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ? _chunk2R3UW57Ucjs.collectPathNodes.call(void 0, node)[0] : void 0;
754
757
  return _nullishCoalesce(_optionalChain([path, 'optionalAccess', _14 => _14.strokeWidth]), () => ( 1));
755
758
  }
756
759
  case "shape":
@@ -861,12 +864,12 @@ function resolveMotionCamera(camera, scene) {
861
864
  const r = camera;
862
865
  return { x: r.x, y: r.y, width: r.width, height: r.height };
863
866
  }
864
- function motionPathLength(node, parentWorld = _chunkZ2H7KECKcjs.IDENTITY_MATRIX) {
867
+ function motionPathLength(node, parentWorld = _chunk2R3UW57Ucjs.IDENTITY_MATRIX) {
865
868
  let longest = 0;
866
- const paths = node.type === "path" ? [node] : _chunkZ2H7KECKcjs.collectPathNodes.call(void 0, node);
869
+ const paths = node.type === "path" ? [node] : _chunk2R3UW57Ucjs.collectPathNodes.call(void 0, node);
867
870
  for (const p of paths) {
868
871
  try {
869
- longest = Math.max(longest, _chunkBJTCSLF6cjs.bezierPathLength.call(void 0, _chunkZ2H7KECKcjs.vectorPathWorldBezier.call(void 0, p, parentWorld, { effects: false })));
872
+ longest = Math.max(longest, _chunkBJTCSLF6cjs.bezierPathLength.call(void 0, _chunk2R3UW57Ucjs.vectorPathWorldBezier.call(void 0, p, parentWorld, { effects: false })));
870
873
  } catch (e2) {
871
874
  }
872
875
  }
@@ -1119,12 +1122,12 @@ function compileMotionScene(scene) {
1119
1122
  const order2 = _nullishCoalesce(o.order, () => ( "together"));
1120
1123
  const pace = _nullishCoalesce(o.pace, () => ( "time"));
1121
1124
  if (order2 === "together" && pace === "time") return null;
1122
- const paths = entry.node.type === "path" ? [entry.node] : _chunkZ2H7KECKcjs.collectPathNodes.call(void 0, entry.node);
1125
+ const paths = entry.node.type === "path" ? [entry.node] : _chunk2R3UW57Ucjs.collectPathNodes.call(void 0, entry.node);
1123
1126
  let list = paths.map((p) => {
1124
1127
  const at = nodes.get(p.id);
1125
1128
  let first = { x: 0, y: 0 };
1126
1129
  try {
1127
- const m = _chunkZ2H7KECKcjs.vectorPathWorldBezier.call(void 0, p, _nullishCoalesce(_optionalChain([at, 'optionalAccess', _41 => _41.parentWorld]), () => ( _chunkZ2H7KECKcjs.IDENTITY_MATRIX)), { effects: false })[0];
1130
+ const m = _chunk2R3UW57Ucjs.vectorPathWorldBezier.call(void 0, p, _nullishCoalesce(_optionalChain([at, 'optionalAccess', _41 => _41.parentWorld]), () => ( _chunk2R3UW57Ucjs.IDENTITY_MATRIX)), { effects: false })[0];
1128
1131
  if (m && m.type === "M") first = { x: m.x, y: m.y };
1129
1132
  } catch (e3) {
1130
1133
  }
@@ -1236,17 +1239,17 @@ function compileMotionScene(scene) {
1236
1239
  let dx = _nullishCoalesce(_optionalChain([command3, 'access', _44 => _44.by, 'optionalAccess', _45 => _45.x]), () => ( 0));
1237
1240
  let dy = _nullishCoalesce(_optionalChain([command3, 'access', _46 => _46.by, 'optionalAccess', _47 => _47.y]), () => ( 0));
1238
1241
  if (command3.to) {
1239
- const inv = _chunkZ2H7KECKcjs.invertMatrix.call(void 0, entry.parentWorld);
1240
- const target = _chunkZ2H7KECKcjs.applyMatrix.call(void 0, inv, command3.to);
1242
+ const inv = _chunk2R3UW57Ucjs.invertMatrix.call(void 0, entry.parentWorld);
1243
+ const target = _chunk2R3UW57Ucjs.applyMatrix.call(void 0, inv, command3.to);
1241
1244
  dx = target.x - (entry.center.x + num2("x"));
1242
1245
  dy = target.y - (entry.center.y + num2("y"));
1243
1246
  }
1244
1247
  if (_optionalChain([command3, 'access', _48 => _48.via, 'optionalAccess', _49 => _49.length])) {
1245
- const inv = _chunkZ2H7KECKcjs.invertMatrix.call(void 0, entry.parentWorld);
1248
+ const inv = _chunk2R3UW57Ucjs.invertMatrix.call(void 0, entry.parentWorld);
1246
1249
  const x0 = num2("x");
1247
1250
  const y0 = num2("y");
1248
1251
  const add = command3.blend === "add";
1249
- const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) => _chunkZ2H7KECKcjs.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 }];
1252
+ const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) => _chunk2R3UW57Ucjs.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 }];
1250
1253
  const times = smoothMotionTimes(offsets, start, end - start, _nullishCoalesce(command3.pacing, () => ( "even")));
1251
1254
  for (const axis of ["x", "y"]) {
1252
1255
  const base = add ? 0 : axis === "x" ? x0 : y0;
@@ -1389,13 +1392,13 @@ function morphBetween(a, b) {
1389
1392
  let inner = morphCache.get(a);
1390
1393
  if (!inner) morphCache.set(a, inner = /* @__PURE__ */ new WeakMap());
1391
1394
  let morph = inner.get(b);
1392
- if (!morph) inner.set(b, morph = _chunkT6TV6HY6cjs.createVectorMorph.call(void 0, a, b, { id: a.id }));
1395
+ if (!morph) inner.set(b, morph = _chunkB2CUCM7Ycjs.createVectorMorph.call(void 0, a, b, { id: a.id }));
1393
1396
  return morph;
1394
1397
  }
1395
1398
  function shapeIn(entry, shape) {
1396
1399
  if (shape === entry) return entry.node;
1397
- const m = _chunkZ2H7KECKcjs.multiplyMatrices.call(void 0, _chunkZ2H7KECKcjs.multiplyMatrices.call(void 0, _chunkZ2H7KECKcjs.nodeMatrix.call(void 0, shape.node), shape.parentWorld), _chunkZ2H7KECKcjs.invertMatrix.call(void 0, entry.parentWorld));
1398
- return { ...shape.node, ..._chunkZ2H7KECKcjs.isIdentityMatrix.call(void 0, m) ? { transform: void 0 } : { transform: m } };
1400
+ const m = _chunk2R3UW57Ucjs.multiplyMatrices.call(void 0, _chunk2R3UW57Ucjs.multiplyMatrices.call(void 0, _chunk2R3UW57Ucjs.nodeMatrix.call(void 0, shape.node), shape.parentWorld), _chunk2R3UW57Ucjs.invertMatrix.call(void 0, entry.parentWorld));
1401
+ return { ...shape.node, ..._chunk2R3UW57Ucjs.isIdentityMatrix.call(void 0, m) ? { transform: void 0 } : { transform: m } };
1399
1402
  }
1400
1403
  function shapeAt(entry, timeline, nodes, time) {
1401
1404
  const track = timeline.tracks.get(motionTrackKey(entry.node.id, "shape"));
@@ -1415,7 +1418,7 @@ function shapeAt(entry, timeline, nodes, time) {
1415
1418
  function motionFollowRoute(entry, path) {
1416
1419
  if (!path || path.node.type !== "path") return null;
1417
1420
  try {
1418
- return _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, _chunkZ2H7KECKcjs.vectorPathWorldBezier.call(void 0, path.node, path.parentWorld, { effects: false }), _chunkZ2H7KECKcjs.invertMatrix.call(void 0, entry.parentWorld));
1421
+ return _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, _chunk2R3UW57Ucjs.vectorPathWorldBezier.call(void 0, path.node, path.parentWorld, { effects: false }), _chunk2R3UW57Ucjs.invertMatrix.call(void 0, entry.parentWorld));
1419
1422
  } catch (e4) {
1420
1423
  return null;
1421
1424
  }
@@ -1449,9 +1452,9 @@ function motionNodeOffset(entry, timeline, time, nodes = indexMotionNodes([entry
1449
1452
  const scaleX = read("scaleX", 1);
1450
1453
  const scaleY = read("scaleY", 1);
1451
1454
  const c = entry.center;
1452
- let matrix = _chunkZ2H7KECKcjs.multiplyMatrices.call(void 0, _chunkZ2H7KECKcjs.multiplyMatrices.call(void 0, _chunkZ2H7KECKcjs.scaleMatrix.call(void 0, scaleX, scaleY, c), _chunkZ2H7KECKcjs.rotateMatrix.call(void 0, rotation, c)), _chunkZ2H7KECKcjs.translateMatrix.call(void 0, dx, dy));
1455
+ let matrix = _chunk2R3UW57Ucjs.multiplyMatrices.call(void 0, _chunk2R3UW57Ucjs.multiplyMatrices.call(void 0, _chunk2R3UW57Ucjs.scaleMatrix.call(void 0, scaleX, scaleY, c), _chunk2R3UW57Ucjs.rotateMatrix.call(void 0, rotation, c)), _chunk2R3UW57Ucjs.translateMatrix.call(void 0, dx, dy));
1453
1456
  const along = follow ? followAt(entry, timeline, nodes, time) : null;
1454
- if (along) matrix = _chunkZ2H7KECKcjs.multiplyMatrices.call(void 0, matrix, _chunkZ2H7KECKcjs.multiplyMatrices.call(void 0, _chunkZ2H7KECKcjs.multiplyMatrices.call(void 0, _chunkZ2H7KECKcjs.translateMatrix.call(void 0, -c.x, -c.y), _chunkZ2H7KECKcjs.rotateMatrix.call(void 0, along.angle)), _chunkZ2H7KECKcjs.translateMatrix.call(void 0, along.x, along.y)));
1457
+ if (along) matrix = _chunk2R3UW57Ucjs.multiplyMatrices.call(void 0, matrix, _chunk2R3UW57Ucjs.multiplyMatrices.call(void 0, _chunk2R3UW57Ucjs.multiplyMatrices.call(void 0, _chunk2R3UW57Ucjs.translateMatrix.call(void 0, -c.x, -c.y), _chunk2R3UW57Ucjs.rotateMatrix.call(void 0, along.angle)), _chunk2R3UW57Ucjs.translateMatrix.call(void 0, along.x, along.y)));
1455
1458
  return { matrix, dx, dy, rotation, scaleX, scaleY, follow: along };
1456
1459
  }
1457
1460
  function motionNodeClips(id, timeline, time) {
@@ -1518,7 +1521,7 @@ function motionFrameAt(scene, time, options = {}) {
1518
1521
  const start = Math.min(1, Math.max(0, typeof drawStart === "number" ? drawStart : 0));
1519
1522
  const end = Math.min(1, Math.max(0, typeof drawEnd === "number" ? drawEnd : 1));
1520
1523
  if (start > 0 || end < 1) {
1521
- const trim = _chunkZ2H7KECKcjs.createVectorEffect.call(void 0, "trim", MOTION_DRAW_EFFECT_ID, { start: tidy(start * 100), end: tidy(end * 100) });
1524
+ const trim = _chunk2R3UW57Ucjs.createVectorEffect.call(void 0, "trim", MOTION_DRAW_EFFECT_ID, { start: tidy(start * 100), end: tidy(end * 100) });
1522
1525
  p = { ...p, effects: [trim, ...(_nullishCoalesce(p.effects, () => ( []))).filter((e) => e.id !== MOTION_DRAW_EFFECT_ID)] };
1523
1526
  }
1524
1527
  }
@@ -1532,8 +1535,8 @@ function motionFrameAt(scene, time, options = {}) {
1532
1535
  if (o >= 1) delete out.opacity;
1533
1536
  }
1534
1537
  const offset = options.offsets === false ? null : motionNodeOffset(entry, timeline, time, nodes);
1535
- if (offset && !_chunkZ2H7KECKcjs.isIdentityMatrix.call(void 0, offset.matrix)) {
1536
- const m = _chunkZ2H7KECKcjs.multiplyMatrices.call(void 0, _chunkZ2H7KECKcjs.nodeMatrix.call(void 0, out), offset.matrix).map(tidy);
1538
+ if (offset && !_chunk2R3UW57Ucjs.isIdentityMatrix.call(void 0, offset.matrix)) {
1539
+ const m = _chunk2R3UW57Ucjs.multiplyMatrices.call(void 0, _chunk2R3UW57Ucjs.nodeMatrix.call(void 0, out), offset.matrix).map(tidy);
1537
1540
  out = { ...out, transform: m };
1538
1541
  }
1539
1542
  return out;
@@ -1553,7 +1556,7 @@ function motionFrameToSvg(scene, time, options = {}) {
1553
1556
  const wrap = { ...options.wrap };
1554
1557
  for (const [id, clips] of Object.entries(frame.clips))
1555
1558
  wrap[id] = [..._nullishCoalesce(wrap[id], () => ( [])), ...clips.map((clip, i) => ({ clip: { id: `${prefix}reveal-${id}-${i}`, shape: clip.shape, attrs: motionClipAttrs(clip) } }))];
1556
- return withViewBox(_chunkZ2H7KECKcjs.vectorDocumentToSvg.call(void 0, frame.document, { ...options, wrap }), frame.camera);
1559
+ return withViewBox(_chunk2R3UW57Ucjs.vectorDocumentToSvg.call(void 0, frame.document, { ...options, wrap }), frame.camera);
1557
1560
  }
1558
1561
  function withViewBox(svg, box) {
1559
1562
  const f = (n) => String(Math.round(n * 1e3) / 1e3);
@@ -1736,8 +1739,8 @@ function visibleAt(timeline, id, time, node) {
1736
1739
  if (Array.isArray(rect) && (rect[2] <= 1e-4 || rect[3] <= 1e-4)) return false;
1737
1740
  const circle = clip("clipCircle");
1738
1741
  if (Array.isArray(circle) && circle[2] <= 1e-4) return false;
1739
- const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" : _chunkZ2H7KECKcjs.collectPathNodes.call(void 0, node).some((p) => p.fill && p.fill !== "none");
1740
- const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" || _chunkZ2H7KECKcjs.collectPathNodes.call(void 0, node).length === 0 || _chunkZ2H7KECKcjs.collectPathNodes.call(void 0, node).some((p) => {
1742
+ const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" : _chunk2R3UW57Ucjs.collectPathNodes.call(void 0, node).some((p) => p.fill && p.fill !== "none");
1743
+ const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" || _chunk2R3UW57Ucjs.collectPathNodes.call(void 0, node).length === 0 || _chunk2R3UW57Ucjs.collectPathNodes.call(void 0, node).some((p) => {
1741
1744
  const v = trackValue(timeline.tracks.get(motionTrackKey(p.id, "drawEnd")), time);
1742
1745
  return typeof v !== "number" || v > 0.01;
1743
1746
  }));
@@ -1823,7 +1826,7 @@ function checkMotionScene(scene) {
1823
1826
  }
1824
1827
  for (const id of targets) {
1825
1828
  const node = nodes.get(id).node;
1826
- const paths = node.type === "path" ? [node] : _chunkZ2H7KECKcjs.collectPathNodes.call(void 0, node);
1829
+ const paths = node.type === "path" ? [node] : _chunk2R3UW57Ucjs.collectPathNodes.call(void 0, node);
1827
1830
  if (paths.some((p) => p[key] !== void 0 && p[key] !== null && typeof p[key] !== "string"))
1828
1831
  issues.push(_chunkWAJQKWQUcjs.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] }));
1829
1832
  }
@@ -1836,7 +1839,7 @@ function checkMotionScene(scene) {
1836
1839
  else
1837
1840
  for (const id of targets) {
1838
1841
  const node = nodes.get(id).node;
1839
- const paths = node.type === "path" ? [node] : _chunkZ2H7KECKcjs.collectPathNodes.call(void 0, node);
1842
+ const paths = node.type === "path" ? [node] : _chunk2R3UW57Ucjs.collectPathNodes.call(void 0, node);
1840
1843
  if (paths.some((p) => typeof p[key] !== "string"))
1841
1844
  issues.push(_chunkWAJQKWQUcjs.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] }));
1842
1845
  }
@@ -2420,7 +2423,7 @@ function toFlairSvgMotion(scene, options = {}) {
2420
2423
  raw: (t) => transformAt(t, true)
2421
2424
  });
2422
2425
  }
2423
- const paths = node.type === "path" ? [node] : _chunkZ2H7KECKcjs.collectPathNodes.call(void 0, node);
2426
+ const paths = node.type === "path" ? [node] : _chunk2R3UW57Ucjs.collectPathNodes.call(void 0, node);
2424
2427
  for (const path of paths) {
2425
2428
  if (pathsSeen.has(path.id)) continue;
2426
2429
  pathsSeen.add(path.id);
@@ -2442,7 +2445,7 @@ function toFlairSvgMotion(scene, options = {}) {
2442
2445
  if (shapeSegments.length) {
2443
2446
  if (node.type !== "path") notes.push(`"${id}" is a group: its morph or effect animation is not exported (Flair tweens one path's "d").`);
2444
2447
  else {
2445
- const inverse = _chunkZ2H7KECKcjs.invertMatrix.call(void 0, _chunkZ2H7KECKcjs.nodeMatrix.call(void 0, node));
2448
+ const inverse = _chunk2R3UW57Ucjs.invertMatrix.call(void 0, _chunk2R3UW57Ucjs.nodeMatrix.call(void 0, node));
2446
2449
  channels.push({
2447
2450
  id,
2448
2451
  kind: "attr",
@@ -2451,9 +2454,9 @@ function toFlairSvgMotion(scene, options = {}) {
2451
2454
  exact: () => false,
2452
2455
  value: (t) => {
2453
2456
  const frame = motionFrameAt(scene, t, { draw: false, offsets: false });
2454
- const now = _chunkZ2H7KECKcjs.expandVectorAppearance.call(void 0, _optionalChain([indexMotionNodes, 'call', _108 => _108(frame.document.nodes), 'access', _109 => _109.get, 'call', _110 => _110(id), 'optionalAccess', _111 => _111.node]));
2457
+ const now = _chunk2R3UW57Ucjs.expandVectorAppearance.call(void 0, _optionalChain([indexMotionNodes, 'call', _108 => _108(frame.document.nodes), 'access', _109 => _109.get, 'call', _110 => _110(id), 'optionalAccess', _111 => _111.node]));
2455
2458
  if (!now || now.type !== "path") return "";
2456
- const bezier = _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, _chunkZ2H7KECKcjs.vectorPathWorldBezier.call(void 0, now, _chunkZ2H7KECKcjs.IDENTITY_MATRIX, { effects: false }), inverse);
2459
+ const bezier = _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, _chunk2R3UW57Ucjs.vectorPathWorldBezier.call(void 0, now, _chunk2R3UW57Ucjs.IDENTITY_MATRIX, { effects: false }), inverse);
2457
2460
  return _chunkBJTCSLF6cjs.bezierPathToSvg.call(void 0, bezier, { precision: Math.min(precision, 2) });
2458
2461
  }
2459
2462
  });
@@ -2560,7 +2563,7 @@ function toFlairSvgMotion(scene, options = {}) {
2560
2563
  }
2561
2564
  if (scene.motionBlur) notes.push("Motion blur is drawn on the stage only; Flair plays the scene sharp.");
2562
2565
  if (trigger && (_nullishCoalesce(scene.loop, () => ( "none"))) !== "none") notes.push(`The scene plays on ${trigger}, so its loop does not apply in Flair.`);
2563
- let svg = _chunkZ2H7KECKcjs.vectorDocumentToSvg.call(void 0, { ...scene.artwork, nodes: _chunkZ2H7KECKcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) }, { pretty: false, precision, wrap });
2566
+ let svg = _chunk2R3UW57Ucjs.vectorDocumentToSvg.call(void 0, { ...scene.artwork, nodes: _chunk2R3UW57Ucjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) }, { pretty: false, precision, wrap });
2564
2567
  if (routes.length) svg = svg.replace(/^(<svg[^>]*>)/, `$1<defs>${routes.join("")}</defs>`);
2565
2568
  let motion = { svg, animate };
2566
2569
  if (_optionalChain([scene, 'access', _114 => _114.controls, 'optionalAccess', _115 => _115.length])) {
@@ -2644,14 +2647,14 @@ function easingOf(ease, fallback) {
2644
2647
  return fallback;
2645
2648
  }
2646
2649
  function poseOf(value, entry) {
2647
- const t = _chunkZ2H7KECKcjs.parseSvgTransform.call(void 0, String(value));
2648
- const o = _chunkZ2H7KECKcjs.multiplyMatrices.call(void 0, _nullishCoalesce(_chunkZ2H7KECKcjs.invertMatrix.call(void 0, _chunkZ2H7KECKcjs.nodeMatrix.call(void 0, entry.node)), () => ( [1, 0, 0, 1, 0, 0])), t);
2650
+ const t = _chunk2R3UW57Ucjs.parseSvgTransform.call(void 0, String(value));
2651
+ const o = _chunk2R3UW57Ucjs.multiplyMatrices.call(void 0, _nullishCoalesce(_chunk2R3UW57Ucjs.invertMatrix.call(void 0, _chunk2R3UW57Ucjs.nodeMatrix.call(void 0, entry.node)), () => ( [1, 0, 0, 1, 0, 0])), t);
2649
2652
  const sx = Math.hypot(o[0], o[1]);
2650
2653
  if (!(sx > 1e-9)) return null;
2651
2654
  const sy = (o[0] * o[3] - o[1] * o[2]) / sx;
2652
2655
  if (Math.abs(o[2] + o[1] / sx * sy) > 1e-6 || Math.abs(o[3] - o[0] / sx * sy) > 1e-6) return null;
2653
2656
  const c = entry.center;
2654
- const moved = _chunkZ2H7KECKcjs.applyMatrix.call(void 0, o, c);
2657
+ const moved = _chunk2R3UW57Ucjs.applyMatrix.call(void 0, o, c);
2655
2658
  return { dx: moved.x - c.x, dy: moved.y - c.y, rotation: Math.atan2(o[1], o[0]) * 180 / Math.PI, sx, sy };
2656
2659
  }
2657
2660
  var near = (a, b, eps = 1e-6) => Math.abs(a - b) < eps;
@@ -2736,7 +2739,7 @@ function fromFlairSvgMotion(input, options = {}) {
2736
2739
  const notes = [];
2737
2740
  if (!input || typeof input.svg !== "string") throw new Error('Give a Flair SvgMotion: { svg: "<svg \u2026>", animate: [ \u2026 ] }.');
2738
2741
  const { motion, controls } = resolvePlaceholders(input, notes);
2739
- const artwork = _chunkZ2H7KECKcjs.parseVectorSvg.call(void 0, motion.svg);
2742
+ const artwork = _chunk2R3UW57Ucjs.parseVectorSvg.call(void 0, motion.svg);
2740
2743
  const nodes = indexMotionNodes(artwork.nodes);
2741
2744
  const byStep = /* @__PURE__ */ new Map();
2742
2745
  for (const anim of _nullishCoalesce(motion.animate, () => ( []))) {
@@ -2983,9 +2986,9 @@ function toLottie(scene, options = {}) {
2983
2986
  const items = [];
2984
2987
  const shapeSegments = [...timeline.tracks.entries()].filter(([k]) => k.startsWith(`${path.id}\0`) && (k.endsWith("\0shape") || k.includes("\0effect:"))).flatMap(([, v]) => v);
2985
2988
  const geometryAt = (t) => {
2986
- if (!shapeSegments.length) return _chunkZ2H7KECKcjs.vectorPathWorldBezier.call(void 0, path);
2989
+ if (!shapeSegments.length) return _chunk2R3UW57Ucjs.vectorPathWorldBezier.call(void 0, path);
2987
2990
  const now = _optionalChain([indexMotionNodes, 'call', _124 => _124(motionFrameAt(scene, t, { draw: false, offsets: false }).document.nodes), 'access', _125 => _125.get, 'call', _126 => _126(path.id), 'optionalAccess', _127 => _127.node]);
2988
- return now && now.type === "path" ? _chunkZ2H7KECKcjs.vectorPathWorldBezier.call(void 0, _chunkZ2H7KECKcjs.expandVectorAppearances.call(void 0, [now])[0]) : _chunkZ2H7KECKcjs.vectorPathWorldBezier.call(void 0, path);
2991
+ return now && now.type === "path" ? _chunk2R3UW57Ucjs.vectorPathWorldBezier.call(void 0, _chunk2R3UW57Ucjs.expandVectorAppearances.call(void 0, [now])[0]) : _chunk2R3UW57Ucjs.vectorPathWorldBezier.call(void 0, path);
2989
2992
  };
2990
2993
  const rest = lottieContours(_chunkBJTCSLF6cjs.toBezierPath.call(void 0, geometryAt(0)), round2);
2991
2994
  rest.forEach((contour, n) => {
@@ -3058,13 +3061,13 @@ function toLottie(scene, options = {}) {
3058
3061
  const innerTr = STATIC_TR();
3059
3062
  if (node.type === "path") inner = [...pathShapes(node)];
3060
3063
  else if (node.type === "text" || node.type === "instance") {
3061
- const drawn = _chunkZ2H7KECKcjs.expandVectorAppearance.call(void 0, node);
3064
+ const drawn = _chunk2R3UW57Ucjs.expandVectorAppearance.call(void 0, node);
3062
3065
  inner = drawn.type === "path" ? [...pathShapes(drawn)] : drawn.children.filter((c) => c.type === "path").reverse().flatMap((c) => [...pathShapes(c)]);
3063
- notes.push(`"${node.id}": text is exported as its outlines${_chunkZ2H7KECKcjs.vectorTextHasOutlines.call(void 0, ) ? "" : " (glyph boxes: set an outline text shaper for real glyphs)"}.`);
3066
+ notes.push(`"${node.id}": text is exported as its outlines${_chunk2R3UW57Ucjs.vectorTextHasOutlines.call(void 0, ) ? "" : " (glyph boxes: set an outline text shaper for real glyphs)"}.`);
3064
3067
  } else {
3065
3068
  inner = shown(node.children).reverse().map(nodeGroup);
3066
- const m = _chunkZ2H7KECKcjs.nodeMatrix.call(void 0, node);
3067
- if (m !== _chunkZ2H7KECKcjs.IDENTITY_MATRIX) {
3069
+ const m = _chunk2R3UW57Ucjs.nodeMatrix.call(void 0, node);
3070
+ if (m !== _chunk2R3UW57Ucjs.IDENTITY_MATRIX) {
3068
3071
  const parts = staticParts(m);
3069
3072
  if (!parts) notes.push(`"${node.id}": its transform skews, which is not exported; it is drawn without the skew.`);
3070
3073
  else {
@@ -3077,7 +3080,7 @@ function toLottie(scene, options = {}) {
3077
3080
  const body = { ty: "gr", nm: `${node.id} (own)`, it: [...inner, innerTr] };
3078
3081
  return { ty: "gr", nm: _nullishCoalesce(node.name, () => ( node.id)), it: [body, poseTransform(entry)] };
3079
3082
  };
3080
- const artwork = { ...scene.artwork, nodes: _chunkZ2H7KECKcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) };
3083
+ const artwork = { ...scene.artwork, nodes: _chunk2R3UW57Ucjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) };
3081
3084
  const content = shown(artwork.nodes).reverse().map(nodeGroup);
3082
3085
  if (artwork.background && rgba(artwork.background))
3083
3086
  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(round2) }, o: { a: 0, k: 100 }, r: 1 }, STATIC_TR()] });
@@ -3176,11 +3179,11 @@ function preset(prst, w, h) {
3176
3179
  const poly = (pts) => [{ closed: true, anchors: pts.map(([x, y]) => ({ x, y })) }];
3177
3180
  switch (prst) {
3178
3181
  case "rect":
3179
- return [_chunkZ2H7KECKcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
3182
+ return [_chunk2R3UW57Ucjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
3180
3183
  case "roundRect":
3181
- return [_chunkZ2H7KECKcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h }, Math.min(w, h) * 0.16667)];
3184
+ return [_chunk2R3UW57Ucjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h }, Math.min(w, h) * 0.16667)];
3182
3185
  case "ellipse":
3183
- return [_chunkZ2H7KECKcjs.ellipseSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
3186
+ return [_chunk2R3UW57Ucjs.ellipseSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
3184
3187
  case "triangle":
3185
3188
  return poly([[w / 2, 0], [w, h], [0, h]]);
3186
3189
  case "rtTriangle":
@@ -3288,7 +3291,7 @@ function shapes(ctx, tree, map) {
3288
3291
  let subpaths = cust ? custom(cust, w, h) : prst ? preset(prst, w, h) : null;
3289
3292
  if (!subpaths) {
3290
3293
  if (prst) ctx.notes.push(`"${name}" is a ${prst}, drawn as its bounding rectangle.`);
3291
- subpaths = [_chunkZ2H7KECKcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
3294
+ subpaths = [_chunk2R3UW57Ucjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
3292
3295
  }
3293
3296
  const style = kid(el, "style");
3294
3297
  const fill = kid(spPr, "noFill") ? null : _nullishCoalesce(colour(ctx, kid(spPr, "solidFill")), () => ( (el.localName === "cxnSp" ? null : colour(ctx, kid(style, "fillRef")))));
@@ -3526,7 +3529,7 @@ function nextMotionEffectInstance(scene) {
3526
3529
  walk(scene.artwork.nodes);
3527
3530
  for (let i = 1; ; i++) if (!used.has(`fx${i}`)) return `fx${i}`;
3528
3531
  }
3529
- var motionArtworkSvg = (artwork) => _chunkZ2H7KECKcjs.vectorDocumentToSvg.call(void 0, artwork);
3532
+ var motionArtworkSvg = (artwork) => _chunk2R3UW57Ucjs.vectorDocumentToSvg.call(void 0, artwork);
3530
3533
  var tag = (commands, source) => commands.map((c) => c.type === "wait" ? c : { ...c, source });
3531
3534
  function motionCommandsFromEffect(artwork, motion, source) {
3532
3535
  const imported = fromFlairSvgMotion({ svg: motionArtworkSvg(artwork), animate: [..._nullishCoalesce(motion.animate, () => ( []))] });
@@ -4511,7 +4514,7 @@ function createAnimationEditorToolProvider(controller, options = {}) {
4511
4514
  handler: ({ svg }) => {
4512
4515
  let artwork;
4513
4516
  try {
4514
- artwork = _chunkZ2H7KECKcjs.parseVectorSvg.call(void 0, svg);
4517
+ artwork = _chunk2R3UW57Ucjs.parseVectorSvg.call(void 0, svg);
4515
4518
  } catch (error) {
4516
4519
  throw new Error(`The SVG could not be read: ${error.message}. Nothing was changed.`);
4517
4520
  }