@pixerate/editor 0.124.1 → 0.126.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 (97) hide show
  1. package/dist/agent/index.cjs +3 -3
  2. package/dist/agent/index.cjs.map +1 -1
  3. package/dist/agent/index.js +3 -3
  4. package/dist/animation-editor/index.cjs +422 -85
  5. package/dist/animation-editor/index.cjs.map +1 -1
  6. package/dist/animation-editor/index.d.cts +174 -7
  7. package/dist/animation-editor/index.d.ts +174 -7
  8. package/dist/animation-editor/index.js +346 -9
  9. package/dist/animation-editor/index.js.map +1 -1
  10. package/dist/{chunk-ORHMVUR6.js → chunk-FICSDDDF.js} +5 -3
  11. package/dist/{chunk-ORHMVUR6.js.map → chunk-FICSDDDF.js.map} +1 -1
  12. package/dist/chunk-FJ3324TZ.js +59 -0
  13. package/dist/chunk-FJ3324TZ.js.map +1 -0
  14. package/dist/{chunk-5EO2IXQE.js → chunk-FPRIUR4T.js} +1 -1
  15. package/dist/chunk-FPRIUR4T.js.map +1 -0
  16. package/dist/{chunk-FHYDQOPC.cjs → chunk-JODTP4DP.cjs} +178 -7
  17. package/dist/chunk-JODTP4DP.cjs.map +1 -0
  18. package/dist/{chunk-NGYD3AMN.js → chunk-MPQAO33O.js} +2 -2
  19. package/dist/{chunk-PEHYWUVV.cjs → chunk-O5RVCDEC.cjs} +82 -82
  20. package/dist/{chunk-PEHYWUVV.cjs.map → chunk-O5RVCDEC.cjs.map} +1 -1
  21. package/dist/{chunk-JRXJTPES.js → chunk-QFSTQHZY.js} +176 -5
  22. package/dist/chunk-QFSTQHZY.js.map +1 -0
  23. package/dist/{chunk-5XXMLBH4.cjs → chunk-QQKTOA4U.cjs} +1 -1
  24. package/dist/chunk-QQKTOA4U.cjs.map +1 -0
  25. package/dist/{chunk-4QQZV5Y5.cjs → chunk-SFCPGMCT.cjs} +11 -9
  26. package/dist/chunk-SFCPGMCT.cjs.map +1 -0
  27. package/dist/{chunk-WE25VLCO.cjs → chunk-V5YGPRCZ.cjs} +36 -36
  28. package/dist/{chunk-WE25VLCO.cjs.map → chunk-V5YGPRCZ.cjs.map} +1 -1
  29. package/dist/chunk-W6QTLHZ3.cjs +59 -0
  30. package/dist/chunk-W6QTLHZ3.cjs.map +1 -0
  31. package/dist/{chunk-WATAQ2Z2.js → chunk-WUDPFWAN.js} +2 -2
  32. package/dist/effects/index.cjs +59 -33
  33. package/dist/effects/index.cjs.map +1 -1
  34. package/dist/effects/index.d.cts +4 -5
  35. package/dist/effects/index.d.ts +4 -5
  36. package/dist/effects/index.js +33 -7
  37. package/dist/effects/index.js.map +1 -1
  38. package/dist/{export-WmYoWmLM.d.cts → export-Bp7ji2r4.d.cts} +1 -2
  39. package/dist/{export-BdfY_lH0.d.ts → export-C1s4eolZ.d.ts} +1 -1
  40. package/dist/{export-BGtXgMJ3.d.ts → export-DAyPY94f.d.ts} +1 -2
  41. package/dist/{export-CbpjwxaI.d.cts → export-DVl4fWy5.d.cts} +1 -1
  42. package/dist/generation/index.cjs +3 -3
  43. package/dist/generation/index.cjs.map +1 -1
  44. package/dist/generation/index.js +3 -3
  45. package/dist/helpers-BBLlekuM.d.ts +2009 -0
  46. package/dist/helpers-i95Ob6Vi.d.cts +2009 -0
  47. package/dist/image-editor/index.cjs +627 -627
  48. package/dist/image-editor/index.cjs.map +1 -1
  49. package/dist/image-editor/index.d.cts +5 -7
  50. package/dist/image-editor/index.d.ts +5 -7
  51. package/dist/image-editor/index.js +13 -13
  52. package/dist/paint-editor/index.cjs +736 -115
  53. package/dist/paint-editor/index.cjs.map +1 -1
  54. package/dist/paint-editor/index.d.cts +248 -13
  55. package/dist/paint-editor/index.d.ts +248 -13
  56. package/dist/paint-editor/index.js +634 -13
  57. package/dist/paint-editor/index.js.map +1 -1
  58. package/dist/{svg-BDrjRnL1.d.cts → svg-BkRL-fZJ.d.cts} +1 -1
  59. package/dist/{svg-C-vZ3q50.d.ts → svg-DJKriJ4A.d.ts} +1 -1
  60. package/dist/tools/index.cjs +2 -2
  61. package/dist/tools/index.cjs.map +1 -1
  62. package/dist/tools/index.js +3 -3
  63. package/dist/{tools-C7JtLYzo.d.ts → tools-CM8Oe8F3.d.ts} +1 -1
  64. package/dist/{tools-DHKGHiSK.d.cts → tools-DZCv2kX1.d.cts} +1 -1
  65. package/dist/vector/index.cjs +1030 -883
  66. package/dist/vector/index.cjs.map +1 -1
  67. package/dist/vector/index.d.cts +61 -6
  68. package/dist/vector/index.d.ts +61 -6
  69. package/dist/vector/index.js +153 -6
  70. package/dist/vector/index.js.map +1 -1
  71. package/dist/video-editor/index.cjs +272 -273
  72. package/dist/video-editor/index.cjs.map +1 -1
  73. package/dist/video-editor/index.d.cts +4 -6
  74. package/dist/video-editor/index.d.ts +4 -6
  75. package/dist/video-editor/index.js +6 -7
  76. package/dist/video-editor/index.js.map +1 -1
  77. package/package.json +1 -1
  78. package/skills/pixerate-animation-editor/SKILL.md +24 -1
  79. package/skills/pixerate-paint-editor/SKILL.md +40 -1
  80. package/skills/pixerate-vector/SKILL.md +15 -0
  81. package/dist/chunk-4QQZV5Y5.cjs.map +0 -1
  82. package/dist/chunk-5EO2IXQE.js.map +0 -1
  83. package/dist/chunk-5XXMLBH4.cjs.map +0 -1
  84. package/dist/chunk-CN4PJHUG.cjs +0 -234
  85. package/dist/chunk-CN4PJHUG.cjs.map +0 -1
  86. package/dist/chunk-FHYDQOPC.cjs.map +0 -1
  87. package/dist/chunk-JRXJTPES.js.map +0 -1
  88. package/dist/chunk-QEG3GRN2.js +0 -234
  89. package/dist/chunk-QEG3GRN2.js.map +0 -1
  90. package/dist/flair-CxB3fOcU.d.ts +0 -739
  91. package/dist/flair-D7BxyBwL.d.cts +0 -739
  92. package/dist/helpers-777mC6dc.d.cts +0 -253
  93. package/dist/helpers-DX2_7L5t.d.ts +0 -253
  94. package/dist/types-BcX7sCsn.d.ts +0 -993
  95. package/dist/types-CznabG7m.d.cts +0 -993
  96. /package/dist/{chunk-NGYD3AMN.js.map → chunk-MPQAO33O.js.map} +0 -0
  97. /package/dist/{chunk-WATAQ2Z2.js.map → chunk-WUDPFWAN.js.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor",
3
- "version": "0.124.1",
3
+ "version": "0.126.0",
4
4
  "description": "UI-agnostic rich text and media editing core library",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pixerate-animation-editor
3
- description: How to author and edit vector animations (motion graphics, logo reveals, animated icons, explainer scenes, UI micro-interactions) in the Pixerate animation editor through its agent tools - artwork SVG with ids, shots of commands (enter, exit, draw, move, rotate, scale, fade, morph, Smart Animate match, follow a path, pulse, shake, wiggle), easing and springs, stagger, camera, beat and voiceover cues, drivers, reusable clips, checking, rendering frames and contact sheets, and exporting to Flair or Lottie. Use when animation tools such as get_animation, insert_shots or edit_animation are available, or when asked to animate, time, ease, stagger or export vector motion.
3
+ description: How to author and edit vector animations (motion graphics, logo reveals, animated icons, explainer scenes, UI micro-interactions) in the Pixerate animation editor through its agent tools - artwork SVG with ids, shots of commands (enter, exit, draw, move, rotate, scale, fade, morph, Smart Animate match, follow a path, pulse, shake, wiggle), easing and springs, stagger, camera, beat and voiceover cues, drivers, reusable clips, checking, rendering frames and contact sheets, and exporting to Flair or Lottie. Use when animation tools such as get_animation, insert_shots or edit_animation are available, or when asked to animate, time, ease, stagger or export vector motion, and provider motion and vector effects (for example Flair) applied to nodes.
4
4
  ---
5
5
 
6
6
  # Pixerate animation editor
@@ -125,8 +125,31 @@ The full command vocabulary (every type, option and default) is in
125
125
  | `undo_animation` | Undo your last edit (one tool call or one `edit_animation` batch). |
126
126
  | `redo_animation` | Redo the edit you just undid. |
127
127
 
128
+ ### Effects
129
+
130
+ These tools come from `createAnimationEffectsToolProvider` and work when the host has registered an
131
+ effects provider (for example Flair). Without one, `search_effects` and `describe_effect` return
132
+ `available: false`, `list_applied_effects` still lists what the scene holds, and the write tools
133
+ refuse.
134
+
135
+ | Tool | Use it to |
136
+ | --- | --- |
137
+ | `search_effects` | Find effects: `kind` motion (primitives to apply to nodes) or vector (effects with their own picture), `query`, `category`. |
138
+ | `describe_effect` | Read an effect's `controls` (names, ranges, units), `defaults` and `presets`, and whether it `appliesHere` (a motion effect). |
139
+ | `list_applied_effects` | See the provider effects in the scene: their `instance` ids, the nodes they animate, their shots and values. |
140
+ | `apply_effect` | Animate a node (`target`, a group animates as one) with a motion effect: the changes become ordinary commands, tagged with the effect, in a new shot after the last. Returns the instance id. |
141
+ | `update_effect` | Make an applied effect again with new `values`, in the same place (`effect` is its instance id). |
142
+ | `remove_effect` | Remove an applied effect: its commands, shots it alone filled and a vector effect's group. |
143
+ | `add_vector_effect` | Add a vector effect's own picture as an artwork group (fitted into `box`) with its motion as new shots. Returns the instance and group ids. |
144
+
128
145
  ## Pitfalls
129
146
 
147
+ - **Effect commands are ordinary commands.** You can retime or edit them with `edit_animation` like
148
+ any command, but `update_effect` replaces all of an effect's commands. Change values through the
149
+ effect, and timing through the commands.
150
+ - **Some provider motion cannot be carried over.** Counting, writing text and similar changes are
151
+ skipped. The result's `notes` say what was left out.
152
+
130
153
  - **Unknown ids are refused** with a "did you mean" suggestion. Take ids from `get_animation` or
131
154
  the elements `set_animation_artwork_svg` returns; never guess them.
132
155
  - **`enter-visible`**: an element that enters while already showing blinks out first. Give an
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pixerate-paint-editor
3
- description: How to paint in the Pixerate paint editor (natural media) through its agent tools - canvas and paper (generated grain, depth, families from cold pressed watercolour to canvas), layers with painterly blend modes (watercolor, tint, highlight, shadow), dry media (pencil, pastel, charcoal, airbrush, marker, ink) with pen dynamics, wet media (watercolour, gouache and oil that flow, bloom, granulate and dry), thick impasto paint lit by a movable light, blending tools (blender, smudge, Mixer Brush), brush behaviours (pick-up and mix ratios, dirty and multi-coloured brushes), the brush library, replayable strokes, symmetry and perspective guides, tracing and reference images, harmonies, swatches, a mixing pad and pigment mixing, and PNG, JPEG, WebP, PSD and JSON output. Use when asked to paint, sketch, paint in watercolour, shade, blend, smudge, glaze, mix colours, paint symmetric or in perspective, trace an image, or when paint_stroke, set_paper, replay_strokes or mix_colors are available.
3
+ description: How to paint in the Pixerate paint editor (natural media) through its agent tools - canvas and paper (generated grain, depth, families from cold pressed watercolour to canvas), layers with painterly blend modes (watercolor, tint, highlight, shadow), dry media (pencil, pastel, charcoal, ink) with pen dynamics, wet media (watercolour, gouache and oil that flow, bloom, granulate and dry), thick impasto paint lit by a movable light, blending tools (blender, smudge, Mixer Brush), brush behaviours (pick-up, dirty and multi-coloured brushes), the brush library, replayable strokes, symmetry and perspective guides, tracing and reference images, harmonies, swatches, a mixing pad, and PNG, JPEG, WebP, PSD and JSON output. Use when asked to paint, sketch, paint in watercolour, shade, blend, smudge, glaze, mix colours, paint symmetric or in perspective, trace an image, or when paint_stroke, set_paper, replay_strokes or mix_colors are available. Also effect paper, effect layers and light on paint from an effects provider.
4
4
  ---
5
5
 
6
6
  # Paint editor
@@ -236,6 +236,28 @@ Paint that changes colour as the stroke goes: give a gradient where a colour wou
236
236
  one side or inside a rect, ellipse or polygon; `invert` for outside). Stencils stay until
237
237
  removed (`remove_stencils`); masks are recorded with each stroke so replays keep them.
238
238
 
239
+ ## Provider effects
240
+
241
+ When the host registers an effects provider (`setEffectsProvider`), shaders and generators from
242
+ it work with the painting. Search first: `search_effects` with `use` `generator` (paper, layers,
243
+ fills), `overlay` / `title` (layers, fills) or `filter` (light on paint), then `describe_effect`
244
+ for the controls and presets.
245
+
246
+ - **Effect paper**: `set_paper_effect` draws a generator over the sheet, under every layer.
247
+ `multiply` (the default) keeps the paper's colour and grain showing through, which is what
248
+ makes it look like printed or dyed paper; `normal` covers it. It saves and exports with the
249
+ painting, and brush grain still follows the real paper.
250
+ - **Effect layers** (`add_effect_layer`): a pixel layer drawn by a generator, overlay or title
251
+ effect. Use them for backgrounds you want to change later, and for overlays (grain, light
252
+ leaks, captions) above the paint with a blend mode (`screen` / `linear-dodge` for light,
253
+ `multiply` for textures). `update_effect` draws the layer again and replaces its pixels, paint
254
+ on it included, so paint on a layer above it.
255
+ - **Effect fills** (`fill_layer_with_effect`): the effect composited onto a layer's pixels with
256
+ no link kept; `lockTransparency` colours only what is painted (an effect inside a shape).
257
+ - **Light on dried paint** (`apply_effect`): a filter (light, glow, grade) run on a layer's paint
258
+ and baked in, at `opacity` strength. Transparent areas stay transparent, and thick paint keeps
259
+ its relief and stays lit by the editor's light. Dry wet paint first (`dry_paint`).
260
+
239
261
  ## Tool reference
240
262
 
241
263
  ### Canvas and paper
@@ -346,6 +368,20 @@ Paint that changes colour as the stroke goes: give a gradient where a colour wou
346
368
  | `arrange_stickers` | Move stickers (`ids`) to the `front` or `back` of their layer. One undo step. |
347
369
  | `remove_stickers` | Delete stickers by `ids`, or all on the layer. One undo step. |
348
370
 
371
+ ### Provider effects
372
+
373
+ | Tool | Use |
374
+ | --- | --- |
375
+ | `search_effects` | Find provider effects by `query`, `kind`, `category` and `use` (`generator` for paper and layers, `overlay` / `title` for layers and fills, `filter` for light on paint). `available: false` when no provider is registered. Call before the tools below. |
376
+ | `describe_effect` | Read an effect's controls (types, ranges, defaults), presets and inputs. Call before passing `values`. |
377
+ | `list_applied_effects` | Read the effect paper (target `paper`) and every effect layer with its effect and values; with `target`, one of them. Baked light and fills are pixels and are not listed. Works without a provider. |
378
+ | `apply_effect` | Light on dried paint: run a `filter` effect on a layer's paint and bake it in (`values`, `opacity` = strength 0..1). Refused on empty, wet, locked or hidden layers, with the fix. One undo step; undo takes it back. Returns the effect used and `baked: true`. |
379
+ | `update_effect` | Change the effect paper (`target` and `effect` "paper": `values`, `opacity`) or draw an effect layer again (`effect` "effect": `values`; `null` resets a control). Returns the effect. |
380
+ | `remove_effect` | Remove the effect paper, or turn an effect layer into a plain layer keeping its pixels (`keptPixels`). |
381
+ | `set_paper_effect` | Draw a generator over the paper (`values`, `opacity`, `blend` default `multiply`, `time`); `effect: null` removes it. One undo step. Returns the effect paper. |
382
+ | `add_effect_layer` | Add a layer drawn by a generator, overlay or title effect (`values`, `name`, `aboveId`, `opacity`, `blend`, `time`); it becomes active. Returns the layer and its effect. |
383
+ | `fill_layer_with_effect` | Composite a generator, overlay or title effect onto a layer (`layerId`, `values`, `opacity`, `lockTransparency`, `time`). One undo step. Returns the layer id and the effect. |
384
+
349
385
  ### Guides
350
386
 
351
387
  | Tool | Use |
@@ -418,5 +454,8 @@ Paint that changes colour as the stroke goes: give a gradient where a colour wou
418
454
  - **Replays repeat what was recorded**: strokes, fills, clears, flattened relief and wet events.
419
455
  Imported pixels, merges and layer moves are not data, so `export_time_lapse` and
420
456
  `export_high_res` start those layers empty; paint with strokes when the replay matters.
457
+ - **Effects are pixels in replays.** Effect paper, effect layers, effect fills and baked light
458
+ need the provider when they are made; replays and time-lapses do not repeat them. Add them
459
+ after the painting, or keep the effect layer and redraw it.
421
460
  - **Recorded strokes are kept in saved documents**; `save_document` with `strokes: false` when
422
461
  only the pixels matter (smaller JSON).
@@ -383,6 +383,21 @@ contents whole while you work, without losing the mask.
383
383
  | `vector.setSnapOptions` | Set those options, e.g. `polarIncrement: 15` for 15° polar tracking, or a grid, before handing the canvas to the user. Moves nothing. Returns the options. |
384
384
  | `vector.setTool` | Switch the interactive tool (select, direct, pen, pencil, rect, ellipse, polygon, star, line, scissors, knife, eraser, width, shapeBuilder, paintBucket, blend, gradient, envelope, type, typePath, frame, connector). Only for handing the canvas to the user in a given mode; commands do not need a tool. |
385
385
 
386
+ ### Provider effects
387
+
388
+ From `createVectorEffectsToolProvider`, when the host has registered an effects provider (for
389
+ example Flair). Only vector effects apply here: they bring their own picture. Motion is applied in
390
+ the animation editor.
391
+
392
+ | Tool | Use it to |
393
+ | --- | --- |
394
+ | `search_effects` | Find effects with `kind` vector (lower thirds, stickers, loaders, badges). |
395
+ | `describe_effect` | Read an effect's controls, defaults and presets before adding it. |
396
+ | `list_applied_effects` | List the groups that show provider effects, with their values. |
397
+ | `apply_effect` | Add an effect's picture at rest as a selected group of editable shapes (`target` "document" or a parent group id), fitted into the middle of the document. Returns the group id. |
398
+ | `update_effect` | Draw an effect group again with new `values` (`effect` "picture"); its place and transform are kept, but edits to its shapes are replaced. |
399
+ | `remove_effect` | Keep the group's shapes as a plain group, detached from the effect. |
400
+
386
401
  ## Pitfalls
387
402
 
388
403
  - Mesh and freeform fills draw as fine tiles, not SVG gradients: they cannot be edited with