@pixerate/editor 0.229.0 → 0.230.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 (53) hide show
  1. package/dist/animation-editor/camera-tools.d.cts +10 -0
  2. package/dist/animation-editor/camera-tools.d.ts +10 -0
  3. package/dist/animation-editor/camera.d.cts +67 -0
  4. package/dist/animation-editor/camera.d.ts +67 -0
  5. package/dist/animation-editor/compile.d.cts +4 -0
  6. package/dist/animation-editor/compile.d.ts +4 -0
  7. package/dist/animation-editor/controller.d.cts +34 -2
  8. package/dist/animation-editor/controller.d.ts +34 -2
  9. package/dist/animation-editor/effect-tools.d.cts +2 -1
  10. package/dist/animation-editor/effect-tools.d.ts +2 -1
  11. package/dist/animation-editor/evaluate.d.cts +9 -0
  12. package/dist/animation-editor/evaluate.d.ts +9 -0
  13. package/dist/animation-editor/flair.d.cts +8 -0
  14. package/dist/animation-editor/flair.d.ts +8 -0
  15. package/dist/animation-editor/index.cjs +603 -217
  16. package/dist/animation-editor/index.d.cts +2 -0
  17. package/dist/animation-editor/index.d.ts +2 -0
  18. package/dist/animation-editor/index.js +454 -68
  19. package/dist/animation-editor/issues.d.cts +16 -0
  20. package/dist/animation-editor/issues.d.ts +16 -0
  21. package/dist/animation-editor/tools.d.cts +1 -1
  22. package/dist/animation-editor/tools.d.ts +1 -1
  23. package/dist/animation-editor/types.d.cts +21 -3
  24. package/dist/animation-editor/types.d.ts +21 -3
  25. package/dist/canvas/index.cjs +7 -7
  26. package/dist/canvas/index.js +1 -1
  27. package/dist/{chunk-IGPEBXUD.cjs → chunk-A57ZQDNN.cjs} +7 -7
  28. package/dist/{chunk-K5GXW5TR.cjs → chunk-C73U5UI3.cjs} +14 -14
  29. package/dist/{chunk-EBDZWIOP.cjs → chunk-ERJA5CGT.cjs} +5 -1
  30. package/dist/{chunk-LPTFDCJO.js → chunk-ONNNNGNS.js} +1 -1
  31. package/dist/{chunk-5MQOBTNP.cjs → chunk-OPSK22DL.cjs} +80 -9
  32. package/dist/{chunk-PB6JV62G.js → chunk-SBPGIZQN.js} +1 -1
  33. package/dist/{chunk-UGYUGZE2.js → chunk-TCZ2J7PR.js} +71 -0
  34. package/dist/{chunk-W4KFNAWC.js → chunk-TYCJGFCF.js} +5 -1
  35. package/dist/effects/helpers.d.cts +35 -1
  36. package/dist/effects/helpers.d.ts +35 -1
  37. package/dist/effects/index.cjs +60 -44
  38. package/dist/effects/index.js +18 -2
  39. package/dist/effects/types.d.cts +15 -0
  40. package/dist/effects/types.d.ts +15 -0
  41. package/dist/image-editor/index.cjs +13 -13
  42. package/dist/image-editor/index.js +1 -1
  43. package/dist/paint-editor/index.cjs +7 -7
  44. package/dist/paint-editor/index.js +2 -2
  45. package/dist/vector/index.cjs +6 -6
  46. package/dist/vector/index.js +1 -1
  47. package/dist/video-editor/index.cjs +318 -318
  48. package/dist/video-editor/index.js +4 -4
  49. package/package.json +1 -1
  50. package/skills/pixerate-animation-editor/SKILL.md +28 -1
  51. package/skills/pixerate-animation-motion-graphics/SKILL.md +3 -0
  52. package/skills/pixerate-video-editor/SKILL.md +16 -1
  53. package/skills/pixerate-video-montage/SKILL.md +2 -1
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createEffectAuthoringSession
3
- } from "../chunk-PB6JV62G.js";
3
+ } from "../chunk-SBPGIZQN.js";
4
4
  import {
5
5
  VIDEO_ADJUSTMENT_SCOPES,
6
6
  VIDEO_BLEND_MODES,
@@ -148,16 +148,16 @@ import {
148
148
  videoTransitionEase,
149
149
  videoValueAt,
150
150
  videoWipeRect
151
- } from "../chunk-LPTFDCJO.js";
151
+ } from "../chunk-ONNNNGNS.js";
152
152
  import "../chunk-EHLOCVWB.js";
153
153
  import {
154
154
  namedWithSuggestion
155
- } from "../chunk-W4KFNAWC.js";
155
+ } from "../chunk-TYCJGFCF.js";
156
156
  import {
157
157
  EffectsSlot,
158
158
  createEffectToolProvider,
159
159
  isEffectError
160
- } from "../chunk-UGYUGZE2.js";
160
+ } from "../chunk-TCZ2J7PR.js";
161
161
  import "../chunk-V2ZCJRDM.js";
162
162
  import {
163
163
  defineEditorDocument
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor",
3
- "version": "0.229.0",
3
+ "version": "0.230.0",
4
4
  "description": "UI-agnostic rich text and media editing core library",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -155,13 +155,16 @@ refuse.
155
155
 
156
156
  | Tool | Use it to |
157
157
  | --- | --- |
158
- | `search_effects` | Find effects: `kind` motion (primitives to apply to nodes) or vector (effects with their own picture), `query`, `category`. `kind` camera lists camera moves (with `camera`: role transition or hold, `durationMs`, `cut`); they move a scene's camera and cannot be applied with these tools. |
158
+ | `search_effects` | Find effects: `kind` motion (primitives to apply to nodes) or vector (effects with their own picture), `query`, `category`. `kind` camera lists camera moves (with `camera`: role transition or hold, `durationMs`, `cut`); give them to a shot with `set_shot_camera_move`, not `apply_effect`. |
159
159
  | `describe_effect` | Read an effect's `controls` (names, ranges, units), `defaults` and `presets`, and whether it `appliesHere` (a motion effect). |
160
160
  | `list_applied_effects` | See the provider effects in the scene: their `instance` ids, the nodes they animate, their shots and values. |
161
161
  | `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. |
162
162
  | `update_effect` | Make an applied effect again with new `values`, in the same place (`effect` is its instance id). |
163
163
  | `remove_effect` | Remove an applied effect: its commands, shots it alone filled and a vector effect's group. |
164
164
  | `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. |
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
+ | `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
+ | `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). |
165
168
 
166
169
  ### Save and open
167
170
 
@@ -175,8 +178,32 @@ The host may add the shared document tools (see `pixerate-agent-tools`). An anim
175
178
  | `list_saved_animation_documents` | List saved animations (`key`, `name`, `savedAt`), newest first. |
176
179
  | `open_saved_animation_document` | Replace the animation with a saved one by `key`. One undo step. Ask before opening over changes the user has not saved. |
177
180
 
181
+ ### Camera moves
182
+
183
+ With a provider that has camera moves (Flair: `camera-glide`, `camera-whip-pan`,
184
+ `camera-punch-zoom`, `camera-cut` to get in; `camera-ken-burns`, `camera-crash-zoom` while
185
+ holding), a shot's camera can play one as it arrives and one while it holds:
186
+
187
+ 1. Frame the shot as usual (`update_shot` with `camera: { frame: "<id>" }` or a rectangle). A
188
+ move without a framing keeps the one the camera has.
189
+ 2. `list_camera_moves` with the `role`, pick by `description`, then `set_shot_camera_move`. Use
190
+ a preset (`describe_effect` lists them) before hand-tuning `values`.
191
+ 3. A transition's `ms` sets how long it takes (default the move's own, written out on the
192
+ shot); a hold move plays across the shot's `hold`, so lengthen the hold for a slower drift.
193
+ The next shot's move starts from where a hold move ends.
194
+ 4. `render_animation_frame` mid-move to look, and `check_animation`: `camera-move-first-shot`
195
+ (the first shot cuts, so its transition does not play), `camera-move-unknown`,
196
+ `camera-move-values`, `camera-move-not-played` (no provider with camera moves: the camera
197
+ eases between framings instead).
198
+
199
+ Exports to Flair tag each camera change with `<move>@<shot>`; with the provider set the camera
200
+ is sampled from the move, and a cut stays a jump.
201
+
178
202
  ## Pitfalls
179
203
 
204
+ - **One move per role per shot.** Whip pans and cuts jump half way: put them between framings
205
+ that differ, and do not follow a cut with a long glide into the same framing.
206
+
180
207
  - With agent playback on, the cursor clicks the shot a call names in the timeline and visits the stage elements its commands target. Results are unchanged.
181
208
  - **Effect commands are ordinary commands.** You can retime or edit them with `edit_animation` like
182
209
  any command, but `update_effect` replaces all of an effect's commands. Change values through the
@@ -66,6 +66,8 @@ This skill is the method. `pixerate-animation-editor` has the full tool referenc
66
66
  | Draw a line or outline | `draw`, or `enter` `style: "draw"` |
67
67
  | Attention on one element | `pulse`, `shake`, `wiggle` (sparingly) |
68
68
  | A set length | `fit_animation` with `seconds`, `keep` for fixed shots |
69
+ | The camera travels to the next part | `update_shot` camera `frame`, then `set_shot_camera_move` role `transition` (a glide; a whip pan for energy) |
70
+ | A slow push while a shot holds | `set_shot_camera_move` role `hold` (a Ken Burns drift), with a longer `hold` |
69
71
 
70
72
  ## Recipes
71
73
 
@@ -95,6 +97,7 @@ This skill is the method. `pixerate-animation-editor` has the full tool referenc
95
97
  - `add_commands`, `update_command`, `delete_commands`, `move_command`: refine commands
96
98
  - `edit_animation`: several edits as one undo step
97
99
  - `fit_animation`, `set_animation_settings`, `get_timing_grid`: length, settings and cues
100
+ - `list_camera_moves`, `set_shot_camera_move`: provider camera moves into and during a shot
98
101
  - `check_animation`, `get_motion_path`, `render_animation_frame`: check and look
99
102
  - `export_lottie`, `export_flair_motion`: deliver
100
103
  - `undo_animation`: take back a step
@@ -83,6 +83,12 @@ the pitfalls, and uses the tools below.
83
83
  or `add_video_effect_clip` (generators and titles). Tune with `update_effect` and
84
84
  `set_video_effect_keyframes`; check with `get_video_frame` (layers list `effects`) and
85
85
  `list_applied_effects`.
86
+ 12. **Camera moves** (a provider with camera moves, such as Flair): a clip is the shot.
87
+ `list_video_camera_moves` with a `role`, then `set_clip_camera_move`: `transition` moves
88
+ from `from` to `framing` from the clip's start (a glide, whip pan, punch zoom); `hold`
89
+ plays across the rest of the clip at `framing` (a Ken Burns drift on a still). The moves are
90
+ baked into the clip's x, y, scale and rotation keys at the project's fps, two keys at a cut,
91
+ so the preview and exports play them without the provider. Check with `get_video_frame`.
86
92
 
87
93
  ## Best practices
88
94
 
@@ -284,7 +290,7 @@ and every write tool is refused with the reason.
284
290
 
285
291
  | Tool | Use it to |
286
292
  | --- | --- |
287
- | `search_effects` | Find effects: words in `query`, filtered by `kind`, `category` or `use` (filter, overlay for clips; transition; generator, title). Returns ids, names, uses, whether they are transparent or loop, and their length. Camera moves (`kind` camera) are listed but not applied to clips (`appliesHere` false). Call `describe_effect` next. |
293
+ | `search_effects` | Find effects: words in `query`, filtered by `kind`, `category` or `use` (filter, overlay for clips; transition; generator, title). Returns ids, names, uses, whether they are transparent or loop, and their length. Camera moves (`kind` camera) are listed but go on clips with `set_clip_camera_move`, not `apply_effect`. Call `describe_effect` next. |
288
294
  | `describe_effect` | Read one effect's `controls` (a strict JSON Schema: names, types, ranges, units), `defaults`, `presets` and `inputs`, and whether it `appliesHere` (as a clip effect). Use the names and ranges for values. |
289
295
  | `list_applied_effects` | See the effects in the project per clip, in order: clip effects (`fx1`...), an effect clip's own effect (`generator`) and an effect transition (`transition`), with their saved values and `available` (false when the provider lacks it: drawn as a placeholder). |
290
296
  | `apply_effect` | Add a filter or overlay effect to a clip's stack (`target` clip id, `effect`, `values`, `index`, `enabled`, `opacity`). Effects run in order on the clip's picture before its grade and placement. Returns the effect's new id and the clip's effects. |
@@ -293,6 +299,9 @@ and every write tool is refused with the reason.
293
299
  | `add_video_effect_clip` | Put a generator, title or overlay effect on a video `track` as a clip filling the frame (`start`, `duration` default the effect's own length, `values`, `mode`). Transparent effects show the tracks beneath. Returns the clip id. |
294
300
  | `set_video_effect_transition` | Use a transition effect from the effects provider into a `clip` from the one ending where it starts (`duration` centred on the cut, `values`). Needs handles like a crossfade. For a cross dissolve, dip, wipe, push, slide or iris use the built-in `set_video_transition` instead. |
295
301
  | `set_video_effect_keyframes` | Animate one number `control` of a clip effect (or an effect clip's `generator`) with `keys` in clip ms, or `null` to stop animating it. |
302
+ | `list_video_camera_moves` | List the provider's camera moves for a `role` (`transition` into a clip, `hold` across it) with `durationMs` and `cut`. Returns `available: false` without camera moves. Call before `set_clip_camera_move`. |
303
+ | `set_clip_camera_move` | Play a camera move on a clip's picture (`clip`, `role`, `move`, `ms` for a transition, `preset`, `values`, `from` and `framing` as `{ zoom, x, y }`): baked into its transform keys, one per frame, two at a cut. Returns the camera, key counts, `cuts`, `windows` and `notes` (tilt, turn and blur cannot be baked). Refuses a clip keyed by hand. |
304
+ | `clear_clip_camera_move` | Remove a clip's move for a `role` and re-bake the other; with none left the transform goes back to what it was. |
296
305
 
297
306
  ### Save and open
298
307
 
@@ -308,6 +317,12 @@ The host may add the shared document tools (see `pixerate-agent-tools`). A video
308
317
 
309
318
  ## Pitfalls
310
319
 
320
+ - **Camera moves are baked keys.** After trimming or splitting a clip, `check_video_project`
321
+ reports `camera-stale`: set the move again to re-bake it. Editing the clip's x, y, scale or
322
+ rotation keys by hand leaves the moves no longer describing them; clear the moves first.
323
+ - **A cut is two keys at one time** (the value just before, then the value after). Keys may
324
+ share a time only in pairs; a speed ramp never takes one.
325
+
311
326
  - **An adjustment clip changes only tracks below it** (scope `underneath`). Put it on a new top
312
327
  track (`add_video_track` with `at: 0`), or use scope `all`. Adjustment clips have no sound and
313
328
  are left out of EDLs; ffmpeg exports draw a plain grade or full-strength LUT at full opacity
@@ -65,7 +65,7 @@ music track and cutting to them, see `pixerate-bgm-alignment`.
65
65
  | Time passing | Crossfade or dip between shots |
66
66
  | A section change | Dip to black or a held shot, then a new rhythm |
67
67
  | Continuity of motion | Cut on action (`roll_video_edit` onto the movement) |
68
- | Photos in a slideshow | Image assets, a slow push-in (`set_video_keyframes` scale 1 to 1.08) |
68
+ | Photos in a slideshow | Image assets, a slow push-in: with a provider that has camera moves, `set_clip_camera_move` role `hold` (a Ken Burns drift) on each photo; otherwise `set_video_keyframes` scale 1 to 1.08 |
69
69
 
70
70
  ## Recipes
71
71
 
@@ -96,4 +96,5 @@ start: 0, duration: <sequence>, fadeOut: 2000 }`; `update_video_clip` on the las
96
96
  - `roll_video_edit`, `slip_video_clip`, `trim_video_clip`, `close_video_gaps`: refine the rhythm
97
97
  - `set_video_transition`: crossfades and dips
98
98
  - `update_video_clip`, `set_video_keyframes`: fades, volume and push-ins
99
+ - `list_video_camera_moves`, `set_clip_camera_move`: provider camera moves (a drift across a photo)
99
100
  - `undo_video`: take back a step