@pixerate/editor 0.249.0 → 0.251.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 (158) hide show
  1. package/dist/agent/index.cjs +40 -41
  2. package/dist/agent/index.js +9 -10
  3. package/dist/animation/index.cjs +6 -7
  4. package/dist/animation/index.js +5 -6
  5. package/dist/animation-editor/index.cjs +124 -123
  6. package/dist/animation-editor/index.js +15 -14
  7. package/dist/brushes/index.cjs +1406 -0
  8. package/dist/brushes/index.d.cts +12 -0
  9. package/dist/brushes/index.d.ts +12 -0
  10. package/dist/brushes/index.js +1406 -0
  11. package/dist/brushes/migrate.d.cts +17 -0
  12. package/dist/brushes/migrate.d.ts +17 -0
  13. package/dist/brushes/normalize.d.cts +15 -0
  14. package/dist/brushes/normalize.d.ts +15 -0
  15. package/dist/brushes/presets.d.cts +12 -0
  16. package/dist/brushes/presets.d.ts +12 -0
  17. package/dist/brushes/resolve.d.cts +56 -0
  18. package/dist/brushes/resolve.d.ts +56 -0
  19. package/dist/brushes/schema.d.cts +29 -0
  20. package/dist/brushes/schema.d.ts +29 -0
  21. package/dist/brushes/types.d.cts +323 -0
  22. package/dist/brushes/types.d.ts +323 -0
  23. package/dist/{brushstrokeRender-T3JZST44.js → brushstrokeRender-5PYSKZIJ.js} +9 -8
  24. package/dist/{brushstrokeRender-GCKK7V2I.cjs → brushstrokeRender-7FLLSQEC.cjs} +15 -14
  25. package/dist/canvas/index.cjs +120 -65
  26. package/dist/canvas/index.d.cts +1 -0
  27. package/dist/canvas/index.d.ts +1 -0
  28. package/dist/canvas/index.js +88 -33
  29. package/dist/canvas/stickers.d.cts +35 -0
  30. package/dist/canvas/stickers.d.ts +35 -0
  31. package/dist/chart/index.cjs +159 -160
  32. package/dist/chart/index.js +9 -10
  33. package/dist/{chunk-RXZL4NG5.js → chunk-226QDRO3.js} +1 -1
  34. package/dist/{chunk-DOIU7VJG.js → chunk-2ZJ4DT3M.js} +1 -1
  35. package/dist/{chunk-XZNU4DUX.cjs → chunk-3NS5C7FB.cjs} +76 -76
  36. package/dist/{chunk-UTI5IITZ.cjs → chunk-4ZC5QJE2.cjs} +3 -3
  37. package/dist/{chunk-L3JFOTBQ.js → chunk-5E2Q7ZHI.js} +1 -1
  38. package/dist/{chunk-6BIDVPED.js → chunk-5JNA6LLY.js} +1 -1
  39. package/dist/{chunk-RD7RX52G.cjs → chunk-5UEFBM2M.cjs} +207 -18
  40. package/dist/{chunk-WA44NKPF.js → chunk-62Z5WLRA.js} +1 -1
  41. package/dist/{chunk-BVRRIW7F.js → chunk-6GRUVGKU.js} +3 -3
  42. package/dist/{chunk-QARCM66V.js → chunk-6ZZKRH7R.js} +3 -3
  43. package/dist/{chunk-BP6KSGVD.js → chunk-7272D3K2.js} +4 -6
  44. package/dist/{chunk-O75V4ZS3.js → chunk-7P6VF3FG.js} +2 -2
  45. package/dist/{chunk-AU6MWQKZ.js → chunk-ABL7IWFZ.js} +1 -1
  46. package/dist/{chunk-5RH3VXAK.js → chunk-APX63ILU.js} +4 -100
  47. package/dist/{chunk-W7L4HUT2.cjs → chunk-CJ6TBL2N.cjs} +16 -16
  48. package/dist/{chunk-7PT4RJL5.cjs → chunk-EUIDTZNQ.cjs} +111 -113
  49. package/dist/{chunk-CXXXAZ7H.js → chunk-F6R67I3A.js} +1 -1
  50. package/dist/{chunk-I7NJPHWV.cjs → chunk-FQPUF2W2.cjs} +35 -606
  51. package/dist/{chunk-D5KGAO4Z.js → chunk-GCVFEPJG.js} +2 -573
  52. package/dist/{chunk-LEQKZGQI.js → chunk-GOBOCZZI.js} +1 -1
  53. package/dist/{chunk-PZP2SZIZ.js → chunk-GYMMNCFT.js} +3 -3
  54. package/dist/{chunk-NUTMINJZ.cjs → chunk-H7ET2ISK.cjs} +52 -52
  55. package/dist/chunk-HS6QDWDF.cjs +1029 -0
  56. package/dist/{chunk-T7KQEMAE.cjs → chunk-HUAISCUX.cjs} +18 -18
  57. package/dist/{chunk-YGQVCQTG.js → chunk-ILP77UD6.js} +1 -1
  58. package/dist/{chunk-GHCSC2WP.cjs → chunk-ISIO63Q5.cjs} +21 -15
  59. package/dist/{chunk-S6OT6CTS.cjs → chunk-IWEVV63O.cjs} +31 -33
  60. package/dist/{chunk-OFH6Q67U.js → chunk-JA57JIT5.js} +9 -3
  61. package/dist/{chunk-LP2MCSBE.cjs → chunk-JFHBXNR2.cjs} +88 -88
  62. package/dist/{chunk-IOFVM3L3.cjs → chunk-JPEHXIB5.cjs} +10 -10
  63. package/dist/chunk-JSDND7DF.cjs +173 -0
  64. package/dist/{chunk-36ZTV7WO.js → chunk-L6Y7TSQ4.js} +1 -1
  65. package/dist/{chunk-KYX7NZ5V.cjs → chunk-LFMKWGFL.cjs} +1 -1
  66. package/dist/{chunk-V6DT2CDH.js → chunk-M2TPMYJE.js} +1 -1
  67. package/dist/{chunk-LJZRHVZV.cjs → chunk-M5GLQQWG.cjs} +2 -2
  68. package/dist/{chunk-JEGJP4OW.js → chunk-MHLU6GRJ.js} +196 -7
  69. package/dist/{chunk-KMPM5JM5.js → chunk-MONXNVZK.js} +4 -6
  70. package/dist/chunk-MTKY6K3Q.js +1029 -0
  71. package/dist/{chunk-MOW3JMNG.cjs → chunk-N76AMOKE.cjs} +42 -42
  72. package/dist/{chunk-75K3W4D6.cjs → chunk-NKGB64CW.cjs} +16 -16
  73. package/dist/{chunk-SGPIVHJB.js → chunk-P3K2JCJA.js} +3 -3
  74. package/dist/chunk-PXDIAYB6.cjs +594 -0
  75. package/dist/{chunk-UBRJOIR5.js → chunk-QC3OXRE4.js} +9 -9
  76. package/dist/{chunk-QOBCBGGI.cjs → chunk-QKXO6JPP.cjs} +14 -14
  77. package/dist/{chunk-WLJZZHUZ.cjs → chunk-QLSGTCYT.cjs} +23 -23
  78. package/dist/{chunk-7YW7T5TJ.js → chunk-RHPSE2YR.js} +2 -2
  79. package/dist/{chunk-44BMJJVA.cjs → chunk-RUONPPMC.cjs} +8 -8
  80. package/dist/{chunk-LJRCU3BJ.cjs → chunk-SABJMH6M.cjs} +150 -15
  81. package/dist/{chunk-XWOLPNBW.cjs → chunk-SOSBOS5T.cjs} +22 -22
  82. package/dist/chunk-SZTI6EER.js +13 -0
  83. package/dist/{chunk-PPFJHTW5.cjs → chunk-TFF2GTGN.cjs} +22 -24
  84. package/dist/{chunk-2SMMZDMG.cjs → chunk-TLOGFIIV.cjs} +37 -37
  85. package/dist/chunk-TXFWZ5ZJ.js +594 -0
  86. package/dist/chunk-U67EN7GG.cjs +13 -0
  87. package/dist/{chunk-GXAK6Q5J.js → chunk-UFEDHACQ.js} +2 -2
  88. package/dist/{chunk-GA4EU4P3.cjs → chunk-UXETV2NC.cjs} +4 -4
  89. package/dist/{chunk-N4DFDI73.js → chunk-WKMUBATU.js} +1 -1
  90. package/dist/{chunk-3R5P3DVY.cjs → chunk-WRZ6C4TU.cjs} +6 -6
  91. package/dist/{chunk-EJLRBS5Q.js → chunk-WZOGDKCQ.js} +137 -2
  92. package/dist/{chunk-6ADHGQ73.js → chunk-YBAPT7NL.js} +2 -4
  93. package/dist/{chunk-K5DS2JTA.cjs → chunk-Z3BRH4JK.cjs} +6 -6
  94. package/dist/{chunk-XNZFVYC2.cjs → chunk-ZBCT5MEA.cjs} +7 -7
  95. package/dist/color/index.cjs +4 -6
  96. package/dist/color/index.js +7 -9
  97. package/dist/effects/helpers.d.cts +6 -0
  98. package/dist/effects/helpers.d.ts +6 -0
  99. package/dist/effects/index.cjs +62 -60
  100. package/dist/effects/index.js +5 -3
  101. package/dist/effects/tools.d.cts +6 -0
  102. package/dist/effects/tools.d.ts +6 -0
  103. package/dist/export/index.cjs +7 -8
  104. package/dist/export/index.js +6 -7
  105. package/dist/extensions/index.cjs +10 -11
  106. package/dist/extensions/index.js +9 -10
  107. package/dist/gradient/index.cjs +33 -34
  108. package/dist/gradient/index.js +4 -5
  109. package/dist/image-editor/effects.d.cts +1 -1
  110. package/dist/image-editor/effects.d.ts +1 -1
  111. package/dist/image-editor/index.cjs +887 -863
  112. package/dist/image-editor/index.d.cts +1 -0
  113. package/dist/image-editor/index.d.ts +1 -0
  114. package/dist/image-editor/index.js +69 -45
  115. package/dist/image-editor/stickers.d.cts +9 -0
  116. package/dist/image-editor/stickers.d.ts +9 -0
  117. package/dist/index.cjs +16 -17
  118. package/dist/index.js +10 -11
  119. package/dist/paint/index.cjs +6 -4
  120. package/dist/paint/index.js +21 -19
  121. package/dist/paint-editor/brushes.d.cts +1 -2
  122. package/dist/paint-editor/brushes.d.ts +1 -2
  123. package/dist/paint-editor/index.cjs +2199 -699
  124. package/dist/paint-editor/index.js +1577 -77
  125. package/dist/paint-editor/mark-settings.d.cts +104 -0
  126. package/dist/paint-editor/mark-settings.d.ts +104 -0
  127. package/dist/paint-editor/procedural.d.cts +2 -75
  128. package/dist/paint-editor/procedural.d.ts +2 -75
  129. package/dist/paint-editor/stickers.d.cts +1 -22
  130. package/dist/paint-editor/stickers.d.ts +1 -22
  131. package/dist/raster/index.cjs +2 -2
  132. package/dist/raster/index.js +9 -9
  133. package/dist/stickers/index.cjs +22 -16
  134. package/dist/stickers/index.d.cts +1 -1
  135. package/dist/stickers/index.d.ts +1 -1
  136. package/dist/stickers/index.js +14 -8
  137. package/dist/stickers/tools.d.cts +57 -1
  138. package/dist/stickers/tools.d.ts +57 -1
  139. package/dist/tokens/index.cjs +3 -4
  140. package/dist/tokens/index.js +2 -3
  141. package/dist/typography/index.cjs +7 -8
  142. package/dist/typography/index.js +2 -3
  143. package/dist/vector/index.cjs +1011 -977
  144. package/dist/vector/index.d.cts +1 -0
  145. package/dist/vector/index.d.ts +1 -0
  146. package/dist/vector/index.js +47 -13
  147. package/dist/vector/stickers.d.cts +11 -0
  148. package/dist/vector/stickers.d.ts +11 -0
  149. package/dist/video-editor/index.cjs +349 -350
  150. package/dist/video-editor/index.js +9 -10
  151. package/package.json +11 -1
  152. package/skills/pixerate-image-editor/SKILL.md +1 -1
  153. package/skills/pixerate-stickers/SKILL.md +13 -1
  154. package/dist/chunk-7AHBW2CQ.cjs +0 -200
  155. package/dist/chunk-F67XMVDI.js +0 -200
  156. package/dist/chunk-H4AOUUBE.cjs +0 -2635
  157. package/dist/chunk-J7T5QZ45.js +0 -2635
  158. package/dist/chunk-ZEYMKDYS.cjs +0 -269
@@ -55,3 +55,4 @@ export * from './effect-tools.cjs';
55
55
  export * from './playback.cjs';
56
56
  export * from './editorDocument.cjs';
57
57
  export * from './layers.cjs';
58
+ export * from './stickers.cjs';
@@ -55,3 +55,4 @@ export * from './effect-tools.js';
55
55
  export * from './playback.js';
56
56
  export * from './editorDocument.js';
57
57
  export * from './layers.js';
58
+ export * from './stickers.js';
@@ -26,7 +26,7 @@ import {
26
26
  traceField,
27
27
  traceVectorImage,
28
28
  vectorTraceContours
29
- } from "../chunk-DOIU7VJG.js";
29
+ } from "../chunk-2ZJ4DT3M.js";
30
30
  import {
31
31
  applyHomography,
32
32
  homographyFromPoints,
@@ -53,7 +53,7 @@ import {
53
53
  reverseMorphContour,
54
54
  subpathToMorphContour,
55
55
  turnMorphContour
56
- } from "../chunk-O75V4ZS3.js";
56
+ } from "../chunk-7P6VF3FG.js";
57
57
  import {
58
58
  DEFAULT_VECTOR_FONT,
59
59
  IDENTITY_MATRIX,
@@ -526,9 +526,9 @@ import {
526
526
  withVectorStrokes,
527
527
  withVectorTargetPaint,
528
528
  zigzagPaths
529
- } from "../chunk-PZP2SZIZ.js";
530
- import "../chunk-J7T5QZ45.js";
531
- import "../chunk-5RH3VXAK.js";
529
+ } from "../chunk-GYMMNCFT.js";
530
+ import "../chunk-MTKY6K3Q.js";
531
+ import "../chunk-APX63ILU.js";
532
532
  import {
533
533
  createProvenance
534
534
  } from "../chunk-M6DNZNVY.js";
@@ -554,25 +554,29 @@ import {
554
554
  fitCubics,
555
555
  parseSvgPath
556
556
  } from "../chunk-PWBZH3FK.js";
557
+ import {
558
+ StickerError
559
+ } from "../chunk-SZTI6EER.js";
557
560
  import {
558
561
  EffectUnsupportedError,
559
562
  EffectsSlot,
560
563
  createEffectToolProvider,
561
564
  resolveEffectValues
562
- } from "../chunk-OFH6Q67U.js";
565
+ } from "../chunk-JA57JIT5.js";
563
566
  import "../chunk-V2ZCJRDM.js";
564
567
  import {
565
568
  GRAIN_PATTERNS
566
- } from "../chunk-D5KGAO4Z.js";
569
+ } from "../chunk-TXFWZ5ZJ.js";
570
+ import "../chunk-GCVFEPJG.js";
567
571
  import "../chunk-4D6KP5BV.js";
568
572
  import "../chunk-ODBT55Q7.js";
569
- import "../chunk-IRSTHLQQ.js";
570
573
  import {
571
574
  bytesToBase64,
572
575
  decodePng,
573
576
  isPng,
574
577
  parseDataUrl
575
578
  } from "../chunk-OTTT5N3K.js";
579
+ import "../chunk-IRSTHLQQ.js";
576
580
  import "../chunk-HVVR5PZW.js";
577
581
  import {
578
582
  deflate
@@ -587,14 +591,13 @@ import {
587
591
  HistoryManager
588
592
  } from "../chunk-NS62CQ2B.js";
589
593
  import "../chunk-5UJHB3BW.js";
590
- import "../chunk-V6DT2CDH.js";
594
+ import "../chunk-M2TPMYJE.js";
591
595
  import {
592
596
  hexToRgba
593
597
  } from "../chunk-2WPNAGHI.js";
594
- import "../chunk-BP6KSGVD.js";
595
- import "../chunk-6ADHGQ73.js";
596
- import "../chunk-JEGJP4OW.js";
597
- import "../chunk-F67XMVDI.js";
598
+ import "../chunk-7272D3K2.js";
599
+ import "../chunk-YBAPT7NL.js";
600
+ import "../chunk-MHLU6GRJ.js";
598
601
  import "../chunk-6ONMQ6WF.js";
599
602
 
600
603
  // src/vector/stylize.ts
@@ -18317,6 +18320,35 @@ function vectorLayerRows(nodes, expanded = () => false) {
18317
18320
  visit(nodes, 0, null);
18318
18321
  return rows;
18319
18322
  }
18323
+
18324
+ // src/vector/stickers.ts
18325
+ function stickerVectorGroup(placement, id = "sticker") {
18326
+ const { asset, description } = placement;
18327
+ if (asset.kind !== "svg") throw new StickerError("unsupported_format", `"${placement.ref}" has only raster art; the vector editor takes stickers with SVG art (find_stickers lists formats).`);
18328
+ let n2 = 0;
18329
+ const parsed = parseVectorSvg(asset.svg, { createId: () => `${id}-${++n2}` });
18330
+ if (!parsed.nodes.length) throw new StickerError("load_failed", `"${placement.ref}" has no shapes the vector editor can read.`);
18331
+ const group = { type: "group", id, name: description.name, children: parsed.nodes };
18332
+ const b = vectorNodeBounds(group);
18333
+ if (!b || !(b.width > 0) || !(b.height > 0)) throw new StickerError("load_failed", `"${placement.ref}" has no visible shapes.`);
18334
+ const box = { width: parsed.width || b.width, height: parsed.height || b.height };
18335
+ const s = placement.width / box.width;
18336
+ return transformVectorNode(group, [s, 0, 0, s, placement.x - box.width * s / 2, placement.y - box.height * s / 2]);
18337
+ }
18338
+ function createVectorStickerHost(controller) {
18339
+ return {
18340
+ noun: "group of editable paths",
18341
+ format: "svg",
18342
+ defaultCentre: () => {
18343
+ const d = controller.getDocument();
18344
+ return { x: d.width / 2, y: d.height / 2 };
18345
+ },
18346
+ insert(placement) {
18347
+ const id = controller.addNode(stickerVectorGroup(placement), { label: `Insert ${placement.description.name}` });
18348
+ return { id };
18349
+ }
18350
+ };
18351
+ }
18320
18352
  export {
18321
18353
  DEFAULT_VECTOR_BLEND_DISTANCE,
18322
18354
  DEFAULT_VECTOR_BLEND_STEPS,
@@ -18496,6 +18528,7 @@ export {
18496
18528
  createVectorMeshGradient,
18497
18529
  createVectorMorph,
18498
18530
  createVectorPlaybackLocator,
18531
+ createVectorStickerHost,
18499
18532
  cssFontFamily,
18500
18533
  curvatureMoveAnchor,
18501
18534
  cutSubpathAt,
@@ -18756,6 +18789,7 @@ export {
18756
18789
  splitWarpMeshU as splitVectorMeshU,
18757
18790
  splitWarpMeshV as splitVectorMeshV,
18758
18791
  starSubpath,
18792
+ stickerVectorGroup,
18759
18793
  stripVectorLensViews,
18760
18794
  stripVectorMasterArt,
18761
18795
  stripVectorSymbolArt,
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Stickers in the vector editor: `insert_sticker` (see `@pixerate/editor/stickers`) puts a
3
+ * sticker's SVG in as a group of editable paths, scaled to its width and centred where asked.
4
+ */
5
+ import type { StickerInsertHost, StickerPlacement } from '../stickers/tools.cjs';
6
+ import type { VectorEditorController } from './controller.cjs';
7
+ import type { VectorGroupNode } from './types.cjs';
8
+ /** A group of the sticker's paths, `placement.width` wide and centred on (`x`, `y`). */
9
+ export declare function stickerVectorGroup(placement: StickerPlacement, id?: string): VectorGroupNode;
10
+ /** `insert_sticker` for a vector editor: a group of editable paths, one undo step, selected. */
11
+ export declare function createVectorStickerHost(controller: VectorEditorController): StickerInsertHost;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Stickers in the vector editor: `insert_sticker` (see `@pixerate/editor/stickers`) puts a
3
+ * sticker's SVG in as a group of editable paths, scaled to its width and centred where asked.
4
+ */
5
+ import type { StickerInsertHost, StickerPlacement } from '../stickers/tools.js';
6
+ import type { VectorEditorController } from './controller.js';
7
+ import type { VectorGroupNode } from './types.js';
8
+ /** A group of the sticker's paths, `placement.width` wide and centred on (`x`, `y`). */
9
+ export declare function stickerVectorGroup(placement: StickerPlacement, id?: string): VectorGroupNode;
10
+ /** `insert_sticker` for a vector editor: a group of editable paths, one undo step, selected. */
11
+ export declare function createVectorStickerHost(controller: VectorEditorController): StickerInsertHost;