@pixerate/editor 0.231.1 → 0.232.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 (36) hide show
  1. package/dist/animation-editor/index.cjs +25 -25
  2. package/dist/animation-editor/index.js +1 -1
  3. package/dist/canvas/index.cjs +7 -7
  4. package/dist/canvas/index.js +1 -1
  5. package/dist/{chunk-OPSK22DL.cjs → chunk-2K5TELHV.cjs} +19 -2
  6. package/dist/{chunk-CSM5T6SE.js → chunk-6QLTUGMO.js} +1 -1
  7. package/dist/{chunk-5T3H7CGG.cjs → chunk-A653N65Q.cjs} +7 -7
  8. package/dist/{chunk-SBPGIZQN.js → chunk-MUSZYMBX.js} +1 -1
  9. package/dist/{chunk-TCZ2J7PR.js → chunk-PQYDJ2AV.js} +18 -1
  10. package/dist/{chunk-C73U5UI3.cjs → chunk-RG4O6K2A.cjs} +14 -14
  11. package/dist/effects/conformance.d.cts +4 -1
  12. package/dist/effects/conformance.d.ts +4 -1
  13. package/dist/effects/errors.d.cts +6 -1
  14. package/dist/effects/errors.d.ts +6 -1
  15. package/dist/effects/fake-templates.d.cts +17 -0
  16. package/dist/effects/fake-templates.d.ts +17 -0
  17. package/dist/effects/fake.d.cts +6 -1
  18. package/dist/effects/fake.d.ts +6 -1
  19. package/dist/effects/index.cjs +537 -74
  20. package/dist/effects/index.d.cts +1 -0
  21. package/dist/effects/index.d.ts +1 -0
  22. package/dist/effects/index.js +466 -3
  23. package/dist/effects/templates.d.cts +56 -0
  24. package/dist/effects/templates.d.ts +56 -0
  25. package/dist/effects/types.d.cts +212 -0
  26. package/dist/effects/types.d.ts +212 -0
  27. package/dist/image-editor/index.cjs +13 -13
  28. package/dist/image-editor/index.js +1 -1
  29. package/dist/paint-editor/index.cjs +7 -7
  30. package/dist/paint-editor/index.js +2 -2
  31. package/dist/vector/index.cjs +6 -6
  32. package/dist/vector/index.js +1 -1
  33. package/dist/video-editor/index.cjs +329 -329
  34. package/dist/video-editor/index.js +3 -3
  35. package/package.json +1 -1
  36. package/skills/pixerate-animation-editor/SKILL.md +37 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createEffectAuthoringSession
3
- } from "../chunk-SBPGIZQN.js";
3
+ } from "../chunk-MUSZYMBX.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-CSM5T6SE.js";
152
+ } from "../chunk-6QLTUGMO.js";
153
153
  import "../chunk-EHLOCVWB.js";
154
154
  import {
155
155
  namedWithSuggestion
@@ -163,7 +163,7 @@ import {
163
163
  isEffectError,
164
164
  resolveCameraMoveSpec,
165
165
  sampleEffectCameraMove
166
- } from "../chunk-TCZ2J7PR.js";
166
+ } from "../chunk-PQYDJ2AV.js";
167
167
  import "../chunk-V2ZCJRDM.js";
168
168
  import {
169
169
  defineEditorDocument
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor",
3
- "version": "0.231.1",
3
+ "version": "0.232.0",
4
4
  "description": "UI-agnostic rich text and media editing core library",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -165,6 +165,13 @@ refuse.
165
165
  | `list_camera_moves` | List the provider's camera moves for a `role` (`transition`: how the camera gets into a shot; `hold`: how it moves while the shot holds), with `durationMs` and `cut`. Returns `available: false` without camera moves. Call before `set_shot_camera_move`; `describe_effect` gives a move's controls and presets. |
166
166
  | `set_shot_camera_move` | Give a shot a camera move (`shot`, `role`, `move`, optional `ms` for a transition, `preset`, `values`): it is saved on the shot's camera as `in` or `during`. Returns the shot's camera and the `window` (ms) the move plays in. A wrong-role id is refused naming the moves that fit. |
167
167
  | `clear_shot_camera_move` | Remove a shot's move for a `role`, keeping its framing. Returns the shot's camera (null when nothing is left). |
168
+ | `list_shot_layers` | See every shot's layers (ids, effect, subject, role, rect, `start` / `end` in ms) and its transition. Works without a provider. Call before changing a layer. |
169
+ | `add_shot_layer` | Add a layer to a shot: a provider effect (a generator background, a filter applied to a `subject`, an overlay or title) or a bare `subject` (picture, SVG, words). Fills the screen unless given a `rect`; shows until the next shot unless `until` says. Returns the layer with its id. |
170
+ | `update_shot_layer` | Change a layer's fields; list optional ones in `clear` to remove them. Returns the layer. |
171
+ | `move_shot_layer` | Restack a layer in its shot (`index`, 0 = bottom). |
172
+ | `remove_shot_layer` | Remove a layer. |
173
+ | `set_shot_transition` | Set the transition into a shot from the one before (a provider effect with use `transition`, its `ms`, `preset`, `values`). Not on the first shot. Returns the transition with `start` / `end`. |
174
+ | `clear_shot_transition` | Remove a shot's transition, so it cuts (or the camera eases) again. |
168
175
 
169
176
  ### Save and open
170
177
 
@@ -199,8 +206,38 @@ holding), a shot's camera can play one as it arrives and one while it holds:
199
206
  Exports to Flair tag each camera change with `<move>@<shot>`; with the provider set the camera
200
207
  is sampled from the move, and a cut stays a jump.
201
208
 
209
+ ### Shot layers and transitions
210
+
211
+ With a provider that draws pixels (Flair: gradients, light, film looks, lower thirds, image
212
+ filters, 30 transitions), a shot can show effects as layers over and under its artwork, as
213
+ Flair's scenes do:
214
+
215
+ 1. `search_effects` with `use` `generator` (backgrounds), `filter` (changes a picture),
216
+ `overlay` or `title`, then `add_shot_layer`. A filter needs a `subject` (`{ image }`,
217
+ `{ svg }`, `{ text }`); a generator or title draws its own picture and takes none.
218
+ 2. `role` places it: `background` under the artwork, `subject` over it, `overlay` over
219
+ everything. A layer with a `rect` sits on the artwork and moves with the camera; without one
220
+ it fills the screen. `until: { shots: 2 }` keeps a background going under the next shot too;
221
+ `fade` softens its start and end.
222
+ 3. `search_effects` with `use` `transition`, then `set_shot_transition` on the shot it leads
223
+ into (never the first). With no camera move in, the camera cuts and the transition does the
224
+ move; with one (`set_shot_camera_move`), both play together.
225
+ 4. `render_animation_frame` to look (it waits for the provider's pictures), and
226
+ `check_animation`: `layer-effect-unknown`, `layer-effect-values`, `layer-slot-empty` (a
227
+ `{ slot }` subject nobody filled), `transition-unknown`, `transition-first-shot`,
228
+ `layer-not-drawn` and `transition-not-played` (no provider: effect layers are left out and
229
+ transitions crossfade).
230
+
231
+ Layers are pixels: the Flair `SvgMotion` export leaves them out. Use them for backgrounds, looks
232
+ and titles, and keep what should animate node by node in the artwork.
233
+
202
234
  ## Pitfalls
203
235
 
236
+ - **A transition belongs to the shot it leads into.** Setting one on the first shot is refused;
237
+ moving a shot with a transition to the front makes it a `transition-first-shot` note.
238
+ - **Layer effects are not motion effects.** A transition or a camera move is refused as a layer,
239
+ and a motion effect (`fade-in`) goes on nodes with `apply_effect`.
240
+
204
241
  - **One move per role per shot.** Whip pans and cuts jump half way: put them between framings
205
242
  that differ, and do not follow a cut with a long glide into the same framing.
206
243