@pixerate/editor 0.226.0 → 0.227.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 (48) hide show
  1. package/dist/animation-editor/index.cjs +57 -57
  2. package/dist/animation-editor/index.js +3 -3
  3. package/dist/{brushstrokeRender-C3UU6GVC.js → brushstrokeRender-MAHOXL7K.js} +2 -2
  4. package/dist/{brushstrokeRender-EAJNE6WP.cjs → brushstrokeRender-WDTKD54B.cjs} +5 -5
  5. package/dist/canvas/index.cjs +8 -8
  6. package/dist/canvas/index.js +1 -1
  7. package/dist/{chunk-LCCMOWR7.cjs → chunk-ATKKG76G.cjs} +23 -23
  8. package/dist/{chunk-QAUIZPYI.cjs → chunk-BQE3Y6ZO.cjs} +2 -2
  9. package/dist/{chunk-G4E6RUPC.js → chunk-CDP2AKMA.js} +1 -1
  10. package/dist/{chunk-NDMXB4PR.js → chunk-CU6ANS5L.js} +1 -1
  11. package/dist/{chunk-ROVK6AXX.cjs → chunk-GNZI3KYK.cjs} +95 -23
  12. package/dist/{chunk-I7G3RSUJ.cjs → chunk-GXLZZVR5.cjs} +35 -35
  13. package/dist/{chunk-5YLOU7VF.js → chunk-KN3Y3FRY.js} +1 -1
  14. package/dist/{chunk-IWMDW7LB.cjs → chunk-MXJP77K4.cjs} +86 -86
  15. package/dist/{chunk-F7YA3MMC.js → chunk-TQOL6CF7.js} +76 -4
  16. package/dist/{chunk-ZMHPQ6HP.cjs → chunk-V3L7U63N.cjs} +1 -1
  17. package/dist/{chunk-DJBYJOHM.js → chunk-XSVUNSDJ.js} +1 -1
  18. package/dist/{chunk-BGOCAUXH.js → chunk-YMREOA67.js} +1 -1
  19. package/dist/image-editor/index.cjs +771 -771
  20. package/dist/image-editor/index.js +4 -4
  21. package/dist/paint-editor/controller.d.cts +54 -3
  22. package/dist/paint-editor/controller.d.ts +54 -3
  23. package/dist/paint-editor/dab-stroke.d.cts +3 -0
  24. package/dist/paint-editor/dab-stroke.d.ts +3 -0
  25. package/dist/paint-editor/effect-paint.d.cts +47 -0
  26. package/dist/paint-editor/effect-paint.d.ts +47 -0
  27. package/dist/paint-editor/effect-tools.d.cts +4 -2
  28. package/dist/paint-editor/effect-tools.d.ts +4 -2
  29. package/dist/paint-editor/effects.d.cts +3 -0
  30. package/dist/paint-editor/effects.d.ts +3 -0
  31. package/dist/paint-editor/engine.d.cts +4 -0
  32. package/dist/paint-editor/engine.d.ts +4 -0
  33. package/dist/paint-editor/index.cjs +536 -309
  34. package/dist/paint-editor/index.d.cts +1 -0
  35. package/dist/paint-editor/index.d.ts +1 -0
  36. package/dist/paint-editor/index.js +250 -23
  37. package/dist/paint-editor/procedural.d.cts +4 -0
  38. package/dist/paint-editor/procedural.d.ts +4 -0
  39. package/dist/paint-editor/stroke.d.cts +9 -0
  40. package/dist/paint-editor/stroke.d.ts +9 -0
  41. package/dist/paint-editor/strokes.d.cts +6 -2
  42. package/dist/paint-editor/strokes.d.ts +6 -2
  43. package/dist/vector/index.cjs +962 -962
  44. package/dist/vector/index.js +4 -4
  45. package/package.json +1 -1
  46. package/skills/pixerate-canvas/SKILL.md +2 -1
  47. package/skills/pixerate-paint-editor/SKILL.md +42 -6
  48. package/skills/pixerate-paint-sketch-to-finish/SKILL.md +7 -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 _chunkI7G3RSUJcjs = require('../chunk-I7G3RSUJ.cjs');
3
+ var _chunkGXLZZVR5cjs = require('../chunk-GXLZZVR5.cjs');
4
4
 
5
5
 
6
6
 
@@ -31,8 +31,8 @@ var _chunkEBDZWIOPcjs = require('../chunk-EBDZWIOP.cjs');
31
31
 
32
32
 
33
33
 
34
- var _chunkQAUIZPYIcjs = require('../chunk-QAUIZPYI.cjs');
35
- require('../chunk-ROVK6AXX.cjs');
34
+ var _chunkBQE3Y6ZOcjs = require('../chunk-BQE3Y6ZO.cjs');
35
+ require('../chunk-GNZI3KYK.cjs');
36
36
  require('../chunk-CVFAAZXE.cjs');
37
37
 
38
38
 
@@ -598,7 +598,7 @@ function smoothMotionTimes(points, start, duration, pacing = "even") {
598
598
  function motionTextLayout(nodes, id) {
599
599
  const group = _optionalChain([nodes, 'access', _5 => _5.get, 'call', _6 => _6(id), 'optionalAccess', _7 => _7.node]);
600
600
  if (!group || group.type !== "group") return null;
601
- const letters = _chunkQAUIZPYIcjs.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);
601
+ const letters = _chunkBQE3Y6ZOcjs.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);
602
602
  if (!letters.length) return null;
603
603
  const lines = [];
604
604
  for (const l of [...letters].sort((a, c) => a.b.y + a.b.height / 2 - (c.b.y + c.b.height / 2))) {
@@ -683,21 +683,21 @@ function indexMotionNodes(nodes) {
683
683
  const out = /* @__PURE__ */ new Map();
684
684
  const walk = (list, parentWorld, ancestors) => {
685
685
  for (const node of list) {
686
- const local = _chunkQAUIZPYIcjs.vectorNodeBounds.call(void 0, node);
687
- const bounds = _chunkQAUIZPYIcjs.vectorNodeBounds.call(void 0, node, parentWorld);
686
+ const local = _chunkBQE3Y6ZOcjs.vectorNodeBounds.call(void 0, node);
687
+ const bounds = _chunkBQE3Y6ZOcjs.vectorNodeBounds.call(void 0, node, parentWorld);
688
688
  const center = local ? { x: local.x + local.width / 2, y: local.y + local.height / 2 } : { x: 0, y: 0 };
689
689
  if (!out.has(node.id)) out.set(node.id, { node, ancestors, parentWorld, center, bounds, box: local });
690
- if (node.type === "group") walk(node.children, _chunkQAUIZPYIcjs.multiplyMatrices.call(void 0, _chunkQAUIZPYIcjs.nodeMatrix.call(void 0, node), parentWorld), [...ancestors, node.id]);
690
+ if (node.type === "group") walk(node.children, _chunkBQE3Y6ZOcjs.multiplyMatrices.call(void 0, _chunkBQE3Y6ZOcjs.nodeMatrix.call(void 0, node), parentWorld), [...ancestors, node.id]);
691
691
  }
692
692
  };
693
- walk(nodes, _chunkQAUIZPYIcjs.IDENTITY_MATRIX, []);
693
+ walk(nodes, _chunkBQE3Y6ZOcjs.IDENTITY_MATRIX, []);
694
694
  indexCache.set(nodes, out);
695
695
  return out;
696
696
  }
697
697
  var solid = (paint) => typeof paint === "string" && paint !== "none" ? paint : void 0;
698
698
  function firstPaint(node, key) {
699
699
  if (node.type === "path") return solid(node[key]);
700
- for (const p of _chunkQAUIZPYIcjs.collectPathNodes.call(void 0, node)) {
700
+ for (const p of _chunkBQE3Y6ZOcjs.collectPathNodes.call(void 0, node)) {
701
701
  const s = solid(p[key]);
702
702
  if (s) return s;
703
703
  }
@@ -705,7 +705,7 @@ function firstPaint(node, key) {
705
705
  }
706
706
  function strokeReach(node) {
707
707
  let reach = 0;
708
- for (const p of node.type === "path" ? [node] : _chunkQAUIZPYIcjs.collectPathNodes.call(void 0, node)) {
708
+ for (const p of node.type === "path" ? [node] : _chunkBQE3Y6ZOcjs.collectPathNodes.call(void 0, node)) {
709
709
  if (p.stroke == null || p.stroke === "none") continue;
710
710
  const width = _nullishCoalesce(p.strokeWidth, () => ( 1));
711
711
  reach = Math.max(reach, p.strokeAlign === "outside" ? width : p.strokeAlign === "inside" ? 0 : width / 2);
@@ -775,7 +775,7 @@ function motionRestValue(entry, property, artwork) {
775
775
  case "stroke":
776
776
  return _nullishCoalesce((node && firstPaint(node, property)), () => ( "transparent"));
777
777
  case "strokeWidth": {
778
- const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ? _chunkQAUIZPYIcjs.collectPathNodes.call(void 0, node)[0] : void 0;
778
+ const path = _optionalChain([node, 'optionalAccess', _13 => _13.type]) === "path" ? node : node ? _chunkBQE3Y6ZOcjs.collectPathNodes.call(void 0, node)[0] : void 0;
779
779
  return _nullishCoalesce(_optionalChain([path, 'optionalAccess', _14 => _14.strokeWidth]), () => ( 1));
780
780
  }
781
781
  case "shape":
@@ -886,12 +886,12 @@ function resolveMotionCamera(camera, scene) {
886
886
  const r = camera;
887
887
  return { x: r.x, y: r.y, width: r.width, height: r.height };
888
888
  }
889
- function motionPathLength(node, parentWorld = _chunkQAUIZPYIcjs.IDENTITY_MATRIX) {
889
+ function motionPathLength(node, parentWorld = _chunkBQE3Y6ZOcjs.IDENTITY_MATRIX) {
890
890
  let longest = 0;
891
- const paths = node.type === "path" ? [node] : _chunkQAUIZPYIcjs.collectPathNodes.call(void 0, node);
891
+ const paths = node.type === "path" ? [node] : _chunkBQE3Y6ZOcjs.collectPathNodes.call(void 0, node);
892
892
  for (const p of paths) {
893
893
  try {
894
- longest = Math.max(longest, _chunkGF2RBSDMcjs.bezierPathLength.call(void 0, _chunkQAUIZPYIcjs.vectorPathWorldBezier.call(void 0, p, parentWorld, { effects: false })));
894
+ longest = Math.max(longest, _chunkGF2RBSDMcjs.bezierPathLength.call(void 0, _chunkBQE3Y6ZOcjs.vectorPathWorldBezier.call(void 0, p, parentWorld, { effects: false })));
895
895
  } catch (e2) {
896
896
  }
897
897
  }
@@ -1144,12 +1144,12 @@ function compileMotionScene(scene) {
1144
1144
  const order2 = _nullishCoalesce(o.order, () => ( "together"));
1145
1145
  const pace = _nullishCoalesce(o.pace, () => ( "time"));
1146
1146
  if (order2 === "together" && pace === "time") return null;
1147
- const paths = entry.node.type === "path" ? [entry.node] : _chunkQAUIZPYIcjs.collectPathNodes.call(void 0, entry.node);
1147
+ const paths = entry.node.type === "path" ? [entry.node] : _chunkBQE3Y6ZOcjs.collectPathNodes.call(void 0, entry.node);
1148
1148
  let list = paths.map((p) => {
1149
1149
  const at = nodes.get(p.id);
1150
1150
  let first = { x: 0, y: 0 };
1151
1151
  try {
1152
- const m = _chunkQAUIZPYIcjs.vectorPathWorldBezier.call(void 0, p, _nullishCoalesce(_optionalChain([at, 'optionalAccess', _41 => _41.parentWorld]), () => ( _chunkQAUIZPYIcjs.IDENTITY_MATRIX)), { effects: false })[0];
1152
+ const m = _chunkBQE3Y6ZOcjs.vectorPathWorldBezier.call(void 0, p, _nullishCoalesce(_optionalChain([at, 'optionalAccess', _41 => _41.parentWorld]), () => ( _chunkBQE3Y6ZOcjs.IDENTITY_MATRIX)), { effects: false })[0];
1153
1153
  if (m && m.type === "M") first = { x: m.x, y: m.y };
1154
1154
  } catch (e3) {
1155
1155
  }
@@ -1261,17 +1261,17 @@ function compileMotionScene(scene) {
1261
1261
  let dx = _nullishCoalesce(_optionalChain([command3, 'access', _44 => _44.by, 'optionalAccess', _45 => _45.x]), () => ( 0));
1262
1262
  let dy = _nullishCoalesce(_optionalChain([command3, 'access', _46 => _46.by, 'optionalAccess', _47 => _47.y]), () => ( 0));
1263
1263
  if (command3.to) {
1264
- const inv = _chunkQAUIZPYIcjs.invertMatrix.call(void 0, entry.parentWorld);
1265
- const target = _chunkQAUIZPYIcjs.applyMatrix.call(void 0, inv, command3.to);
1264
+ const inv = _chunkBQE3Y6ZOcjs.invertMatrix.call(void 0, entry.parentWorld);
1265
+ const target = _chunkBQE3Y6ZOcjs.applyMatrix.call(void 0, inv, command3.to);
1266
1266
  dx = target.x - (entry.center.x + num2("x"));
1267
1267
  dy = target.y - (entry.center.y + num2("y"));
1268
1268
  }
1269
1269
  if (_optionalChain([command3, 'access', _48 => _48.via, 'optionalAccess', _49 => _49.length])) {
1270
- const inv = _chunkQAUIZPYIcjs.invertMatrix.call(void 0, entry.parentWorld);
1270
+ const inv = _chunkBQE3Y6ZOcjs.invertMatrix.call(void 0, entry.parentWorld);
1271
1271
  const x0 = num2("x");
1272
1272
  const y0 = num2("y");
1273
1273
  const add = command3.blend === "add";
1274
- const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) => _chunkQAUIZPYIcjs.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 }];
1274
+ const offsets = [{ x: 0, y: 0 }, ...command3.via.map((p) => _chunkBQE3Y6ZOcjs.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 }];
1275
1275
  const times = _optionalChain([command3, 'access', _50 => _50.times, 'optionalAccess', _51 => _51.length]) === command3.via.length ? [start, ...command3.times.map((f) => start + f * (end - start)), end] : smoothMotionTimes(offsets, start, end - start, _nullishCoalesce(command3.pacing, () => ( "even")));
1276
1276
  for (const axis of ["x", "y"]) {
1277
1277
  const base = add ? 0 : axis === "x" ? x0 : y0;
@@ -1414,13 +1414,13 @@ function morphBetween(a, b) {
1414
1414
  let inner = morphCache.get(a);
1415
1415
  if (!inner) morphCache.set(a, inner = /* @__PURE__ */ new WeakMap());
1416
1416
  let morph = inner.get(b);
1417
- if (!morph) inner.set(b, morph = _chunkI7G3RSUJcjs.createVectorMorph.call(void 0, a, b, { id: a.id }));
1417
+ if (!morph) inner.set(b, morph = _chunkGXLZZVR5cjs.createVectorMorph.call(void 0, a, b, { id: a.id }));
1418
1418
  return morph;
1419
1419
  }
1420
1420
  function shapeIn(entry, shape) {
1421
1421
  if (shape === entry) return entry.node;
1422
- const m = _chunkQAUIZPYIcjs.multiplyMatrices.call(void 0, _chunkQAUIZPYIcjs.multiplyMatrices.call(void 0, _chunkQAUIZPYIcjs.nodeMatrix.call(void 0, shape.node), shape.parentWorld), _chunkQAUIZPYIcjs.invertMatrix.call(void 0, entry.parentWorld));
1423
- return { ...shape.node, ..._chunkQAUIZPYIcjs.isIdentityMatrix.call(void 0, m) ? { transform: void 0 } : { transform: m } };
1422
+ const m = _chunkBQE3Y6ZOcjs.multiplyMatrices.call(void 0, _chunkBQE3Y6ZOcjs.multiplyMatrices.call(void 0, _chunkBQE3Y6ZOcjs.nodeMatrix.call(void 0, shape.node), shape.parentWorld), _chunkBQE3Y6ZOcjs.invertMatrix.call(void 0, entry.parentWorld));
1423
+ return { ...shape.node, ..._chunkBQE3Y6ZOcjs.isIdentityMatrix.call(void 0, m) ? { transform: void 0 } : { transform: m } };
1424
1424
  }
1425
1425
  function shapeAt(entry, timeline, nodes, time) {
1426
1426
  const track = timeline.tracks.get(motionTrackKey(entry.node.id, "shape"));
@@ -1440,7 +1440,7 @@ function shapeAt(entry, timeline, nodes, time) {
1440
1440
  function motionFollowRoute(entry, path) {
1441
1441
  if (!path || path.node.type !== "path") return null;
1442
1442
  try {
1443
- return _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, _chunkQAUIZPYIcjs.vectorPathWorldBezier.call(void 0, path.node, path.parentWorld, { effects: false }), _chunkQAUIZPYIcjs.invertMatrix.call(void 0, entry.parentWorld));
1443
+ return _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, _chunkBQE3Y6ZOcjs.vectorPathWorldBezier.call(void 0, path.node, path.parentWorld, { effects: false }), _chunkBQE3Y6ZOcjs.invertMatrix.call(void 0, entry.parentWorld));
1444
1444
  } catch (e4) {
1445
1445
  return null;
1446
1446
  }
@@ -1474,9 +1474,9 @@ function motionNodeOffset(entry, timeline, time, nodes = indexMotionNodes([entry
1474
1474
  const scaleX = read("scaleX", 1);
1475
1475
  const scaleY = read("scaleY", 1);
1476
1476
  const c = entry.center;
1477
- let matrix = _chunkQAUIZPYIcjs.multiplyMatrices.call(void 0, _chunkQAUIZPYIcjs.multiplyMatrices.call(void 0, _chunkQAUIZPYIcjs.scaleMatrix.call(void 0, scaleX, scaleY, c), _chunkQAUIZPYIcjs.rotateMatrix.call(void 0, rotation, c)), _chunkQAUIZPYIcjs.translateMatrix.call(void 0, dx, dy));
1477
+ let matrix = _chunkBQE3Y6ZOcjs.multiplyMatrices.call(void 0, _chunkBQE3Y6ZOcjs.multiplyMatrices.call(void 0, _chunkBQE3Y6ZOcjs.scaleMatrix.call(void 0, scaleX, scaleY, c), _chunkBQE3Y6ZOcjs.rotateMatrix.call(void 0, rotation, c)), _chunkBQE3Y6ZOcjs.translateMatrix.call(void 0, dx, dy));
1478
1478
  const along = follow ? followAt(entry, timeline, nodes, time) : null;
1479
- if (along) matrix = _chunkQAUIZPYIcjs.multiplyMatrices.call(void 0, matrix, _chunkQAUIZPYIcjs.multiplyMatrices.call(void 0, _chunkQAUIZPYIcjs.multiplyMatrices.call(void 0, _chunkQAUIZPYIcjs.translateMatrix.call(void 0, -c.x, -c.y), _chunkQAUIZPYIcjs.rotateMatrix.call(void 0, along.angle)), _chunkQAUIZPYIcjs.translateMatrix.call(void 0, along.x, along.y)));
1479
+ if (along) matrix = _chunkBQE3Y6ZOcjs.multiplyMatrices.call(void 0, matrix, _chunkBQE3Y6ZOcjs.multiplyMatrices.call(void 0, _chunkBQE3Y6ZOcjs.multiplyMatrices.call(void 0, _chunkBQE3Y6ZOcjs.translateMatrix.call(void 0, -c.x, -c.y), _chunkBQE3Y6ZOcjs.rotateMatrix.call(void 0, along.angle)), _chunkBQE3Y6ZOcjs.translateMatrix.call(void 0, along.x, along.y)));
1480
1480
  return { matrix, dx, dy, rotation, scaleX, scaleY, follow: along };
1481
1481
  }
1482
1482
  function motionNodeClips(id, timeline, time) {
@@ -1543,7 +1543,7 @@ function motionFrameAt(scene, time, options = {}) {
1543
1543
  const start = Math.min(1, Math.max(0, typeof drawStart === "number" ? drawStart : 0));
1544
1544
  const end = Math.min(1, Math.max(0, typeof drawEnd === "number" ? drawEnd : 1));
1545
1545
  if (start > 0 || end < 1) {
1546
- const trim = _chunkQAUIZPYIcjs.createVectorEffect.call(void 0, "trim", MOTION_DRAW_EFFECT_ID, { start: tidy(start * 100), end: tidy(end * 100) });
1546
+ const trim = _chunkBQE3Y6ZOcjs.createVectorEffect.call(void 0, "trim", MOTION_DRAW_EFFECT_ID, { start: tidy(start * 100), end: tidy(end * 100) });
1547
1547
  p = { ...p, effects: [trim, ...(_nullishCoalesce(p.effects, () => ( []))).filter((e) => e.id !== MOTION_DRAW_EFFECT_ID)] };
1548
1548
  }
1549
1549
  }
@@ -1557,8 +1557,8 @@ function motionFrameAt(scene, time, options = {}) {
1557
1557
  if (o >= 1) delete out.opacity;
1558
1558
  }
1559
1559
  const offset = options.offsets === false ? null : motionNodeOffset(entry, timeline, time, nodes);
1560
- if (offset && !_chunkQAUIZPYIcjs.isIdentityMatrix.call(void 0, offset.matrix)) {
1561
- const m = _chunkQAUIZPYIcjs.multiplyMatrices.call(void 0, _chunkQAUIZPYIcjs.nodeMatrix.call(void 0, out), offset.matrix).map(tidy);
1560
+ if (offset && !_chunkBQE3Y6ZOcjs.isIdentityMatrix.call(void 0, offset.matrix)) {
1561
+ const m = _chunkBQE3Y6ZOcjs.multiplyMatrices.call(void 0, _chunkBQE3Y6ZOcjs.nodeMatrix.call(void 0, out), offset.matrix).map(tidy);
1562
1562
  out = { ...out, transform: m };
1563
1563
  }
1564
1564
  return out;
@@ -1578,7 +1578,7 @@ function motionFrameToSvg(scene, time, options = {}) {
1578
1578
  const wrap = { ...options.wrap };
1579
1579
  for (const [id, clips] of Object.entries(frame.clips))
1580
1580
  wrap[id] = [..._nullishCoalesce(wrap[id], () => ( [])), ...clips.map((clip, i) => ({ clip: { id: `${prefix}reveal-${id}-${i}`, shape: clip.shape, attrs: motionClipAttrs(clip) } }))];
1581
- return withViewBox(_chunkQAUIZPYIcjs.vectorDocumentToSvg.call(void 0, frame.document, { ...options, wrap }), frame.camera);
1581
+ return withViewBox(_chunkBQE3Y6ZOcjs.vectorDocumentToSvg.call(void 0, frame.document, { ...options, wrap }), frame.camera);
1582
1582
  }
1583
1583
  function withViewBox(svg, box) {
1584
1584
  const f = (n) => String(Math.round(n * 1e3) / 1e3);
@@ -1761,8 +1761,8 @@ function visibleAt(timeline, id, time, node) {
1761
1761
  if (Array.isArray(rect) && (rect[2] <= 1e-4 || rect[3] <= 1e-4)) return false;
1762
1762
  const circle = clip("clipCircle");
1763
1763
  if (Array.isArray(circle) && circle[2] <= 1e-4) return false;
1764
- const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" : _chunkQAUIZPYIcjs.collectPathNodes.call(void 0, node).some((p) => p.fill && p.fill !== "none");
1765
- const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" || _chunkQAUIZPYIcjs.collectPathNodes.call(void 0, node).length === 0 || _chunkQAUIZPYIcjs.collectPathNodes.call(void 0, node).some((p) => {
1764
+ const hasFill = node.type === "path" ? !!node.fill && node.fill !== "none" : _chunkBQE3Y6ZOcjs.collectPathNodes.call(void 0, node).some((p) => p.fill && p.fill !== "none");
1765
+ const drawn = num2("drawEnd", 1) > 0.01 && (node.type === "path" || _chunkBQE3Y6ZOcjs.collectPathNodes.call(void 0, node).length === 0 || _chunkBQE3Y6ZOcjs.collectPathNodes.call(void 0, node).some((p) => {
1766
1766
  const v = trackValue(timeline.tracks.get(motionTrackKey(p.id, "drawEnd")), time);
1767
1767
  return typeof v !== "number" || v > 0.01;
1768
1768
  }));
@@ -1848,7 +1848,7 @@ function checkMotionScene(scene) {
1848
1848
  }
1849
1849
  for (const id of targets) {
1850
1850
  const node = nodes.get(id).node;
1851
- const paths = node.type === "path" ? [node] : _chunkQAUIZPYIcjs.collectPathNodes.call(void 0, node);
1851
+ const paths = node.type === "path" ? [node] : _chunkBQE3Y6ZOcjs.collectPathNodes.call(void 0, node);
1852
1852
  if (paths.some((p) => p[key] !== void 0 && p[key] !== null && typeof p[key] !== "string"))
1853
1853
  issues.push(_chunkEBDZWIOPcjs.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] }));
1854
1854
  }
@@ -1861,7 +1861,7 @@ function checkMotionScene(scene) {
1861
1861
  else
1862
1862
  for (const id of targets) {
1863
1863
  const node = nodes.get(id).node;
1864
- const paths = node.type === "path" ? [node] : _chunkQAUIZPYIcjs.collectPathNodes.call(void 0, node);
1864
+ const paths = node.type === "path" ? [node] : _chunkBQE3Y6ZOcjs.collectPathNodes.call(void 0, node);
1865
1865
  if (paths.some((p) => typeof p[key] !== "string"))
1866
1866
  issues.push(_chunkEBDZWIOPcjs.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] }));
1867
1867
  }
@@ -2306,7 +2306,7 @@ function motionNodePose(scene, id, time) {
2306
2306
  if (!entry) throw new Error(`There is no element ${_chunkEBDZWIOPcjs.namedWithSuggestion.call(void 0, id, [...indexMotionNodes(scene.artwork.nodes).keys()])} in the artwork.`);
2307
2307
  const timeline = compileMotionScene(scene);
2308
2308
  const drawn = indexMotionNodes(motionFrameAt(scene, time).document.nodes).get(id);
2309
- const centre = _chunkQAUIZPYIcjs.applyMatrix.call(void 0, entry.parentWorld, { x: entry.center.x + motionPropertyValue(timeline, id, "x", time), y: entry.center.y + motionPropertyValue(timeline, id, "y", time) });
2309
+ const centre = _chunkBQE3Y6ZOcjs.applyMatrix.call(void 0, entry.parentWorld, { x: entry.center.x + motionPropertyValue(timeline, id, "x", time), y: entry.center.y + motionPropertyValue(timeline, id, "y", time) });
2310
2310
  const paint = (property) => _nullishCoalesce(trackValue(timeline.tracks.get(motionTrackKey(id, property)), time), () => ( motionRestValue(entry, property, scene.artwork)));
2311
2311
  const fill = paint("fill");
2312
2312
  const stroke = paint("stroke");
@@ -2653,7 +2653,7 @@ function toFlairSvgMotion(scene, options = {}) {
2653
2653
  raw: (t) => transformAt(t, true)
2654
2654
  });
2655
2655
  }
2656
- const paths = node.type === "path" ? [node] : _chunkQAUIZPYIcjs.collectPathNodes.call(void 0, node);
2656
+ const paths = node.type === "path" ? [node] : _chunkBQE3Y6ZOcjs.collectPathNodes.call(void 0, node);
2657
2657
  for (const path of paths) {
2658
2658
  if (pathsSeen.has(path.id)) continue;
2659
2659
  pathsSeen.add(path.id);
@@ -2675,7 +2675,7 @@ function toFlairSvgMotion(scene, options = {}) {
2675
2675
  if (shapeSegments.length) {
2676
2676
  if (node.type !== "path") notes.push(`"${id}" is a group: its morph or effect animation is not exported (Flair tweens one path's "d").`);
2677
2677
  else {
2678
- const inverse = _chunkQAUIZPYIcjs.invertMatrix.call(void 0, _chunkQAUIZPYIcjs.nodeMatrix.call(void 0, node));
2678
+ const inverse = _chunkBQE3Y6ZOcjs.invertMatrix.call(void 0, _chunkBQE3Y6ZOcjs.nodeMatrix.call(void 0, node));
2679
2679
  channels.push({
2680
2680
  id,
2681
2681
  kind: "attr",
@@ -2684,9 +2684,9 @@ function toFlairSvgMotion(scene, options = {}) {
2684
2684
  exact: () => false,
2685
2685
  value: (t) => {
2686
2686
  const frame = motionFrameAt(scene, t, { draw: false, offsets: false });
2687
- const now = _chunkQAUIZPYIcjs.expandVectorAppearance.call(void 0, _optionalChain([indexMotionNodes, 'call', _114 => _114(frame.document.nodes), 'access', _115 => _115.get, 'call', _116 => _116(id), 'optionalAccess', _117 => _117.node]));
2687
+ const now = _chunkBQE3Y6ZOcjs.expandVectorAppearance.call(void 0, _optionalChain([indexMotionNodes, 'call', _114 => _114(frame.document.nodes), 'access', _115 => _115.get, 'call', _116 => _116(id), 'optionalAccess', _117 => _117.node]));
2688
2688
  if (!now || now.type !== "path") return "";
2689
- const bezier = _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, _chunkQAUIZPYIcjs.vectorPathWorldBezier.call(void 0, now, _chunkQAUIZPYIcjs.IDENTITY_MATRIX, { effects: false }), inverse);
2689
+ const bezier = _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, _chunkBQE3Y6ZOcjs.vectorPathWorldBezier.call(void 0, now, _chunkBQE3Y6ZOcjs.IDENTITY_MATRIX, { effects: false }), inverse);
2690
2690
  return _chunkGF2RBSDMcjs.bezierPathToSvg.call(void 0, bezier, { precision: Math.min(precision, 2) });
2691
2691
  }
2692
2692
  });
@@ -2793,7 +2793,7 @@ function toFlairSvgMotion(scene, options = {}) {
2793
2793
  }
2794
2794
  if (scene.motionBlur) notes.push("Motion blur is drawn on the stage only; Flair plays the scene sharp.");
2795
2795
  if (trigger && (_nullishCoalesce(scene.loop, () => ( "none"))) !== "none") notes.push(`The scene plays on ${trigger}, so its loop does not apply in Flair.`);
2796
- let svg = _chunkQAUIZPYIcjs.vectorDocumentToSvg.call(void 0, { ...scene.artwork, nodes: _chunkQAUIZPYIcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) }, { pretty: false, precision, wrap });
2796
+ let svg = _chunkBQE3Y6ZOcjs.vectorDocumentToSvg.call(void 0, { ...scene.artwork, nodes: _chunkBQE3Y6ZOcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) }, { pretty: false, precision, wrap });
2797
2797
  if (routes.length) svg = svg.replace(/^(<svg[^>]*>)/, `$1<defs>${routes.join("")}</defs>`);
2798
2798
  let motion = { svg, animate };
2799
2799
  if (_optionalChain([scene, 'access', _120 => _120.controls, 'optionalAccess', _121 => _121.length])) {
@@ -2877,14 +2877,14 @@ function easingOf(ease, fallback) {
2877
2877
  return fallback;
2878
2878
  }
2879
2879
  function poseOf(value, entry) {
2880
- const t = _chunkQAUIZPYIcjs.parseSvgTransform.call(void 0, String(value));
2881
- const o = _chunkQAUIZPYIcjs.multiplyMatrices.call(void 0, _nullishCoalesce(_chunkQAUIZPYIcjs.invertMatrix.call(void 0, _chunkQAUIZPYIcjs.nodeMatrix.call(void 0, entry.node)), () => ( [1, 0, 0, 1, 0, 0])), t);
2880
+ const t = _chunkBQE3Y6ZOcjs.parseSvgTransform.call(void 0, String(value));
2881
+ const o = _chunkBQE3Y6ZOcjs.multiplyMatrices.call(void 0, _nullishCoalesce(_chunkBQE3Y6ZOcjs.invertMatrix.call(void 0, _chunkBQE3Y6ZOcjs.nodeMatrix.call(void 0, entry.node)), () => ( [1, 0, 0, 1, 0, 0])), t);
2882
2882
  const sx = Math.hypot(o[0], o[1]);
2883
2883
  if (!(sx > 1e-9)) return null;
2884
2884
  const sy = (o[0] * o[3] - o[1] * o[2]) / sx;
2885
2885
  if (Math.abs(o[2] + o[1] / sx * sy) > 1e-6 || Math.abs(o[3] - o[0] / sx * sy) > 1e-6) return null;
2886
2886
  const c = entry.center;
2887
- const moved = _chunkQAUIZPYIcjs.applyMatrix.call(void 0, o, c);
2887
+ const moved = _chunkBQE3Y6ZOcjs.applyMatrix.call(void 0, o, c);
2888
2888
  return { dx: moved.x - c.x, dy: moved.y - c.y, rotation: Math.atan2(o[1], o[0]) * 180 / Math.PI, sx, sy };
2889
2889
  }
2890
2890
  var near = (a, b, eps = 1e-6) => Math.abs(a - b) < eps;
@@ -2969,7 +2969,7 @@ function fromFlairSvgMotion(input, options = {}) {
2969
2969
  const notes = [];
2970
2970
  if (!input || typeof input.svg !== "string") throw new Error('Give a Flair SvgMotion: { svg: "<svg \u2026>", animate: [ \u2026 ] }.');
2971
2971
  const { motion, controls } = resolvePlaceholders(input, notes);
2972
- const artwork = _chunkQAUIZPYIcjs.parseVectorSvg.call(void 0, motion.svg);
2972
+ const artwork = _chunkBQE3Y6ZOcjs.parseVectorSvg.call(void 0, motion.svg);
2973
2973
  const nodes = indexMotionNodes(artwork.nodes);
2974
2974
  const byStep = /* @__PURE__ */ new Map();
2975
2975
  for (const anim of _nullishCoalesce(motion.animate, () => ( []))) {
@@ -3216,9 +3216,9 @@ function toLottie(scene, options = {}) {
3216
3216
  const items = [];
3217
3217
  const shapeSegments = [...timeline.tracks.entries()].filter(([k]) => k.startsWith(`${path.id}\0`) && (k.endsWith("\0shape") || k.includes("\0effect:"))).flatMap(([, v]) => v);
3218
3218
  const geometryAt = (t) => {
3219
- if (!shapeSegments.length) return _chunkQAUIZPYIcjs.vectorPathWorldBezier.call(void 0, path);
3219
+ if (!shapeSegments.length) return _chunkBQE3Y6ZOcjs.vectorPathWorldBezier.call(void 0, path);
3220
3220
  const now = _optionalChain([indexMotionNodes, 'call', _130 => _130(motionFrameAt(scene, t, { draw: false, offsets: false }).document.nodes), 'access', _131 => _131.get, 'call', _132 => _132(path.id), 'optionalAccess', _133 => _133.node]);
3221
- return now && now.type === "path" ? _chunkQAUIZPYIcjs.vectorPathWorldBezier.call(void 0, _chunkQAUIZPYIcjs.expandVectorAppearances.call(void 0, [now])[0]) : _chunkQAUIZPYIcjs.vectorPathWorldBezier.call(void 0, path);
3221
+ return now && now.type === "path" ? _chunkBQE3Y6ZOcjs.vectorPathWorldBezier.call(void 0, _chunkBQE3Y6ZOcjs.expandVectorAppearances.call(void 0, [now])[0]) : _chunkBQE3Y6ZOcjs.vectorPathWorldBezier.call(void 0, path);
3222
3222
  };
3223
3223
  const rest = lottieContours(_chunkGF2RBSDMcjs.toBezierPath.call(void 0, geometryAt(0)), round3);
3224
3224
  rest.forEach((contour, n) => {
@@ -3291,13 +3291,13 @@ function toLottie(scene, options = {}) {
3291
3291
  const innerTr = STATIC_TR();
3292
3292
  if (node.type === "path") inner = [...pathShapes(node)];
3293
3293
  else if (node.type === "text" || node.type === "instance") {
3294
- const drawn = _chunkQAUIZPYIcjs.expandVectorAppearance.call(void 0, node);
3294
+ const drawn = _chunkBQE3Y6ZOcjs.expandVectorAppearance.call(void 0, node);
3295
3295
  inner = drawn.type === "path" ? [...pathShapes(drawn)] : drawn.children.filter((c) => c.type === "path").reverse().flatMap((c) => [...pathShapes(c)]);
3296
- notes.push(`"${node.id}": text is exported as its outlines${_chunkQAUIZPYIcjs.vectorTextHasOutlines.call(void 0, ) ? "" : " (glyph boxes: set an outline text shaper for real glyphs)"}.`);
3296
+ notes.push(`"${node.id}": text is exported as its outlines${_chunkBQE3Y6ZOcjs.vectorTextHasOutlines.call(void 0, ) ? "" : " (glyph boxes: set an outline text shaper for real glyphs)"}.`);
3297
3297
  } else {
3298
3298
  inner = shown(node.children).reverse().map(nodeGroup);
3299
- const m = _chunkQAUIZPYIcjs.nodeMatrix.call(void 0, node);
3300
- if (m !== _chunkQAUIZPYIcjs.IDENTITY_MATRIX) {
3299
+ const m = _chunkBQE3Y6ZOcjs.nodeMatrix.call(void 0, node);
3300
+ if (m !== _chunkBQE3Y6ZOcjs.IDENTITY_MATRIX) {
3301
3301
  const parts = staticParts(m);
3302
3302
  if (!parts) notes.push(`"${node.id}": its transform skews, which is not exported; it is drawn without the skew.`);
3303
3303
  else {
@@ -3310,7 +3310,7 @@ function toLottie(scene, options = {}) {
3310
3310
  const body = { ty: "gr", nm: `${node.id} (own)`, it: [...inner, innerTr] };
3311
3311
  return { ty: "gr", nm: _nullishCoalesce(node.name, () => ( node.id)), it: [body, poseTransform(entry)] };
3312
3312
  };
3313
- const artwork = { ...scene.artwork, nodes: _chunkQAUIZPYIcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) };
3313
+ const artwork = { ...scene.artwork, nodes: _chunkBQE3Y6ZOcjs.expandVectorAppearances.call(void 0, scene.artwork.nodes) };
3314
3314
  const content = shown(artwork.nodes).reverse().map(nodeGroup);
3315
3315
  if (artwork.background && rgba(artwork.background))
3316
3316
  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(round3) }, o: { a: 0, k: 100 }, r: 1 }, STATIC_TR()] });
@@ -3409,11 +3409,11 @@ function preset(prst, w, h) {
3409
3409
  const poly = (pts) => [{ closed: true, anchors: pts.map(([x, y]) => ({ x, y })) }];
3410
3410
  switch (prst) {
3411
3411
  case "rect":
3412
- return [_chunkQAUIZPYIcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
3412
+ return [_chunkBQE3Y6ZOcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
3413
3413
  case "roundRect":
3414
- return [_chunkQAUIZPYIcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h }, Math.min(w, h) * 0.16667)];
3414
+ return [_chunkBQE3Y6ZOcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h }, Math.min(w, h) * 0.16667)];
3415
3415
  case "ellipse":
3416
- return [_chunkQAUIZPYIcjs.ellipseSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
3416
+ return [_chunkBQE3Y6ZOcjs.ellipseSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
3417
3417
  case "triangle":
3418
3418
  return poly([[w / 2, 0], [w, h], [0, h]]);
3419
3419
  case "rtTriangle":
@@ -3521,7 +3521,7 @@ function shapes(ctx, tree, map) {
3521
3521
  let subpaths = cust ? custom(cust, w, h) : prst ? preset(prst, w, h) : null;
3522
3522
  if (!subpaths) {
3523
3523
  if (prst) ctx.notes.push(`"${name}" is a ${prst}, drawn as its bounding rectangle.`);
3524
- subpaths = [_chunkQAUIZPYIcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
3524
+ subpaths = [_chunkBQE3Y6ZOcjs.rectSubpath.call(void 0, { x: 0, y: 0, width: w, height: h })];
3525
3525
  }
3526
3526
  const style = kid(el, "style");
3527
3527
  const fill = kid(spPr, "noFill") ? null : _nullishCoalesce(colour(ctx, kid(spPr, "solidFill")), () => ( (el.localName === "cxnSp" ? null : colour(ctx, kid(style, "fillRef")))));
@@ -3759,7 +3759,7 @@ function nextMotionEffectInstance(scene) {
3759
3759
  walk(scene.artwork.nodes);
3760
3760
  for (let i = 1; ; i++) if (!used.has(`fx${i}`)) return `fx${i}`;
3761
3761
  }
3762
- var motionArtworkSvg = (artwork) => _chunkQAUIZPYIcjs.vectorDocumentToSvg.call(void 0, artwork);
3762
+ var motionArtworkSvg = (artwork) => _chunkBQE3Y6ZOcjs.vectorDocumentToSvg.call(void 0, artwork);
3763
3763
  var tag = (commands, source) => commands.map((c) => c.type === "wait" ? c : { ...c, source });
3764
3764
  function motionCommandsFromEffect(artwork, motion, source) {
3765
3765
  const imported = fromFlairSvgMotion({ svg: motionArtworkSvg(artwork), animate: [..._nullishCoalesce(motion.animate, () => ( []))] });
@@ -5086,7 +5086,7 @@ function createAnimationEditorToolProvider(controller, options = {}) {
5086
5086
  handler: ({ svg }) => {
5087
5087
  let artwork;
5088
5088
  try {
5089
- artwork = _chunkQAUIZPYIcjs.parseVectorSvg.call(void 0, svg);
5089
+ artwork = _chunkBQE3Y6ZOcjs.parseVectorSvg.call(void 0, svg);
5090
5090
  } catch (error) {
5091
5091
  throw new Error(`The SVG could not be read: ${error.message}. Nothing was changed.`);
5092
5092
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createVectorMorph
3
- } from "../chunk-BGOCAUXH.js";
3
+ } from "../chunk-YMREOA67.js";
4
4
  import {
5
5
  MOTION_ISSUE_CODES,
6
6
  motionIssue,
@@ -31,8 +31,8 @@ import {
31
31
  vectorNodeBounds,
32
32
  vectorPathWorldBezier,
33
33
  vectorTextHasOutlines
34
- } from "../chunk-NDMXB4PR.js";
35
- import "../chunk-F7YA3MMC.js";
34
+ } from "../chunk-CU6ANS5L.js";
35
+ import "../chunk-TQOL6CF7.js";
36
36
  import "../chunk-M6DNZNVY.js";
37
37
  import {
38
38
  bezierPathLength,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  pathDataToPolyline
3
- } from "./chunk-G4E6RUPC.js";
3
+ } from "./chunk-CDP2AKMA.js";
4
4
  import {
5
5
  parseCssColor
6
6
  } from "./chunk-3CI7FRMK.js";
7
7
  import {
8
8
  BUILTIN_BRUSHES
9
- } from "./chunk-F7YA3MMC.js";
9
+ } from "./chunk-TQOL6CF7.js";
10
10
  import {
11
11
  formatNumber,
12
12
  getShapeSvg,
@@ -1,12 +1,12 @@
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; }
2
2
 
3
- var _chunkZMHPQ6HPcjs = require('./chunk-ZMHPQ6HP.cjs');
3
+ var _chunkV3L7U63Ncjs = require('./chunk-V3L7U63N.cjs');
4
4
 
5
5
 
6
6
  var _chunkA2IS7EHEcjs = require('./chunk-A2IS7EHE.cjs');
7
7
 
8
8
 
9
- var _chunkROVK6AXXcjs = require('./chunk-ROVK6AXX.cjs');
9
+ var _chunkGNZI3KYKcjs = require('./chunk-GNZI3KYK.cjs');
10
10
 
11
11
 
12
12
 
@@ -24,14 +24,14 @@ require('./chunk-474IQG74.cjs');
24
24
  require('./chunk-XFM3OCHU.cjs');
25
25
 
26
26
  // src/canvas/brushstrokeRender.ts
27
- var DRY = _chunkROVK6AXXcjs.BUILTIN_BRUSHES.filter((b) => _chunkPQ3H2AANcjs.isBrushstrokeBrush.call(void 0, b));
27
+ var DRY = _chunkGNZI3KYKcjs.BUILTIN_BRUSHES.filter((b) => _chunkPQ3H2AANcjs.isBrushstrokeBrush.call(void 0, b));
28
28
  function listCanvasBrushes() {
29
29
  return DRY.map((b) => ({ id: b.id, name: b.name, category: b.category, size: b.tip.size }));
30
30
  }
31
31
  function resolveCanvasBrush(brush, width) {
32
32
  const given = width !== void 0 && Number.isFinite(width) ? Math.max(1, width) : void 0;
33
33
  if (typeof brush === "string") {
34
- const preset = _chunkROVK6AXXcjs.BUILTIN_BRUSHES.find((b) => b.id === brush);
34
+ const preset = _chunkGNZI3KYKcjs.BUILTIN_BRUSHES.find((b) => b.id === brush);
35
35
  const ids = DRY.map((b) => b.id).join(", ");
36
36
  if (!preset) throw new Error(`Unknown brush '${brush}'. Use one of the dry paint presets (${ids}) or tip settings ({ hardness, spacing, flow, \u2026 }).`);
37
37
  if (!_chunkPQ3H2AANcjs.isBrushstrokeBrush.call(void 0, preset)) {
@@ -73,7 +73,7 @@ function renderShapeBrushstrokeNow(shape, scale, place = {}) {
73
73
  const textured = typeof seed === "number" && Number.isFinite(seed);
74
74
  const size = _nullishCoalesce(shape.brush.size, () => ( (textured ? void 0 : _nullishCoalesce(shape.strokeWidth, () => ( 3)))));
75
75
  const brush = resolveCanvasBrush(shape.brush.brush, size);
76
- const points = _chunkZMHPQ6HPcjs.pathDataToPolyline.call(void 0, shape.d);
76
+ const points = _chunkV3L7U63Ncjs.pathDataToPolyline.call(void 0, shape.d);
77
77
  if (!points.length) return null;
78
78
  const { pressure, tiltX, tiltY } = shape.brush;
79
79
  const input = {