@pixerate/editor 0.139.1 → 0.140.1
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/README.md +25 -4
- package/dist/agent/formatTools.d.cts +15 -0
- package/dist/agent/formatTools.d.ts +15 -0
- package/dist/agent/index.cjs +408 -49
- package/dist/agent/index.js +375 -16
- package/dist/agent/providers.d.cts +5 -3
- package/dist/agent/providers.d.ts +5 -3
- package/dist/animation-editor/effect-tools.d.cts +1 -1
- package/dist/animation-editor/effect-tools.d.ts +1 -1
- package/dist/animation-editor/index.cjs +250 -116
- package/dist/animation-editor/index.js +228 -94
- package/dist/animation-editor/instructions.d.cts +1 -1
- package/dist/animation-editor/instructions.d.ts +1 -1
- package/dist/animation-editor/parse.d.cts +3 -1
- package/dist/animation-editor/parse.d.ts +3 -1
- package/dist/animation-editor/tools.d.cts +8 -3
- package/dist/animation-editor/tools.d.ts +8 -3
- package/dist/bridge/cli.cjs +4 -3
- package/dist/bridge/cli.js +3 -2
- package/dist/bridge/index.cjs +8 -3
- package/dist/bridge/index.d.cts +7 -0
- package/dist/bridge/index.d.ts +7 -0
- package/dist/bridge/index.js +9 -4
- package/dist/bridge/skills.d.cts +9 -0
- package/dist/bridge/skills.d.ts +9 -0
- package/dist/canvas/effect-tools.d.cts +1 -1
- package/dist/canvas/effect-tools.d.ts +1 -1
- package/dist/canvas/index.cjs +22 -17
- package/dist/canvas/index.js +8 -3
- package/dist/chart/file-tools.d.cts +1 -1
- package/dist/chart/file-tools.d.ts +1 -1
- package/dist/chart/index.cjs +7 -1
- package/dist/chart/index.js +7 -1
- package/dist/chart/tools.d.cts +1 -1
- package/dist/chart/tools.d.ts +1 -1
- package/dist/chunk-2BSBFBOA.cjs +46 -0
- package/dist/{chunk-SWZTQWY7.js → chunk-2INPJDNY.js} +1 -1
- package/dist/{chunk-CCKP4XAN.cjs → chunk-34RQAGWI.cjs} +27 -7
- package/dist/{chunk-HXCBQ7A6.cjs → chunk-3AJMR7EG.cjs} +7 -4
- package/dist/{chunk-BKMU3V6K.js → chunk-5ED73EC6.js} +8 -1
- package/dist/{chunk-NKBUVQJW.cjs → chunk-5WOY52O6.cjs} +15 -15
- package/dist/{chunk-VRIR53SW.js → chunk-6GAYGQDC.js} +10 -8
- package/dist/{chunk-HZZXBTLB.js → chunk-6IN474P4.js} +25 -5
- package/dist/{chunk-KHMVB3SJ.js → chunk-7KWJEYIK.js} +4 -1
- package/dist/{chunk-R47NQICB.cjs → chunk-AGCD3EHB.cjs} +47 -10
- package/dist/{chunk-6I63VZ45.js → chunk-CXXKJBQZ.js} +5 -1
- package/dist/{chunk-6NXVDJDR.cjs → chunk-G43MNQ4C.cjs} +5 -5
- package/dist/chunk-HDK3T2QS.cjs +1159 -0
- package/dist/chunk-HF5QZS7Z.js +46 -0
- package/dist/{chunk-S7I3RI5Z.cjs → chunk-HMGWFXEC.cjs} +27 -24
- package/dist/{chunk-6NCBFBXA.js → chunk-IQ6KKXOU.js} +1 -1
- package/dist/{chunk-T6Y5FV7G.cjs → chunk-L434J57V.cjs} +10 -8
- package/dist/{chunk-UCRL6JEV.cjs → chunk-L5OWG2NA.cjs} +8 -3
- package/dist/{chunk-CZRWP6IW.cjs → chunk-N2FGYZ4Q.cjs} +8 -1
- package/dist/{chunk-GUPQ5BNA.cjs → chunk-PUR6BZFA.cjs} +112 -111
- package/dist/chunk-RB62U6MS.js +1159 -0
- package/dist/{chunk-3V746PF4.cjs → chunk-RUZQMYXH.cjs} +4 -1
- package/dist/{chunk-HGHXGCKG.cjs → chunk-SVFEVKLF.cjs} +1 -1
- package/dist/{chunk-PCNCT4ZY.js → chunk-UMS6YFA6.js} +40 -3
- package/dist/{chunk-4LGWAJDI.js → chunk-V5OOP74P.js} +5 -2
- package/dist/{chunk-BWT4IWLK.cjs → chunk-VKF3PWKR.cjs} +7 -7
- package/dist/{chunk-PQMADRCI.js → chunk-WBJ6BG4R.js} +23 -22
- package/dist/{chunk-WIYAOZZU.js → chunk-WHKNYFM2.js} +7 -2
- package/dist/{chunk-TBSPPVTT.js → chunk-XCK7QK5D.js} +1 -1
- package/dist/{chunk-F652BKMS.cjs → chunk-YN6JKAUE.cjs} +6 -2
- package/dist/{chunk-YTGF4TJR.js → chunk-ZLZKGHSZ.js} +5 -2
- package/dist/{chunk-USU2FL3N.js → chunk-ZNHB5RG6.js} +1 -1
- package/dist/commands/agentTools.d.cts +1 -1
- package/dist/commands/agentTools.d.ts +1 -1
- package/dist/commands/index.cjs +3 -0
- package/dist/commands/index.js +3 -0
- package/dist/compare/index.cjs +4 -3
- package/dist/compare/index.js +3 -2
- package/dist/diagram/index.cjs +3 -0
- package/dist/diagram/index.js +3 -0
- package/dist/diagram/tools.d.cts +1 -1
- package/dist/diagram/tools.d.ts +1 -1
- package/dist/effects/index.cjs +32 -32
- package/dist/effects/index.js +1 -1
- package/dist/effects/tools.d.cts +5 -1
- package/dist/effects/tools.d.ts +5 -1
- package/dist/export/index.cjs +4 -3
- package/dist/export/index.js +3 -2
- package/dist/extensions/index.cjs +11 -8
- package/dist/extensions/index.d.cts +1 -0
- package/dist/extensions/index.d.ts +1 -0
- package/dist/extensions/index.js +10 -7
- package/dist/extensions/safe-merge-attributes.d.cts +10 -0
- package/dist/extensions/safe-merge-attributes.d.ts +10 -0
- package/dist/generation/index.cjs +7 -1
- package/dist/generation/index.js +7 -1
- package/dist/image-editor/index.cjs +25 -18
- package/dist/image-editor/index.js +10 -3
- package/dist/image-editor/provider-effect-tools.d.cts +1 -1
- package/dist/image-editor/provider-effect-tools.d.ts +1 -1
- package/dist/image-editor/tools.d.cts +1 -1
- package/dist/image-editor/tools.d.ts +1 -1
- package/dist/index.cjs +42 -29
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +22 -9
- package/dist/paint-editor/effect-tools.d.cts +1 -1
- package/dist/paint-editor/effect-tools.d.ts +1 -1
- package/dist/paint-editor/index.cjs +18 -8
- package/dist/paint-editor/index.js +13 -3
- package/dist/paint-editor/tools.d.cts +1 -1
- package/dist/paint-editor/tools.d.ts +1 -1
- package/dist/persistence/index.cjs +3 -2
- package/dist/persistence/index.js +2 -1
- package/dist/serializers/index.cjs +5 -4
- package/dist/serializers/index.js +4 -3
- package/dist/tools/bridge-client.d.cts +3 -3
- package/dist/tools/bridge-client.d.ts +3 -3
- package/dist/tools/capture.d.cts +5 -1
- package/dist/tools/capture.d.ts +5 -1
- package/dist/tools/definitions.d.cts +2 -2
- package/dist/tools/definitions.d.ts +2 -2
- package/dist/tools/index.cjs +39 -5
- package/dist/tools/index.d.cts +4 -0
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/index.js +39 -5
- package/dist/tools/mcp-server.d.cts +24 -6
- package/dist/tools/mcp-server.d.ts +24 -6
- package/dist/tools/registry.d.cts +81 -6
- package/dist/tools/registry.d.ts +81 -6
- package/dist/tools/safe-json.d.cts +27 -0
- package/dist/tools/safe-json.d.ts +27 -0
- package/dist/tools/search.d.cts +30 -0
- package/dist/tools/search.d.ts +30 -0
- package/dist/tools/skills.d.cts +26 -0
- package/dist/tools/skills.d.ts +26 -0
- package/dist/tools/view.d.cts +95 -0
- package/dist/tools/view.d.ts +95 -0
- package/dist/vector/effect-tools.d.cts +1 -1
- package/dist/vector/effect-tools.d.ts +1 -1
- package/dist/vector/index.cjs +13 -7
- package/dist/vector/index.js +8 -2
- package/dist/video-editor/effect-tools.d.cts +1 -1
- package/dist/video-editor/effect-tools.d.ts +1 -1
- package/dist/video-editor/index.cjs +275 -269
- package/dist/video-editor/index.js +8 -2
- package/dist/video-editor/tools.d.cts +1 -1
- package/dist/video-editor/tools.d.ts +1 -1
- package/package.json +31 -29
- package/skills/README.md +8 -3
- package/skills/pixerate-agent-tools/SKILL.md +33 -7
- package/skills/pixerate-animation-editor/SKILL.md +7 -0
- package/skills/pixerate-rich-text/SKILL.md +18 -4
- package/dist/chunk-5RRYDFU2.js +0 -466
- package/dist/chunk-SPVIXXIB.cjs +0 -466
- /package/dist/{chunk-SMJK5HBJ.js → chunk-K73HMKQP.js} +0 -0
- /package/dist/{chunk-DDF6WQ62.cjs → chunk-LACYURUW.cjs} +0 -0
package/dist/vector/index.cjs
CHANGED
|
@@ -541,7 +541,7 @@ var _chunkNM3G4VQTcjs = require('../chunk-NM3G4VQT.cjs');
|
|
|
541
541
|
|
|
542
542
|
|
|
543
543
|
|
|
544
|
-
var
|
|
544
|
+
var _chunkRUZQMYXHcjs = require('../chunk-RUZQMYXH.cjs');
|
|
545
545
|
require('../chunk-WOFXZ3XU.cjs');
|
|
546
546
|
|
|
547
547
|
|
|
@@ -7968,7 +7968,7 @@ var VectorEditorController = (_class7 = class _VectorEditorController {
|
|
|
7968
7968
|
}
|
|
7969
7969
|
// --- Provider effects ---
|
|
7970
7970
|
/** The effects provider slot (see `setEffectsProvider`). */
|
|
7971
|
-
__init59() {this.effects = new (0,
|
|
7971
|
+
__init59() {this.effects = new (0, _chunkRUZQMYXHcjs.EffectsSlot)()}
|
|
7972
7972
|
/** The registered effects provider, or `null`. */
|
|
7973
7973
|
get effectsProvider() {
|
|
7974
7974
|
return this.effects.provider;
|
|
@@ -7992,10 +7992,10 @@ var VectorEditorController = (_class7 = class _VectorEditorController {
|
|
|
7992
7992
|
/** The effect's picture as group children, scaled into `box` (an affine fit). */
|
|
7993
7993
|
async vectorEffectPicture(effect, values) {
|
|
7994
7994
|
const provider = this.effects.require();
|
|
7995
|
-
if (!provider.applyVectorEffect) throw new (0,
|
|
7995
|
+
if (!provider.applyVectorEffect) throw new (0, _chunkRUZQMYXHcjs.EffectUnsupportedError)(`${provider.name} has no vector effects.`);
|
|
7996
7996
|
const d = await provider.describe(effect);
|
|
7997
|
-
if (d.kind !== "vector") throw new (0,
|
|
7998
|
-
const resolved =
|
|
7997
|
+
if (d.kind !== "vector") throw new (0, _chunkRUZQMYXHcjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) is a ${d.kind} effect; the vector editor adds vector effects, which bring their own picture${d.kind === "motion" ? " (apply motion in the animation editor)" : ""}.`, d.id);
|
|
7998
|
+
const resolved = _chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, d, values);
|
|
7999
7999
|
const motion = await provider.applyVectorEffect(d.id, this.toSvg(), resolved);
|
|
8000
8000
|
const parsed = _chunkRCUX6CT2cjs.parseVectorSvg.call(void 0, motion.svg);
|
|
8001
8001
|
if (!parsed.nodes.length) throw new Error(`"${d.name}" drew no shapes the editor can read.`);
|
|
@@ -18396,7 +18396,10 @@ function createVectorGenerationToolProvider(controller, options) {
|
|
|
18396
18396
|
};
|
|
18397
18397
|
return {
|
|
18398
18398
|
id: _nullishCoalesce(options.id, () => ( "vector-generation")),
|
|
18399
|
-
...options.namespace ? { namespace: options.namespace } : {},
|
|
18399
|
+
...options.namespace !== void 0 ? { namespace: options.namespace } : {},
|
|
18400
|
+
title: "Vector generation",
|
|
18401
|
+
description: "Generate vector art from a prompt with a configured model, and regenerate it.",
|
|
18402
|
+
skill: "pixerate-vector",
|
|
18400
18403
|
tools: () => readOnly() ? [list] : [list, generate, regenerate],
|
|
18401
18404
|
// The write tools come and go with a read-only state that can change.
|
|
18402
18405
|
...typeof options.readOnly === "function" ? { subscribe: (notify) => controller.subscribe(() => notify()) } : {}
|
|
@@ -18551,9 +18554,12 @@ function createVectorEffectsToolProvider(controller, options = {}) {
|
|
|
18551
18554
|
const effects = _optionalChain([g, 'optionalAccess', _753 => _753.providerEffect]) ? [info(g)] : [];
|
|
18552
18555
|
return { target: id, effect: _nullishCoalesce(removed, () => ( effects[0])), effects };
|
|
18553
18556
|
};
|
|
18554
|
-
return
|
|
18557
|
+
return _chunkRUZQMYXHcjs.createEffectToolProvider.call(void 0, {
|
|
18555
18558
|
id: _nullishCoalesce(options.id, () => ( "vector-effects")),
|
|
18556
18559
|
namespace: options.namespace,
|
|
18560
|
+
title: "Vector effects",
|
|
18561
|
+
description: "Provider effects placed in the vector document as effect groups.",
|
|
18562
|
+
skill: "pixerate-vector",
|
|
18557
18563
|
target: { noun: "group", id: `For apply_effect: "document" for the top level, or a group id to put the picture in. For update_effect and remove_effect: the effect group's id from list_applied_effects.` },
|
|
18558
18564
|
applyUses: ["title", "overlay", "generator", "interactive"],
|
|
18559
18565
|
applyDetails: `Only vector effects (kind vector: lower thirds, stickers, loaders, badges) can be added: the effect's SVG at rest becomes a group of editable shapes, fitted into the middle half of the document and selected; move or scale it like any group. Its motion plays in the animation editor (add_vector_effect there). update_effect with effect "picture" draws it again with new values; remove_effect keeps the shapes as a plain group. index, enabled and opacity do not apply.`,
|
package/dist/vector/index.js
CHANGED
|
@@ -541,7 +541,7 @@ import {
|
|
|
541
541
|
EffectsSlot,
|
|
542
542
|
createEffectToolProvider,
|
|
543
543
|
resolveEffectValues
|
|
544
|
-
} from "../chunk-
|
|
544
|
+
} from "../chunk-7KWJEYIK.js";
|
|
545
545
|
import "../chunk-V2ZCJRDM.js";
|
|
546
546
|
import {
|
|
547
547
|
GRAIN_PATTERNS
|
|
@@ -18396,7 +18396,10 @@ function createVectorGenerationToolProvider(controller, options) {
|
|
|
18396
18396
|
};
|
|
18397
18397
|
return {
|
|
18398
18398
|
id: options.id ?? "vector-generation",
|
|
18399
|
-
...options.namespace ? { namespace: options.namespace } : {},
|
|
18399
|
+
...options.namespace !== void 0 ? { namespace: options.namespace } : {},
|
|
18400
|
+
title: "Vector generation",
|
|
18401
|
+
description: "Generate vector art from a prompt with a configured model, and regenerate it.",
|
|
18402
|
+
skill: "pixerate-vector",
|
|
18400
18403
|
tools: () => readOnly() ? [list] : [list, generate, regenerate],
|
|
18401
18404
|
// The write tools come and go with a read-only state that can change.
|
|
18402
18405
|
...typeof options.readOnly === "function" ? { subscribe: (notify) => controller.subscribe(() => notify()) } : {}
|
|
@@ -18554,6 +18557,9 @@ function createVectorEffectsToolProvider(controller, options = {}) {
|
|
|
18554
18557
|
return createEffectToolProvider({
|
|
18555
18558
|
id: options.id ?? "vector-effects",
|
|
18556
18559
|
namespace: options.namespace,
|
|
18560
|
+
title: "Vector effects",
|
|
18561
|
+
description: "Provider effects placed in the vector document as effect groups.",
|
|
18562
|
+
skill: "pixerate-vector",
|
|
18557
18563
|
target: { noun: "group", id: `For apply_effect: "document" for the top level, or a group id to put the picture in. For update_effect and remove_effect: the effect group's id from list_applied_effects.` },
|
|
18558
18564
|
applyUses: ["title", "overlay", "generator", "interactive"],
|
|
18559
18565
|
applyDetails: `Only vector effects (kind vector: lower thirds, stickers, loaders, badges) can be added: the effect's SVG at rest becomes a group of editable shapes, fitted into the middle half of the document and selected; move or scale it like any group. Its motion plays in the animation editor (add_vector_effect there). update_effect with effect "picture" draws it again with new values; remove_effect keeps the shapes as a plain group. index, enabled and opacity do not apply.`,
|
|
@@ -11,7 +11,7 @@ import { type VideoClip } from './types.cjs';
|
|
|
11
11
|
export interface VideoEffectsToolProviderOptions {
|
|
12
12
|
/** Provider id (unique per registry). Default `video-effects`. */
|
|
13
13
|
id?: string;
|
|
14
|
-
/**
|
|
14
|
+
/** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
|
|
15
15
|
namespace?: string;
|
|
16
16
|
/** The project cannot be edited: write tools are hidden. A string is the reason. */
|
|
17
17
|
readOnly?: boolean | string | (() => boolean | string);
|
|
@@ -11,7 +11,7 @@ import { type VideoClip } from './types.js';
|
|
|
11
11
|
export interface VideoEffectsToolProviderOptions {
|
|
12
12
|
/** Provider id (unique per registry). Default `video-effects`. */
|
|
13
13
|
id?: string;
|
|
14
|
-
/**
|
|
14
|
+
/** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
|
|
15
15
|
namespace?: string;
|
|
16
16
|
/** The project cannot be edited: write tools are hidden. A string is the reason. */
|
|
17
17
|
readOnly?: boolean | string | (() => boolean | string);
|