@pixerate/editor 0.139.1 → 0.140.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/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 +397 -46
- package/dist/agent/index.js +365 -14
- 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 +3 -3
- package/dist/bridge/cli.js +2 -2
- package/dist/bridge/index.cjs +7 -3
- package/dist/bridge/index.d.cts +7 -0
- package/dist/bridge/index.d.ts +7 -0
- package/dist/bridge/index.js +8 -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-BKMU3V6K.js → chunk-5ED73EC6.js} +8 -1
- package/dist/{chunk-VRIR53SW.js → chunk-5G3KYRER.js} +2 -1
- package/dist/{chunk-KHMVB3SJ.js → chunk-7KWJEYIK.js} +4 -1
- package/dist/{chunk-R47NQICB.cjs → chunk-HDCH35UM.cjs} +47 -10
- package/dist/{chunk-6NCBFBXA.js → chunk-IQ6KKXOU.js} +1 -1
- package/dist/{chunk-PCNCT4ZY.js → chunk-KIBEEN5K.js} +40 -3
- package/dist/{chunk-CZRWP6IW.cjs → chunk-N2FGYZ4Q.cjs} +8 -1
- package/dist/{chunk-T6Y5FV7G.cjs → chunk-RPW7YL3D.cjs} +2 -1
- package/dist/{chunk-3V746PF4.cjs → chunk-RUZQMYXH.cjs} +4 -1
- package/dist/{chunk-GUPQ5BNA.cjs → chunk-RWML7TWG.cjs} +44 -44
- package/dist/{chunk-HGHXGCKG.cjs → chunk-SVFEVKLF.cjs} +1 -1
- package/dist/{chunk-PQMADRCI.js → chunk-UOJS6PUP.js} +1 -1
- package/dist/{chunk-BWT4IWLK.cjs → chunk-VKF3PWKR.cjs} +7 -7
- package/dist/chunk-WBKLYLZE.js +1156 -0
- package/dist/{chunk-TBSPPVTT.js → chunk-XCK7QK5D.js} +1 -1
- package/dist/chunk-ZAOOIJ6I.cjs +1156 -0
- 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/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/extensions/index.cjs +3 -3
- package/dist/extensions/index.js +2 -2
- package/dist/generation/index.cjs +7 -1
- package/dist/generation/index.js +7 -1
- package/dist/image-editor/index.cjs +21 -15
- package/dist/image-editor/index.js +8 -2
- 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 +8 -8
- package/dist/index.js +2 -2
- 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/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 +31 -5
- package/dist/tools/index.d.cts +3 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/index.js +31 -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/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 +4 -2
- 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-MCTQXUXR.js} +0 -0
- /package/dist/{chunk-DDF6WQ62.cjs → chunk-R6DFK5OX.cjs} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { AgentToolProvider } from '../tools/registry.cjs';
|
|
2
2
|
import type { JsonSchema } from '../tools/schema.cjs';
|
|
3
3
|
import type { AnimationEditorController } from './controller.cjs';
|
|
4
|
-
import { type MotionScene } from './types.cjs';
|
|
4
|
+
import { type MotionCommandType, type MotionScene } from './types.cjs';
|
|
5
5
|
export interface AnimationEditorToolProviderOptions {
|
|
6
6
|
/** Provider id (unique per registry). Default `animation`. */
|
|
7
7
|
id?: string;
|
|
8
|
-
/**
|
|
8
|
+
/** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
|
|
9
9
|
namespace?: string;
|
|
10
10
|
/** The animation cannot be edited: write tools are hidden and `get_animation` says why. A string is the reason. */
|
|
11
11
|
readOnly?: boolean | string | (() => boolean | string);
|
|
@@ -21,7 +21,12 @@ export interface AnimationEditorToolProviderOptions {
|
|
|
21
21
|
mimeType: string;
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Full JSON Schema of each command type: every field with its range, default and meaning, self-contained.
|
|
26
|
+
* `describe_animation_command` returns these; the write tools carry the compact {@link MOTION_COMMAND_SCHEMA}.
|
|
27
|
+
*/
|
|
28
|
+
export declare const MOTION_COMMAND_TYPE_SCHEMAS: Readonly<Record<MotionCommandType, JsonSchema>>;
|
|
29
|
+
/** JSON Schema of one command, each type its own strict branch (self-contained, for validating outside the tools). */
|
|
25
30
|
export declare const MOTION_COMMAND_SCHEMA: JsonSchema;
|
|
26
31
|
/** The elements of a scene's artwork, as agents see them. */
|
|
27
32
|
export declare function describeMotionElements(scene: MotionScene): {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { AgentToolProvider } from '../tools/registry.js';
|
|
2
2
|
import type { JsonSchema } from '../tools/schema.js';
|
|
3
3
|
import type { AnimationEditorController } from './controller.js';
|
|
4
|
-
import { type MotionScene } from './types.js';
|
|
4
|
+
import { type MotionCommandType, type MotionScene } from './types.js';
|
|
5
5
|
export interface AnimationEditorToolProviderOptions {
|
|
6
6
|
/** Provider id (unique per registry). Default `animation`. */
|
|
7
7
|
id?: string;
|
|
8
|
-
/**
|
|
8
|
+
/** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
|
|
9
9
|
namespace?: string;
|
|
10
10
|
/** The animation cannot be edited: write tools are hidden and `get_animation` says why. A string is the reason. */
|
|
11
11
|
readOnly?: boolean | string | (() => boolean | string);
|
|
@@ -21,7 +21,12 @@ export interface AnimationEditorToolProviderOptions {
|
|
|
21
21
|
mimeType: string;
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Full JSON Schema of each command type: every field with its range, default and meaning, self-contained.
|
|
26
|
+
* `describe_animation_command` returns these; the write tools carry the compact {@link MOTION_COMMAND_SCHEMA}.
|
|
27
|
+
*/
|
|
28
|
+
export declare const MOTION_COMMAND_TYPE_SCHEMAS: Readonly<Record<MotionCommandType, JsonSchema>>;
|
|
29
|
+
/** JSON Schema of one command, each type its own strict branch (self-contained, for validating outside the tools). */
|
|
25
30
|
export declare const MOTION_COMMAND_SCHEMA: JsonSchema;
|
|
26
31
|
/** The elements of a scene's artwork, as agents see them. */
|
|
27
32
|
export declare function describeMotionElements(scene: MotionScene): {
|
package/dist/bridge/cli.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict"; function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
4
|
+
var _chunkHDCH35UMcjs = require('../chunk-HDCH35UM.cjs');
|
|
5
|
+
require('../chunk-ZAOOIJ6I.cjs');
|
|
6
6
|
require('../chunk-WOFXZ3XU.cjs');
|
|
7
7
|
|
|
8
8
|
// src/bridge/cli.ts
|
|
@@ -22,7 +22,7 @@ args.forEach((arg, i) => {
|
|
|
22
22
|
if (arg === "--origin" && args[i + 1]) origins.push(args[i + 1]);
|
|
23
23
|
});
|
|
24
24
|
var port = value("--port");
|
|
25
|
-
void
|
|
25
|
+
void _chunkHDCH35UMcjs.createToolBridge.call(void 0, {
|
|
26
26
|
name: _nullishCoalesce(value("--name"), () => ( "pixerate")),
|
|
27
27
|
port: port !== void 0 ? Number(port) : void 0,
|
|
28
28
|
token: _nullishCoalesce(value("--token"), () => ( process.env.PIXERATE_BRIDGE_TOKEN)),
|
package/dist/bridge/cli.js
CHANGED
package/dist/bridge/index.cjs
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var _chunkR47NQICBcjs = require('../chunk-R47NQICB.cjs');
|
|
5
4
|
|
|
6
5
|
|
|
6
|
+
var _chunkHDCH35UMcjs = require('../chunk-HDCH35UM.cjs');
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkZAOOIJ6Icjs = require('../chunk-ZAOOIJ6I.cjs');
|
|
9
11
|
require('../chunk-WOFXZ3XU.cjs');
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
|
|
13
15
|
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
exports.TOOL_BRIDGE_DEFAULT_PORT = _chunkZAOOIJ6Icjs.TOOL_BRIDGE_DEFAULT_PORT; exports.TOOL_BRIDGE_PROTOCOL = _chunkZAOOIJ6Icjs.TOOL_BRIDGE_PROTOCOL; exports.createToolBridge = _chunkHDCH35UMcjs.createToolBridge; exports.defaultSkillsDir = _chunkHDCH35UMcjs.defaultSkillsDir; exports.isLocalOrigin = _chunkHDCH35UMcjs.isLocalOrigin; exports.loadSkillFiles = _chunkHDCH35UMcjs.loadSkillFiles;
|
package/dist/bridge/index.d.cts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type McpServer } from '../tools/mcp-server.cjs';
|
|
2
2
|
import { ToolRegistry } from '../tools/registry.cjs';
|
|
3
|
+
import type { SkillFiles } from '../tools/skills.cjs';
|
|
4
|
+
export { loadSkillFiles, defaultSkillsDir } from './skills.cjs';
|
|
3
5
|
export { TOOL_BRIDGE_DEFAULT_PORT, TOOL_BRIDGE_PROTOCOL } from '../tools/bridge-client.cjs';
|
|
4
6
|
export interface ToolBridgeOptions {
|
|
5
7
|
/** The MCP server's name. */
|
|
@@ -30,6 +32,11 @@ export interface ToolBridgeOptions {
|
|
|
30
32
|
} | false;
|
|
31
33
|
/** Diagnostics (default: stderr, since stdout carries MCP). */
|
|
32
34
|
log?: (message: string) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Agent skills served as MCP resources and prompts (default: the skills shipped with the
|
|
37
|
+
* package, from `loadSkillFiles()`); `false` serves none.
|
|
38
|
+
*/
|
|
39
|
+
skills?: SkillFiles | false;
|
|
33
40
|
}
|
|
34
41
|
/** An editor as `list_editors` reports it. */
|
|
35
42
|
export interface ToolBridgeEditorInfo {
|
package/dist/bridge/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type McpServer } from '../tools/mcp-server.js';
|
|
2
2
|
import { ToolRegistry } from '../tools/registry.js';
|
|
3
|
+
import type { SkillFiles } from '../tools/skills.js';
|
|
4
|
+
export { loadSkillFiles, defaultSkillsDir } from './skills.js';
|
|
3
5
|
export { TOOL_BRIDGE_DEFAULT_PORT, TOOL_BRIDGE_PROTOCOL } from '../tools/bridge-client.js';
|
|
4
6
|
export interface ToolBridgeOptions {
|
|
5
7
|
/** The MCP server's name. */
|
|
@@ -30,6 +32,11 @@ export interface ToolBridgeOptions {
|
|
|
30
32
|
} | false;
|
|
31
33
|
/** Diagnostics (default: stderr, since stdout carries MCP). */
|
|
32
34
|
log?: (message: string) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Agent skills served as MCP resources and prompts (default: the skills shipped with the
|
|
37
|
+
* package, from `loadSkillFiles()`); `false` serves none.
|
|
38
|
+
*/
|
|
39
|
+
skills?: SkillFiles | false;
|
|
33
40
|
}
|
|
34
41
|
/** An editor as `list_editors` reports it. */
|
|
35
42
|
export interface ToolBridgeEditorInfo {
|
package/dist/bridge/index.js
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createToolBridge,
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
defaultSkillsDir,
|
|
4
|
+
isLocalOrigin,
|
|
5
|
+
loadSkillFiles
|
|
6
|
+
} from "../chunk-KIBEEN5K.js";
|
|
5
7
|
import {
|
|
6
8
|
TOOL_BRIDGE_DEFAULT_PORT,
|
|
7
9
|
TOOL_BRIDGE_PROTOCOL
|
|
8
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-WBKLYLZE.js";
|
|
9
11
|
import "../chunk-V2ZCJRDM.js";
|
|
10
12
|
export {
|
|
11
13
|
TOOL_BRIDGE_DEFAULT_PORT,
|
|
12
14
|
TOOL_BRIDGE_PROTOCOL,
|
|
13
15
|
createToolBridge,
|
|
14
|
-
|
|
16
|
+
defaultSkillsDir,
|
|
17
|
+
isLocalOrigin,
|
|
18
|
+
loadSkillFiles
|
|
15
19
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SkillFiles } from '../tools/skills.cjs';
|
|
2
|
+
/** The `skills` directory shipped with `@pixerate/editor`, found by walking up from this module. */
|
|
3
|
+
export declare function defaultSkillsDir(): string | null;
|
|
4
|
+
/**
|
|
5
|
+
* Reads agent skill files (every `<skill>/**\/*.md`) into the {@link SkillFiles} shape that
|
|
6
|
+
* `createMcpServer({ skills })` and `registry.view({ discovery: { skills } })` take. Defaults
|
|
7
|
+
* to the skills shipped with the package; returns `{}` when there are none.
|
|
8
|
+
*/
|
|
9
|
+
export declare function loadSkillFiles(dir?: string | null): SkillFiles;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SkillFiles } from '../tools/skills.js';
|
|
2
|
+
/** The `skills` directory shipped with `@pixerate/editor`, found by walking up from this module. */
|
|
3
|
+
export declare function defaultSkillsDir(): string | null;
|
|
4
|
+
/**
|
|
5
|
+
* Reads agent skill files (every `<skill>/**\/*.md`) into the {@link SkillFiles} shape that
|
|
6
|
+
* `createMcpServer({ skills })` and `registry.view({ discovery: { skills } })` take. Defaults
|
|
7
|
+
* to the skills shipped with the package; returns `{}` when there are none.
|
|
8
|
+
*/
|
|
9
|
+
export declare function loadSkillFiles(dir?: string | null): SkillFiles;
|
|
@@ -8,7 +8,7 @@ import type { CanvasEffectsController } from './effects.cjs';
|
|
|
8
8
|
export interface CanvasEffectsToolProviderOptions {
|
|
9
9
|
/** Provider id (unique per registry). Default `canvas-effects`. */
|
|
10
10
|
id?: string;
|
|
11
|
-
/**
|
|
11
|
+
/** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
|
|
12
12
|
namespace?: string;
|
|
13
13
|
/** The canvas cannot be edited: write tools are hidden. A string is the reason. */
|
|
14
14
|
readOnly?: boolean | string | (() => boolean | string);
|
|
@@ -8,7 +8,7 @@ import type { CanvasEffectsController } from './effects.js';
|
|
|
8
8
|
export interface CanvasEffectsToolProviderOptions {
|
|
9
9
|
/** Provider id (unique per registry). Default `canvas-effects`. */
|
|
10
10
|
id?: string;
|
|
11
|
-
/**
|
|
11
|
+
/** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
|
|
12
12
|
namespace?: string;
|
|
13
13
|
/** The canvas cannot be edited: write tools are hidden. A string is the reason. */
|
|
14
14
|
readOnly?: boolean | string | (() => boolean | string);
|
package/dist/canvas/index.cjs
CHANGED
|
@@ -84,14 +84,14 @@ var _chunk4EFNS2HVcjs = require('../chunk-4EFNS2HV.cjs');
|
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
|
|
87
|
-
var
|
|
87
|
+
var _chunkSVFEVKLFcjs = require('../chunk-SVFEVKLF.cjs');
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
var _chunkPY4GWSE2cjs = require('../chunk-PY4GWSE2.cjs');
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
|
|
94
|
-
var
|
|
94
|
+
var _chunkN2FGYZ4Qcjs = require('../chunk-N2FGYZ4Q.cjs');
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
var _chunk6HMEHNWWcjs = require('../chunk-6HMEHNWW.cjs');
|
|
@@ -189,7 +189,7 @@ var _chunkNM3G4VQTcjs = require('../chunk-NM3G4VQT.cjs');
|
|
|
189
189
|
|
|
190
190
|
|
|
191
191
|
|
|
192
|
-
var
|
|
192
|
+
var _chunkRUZQMYXHcjs = require('../chunk-RUZQMYXH.cjs');
|
|
193
193
|
require('../chunk-WOFXZ3XU.cjs');
|
|
194
194
|
|
|
195
195
|
|
|
@@ -11516,7 +11516,7 @@ function isAgentCursor(cursor) {
|
|
|
11516
11516
|
// src/canvas/capture.ts
|
|
11517
11517
|
var CANVAS_CAPTURE_VIEWPORT_SELECTOR = ".xyflow__viewport, .react-flow__viewport, .svelte-flow__viewport";
|
|
11518
11518
|
var CANVAS_CAPTURE_CHROME_SELECTORS = [
|
|
11519
|
-
|
|
11519
|
+
_chunkSVFEVKLFcjs.CAPTURE_EXCLUDE_SELECTOR,
|
|
11520
11520
|
".react-flow__panel",
|
|
11521
11521
|
".svelte-flow__panel",
|
|
11522
11522
|
".react-flow__minimap",
|
|
@@ -11527,7 +11527,7 @@ var CANVAS_CAPTURE_CHROME_SELECTORS = [
|
|
|
11527
11527
|
".svelte-flow__attribution"
|
|
11528
11528
|
];
|
|
11529
11529
|
var CANVAS_CAPTURE_OVERLAY_SELECTORS = [
|
|
11530
|
-
...
|
|
11530
|
+
..._chunkSVFEVKLFcjs.CAPTURE_OVERLAY_SELECTORS,
|
|
11531
11531
|
".react-flow__nodesselection",
|
|
11532
11532
|
".svelte-flow__nodesselection",
|
|
11533
11533
|
".react-flow__selection",
|
|
@@ -11570,11 +11570,11 @@ function createCanvasCaptureSurface(options) {
|
|
|
11570
11570
|
return {
|
|
11571
11571
|
units: "canvas units",
|
|
11572
11572
|
viewport,
|
|
11573
|
-
content: () =>
|
|
11573
|
+
content: () => _chunkN2FGYZ4Qcjs.unionCaptureRects.call(void 0, rectsOf(options.getNodes(), () => true)),
|
|
11574
11574
|
selection: () => {
|
|
11575
11575
|
const nodes = options.getNodes();
|
|
11576
11576
|
const selected = (n3) => !!n3.selected && !n3.hidden;
|
|
11577
|
-
return { rect:
|
|
11577
|
+
return { rect: _chunkN2FGYZ4Qcjs.unionCaptureRects.call(void 0, rectsOf(nodes, selected)), ids: nodes.filter(selected).map((n3) => n3.id) };
|
|
11578
11578
|
},
|
|
11579
11579
|
items: {
|
|
11580
11580
|
region: "nodes",
|
|
@@ -11583,7 +11583,7 @@ function createCanvasCaptureSurface(options) {
|
|
|
11583
11583
|
bounds: (ids) => {
|
|
11584
11584
|
const nodes = options.getNodes();
|
|
11585
11585
|
const missing = ids.filter((id) => !nodes.some((n3) => n3.id === id));
|
|
11586
|
-
return { rect:
|
|
11586
|
+
return { rect: _chunkN2FGYZ4Qcjs.unionCaptureRects.call(void 0, rectsOf(nodes, (n3) => ids.includes(n3.id))), missing };
|
|
11587
11587
|
}
|
|
11588
11588
|
},
|
|
11589
11589
|
overlays: "selection boxes, resize handles and agent cursors",
|
|
@@ -11591,7 +11591,7 @@ function createCanvasCaptureSurface(options) {
|
|
|
11591
11591
|
render: (request) => {
|
|
11592
11592
|
const el = getElement();
|
|
11593
11593
|
if (!el || !el.isConnected) throw new Error("The canvas is not mounted, so there is nothing to capture.");
|
|
11594
|
-
const rasterize = _nullishCoalesce(options.rasterize, () => (
|
|
11594
|
+
const rasterize = _nullishCoalesce(options.rasterize, () => ( _chunkSVFEVKLFcjs.rasterizeElement));
|
|
11595
11595
|
const exclude = [
|
|
11596
11596
|
..._nullishCoalesce(options.chromeSelectors, () => ( CANVAS_CAPTURE_CHROME_SELECTORS)),
|
|
11597
11597
|
...request.includeOverlays ? [] : _nullishCoalesce(options.overlaySelectors, () => ( CANVAS_CAPTURE_OVERLAY_SELECTORS))
|
|
@@ -11622,8 +11622,10 @@ function createCanvasCaptureSurface(options) {
|
|
|
11622
11622
|
};
|
|
11623
11623
|
}
|
|
11624
11624
|
function createCanvasCaptureToolProvider(options) {
|
|
11625
|
-
return
|
|
11625
|
+
return _chunkN2FGYZ4Qcjs.createCaptureToolProvider.call(void 0, createCanvasCaptureSurface(options), {
|
|
11626
11626
|
subject: "the canvas",
|
|
11627
|
+
title: "Canvas capture",
|
|
11628
|
+
skill: "pixerate-canvas",
|
|
11627
11629
|
...options,
|
|
11628
11630
|
id: _nullishCoalesce(options.id, () => ( "canvas-capture"))
|
|
11629
11631
|
});
|
|
@@ -11642,14 +11644,14 @@ function canvasNodeEffect(node) {
|
|
|
11642
11644
|
return _chunkNM3G4VQTcjs.isShapeDescription.call(void 0, shape) ? shape.effect : void 0;
|
|
11643
11645
|
}
|
|
11644
11646
|
function createCanvasEffectsController(options) {
|
|
11645
|
-
const slot = new (0,
|
|
11647
|
+
const slot = new (0, _chunkRUZQMYXHcjs.EffectsSlot)();
|
|
11646
11648
|
if (options.effects) slot.set(options.effects);
|
|
11647
11649
|
const describe = async (effect, place2) => {
|
|
11648
11650
|
const d = await slot.require().describe(effect);
|
|
11649
11651
|
const allowed = CANVAS_EFFECT_PLACES[place2];
|
|
11650
11652
|
if (d.kind === "motion" || !d.uses.some((u) => allowed.includes(u))) {
|
|
11651
11653
|
const where = place2 === "transition" ? "a scene transition" : place2 === "fill" ? "a fill" : "an overlay";
|
|
11652
|
-
throw new (0,
|
|
11654
|
+
throw new (0, _chunkRUZQMYXHcjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) is a ${d.uses.join(" / ")} effect and cannot be ${where}, which takes ${allowed.join(" or ")} effects; search_effects with use "${allowed[0]}" lists ones that fit.`, d.id);
|
|
11653
11655
|
}
|
|
11654
11656
|
return d;
|
|
11655
11657
|
};
|
|
@@ -11680,7 +11682,7 @@ function createCanvasEffectsController(options) {
|
|
|
11680
11682
|
else if (k in d.controls.properties) base[k] = d.defaults[k];
|
|
11681
11683
|
else throw new Error(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
|
|
11682
11684
|
}
|
|
11683
|
-
return { ...base, ...
|
|
11685
|
+
return { ...base, ..._chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
|
|
11684
11686
|
};
|
|
11685
11687
|
return {
|
|
11686
11688
|
/** The provider slot. */
|
|
@@ -11710,7 +11712,7 @@ function createCanvasEffectsController(options) {
|
|
|
11710
11712
|
const mode = _nullishCoalesce(opts.mode, () => ( "fill"));
|
|
11711
11713
|
const d = await describe(effect, mode);
|
|
11712
11714
|
if (opts.opacity !== void 0 && !(opts.opacity >= 0 && opts.opacity <= 1)) throw new Error("opacity must be from 0 to 1.");
|
|
11713
|
-
const next = { effect: d.id, provider: slot.require().id, name: d.name, values:
|
|
11715
|
+
const next = { effect: d.id, provider: slot.require().id, name: d.name, values: _chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, d, opts.values), mode, ...opts.opacity !== void 0 && opts.opacity !== 1 ? { opacity: opts.opacity } : {} };
|
|
11714
11716
|
commit(`Add effect ${d.name}`, withEffect(nodeId, next));
|
|
11715
11717
|
return next;
|
|
11716
11718
|
},
|
|
@@ -11767,7 +11769,7 @@ function createCanvasEffectsController(options) {
|
|
|
11767
11769
|
const d = await describe(effect, "transition");
|
|
11768
11770
|
const duration = _nullishCoalesce(_nullishCoalesce(opts.duration, () => ( d.duration)), () => ( 600));
|
|
11769
11771
|
if (!(duration > 0)) throw new Error("duration must be a number of ms above 0.");
|
|
11770
|
-
const transition = { effect: d.id, provider: slot.require().id, name: d.name, values:
|
|
11772
|
+
const transition = { effect: d.id, provider: slot.require().id, name: d.name, values: _chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, d, opts.values), duration };
|
|
11771
11773
|
scenes2.update(sceneId, { transition });
|
|
11772
11774
|
return transition;
|
|
11773
11775
|
}
|
|
@@ -11839,7 +11841,7 @@ async function playCanvasSceneTransition(options) {
|
|
|
11839
11841
|
}
|
|
11840
11842
|
}
|
|
11841
11843
|
async function captureCanvasView(element, size2) {
|
|
11842
|
-
const url = await
|
|
11844
|
+
const url = await _chunkSVFEVKLFcjs.rasterizeElement.call(void 0, element, { pixelWidth: size2.width, pixelHeight: size2.height, exclude: _chunkSVFEVKLFcjs.CAPTURE_OVERLAY_SELECTORS });
|
|
11843
11845
|
const doc = element.ownerDocument;
|
|
11844
11846
|
const image = new doc.defaultView.Image();
|
|
11845
11847
|
await new Promise((resolve, reject) => {
|
|
@@ -11911,9 +11913,12 @@ function createCanvasEffectsToolProvider(controller, options = {}) {
|
|
|
11911
11913
|
const once = (instance) => {
|
|
11912
11914
|
if (instance !== "effect") throw new Error('A shape node has one effect, "effect".');
|
|
11913
11915
|
};
|
|
11914
|
-
return
|
|
11916
|
+
return _chunkRUZQMYXHcjs.createEffectToolProvider.call(void 0, {
|
|
11915
11917
|
id: _nullishCoalesce(options.id, () => ( "canvas-effects")),
|
|
11916
11918
|
namespace: options.namespace,
|
|
11919
|
+
title: "Canvas effects",
|
|
11920
|
+
description: "Provider effects on canvas shape nodes, and transitions between scenes.",
|
|
11921
|
+
skill: "pixerate-canvas",
|
|
11917
11922
|
target: { noun: "node", id: "A shape node id on the canvas (a node with data.shape)." },
|
|
11918
11923
|
applyUses: ["generator", "overlay", "title", "interactive"],
|
|
11919
11924
|
applyDetails: "Generators fill the shape (clipped to its outline); overlays, titles and interactive effects draw over the node's box (set_canvas_effect_mode switches). A node has one effect: this replaces it. enabled false holds the first frame; opacity mixes it. index does not apply.",
|
package/dist/canvas/index.js
CHANGED
|
@@ -84,14 +84,14 @@ import {
|
|
|
84
84
|
CAPTURE_EXCLUDE_SELECTOR,
|
|
85
85
|
CAPTURE_OVERLAY_SELECTORS,
|
|
86
86
|
rasterizeElement
|
|
87
|
-
} from "../chunk-
|
|
87
|
+
} from "../chunk-XCK7QK5D.js";
|
|
88
88
|
import {
|
|
89
89
|
EffectRendererPool
|
|
90
90
|
} from "../chunk-EHLOCVWB.js";
|
|
91
91
|
import {
|
|
92
92
|
createCaptureToolProvider,
|
|
93
93
|
unionCaptureRects
|
|
94
|
-
} from "../chunk-
|
|
94
|
+
} from "../chunk-5ED73EC6.js";
|
|
95
95
|
import {
|
|
96
96
|
layoutChart
|
|
97
97
|
} from "../chunk-YM75DN54.js";
|
|
@@ -189,7 +189,7 @@ import {
|
|
|
189
189
|
EffectsSlot,
|
|
190
190
|
createEffectToolProvider,
|
|
191
191
|
resolveEffectValues
|
|
192
|
-
} from "../chunk-
|
|
192
|
+
} from "../chunk-7KWJEYIK.js";
|
|
193
193
|
import "../chunk-V2ZCJRDM.js";
|
|
194
194
|
import {
|
|
195
195
|
brushstrokeScaleBucket
|
|
@@ -11624,6 +11624,8 @@ function createCanvasCaptureSurface(options) {
|
|
|
11624
11624
|
function createCanvasCaptureToolProvider(options) {
|
|
11625
11625
|
return createCaptureToolProvider(createCanvasCaptureSurface(options), {
|
|
11626
11626
|
subject: "the canvas",
|
|
11627
|
+
title: "Canvas capture",
|
|
11628
|
+
skill: "pixerate-canvas",
|
|
11627
11629
|
...options,
|
|
11628
11630
|
id: options.id ?? "canvas-capture"
|
|
11629
11631
|
});
|
|
@@ -11914,6 +11916,9 @@ function createCanvasEffectsToolProvider(controller, options = {}) {
|
|
|
11914
11916
|
return createEffectToolProvider({
|
|
11915
11917
|
id: options.id ?? "canvas-effects",
|
|
11916
11918
|
namespace: options.namespace,
|
|
11919
|
+
title: "Canvas effects",
|
|
11920
|
+
description: "Provider effects on canvas shape nodes, and transitions between scenes.",
|
|
11921
|
+
skill: "pixerate-canvas",
|
|
11917
11922
|
target: { noun: "node", id: "A shape node id on the canvas (a node with data.shape)." },
|
|
11918
11923
|
applyUses: ["generator", "overlay", "title", "interactive"],
|
|
11919
11924
|
applyDetails: "Generators fill the shape (clipped to its outline); overlays, titles and interactive effects draw over the node's box (set_canvas_effect_mode switches). A node has one effect: this replaces it. enabled false holds the first frame; opacity mixes it. index does not apply.",
|
|
@@ -11,7 +11,7 @@ export interface OfficeChartFile {
|
|
|
11
11
|
export interface OfficeChartToolProviderOptions {
|
|
12
12
|
/** Provider id (unique per registry). Default `office-charts`. */
|
|
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
|
/**
|
|
17
17
|
* Files the user opened. With it, the tools take a `file` name (and `list_open_files` lists
|
|
@@ -11,7 +11,7 @@ export interface OfficeChartFile {
|
|
|
11
11
|
export interface OfficeChartToolProviderOptions {
|
|
12
12
|
/** Provider id (unique per registry). Default `office-charts`. */
|
|
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
|
/**
|
|
17
17
|
* Files the user opened. With it, the tools take a `file` name (and `list_open_files` lists
|
package/dist/chart/index.cjs
CHANGED
|
@@ -1491,6 +1491,9 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1491
1491
|
return {
|
|
1492
1492
|
id: _nullishCoalesce(options.id, () => ( "chart")),
|
|
1493
1493
|
namespace: options.namespace,
|
|
1494
|
+
title: "Chart editor",
|
|
1495
|
+
description: "One chart: its spec, data and values, series and categories, trendlines and presets, CSV, Mermaid and OOXML import, rendering and colour checks.",
|
|
1496
|
+
skill: "pixerate-chart",
|
|
1494
1497
|
tools: () => {
|
|
1495
1498
|
if (readOnlyReason()) return reads;
|
|
1496
1499
|
return [...reads, ...writes.slice(0, 10), ...Parser() ? [importOoxml] : [], ...writes.slice(10)];
|
|
@@ -2091,7 +2094,10 @@ function createOfficeChartToolProvider(options = {}) {
|
|
|
2091
2094
|
};
|
|
2092
2095
|
return {
|
|
2093
2096
|
id: _nullishCoalesce(options.id, () => ( "office-charts")),
|
|
2094
|
-
...options.namespace ? { namespace: options.namespace } : {},
|
|
2097
|
+
...options.namespace !== void 0 ? { namespace: options.namespace } : {},
|
|
2098
|
+
title: "Office charts",
|
|
2099
|
+
description: "Charts inside Word, Excel and PowerPoint files: list and read them, and load one into the chart editor.",
|
|
2100
|
+
skill: "pixerate-chart",
|
|
2095
2101
|
tools: () => [...options.files ? [listOpenFiles] : [], listCharts, getChart, ...options.controller && !readOnlyReason() ? [loadChart] : []]
|
|
2096
2102
|
};
|
|
2097
2103
|
}
|
package/dist/chart/index.js
CHANGED
|
@@ -1491,6 +1491,9 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1491
1491
|
return {
|
|
1492
1492
|
id: options.id ?? "chart",
|
|
1493
1493
|
namespace: options.namespace,
|
|
1494
|
+
title: "Chart editor",
|
|
1495
|
+
description: "One chart: its spec, data and values, series and categories, trendlines and presets, CSV, Mermaid and OOXML import, rendering and colour checks.",
|
|
1496
|
+
skill: "pixerate-chart",
|
|
1494
1497
|
tools: () => {
|
|
1495
1498
|
if (readOnlyReason()) return reads;
|
|
1496
1499
|
return [...reads, ...writes.slice(0, 10), ...Parser() ? [importOoxml] : [], ...writes.slice(10)];
|
|
@@ -2091,7 +2094,10 @@ function createOfficeChartToolProvider(options = {}) {
|
|
|
2091
2094
|
};
|
|
2092
2095
|
return {
|
|
2093
2096
|
id: options.id ?? "office-charts",
|
|
2094
|
-
...options.namespace ? { namespace: options.namespace } : {},
|
|
2097
|
+
...options.namespace !== void 0 ? { namespace: options.namespace } : {},
|
|
2098
|
+
title: "Office charts",
|
|
2099
|
+
description: "Charts inside Word, Excel and PowerPoint files: list and read them, and load one into the chart editor.",
|
|
2100
|
+
skill: "pixerate-chart",
|
|
2095
2101
|
tools: () => [...options.files ? [listOpenFiles] : [], listCharts, getChart, ...options.controller && !readOnlyReason() ? [loadChart] : []]
|
|
2096
2102
|
};
|
|
2097
2103
|
}
|
package/dist/chart/tools.d.cts
CHANGED
|
@@ -7,7 +7,7 @@ type ParserCtor = {
|
|
|
7
7
|
export interface ChartToolProviderOptions {
|
|
8
8
|
/** Provider id (unique per registry). Default `chart`. */
|
|
9
9
|
id?: string;
|
|
10
|
-
/**
|
|
10
|
+
/** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
|
|
11
11
|
namespace?: string;
|
|
12
12
|
/**
|
|
13
13
|
* The chart cannot be edited: write tools are hidden and `get_chart` says why. A string
|
package/dist/chart/tools.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ type ParserCtor = {
|
|
|
7
7
|
export interface ChartToolProviderOptions {
|
|
8
8
|
/** Provider id (unique per registry). Default `chart`. */
|
|
9
9
|
id?: string;
|
|
10
|
-
/**
|
|
10
|
+
/** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
|
|
11
11
|
namespace?: string;
|
|
12
12
|
/**
|
|
13
13
|
* The chart cannot be edited: write tools are hidden and `get_chart` says why. A string
|
|
@@ -186,7 +186,14 @@ function createCaptureTool(surface, options = {}) {
|
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
188
|
function createCaptureToolProvider(surface, options = {}) {
|
|
189
|
-
return {
|
|
189
|
+
return {
|
|
190
|
+
id: options.id ?? "capture",
|
|
191
|
+
namespace: options.namespace,
|
|
192
|
+
title: options.title ?? "Screen capture",
|
|
193
|
+
description: options.description ?? `A screenshot of ${options.subject ?? "the editor"}, to check what text cannot tell you: overlap, legibility, balance.`,
|
|
194
|
+
...options.skill ? { skill: options.skill } : {},
|
|
195
|
+
tools: [createCaptureTool(surface, options)]
|
|
196
|
+
};
|
|
190
197
|
}
|
|
191
198
|
|
|
192
199
|
export {
|
|
@@ -2005,6 +2005,7 @@ function createTableStore(editor) {
|
|
|
2005
2005
|
|
|
2006
2006
|
// src/extensions/agent-caret.ts
|
|
2007
2007
|
import { Extension } from "@tiptap/core";
|
|
2008
|
+
import { closeHistory } from "@tiptap/pm/history";
|
|
2008
2009
|
import { Plugin as Plugin3, PluginKey as PluginKey3 } from "@tiptap/pm/state";
|
|
2009
2010
|
import { Decoration, DecorationSet } from "@tiptap/pm/view";
|
|
2010
2011
|
var DEFAULT_AGENT_CARET_COLOR = "#8b5cf6";
|
|
@@ -2164,7 +2165,7 @@ async function typeAgentText(editor, options) {
|
|
|
2164
2165
|
ensureAgentCaret(editor);
|
|
2165
2166
|
const show = (tr, anchor, head = anchor) => tr.setMeta(agentCaretPluginKey, { set: { ...caret, from: anchor, to: head } });
|
|
2166
2167
|
const commit = (start, end) => {
|
|
2167
|
-
const tr = replaceWithTextTransaction(editor.state, start, end, text);
|
|
2168
|
+
const tr = closeHistory(replaceWithTextTransaction(editor.state, start, end, text));
|
|
2168
2169
|
const insertedTo = tr.mapping.map(end, 1);
|
|
2169
2170
|
const insertedFrom = Math.min(tr.mapping.map(start, -1), insertedTo);
|
|
2170
2171
|
editor.view.dispatch(show(tr, insertedTo).scrollIntoView());
|
|
@@ -343,7 +343,10 @@ function createEffectToolProvider(host) {
|
|
|
343
343
|
];
|
|
344
344
|
return {
|
|
345
345
|
id: host.id,
|
|
346
|
-
...host.namespace ? { namespace: host.namespace } : {},
|
|
346
|
+
...host.namespace !== void 0 ? { namespace: host.namespace } : {},
|
|
347
|
+
...host.title ? { title: host.title } : {},
|
|
348
|
+
...host.description ? { description: host.description } : {},
|
|
349
|
+
...host.skill ? { skill: host.skill } : {},
|
|
347
350
|
tools: () => {
|
|
348
351
|
const extra = host.extraTools?.(context) ?? [];
|
|
349
352
|
if (host.readOnlyReason()) return [...readTools(), ...extra.filter((t) => t.annotations?.readOnlyHint)];
|