@pixerate/editor 0.249.0 → 0.250.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 (69) hide show
  1. package/dist/animation-editor/index.cjs +114 -113
  2. package/dist/animation-editor/index.js +7 -6
  3. package/dist/{brushstrokeRender-T3JZST44.js → brushstrokeRender-2FHFLSEG.js} +4 -3
  4. package/dist/{brushstrokeRender-GCKK7V2I.cjs → brushstrokeRender-QGRXOKDA.cjs} +7 -6
  5. package/dist/canvas/index.cjs +71 -15
  6. package/dist/canvas/index.d.cts +1 -0
  7. package/dist/canvas/index.d.ts +1 -0
  8. package/dist/canvas/index.js +58 -2
  9. package/dist/canvas/stickers.d.cts +35 -0
  10. package/dist/canvas/stickers.d.ts +35 -0
  11. package/dist/{chunk-RXZL4NG5.js → chunk-226QDRO3.js} +1 -1
  12. package/dist/{chunk-UBRJOIR5.js → chunk-3TWOCSCY.js} +1 -1
  13. package/dist/{chunk-ZEYMKDYS.cjs → chunk-4JNWA3VT.cjs} +53 -20
  14. package/dist/{chunk-L3JFOTBQ.js → chunk-5E2Q7ZHI.js} +1 -1
  15. package/dist/{chunk-AU6MWQKZ.js → chunk-ABL7IWFZ.js} +1 -1
  16. package/dist/{chunk-LJRCU3BJ.cjs → chunk-ATK6ABN3.cjs} +15 -13
  17. package/dist/{chunk-H4AOUUBE.cjs → chunk-GT77U7QG.cjs} +18 -16
  18. package/dist/{chunk-GHCSC2WP.cjs → chunk-ISIO63Q5.cjs} +21 -15
  19. package/dist/{chunk-OFH6Q67U.js → chunk-JA57JIT5.js} +9 -3
  20. package/dist/{chunk-PZP2SZIZ.js → chunk-KDLBJ6QR.js} +1 -1
  21. package/dist/{chunk-LP2MCSBE.cjs → chunk-M2VKFE5L.cjs} +86 -86
  22. package/dist/{chunk-DOIU7VJG.js → chunk-NOHJP5TK.js} +1 -1
  23. package/dist/{chunk-O75V4ZS3.js → chunk-NTRAVM2I.js} +1 -1
  24. package/dist/{chunk-J7T5QZ45.js → chunk-OTEPAQJX.js} +4 -2
  25. package/dist/{chunk-QOBCBGGI.cjs → chunk-QKXO6JPP.cjs} +14 -14
  26. package/dist/{chunk-6BIDVPED.js → chunk-SMSGP2HQ.js} +1 -1
  27. package/dist/chunk-SZTI6EER.js +13 -0
  28. package/dist/{chunk-EJLRBS5Q.js → chunk-U4NUOKBT.js} +4 -2
  29. package/dist/chunk-U67EN7GG.cjs +13 -0
  30. package/dist/{chunk-5RH3VXAK.js → chunk-WKH5ZAUA.js} +45 -12
  31. package/dist/{chunk-IOFVM3L3.cjs → chunk-WPUXGDH4.cjs} +2 -2
  32. package/dist/{chunk-2SMMZDMG.cjs → chunk-X7WRL5ZZ.cjs} +35 -35
  33. package/dist/{chunk-WLJZZHUZ.cjs → chunk-YM6ZBTXG.cjs} +23 -23
  34. package/dist/{chunk-KYX7NZ5V.cjs → chunk-YW43M56C.cjs} +1 -1
  35. package/dist/{chunk-K5DS2JTA.cjs → chunk-Z3BRH4JK.cjs} +6 -6
  36. package/dist/{chunk-XNZFVYC2.cjs → chunk-ZBCT5MEA.cjs} +7 -7
  37. package/dist/effects/helpers.d.cts +6 -0
  38. package/dist/effects/helpers.d.ts +6 -0
  39. package/dist/effects/index.cjs +62 -60
  40. package/dist/effects/index.js +5 -3
  41. package/dist/effects/tools.d.cts +6 -0
  42. package/dist/effects/tools.d.ts +6 -0
  43. package/dist/image-editor/effects.d.cts +1 -1
  44. package/dist/image-editor/effects.d.ts +1 -1
  45. package/dist/image-editor/index.cjs +814 -791
  46. package/dist/image-editor/index.d.cts +1 -0
  47. package/dist/image-editor/index.d.ts +1 -0
  48. package/dist/image-editor/index.js +35 -12
  49. package/dist/image-editor/stickers.d.cts +9 -0
  50. package/dist/image-editor/stickers.d.ts +9 -0
  51. package/dist/paint-editor/index.cjs +165 -164
  52. package/dist/paint-editor/index.js +8 -7
  53. package/dist/stickers/index.cjs +22 -16
  54. package/dist/stickers/index.d.cts +1 -1
  55. package/dist/stickers/index.d.ts +1 -1
  56. package/dist/stickers/index.js +9 -3
  57. package/dist/stickers/tools.d.cts +57 -1
  58. package/dist/stickers/tools.d.ts +57 -1
  59. package/dist/vector/index.cjs +1003 -969
  60. package/dist/vector/index.d.cts +1 -0
  61. package/dist/vector/index.d.ts +1 -0
  62. package/dist/vector/index.js +40 -6
  63. package/dist/vector/stickers.d.cts +11 -0
  64. package/dist/vector/stickers.d.ts +11 -0
  65. package/dist/video-editor/index.cjs +344 -344
  66. package/dist/video-editor/index.js +4 -4
  67. package/package.json +1 -1
  68. package/skills/pixerate-image-editor/SKILL.md +1 -1
  69. package/skills/pixerate-stickers/SKILL.md +13 -1
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createEffectAuthoringSession
3
- } from "../chunk-AU6MWQKZ.js";
3
+ } from "../chunk-ABL7IWFZ.js";
4
4
  import {
5
5
  VIDEO_ADJUSTMENT_SCOPES,
6
6
  VIDEO_BLEND_MODES,
@@ -149,7 +149,7 @@ import {
149
149
  videoTransitionEase,
150
150
  videoValueAt,
151
151
  videoWipeRect
152
- } from "../chunk-L3JFOTBQ.js";
152
+ } from "../chunk-5E2Q7ZHI.js";
153
153
  import {
154
154
  namedWithSuggestion
155
155
  } from "../chunk-EUKY4KFX.js";
@@ -159,7 +159,7 @@ import {
159
159
  effectSequenceTiming,
160
160
  effectTemplateTools,
161
161
  fillEffectTemplate
162
- } from "../chunk-RXZL4NG5.js";
162
+ } from "../chunk-226QDRO3.js";
163
163
  import "../chunk-EHLOCVWB.js";
164
164
  import {
165
165
  CAMERA_MOVE_MAX_MS,
@@ -171,7 +171,7 @@ import {
171
171
  pathControlsOf,
172
172
  resolveCameraMoveSpec,
173
173
  sampleEffectCameraMove
174
- } from "../chunk-OFH6Q67U.js";
174
+ } from "../chunk-JA57JIT5.js";
175
175
  import "../chunk-V2ZCJRDM.js";
176
176
  import {
177
177
  defineEditorDocument
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor",
3
- "version": "0.249.0",
3
+ "version": "0.250.0",
4
4
  "description": "UI-agnostic rich text and media editing core library",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -341,7 +341,7 @@ in the source frame at the document's bit depth, colour mode and profile. Read
341
341
  | `mix_colors` | Read-only. Mix 1 to 16 `colors` (`{color: #rrggbb, weight, strength?}`) like paint (Kubelka-Munk over reflectance spectra). Returns `mixed` (#rrggbb), `rgbLerp` (the plain RGB average, for comparison) and the normalised `weights`. Call it before `paint_stroke` / `fill_pixels` to pick a paint colour. |
342
342
  | `clear_pixels` | Remove the selected pixels (alpha to 0; a transparency-locked layer or a mask gets the background colour). Returns the changed bounds. |
343
343
  | `import_psd` | Open a PSD / PSB (`data` base64, a `data:` URL is fine) as the document, replacing the layers, crop and rotation (one undo step). Returns the new `layers` tree with ids, `layerIds`, size and `warnings` naming the affected layers. Call `inspect_psd` first when losses matter. |
344
- | `apply_effect` | Run a provider filter effect on a layer as a smart filter (`target`, `effect`, `values`, `index`, `enabled`, `opacity`, `blend`); a pixel, shape or type layer becomes a smart object in the same undo step (`converted`). It keeps the layer's transparency (`preserveTransparency`, default true: the result is drawn over the layer and takes its alpha); `false` lets a shader fill transparent pixels. With a selection the filter mask is set from it (`masked`): deselect first to filter the whole layer. Returns the filter id and `preserveTransparency`. |
344
+ | `apply_effect` | Run a provider filter effect, or any effect that takes a picture (the layer is its picture: a sticker from `insert_sticker` into a holo-foil treatment), on a layer as a smart filter (`target`, `effect`, `values`, `index`, `enabled`, `opacity`, `blend`); a pixel, shape or type layer becomes a smart object in the same undo step (`converted`). It keeps the layer's transparency (`preserveTransparency`, default true: the result is drawn over the layer and takes its alpha); `false` lets a shader fill transparent pixels. With a selection the filter mask is set from it (`masked`): deselect first to filter the whole layer. Returns the filter id and `preserveTransparency`. |
345
345
  | `update_effect` | Change an effect smart filter (`values` merged, `null` resets; `enabled`, `opacity`, `blend`, `preserveTransparency`, `index`) or redraw an effect layer (`effect: "generator"`, values only). Returns the filter as it is now. |
346
346
  | `remove_effect` | Remove an effect smart filter, or (`generator`) keep an effect layer's pixels as a plain layer. |
347
347
  | `add_effect_layer` | Add a layer drawn by a generator, overlay or title effect at the document's size and bit depth (`values`, `time`, `animate`, `name`, `aboveId` / `belowId`, `opacity`, `blend`, `clipped`). `clipped: true` clips it to the layer directly below in the same undo step, so it shows only over that layer's pixels (refused when nothing is below it in its group). An effect with its own background (`backgroundOpacity` in `describe_effect`) starts with it transparent when there are layers below. Returns the layer id and `clipped`. |
@@ -20,9 +20,15 @@ none, it is the editor's own stamps (`editorStickers()`: `editor:dot`, `editor:s
20
20
  it asks for), dominant colours, variants and outline.
21
21
  3. **Use.** Pass refs to the editor that places them: in the paint editor, a sticker brush
22
22
  (`set_brush` `sticker.stamps`, then `paint_stroke`) sprays them and `add_stickers` places
23
- them exactly. A provider's art loads before it is drawn.
23
+ them exactly. In the vector, image and canvas editors, `insert_sticker` puts one in (`x`,
24
+ `y` centre, `width`): vector, a group of editable paths; image, a pixel layer; canvas, a
25
+ shape node from its outline in one colour. A provider's art loads before it is drawn.
24
26
  4. **Colour.** Tintable stickers (flat, single-colour art) take the paint colour or a sticker's
25
27
  `color`; the rest keep their own colours.
28
+ 5. **Treat it with an effect.** In the image editor, `insert_sticker` returns the layer `id`;
29
+ `apply_effect` with that `target` and any effect whose `describe_effect` inputs take an
30
+ image (`appliesHere`) uses the sticker as its picture (holo foil, cut-out). For a whole set,
31
+ repeat the two calls per sticker.
26
32
 
27
33
  ## Best practices
28
34
 
@@ -30,16 +36,22 @@ none, it is the editor's own stamps (`editorStickers()`: `editor:dot`, `editor:s
30
36
  and means `editor:star`.
31
37
  - Credit stickers whose licence has an `attribution` wherever the work is published.
32
38
  - Prefer tintable stickers when they must match a palette.
39
+ - Vector stickers need SVG art and canvas stickers an outline (`silhouette`); `find_stickers`
40
+ lists `formats`, and `describe_sticker` the outline. The image editor takes either.
33
41
 
34
42
  ## Pitfalls
35
43
 
36
44
  - An unknown ref is refused with the closest refs: pick one of those or search again.
37
45
  - A category that the library doesn't have is refused with the list of its categories.
38
46
  - `limit` is 1..100; results beyond a page need `after`, not a larger limit.
47
+ - `color` on a sticker that is not tintable is refused; leave it out.
48
+ - On the canvas, multi-colour art becomes its outline in its dominant colour; for the art itself,
49
+ use the image editor (the vector and canvas editors take effects on stickers in a later change).
39
50
 
40
51
  ## Tool reference
41
52
 
42
53
  | Tool | Use |
43
54
  | --- | --- |
44
55
  | `find_stickers` | Search or list the library: `query`, `category`, `tags`, `commercial`, `limit`, `after`. Returns `items` (each `ref`, name, category, tags, width, height, formats, tintable, licence), `total`, `next`, `categories`. Changes nothing. |
56
+ | `insert_sticker` | Put one sticker (`ref`) into the vector, image or canvas editor, centred at `x`, `y` (default the middle), `width` wide (default natural), tinted with `color` when tintable. One undo step. Returns the new group, layer or node `id`, the size and the licence. |
45
57
  | `describe_sticker` | One sticker by `ref`: everything `find_stickers` returns plus `silhouette` (SVG path data), `colours` and `variants`. Unknown refs are refused with the closest ones. Changes nothing. |