@pixerate/editor 0.241.0 → 0.243.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 (75) hide show
  1. package/dist/animation-editor/controller.d.cts +10 -0
  2. package/dist/animation-editor/controller.d.ts +10 -0
  3. package/dist/animation-editor/effects.d.cts +1 -1
  4. package/dist/animation-editor/effects.d.ts +1 -1
  5. package/dist/animation-editor/index.cjs +195 -146
  6. package/dist/animation-editor/index.js +63 -14
  7. package/dist/{brushstrokeRender-MOYGEXOC.js → brushstrokeRender-274HGNZR.js} +3 -3
  8. package/dist/{brushstrokeRender-UKADOV5D.cjs → brushstrokeRender-C7RJZPMC.cjs} +5 -5
  9. package/dist/canvas/index.cjs +15 -15
  10. package/dist/canvas/index.js +2 -2
  11. package/dist/{chunk-KCMV2534.cjs → chunk-3WOZEBXZ.cjs} +2 -2
  12. package/dist/{chunk-ZDPLZDTT.js → chunk-4ZHXLFXS.js} +1 -1
  13. package/dist/{chunk-5BR7LC24.cjs → chunk-5FZS7J7C.cjs} +50 -4
  14. package/dist/{chunk-ILM6GYAX.js → chunk-6L3WWIDW.js} +1 -1
  15. package/dist/{chunk-A7PQNIBX.cjs → chunk-7V7QMFTI.cjs} +14 -14
  16. package/dist/{chunk-JAOSL334.cjs → chunk-GHCSC2WP.cjs} +38 -16
  17. package/dist/{chunk-UDBDYZET.js → chunk-H4Z72Z4Z.js} +1 -1
  18. package/dist/{chunk-XBZK47LV.js → chunk-HQZHOPNE.js} +49 -3
  19. package/dist/{chunk-QP2B3MID.js → chunk-IXI5KATU.js} +1 -1
  20. package/dist/{chunk-JWCKJNDR.cjs → chunk-K5DS2JTA.cjs} +6 -6
  21. package/dist/{chunk-HGGJ36HR.cjs → chunk-KK2FWMA2.cjs} +1 -1
  22. package/dist/{chunk-WDDUPWVG.js → chunk-L3JFOTBQ.js} +1 -1
  23. package/dist/{chunk-SIK3LT6M.js → chunk-OFH6Q67U.js} +28 -6
  24. package/dist/{chunk-AFLMXITL.cjs → chunk-OONFIFEU.cjs} +23 -23
  25. package/dist/{chunk-HW72ABGR.cjs → chunk-R2FVAKFH.cjs} +86 -86
  26. package/dist/{chunk-G3RUKJ5C.js → chunk-RXZL4NG5.js} +1 -1
  27. package/dist/{chunk-NE6OOKWJ.js → chunk-SRXWDOUI.js} +1 -1
  28. package/dist/{chunk-7F4G74UQ.cjs → chunk-UV7OOZJQ.cjs} +35 -35
  29. package/dist/{chunk-TEFQISBY.js → chunk-X3ZINLIP.js} +1 -1
  30. package/dist/{chunk-ZQIWBJGH.cjs → chunk-XNZFVYC2.cjs} +7 -7
  31. package/dist/effects/fake.d.cts +4 -0
  32. package/dist/effects/fake.d.ts +4 -0
  33. package/dist/effects/helpers.d.cts +6 -0
  34. package/dist/effects/helpers.d.ts +6 -0
  35. package/dist/effects/index.cjs +222 -94
  36. package/dist/effects/index.js +131 -3
  37. package/dist/effects/types.d.cts +31 -0
  38. package/dist/effects/types.d.ts +31 -0
  39. package/dist/image-editor/index.cjs +788 -788
  40. package/dist/image-editor/index.js +5 -5
  41. package/dist/paint-editor/brushes.d.cts +18 -2
  42. package/dist/paint-editor/brushes.d.ts +18 -2
  43. package/dist/paint-editor/controller.d.cts +28 -0
  44. package/dist/paint-editor/controller.d.ts +28 -0
  45. package/dist/paint-editor/document.d.cts +3 -0
  46. package/dist/paint-editor/document.d.ts +3 -0
  47. package/dist/paint-editor/index.cjs +1017 -499
  48. package/dist/paint-editor/index.js +562 -44
  49. package/dist/paint-editor/light.d.cts +74 -0
  50. package/dist/paint-editor/light.d.ts +74 -0
  51. package/dist/paint-editor/stroke.d.cts +14 -0
  52. package/dist/paint-editor/stroke.d.ts +14 -0
  53. package/dist/paint-editor/thick-tools.d.cts +2 -2
  54. package/dist/paint-editor/thick-tools.d.ts +2 -2
  55. package/dist/paint-editor/thick.d.cts +5 -1
  56. package/dist/paint-editor/thick.d.ts +5 -1
  57. package/dist/paint-editor/ui.d.cts +2 -0
  58. package/dist/paint-editor/ui.d.ts +2 -0
  59. package/dist/vector/index.cjs +968 -968
  60. package/dist/vector/index.js +5 -5
  61. package/dist/video-editor/controller.d.cts +49 -1
  62. package/dist/video-editor/controller.d.ts +49 -1
  63. package/dist/video-editor/effect-path.d.cts +66 -0
  64. package/dist/video-editor/effect-path.d.ts +66 -0
  65. package/dist/video-editor/index.cjs +616 -427
  66. package/dist/video-editor/index.d.cts +1 -0
  67. package/dist/video-editor/index.d.ts +1 -0
  68. package/dist/video-editor/index.js +193 -4
  69. package/package.json +1 -1
  70. package/skills/pixerate-animation-editor/SKILL.md +1 -1
  71. package/skills/pixerate-paint-editor/SKILL.md +9 -9
  72. package/skills/pixerate-paint-editor/references/canvas-hosted.md +8 -0
  73. package/skills/pixerate-paint-editor/references/light-paint.md +31 -0
  74. package/skills/pixerate-paint-oil-impasto/SKILL.md +1 -0
  75. package/skills/pixerate-video-editor/SKILL.md +9 -2
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
 
21
- var _chunkKCMV2534cjs = require('./chunk-KCMV2534.cjs');
21
+ var _chunk3WOZEBXZcjs = require('./chunk-3WOZEBXZ.cjs');
22
22
 
23
23
 
24
24
 
@@ -37,7 +37,7 @@ var lerpP = (a, b, t) => [a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t];
37
37
  var toP = (v) => [v.x, v.y];
38
38
  var mapP = (m, p) => [m[0] * p[0] + m[2] * p[1] + m[4], m[1] * p[0] + m[3] * p[1] + m[5]];
39
39
  var curvesOf = (c) => Math.max(0, (c.pts.length - 1) / 3) | 0;
40
- function subpathToMorphContour(sp, m = _chunkKCMV2534cjs.IDENTITY_MATRIX) {
40
+ function subpathToMorphContour(sp, m = _chunk3WOZEBXZcjs.IDENTITY_MATRIX) {
41
41
  const n = sp.anchors.length;
42
42
  if (!n) return null;
43
43
  const first = mapP(m, toP(sp.anchors[0]));
@@ -67,8 +67,8 @@ function isStraight(p0, p1, p2, p3) {
67
67
  const u2 = along(p2);
68
68
  return off(p1) < tol && off(p2) < tol && u1 >= -1e-9 && u1 <= 1 + 1e-9 && u2 >= -1e-9 && u2 <= 1 + 1e-9;
69
69
  }
70
- function morphContourToSubpath(c, m = _chunkKCMV2534cjs.IDENTITY_MATRIX, closed = c.closed) {
71
- const pts = _chunkKCMV2534cjs.isIdentityMatrix.call(void 0, m) ? c.pts : c.pts.map((p) => mapP(m, p));
70
+ function morphContourToSubpath(c, m = _chunk3WOZEBXZcjs.IDENTITY_MATRIX, closed = c.closed) {
71
+ const pts = _chunk3WOZEBXZcjs.isIdentityMatrix.call(void 0, m) ? c.pts : c.pts.map((p) => mapP(m, p));
72
72
  const curves = curvesOf(c);
73
73
  const dropLast = closed && c.closed && curves > 0;
74
74
  const count = dropLast ? curves : curves + 1;
@@ -84,7 +84,7 @@ function morphContourToSubpath(c, m = _chunkKCMV2534cjs.IDENTITY_MATRIX, closed
84
84
  anchors[(k + 1) % count].in = { x: p2[0], y: p2[1] };
85
85
  }
86
86
  for (const a of anchors) {
87
- const type = _chunkKCMV2534cjs.inferAnchorType.call(void 0, a);
87
+ const type = _chunk3WOZEBXZcjs.inferAnchorType.call(void 0, a);
88
88
  if (type !== "corner") a.type = type;
89
89
  }
90
90
  const isClosed = closed && curves > 0;
@@ -267,7 +267,7 @@ function bestStart(fixed, free, useShapeContext) {
267
267
  return best;
268
268
  }
269
269
  function placeIn(c, from, to) {
270
- const b = _chunkKCMV2534cjs.unionBounds.call(void 0, [boundsOfPoints(c.pts)]);
270
+ const b = _chunk3WOZEBXZcjs.unionBounds.call(void 0, [boundsOfPoints(c.pts)]);
271
271
  const p = b ? [b.x + b.width / 2, b.y + b.height / 2] : c.pts[0];
272
272
  if (!from || !to) return p;
273
273
  const fx = from.width > 0 ? (p[0] - from.x) / from.width : 0.5;
@@ -456,7 +456,7 @@ function interpolateVectorColor(a, b, t) {
456
456
  }
457
457
  function resampleGradientStops(g, offsets) {
458
458
  return offsets.map((offset) => {
459
- const s = _chunkKCMV2534cjs.sampleVectorGradient.call(void 0, g, offset);
459
+ const s = _chunk3WOZEBXZcjs.sampleVectorGradient.call(void 0, g, offset);
460
460
  return s.opacity < 1 ? { offset, color: s.color, opacity: Math.round(s.opacity * 1e4) / 1e4 } : { offset, color: s.color };
461
461
  });
462
462
  }
@@ -467,11 +467,11 @@ function lerpAngle(a, b, t) {
467
467
  var lerpPoint = (a, b, t) => ({ x: lerpN(a.x, b.x, t), y: lerpN(a.y, b.y, t) });
468
468
  var sameColourModel = (a, b) => (_nullishCoalesce(a.interpolation, () => ( "srgb"))) === (_nullishCoalesce(b.interpolation, () => ( "srgb"))) && (_nullishCoalesce(a.smoothness, () => ( 0))) === (_nullishCoalesce(b.smoothness, () => ( 0)));
469
469
  function lerpStops(a, b, t) {
470
- let stopsA = _chunkKCMV2534cjs.sortedVectorGradientStops.call(void 0, a);
471
- let stopsB = _chunkKCMV2534cjs.sortedVectorGradientStops.call(void 0, b);
470
+ let stopsA = _chunk3WOZEBXZcjs.sortedVectorGradientStops.call(void 0, a);
471
+ let stopsB = _chunk3WOZEBXZcjs.sortedVectorGradientStops.call(void 0, b);
472
472
  const resampled = stopsA.length !== stopsB.length || !sameColourModel(a, b);
473
473
  if (resampled) {
474
- const offs = [..._chunkKCMV2534cjs.expandVectorGradientStops.call(void 0, a), ..._chunkKCMV2534cjs.expandVectorGradientStops.call(void 0, b), ...stopsA, ...stopsB].map((s) => s.offset).filter(Number.isFinite).sort((x, y) => x - y);
474
+ const offs = [..._chunk3WOZEBXZcjs.expandVectorGradientStops.call(void 0, a), ..._chunk3WOZEBXZcjs.expandVectorGradientStops.call(void 0, b), ...stopsA, ...stopsB].map((s) => s.offset).filter(Number.isFinite).sort((x, y) => x - y);
475
475
  const common = offs.filter((o, i) => i === 0 || o - offs[i - 1] > 1e-4);
476
476
  stopsA = resampleGradientStops(a, common);
477
477
  stopsB = resampleGradientStops(b, common);
@@ -498,8 +498,8 @@ function lerpGradient(a, b, t) {
498
498
  }
499
499
  if (near.spread && near.spread !== "pad") out.spread = near.spread;
500
500
  if (near.strokeMode && near.strokeMode !== "within") out.strokeMode = near.strokeMode;
501
- const ea = _chunkKCMV2534cjs.hasExplicitGradientGeometry.call(void 0, a);
502
- const eb = _chunkKCMV2534cjs.hasExplicitGradientGeometry.call(void 0, b);
501
+ const ea = _chunk3WOZEBXZcjs.hasExplicitGradientGeometry.call(void 0, a);
502
+ const eb = _chunk3WOZEBXZcjs.hasExplicitGradientGeometry.call(void 0, b);
503
503
  if (!ea && !eb) {
504
504
  if (a.angle !== void 0 || b.angle !== void 0 || a.type === "linear" || a.type === "reflected") {
505
505
  const fallback = a.type === "linear" || a.type === "reflected" ? 180 : 90;
@@ -512,10 +512,10 @@ function lerpGradient(a, b, t) {
512
512
  }
513
513
  return out;
514
514
  }
515
- const pa = _chunkKCMV2534cjs.vectorGradientPoints.call(void 0, a);
516
- const pb = _chunkKCMV2534cjs.vectorGradientPoints.call(void 0, b);
515
+ const pa = _chunk3WOZEBXZcjs.vectorGradientPoints.call(void 0, a);
516
+ const pb = _chunk3WOZEBXZcjs.vectorGradientPoints.call(void 0, b);
517
517
  if (pa.units !== pb.units) {
518
- const src = _chunkKCMV2534cjs.explicitVectorGradient.call(void 0, near);
518
+ const src = _chunk3WOZEBXZcjs.explicitVectorGradient.call(void 0, near);
519
519
  return { ...src, stops: out.stops, ...out.interpolation ? { interpolation: out.interpolation } : {}, ...out.smoothness ? { smoothness: out.smoothness } : {} };
520
520
  }
521
521
  out.start = lerpPoint(pa.start, pb.start, t);
@@ -535,14 +535,14 @@ function solidLike(color, like) {
535
535
  function interpolateVectorPaint(a, b, t) {
536
536
  if (t <= 0) return a;
537
537
  if (t >= 1) return b;
538
- const pa = _chunkKCMV2534cjs.hasPaint.call(void 0, a);
539
- const pb = _chunkKCMV2534cjs.hasPaint.call(void 0, b);
538
+ const pa = _chunk3WOZEBXZcjs.hasPaint.call(void 0, a);
539
+ const pb = _chunk3WOZEBXZcjs.hasPaint.call(void 0, b);
540
540
  if (!pa && !pb) return t < 0.5 ? a : b;
541
541
  if (typeof a === "string" && pa && typeof b === "string" && pb) return interpolateVectorColor(a, b, t);
542
542
  if (!pa && typeof b === "string") return interpolateVectorColor("transparent", b, t);
543
543
  if (!pb && typeof a === "string") return interpolateVectorColor(a, "transparent", t);
544
- const ga = pa && _chunkKCMV2534cjs.isVectorGradient.call(void 0, a) ? a : null;
545
- const gb = pb && _chunkKCMV2534cjs.isVectorGradient.call(void 0, b) ? b : null;
544
+ const ga = pa && _chunk3WOZEBXZcjs.isVectorGradient.call(void 0, a) ? a : null;
545
+ const gb = pb && _chunk3WOZEBXZcjs.isVectorGradient.call(void 0, b) ? b : null;
546
546
  if (ga && gb) return _nullishCoalesce(lerpGradient(ga, gb, t), () => ( (t < 0.5 ? a : b)));
547
547
  if (gb) return _nullishCoalesce(lerpGradient(solidLike(pa ? a : null, gb), gb, t), () => ( b));
548
548
  if (ga) return _nullishCoalesce(lerpGradient(ga, solidLike(pb ? b : null, ga), t), () => ( a));
@@ -553,8 +553,8 @@ function interpolateWidthProfiles(a, b, t) {
553
553
  const at = [..._nullishCoalesce(a, () => ( [])), ..._nullishCoalesce(b, () => ( [])), { t: 0 }, { t: 1 }].map((p) => p.t).sort((x, y) => x - y);
554
554
  const ts = at.filter((v, i) => i === 0 || v - at[i - 1] > 1e-6);
555
555
  return ts.map((pos) => {
556
- const x = _chunkKCMV2534cjs.widthProfileAt.call(void 0, a, pos);
557
- const y = _chunkKCMV2534cjs.widthProfileAt.call(void 0, b, pos);
556
+ const x = _chunk3WOZEBXZcjs.widthProfileAt.call(void 0, a, pos);
557
+ const y = _chunk3WOZEBXZcjs.widthProfileAt.call(void 0, b, pos);
558
558
  return { t: pos, left: lerpN(x.left, y.left, t), right: lerpN(x.right, y.right, t) };
559
559
  });
560
560
  }
@@ -597,7 +597,7 @@ function reversedStyle(s) {
597
597
  out.endArrow = s.startArrow;
598
598
  out.startArrowScale = s.endArrowScale;
599
599
  out.endArrowScale = s.startArrowScale;
600
- if (_optionalChain([s, 'access', _6 => _6.strokeWidthProfile, 'optionalAccess', _7 => _7.length])) out.strokeWidthProfile = _chunkKCMV2534cjs.reverseWidthProfile.call(void 0, s.strokeWidthProfile);
600
+ if (_optionalChain([s, 'access', _6 => _6.strokeWidthProfile, 'optionalAccess', _7 => _7.length])) out.strokeWidthProfile = _chunk3WOZEBXZcjs.reverseWidthProfile.call(void 0, s.strokeWidthProfile);
601
601
  for (const k of ["startArrow", "endArrow", "startArrowScale", "endArrowScale"]) if (out[k] === void 0) delete out[k];
602
602
  return out;
603
603
  }
@@ -623,19 +623,19 @@ function styleOf(n) {
623
623
  return out;
624
624
  }
625
625
  function contoursOf(node, m) {
626
- return _chunkKCMV2534cjs.expandVectorCorners.call(void 0, node.subpaths).map((sp) => subpathToMorphContour(sp, m)).filter((c) => !!c);
626
+ return _chunk3WOZEBXZcjs.expandVectorCorners.call(void 0, node.subpaths).map((sp) => subpathToMorphContour(sp, m)).filter((c) => !!c);
627
627
  }
628
- function preparePathMorph(a, b, options, ma = _chunkKCMV2534cjs.nodeMatrix.call(void 0, a), mb = _chunkKCMV2534cjs.nodeMatrix.call(void 0, b)) {
628
+ function preparePathMorph(a, b, options, ma = _chunk3WOZEBXZcjs.nodeMatrix.call(void 0, a), mb = _chunk3WOZEBXZcjs.nodeMatrix.call(void 0, b)) {
629
629
  const corr = correspondMorphContours(contoursOf(a, ma), contoursOf(b, mb), options);
630
630
  const sim = procrustes(corr.a, corr.b);
631
631
  const styleA = styleOf(a);
632
632
  const styleB = corr.reversed ? reversedStyle(styleOf(b)) : styleOf(b);
633
- const rigid = !_chunkKCMV2534cjs.isIdentityMatrix.call(void 0, ma) || !_chunkKCMV2534cjs.isIdentityMatrix.call(void 0, mb);
633
+ const rigid = !_chunk3WOZEBXZcjs.isIdentityMatrix.call(void 0, ma) || !_chunk3WOZEBXZcjs.isIdentityMatrix.call(void 0, mb);
634
634
  const id = _nullishCoalesce(options.id, () => ( a.id));
635
635
  return (t) => {
636
636
  const contours = interpolateMorphContours(corr.a, corr.b, t, { linear: options.linear, rigidity: options.rigidity, similarity: sim });
637
- const m = rigid ? interpolateRigidMatrix(ma, mb, t) : _chunkKCMV2534cjs.IDENTITY_MATRIX;
638
- const back = rigid ? _chunkKCMV2534cjs.invertMatrix.call(void 0, m) : _chunkKCMV2534cjs.IDENTITY_MATRIX;
637
+ const m = rigid ? interpolateRigidMatrix(ma, mb, t) : _chunk3WOZEBXZcjs.IDENTITY_MATRIX;
638
+ const back = rigid ? _chunk3WOZEBXZcjs.invertMatrix.call(void 0, m) : _chunk3WOZEBXZcjs.IDENTITY_MATRIX;
639
639
  const subpaths = contours.map((c, k) => {
640
640
  const closed = t <= 0 ? corr.a[k].closed : t >= 1 ? corr.b[k].closed : corr.a[k].closed && corr.b[k].closed;
641
641
  return morphContourToSubpath({ closed: corr.a[k].closed && corr.b[k].closed, pts: c.pts }, back, closed);
@@ -643,14 +643,14 @@ function preparePathMorph(a, b, options, ma = _chunkKCMV2534cjs.nodeMatrix.call(
643
643
  const node = { id, type: "path", subpaths, ...interpolateVectorStyle(styleA, styleB, t) };
644
644
  const opacity = lerpN(_nullishCoalesce(a.opacity, () => ( 1)), _nullishCoalesce(b.opacity, () => ( 1)), t);
645
645
  if (opacity < 1) node.opacity = opacity;
646
- if (rigid && !_chunkKCMV2534cjs.isIdentityMatrix.call(void 0, m)) node.transform = m;
646
+ if (rigid && !_chunk3WOZEBXZcjs.isIdentityMatrix.call(void 0, m)) node.transform = m;
647
647
  return node;
648
648
  };
649
649
  }
650
- function flattenPaths(node, parent = _chunkKCMV2534cjs.IDENTITY_MATRIX) {
651
- const m = _chunkKCMV2534cjs.multiplyMatrices.call(void 0, _chunkKCMV2534cjs.nodeMatrix.call(void 0, node), parent);
650
+ function flattenPaths(node, parent = _chunk3WOZEBXZcjs.IDENTITY_MATRIX) {
651
+ const m = _chunk3WOZEBXZcjs.multiplyMatrices.call(void 0, _chunk3WOZEBXZcjs.nodeMatrix.call(void 0, node), parent);
652
652
  if (node.type === "path") return [{ path: node, m, opacity: 1 }];
653
- if (node.type === "text" || node.type === "instance") return flattenPaths(_chunkKCMV2534cjs.expandVectorAppearance.call(void 0, node), parent);
653
+ if (node.type === "text" || node.type === "instance") return flattenPaths(_chunk3WOZEBXZcjs.expandVectorAppearance.call(void 0, node), parent);
654
654
  const o = _nullishCoalesce(node.opacity, () => ( 1));
655
655
  return node.children.filter((c) => c.visible !== false).flatMap((c) => flattenPaths(c, m)).map((e) => ({ ...e, opacity: e.opacity * o }));
656
656
  }
@@ -672,8 +672,8 @@ function createVectorMorph(a, b, options = {}) {
672
672
  }
673
673
  const pa = flattenPaths(a);
674
674
  const pb = flattenPaths(b);
675
- const ba = _chunkKCMV2534cjs.unionBounds.call(void 0, pa.map((e) => placedBounds(e.path, e.m)));
676
- const bb = _chunkKCMV2534cjs.unionBounds.call(void 0, pb.map((e) => placedBounds(e.path, e.m)));
675
+ const ba = _chunk3WOZEBXZcjs.unionBounds.call(void 0, pa.map((e) => placedBounds(e.path, e.m)));
676
+ const bb = _chunk3WOZEBXZcjs.unionBounds.call(void 0, pb.map((e) => placedBounds(e.path, e.m)));
677
677
  const id = _nullishCoalesce(options.id, () => ( a.id));
678
678
  const parts = [];
679
679
  const opacities = [];
@@ -685,10 +685,10 @@ function createVectorMorph(a, b, options = {}) {
685
685
  parts.push(preparePathMorph(x.path, y.path, sub, x.m, y.m));
686
686
  opacities.push([x.opacity, y.opacity]);
687
687
  } else if (x) {
688
- parts.push(preparePathMorph(x.path, collapsedPath(x.path, x.m, ba, bb), sub, x.m, _chunkKCMV2534cjs.IDENTITY_MATRIX));
688
+ parts.push(preparePathMorph(x.path, collapsedPath(x.path, x.m, ba, bb), sub, x.m, _chunk3WOZEBXZcjs.IDENTITY_MATRIX));
689
689
  opacities.push([x.opacity, x.opacity]);
690
690
  } else if (y) {
691
- parts.push(preparePathMorph(collapsedPath(y.path, y.m, bb, ba), y.path, sub, _chunkKCMV2534cjs.IDENTITY_MATRIX, y.m));
691
+ parts.push(preparePathMorph(collapsedPath(y.path, y.m, bb, ba), y.path, sub, _chunk3WOZEBXZcjs.IDENTITY_MATRIX, y.m));
692
692
  opacities.push([y.opacity, y.opacity]);
693
693
  }
694
694
  }
@@ -3,7 +3,7 @@ import {
3
3
  EffectDisposedError,
4
4
  EffectUnsupportedError,
5
5
  effectValueErrors
6
- } from "./chunk-SIK3LT6M.js";
6
+ } from "./chunk-OFH6Q67U.js";
7
7
  import {
8
8
  HistoryManager
9
9
  } from "./chunk-RNSANXPT.js";
@@ -7,7 +7,7 @@ var _chunkPY4GWSE2cjs = require('./chunk-PY4GWSE2.cjs');
7
7
 
8
8
 
9
9
 
10
- var _chunkJAOSL334cjs = require('./chunk-JAOSL334.cjs');
10
+ var _chunkGHCSC2WPcjs = require('./chunk-GHCSC2WP.cjs');
11
11
 
12
12
 
13
13
  var _chunkWOFXZ3XUcjs = require('./chunk-WOFXZ3XU.cjs');
@@ -1316,12 +1316,12 @@ function videoEffectLayerKey(layer, width, height) {
1316
1316
  }
1317
1317
  function mixEffectPixels(a, b, k) {
1318
1318
  if (k >= 1) return b;
1319
- const out = _chunkJAOSL334cjs.createEffectPixels.call(void 0, a.width, a.height);
1319
+ const out = _chunkGHCSC2WPcjs.createEffectPixels.call(void 0, a.width, a.height);
1320
1320
  for (let i = 0; i < out.data.length; i++) out.data[i] = a.data[i] + (b.data[i] - a.data[i]) * k;
1321
1321
  return out;
1322
1322
  }
1323
1323
  function overEffectPixels(base, top, opacity = 1) {
1324
- const out = _chunkJAOSL334cjs.createEffectPixels.call(void 0, base.width, base.height);
1324
+ const out = _chunkGHCSC2WPcjs.createEffectPixels.call(void 0, base.width, base.height);
1325
1325
  const o = out.data;
1326
1326
  const b = base.data;
1327
1327
  const t = top.data;
@@ -1366,7 +1366,7 @@ var VideoEffectsEngine = (_class2 = class {
1366
1366
  __init10() {this.generation = 0}
1367
1367
 
1368
1368
  constructor(options = {}) {;_class2.prototype.__init5.call(this);_class2.prototype.__init6.call(this);_class2.prototype.__init7.call(this);_class2.prototype.__init8.call(this);_class2.prototype.__init9.call(this);_class2.prototype.__init10.call(this);
1369
- this.slot = _nullishCoalesce(options.slot, () => ( new (0, _chunkJAOSL334cjs.EffectsSlot)()));
1369
+ this.slot = _nullishCoalesce(options.slot, () => ( new (0, _chunkGHCSC2WPcjs.EffectsSlot)()));
1370
1370
  this.maxEntries = _nullishCoalesce(options.maxEntries, () => ( 120));
1371
1371
  this.toImage = _nullishCoalesce(options.toImage, () => ( defaultToImage));
1372
1372
  this.pool = new (0, _chunkPY4GWSE2cjs.EffectRendererPool)({ maxRenderers: options.maxRenderers });
@@ -1508,7 +1508,7 @@ function checkVideoEffectPlace(d, place) {
1508
1508
  if (d.kind === "motion" || !d.uses.some((u) => allowed.includes(u))) {
1509
1509
  const where = place === "clip" ? "on a clip" : place === "transition" ? "as a transition" : "as an effect clip";
1510
1510
  const instead = d.uses.includes("transition") ? "set_video_effect_transition" : d.uses.some((u) => VIDEO_EFFECT_PLACES.generator.includes(u)) ? "add_video_effect_clip" : d.uses.some((u) => u === "filter") ? "apply_effect" : null;
1511
- throw new (0, _chunkJAOSL334cjs.EffectUnsupportedError)(
1511
+ throw new (0, _chunkGHCSC2WPcjs.EffectUnsupportedError)(
1512
1512
  `"${d.id}" (${d.name}) is a ${d.uses.join(" / ")} effect and cannot be used ${where}, which takes ${allowed.join(" or ")} effects${instead ? `; use ${instead} instead` : ""}. search_effects with use "${allowed[0]}" lists ones that fit.`,
1513
1513
  d.id
1514
1514
  );
@@ -1529,12 +1529,12 @@ function checkVideoEffectValues(d, values, options = {}) {
1529
1529
  else if (type !== "number" && type !== "integer") errors.push({ path: `/${k}`, message: "only number controls can be keyframed." });
1530
1530
  else for (const [i, key] of v.keys.entries()) for (const e of _chunkWOFXZ3XUcjs.validateJsonSchema.call(void 0, key.v, schema)) errors.push({ path: `/${k}/keys/${i}/v`, message: e.message });
1531
1531
  }
1532
- for (const e of _chunkJAOSL334cjs.effectValueErrors.call(void 0, d, plain)) {
1532
+ for (const e of _chunkGHCSC2WPcjs.effectValueErrors.call(void 0, d, plain)) {
1533
1533
  const name = e.path.split("/")[1];
1534
1534
  const about = name && _optionalChain([d, 'access', _46 => _46.controls, 'access', _47 => _47.properties, 'access', _48 => _48[name], 'optionalAccess', _49 => _49.description]);
1535
1535
  errors.push(about ? { path: e.path, message: `${e.message} (${about})` } : e);
1536
1536
  }
1537
- if (errors.length) throw new (0, _chunkJAOSL334cjs.EffectControlError)(d.id, errors);
1537
+ if (errors.length) throw new (0, _chunkGHCSC2WPcjs.EffectControlError)(d.id, errors);
1538
1538
  return { ..._nullishCoalesce(options.base, () => ( d.defaults)), ..._nullishCoalesce(values, () => ( {})) };
1539
1539
  }
1540
1540
 
@@ -9,6 +9,10 @@
9
9
  * - `crossfade` (transition)
10
10
  * - `fade-in` (motion, vector only)
11
11
  * - `badge` (a vector effect with its own picture: a disc that fades in; vector only)
12
+ * - `trail` (an overlay that draws a line along its `path` control, transparent)
13
+ * - `route` (a vector effect that draws its `path` control as a line; vector only)
14
+ *
15
+ * It writes words as path data (`pathFromText`): a zig-zag per letter, font `zig`.
12
16
  *
13
17
  * With `camera: true` it also has camera moves (no pixels): `glide` and `whip` (transitions; the
14
18
  * whip cuts halfway) and `drift` (a hold that zooms in slowly).
@@ -9,6 +9,10 @@
9
9
  * - `crossfade` (transition)
10
10
  * - `fade-in` (motion, vector only)
11
11
  * - `badge` (a vector effect with its own picture: a disc that fades in; vector only)
12
+ * - `trail` (an overlay that draws a line along its `path` control, transparent)
13
+ * - `route` (a vector effect that draws its `path` control as a line; vector only)
14
+ *
15
+ * It writes words as path data (`pathFromText`): a zig-zag per letter, font `zig`.
12
16
  *
13
17
  * With `camera: true` it also has camera moves (no pixels): `glide` and `whip` (transitions; the
14
18
  * whip cuts halfway) and `drift` (a hold that zooms in slowly).
@@ -27,6 +27,12 @@ export declare function countEffectTags(effects: readonly Pick<EffectSummary, 't
27
27
  tag: string;
28
28
  count: number;
29
29
  }[];
30
+ /**
31
+ * The controls of an effect that draw along a path given at run time: those whose schema (or one
32
+ * of its `anyOf` / `oneOf` choices) has `format: 'svg-path'`. See `EFFECT_PATH_FORMAT` for the
33
+ * values they take.
34
+ */
35
+ export declare function pathControlsOf(d: Pick<EffectDescription, 'controls'>): string[];
30
36
  /**
31
37
  * Filters a catalog (kind, category, use and every tag) and ranks it against `query` (every word
32
38
  * must appear in the id, name, category, tags or description; name matches rank first). An empty query keeps catalog order.
@@ -27,6 +27,12 @@ export declare function countEffectTags(effects: readonly Pick<EffectSummary, 't
27
27
  tag: string;
28
28
  count: number;
29
29
  }[];
30
+ /**
31
+ * The controls of an effect that draw along a path given at run time: those whose schema (or one
32
+ * of its `anyOf` / `oneOf` choices) has `format: 'svg-path'`. See `EFFECT_PATH_FORMAT` for the
33
+ * values they take.
34
+ */
35
+ export declare function pathControlsOf(d: Pick<EffectDescription, 'controls'>): string[];
30
36
  /**
31
37
  * Filters a catalog (kind, category, use and every tag) and ranks it against `query` (every word
32
38
  * must appear in the id, name, category, tags or description; name matches rank first). An empty query keeps catalog order.