@pixerate/editor 0.232.0 → 0.234.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.
- package/dist/animation-editor/compile.d.cts +3 -0
- package/dist/animation-editor/compile.d.ts +3 -0
- package/dist/animation-editor/controller.d.cts +67 -2
- package/dist/animation-editor/controller.d.ts +67 -2
- package/dist/animation-editor/edit.d.cts +1 -1
- package/dist/animation-editor/edit.d.ts +1 -1
- package/dist/animation-editor/evaluate.d.cts +8 -1
- package/dist/animation-editor/evaluate.d.ts +8 -1
- package/dist/animation-editor/index.cjs +1202 -371
- package/dist/animation-editor/index.d.cts +3 -0
- package/dist/animation-editor/index.d.ts +3 -0
- package/dist/animation-editor/index.js +1032 -201
- package/dist/animation-editor/issues.d.cts +28 -0
- package/dist/animation-editor/issues.d.ts +28 -0
- package/dist/animation-editor/layer-edit.d.cts +55 -0
- package/dist/animation-editor/layer-edit.d.ts +55 -0
- package/dist/animation-editor/layer-tools.d.cts +11 -0
- package/dist/animation-editor/layer-tools.d.ts +11 -0
- package/dist/animation-editor/layers.d.cts +166 -0
- package/dist/animation-editor/layers.d.ts +166 -0
- package/dist/animation-editor/parse.d.cts +2 -0
- package/dist/animation-editor/parse.d.ts +2 -0
- package/dist/animation-editor/types.d.cts +44 -1
- package/dist/animation-editor/types.d.ts +44 -1
- package/dist/canvas/editorDocument.d.cts +49 -4
- package/dist/canvas/editorDocument.d.ts +49 -4
- package/dist/canvas/index.cjs +57 -30
- package/dist/canvas/index.js +44 -17
- package/dist/chunk-6RZVFYGJ.cjs +255 -0
- package/dist/{chunk-RG4O6K2A.cjs → chunk-A7PQNIBX.cjs} +14 -14
- package/dist/{chunk-ERJA5CGT.cjs → chunk-DGWOGQJ5.cjs} +8 -1
- package/dist/{chunk-TYCJGFCF.js → chunk-EUKY4KFX.js} +8 -1
- package/dist/chunk-I277KJLQ.js +255 -0
- package/dist/{chunk-2K5TELHV.cjs → chunk-JAOSL334.cjs} +10 -10
- package/dist/{chunk-MUSZYMBX.js → chunk-TEFQISBY.js} +1 -1
- package/dist/{chunk-6QLTUGMO.js → chunk-WDDUPWVG.js} +1 -1
- package/dist/{chunk-A653N65Q.cjs → chunk-ZQIWBJGH.cjs} +7 -7
- package/dist/effects/index.cjs +114 -322
- package/dist/effects/index.js +23 -231
- package/dist/image-editor/index.cjs +16 -16
- package/dist/image-editor/index.js +4 -4
- package/dist/paint-editor/index.cjs +10 -10
- package/dist/paint-editor/index.js +5 -5
- package/dist/vector/index.cjs +6 -6
- package/dist/vector/index.js +1 -1
- package/dist/video-editor/index.cjs +339 -339
- package/dist/video-editor/index.js +5 -5
- package/package.json +1 -1
- package/skills/pixerate-animation-editor/SKILL.md +10 -0
- package/skills/pixerate-animation-motion-graphics/SKILL.md +4 -0
- package/skills/pixerate-canvas/SKILL.md +2 -2
- package/skills/pixerate-video-editor/SKILL.md +11 -0
- package/skills/pixerate-video-montage/SKILL.md +2 -0
- package/dist/{chunk-PQYDJ2AV.js → chunk-SIK3LT6M.js} +16 -16
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createEffectAuthoringSession
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-TEFQISBY.js";
|
|
4
4
|
import {
|
|
5
5
|
VIDEO_ADJUSTMENT_SCOPES,
|
|
6
6
|
VIDEO_BLEND_MODES,
|
|
@@ -149,11 +149,11 @@ import {
|
|
|
149
149
|
videoTransitionEase,
|
|
150
150
|
videoValueAt,
|
|
151
151
|
videoWipeRect
|
|
152
|
-
} from "../chunk-
|
|
153
|
-
import "../chunk-EHLOCVWB.js";
|
|
152
|
+
} from "../chunk-WDDUPWVG.js";
|
|
154
153
|
import {
|
|
155
154
|
namedWithSuggestion
|
|
156
|
-
} from "../chunk-
|
|
155
|
+
} from "../chunk-EUKY4KFX.js";
|
|
156
|
+
import "../chunk-EHLOCVWB.js";
|
|
157
157
|
import {
|
|
158
158
|
CAMERA_MOVE_MAX_MS,
|
|
159
159
|
EffectsSlot,
|
|
@@ -163,7 +163,7 @@ import {
|
|
|
163
163
|
isEffectError,
|
|
164
164
|
resolveCameraMoveSpec,
|
|
165
165
|
sampleEffectCameraMove
|
|
166
|
-
} from "../chunk-
|
|
166
|
+
} from "../chunk-SIK3LT6M.js";
|
|
167
167
|
import "../chunk-V2ZCJRDM.js";
|
|
168
168
|
import {
|
|
169
169
|
defineEditorDocument
|
package/package.json
CHANGED
|
@@ -172,6 +172,9 @@ refuse.
|
|
|
172
172
|
| `remove_shot_layer` | Remove a layer. |
|
|
173
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
174
|
| `clear_shot_transition` | Remove a shot's transition, so it cuts (or the camera eases) again. |
|
|
175
|
+
| `list_templates` | List the provider's sequence templates (`query`, `tags`): ids, names, shot counts, lengths. Returns `available: false` without templates. Call before `describe_template`. |
|
|
176
|
+
| `describe_template` | Read a template's slots (type, label, default, limits), its `valuesSchema` and `exampleValues`. Call before `fill_template`. |
|
|
177
|
+
| `fill_template` | Fill a template (`template`, `values`, `name`, `mode` replace or append) and load its shots as one undo step. Every value that does not fit is refused at once. Returns the new `shots`, `layers`, `openSlots` and `notes`. |
|
|
175
178
|
|
|
176
179
|
### Save and open
|
|
177
180
|
|
|
@@ -228,6 +231,13 @@ Flair's scenes do:
|
|
|
228
231
|
`layer-not-drawn` and `transition-not-played` (no provider: effect layers are left out and
|
|
229
232
|
transitions crossfade).
|
|
230
233
|
|
|
234
|
+
A provider's **sequence templates** are whole scenes of such shots with slots to fill (a
|
|
235
|
+
product reveal, before and after, a stat countdown): `list_templates`, `describe_template`, then
|
|
236
|
+
`fill_template` with `values` (start from `exampleValues`). `mode` replace (default) makes a new
|
|
237
|
+
scene the size of the template's stage; append adds its shots after yours, scaled to the
|
|
238
|
+
artwork. Titles and captions become overlay word layers. Fill the `openSlots` it reports with
|
|
239
|
+
`update_shot_layer` (`subject`), then animate artwork over the shots as usual.
|
|
240
|
+
|
|
231
241
|
Layers are pixels: the Flair `SvgMotion` export leaves them out. Use them for backgrounds, looks
|
|
232
242
|
and titles, and keep what should animate node by node in the artwork.
|
|
233
243
|
|
|
@@ -68,6 +68,8 @@ This skill is the method. `pixerate-animation-editor` has the full tool referenc
|
|
|
68
68
|
| A set length | `fit_animation` with `seconds`, `keep` for fixed shots |
|
|
69
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
70
|
| A slow push while a shot holds | `set_shot_camera_move` role `hold` (a Ken Burns drift), with a longer `hold` |
|
|
71
|
+
| A background, look or title behind or over a shot | `add_shot_layer` (a generator for a background, an overlay or title over it); `set_shot_transition` between shots |
|
|
72
|
+
| A whole ready-made sequence (a reveal, a countdown) | `list_templates`, `describe_template`, `fill_template` (mode append keeps your shots), then animate artwork over it |
|
|
71
73
|
|
|
72
74
|
## Recipes
|
|
73
75
|
|
|
@@ -98,6 +100,8 @@ This skill is the method. `pixerate-animation-editor` has the full tool referenc
|
|
|
98
100
|
- `edit_animation`: several edits as one undo step
|
|
99
101
|
- `fit_animation`, `set_animation_settings`, `get_timing_grid`: length, settings and cues
|
|
100
102
|
- `list_camera_moves`, `set_shot_camera_move`: provider camera moves into and during a shot
|
|
103
|
+
- `add_shot_layer`, `set_shot_transition`: provider effect layers and transitions on shots
|
|
104
|
+
- `list_templates`, `describe_template`, `fill_template`: a provider's sequence template as shots
|
|
101
105
|
- `check_animation`, `get_motion_path`, `render_animation_frame`: check and look
|
|
102
106
|
- `export_lottie`, `export_flair_motion`: deliver
|
|
103
107
|
- `undo_animation`: take back a step
|
|
@@ -168,12 +168,12 @@ the reason (for example a variant combination that already exists, or a cycle).
|
|
|
168
168
|
|
|
169
169
|
### Save and open
|
|
170
170
|
|
|
171
|
-
The host may add the shared document tools (see `pixerate-agent-tools`). A canvas document is `{ nodes, edges, scenes }`: every node (`id`, `position`, `data`, `type`, `parentId`...) and edge without selection or
|
|
171
|
+
The host may add the shared document tools (see `pixerate-agent-tools`). A canvas document is `{ nodes, edges, scenes, viewport }`: every node (`id`, `position`, `data`, `type`, `parentId`...) and edge without selection, measurement or the fields the host leaves out, plus the saved scenes and, when the host saves it, the `viewport` (`{ x, y, zoom }`) the canvas was looking at. Large inline images in node data may come back as `pixerate-asset:` references: pass them back unchanged, they are only valid in this session.
|
|
172
172
|
|
|
173
173
|
| Tool | Use |
|
|
174
174
|
| --- | --- |
|
|
175
175
|
| `get_canvas_document` | Take a copy of the whole canvas as `{ kind, formatVersion, revision, document }` before a risky rewrite, or to hand it on. To read the canvas, use `get_editor_state`: it is smaller and says more. Refuses very large canvases. |
|
|
176
|
-
| `load_canvas_document` | Put back a copy from `get_canvas_document` (its `document`, or the whole result). Checked first: duplicate ids, edges to missing nodes
|
|
176
|
+
| `load_canvas_document` | Put back a copy from `get_canvas_document` (its `document`, or the whole result). Checked first: duplicate ids, edges to missing nodes, parents that do not exist, a bad `viewport` and anything the host's own node check rejects (the error names the node and says why) are refused and nothing changes. A `viewport` in the document moves the view; leave it out to keep the current view. One undo step (`undo_canvas` brings the previous canvas back). To add or change a few nodes use `canvas_add_node` / `canvas_update_node`. |
|
|
177
177
|
| `undo_canvas` | Undo the last canvas change (one tool call, command or user gesture such as a drag). Returns `undone` (the step's name) and whether more can be undone. Fails with "Nothing to undo." when there is nothing. |
|
|
178
178
|
| `redo_canvas` | Redo the last undone canvas change. |
|
|
179
179
|
| `save_canvas_document` | Save the canvas under a `name` in the host's storage (the same name replaces that copy). Returns the `key`. Only listed when the host has storage. Save when the user asks, not after every edit. |
|
|
@@ -89,6 +89,14 @@ the pitfalls, and uses the tools below.
|
|
|
89
89
|
plays across the rest of the clip at `framing` (a Ken Burns drift on a still). The moves are
|
|
90
90
|
baked into the clip's x, y, scale and rotation keys at the project's fps, two keys at a cut,
|
|
91
91
|
so the preview and exports play them without the provider. Check with `get_video_frame`.
|
|
92
|
+
13. **Sequence templates** (a provider with templates): for a ready-made opening, reveal or
|
|
93
|
+
countdown, `list_templates`, then `describe_template` for its slots, then `fill_template`
|
|
94
|
+
with `values` (start from its `exampleValues`) and `at`. It lands on new tracks above the
|
|
95
|
+
others as one undo step: each shot's bottom layer on a base track carrying the shot's
|
|
96
|
+
transition, other layers as effect, picture and text clips by role. Open slots come back as
|
|
97
|
+
grey placeholder clips (`placeholders`); put the real picture over one with
|
|
98
|
+
`add_video_asset` and `add_video_clip` in `overwrite` mode. Camera moves are not carried
|
|
99
|
+
over: add them with `set_clip_camera_move`.
|
|
92
100
|
|
|
93
101
|
## Best practices
|
|
94
102
|
|
|
@@ -302,6 +310,9 @@ and every write tool is refused with the reason.
|
|
|
302
310
|
| `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
311
|
| `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
312
|
| `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. |
|
|
313
|
+
| `list_templates` | List the provider's sequence templates (`query`, `tags`): ids, names, shot counts, lengths. Returns `available: false` without templates. Call before `describe_template`. |
|
|
314
|
+
| `describe_template` | Read a template's slots (type, label, default, limits), its `valuesSchema` and `exampleValues`. Call before `fill_template`. |
|
|
315
|
+
| `fill_template` | Fill a template (`template`, `values`, `name`, `at` ms) and put it on new tracks at `at` as one undo step. Every value that does not fit is refused at once. Returns the new `tracks`, `clips`, `assets`, `start`, `end`, `placeholders` by open slot, and `notes`. |
|
|
305
316
|
|
|
306
317
|
### Save and open
|
|
307
318
|
|
|
@@ -66,6 +66,7 @@ music track and cutting to them, see `pixerate-bgm-alignment`.
|
|
|
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
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
|
+
| An opening or closing sequence the provider has as a template | `list_templates`, `describe_template`, then `fill_template` with `at` the start; put the real pictures over its placeholders |
|
|
69
70
|
|
|
70
71
|
## Recipes
|
|
71
72
|
|
|
@@ -97,4 +98,5 @@ start: 0, duration: <sequence>, fadeOut: 2000 }`; `update_video_clip` on the las
|
|
|
97
98
|
- `set_video_transition`: crossfades and dips
|
|
98
99
|
- `update_video_clip`, `set_video_keyframes`: fades, volume and push-ins
|
|
99
100
|
- `list_video_camera_moves`, `set_clip_camera_move`: provider camera moves (a drift across a photo)
|
|
101
|
+
- `list_templates`, `describe_template`, `fill_template`: a provider's sequence template as clips on new tracks
|
|
100
102
|
- `undo_video`: take back a step
|
|
@@ -2,6 +2,15 @@ import {
|
|
|
2
2
|
validateJsonSchema
|
|
3
3
|
} from "./chunk-V2ZCJRDM.js";
|
|
4
4
|
|
|
5
|
+
// src/effects/types.ts
|
|
6
|
+
var EFFECT_KINDS = ["shader", "vector", "motion", "camera"];
|
|
7
|
+
var EFFECT_USES = ["filter", "transition", "generator", "overlay", "title", "motion", "interactive", "camera"];
|
|
8
|
+
var CAMERA_MOVE_ROLES = ["transition", "hold"];
|
|
9
|
+
var EFFECT_SUBJECT_KINDS = ["image", "video", "svg", "text", "slot"];
|
|
10
|
+
var EFFECT_LAYER_ROLES = ["background", "subject", "overlay"];
|
|
11
|
+
var EFFECT_TRANSITION_MS = 800;
|
|
12
|
+
var EFFECT_TEMPLATE_SLOT_TYPES = ["image", "video", "svg", "text", "color", "number"];
|
|
13
|
+
|
|
5
14
|
// src/effects/errors.ts
|
|
6
15
|
var EFFECT_ERROR_CODES = ["unknown_effect", "invalid_values", "unsupported", "disposed", "no_provider", "unknown_template"];
|
|
7
16
|
var EffectError = class extends Error {
|
|
@@ -281,15 +290,6 @@ function cameraBoxOfView(view, stage) {
|
|
|
281
290
|
return { x: -view.scrollX, y: -view.scrollY, width, height };
|
|
282
291
|
}
|
|
283
292
|
|
|
284
|
-
// src/effects/types.ts
|
|
285
|
-
var EFFECT_KINDS = ["shader", "vector", "motion", "camera"];
|
|
286
|
-
var EFFECT_USES = ["filter", "transition", "generator", "overlay", "title", "motion", "interactive", "camera"];
|
|
287
|
-
var CAMERA_MOVE_ROLES = ["transition", "hold"];
|
|
288
|
-
var EFFECT_SUBJECT_KINDS = ["image", "video", "svg", "text", "slot"];
|
|
289
|
-
var EFFECT_LAYER_ROLES = ["background", "subject", "overlay"];
|
|
290
|
-
var EFFECT_TRANSITION_MS = 800;
|
|
291
|
-
var EFFECT_TEMPLATE_SLOT_TYPES = ["image", "video", "svg", "text", "color", "number"];
|
|
292
|
-
|
|
293
293
|
// src/effects/tools.ts
|
|
294
294
|
var ANNOTATIONS = {
|
|
295
295
|
read: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
@@ -528,6 +528,13 @@ function createEffectToolProvider(host) {
|
|
|
528
528
|
}
|
|
529
529
|
|
|
530
530
|
export {
|
|
531
|
+
EFFECT_KINDS,
|
|
532
|
+
EFFECT_USES,
|
|
533
|
+
CAMERA_MOVE_ROLES,
|
|
534
|
+
EFFECT_SUBJECT_KINDS,
|
|
535
|
+
EFFECT_LAYER_ROLES,
|
|
536
|
+
EFFECT_TRANSITION_MS,
|
|
537
|
+
EFFECT_TEMPLATE_SLOT_TYPES,
|
|
531
538
|
EFFECT_ERROR_CODES,
|
|
532
539
|
EffectError,
|
|
533
540
|
UnknownEffectError,
|
|
@@ -562,12 +569,5 @@ export {
|
|
|
562
569
|
resolveCameraMoveSpec,
|
|
563
570
|
cameraViewOfBox,
|
|
564
571
|
cameraBoxOfView,
|
|
565
|
-
EFFECT_KINDS,
|
|
566
|
-
EFFECT_USES,
|
|
567
|
-
CAMERA_MOVE_ROLES,
|
|
568
|
-
EFFECT_SUBJECT_KINDS,
|
|
569
|
-
EFFECT_LAYER_ROLES,
|
|
570
|
-
EFFECT_TRANSITION_MS,
|
|
571
|
-
EFFECT_TEMPLATE_SLOT_TYPES,
|
|
572
572
|
createEffectToolProvider
|
|
573
573
|
};
|