@pixerate/editor 0.115.0 → 0.116.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 (117) hide show
  1. package/THIRD_PARTY_NOTICES.md +3 -0
  2. package/dist/animation-editor/index.cjs +54 -54
  3. package/dist/animation-editor/index.d.cts +2 -2
  4. package/dist/animation-editor/index.d.ts +2 -2
  5. package/dist/animation-editor/index.js +2 -2
  6. package/dist/{chunk-DFQEX3AM.cjs → chunk-2UT4GXYA.cjs} +133 -8
  7. package/dist/chunk-2UT4GXYA.cjs.map +1 -0
  8. package/dist/{chunk-VXR7XWMF.js → chunk-7LNZAWSJ.js} +437 -41
  9. package/dist/chunk-7LNZAWSJ.js.map +1 -0
  10. package/dist/{chunk-LKCYANMW.js → chunk-ARQ7PQ6Q.js} +129 -4
  11. package/dist/chunk-ARQ7PQ6Q.js.map +1 -0
  12. package/dist/chunk-COAMRKVI.cjs +159 -0
  13. package/dist/chunk-COAMRKVI.cjs.map +1 -0
  14. package/dist/{chunk-C6C5PDKU.js → chunk-D53KSJUV.js} +3 -322
  15. package/dist/chunk-D53KSJUV.js.map +1 -0
  16. package/dist/chunk-D53VQGEJ.js +3262 -0
  17. package/dist/chunk-D53VQGEJ.js.map +1 -0
  18. package/dist/chunk-EJVDBITD.cjs +501 -0
  19. package/dist/chunk-EJVDBITD.cjs.map +1 -0
  20. package/dist/{chunk-LPLCWZTM.cjs → chunk-FODKPD44.cjs} +555 -159
  21. package/dist/chunk-FODKPD44.cjs.map +1 -0
  22. package/dist/chunk-HOCPSFGA.cjs +3262 -0
  23. package/dist/chunk-HOCPSFGA.cjs.map +1 -0
  24. package/dist/chunk-IPFRWILU.js +1908 -0
  25. package/dist/chunk-IPFRWILU.js.map +1 -0
  26. package/dist/{chunk-FV5AXTSF.cjs → chunk-JSSBHMMU.cjs} +36 -188
  27. package/dist/chunk-JSSBHMMU.cjs.map +1 -0
  28. package/dist/chunk-LF4WOZXZ.js +159 -0
  29. package/dist/chunk-LF4WOZXZ.js.map +1 -0
  30. package/dist/{chunk-26PGXHY7.cjs → chunk-M7O4BJRH.cjs} +36 -36
  31. package/dist/{chunk-26PGXHY7.cjs.map → chunk-M7O4BJRH.cjs.map} +1 -1
  32. package/dist/chunk-N3467VD6.js +501 -0
  33. package/dist/chunk-N3467VD6.js.map +1 -0
  34. package/dist/{chunk-ST7E3NEE.cjs → chunk-PAOWHJ5O.cjs} +18 -337
  35. package/dist/chunk-PAOWHJ5O.cjs.map +1 -0
  36. package/dist/{chunk-XICA4PVO.js → chunk-SEBYNBHW.js} +10 -10
  37. package/dist/chunk-SMJGE7HM.cjs +1908 -0
  38. package/dist/chunk-SMJGE7HM.cjs.map +1 -0
  39. package/dist/{chunk-MMVHBKMM.js → chunk-T2P5TIZ6.js} +2 -2
  40. package/dist/{chunk-FGW5OWJ4.js → chunk-VJUML33I.js} +4 -156
  41. package/dist/chunk-VJUML33I.js.map +1 -0
  42. package/dist/{chunk-I7FQBWMQ.cjs → chunk-ZYZGEILO.cjs} +239 -239
  43. package/dist/{chunk-I7FQBWMQ.cjs.map → chunk-ZYZGEILO.cjs.map} +1 -1
  44. package/dist/export/index.cjs +4 -2
  45. package/dist/export/index.cjs.map +1 -1
  46. package/dist/export/index.js +5 -3
  47. package/dist/{export-BJE8T0YA.d.cts → export-BXxSGBCq.d.cts} +2 -2
  48. package/dist/{export-Con3UKkm.d.ts → export-Dm44YUvS.d.ts} +2 -2
  49. package/dist/export-Dv0-ZVrV.d.cts +501 -0
  50. package/dist/export-Dv0-ZVrV.d.ts +501 -0
  51. package/dist/{retouch-Do6tBs2H.d.ts → flow-BMtHAmg4.d.ts} +561 -2
  52. package/dist/{retouch-Bxkuc0KH.d.cts → flow-COCB42TP.d.cts} +561 -2
  53. package/dist/image-editor/index.cjs +957 -795
  54. package/dist/image-editor/index.cjs.map +1 -1
  55. package/dist/image-editor/index.d.cts +6 -6
  56. package/dist/image-editor/index.d.ts +6 -6
  57. package/dist/image-editor/index.js +180 -18
  58. package/dist/image-editor/index.js.map +1 -1
  59. package/dist/index.cjs +4 -2
  60. package/dist/index.cjs.map +1 -1
  61. package/dist/index.js +5 -3
  62. package/dist/index.js.map +1 -1
  63. package/dist/kernel-wasm-WYCGNZR4.js +10 -0
  64. package/dist/kernel-wasm-WYCGNZR4.js.map +1 -0
  65. package/dist/kernel-wasm-YPVAEMVN.cjs +10 -0
  66. package/dist/kernel-wasm-YPVAEMVN.cjs.map +1 -0
  67. package/dist/paint/index.cjs +165 -3
  68. package/dist/paint/index.cjs.map +1 -1
  69. package/dist/paint/index.d.cts +225 -3
  70. package/dist/paint/index.d.ts +225 -3
  71. package/dist/paint/index.js +166 -4
  72. package/dist/paint-editor/index.cjs +4690 -845
  73. package/dist/paint-editor/index.cjs.map +1 -1
  74. package/dist/paint-editor/index.d.cts +1525 -277
  75. package/dist/paint-editor/index.d.ts +1525 -277
  76. package/dist/paint-editor/index.js +4560 -715
  77. package/dist/paint-editor/index.js.map +1 -1
  78. package/dist/raster/index.cjs +4 -3
  79. package/dist/raster/index.cjs.map +1 -1
  80. package/dist/raster/index.js +10 -9
  81. package/dist/{svg-BnRj0q8i.d.cts → svg-CVdFc80-.d.cts} +2 -2
  82. package/dist/{svg-CmmBFfGT.d.ts → svg-DlEuhwoX.d.ts} +2 -2
  83. package/dist/{types-1SUQKDAw.d.ts → types-CDLGhAZp.d.ts} +40 -2
  84. package/dist/{types-yINF17Ta.d.cts → types-Tfly4Aya.d.cts} +40 -2
  85. package/dist/vector/index.cjs +1897 -975
  86. package/dist/vector/index.cjs.map +1 -1
  87. package/dist/vector/index.d.cts +292 -32
  88. package/dist/vector/index.d.ts +292 -32
  89. package/dist/vector/index.js +928 -6
  90. package/dist/vector/index.js.map +1 -1
  91. package/dist/video-editor/index.cjs +502 -2165
  92. package/dist/video-editor/index.cjs.map +1 -1
  93. package/dist/video-editor/index.d.cts +3 -501
  94. package/dist/video-editor/index.d.ts +3 -501
  95. package/dist/video-editor/index.js +151 -1814
  96. package/dist/video-editor/index.js.map +1 -1
  97. package/package.json +1 -1
  98. package/skills/pixerate-image-editor/references/photoshop-files.md +7 -3
  99. package/skills/pixerate-vector/SKILL.md +3 -0
  100. package/dist/chunk-C6C5PDKU.js.map +0 -1
  101. package/dist/chunk-DFQEX3AM.cjs.map +0 -1
  102. package/dist/chunk-FGW5OWJ4.js.map +0 -1
  103. package/dist/chunk-FV5AXTSF.cjs.map +0 -1
  104. package/dist/chunk-GX332W2C.js +0 -181
  105. package/dist/chunk-GX332W2C.js.map +0 -1
  106. package/dist/chunk-LKCYANMW.js.map +0 -1
  107. package/dist/chunk-LPLCWZTM.cjs.map +0 -1
  108. package/dist/chunk-MUUXNRU4.cjs +0 -181
  109. package/dist/chunk-MUUXNRU4.cjs.map +0 -1
  110. package/dist/chunk-ST7E3NEE.cjs.map +0 -1
  111. package/dist/chunk-TCKIXI46.cjs +0 -1136
  112. package/dist/chunk-TCKIXI46.cjs.map +0 -1
  113. package/dist/chunk-UBIXVXPR.js +0 -1136
  114. package/dist/chunk-UBIXVXPR.js.map +0 -1
  115. package/dist/chunk-VXR7XWMF.js.map +0 -1
  116. /package/dist/{chunk-XICA4PVO.js.map → chunk-SEBYNBHW.js.map} +0 -0
  117. /package/dist/{chunk-MMVHBKMM.js.map → chunk-T2P5TIZ6.js.map} +0 -0
@@ -12,6 +12,7 @@ reproduced at the end of this file. Paths are relative to each source repository
12
12
 
13
13
  © 2026 ArtCraft Team and the CadCraft contributors.
14
14
 
15
+ - `crates/io/src/pdf.rs` (a minimal PDF writer of our own: numbered objects, the cross-reference table, Flate-compressed content streams of `m` / `l` / `c` / `h` paths filled and stroked in RGB with line settings) → `packages/core/src/vector/pdf.ts` (`vectorDocumentToPdf`), drawing the vector scene render data, with a page per artboard; test cases our own → `packages/core/tests/vector-pdf.test.ts`
15
16
  - `crates/engine/src/snap/tracking.rs` (`polar_angles`, `MAX_ACQUIRED`, `DWELL`, `Tracker::toggle` / `hover` / `paths` / `find`: acquired points sending alignment paths and an endpoint's extension, then a crossing of two paths, a path crossing the drawing, or the nearest path) and its direct distance entry → `vectorPolarAngles`, `vectorTrackingPaths` and tracking in `snapFrom` in `packages/core/src/vector/snap.ts`, and `acquireTrackingPoint`, `placePenPoint` and `addPathByDimensions` in `packages/core/src/vector/controller.ts`; parallel and apparent-intersection tracking are not ported; test cases re-expressed → `packages/core/tests/vector-tracking.test.ts`
16
17
  - `crates/engine/src/spatial.rs` (an R-tree over object bounds used by picking, window selection and snaps, built only above 256 objects, reused while the content is the same and rebuilt from unchanged parts after an edit, returning candidates in draw order for the same exact tests a scan runs) → the approach of `VectorRTree`, `vectorSpatialIndex` and `vectorNodesNear` in `packages/core/src/vector/spatial.ts`, used by `hitTestVectorNodes`, marquee selection and snapping to segments; the tree is our own sort-tile-recursive packing (cadcraft uses the `rstar` crate), and unchanged parts are reused by caching each node's bounds by node object; parity tests are our own → `packages/core/tests/vector-spatial.test.ts`
17
18
  - `crates/constraints/src/lm.rs` (damped, weighted minimum-norm Gauss–Newton with a numerical Jacobian, `Δx = −W⁻¹Jᵀ(JW⁻¹Jᵀ + μI)⁻¹r`; Gaussian elimination with partial pivoting; Householder QR with column pivoting on row- and column-balanced matrices for rank and null space), `lib.rs` (constraints grouped into connected components, edited geometry weighted to move least, conflicts located by leaving each constraint out, new constraints refused when they do not raise the Jacobian's rank or when a Fix locks parameters already determined), `residual.rs` (the residual forms: point–point, point on line or circle, collinear, parallel, perpendicular, horizontal / vertical, tangent line–circle and circle–circle, symmetric, equal, distance along an axis, angle with its orientation from the starting geometry, radius, diameter), `dof.rs` (remaining degrees of freedom per component, per object by the null space restricted to its parameters, statuses), `auto.rs` (`infer`: coincident points, concentric and tangent circles, horizontal / vertical lines, collinear, connected perpendicular and parallel pairs, equal lengths and radii, in that order) and `expr.rs` (named expressions with `+ - * /`, parentheses and `pi`, evaluated lazily with cycle detection) → `packages/core/src/vector/constraints/lm.ts`, `solve.ts`, `auto.ts` and `expr.ts`; entities and handles became our anchors with stable ids, segments, handles, G1 / G2 joints at anchors and round closed paths, angle-type residuals are scaled to lengths so one tolerance fits all rows, and a solve after every edit weights what changed since the last solve; test cases re-expressed → `packages/core/tests/vector-constraints.test.ts`
@@ -52,6 +53,7 @@ reproduced at the end of this file. Paths are relative to each source repository
52
53
 
53
54
  © 2026 ArtCraft Team and the EffectCraft contributors.
54
55
 
56
+ - `crates/lottie/src/shapes.rs` (`export_items` / `import_items`: shape items `gr`, `rc`, `el`, `sr`, `sh`, `fl`, `st`, `gf`, `gs`, `tm`, `rp`, `rd`, `op`, `pb`, `tw`, `zz`, `mm`, `tr`, stroke fields and dashes, flat gradient stops) and `anim.rs` (keyframed values and bezier easing) → `packages/core/src/vector/lottie.ts`, mapping onto our path effects so they stay live both ways and reading one frame of an animation (layers, parenting, precomps, additive masks); test cases re-expressed → `packages/core/tests/vector-lottie.test.ts`
55
57
  - `crates/path/src/trace.rs` (`trace`, `contours`: marching squares at pixel centres with interpolated crossings, saddles by the cell mean and a padded field so contours close; Douglas–Peucker; minimum area; nesting depth) → `packages/core/src/vector/trace.ts`, fitted with our `fitCubics` instead of its per-span cubics, plus median-cut colour tracing stacked by coverage; test cases our own → `packages/core/tests/vector-trace.test.ts`
56
58
  - `crates/pdf/src/shading.rs` (`patches`: Coons and tensor-product patch meshes, PDF shading types 6 and 7, tessellated into small cells whose colours blend between the patch's corners) → gradient meshes in `packages/core/src/vector/shading.ts` (`vectorMeshPointAt`, `vectorMeshColorAt`, `vectorShadedSvgDefs`), the patch sides being Catmull-Rom curves through the lattice and the cells drawn as SVG pattern tiles; test cases our own → `packages/core/tests/vector-shading.test.ts`
57
59
  - `crates/path/src/varstroke.rs` (`outline`: a variable-width stroke as the union of positively wound trapezoids per flattened segment, round wedges at bends and the caps, filled non-zero; `flatten` with a width-sampling step; `dash_intervals`; `width_factor` with the `Taper` lengths, widths and quarter-circle `ease` and the `Wave` amount, cycles and phase) → `variableStrokeRings` / `variableStrokeOutline` / `dashIntervals` in `packages/core/src/vector/varstroke.ts` and `taperWaveFactor` / `generateWidthProfile` in `packages/core/src/vector/width.ts`; the pieces are emitted as the boundary they add up to (offset sides, outer joins, inner sides trimmed at the offsets' crossing or routed through the centre) instead of being unioned one by one, and the result is refitted with cubics; test cases re-expressed → `packages/core/tests/vector-width.test.ts`
@@ -167,6 +169,7 @@ GridCraft. Apache POI is © The Apache Software Foundation, licensed under the A
167
169
 
168
170
  © 2026 ArtCraft Team and the PDFCraft contributors.
169
171
 
172
+ - `crates/content/src/lib.rs` (content stream operators: `q` / `Q`, `cm`, `W n` / `W* n` clipping, `gs` graphics states, `sh` shadings) → `packages/core/src/vector/pdf.ts`: opacity and blend modes as ExtGStates, clip masks and aligned strokes as clipping paths, linear and radial gradients as axial and radial shadings with stitched functions
170
173
  - `crates/compare/src/lib.rs` (`diff` with common prefix/suffix stripping, `myers` keeping only the −d..d frontier, patience `anchors` with longest increasing subsequence, recursion depth limit, grouping into inserted/deleted/replaced) → `packages/core/src/compare/diff.ts`
171
174
  - Test cases from the file above (`long_documents_with_scattered_edits`, `very_different_documents_finish`, `insertions_deletions_and_replacements`), re-expressed → `packages/core/tests/compare-diff.test.ts`
172
175
  - `crates/export/src/lib.rs` (`body_size`: body text size by character count; `level`: heading levels relative to it, bold body-size headings; `tables`: grid columns from aligned cell edges, rows from overlapping spans, spanning header and totals rows next to a run, the 63-column cap) → `packages/core/src/import/pdf-layout.ts`
@@ -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 _chunk26PGXHY7cjs = require('../chunk-26PGXHY7.cjs');
3
+ var _chunkM7O4BJRHcjs = require('../chunk-M7O4BJRH.cjs');
4
4
 
5
5
 
6
6
 
@@ -31,7 +31,7 @@ var _chunkWAJQKWQUcjs = require('../chunk-WAJQKWQU.cjs');
31
31
 
32
32
 
33
33
 
34
- var _chunkLPLCWZTMcjs = require('../chunk-LPLCWZTM.cjs');
34
+ var _chunkFODKPD44cjs = require('../chunk-FODKPD44.cjs');
35
35
 
36
36
 
37
37
 
@@ -559,7 +559,7 @@ function smoothMotionTimes(points, start, duration, pacing = "even") {
559
559
  function motionTextLayout(nodes, id) {
560
560
  const group = _optionalChain([nodes, 'access', _5 => _5.get, 'call', _6 => _6(id), 'optionalAccess', _7 => _7.node]);
561
561
  if (!group || group.type !== "group") return null;
562
- const letters = _chunkLPLCWZTMcjs.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);
562
+ const letters = _chunkFODKPD44cjs.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);
563
563
  if (!letters.length) return null;
564
564
  const lines = [];
565
565
  for (const l of [...letters].sort((a, c) => a.b.y + a.b.height / 2 - (c.b.y + c.b.height / 2))) {
@@ -644,21 +644,21 @@ function indexMotionNodes(nodes) {
644
644
  const out = /* @__PURE__ */ new Map();
645
645
  const walk = (list, parentWorld, ancestors) => {
646
646
  for (const node of list) {
647
- const local = _chunkLPLCWZTMcjs.vectorNodeBounds.call(void 0, node);
648
- const bounds = _chunkLPLCWZTMcjs.vectorNodeBounds.call(void 0, node, parentWorld);
647
+ const local = _chunkFODKPD44cjs.vectorNodeBounds.call(void 0, node);
648
+ const bounds = _chunkFODKPD44cjs.vectorNodeBounds.call(void 0, node, parentWorld);
649
649
  const center = local ? { x: local.x + local.width / 2, y: local.y + local.height / 2 } : { x: 0, y: 0 };
650
650
  if (!out.has(node.id)) out.set(node.id, { node, ancestors, parentWorld, center, bounds, box: local });
651
- if (node.type === "group") walk(node.children, _chunkLPLCWZTMcjs.multiplyMatrices.call(void 0, _chunkLPLCWZTMcjs.nodeMatrix.call(void 0, node), parentWorld), [...ancestors, node.id]);
651
+ if (node.type === "group") walk(node.children, _chunkFODKPD44cjs.multiplyMatrices.call(void 0, _chunkFODKPD44cjs.nodeMatrix.call(void 0, node), parentWorld), [...ancestors, node.id]);
652
652
  }
653
653
  };
654
- walk(nodes, _chunkLPLCWZTMcjs.IDENTITY_MATRIX, []);
654
+ walk(nodes, _chunkFODKPD44cjs.IDENTITY_MATRIX, []);
655
655
  indexCache.set(nodes, out);
656
656
  return out;
657
657
  }
658
658
  var solid = (paint) => typeof paint === "string" && paint !== "none" ? paint : void 0;
659
659
  function firstPaint(node, key) {
660
660
  if (node.type === "path") return solid(node[key]);
661
- for (const p of _chunkLPLCWZTMcjs.collectPathNodes.call(void 0, node)) {
661
+ for (const p of _chunkFODKPD44cjs.collectPathNodes.call(void 0, node)) {
662
662
  const s = solid(p[key]);
663
663
  if (s) return s;
664
664
  }
@@ -666,7 +666,7 @@ function firstPaint(node, key) {
666
666
  }
667
667
  function strokeReach(node) {
668
668
  let reach = 0;
669
- for (const p of node.type === "path" ? [node] : _chunkLPLCWZTMcjs.collectPathNodes.call(void 0, node)) {
669
+ for (const p of node.type === "path" ? [node] : _chunkFODKPD44cjs.collectPathNodes.call(void 0, node)) {
670
670
  if (p.stroke == null || p.stroke === "none") continue;
671
671
  const width = _nullishCoalesce(p.strokeWidth, () => ( 1));
672
672
  reach = Math.max(reach, p.strokeAlign === "outside" ? width : p.strokeAlign === "inside" ? 0 : width / 2);
@@ -736,7 +736,7 @@ function motionRestValue(entry, property, artwork) {
736
736
  case "stroke":
737
737
  return _nullishCoalesce((node && firstPaint(node, property)), () => ( "transparent"));
738
738
  case "strokeWidth": {
739
- const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ? _chunkLPLCWZTMcjs.collectPathNodes.call(void 0, node)[0] : void 0;
739
+ const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ? _chunkFODKPD44cjs.collectPathNodes.call(void 0, node)[0] : void 0;
740
740
  return _nullishCoalesce(_optionalChain([path, 'optionalAccess', _14 => _14.strokeWidth]), () => ( 1));
741
741
  }
742
742
  case "shape":
@@ -847,12 +847,12 @@ function resolveMotionCamera(camera, scene) {
847
847
  const r = camera;
848
848
  return { x: r.x, y: r.y, width: r.width, height: r.height };
849
849
  }
850
- function motionPathLength(node, parentWorld = _chunkLPLCWZTMcjs.IDENTITY_MATRIX) {
850
+ function motionPathLength(node, parentWorld = _chunkFODKPD44cjs.IDENTITY_MATRIX) {
851
851
  let longest = 0;
852
- const paths = node.type === "path" ? [node] : _chunkLPLCWZTMcjs.collectPathNodes.call(void 0, node);
852
+ const paths = node.type === "path" ? [node] : _chunkFODKPD44cjs.collectPathNodes.call(void 0, node);
853
853
  for (const p of paths) {
854
854
  try {
855
- longest = Math.max(longest, _chunkXGD3FSNCcjs.bezierPathLength.call(void 0, _chunkLPLCWZTMcjs.vectorPathWorldBezier.call(void 0, p, parentWorld, { effects: false })));
855
+ longest = Math.max(longest, _chunkXGD3FSNCcjs.bezierPathLength.call(void 0, _chunkFODKPD44cjs.vectorPathWorldBezier.call(void 0, p, parentWorld, { effects: false })));
856
856
  } catch (e2) {
857
857
  }
858
858
  }
@@ -1105,12 +1105,12 @@ function compileMotionScene(scene) {
1105
1105
  const order2 = _nullishCoalesce(o.order, () => ( "together"));
1106
1106
  const pace = _nullishCoalesce(o.pace, () => ( "time"));
1107
1107
  if (order2 === "together" && pace === "time") return null;
1108
- const paths = entry.node.type === "path" ? [entry.node] : _chunkLPLCWZTMcjs.collectPathNodes.call(void 0, entry.node);
1108
+ const paths = entry.node.type === "path" ? [entry.node] : _chunkFODKPD44cjs.collectPathNodes.call(void 0, entry.node);
1109
1109
  let list = paths.map((p) => {
1110
1110
  const at = nodes.get(p.id);
1111
1111
  let first = { x: 0, y: 0 };
1112
1112
  try {
1113
- const m = _chunkLPLCWZTMcjs.vectorPathWorldBezier.call(void 0, p, _nullishCoalesce(_optionalChain([at, 'optionalAccess', _41 => _41.parentWorld]), () => ( _chunkLPLCWZTMcjs.IDENTITY_MATRIX)), { effects: false })[0];
1113
+ const m = _chunkFODKPD44cjs.vectorPathWorldBezier.call(void 0, p, _nullishCoalesce(_optionalChain([at, 'optionalAccess', _41 => _41.parentWorld]), () => ( _chunkFODKPD44cjs.IDENTITY_MATRIX)), { effects: false })[0];
1114
1114
  if (m && m.type === "M") first = { x: m.x, y: m.y };
1115
1115
  } catch (e3) {
1116
1116
  }
@@ -1222,17 +1222,17 @@ function compileMotionScene(scene) {
1222
1222
  let dx = _nullishCoalesce(_optionalChain([command3, 'access', _44 => _44.by, 'optionalAccess', _45 => _45.x]), () => ( 0));
1223
1223
  let dy = _nullishCoalesce(_optionalChain([command3, 'access', _46 => _46.by, 'optionalAccess', _47 => _47.y]), () => ( 0));
1224
1224
  if (command3.to) {
1225
- const inv = _chunkLPLCWZTMcjs.invertMatrix.call(void 0, entry.parentWorld);
1226
- const target = _chunkLPLCWZTMcjs.applyMatrix.call(void 0, inv, command3.to);
1225
+ const inv = _chunkFODKPD44cjs.invertMatrix.call(void 0, entry.parentWorld);
1226
+ const target = _chunkFODKPD44cjs.applyMatrix.call(void 0, inv, command3.to);
1227
1227
  dx = target.x - (entry.center.x + num2("x"));
1228
1228
  dy = target.y - (entry.center.y + num2("y"));
1229
1229
  }
1230
1230
  if (_optionalChain([command3, 'access', _48 => _48.via, 'optionalAccess', _49 => _49.length])) {
1231
- const inv = _chunkLPLCWZTMcjs.invertMatrix.call(void 0, entry.parentWorld);
1231
+ const inv = _chunkFODKPD44cjs.invertMatrix.call(void 0, entry.parentWorld);
1232
1232
  const x0 = num2("x");
1233
1233
  const y0 = num2("y");
1234
1234
  const add = command3.blend === "add";
1235
- const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) => _chunkLPLCWZTMcjs.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 }];
1235
+ const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) => _chunkFODKPD44cjs.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 }];
1236
1236
  const times = smoothMotionTimes(offsets, start, end - start, _nullishCoalesce(command3.pacing, () => ( "even")));
1237
1237
  for (const axis of ["x", "y"]) {
1238
1238
  const base = add ? 0 : axis === "x" ? x0 : y0;
@@ -1375,13 +1375,13 @@ function morphBetween(a, b) {
1375
1375
  let inner = morphCache.get(a);
1376
1376
  if (!inner) morphCache.set(a, inner = /* @__PURE__ */ new WeakMap());
1377
1377
  let morph = inner.get(b);
1378
- if (!morph) inner.set(b, morph = _chunk26PGXHY7cjs.createVectorMorph.call(void 0, a, b, { id: a.id }));
1378
+ if (!morph) inner.set(b, morph = _chunkM7O4BJRHcjs.createVectorMorph.call(void 0, a, b, { id: a.id }));
1379
1379
  return morph;
1380
1380
  }
1381
1381
  function shapeIn(entry, shape) {
1382
1382
  if (shape === entry) return entry.node;
1383
- const m = _chunkLPLCWZTMcjs.multiplyMatrices.call(void 0, _chunkLPLCWZTMcjs.multiplyMatrices.call(void 0, _chunkLPLCWZTMcjs.nodeMatrix.call(void 0, shape.node), shape.parentWorld), _chunkLPLCWZTMcjs.invertMatrix.call(void 0, entry.parentWorld));
1384
- return { ...shape.node, ..._chunkLPLCWZTMcjs.isIdentityMatrix.call(void 0, m) ? { transform: void 0 } : { transform: m } };
1383
+ const m = _chunkFODKPD44cjs.multiplyMatrices.call(void 0, _chunkFODKPD44cjs.multiplyMatrices.call(void 0, _chunkFODKPD44cjs.nodeMatrix.call(void 0, shape.node), shape.parentWorld), _chunkFODKPD44cjs.invertMatrix.call(void 0, entry.parentWorld));
1384
+ return { ...shape.node, ..._chunkFODKPD44cjs.isIdentityMatrix.call(void 0, m) ? { transform: void 0 } : { transform: m } };
1385
1385
  }
1386
1386
  function shapeAt(entry, timeline, nodes, time) {
1387
1387
  const track = timeline.tracks.get(motionTrackKey(entry.node.id, "shape"));
@@ -1401,7 +1401,7 @@ function shapeAt(entry, timeline, nodes, time) {
1401
1401
  function motionFollowRoute(entry, path) {
1402
1402
  if (!path || path.node.type !== "path") return null;
1403
1403
  try {
1404
- return _chunkXGD3FSNCcjs.transformBezierPath.call(void 0, _chunkLPLCWZTMcjs.vectorPathWorldBezier.call(void 0, path.node, path.parentWorld, { effects: false }), _chunkLPLCWZTMcjs.invertMatrix.call(void 0, entry.parentWorld));
1404
+ return _chunkXGD3FSNCcjs.transformBezierPath.call(void 0, _chunkFODKPD44cjs.vectorPathWorldBezier.call(void 0, path.node, path.parentWorld, { effects: false }), _chunkFODKPD44cjs.invertMatrix.call(void 0, entry.parentWorld));
1405
1405
  } catch (e4) {
1406
1406
  return null;
1407
1407
  }
@@ -1435,9 +1435,9 @@ function motionNodeOffset(entry, timeline, time, nodes = indexMotionNodes([entry
1435
1435
  const scaleX = read("scaleX", 1);
1436
1436
  const scaleY = read("scaleY", 1);
1437
1437
  const c = entry.center;
1438
- let matrix = _chunkLPLCWZTMcjs.multiplyMatrices.call(void 0, _chunkLPLCWZTMcjs.multiplyMatrices.call(void 0, _chunkLPLCWZTMcjs.scaleMatrix.call(void 0, scaleX, scaleY, c), _chunkLPLCWZTMcjs.rotateMatrix.call(void 0, rotation, c)), _chunkLPLCWZTMcjs.translateMatrix.call(void 0, dx, dy));
1438
+ let matrix = _chunkFODKPD44cjs.multiplyMatrices.call(void 0, _chunkFODKPD44cjs.multiplyMatrices.call(void 0, _chunkFODKPD44cjs.scaleMatrix.call(void 0, scaleX, scaleY, c), _chunkFODKPD44cjs.rotateMatrix.call(void 0, rotation, c)), _chunkFODKPD44cjs.translateMatrix.call(void 0, dx, dy));
1439
1439
  const along = follow ? followAt(entry, timeline, nodes, time) : null;
1440
- if (along) matrix = _chunkLPLCWZTMcjs.multiplyMatrices.call(void 0, matrix, _chunkLPLCWZTMcjs.multiplyMatrices.call(void 0, _chunkLPLCWZTMcjs.multiplyMatrices.call(void 0, _chunkLPLCWZTMcjs.translateMatrix.call(void 0, -c.x, -c.y), _chunkLPLCWZTMcjs.rotateMatrix.call(void 0, along.angle)), _chunkLPLCWZTMcjs.translateMatrix.call(void 0, along.x, along.y)));
1440
+ if (along) matrix = _chunkFODKPD44cjs.multiplyMatrices.call(void 0, matrix, _chunkFODKPD44cjs.multiplyMatrices.call(void 0, _chunkFODKPD44cjs.multiplyMatrices.call(void 0, _chunkFODKPD44cjs.translateMatrix.call(void 0, -c.x, -c.y), _chunkFODKPD44cjs.rotateMatrix.call(void 0, along.angle)), _chunkFODKPD44cjs.translateMatrix.call(void 0, along.x, along.y)));
1441
1441
  return { matrix, dx, dy, rotation, scaleX, scaleY, follow: along };
1442
1442
  }
1443
1443
  function motionNodeClips(id, timeline, time) {
@@ -1504,7 +1504,7 @@ function motionFrameAt(scene, time, options = {}) {
1504
1504
  const start = Math.min(1, Math.max(0, typeof drawStart === "number" ? drawStart : 0));
1505
1505
  const end = Math.min(1, Math.max(0, typeof drawEnd === "number" ? drawEnd : 1));
1506
1506
  if (start > 0 || end < 1) {
1507
- const trim = _chunkLPLCWZTMcjs.createVectorEffect.call(void 0, "trim", MOTION_DRAW_EFFECT_ID, { start: tidy(start * 100), end: tidy(end * 100) });
1507
+ const trim = _chunkFODKPD44cjs.createVectorEffect.call(void 0, "trim", MOTION_DRAW_EFFECT_ID, { start: tidy(start * 100), end: tidy(end * 100) });
1508
1508
  p = { ...p, effects: [trim, ...(_nullishCoalesce(p.effects, () => ( []))).filter((e) => e.id !== MOTION_DRAW_EFFECT_ID)] };
1509
1509
  }
1510
1510
  }
@@ -1518,8 +1518,8 @@ function motionFrameAt(scene, time, options = {}) {
1518
1518
  if (o >= 1) delete out.opacity;
1519
1519
  }
1520
1520
  const offset = options.offsets === false ? null : motionNodeOffset(entry, timeline, time, nodes);
1521
- if (offset && !_chunkLPLCWZTMcjs.isIdentityMatrix.call(void 0, offset.matrix)) {
1522
- const m = _chunkLPLCWZTMcjs.multiplyMatrices.call(void 0, _chunkLPLCWZTMcjs.nodeMatrix.call(void 0, out), offset.matrix).map(tidy);
1521
+ if (offset && !_chunkFODKPD44cjs.isIdentityMatrix.call(void 0, offset.matrix)) {
1522
+ const m = _chunkFODKPD44cjs.multiplyMatrices.call(void 0, _chunkFODKPD44cjs.nodeMatrix.call(void 0, out), offset.matrix).map(tidy);
1523
1523
  out = { ...out, transform: m };
1524
1524
  }
1525
1525
  return out;
@@ -1539,7 +1539,7 @@ function motionFrameToSvg(scene, time, options = {}) {
1539
1539
  const wrap = { ...options.wrap };
1540
1540
  for (const [id, clips] of Object.entries(frame.clips))
1541
1541
  wrap[id] = [..._nullishCoalesce(wrap[id], () => ( [])), ...clips.map((clip, i) => ({ clip: { id: `${prefix}reveal-${id}-${i}`, shape: clip.shape, attrs: motionClipAttrs(clip) } }))];
1542
- return withViewBox(_chunkLPLCWZTMcjs.vectorDocumentToSvg.call(void 0, frame.document, { ...options, wrap }), frame.camera);
1542
+ return withViewBox(_chunkFODKPD44cjs.vectorDocumentToSvg.call(void 0, frame.document, { ...options, wrap }), frame.camera);
1543
1543
  }
1544
1544
  function withViewBox(svg, box) {
1545
1545
  const f = (n) => String(Math.round(n * 1e3) / 1e3);
@@ -1722,8 +1722,8 @@ function visibleAt(timeline, id, time, node) {
1722
1722
  if (Array.isArray(rect) && (rect[2] <= 1e-4 || rect[3] <= 1e-4)) return false;
1723
1723
  const circle = clip("clipCircle");
1724
1724
  if (Array.isArray(circle) && circle[2] <= 1e-4) return false;
1725
- const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" : _chunkLPLCWZTMcjs.collectPathNodes.call(void 0, node).some((p) => p.fill && p.fill !== "none");
1726
- const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" || _chunkLPLCWZTMcjs.collectPathNodes.call(void 0, node).length === 0 || _chunkLPLCWZTMcjs.collectPathNodes.call(void 0, node).some((p) => {
1725
+ const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" : _chunkFODKPD44cjs.collectPathNodes.call(void 0, node).some((p) => p.fill && p.fill !== "none");
1726
+ const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" || _chunkFODKPD44cjs.collectPathNodes.call(void 0, node).length === 0 || _chunkFODKPD44cjs.collectPathNodes.call(void 0, node).some((p) => {
1727
1727
  const v = trackValue(timeline.tracks.get(motionTrackKey(p.id, "drawEnd")), time);
1728
1728
  return typeof v !== "number" || v > 0.01;
1729
1729
  }));
@@ -1809,7 +1809,7 @@ function checkMotionScene(scene) {
1809
1809
  }
1810
1810
  for (const id of targets) {
1811
1811
  const node = nodes.get(id).node;
1812
- const paths = node.type === "path" ? [node] : _chunkLPLCWZTMcjs.collectPathNodes.call(void 0, node);
1812
+ const paths = node.type === "path" ? [node] : _chunkFODKPD44cjs.collectPathNodes.call(void 0, node);
1813
1813
  if (paths.some((p) => p[key] !== void 0 && p[key] !== null && typeof p[key] !== "string"))
1814
1814
  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] }));
1815
1815
  }
@@ -1822,7 +1822,7 @@ function checkMotionScene(scene) {
1822
1822
  else
1823
1823
  for (const id of targets) {
1824
1824
  const node = nodes.get(id).node;
1825
- const paths = node.type === "path" ? [node] : _chunkLPLCWZTMcjs.collectPathNodes.call(void 0, node);
1825
+ const paths = node.type === "path" ? [node] : _chunkFODKPD44cjs.collectPathNodes.call(void 0, node);
1826
1826
  if (paths.some((p) => typeof p[key] !== "string"))
1827
1827
  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] }));
1828
1828
  }
@@ -2406,7 +2406,7 @@ function toFlairSvgMotion(scene, options = {}) {
2406
2406
  raw: (t) => transformAt(t, true)
2407
2407
  });
2408
2408
  }
2409
- const paths = node.type === "path" ? [node] : _chunkLPLCWZTMcjs.collectPathNodes.call(void 0, node);
2409
+ const paths = node.type === "path" ? [node] : _chunkFODKPD44cjs.collectPathNodes.call(void 0, node);
2410
2410
  for (const path of paths) {
2411
2411
  if (pathsSeen.has(path.id)) continue;
2412
2412
  pathsSeen.add(path.id);
@@ -2428,7 +2428,7 @@ function toFlairSvgMotion(scene, options = {}) {
2428
2428
  if (shapeSegments.length) {
2429
2429
  if (node.type !== "path") notes.push(`"${id}" is a group: its morph or effect animation is not exported (Flair tweens one path's "d").`);
2430
2430
  else {
2431
- const inverse = _chunkLPLCWZTMcjs.invertMatrix.call(void 0, _chunkLPLCWZTMcjs.nodeMatrix.call(void 0, node));
2431
+ const inverse = _chunkFODKPD44cjs.invertMatrix.call(void 0, _chunkFODKPD44cjs.nodeMatrix.call(void 0, node));
2432
2432
  channels.push({
2433
2433
  id,
2434
2434
  kind: "attr",
@@ -2437,9 +2437,9 @@ function toFlairSvgMotion(scene, options = {}) {
2437
2437
  exact: () => false,
2438
2438
  value: (t) => {
2439
2439
  const frame = motionFrameAt(scene, t, { draw: false, offsets: false });
2440
- const now = _chunkLPLCWZTMcjs.expandVectorAppearance.call(void 0, _optionalChain([indexMotionNodes, 'call', _108 => _108(frame.document.nodes), 'access', _109 => _109.get, 'call', _110 => _110(id), 'optionalAccess', _111 => _111.node]));
2440
+ const now = _chunkFODKPD44cjs.expandVectorAppearance.call(void 0, _optionalChain([indexMotionNodes, 'call', _108 => _108(frame.document.nodes), 'access', _109 => _109.get, 'call', _110 => _110(id), 'optionalAccess', _111 => _111.node]));
2441
2441
  if (!now || now.type !== "path") return "";
2442
- const bezier = _chunkXGD3FSNCcjs.transformBezierPath.call(void 0, _chunkLPLCWZTMcjs.vectorPathWorldBezier.call(void 0, now, _chunkLPLCWZTMcjs.IDENTITY_MATRIX, { effects: false }), inverse);
2442
+ const bezier = _chunkXGD3FSNCcjs.transformBezierPath.call(void 0, _chunkFODKPD44cjs.vectorPathWorldBezier.call(void 0, now, _chunkFODKPD44cjs.IDENTITY_MATRIX, { effects: false }), inverse);
2443
2443
  return _chunkXGD3FSNCcjs.bezierPathToSvg.call(void 0, bezier, { precision: Math.min(precision, 2) });
2444
2444
  }
2445
2445
  });
@@ -2546,7 +2546,7 @@ function toFlairSvgMotion(scene, options = {}) {
2546
2546
  }
2547
2547
  if (scene.motionBlur) notes.push("Motion blur is drawn on the stage only; Flair plays the scene sharp.");
2548
2548
  if (trigger && (_nullishCoalesce(scene.loop, () => ( "none"))) !== "none") notes.push(`The scene plays on ${trigger}, so its loop does not apply in Flair.`);
2549
- let svg = _chunkLPLCWZTMcjs.vectorDocumentToSvg.call(void 0, { ...scene.artwork, nodes: _chunkLPLCWZTMcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) }, { pretty: false, precision, wrap });
2549
+ let svg = _chunkFODKPD44cjs.vectorDocumentToSvg.call(void 0, { ...scene.artwork, nodes: _chunkFODKPD44cjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) }, { pretty: false, precision, wrap });
2550
2550
  if (routes.length) svg = svg.replace(/^(<svg[^>]*>)/, `$1<defs>${routes.join("")}</defs>`);
2551
2551
  let motion = { svg, animate };
2552
2552
  if (_optionalChain([scene, 'access', _114 => _114.controls, 'optionalAccess', _115 => _115.length])) {
@@ -2630,14 +2630,14 @@ function easingOf(ease, fallback) {
2630
2630
  return fallback;
2631
2631
  }
2632
2632
  function poseOf(value, entry) {
2633
- const t = _chunkLPLCWZTMcjs.parseSvgTransform.call(void 0, String(value));
2634
- const o = _chunkLPLCWZTMcjs.multiplyMatrices.call(void 0, _nullishCoalesce(_chunkLPLCWZTMcjs.invertMatrix.call(void 0, _chunkLPLCWZTMcjs.nodeMatrix.call(void 0, entry.node)), () => ( [1, 0, 0, 1, 0, 0])), t);
2633
+ const t = _chunkFODKPD44cjs.parseSvgTransform.call(void 0, String(value));
2634
+ const o = _chunkFODKPD44cjs.multiplyMatrices.call(void 0, _nullishCoalesce(_chunkFODKPD44cjs.invertMatrix.call(void 0, _chunkFODKPD44cjs.nodeMatrix.call(void 0, entry.node)), () => ( [1, 0, 0, 1, 0, 0])), t);
2635
2635
  const sx = Math.hypot(o[0], o[1]);
2636
2636
  if (!(sx > 1e-9)) return null;
2637
2637
  const sy = (o[0] * o[3] - o[1] * o[2]) / sx;
2638
2638
  if (Math.abs(o[2] + o[1] / sx * sy) > 1e-6 || Math.abs(o[3] - o[0] / sx * sy) > 1e-6) return null;
2639
2639
  const c = entry.center;
2640
- const moved = _chunkLPLCWZTMcjs.applyMatrix.call(void 0, o, c);
2640
+ const moved = _chunkFODKPD44cjs.applyMatrix.call(void 0, o, c);
2641
2641
  return { dx: moved.x - c.x, dy: moved.y - c.y, rotation: Math.atan2(o[1], o[0]) * 180 / Math.PI, sx, sy };
2642
2642
  }
2643
2643
  var near = (a, b, eps = 1e-6) => Math.abs(a - b) < eps;
@@ -2722,7 +2722,7 @@ function fromFlairSvgMotion(input, options = {}) {
2722
2722
  const notes = [];
2723
2723
  if (!input || typeof input.svg !== "string") throw new Error('Give a Flair SvgMotion: { svg: "<svg \u2026>", animate: [ \u2026 ] }.');
2724
2724
  const { motion, controls } = resolvePlaceholders(input, notes);
2725
- const artwork = _chunkLPLCWZTMcjs.parseVectorSvg.call(void 0, motion.svg);
2725
+ const artwork = _chunkFODKPD44cjs.parseVectorSvg.call(void 0, motion.svg);
2726
2726
  const nodes = indexMotionNodes(artwork.nodes);
2727
2727
  const byStep = /* @__PURE__ */ new Map();
2728
2728
  for (const anim of _nullishCoalesce(motion.animate, () => ( []))) {
@@ -2969,9 +2969,9 @@ function toLottie(scene, options = {}) {
2969
2969
  const items = [];
2970
2970
  const shapeSegments = [...timeline.tracks.entries()].filter(([k]) => k.startsWith(`${path.id}\0`) && (k.endsWith("\0shape") || k.includes("\0effect:"))).flatMap(([, v]) => v);
2971
2971
  const geometryAt = (t) => {
2972
- if (!shapeSegments.length) return _chunkLPLCWZTMcjs.vectorPathWorldBezier.call(void 0, path);
2972
+ if (!shapeSegments.length) return _chunkFODKPD44cjs.vectorPathWorldBezier.call(void 0, path);
2973
2973
  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]);
2974
- return now && now.type === "path" ? _chunkLPLCWZTMcjs.vectorPathWorldBezier.call(void 0, _chunkLPLCWZTMcjs.expandVectorAppearances.call(void 0, [now])[0]) : _chunkLPLCWZTMcjs.vectorPathWorldBezier.call(void 0, path);
2974
+ return now && now.type === "path" ? _chunkFODKPD44cjs.vectorPathWorldBezier.call(void 0, _chunkFODKPD44cjs.expandVectorAppearances.call(void 0, [now])[0]) : _chunkFODKPD44cjs.vectorPathWorldBezier.call(void 0, path);
2975
2975
  };
2976
2976
  const rest = lottieContours(_chunkXGD3FSNCcjs.toBezierPath.call(void 0, geometryAt(0)), round2);
2977
2977
  rest.forEach((contour, n) => {
@@ -3044,13 +3044,13 @@ function toLottie(scene, options = {}) {
3044
3044
  const innerTr = STATIC_TR();
3045
3045
  if (node.type === "path") inner = [...pathShapes(node)];
3046
3046
  else if (node.type === "text" || node.type === "instance") {
3047
- const drawn = _chunkLPLCWZTMcjs.expandVectorAppearance.call(void 0, node);
3047
+ const drawn = _chunkFODKPD44cjs.expandVectorAppearance.call(void 0, node);
3048
3048
  inner = drawn.type === "path" ? [...pathShapes(drawn)] : drawn.children.filter((c) => c.type === "path").reverse().flatMap((c) => [...pathShapes(c)]);
3049
- notes.push(`"${node.id}": text is exported as its outlines${_chunkLPLCWZTMcjs.vectorTextHasOutlines.call(void 0, ) ? "" : " (glyph boxes: set an outline text shaper for real glyphs)"}.`);
3049
+ notes.push(`"${node.id}": text is exported as its outlines${_chunkFODKPD44cjs.vectorTextHasOutlines.call(void 0, ) ? "" : " (glyph boxes: set an outline text shaper for real glyphs)"}.`);
3050
3050
  } else {
3051
3051
  inner = shown(node.children).reverse().map(nodeGroup);
3052
- const m = _chunkLPLCWZTMcjs.nodeMatrix.call(void 0, node);
3053
- if (m !== _chunkLPLCWZTMcjs.IDENTITY_MATRIX) {
3052
+ const m = _chunkFODKPD44cjs.nodeMatrix.call(void 0, node);
3053
+ if (m !== _chunkFODKPD44cjs.IDENTITY_MATRIX) {
3054
3054
  const parts = staticParts(m);
3055
3055
  if (!parts) notes.push(`"${node.id}": its transform skews, which is not exported; it is drawn without the skew.`);
3056
3056
  else {
@@ -3063,7 +3063,7 @@ function toLottie(scene, options = {}) {
3063
3063
  const body = { ty: "gr", nm: `${node.id} (own)`, it: [...inner, innerTr] };
3064
3064
  return { ty: "gr", nm: _nullishCoalesce(node.name, () => ( node.id)), it: [body, poseTransform(entry)] };
3065
3065
  };
3066
- const artwork = { ...scene.artwork, nodes: _chunkLPLCWZTMcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) };
3066
+ const artwork = { ...scene.artwork, nodes: _chunkFODKPD44cjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) };
3067
3067
  const content = shown(artwork.nodes).reverse().map(nodeGroup);
3068
3068
  if (artwork.background && rgba(artwork.background))
3069
3069
  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()] });
@@ -3162,11 +3162,11 @@ function preset(prst, w, h) {
3162
3162
  const poly = (pts) => [{ closed: true, anchors: pts.map(([x, y]) => ({ x, y })) }];
3163
3163
  switch (prst) {
3164
3164
  case "rect":
3165
- return [_chunkLPLCWZTMcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
3165
+ return [_chunkFODKPD44cjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
3166
3166
  case "roundRect":
3167
- return [_chunkLPLCWZTMcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h }, Math.min(w, h) * 0.16667)];
3167
+ return [_chunkFODKPD44cjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h }, Math.min(w, h) * 0.16667)];
3168
3168
  case "ellipse":
3169
- return [_chunkLPLCWZTMcjs.ellipseSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
3169
+ return [_chunkFODKPD44cjs.ellipseSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
3170
3170
  case "triangle":
3171
3171
  return poly([[w / 2, 0], [w, h], [0, h]]);
3172
3172
  case "rtTriangle":
@@ -3274,7 +3274,7 @@ function shapes(ctx, tree, map) {
3274
3274
  let subpaths = cust ? custom(cust, w, h) : prst ? preset(prst, w, h) : null;
3275
3275
  if (!subpaths) {
3276
3276
  if (prst) ctx.notes.push(`"${name}" is a ${prst}, drawn as its bounding rectangle.`);
3277
- subpaths = [_chunkLPLCWZTMcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
3277
+ subpaths = [_chunkFODKPD44cjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
3278
3278
  }
3279
3279
  const style = kid(el, "style");
3280
3280
  const fill = kid(spPr, "noFill") ? null : _nullishCoalesce(colour(ctx, kid(spPr, "solidFill")), () => ( (el.localName === "cxnSp" ? null : colour(ctx, kid(style, "fillRef")))));
@@ -4259,7 +4259,7 @@ function createAnimationEditorToolProvider(controller, options = {}) {
4259
4259
  handler: ({ svg }) => {
4260
4260
  let artwork;
4261
4261
  try {
4262
- artwork = _chunkLPLCWZTMcjs.parseVectorSvg.call(void 0, svg);
4262
+ artwork = _chunkFODKPD44cjs.parseVectorSvg.call(void 0, svg);
4263
4263
  } catch (error) {
4264
4264
  throw new Error(`The SVG could not be read: ${error.message}. Nothing was changed.`);
4265
4265
  }
@@ -1,9 +1,9 @@
1
1
  import { b as AnimationEasing } from '../easing-lM0Xo9Ni.cjs';
2
2
  import { b as AnimationLoopMode, c as AnimationPlayer, C as Clock } from '../player-DrcP2xqj.cjs';
3
- import { x as VectorDocument, e as VectorNode, h as VectorBounds } from '../types-yINF17Ta.cjs';
3
+ import { x as VectorDocument, e as VectorNode, h as VectorBounds } from '../types-Tfly4Aya.cjs';
4
4
  import { a as MotionBehavior } from '../behavior-Ymbld6jL.cjs';
5
5
  import { A as AffineMatrix, B as BezierPath } from '../bezier-BfwIbVTl.cjs';
6
- import { V as VectorSvgExportOptions } from '../svg-BnRj0q8i.cjs';
6
+ import { V as VectorSvgExportOptions } from '../svg-CVdFc80-.cjs';
7
7
  import { Z as ZipReadOptions } from '../zip-4nG0YAH7.cjs';
8
8
  import { H as HistoryManager } from '../HistoryManager-DeQQMBCj.cjs';
9
9
  import { a as AgentToolProvider } from '../registry-BqA1AZt0.cjs';
@@ -1,9 +1,9 @@
1
1
  import { b as AnimationEasing } from '../easing-lM0Xo9Ni.js';
2
2
  import { b as AnimationLoopMode, c as AnimationPlayer, C as Clock } from '../player-DV4Jujdq.js';
3
- import { x as VectorDocument, e as VectorNode, h as VectorBounds } from '../types-1SUQKDAw.js';
3
+ import { x as VectorDocument, e as VectorNode, h as VectorBounds } from '../types-CDLGhAZp.js';
4
4
  import { a as MotionBehavior } from '../behavior-Ymbld6jL.js';
5
5
  import { A as AffineMatrix, B as BezierPath } from '../bezier-DYBvLgUH.js';
6
- import { V as VectorSvgExportOptions } from '../svg-CmmBFfGT.js';
6
+ import { V as VectorSvgExportOptions } from '../svg-DlEuhwoX.js';
7
7
  import { Z as ZipReadOptions } from '../zip-4nG0YAH7.js';
8
8
  import { H as HistoryManager } from '../HistoryManager-DWSLd6Tf.js';
9
9
  import { a as AgentToolProvider } from '../registry-D-4fit9C.js';
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createVectorMorph
3
- } from "../chunk-MMVHBKMM.js";
3
+ } from "../chunk-T2P5TIZ6.js";
4
4
  import {
5
5
  MOTION_ISSUE_CODES,
6
6
  motionIssue,
@@ -31,7 +31,7 @@ import {
31
31
  vectorNodeBounds,
32
32
  vectorPathWorldBezier,
33
33
  vectorTextHasOutlines
34
- } from "../chunk-VXR7XWMF.js";
34
+ } from "../chunk-7LNZAWSJ.js";
35
35
  import {
36
36
  bezierPathLength,
37
37
  bezierPathPointAtLength,
@@ -4,7 +4,13 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkTCKIXI46cjs = require('./chunk-TCKIXI46.cjs');
7
+
8
+
9
+
10
+ var _chunkHOCPSFGAcjs = require('./chunk-HOCPSFGA.cjs');
11
+
12
+
13
+
8
14
 
9
15
 
10
16
 
@@ -616,8 +622,8 @@ var RetouchDabStroke = (_class2 = class {
616
622
  constructor(brush, target, effect) {;_class2.prototype.__init4.call(this);_class2.prototype.__init5.call(this);_class2.prototype.__init6.call(this);_class2.prototype.__init7.call(this);
617
623
  this.brush = brush;
618
624
  this.effect = effect;
619
- this.walker = new (0, _chunkTCKIXI46cjs.DabWalker)(brush);
620
- this.medium = new (0, _chunkTCKIXI46cjs.TileMedium)(target);
625
+ this.walker = new (0, _chunkHOCPSFGAcjs.DabWalker)(brush);
626
+ this.medium = new (0, _chunkHOCPSFGAcjs.TileMedium)(target);
621
627
  }
622
628
 
623
629
 
@@ -648,11 +654,11 @@ var RetouchDabStroke = (_class2 = class {
648
654
  paint(dabs) {
649
655
  const rects = [];
650
656
  for (const d of dabs) {
651
- const rect = _chunkTCKIXI46cjs.dabRect.call(void 0, d, this.brush.hardness);
657
+ const rect = _chunkHOCPSFGAcjs.dabRect.call(void 0, d, this.brush.hardness);
652
658
  const n = rect.width * rect.height;
653
659
  if (this.buf.length < n) this.buf = new Float32Array(n);
654
660
  const cov = this.buf.subarray(0, n);
655
- _chunkTCKIXI46cjs.rasterizeDab.call(void 0, { ...d, alpha: 1 }, this.brush.hardness, rect, cov);
661
+ _chunkHOCPSFGAcjs.rasterizeDab.call(void 0, { ...d, alpha: 1 }, this.brush.hardness, rect, cov);
656
662
  this.medium.reset();
657
663
  this.effect(this.medium, d, rect, cov);
658
664
  rects.push(rect);
@@ -664,7 +670,7 @@ var RetouchDabStroke = (_class2 = class {
664
670
  }, _class2);
665
671
  function smudgeEffect(brush, strength, mixing = "rgb") {
666
672
  const s = Math.min(1, Math.max(0, strength));
667
- const tip = new (0, _chunkTCKIXI46cjs.SmudgeTip)({ strength: s, length: s, mixing }, brush.size);
673
+ const tip = new (0, _chunkHOCPSFGAcjs.SmudgeTip)({ strength: s, length: s, mixing }, brush.size);
668
674
  return (medium, d, rect, cov) => tip.dab(medium, { x: d.x, y: d.y, radius: d.radius, opacity: d.opacity * d.alpha }, rect, cov);
669
675
  }
670
676
  function spongeEffect(brush, saturate, vibrance) {
@@ -747,6 +753,125 @@ function unionRect(a, b) {
747
753
  return { x, y, width: Math.max(a.x + a.width, b.x + b.width) - x, height: Math.max(a.y + a.height, b.y + b.height) - y };
748
754
  }
749
755
 
756
+ // src/paint/path-stroke.ts
757
+ function lean(s) {
758
+ if (typeof s.altitude === "number" && Number.isFinite(s.altitude)) {
759
+ return { amount: 1 - Math.min(1, Math.max(0, s.altitude / (Math.PI / 2))), azimuth: _nullishCoalesce(s.azimuth, () => ( 0)) };
760
+ }
761
+ if (typeof s.tiltX === "number" || typeof s.tiltY === "number") {
762
+ const tx = (_nullishCoalesce(s.tiltX, () => ( 0))) * Math.PI / 180;
763
+ const ty = (_nullishCoalesce(s.tiltY, () => ( 0))) * Math.PI / 180;
764
+ if (tx === 0 && ty === 0) return { amount: 0, azimuth: 0 };
765
+ const az = Math.atan2(Math.tan(ty), Math.tan(tx));
766
+ const alt = Math.atan(1 / Math.hypot(Math.tan(tx), Math.tan(ty)));
767
+ return { amount: 1 - alt / (Math.PI / 2), azimuth: az };
768
+ }
769
+ return null;
770
+ }
771
+ function pathStrokeDabs(samples, options) {
772
+ const brush = _chunkHOCPSFGAcjs.normalizeBrush.call(void 0, options.brush);
773
+ const pts = options.closed && samples.length > 2 ? [...samples, samples[0]] : [...samples];
774
+ if (!pts.length) return [];
775
+ const tilt = _nullishCoalesce(options.tilt, () => ( {}));
776
+ const minSize = Math.min(1, Math.max(0, _nullishCoalesce(options.minSize, () => ( 0))));
777
+ const dab = (x, y, p, l, dir) => {
778
+ const pr = Math.min(1, Math.max(0, p));
779
+ const lean0 = _nullishCoalesce(_optionalChain([l, 'optionalAccess', _2 => _2.amount]), () => ( 0));
780
+ const size = brush.size * (brush.pressureSize ? minSize + (1 - minSize) * pr : 1) * (1 + 1.5 * (_nullishCoalesce(tilt.size, () => ( 0))) * lean0);
781
+ let angle = brush.angle * Math.PI / 180;
782
+ if (options.followPath) angle += dir;
783
+ if (tilt.followAzimuth && l) angle = -l.azimuth;
784
+ const roundness = Math.max(0.05, brush.roundness * (1 - 0.85 * (_nullishCoalesce(tilt.roundness, () => ( 0))) * lean0));
785
+ const op = brush.pressureOpacity ? pr : 1;
786
+ return { x, y, radius: Math.max(0.5, size / 2), alpha: brush.flow, opacity: brush.opacity * op, angle, roundness };
787
+ };
788
+ const out = [];
789
+ const pressure = (s) => typeof s.pressure === "number" && Number.isFinite(s.pressure) ? s.pressure : 1;
790
+ if (pts.length === 1) {
791
+ out.push(dab(pts[0].x, pts[0].y, pressure(pts[0]), lean(pts[0]), 0));
792
+ return out;
793
+ }
794
+ let carry = 0;
795
+ out.push(dab(pts[0].x, pts[0].y, pressure(pts[0]), lean(pts[0]), Math.atan2(-(pts[1].y - pts[0].y), pts[1].x - pts[0].x)));
796
+ for (let i = 0; i + 1 < pts.length; i++) {
797
+ const a = pts[i];
798
+ const b = pts[i + 1];
799
+ const dx = b.x - a.x;
800
+ const dy = b.y - a.y;
801
+ const len = Math.hypot(dx, dy);
802
+ if (len === 0) continue;
803
+ const dir = Math.atan2(-dy, dx);
804
+ const la = lean(a);
805
+ const lb = lean(b);
806
+ let t = carry;
807
+ for (; ; ) {
808
+ const f = t / len;
809
+ if (f > 1) break;
810
+ const p = pressure(a) + (pressure(b) - pressure(a)) * f;
811
+ const l = la && lb ? { amount: la.amount + (lb.amount - la.amount) * f, azimuth: la.azimuth + (lb.azimuth - la.azimuth) * f } : _nullishCoalesce(la, () => ( lb));
812
+ const size = brush.size * (brush.pressureSize ? minSize + (1 - minSize) * p : 1);
813
+ const step = Math.max(0.5, size * brush.spacing);
814
+ if (t > 0 || i > 0) out.push(dab(a.x + dx * f, a.y + dy * f, p, l, dir));
815
+ t += step;
816
+ }
817
+ carry = t - len;
818
+ }
819
+ return out;
820
+ }
821
+ function pathStrokeCoverage(samples, options) {
822
+ const brush = _chunkHOCPSFGAcjs.normalizeBrush.call(void 0, options.brush);
823
+ const coverage = new (0, _chunkHOCPSFGAcjs.CoverageMap)();
824
+ const dabs = pathStrokeDabs(samples, options);
825
+ let buf = new Float32Array(0);
826
+ let bounds = null;
827
+ for (const d of dabs) {
828
+ const rect = _chunkHOCPSFGAcjs.dabRect.call(void 0, d, brush.hardness);
829
+ const n = rect.width * rect.height;
830
+ if (n <= 0) continue;
831
+ if (buf.length < n) buf = new Float32Array(n);
832
+ const vals = buf.subarray(0, n);
833
+ _chunkHOCPSFGAcjs.rasterizeDab.call(void 0, d, brush.hardness, rect, vals);
834
+ coverage.accumulate(rect, vals, d.opacity);
835
+ if (!bounds) bounds = { ...rect };
836
+ else {
837
+ const x = Math.min(bounds.x, rect.x);
838
+ const y = Math.min(bounds.y, rect.y);
839
+ bounds = { x, y, width: Math.max(bounds.x + bounds.width, rect.x + rect.width) - x, height: Math.max(bounds.y + bounds.height, rect.y + rect.height) - y };
840
+ }
841
+ }
842
+ return { coverage, bounds, dabs: dabs.length };
843
+ }
844
+ function paintPathStroke(surface, samples, options) {
845
+ if (surface.channels !== 4) throw new Error("paintPathStroke paints RGBA surfaces (4 channels).");
846
+ const brush = _chunkHOCPSFGAcjs.normalizeBrush.call(void 0, options.brush);
847
+ const { coverage, bounds, dabs } = pathStrokeCoverage(samples, options);
848
+ if (!bounds) return { surface, bounds: null, dabs };
849
+ const offset = _nullishCoalesce(options.offset, () => ( { x: 0, y: 0 }));
850
+ const apply = {
851
+ mode: _nullishCoalesce(options.mode, () => ( "paint")),
852
+ color: options.color,
853
+ background: [0, 0, 0, 0],
854
+ opacity: brush.opacity,
855
+ blend: _nullishCoalesce(options.blend, () => ( brush.blend)),
856
+ lockTransparency: _nullishCoalesce(options.lockTransparency, () => ( false)),
857
+ selection: _nullishCoalesce(options.selection, () => ( null)),
858
+ offset
859
+ };
860
+ const tiles = new Map(surface.tiles);
861
+ for (const { tx, ty } of _chunkTFOPHZ3Ucjs.tilesInRect.call(void 0, { x: bounds.x - offset.x, y: bounds.y - offset.y, width: bounds.width, height: bounds.height })) {
862
+ const key = _chunkTFOPHZ3Ucjs.tileKey.call(void 0, tx, ty);
863
+ const src = _optionalChain([surface, 'access', _3 => _3.tiles, 'access', _4 => _4.get, 'call', _5 => _5(key), 'optionalAccess', _6 => _6.data]);
864
+ const base = src && src.length === _chunkTFOPHZ3Ucjs.TILE * _chunkTFOPHZ3Ucjs.TILE * 4 ? src : new Uint8ClampedArray(_chunkTFOPHZ3Ucjs.TILE * _chunkTFOPHZ3Ucjs.TILE * 4);
865
+ const t = _chunkTFOPHZ3Ucjs.finishTile.call(void 0, _chunkHOCPSFGAcjs.applyStrokeToTile.call(void 0, coverage, base, 4, tx, ty, apply), 4, surface.defaultValue);
866
+ if (t) tiles.set(key, t);
867
+ else tiles.delete(key);
868
+ }
869
+ return { surface: new (0, _chunkTFOPHZ3Ucjs.TiledSurface)(4, tiles, surface.defaultValue), bounds, dabs };
870
+ }
871
+
872
+
873
+
874
+
750
875
 
751
876
 
752
877
 
@@ -777,5 +902,5 @@ function unionRect(a, b) {
777
902
 
778
903
 
779
904
 
780
- exports.solveMembrane = solveMembrane; exports.seamlessClone = seamlessClone; exports.membraneFill = membraneFill; exports.dilateMask = dilateMask; exports.maskBounds = maskBounds; exports.bestOffset = bestOffset; exports.TONE_RANGES = TONE_RANGES; exports.luma = luma; exports.dodgeBurnCurve = dodgeBurnCurve; exports.dodgeBurn = dodgeBurn; exports.saturationOf = saturationOf; exports.sponge = sponge; exports.perDabStrength = perDabStrength; exports.RETOUCH_SAMPLES = RETOUCH_SAMPLES; exports.SPOT_HEAL_TYPES = SPOT_HEAL_TYPES; exports.DEFAULT_RETOUCH = DEFAULT_RETOUCH; exports.normalizeRetouch = normalizeRetouch; exports.TilePixelSource = TilePixelSource; exports.RegionPixelSource = RegionPixelSource; exports.readSourceRegion = readSourceRegion; exports.applyRetouchToTile = applyRetouchToTile; exports.toneOf = toneOf; exports.healPixels = healPixels; exports.spotHealPixels = spotHealPixels; exports.spotHealWindow = spotHealWindow; exports.RetouchDabStroke = RetouchDabStroke; exports.smudgeEffect = smudgeEffect; exports.spongeEffect = spongeEffect; exports.rgbaViewOfGrey = rgbaViewOfGrey;
781
- //# sourceMappingURL=chunk-DFQEX3AM.cjs.map
905
+ exports.solveMembrane = solveMembrane; exports.seamlessClone = seamlessClone; exports.membraneFill = membraneFill; exports.dilateMask = dilateMask; exports.maskBounds = maskBounds; exports.bestOffset = bestOffset; exports.TONE_RANGES = TONE_RANGES; exports.luma = luma; exports.dodgeBurnCurve = dodgeBurnCurve; exports.dodgeBurn = dodgeBurn; exports.saturationOf = saturationOf; exports.sponge = sponge; exports.perDabStrength = perDabStrength; exports.RETOUCH_SAMPLES = RETOUCH_SAMPLES; exports.SPOT_HEAL_TYPES = SPOT_HEAL_TYPES; exports.DEFAULT_RETOUCH = DEFAULT_RETOUCH; exports.normalizeRetouch = normalizeRetouch; exports.TilePixelSource = TilePixelSource; exports.RegionPixelSource = RegionPixelSource; exports.readSourceRegion = readSourceRegion; exports.applyRetouchToTile = applyRetouchToTile; exports.toneOf = toneOf; exports.healPixels = healPixels; exports.spotHealPixels = spotHealPixels; exports.spotHealWindow = spotHealWindow; exports.RetouchDabStroke = RetouchDabStroke; exports.smudgeEffect = smudgeEffect; exports.spongeEffect = spongeEffect; exports.rgbaViewOfGrey = rgbaViewOfGrey; exports.pathStrokeDabs = pathStrokeDabs; exports.pathStrokeCoverage = pathStrokeCoverage; exports.paintPathStroke = paintPathStroke;
906
+ //# sourceMappingURL=chunk-2UT4GXYA.cjs.map