@pixerate/editor 0.150.1 → 0.152.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/agent/index.cjs +34 -34
- package/dist/agent/index.js +8 -8
- package/dist/animation-editor/editorDocument.d.cts +9 -0
- package/dist/animation-editor/editorDocument.d.ts +9 -0
- package/dist/animation-editor/index.cjs +33 -1
- package/dist/animation-editor/index.d.cts +1 -0
- package/dist/animation-editor/index.d.ts +1 -0
- package/dist/animation-editor/index.js +32 -0
- package/dist/bridge/cli.cjs +4 -4
- package/dist/bridge/cli.js +3 -3
- package/dist/bridge/index.cjs +4 -4
- package/dist/bridge/index.js +3 -3
- package/dist/chart/controller.d.cts +5 -0
- package/dist/chart/controller.d.ts +5 -0
- package/dist/chart/editorDocument.d.cts +10 -0
- package/dist/chart/editorDocument.d.ts +10 -0
- package/dist/chart/index.cjs +54 -18
- package/dist/chart/index.d.cts +1 -0
- package/dist/chart/index.d.ts +1 -0
- package/dist/chart/index.js +37 -1
- package/dist/{chunk-ENIZYNEF.cjs → chunk-24M7VD6M.cjs} +7 -7
- package/dist/{chunk-OET45HIR.js → chunk-4RF2H3N3.js} +10 -0
- package/dist/{chunk-KC7HB5GF.cjs → chunk-5H2C3QSF.cjs} +4 -3
- package/dist/{chunk-HRLT5BYO.js → chunk-GNV54DLO.js} +2 -1
- package/dist/{chunk-EAQ4BGNS.js → chunk-MKTDELCD.js} +1 -1
- package/dist/{chunk-X35BV5YT.cjs → chunk-ML2II3Y3.cjs} +10 -0
- package/dist/{chunk-DVLMW3GB.cjs → chunk-R3PECGTQ.cjs} +44 -44
- package/dist/{chunk-2AQL4JHM.js → chunk-R6HNWN7B.js} +1 -1
- package/dist/{chunk-6QTON3VW.cjs → chunk-RZJCYJWO.cjs} +8 -8
- package/dist/{chunk-O5ML2I6O.js → chunk-SVINJIGK.js} +1 -1
- package/dist/diagram/index.cjs +6 -6
- package/dist/diagram/index.js +5 -5
- package/dist/export/index.cjs +1 -1
- package/dist/export/index.js +1 -1
- package/dist/extensions/index.cjs +5 -5
- package/dist/extensions/index.js +4 -4
- package/dist/image-editor/index.cjs +4 -4
- package/dist/image-editor/index.js +4 -4
- package/dist/index.cjs +14 -14
- package/dist/index.js +8 -8
- package/dist/paint-editor/controller.d.cts +8 -2
- package/dist/paint-editor/controller.d.ts +8 -2
- package/dist/paint-editor/index.cjs +8 -4
- package/dist/paint-editor/index.js +8 -4
- package/dist/parameters/controller.d.cts +6 -0
- package/dist/parameters/controller.d.ts +6 -0
- package/dist/parameters/editorDocument.d.cts +9 -0
- package/dist/parameters/editorDocument.d.ts +9 -0
- package/dist/parameters/index.cjs +71 -1
- package/dist/parameters/index.d.cts +1 -0
- package/dist/parameters/index.d.ts +1 -0
- package/dist/parameters/index.js +70 -0
- package/dist/persistence/editorDocument.d.cts +6 -3
- package/dist/persistence/editorDocument.d.ts +6 -3
- package/dist/persistence/index.cjs +7 -7
- package/dist/persistence/index.js +1 -1
- package/dist/tools/index.cjs +5 -5
- package/dist/tools/index.js +6 -6
- package/dist/vector/editorDocument.d.cts +9 -0
- package/dist/vector/editorDocument.d.ts +9 -0
- package/dist/vector/index.cjs +45 -1
- package/dist/vector/index.d.cts +1 -0
- package/dist/vector/index.d.ts +1 -0
- package/dist/vector/index.js +44 -0
- package/dist/video-editor/editorDocument.d.cts +9 -0
- package/dist/video-editor/editorDocument.d.ts +9 -0
- package/dist/video-editor/index.cjs +33 -1
- package/dist/video-editor/index.d.cts +1 -0
- package/dist/video-editor/index.d.ts +1 -0
- package/dist/video-editor/index.js +32 -0
- package/package.json +1 -1
- package/skills/pixerate-animation-editor/SKILL.md +12 -0
- package/skills/pixerate-chart/SKILL.md +12 -0
- package/skills/pixerate-parameters/SKILL.md +12 -0
- package/skills/pixerate-vector/SKILL.md +14 -0
- package/skills/pixerate-video-editor/SKILL.md +12 -0
- package/dist/{chunk-Y4BWZB6J.cjs → chunk-462WGGXX.cjs} +2 -2
- package/dist/{chunk-RFBFTLVN.js → chunk-EVXQNQND.js} +3 -3
|
@@ -131,6 +131,18 @@ it changed.
|
|
|
131
131
|
| `undo_chart` | Undo the last chart edit. Returns the label of what was undone and the next undo. |
|
|
132
132
|
| `redo_chart` | Redo the last undone chart edit. |
|
|
133
133
|
|
|
134
|
+
### Save and open
|
|
135
|
+
|
|
136
|
+
The host may add the shared document tools (see `pixerate-agent-tools`). A chart document is the `ChartSpec`.
|
|
137
|
+
|
|
138
|
+
| Tool | Use |
|
|
139
|
+
| --- | --- |
|
|
140
|
+
| `get_chart_document` | Take a copy of the whole chart as `{ kind, formatVersion, revision, document }` before a risky rewrite, or to hand it on. To read the chart, use `get_chart`: it is smaller and says more. Refuses very large documents. |
|
|
141
|
+
| `load_chart_document` | Put back a copy from `get_chart_document` (its `document`, or the whole result). Checked first: when anything is wrong nothing changes and the error says what. One undo step (`undo_chart` brings the previous chart back). Every problem in the spec is refused, the same as `update_chart`; for data from a file use the import tools. |
|
|
142
|
+
| `save_chart_document` | Save the chart 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. |
|
|
143
|
+
| `list_saved_chart_documents` | List saved charts (`key`, `name`, `savedAt`), newest first. |
|
|
144
|
+
| `open_saved_chart_document` | Replace the chart with a saved one by `key`. One undo step. Ask before opening over changes the user has not saved. |
|
|
145
|
+
|
|
134
146
|
## Commands
|
|
135
147
|
|
|
136
148
|
The `chart.*` commands (run with `run_command` / `run_commands`) mirror the tools. Prefer
|
|
@@ -67,6 +67,18 @@ with `list_commands` (query "Parameters").
|
|
|
67
67
|
| `parameters.undo` | Undo the last parameter change (a `parameters.set` call, preset, reset, randomize or keyframe toggle is one step). Disabled when there is nothing to undo. |
|
|
68
68
|
| `parameters.redo` | Re-apply the change just undone. Disabled when there is nothing to redo. |
|
|
69
69
|
|
|
70
|
+
## Save and open
|
|
71
|
+
|
|
72
|
+
The host may add the shared document tools (see `pixerate-agent-tools`). A parameters document is `{ values, presets }`: every field value (missing ones take their defaults) and the user presets.
|
|
73
|
+
|
|
74
|
+
| Tool | Use |
|
|
75
|
+
| --- | --- |
|
|
76
|
+
| `get_parameters_document` | Take a copy of the whole parameter set as `{ kind, formatVersion, revision, document }` before a risky rewrite, or to hand it on. To read the parameter set, use `parameters.list`: it is smaller and says more. Refuses very large documents. |
|
|
77
|
+
| `load_parameters_document` | Put back a copy from `get_parameters_document` (its `document`, or the whole result). Checked first: when anything is wrong nothing changes and the error says what. One undo step (`parameters.undo` brings the previous values back). Unknown field ids and invalid values are refused. To change a few values use `parameters.set`. |
|
|
78
|
+
| `save_parameters_document` | Save the parameter set 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. |
|
|
79
|
+
| `list_saved_parameters_documents` | List saved parameter sets (`key`, `name`, `savedAt`), newest first. |
|
|
80
|
+
| `open_saved_parameters_document` | Replace the parameter set with a saved one by `key`. One undo step. Ask before opening over changes the user has not saved. |
|
|
81
|
+
|
|
70
82
|
## Pitfalls
|
|
71
83
|
|
|
72
84
|
- With agent playback on, `parameters.set` visits each control it changes and types the value. Set related values in one call; results are unchanged.
|
|
@@ -455,6 +455,20 @@ the animation editor.
|
|
|
455
455
|
| `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. |
|
|
456
456
|
| `remove_effect` | Keep the group's shapes as a plain group, detached from the effect. |
|
|
457
457
|
|
|
458
|
+
### Save and open
|
|
459
|
+
|
|
460
|
+
The host may add the shared document tools (see `pixerate-agent-tools`). A vector document is the `VectorDocument` (artboard size, nodes, symbols, constraints); the tool, selection and view are not part of it.
|
|
461
|
+
|
|
462
|
+
| Tool | Use |
|
|
463
|
+
| --- | --- |
|
|
464
|
+
| `get_vector_document` | Take a copy of the whole vector document as `{ kind, formatVersion, revision, document }` before a risky rewrite, or to hand it on. To read the vector document, use `vector.list`: it is smaller and says more. Refuses very large documents. |
|
|
465
|
+
| `load_vector_document` | Put back a copy from `get_vector_document` (its `document`, or the whole result). Checked first: when anything is wrong nothing changes and the error says what. One undo step (`undo_vector` brings the previous document back). For SVG markup use `vector.importSvg`. |
|
|
466
|
+
| `undo_vector` | Undo the last vector edit (one command, one batch or one user gesture). Returns `undone` (the step's name) and whether more can be undone. Fails with "Nothing to undo." when there is nothing. |
|
|
467
|
+
| `redo_vector` | Redo the last undone vector edit. |
|
|
468
|
+
| `save_vector_document` | Save the vector document 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. |
|
|
469
|
+
| `list_saved_vector_documents` | List saved vector documents (`key`, `name`, `savedAt`), newest first. |
|
|
470
|
+
| `open_saved_vector_document` | Replace the vector document with a saved one by `key`. One undo step. Ask before opening over changes the user has not saved. |
|
|
471
|
+
|
|
458
472
|
## Pitfalls
|
|
459
473
|
|
|
460
474
|
The most common ones are below. Read [references/pitfalls.md](references/pitfalls.md) before working with connectors, frames, masks, filters, text, symbols, constraints, blends, gradient meshes or live corners.
|
|
@@ -254,6 +254,18 @@ and every write tool is refused with the reason.
|
|
|
254
254
|
| `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. |
|
|
255
255
|
| `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. |
|
|
256
256
|
|
|
257
|
+
### Save and open
|
|
258
|
+
|
|
259
|
+
The host may add the shared document tools (see `pixerate-agent-tools`). A video document is the `VideoProject` (assets point at their media; the media itself is not copied); the playhead is not part of it.
|
|
260
|
+
|
|
261
|
+
| Tool | Use |
|
|
262
|
+
| --- | --- |
|
|
263
|
+
| `get_video_document` | Take a copy of the whole video project as `{ kind, formatVersion, revision, document }` before a risky rewrite, or to hand it on. To read the video project, use `get_video_project`: it is smaller and says more. Refuses very large documents. |
|
|
264
|
+
| `load_video_document` | Put back a copy from `get_video_document` (its `document`, or the whole result). Checked first: when anything is wrong nothing changes and the error says what. One undo step (`undo_video` brings the previous project back). Refused while the editor is read-only. To change part of a project use `edit_video` or the per-operation tools. |
|
|
265
|
+
| `save_video_document` | Save the video project 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. |
|
|
266
|
+
| `list_saved_video_documents` | List saved video projects (`key`, `name`, `savedAt`), newest first. |
|
|
267
|
+
| `open_saved_video_document` | Replace the video project with a saved one by `key`. One undo step. Ask before opening over changes the user has not saved. |
|
|
268
|
+
|
|
257
269
|
## Pitfalls
|
|
258
270
|
|
|
259
271
|
- With agent playback on, the cursor drags a moved or trimmed clip to its new time, clicks a track where a clip goes in, and clicks the ruler where a split, seek or marker lands. Give real `start` / `at` times in ms; results are unchanged.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2;
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkWOFXZ3XUcjs = require('./chunk-WOFXZ3XU.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk2BSBFBOAcjs = require('./chunk-2BSBFBOA.cjs');
|
|
7
7
|
|
|
8
8
|
// src/tools/skills.ts
|
|
9
9
|
function parseSkillFrontmatter(markdown) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
stripPrototypeKeys
|
|
3
|
-
} from "./chunk-HF5QZS7Z.js";
|
|
4
1
|
import {
|
|
5
2
|
validateJsonSchema
|
|
6
3
|
} from "./chunk-V2ZCJRDM.js";
|
|
4
|
+
import {
|
|
5
|
+
stripPrototypeKeys
|
|
6
|
+
} from "./chunk-HF5QZS7Z.js";
|
|
7
7
|
|
|
8
8
|
// src/tools/skills.ts
|
|
9
9
|
function parseSkillFrontmatter(markdown) {
|