@pixerate/editor 0.118.0 → 0.120.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 (74) hide show
  1. package/THIRD_PARTY_NOTICES.md +1 -0
  2. package/dist/animation-editor/index.cjs +54 -54
  3. package/dist/animation-editor/index.d.cts +3 -3
  4. package/dist/animation-editor/index.d.ts +3 -3
  5. package/dist/animation-editor/index.js +2 -2
  6. package/dist/{chunk-R2JE6SA7.js → chunk-BOWUU4LJ.js} +42 -7
  7. package/dist/chunk-BOWUU4LJ.js.map +1 -0
  8. package/dist/{chunk-M7O4BJRH.cjs → chunk-DFLJHLKA.cjs} +36 -36
  9. package/dist/{chunk-M7O4BJRH.cjs.map → chunk-DFLJHLKA.cjs.map} +1 -1
  10. package/dist/{chunk-2J3LS7JZ.cjs → chunk-HTAFDTNR.cjs} +221 -186
  11. package/dist/chunk-HTAFDTNR.cjs.map +1 -0
  12. package/dist/{chunk-L2T6EJ5S.cjs → chunk-L3PXFMOF.cjs} +38 -25
  13. package/dist/chunk-L3PXFMOF.cjs.map +1 -0
  14. package/dist/{chunk-IVSNUXW7.js → chunk-T7IZDNSL.js} +37 -24
  15. package/dist/chunk-T7IZDNSL.js.map +1 -0
  16. package/dist/{chunk-BYAWOAST.cjs → chunk-TS5IEUW6.cjs} +26 -25
  17. package/dist/chunk-TS5IEUW6.cjs.map +1 -0
  18. package/dist/{chunk-VD2UDVF7.js → chunk-UMVW2Q66.js} +21 -5
  19. package/dist/chunk-UMVW2Q66.js.map +1 -0
  20. package/dist/{chunk-FODKPD44.cjs → chunk-VYW7JBTM.cjs} +790 -549
  21. package/dist/chunk-VYW7JBTM.cjs.map +1 -0
  22. package/dist/{chunk-T2P5TIZ6.js → chunk-WAI6ATHC.js} +2 -2
  23. package/dist/{chunk-EBSYZRSW.cjs → chunk-WMRIG4XQ.cjs} +21 -5
  24. package/dist/chunk-WMRIG4XQ.cjs.map +1 -0
  25. package/dist/{chunk-7LNZAWSJ.js → chunk-WORWH5K5.js} +699 -458
  26. package/dist/chunk-WORWH5K5.js.map +1 -0
  27. package/dist/{chunk-JHXMNOMF.js → chunk-YHW26LS2.js} +14 -13
  28. package/dist/chunk-YHW26LS2.js.map +1 -0
  29. package/dist/{export-Dul1SbPv.d.ts → export-D2D8hb_u.d.ts} +18 -4
  30. package/dist/{export-DMOuzgZZ.d.cts → export-fP2hZYjm.d.cts} +18 -4
  31. package/dist/{flow-4-OC-UkQ.d.cts → flow-A2Dj-69w.d.cts} +21 -9
  32. package/dist/{flow-Cb7lkPm8.d.ts → flow-C95atNoQ.d.ts} +21 -9
  33. package/dist/image-editor/index.cjs +1104 -979
  34. package/dist/image-editor/index.cjs.map +1 -1
  35. package/dist/image-editor/index.d.cts +5 -5
  36. package/dist/image-editor/index.d.ts +5 -5
  37. package/dist/image-editor/index.js +157 -32
  38. package/dist/image-editor/index.js.map +1 -1
  39. package/dist/paint/index.cjs +5 -3
  40. package/dist/paint/index.cjs.map +1 -1
  41. package/dist/paint/index.d.cts +2 -2
  42. package/dist/paint/index.d.ts +2 -2
  43. package/dist/paint/index.js +4 -2
  44. package/dist/paint-editor/index.cjs +147 -147
  45. package/dist/paint-editor/index.d.cts +4 -4
  46. package/dist/paint-editor/index.d.ts +4 -4
  47. package/dist/paint-editor/index.js +4 -4
  48. package/dist/raster/index.cjs +2 -2
  49. package/dist/raster/index.js +1 -1
  50. package/dist/{svg-CVdFc80-.d.cts → svg-S9zzvqaZ.d.cts} +5 -1
  51. package/dist/{svg-DlEuhwoX.d.ts → svg-leZpRsJB.d.ts} +5 -1
  52. package/dist/{types-CDLGhAZp.d.ts → types-BgwxFWvn.d.ts} +59 -3
  53. package/dist/{types-Tfly4Aya.d.cts → types-DdRTDnza.d.cts} +59 -3
  54. package/dist/vector/index.cjs +1314 -1009
  55. package/dist/vector/index.cjs.map +1 -1
  56. package/dist/vector/index.d.cts +110 -5
  57. package/dist/vector/index.d.ts +110 -5
  58. package/dist/vector/index.js +319 -14
  59. package/dist/vector/index.js.map +1 -1
  60. package/package.json +1 -1
  61. package/skills/pixerate-image-editor/references/photoshop-files.md +5 -2
  62. package/skills/pixerate-vector/SKILL.md +13 -1
  63. package/skills/pixerate-vector/references/commands.md +2 -0
  64. package/dist/chunk-2J3LS7JZ.cjs.map +0 -1
  65. package/dist/chunk-7LNZAWSJ.js.map +0 -1
  66. package/dist/chunk-BYAWOAST.cjs.map +0 -1
  67. package/dist/chunk-EBSYZRSW.cjs.map +0 -1
  68. package/dist/chunk-FODKPD44.cjs.map +0 -1
  69. package/dist/chunk-IVSNUXW7.js.map +0 -1
  70. package/dist/chunk-JHXMNOMF.js.map +0 -1
  71. package/dist/chunk-L2T6EJ5S.cjs.map +0 -1
  72. package/dist/chunk-R2JE6SA7.js.map +0 -1
  73. package/dist/chunk-VD2UDVF7.js.map +0 -1
  74. /package/dist/{chunk-T2P5TIZ6.js.map → chunk-WAI6ATHC.js.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor",
3
- "version": "0.118.0",
3
+ "version": "0.120.0",
4
4
  "description": "UI-agnostic rich text and media editing core library",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -25,8 +25,11 @@
25
25
  included), `fill_pixels`, `clear_pixels`, every retouching tool (Clone Stamp and the healing
26
26
  tools sample at depth, from the layer or the float composite) and `transform_layer`
27
27
  (resampled at depth; whole-pixel moves exact) keep the depth (32-bit paint and resampling work
28
- in linear light). Mask painting, layer filters and layer effects still compute in 8 bits: the
29
- pixels they change get 8-bit precision, every pixel they leave alone keeps its deep samples. Afterwards work with `list_layers` as
28
+ in linear light). Layer masks keep the depth too: 16- and 32-bit masks open and save at depth,
29
+ blend with their full precision, and the brush, eraser, `fill_pixels` and `clear_pixels` paint
30
+ them at depth (retouching on a mask stays 8-bit). Layer filters and layer effects still
31
+ compute in 8 bits: the pixels they change get 8-bit precision, every pixel they leave alone
32
+ keeps its deep samples. Afterwards work with `list_layers` as
30
33
  usual: there is no Background source image, every pixel comes from the layers.
31
34
  4. **Smart objects come in live**: embedded contents (a PSB opens as a nested document you can
32
35
  edit with `edit_smart_object_contents`, a PNG as raster contents), the placement and warp, the
@@ -46,6 +46,8 @@ carry a live effect stack. Every command is a `vector.*` command run with `run_c
46
46
  - **Connectors** are open paths with a `connector` whose ends are glued to other objects' sites
47
47
  (the middle of a side, or the centre); they are routed again after every edit, so they follow
48
48
  what they connect. A free end stays where it is.
49
+ - **Symmetry groups** draw their children plus mirrored or rotated copies. Add art to one with
50
+ `parentId` on `vector.addShape` / `vector.addPath`; only the originals are stored and edited.
49
51
  - Coordinates are document units. A rotated node stores its geometry in its own space: the
50
52
  `bounds` that `vector.list` reports are document-space, its `d` is the node's own.
51
53
 
@@ -313,6 +315,16 @@ the browser's shaper they are kept but not drawn until outlines are available.
313
315
  | `vector.listConnectors` | Read every connector: route and each end's glued object, side setting, side in use and position. |
314
316
  | `vector.listConnectionSites` | Read an object's sites (top, right, bottom, left, centre) with positions and outward normals, to pick a `side`. |
315
317
 
318
+ ### Symmetry
319
+
320
+ | Command | Use it to |
321
+ | --- | --- |
322
+ | `vector.makeSymmetry` | Put objects (or, with `ids: []`, nothing yet) in a live symmetry group: `mode` vertical / horizontal / dual / diagonal / radial (`copies`, `mirror`), `center`, `rotation`. Its copies follow every edit. Use for logos, mandalas, faces, ornaments: draw one half or one wedge. Returns `{ id, symmetry, children }`. |
323
+ | `vector.setSymmetry` | Change mode, centre, rotation, copies or mirroring. Returns `{ groups }`. |
324
+ | `vector.releaseSymmetry` | Stop repeating; `expand: true` keeps the copies as real objects (to edit one side alone). Returns `{ ids }` of the added objects. |
325
+ | `vector.enterSymmetry` | Hand the canvas to the user drawing inside a symmetry group (pen, pencil, shapes, text go in, mirrored live). Returns `{ id }`. |
326
+ | `vector.exitSymmetry` | Stop drawing inside it. |
327
+
316
328
  ### Masks and clipping
317
329
 
318
330
  | Command | Use it to |
@@ -331,7 +343,7 @@ contents whole while you work, without losing the mask.
331
343
 
332
344
  | Command | Use it to |
333
345
  | --- | --- |
334
- | `vector.addEffect` | Add a live path effect `type` (trim, roundCorners, puckerBloat, twist, zigzag, wiggle, offset, merge, repeater, envelope) with `params` to `ids`, at `index` in the stack (default last). Effects apply top to bottom. Returns `{ effects: [{ nodeId, effectId }] }`. |
346
+ | `vector.addEffect` | Add a live path effect `type` (trim, roundCorners, puckerBloat, twist, zigzag, wiggle, offset, merge, repeater, envelope, contour: concentric steps blending to end colours, blockShadow: the shape swept along an angle under it, a long shadow when endOpacity fades) with `params` to `ids`, at `index` in the stack (default last). Effects apply top to bottom. Returns `{ effects: [{ nodeId, effectId }] }`. |
335
347
  | `vector.updateEffect` | Change effect `effectId` on `nodeId`: `params` (merged), `enabled`, or move it to `index` (0 applies first). Returns the node's effect stack. |
336
348
  | `vector.removeEffect` | Remove effect `effectId` from `nodeId`. |
337
349
  | `vector.envelope` | Warp with a live envelope: a `preset` (arc, arcLower, arcUpper, arch, bulge, shellLower, shellUpper, flag, wave, fish, rise, fisheye, inflate, squeeze, twist) with `bend`, `horizontal`, `vertical` (percent, -100 to 100) and `orientation`; or a `mesh` of `rows` x `columns` (1 to 16, optional control `points`); or `topObject: true` (top closed path becomes the envelope), `release: true`, `expand: true`. Reapplying changes an existing envelope. |
@@ -110,6 +110,8 @@ default below. Lengths are in the node's own units, angles degrees, percentages
110
110
  | offset | amount 5, join `miter`, miterLimit 4, copies 1, copyOffset 0 | Grow or shrink; copies make concentric rings. |
111
111
  | merge | mode `add` (also `merge`, `subtract`, `intersect`, `exclude`) | Combine the shapes above it into one, in the bottom shape's style. |
112
112
  | repeater | copies 3, offset 0, position {x 100, y 0}, anchor {x 0, y 0}, rotation 0, scale {x 100, y 100} (%), startOpacity 100, endOpacity 100 (%), composite `below` | Copy i is moved, rotated and scaled k = i + offset times about the anchor; fractional copies fade the last one. Radial patterns: position {0, 0}, rotation 360 / copies. |
113
+ | contour | direction `inside`, steps 4, offset 6, fillColor `#ffffff`, strokeColor null, acceleration 0, join `round`, miterLimit 4 | CorelDRAW's Contour: each shape plus `steps` concentric copies `offset` apart (`center`: inward until the shape is used up), their fill and stroke blending to the end colours (null keeps the shape's colour); inside steps draw over the shape, outside ones under it. Acceleration −100…100 holds the colour back (positive) or rushes it (negative). Use for embossed badges, topographic lines and soft glows. |
114
+ | blockShadow | angle 45 (degrees, 0 right, 90 down), distance 20, color `#1e293b` (null: the shape's own fill), opacity 100, endOpacity 100 (%) | CorelDRAW's Block Shadow: each shape swept `distance` along `angle` as one solid shape drawn under all of them. Set endOpacity below opacity (e.g. 0) with a long distance for a flat-design long shadow. The direction is in the node's own space, so it turns with the node. Put it last in the stack so it shadows the final shapes. |
113
115
  | envelope | style `arc`, bend 50, horizontal 0, vertical 0, orientation `horizontal`, rows 2, columns 2, mesh null | Prefer `vector.envelope`. |
114
116
 
115
117
  Effects apply in stack order (index 0 first) to everything above them; effects after a repeater