@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
|
@@ -3,7 +3,7 @@ import type { CommandRegistry } from './registry.cjs';
|
|
|
3
3
|
export interface CommandToolProviderOptions<TContext = any> {
|
|
4
4
|
/** Provider id (default `commands`). */
|
|
5
5
|
id?: string;
|
|
6
|
-
/**
|
|
6
|
+
/** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
|
|
7
7
|
namespace?: string;
|
|
8
8
|
/** Context for enablement and runs (default: the registry's). */
|
|
9
9
|
context?: TContext | (() => TContext);
|
|
@@ -3,7 +3,7 @@ import type { CommandRegistry } from './registry.js';
|
|
|
3
3
|
export interface CommandToolProviderOptions<TContext = any> {
|
|
4
4
|
/** Provider id (default `commands`). */
|
|
5
5
|
id?: string;
|
|
6
|
-
/**
|
|
6
|
+
/** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
|
|
7
7
|
namespace?: string;
|
|
8
8
|
/** Context for enablement and runs (default: the registry's). */
|
|
9
9
|
context?: TContext | (() => TContext);
|
package/dist/commands/index.cjs
CHANGED
|
@@ -768,6 +768,9 @@ function createCommandToolProvider(registry, options = {}) {
|
|
|
768
768
|
return {
|
|
769
769
|
id: _nullishCoalesce(options.id, () => ( "commands")),
|
|
770
770
|
namespace: options.namespace,
|
|
771
|
+
title: "Commands",
|
|
772
|
+
description: "The app's commands (menu and keyboard actions) with their params schemas: list them, run one, or run several as one undo step.",
|
|
773
|
+
skill: "pixerate-agent-tools",
|
|
771
774
|
tools: () => [listCommands, runCommandTool(), runCommands],
|
|
772
775
|
subscribe: (notify) => registry.subscribe(notify)
|
|
773
776
|
};
|
package/dist/commands/index.js
CHANGED
|
@@ -768,6 +768,9 @@ function createCommandToolProvider(registry, options = {}) {
|
|
|
768
768
|
return {
|
|
769
769
|
id: options.id ?? "commands",
|
|
770
770
|
namespace: options.namespace,
|
|
771
|
+
title: "Commands",
|
|
772
|
+
description: "The app's commands (menu and keyboard actions) with their params schemas: list them, run one, or run several as one undo step.",
|
|
773
|
+
skill: "pixerate-agent-tools",
|
|
771
774
|
tools: () => [listCommands, runCommandTool(), runCommands],
|
|
772
775
|
subscribe: (notify) => registry.subscribe(notify)
|
|
773
776
|
};
|
package/dist/diagram/index.cjs
CHANGED
|
@@ -2076,6 +2076,9 @@ function createDiagramToolProvider(controller, options = {}) {
|
|
|
2076
2076
|
return {
|
|
2077
2077
|
id: _nullishCoalesce(options.id, () => ( "diagram")),
|
|
2078
2078
|
namespace: options.namespace,
|
|
2079
|
+
title: "Diagram editor",
|
|
2080
|
+
description: "Mermaid diagrams: nodes, edges and groups, shapes and styles, direction and layout, Mermaid import and export, rendering.",
|
|
2081
|
+
skill: "pixerate-diagram",
|
|
2079
2082
|
tools: () => readOnlyReason() ? reads : [...reads, ...writes],
|
|
2080
2083
|
subscribe: (notify) => {
|
|
2081
2084
|
let last = readOnlyReason();
|
package/dist/diagram/index.js
CHANGED
|
@@ -2076,6 +2076,9 @@ function createDiagramToolProvider(controller, options = {}) {
|
|
|
2076
2076
|
return {
|
|
2077
2077
|
id: options.id ?? "diagram",
|
|
2078
2078
|
namespace: options.namespace,
|
|
2079
|
+
title: "Diagram editor",
|
|
2080
|
+
description: "Mermaid diagrams: nodes, edges and groups, shapes and styles, direction and layout, Mermaid import and export, rendering.",
|
|
2081
|
+
skill: "pixerate-diagram",
|
|
2079
2082
|
tools: () => readOnlyReason() ? reads : [...reads, ...writes],
|
|
2080
2083
|
subscribe: (notify) => {
|
|
2081
2084
|
let last = readOnlyReason();
|
package/dist/diagram/tools.d.cts
CHANGED
|
@@ -6,7 +6,7 @@ import { type MermaidDocument, type Point } from './types.cjs';
|
|
|
6
6
|
export interface DiagramToolProviderOptions {
|
|
7
7
|
/** Provider id (unique per registry). Default `diagram`. */
|
|
8
8
|
id?: string;
|
|
9
|
-
/**
|
|
9
|
+
/** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
|
|
10
10
|
namespace?: string;
|
|
11
11
|
/**
|
|
12
12
|
* The diagram cannot be edited: write tools are hidden and `get_diagram` says why. A
|
package/dist/diagram/tools.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { type MermaidDocument, type Point } from './types.js';
|
|
|
6
6
|
export interface DiagramToolProviderOptions {
|
|
7
7
|
/** Provider id (unique per registry). Default `diagram`. */
|
|
8
8
|
id?: string;
|
|
9
|
-
/**
|
|
9
|
+
/** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
|
|
10
10
|
namespace?: string;
|
|
11
11
|
/**
|
|
12
12
|
* The diagram cannot be edited: write tools are hidden and `get_diagram` says why. A
|
package/dist/effects/index.cjs
CHANGED
|
@@ -23,11 +23,11 @@ var _chunkPY4GWSE2cjs = require('../chunk-PY4GWSE2.cjs');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkRUZQMYXHcjs = require('../chunk-RUZQMYXH.cjs');
|
|
27
27
|
require('../chunk-WOFXZ3XU.cjs');
|
|
28
28
|
|
|
29
29
|
// src/effects/conformance.ts
|
|
30
|
-
var codeOf = (e) =>
|
|
30
|
+
var codeOf = (e) => _chunkRUZQMYXHcjs.isEffectError.call(void 0, e) ? e.code : e instanceof Error ? `untyped ${e.name}: ${e.message}` : String(e);
|
|
31
31
|
async function rejectsWith(code, run) {
|
|
32
32
|
try {
|
|
33
33
|
await run();
|
|
@@ -41,10 +41,10 @@ function checkSummary(e, issues) {
|
|
|
41
41
|
const at = (message) => issues.push({ effectId: e.id, message });
|
|
42
42
|
if (!e.id || typeof e.id !== "string") at("summary has no id");
|
|
43
43
|
if (!e.name) at("summary has no name");
|
|
44
|
-
if (!
|
|
44
|
+
if (!_chunkRUZQMYXHcjs.EFFECT_KINDS.includes(e.kind)) at(`kind "${e.kind}" is not one of ${_chunkRUZQMYXHcjs.EFFECT_KINDS.join(", ")}`);
|
|
45
45
|
if (!e.category) at("summary has no category");
|
|
46
46
|
if (!Array.isArray(e.uses) || !e.uses.length) at("summary has no uses");
|
|
47
|
-
for (const u of _nullishCoalesce(e.uses, () => ( []))) if (!
|
|
47
|
+
for (const u of _nullishCoalesce(e.uses, () => ( []))) if (!_chunkRUZQMYXHcjs.EFFECT_USES.includes(u)) at(`use "${u}" is not one of ${_chunkRUZQMYXHcjs.EFFECT_USES.join(", ")}`);
|
|
48
48
|
if (typeof e.transparent !== "boolean") at("transparent is not a boolean");
|
|
49
49
|
if (typeof e.loop !== "boolean") at("loop is not a boolean");
|
|
50
50
|
if (e.duration !== void 0 && !(e.duration > 0)) at("duration must be a positive number of ms when present");
|
|
@@ -60,8 +60,8 @@ function checkDescription(id, d, issues) {
|
|
|
60
60
|
if (!(name in (_nullishCoalesce(d.defaults, () => ( {}))))) at(`control "${name}" has no default`);
|
|
61
61
|
}
|
|
62
62
|
for (const name of Object.keys(_nullishCoalesce(d.defaults, () => ( {})))) if (!(name in (_nullishCoalesce(_optionalChain([c, 'optionalAccess', _3 => _3.properties]), () => ( {}))))) at(`default "${name}" is not a control`);
|
|
63
|
-
for (const e of
|
|
64
|
-
for (const p of _nullishCoalesce(d.presets, () => ( []))) for (const e of
|
|
63
|
+
for (const e of _chunkRUZQMYXHcjs.effectValueErrors.call(void 0, d, d.defaults)) at(`default ${e.path}: ${e.message}`);
|
|
64
|
+
for (const p of _nullishCoalesce(d.presets, () => ( []))) for (const e of _chunkRUZQMYXHcjs.effectValueErrors.call(void 0, d, p.values)) at(`preset "${p.name}" ${e.path}: ${e.message}`);
|
|
65
65
|
for (const input2 of _nullishCoalesce(d.inputs, () => ( []))) {
|
|
66
66
|
if (!input2.name || !input2.description) at("every input needs a name and a description");
|
|
67
67
|
if (input2.kind !== "image" && input2.kind !== "audio") at(`input "${input2.name}" has kind "${input2.kind}"`);
|
|
@@ -72,7 +72,7 @@ function checkDescription(id, d, issues) {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
function grey(size) {
|
|
75
|
-
const p =
|
|
75
|
+
const p = _chunkRUZQMYXHcjs.createEffectPixels.call(void 0, size, size);
|
|
76
76
|
p.data.fill(128);
|
|
77
77
|
return p;
|
|
78
78
|
}
|
|
@@ -88,7 +88,7 @@ async function checkRender(provider, d, size, issues) {
|
|
|
88
88
|
}
|
|
89
89
|
try {
|
|
90
90
|
const out = await renderer.render({ time: 0, inputs });
|
|
91
|
-
if (!
|
|
91
|
+
if (!_chunkRUZQMYXHcjs.isEffectPixels.call(void 0, out)) at("render did not return EffectPixels");
|
|
92
92
|
else if (out.width !== size || out.height !== size || out.data.length !== size * size * 4) at(`render returned ${out.width}\xD7${out.height}, not ${size}\xD7${size}`);
|
|
93
93
|
} catch (e) {
|
|
94
94
|
at(`render failed: ${codeOf(e)}`);
|
|
@@ -326,15 +326,15 @@ var smooth = (t) => t * t * (3 - 2 * t);
|
|
|
326
326
|
var clamp01 = (v) => v < 0 ? 0 : v > 1 ? 1 : v;
|
|
327
327
|
function input(request, name, id, width, height) {
|
|
328
328
|
const src = _optionalChain([request, 'access', _9 => _9.inputs, 'optionalAccess', _10 => _10[name]]);
|
|
329
|
-
if (!src) throw new (0,
|
|
330
|
-
if (!
|
|
329
|
+
if (!src) throw new (0, _chunkRUZQMYXHcjs.EffectUnsupportedError)(`Effect "${id}" needs an input named "${name}".`, id);
|
|
330
|
+
if (!_chunkRUZQMYXHcjs.isEffectPixels.call(void 0, src)) throw new (0, _chunkRUZQMYXHcjs.EffectUnsupportedError)(`The fake provider only takes EffectPixels inputs ("${name}").`, id);
|
|
331
331
|
if (src.width !== width || src.height !== height) {
|
|
332
|
-
throw new (0,
|
|
332
|
+
throw new (0, _chunkRUZQMYXHcjs.EffectUnsupportedError)(`Input "${name}" is ${src.width}\xD7${src.height}; the renderer is ${width}\xD7${height}.`, id);
|
|
333
333
|
}
|
|
334
334
|
return src;
|
|
335
335
|
}
|
|
336
336
|
function renderPixels(d, v, request, width, height) {
|
|
337
|
-
const out =
|
|
337
|
+
const out = _chunkRUZQMYXHcjs.createEffectPixels.call(void 0, width, height);
|
|
338
338
|
const o = out.data;
|
|
339
339
|
switch (d.id) {
|
|
340
340
|
case "fake.invert": {
|
|
@@ -400,23 +400,23 @@ function renderPixels(d, v, request, width, height) {
|
|
|
400
400
|
break;
|
|
401
401
|
}
|
|
402
402
|
default:
|
|
403
|
-
throw new (0,
|
|
403
|
+
throw new (0, _chunkRUZQMYXHcjs.EffectUnsupportedError)(`"${d.id}" is a ${d.kind} effect; use applyVectorEffect.`, d.id);
|
|
404
404
|
}
|
|
405
405
|
return out;
|
|
406
406
|
}
|
|
407
407
|
function toFloat(p) {
|
|
408
408
|
const f = new Float32Array(p.data.length);
|
|
409
409
|
for (let i = 0; i < f.length; i += 4) {
|
|
410
|
-
f[i] =
|
|
411
|
-
f[i + 1] =
|
|
412
|
-
f[i + 2] =
|
|
410
|
+
f[i] = _chunkRUZQMYXHcjs.srgbToLinear.call(void 0, p.data[i] / 255);
|
|
411
|
+
f[i + 1] = _chunkRUZQMYXHcjs.srgbToLinear.call(void 0, p.data[i + 1] / 255);
|
|
412
|
+
f[i + 2] = _chunkRUZQMYXHcjs.srgbToLinear.call(void 0, p.data[i + 2] / 255);
|
|
413
413
|
f[i + 3] = p.data[i + 3] / 255;
|
|
414
414
|
}
|
|
415
|
-
return
|
|
415
|
+
return _chunkRUZQMYXHcjs.encodeEffectFloat.call(void 0, { ...p, float: f });
|
|
416
416
|
}
|
|
417
417
|
function maskResult(out, mask, source, id) {
|
|
418
|
-
if (!
|
|
419
|
-
throw new (0,
|
|
418
|
+
if (!_chunkRUZQMYXHcjs.isEffectPixels.call(void 0, mask) || mask.width !== out.width || mask.height !== out.height) {
|
|
419
|
+
throw new (0, _chunkRUZQMYXHcjs.EffectUnsupportedError)("The mask must be EffectPixels the size of the renderer.", id);
|
|
420
420
|
}
|
|
421
421
|
const o = out.data;
|
|
422
422
|
for (let i = 0; i < o.length; i += 4) {
|
|
@@ -438,7 +438,7 @@ function createFakeEffectProvider(options = {}) {
|
|
|
438
438
|
const byId = new Map(DESCRIPTIONS.map((d) => [d.id, d]));
|
|
439
439
|
const get = (id) => {
|
|
440
440
|
const d = byId.get(id);
|
|
441
|
-
if (!d) throw new (0,
|
|
441
|
+
if (!d) throw new (0, _chunkRUZQMYXHcjs.UnknownEffectError)(id, "the fake provider");
|
|
442
442
|
return d;
|
|
443
443
|
};
|
|
444
444
|
const summaries = DESCRIPTIONS.map(summaryOf);
|
|
@@ -447,16 +447,16 @@ function createFakeEffectProvider(options = {}) {
|
|
|
447
447
|
name: "Fake effects",
|
|
448
448
|
version: "1",
|
|
449
449
|
capabilities,
|
|
450
|
-
list: (o) =>
|
|
451
|
-
search: (q, o) =>
|
|
450
|
+
list: (o) => _chunkRUZQMYXHcjs.searchEffectSummaries.call(void 0, summaries, "", o),
|
|
451
|
+
search: (q, o) => _chunkRUZQMYXHcjs.searchEffectSummaries.call(void 0, summaries, q, o),
|
|
452
452
|
describe: (id) => structuredClone(get(id)),
|
|
453
453
|
createRenderer(id, ro) {
|
|
454
454
|
const d = get(id);
|
|
455
|
-
if (d.kind !== "shader") throw new (0,
|
|
455
|
+
if (d.kind !== "shader") throw new (0, _chunkRUZQMYXHcjs.EffectUnsupportedError)(`"${id}" is a ${d.kind} effect; use applyVectorEffect.`, id);
|
|
456
456
|
const { width, height } = ro;
|
|
457
457
|
const depth = _nullishCoalesce(ro.depth, () => ( 8));
|
|
458
458
|
if (!(width > 0 && height > 0) || width > capabilities.maxSize || height > capabilities.maxSize) {
|
|
459
|
-
throw new (0,
|
|
459
|
+
throw new (0, _chunkRUZQMYXHcjs.EffectUnsupportedError)(`Renderer size ${width}\xD7${height} is outside 1\u2013${capabilities.maxSize}.`, id);
|
|
460
460
|
}
|
|
461
461
|
let disposed = false;
|
|
462
462
|
return {
|
|
@@ -465,15 +465,15 @@ function createFakeEffectProvider(options = {}) {
|
|
|
465
465
|
height,
|
|
466
466
|
depth,
|
|
467
467
|
async render(request) {
|
|
468
|
-
if (disposed) throw new (0,
|
|
468
|
+
if (disposed) throw new (0, _chunkRUZQMYXHcjs.EffectDisposedError)(id);
|
|
469
469
|
if (!Number.isFinite(request.time) || request.time < 0) {
|
|
470
|
-
throw new (0,
|
|
470
|
+
throw new (0, _chunkRUZQMYXHcjs.EffectUnsupportedError)(`time must be a finite number of ms \u2265 0, got ${request.time}.`, id);
|
|
471
471
|
}
|
|
472
|
-
const values =
|
|
472
|
+
const values = _chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, d, request.values);
|
|
473
473
|
_optionalChain([options, 'access', _11 => _11.onRender, 'optionalCall', _12 => _12(id, request)]);
|
|
474
474
|
const out = renderPixels(d, values, request, width, height);
|
|
475
475
|
if (request.mask) {
|
|
476
|
-
if (!capabilities.supportsMask) throw new (0,
|
|
476
|
+
if (!capabilities.supportsMask) throw new (0, _chunkRUZQMYXHcjs.EffectUnsupportedError)("This provider does not take masks.", id);
|
|
477
477
|
const source = d.uses.includes("filter") ? _optionalChain([request, 'access', _13 => _13.inputs, 'optionalAccess', _14 => _14.source]) : void 0;
|
|
478
478
|
maskResult(out, request.mask, source, id);
|
|
479
479
|
}
|
|
@@ -486,8 +486,8 @@ function createFakeEffectProvider(options = {}) {
|
|
|
486
486
|
},
|
|
487
487
|
applyVectorEffect(id, target, values) {
|
|
488
488
|
const d = get(id);
|
|
489
|
-
if (d.kind !== "motion" && d.kind !== "vector") throw new (0,
|
|
490
|
-
const v =
|
|
489
|
+
if (d.kind !== "motion" && d.kind !== "vector") throw new (0, _chunkRUZQMYXHcjs.EffectUnsupportedError)(`"${id}" is a ${d.kind} effect, not a vector one.`, id);
|
|
490
|
+
const v = _chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, d, values);
|
|
491
491
|
if (d.kind === "vector") {
|
|
492
492
|
return { svg: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100"><circle id="badge" cx="50" cy="50" r="40" fill="${v.color}"/></svg>`, animate: [{ id: "badge", ms: v.ms, attrs: { opacity: [0, 1] } }], duration: v.ms, loop: false };
|
|
493
493
|
}
|
|
@@ -547,7 +547,7 @@ function effectParameterFields(description) {
|
|
|
547
547
|
}
|
|
548
548
|
var effectFieldValue = (field, value) => value === void 0 || value === null || typeof value === "object" && !Array.isArray(value) ? field.default : value;
|
|
549
549
|
function effectSamplePicture(width, height, variant = 0) {
|
|
550
|
-
const p =
|
|
550
|
+
const p = _chunkRUZQMYXHcjs.createEffectPixels.call(void 0, width, height);
|
|
551
551
|
for (let y = 0, i = 0; y < height; y++) {
|
|
552
552
|
for (let x = 0; x < width; x++, i += 4) {
|
|
553
553
|
const u = x / Math.max(1, width - 1);
|
|
@@ -627,4 +627,4 @@ function groupEffectsByCategory(effects) {
|
|
|
627
627
|
|
|
628
628
|
|
|
629
629
|
|
|
630
|
-
exports.EFFECT_ERROR_CODES =
|
|
630
|
+
exports.EFFECT_ERROR_CODES = _chunkRUZQMYXHcjs.EFFECT_ERROR_CODES; exports.EFFECT_KINDS = _chunkRUZQMYXHcjs.EFFECT_KINDS; exports.EFFECT_USES = _chunkRUZQMYXHcjs.EFFECT_USES; exports.EFFECT_USE_LABELS = EFFECT_USE_LABELS; exports.EffectControlError = _chunkRUZQMYXHcjs.EffectControlError; exports.EffectDisposedError = _chunkRUZQMYXHcjs.EffectDisposedError; exports.EffectError = _chunkRUZQMYXHcjs.EffectError; exports.EffectRendererPool = _chunkPY4GWSE2cjs.EffectRendererPool; exports.EffectUnsupportedError = _chunkRUZQMYXHcjs.EffectUnsupportedError; exports.EffectsSlot = _chunkRUZQMYXHcjs.EffectsSlot; exports.NoEffectsProviderError = _chunkRUZQMYXHcjs.NoEffectsProviderError; exports.UnknownEffectError = _chunkRUZQMYXHcjs.UnknownEffectError; exports.applyEffectMask = _chunkRUZQMYXHcjs.applyEffectMask; exports.checkEffectProvider = checkEffectProvider; exports.createEffectPixels = _chunkRUZQMYXHcjs.createEffectPixels; exports.createEffectToolProvider = _chunkRUZQMYXHcjs.createEffectToolProvider; exports.createFakeEffectProvider = createFakeEffectProvider; exports.effectControlField = effectControlField; exports.effectFieldValue = effectFieldValue; exports.effectParameterFields = effectParameterFields; exports.effectSamplePicture = effectSamplePicture; exports.effectValueErrors = _chunkRUZQMYXHcjs.effectValueErrors; exports.encodeEffectFloat = _chunkRUZQMYXHcjs.encodeEffectFloat; exports.groupEffectsByCategory = groupEffectsByCategory; exports.isEffectError = _chunkRUZQMYXHcjs.isEffectError; exports.isEffectPixels = _chunkRUZQMYXHcjs.isEffectPixels; exports.linearToSrgb = _chunkRUZQMYXHcjs.linearToSrgb; exports.renderEffectThumbnail = renderEffectThumbnail; exports.resolveEffectValues = _chunkRUZQMYXHcjs.resolveEffectValues; exports.searchEffectSummaries = _chunkRUZQMYXHcjs.searchEffectSummaries; exports.srgbToLinear = _chunkRUZQMYXHcjs.srgbToLinear;
|
package/dist/effects/index.js
CHANGED
package/dist/effects/tools.d.cts
CHANGED
|
@@ -47,8 +47,12 @@ export interface EffectChangeResult {
|
|
|
47
47
|
export interface EffectToolHost {
|
|
48
48
|
/** Provider id (unique per registry). */
|
|
49
49
|
id: string;
|
|
50
|
-
/**
|
|
50
|
+
/** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
|
|
51
51
|
namespace?: string;
|
|
52
|
+
/** Toolset title, description and skill (see `AgentToolProvider`). */
|
|
53
|
+
title?: string;
|
|
54
|
+
description?: string;
|
|
55
|
+
skill?: string;
|
|
52
56
|
/** Words for the editor's targets, e.g. `{ noun: 'clip', id: 'A clip id from get_video_project (e.g. "c1").' }`. */
|
|
53
57
|
target: {
|
|
54
58
|
noun: string;
|
package/dist/effects/tools.d.ts
CHANGED
|
@@ -47,8 +47,12 @@ export interface EffectChangeResult {
|
|
|
47
47
|
export interface EffectToolHost {
|
|
48
48
|
/** Provider id (unique per registry). */
|
|
49
49
|
id: string;
|
|
50
|
-
/**
|
|
50
|
+
/** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
|
|
51
51
|
namespace?: string;
|
|
52
|
+
/** Toolset title, description and skill (see `AgentToolProvider`). */
|
|
53
|
+
title?: string;
|
|
54
|
+
description?: string;
|
|
55
|
+
skill?: string;
|
|
52
56
|
/** Words for the editor's targets, e.g. `{ noun: 'clip', id: 'A clip id from get_video_project (e.g. "c1").' }`. */
|
|
53
57
|
target: {
|
|
54
58
|
noun: string;
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
var
|
|
98
|
+
var _chunkRWML7TWGcjs = require('../chunk-RWML7TWG.cjs');
|
|
99
99
|
require('../chunk-S7I3RI5Z.cjs');
|
|
100
100
|
|
|
101
101
|
|
|
@@ -171,7 +171,7 @@ require('../chunk-HLMF3E53.cjs');
|
|
|
171
171
|
|
|
172
172
|
|
|
173
173
|
|
|
174
|
-
var
|
|
174
|
+
var _chunkRPW7YL3Dcjs = require('../chunk-RPW7YL3D.cjs');
|
|
175
175
|
require('../chunk-XQ33O5BC.cjs');
|
|
176
176
|
require('../chunk-6HMEHNWW.cjs');
|
|
177
177
|
require('../chunk-UR37VCIR.cjs');
|
|
@@ -406,4 +406,4 @@ require('../chunk-FJ2MSI43.cjs');
|
|
|
406
406
|
|
|
407
407
|
|
|
408
408
|
|
|
409
|
-
exports.ALLOW_NESTED_TABLES_META = _chunkT6Y5FV7Gcjs.ALLOW_NESTED_TABLES_META; exports.AgentCaret = _chunkT6Y5FV7Gcjs.AgentCaret; exports.Autocorrect = _chunkGUPQ5BNAcjs.Autocorrect; exports.BLOCK_CHANGE_ATTRIBUTE = _chunkCCKP4XANcjs.BLOCK_CHANGE_ATTRIBUTE; exports.Bookmark = _chunkGUPQ5BNAcjs.Bookmark; exports.CHARACTER_STYLE_MARK_NAME = _chunkGUPQ5BNAcjs.CHARACTER_STYLE_MARK_NAME; exports.COMMENT_MARK_NAME = _chunkGUPQ5BNAcjs.COMMENT_MARK_NAME; exports.CharacterStyle = _chunkGUPQ5BNAcjs.CharacterStyle; exports.Chart = _chunkT6Y5FV7Gcjs.Chart; exports.ChartNodeView = _chunkT6Y5FV7Gcjs.ChartNodeView; exports.ColorHighlighter = _chunkGUPQ5BNAcjs.ColorHighlighter; exports.CommentStore = _chunkCCKP4XANcjs.CommentStore; exports.Comments = _chunkGUPQ5BNAcjs.Comments; exports.CrossReference = _chunkGUPQ5BNAcjs.CrossReference; exports.DEFAULT_AGENT_CARET_COLOR = _chunkT6Y5FV7Gcjs.DEFAULT_AGENT_CARET_COLOR; exports.DEFAULT_AGENT_CARET_NAME = _chunkT6Y5FV7Gcjs.DEFAULT_AGENT_CARET_NAME; exports.DEFAULT_AUTOCORRECT_EXCEPTIONS = _chunkGUPQ5BNAcjs.DEFAULT_AUTOCORRECT_EXCEPTIONS; exports.DEFAULT_STYLES = _chunkF652BKMScjs.DEFAULT_STYLES; exports.DEFAULT_TABLE_OPTIONS = _chunkT6Y5FV7Gcjs.DEFAULT_TABLE_OPTIONS; exports.DEFAULT_TABLE_TOOLBAR = _chunkT6Y5FV7Gcjs.DEFAULT_TABLE_TOOLBAR; exports.DELETION_MARK_NAME = _chunkCCKP4XANcjs.DELETION_MARK_NAME; exports.DocumentCompare = _chunkGUPQ5BNAcjs.DocumentCompare; exports.EMPTY_FIND_REPLACE_SNAPSHOT = _chunkGUPQ5BNAcjs.EMPTY_FIND_REPLACE_SNAPSHOT; exports.EMPTY_TABLE_STATE = _chunkT6Y5FV7Gcjs.EMPTY_TABLE_STATE; exports.FIND_OPTION_TOGGLES = _chunkGUPQ5BNAcjs.FIND_OPTION_TOGGLES; exports.FIND_PARAGRAPH_MARK = _chunkT6Y5FV7Gcjs.FIND_PARAGRAPH_MARK; exports.FORMAT_CHANGE_MARK_NAME = _chunkCCKP4XANcjs.FORMAT_CHANGE_MARK_NAME; exports.FileImport = _chunkGUPQ5BNAcjs.FileImport; exports.FindReplace = _chunkGUPQ5BNAcjs.FindReplace; exports.FindReplaceStore = _chunkGUPQ5BNAcjs.FindReplaceStore; exports.FontSize = _chunkGUPQ5BNAcjs.FontSize; exports.Footnote = _chunkGUPQ5BNAcjs.Footnote; exports.FootnoteReference = _chunkGUPQ5BNAcjs.FootnoteReference; exports.Footnotes = _chunkGUPQ5BNAcjs.Footnotes; exports.GradientText = _chunkGUPQ5BNAcjs.GradientText; exports.INSERTION_MARK_NAME = _chunkCCKP4XANcjs.INSERTION_MARK_NAME; exports.Image = _chunkGUPQ5BNAcjs.Image; exports.LoadingNode = _chunkGUPQ5BNAcjs.LoadingNode; exports.MAX_FIND_PATTERN_LENGTH = _chunkT6Y5FV7Gcjs.MAX_FIND_PATTERN_LENGTH; exports.MAX_SPARKLINE_VALUES = _chunkT6Y5FV7Gcjs.MAX_SPARKLINE_VALUES; exports.MAX_TABLE_COLUMNS = _chunkT6Y5FV7Gcjs.MAX_TABLE_COLUMNS; exports.MAX_TABLE_ROWS = _chunkT6Y5FV7Gcjs.MAX_TABLE_ROWS; exports.MOVE_FROM_CLASS = _chunkCCKP4XANcjs.MOVE_FROM_CLASS; exports.MOVE_ID_ATTRIBUTE = _chunkCCKP4XANcjs.MOVE_ID_ATTRIBUTE; exports.MOVE_TO_CLASS = _chunkCCKP4XANcjs.MOVE_TO_CLASS; exports.Markdown = _chunkGUPQ5BNAcjs.Markdown; exports.Mention = _chunkGUPQ5BNAcjs.Mention; exports.NORMAL_STYLE_ID = _chunkF652BKMScjs.NORMAL_STYLE_ID; exports.Outline = _chunkGUPQ5BNAcjs.Outline; exports.ParagraphStyles = _chunkGUPQ5BNAcjs.ParagraphStyles; exports.RichClipboard = _chunkGUPQ5BNAcjs.RichClipboard; exports.SMILIE_REPLACEMENTS = _chunkGUPQ5BNAcjs.SMILIE_REPLACEMENTS; exports.SPARKLINE_KINDS = _chunkT6Y5FV7Gcjs.SPARKLINE_KINDS; exports.STYLE_ID_ATTRIBUTE = _chunkGUPQ5BNAcjs.STYLE_ID_ATTRIBUTE; exports.SlashCommands = _chunkGUPQ5BNAcjs.SlashCommands; exports.SmilieReplacer = _chunkGUPQ5BNAcjs.SmilieReplacer; exports.Sparkline = _chunkT6Y5FV7Gcjs.Sparkline; exports.StyleRegistry = _chunkF652BKMScjs.StyleRegistry; exports.TABLE_ACTIONS = _chunkT6Y5FV7Gcjs.TABLE_ACTIONS; exports.TRACK_CHANGES_SKIP_META = _chunkCCKP4XANcjs.TRACK_CHANGES_SKIP_META; exports.Table = _chunkT6Y5FV7Gcjs.Table; exports.TableCell = _chunkT6Y5FV7Gcjs.TableCell; exports.TableHeader = _chunkT6Y5FV7Gcjs.TableHeader; exports.TableOfContents = _chunkGUPQ5BNAcjs.TableOfContents; exports.TableRow = _chunkT6Y5FV7Gcjs.TableRow; exports.TemplateSuggestions = _chunkGUPQ5BNAcjs.TemplateSuggestions; exports.TrackChanges = _chunkCCKP4XANcjs.TrackChanges; exports.TrackChangesStore = _chunkCCKP4XANcjs.TrackChangesStore; exports.TrackedDeletion = _chunkCCKP4XANcjs.TrackedDeletion; exports.TrackedFormatChange = _chunkCCKP4XANcjs.TrackedFormatChange; exports.TrackedInsertion = _chunkCCKP4XANcjs.TrackedInsertion; exports.agentCaretPluginKey = _chunkT6Y5FV7Gcjs.agentCaretPluginKey; exports.applyDocumentComparison = _chunkGUPQ5BNAcjs.applyDocumentComparison; exports.applyReplacements = _chunkT6Y5FV7Gcjs.applyReplacements; exports.autocorrectPluginKey = _chunkGUPQ5BNAcjs.autocorrectPluginKey; exports.buildOutlineTree = _chunkGUPQ5BNAcjs.buildOutlineTree; exports.capitalizeSentenceRules = _chunkGUPQ5BNAcjs.capitalizeSentenceRules; exports.captureSelectionFormat = _chunkGUPQ5BNAcjs.captureSelectionFormat; exports.chartPluginKey = _chunkT6Y5FV7Gcjs.chartPluginKey; exports.clearAgentCaret = _chunkT6Y5FV7Gcjs.clearAgentCaret; exports.commentsPluginKey = _chunkGUPQ5BNAcjs.commentsPluginKey; exports.compareInEditor = _chunkGUPQ5BNAcjs.compareInEditor; exports.compileFindPattern = _chunkT6Y5FV7Gcjs.compileFindPattern; exports.computeOutline = _chunkGUPQ5BNAcjs.computeOutline; exports.createAgentCaretPlugin = _chunkT6Y5FV7Gcjs.createAgentCaretPlugin; exports.createChartNodeView = _chunkT6Y5FV7Gcjs.createChartNodeView; exports.createCommentStore = _chunkCCKP4XANcjs.createCommentStore; exports.createFindReplaceCommands = _chunkGUPQ5BNAcjs.createFindReplaceCommands; exports.createMentionExtension = _chunkGUPQ5BNAcjs.createMentionExtension; exports.createOutlineStore = _chunkGUPQ5BNAcjs.createOutlineStore; exports.createParagraphStylesStore = _chunkGUPQ5BNAcjs.createParagraphStylesStore; exports.createReviewId = _chunkCCKP4XANcjs.createReviewId; exports.createRichTextPreset = _chunkGUPQ5BNAcjs.createRichTextPreset; exports.createSearchBudget = _chunkT6Y5FV7Gcjs.createSearchBudget; exports.createStyleRegistry = _chunkF652BKMScjs.createStyleRegistry; exports.createTableCommands = _chunkGUPQ5BNAcjs.createTableCommands; exports.createTableExtensions = _chunkT6Y5FV7Gcjs.createTableExtensions; exports.createTableNestingPlugin = _chunkT6Y5FV7Gcjs.createTableNestingPlugin; exports.createTableStore = _chunkT6Y5FV7Gcjs.createTableStore; exports.crossReferencePluginKey = _chunkGUPQ5BNAcjs.crossReferencePluginKey; exports.defaultAutocorrectRules = _chunkGUPQ5BNAcjs.defaultAutocorrectRules; exports.describeBlockChange = _chunkCCKP4XANcjs.describeBlockChange; exports.describeFormatChange = _chunkCCKP4XANcjs.describeFormatChange; exports.documentStructureCommandItems = _chunkGUPQ5BNAcjs.documentStructureCommandItems; exports.ensureAgentCaret = _chunkT6Y5FV7Gcjs.ensureAgentCaret; exports.expandReplacement = _chunkT6Y5FV7Gcjs.expandReplacement; exports.fileImportPluginKey = _chunkGUPQ5BNAcjs.fileImportPluginKey; exports.findAllMatches = _chunkT6Y5FV7Gcjs.findAllMatches; exports.findAutocorrection = _chunkGUPQ5BNAcjs.findAutocorrection; exports.findCommentRanges = _chunkGUPQ5BNAcjs.findCommentRanges; exports.findHexColors = _chunkGUPQ5BNAcjs.findHexColors; exports.findReplacePluginKey = _chunkGUPQ5BNAcjs.findReplacePluginKey; exports.foldCodePoint = _chunkT6Y5FV7Gcjs.foldCodePoint; exports.footnotesMarkdownIt = _chunkGUPQ5BNAcjs.footnotesMarkdownIt; exports.footnotesPluginKey = _chunkGUPQ5BNAcjs.footnotesPluginKey; exports.formatFindStatus = _chunkGUPQ5BNAcjs.formatFindStatus; exports.formatReviewTime = _chunkCCKP4XANcjs.formatReviewTime; exports.fractionRules = _chunkGUPQ5BNAcjs.fractionRules; exports.getActiveHeading = _chunkGUPQ5BNAcjs.getActiveHeading; exports.getAgentCarets = _chunkT6Y5FV7Gcjs.getAgentCarets; exports.getBookmarks = _chunkGUPQ5BNAcjs.getBookmarks; exports.getCommentAnchors = _chunkGUPQ5BNAcjs.getCommentAnchors; exports.getCommentAuthor = _chunkGUPQ5BNAcjs.getCommentAuthor; exports.getCommentIdsAt = _chunkGUPQ5BNAcjs.getCommentIdsAt; exports.getCommentStore = _chunkGUPQ5BNAcjs.getCommentStore; exports.getCrossReferenceTargets = _chunkGUPQ5BNAcjs.getCrossReferenceTargets; exports.getDocumentCharts = _chunkT6Y5FV7Gcjs.getDocumentCharts; exports.getDocumentStructureCommandItems = _chunkGUPQ5BNAcjs.getDocumentStructureCommandItems; exports.getFindReplaceState = _chunkGUPQ5BNAcjs.getFindReplaceState; exports.getFindReplaceStore = _chunkGUPQ5BNAcjs.getFindReplaceStore; exports.getFootnotes = _chunkGUPQ5BNAcjs.getFootnotes; exports.getMentionNodes = _chunkGUPQ5BNAcjs.getMentionNodes; exports.getOutline = _chunkGUPQ5BNAcjs.getOutline; exports.getParagraphStyleAt = _chunkGUPQ5BNAcjs.getParagraphStyleAt; exports.getStyleRegistry = _chunkGUPQ5BNAcjs.getStyleRegistry; exports.getTableActionState = _chunkT6Y5FV7Gcjs.getTableActionState; exports.getTableOfContentsEntries = _chunkGUPQ5BNAcjs.getTableOfContentsEntries; exports.getTableState = _chunkT6Y5FV7Gcjs.getTableState; exports.getTrackChangesStore = _chunkCCKP4XANcjs.getTrackChangesStore; exports.getTrackedChangeAt = _chunkCCKP4XANcjs.getTrackedChangeAt; exports.getTrackedChanges = _chunkCCKP4XANcjs.getTrackedChanges; exports.handleImageInsertion = _chunkGUPQ5BNAcjs.handleImageInsertion; exports.handleTablePasteWithoutNesting = _chunkT6Y5FV7Gcjs.handleTablePasteWithoutNesting; exports.imagePastePluginKey = _chunkGUPQ5BNAcjs.imagePastePluginKey; exports.insertImageNode = _chunkGUPQ5BNAcjs.insertImageNode; exports.insertSliceAfterTable = _chunkT6Y5FV7Gcjs.insertSliceAfterTable; exports.isChartEnabled = _chunkT6Y5FV7Gcjs.isChartEnabled; exports.isGfmTable = _chunkT6Y5FV7Gcjs.isGfmTable; exports.isInTableCell = _chunkT6Y5FV7Gcjs.isInTableCell; exports.isInsidePromptToken = _chunkGUPQ5BNAcjs.isInsidePromptToken; exports.isMoveSized = _chunkCCKP4XANcjs.isMoveSized; exports.isParagraphStyleAvailable = _chunkGUPQ5BNAcjs.isParagraphStyleAvailable; exports.isSelectionInTable = _chunkT6Y5FV7Gcjs.isSelectionInTable; exports.isTableEnabled = _chunkT6Y5FV7Gcjs.isTableEnabled; exports.isTrackChangesEnabled = _chunkCCKP4XANcjs.isTrackChangesEnabled; exports.isValidStyleId = _chunkF652BKMScjs.isValidStyleId; exports.markAgentChanges = _chunkT6Y5FV7Gcjs.markAgentChanges; exports.navigateToHeading = _chunkGUPQ5BNAcjs.navigateToHeading; exports.normalizeSparklineValues = _chunkT6Y5FV7Gcjs.normalizeSparklineValues; exports.normalizeTableCellAlignment = _chunkT6Y5FV7Gcjs.normalizeTableCellAlignment; exports.normalizeTableCellColor = _chunkT6Y5FV7Gcjs.normalizeTableCellColor; exports.outermostTableDepth = _chunkT6Y5FV7Gcjs.outermostTableDepth; exports.outlinePluginKey = _chunkGUPQ5BNAcjs.outlinePluginKey; exports.paragraphStylesPluginKey = _chunkGUPQ5BNAcjs.paragraphStylesPluginKey; exports.parseReplacement = _chunkT6Y5FV7Gcjs.parseReplacement; exports.removeImageNode = _chunkGUPQ5BNAcjs.removeImageNode; exports.replaceWithTextTransaction = _chunkT6Y5FV7Gcjs.replaceWithTextTransaction; exports.resolveTrackedChanges = _chunkCCKP4XANcjs.resolveTrackedChanges; exports.richClipboardPluginKey = _chunkGUPQ5BNAcjs.richClipboardPluginKey; exports.runTableAction = _chunkT6Y5FV7Gcjs.runTableAction; exports.safeCSSValue = _chunkF652BKMScjs.safeCSSValue; exports.searchDocument = _chunkT6Y5FV7Gcjs.searchDocument; exports.setAgentCaret = _chunkT6Y5FV7Gcjs.setAgentCaret; exports.setMentionRoleAt = _chunkGUPQ5BNAcjs.setMentionRoleAt; exports.shouldShowTableBubbleMenu = _chunkT6Y5FV7Gcjs.shouldShowTableBubbleMenu; exports.sliceContainsTable = _chunkT6Y5FV7Gcjs.sliceContainsTable; exports.smartQuoteRules = _chunkGUPQ5BNAcjs.smartQuoteRules; exports.smilieAutocorrectRules = _chunkGUPQ5BNAcjs.smilieAutocorrectRules; exports.sparklineLabel = _chunkT6Y5FV7Gcjs.sparklineLabel; exports.staticChartSvg = _chunkT6Y5FV7Gcjs.staticChartSvg; exports.symbolRules = _chunkGUPQ5BNAcjs.symbolRules; exports.syncFootnotes = _chunkGUPQ5BNAcjs.syncFootnotes; exports.tableNestingPluginKey = _chunkT6Y5FV7Gcjs.tableNestingPluginKey; exports.tableOfContentsMarkdownIt = _chunkGUPQ5BNAcjs.tableOfContentsMarkdownIt; exports.tableOfContentsPluginKey = _chunkGUPQ5BNAcjs.tableOfContentsPluginKey; exports.trackChangesPluginKey = _chunkCCKP4XANcjs.trackChangesPluginKey; exports.trackedChangeLabel = _chunkCCKP4XANcjs.trackedChangeLabel; exports.twoInitialCapitalsRules = _chunkGUPQ5BNAcjs.twoInitialCapitalsRules; exports.typeAgentText = _chunkT6Y5FV7Gcjs.typeAgentText; exports.unnestTables = _chunkT6Y5FV7Gcjs.unnestTables; exports.updateImageSrc = _chunkGUPQ5BNAcjs.updateImageSrc; exports.validateFindPattern = _chunkGUPQ5BNAcjs.validateFindPattern; exports.writeRichClipboard = _chunkGUPQ5BNAcjs.writeRichClipboard;
|
|
409
|
+
exports.ALLOW_NESTED_TABLES_META = _chunkRPW7YL3Dcjs.ALLOW_NESTED_TABLES_META; exports.AgentCaret = _chunkRPW7YL3Dcjs.AgentCaret; exports.Autocorrect = _chunkRWML7TWGcjs.Autocorrect; exports.BLOCK_CHANGE_ATTRIBUTE = _chunkCCKP4XANcjs.BLOCK_CHANGE_ATTRIBUTE; exports.Bookmark = _chunkRWML7TWGcjs.Bookmark; exports.CHARACTER_STYLE_MARK_NAME = _chunkRWML7TWGcjs.CHARACTER_STYLE_MARK_NAME; exports.COMMENT_MARK_NAME = _chunkRWML7TWGcjs.COMMENT_MARK_NAME; exports.CharacterStyle = _chunkRWML7TWGcjs.CharacterStyle; exports.Chart = _chunkRPW7YL3Dcjs.Chart; exports.ChartNodeView = _chunkRPW7YL3Dcjs.ChartNodeView; exports.ColorHighlighter = _chunkRWML7TWGcjs.ColorHighlighter; exports.CommentStore = _chunkCCKP4XANcjs.CommentStore; exports.Comments = _chunkRWML7TWGcjs.Comments; exports.CrossReference = _chunkRWML7TWGcjs.CrossReference; exports.DEFAULT_AGENT_CARET_COLOR = _chunkRPW7YL3Dcjs.DEFAULT_AGENT_CARET_COLOR; exports.DEFAULT_AGENT_CARET_NAME = _chunkRPW7YL3Dcjs.DEFAULT_AGENT_CARET_NAME; exports.DEFAULT_AUTOCORRECT_EXCEPTIONS = _chunkRWML7TWGcjs.DEFAULT_AUTOCORRECT_EXCEPTIONS; exports.DEFAULT_STYLES = _chunkF652BKMScjs.DEFAULT_STYLES; exports.DEFAULT_TABLE_OPTIONS = _chunkRPW7YL3Dcjs.DEFAULT_TABLE_OPTIONS; exports.DEFAULT_TABLE_TOOLBAR = _chunkRPW7YL3Dcjs.DEFAULT_TABLE_TOOLBAR; exports.DELETION_MARK_NAME = _chunkCCKP4XANcjs.DELETION_MARK_NAME; exports.DocumentCompare = _chunkRWML7TWGcjs.DocumentCompare; exports.EMPTY_FIND_REPLACE_SNAPSHOT = _chunkRWML7TWGcjs.EMPTY_FIND_REPLACE_SNAPSHOT; exports.EMPTY_TABLE_STATE = _chunkRPW7YL3Dcjs.EMPTY_TABLE_STATE; exports.FIND_OPTION_TOGGLES = _chunkRWML7TWGcjs.FIND_OPTION_TOGGLES; exports.FIND_PARAGRAPH_MARK = _chunkRPW7YL3Dcjs.FIND_PARAGRAPH_MARK; exports.FORMAT_CHANGE_MARK_NAME = _chunkCCKP4XANcjs.FORMAT_CHANGE_MARK_NAME; exports.FileImport = _chunkRWML7TWGcjs.FileImport; exports.FindReplace = _chunkRWML7TWGcjs.FindReplace; exports.FindReplaceStore = _chunkRWML7TWGcjs.FindReplaceStore; exports.FontSize = _chunkRWML7TWGcjs.FontSize; exports.Footnote = _chunkRWML7TWGcjs.Footnote; exports.FootnoteReference = _chunkRWML7TWGcjs.FootnoteReference; exports.Footnotes = _chunkRWML7TWGcjs.Footnotes; exports.GradientText = _chunkRWML7TWGcjs.GradientText; exports.INSERTION_MARK_NAME = _chunkCCKP4XANcjs.INSERTION_MARK_NAME; exports.Image = _chunkRWML7TWGcjs.Image; exports.LoadingNode = _chunkRWML7TWGcjs.LoadingNode; exports.MAX_FIND_PATTERN_LENGTH = _chunkRPW7YL3Dcjs.MAX_FIND_PATTERN_LENGTH; exports.MAX_SPARKLINE_VALUES = _chunkRPW7YL3Dcjs.MAX_SPARKLINE_VALUES; exports.MAX_TABLE_COLUMNS = _chunkRPW7YL3Dcjs.MAX_TABLE_COLUMNS; exports.MAX_TABLE_ROWS = _chunkRPW7YL3Dcjs.MAX_TABLE_ROWS; exports.MOVE_FROM_CLASS = _chunkCCKP4XANcjs.MOVE_FROM_CLASS; exports.MOVE_ID_ATTRIBUTE = _chunkCCKP4XANcjs.MOVE_ID_ATTRIBUTE; exports.MOVE_TO_CLASS = _chunkCCKP4XANcjs.MOVE_TO_CLASS; exports.Markdown = _chunkRWML7TWGcjs.Markdown; exports.Mention = _chunkRWML7TWGcjs.Mention; exports.NORMAL_STYLE_ID = _chunkF652BKMScjs.NORMAL_STYLE_ID; exports.Outline = _chunkRWML7TWGcjs.Outline; exports.ParagraphStyles = _chunkRWML7TWGcjs.ParagraphStyles; exports.RichClipboard = _chunkRWML7TWGcjs.RichClipboard; exports.SMILIE_REPLACEMENTS = _chunkRWML7TWGcjs.SMILIE_REPLACEMENTS; exports.SPARKLINE_KINDS = _chunkRPW7YL3Dcjs.SPARKLINE_KINDS; exports.STYLE_ID_ATTRIBUTE = _chunkRWML7TWGcjs.STYLE_ID_ATTRIBUTE; exports.SlashCommands = _chunkRWML7TWGcjs.SlashCommands; exports.SmilieReplacer = _chunkRWML7TWGcjs.SmilieReplacer; exports.Sparkline = _chunkRPW7YL3Dcjs.Sparkline; exports.StyleRegistry = _chunkF652BKMScjs.StyleRegistry; exports.TABLE_ACTIONS = _chunkRPW7YL3Dcjs.TABLE_ACTIONS; exports.TRACK_CHANGES_SKIP_META = _chunkCCKP4XANcjs.TRACK_CHANGES_SKIP_META; exports.Table = _chunkRPW7YL3Dcjs.Table; exports.TableCell = _chunkRPW7YL3Dcjs.TableCell; exports.TableHeader = _chunkRPW7YL3Dcjs.TableHeader; exports.TableOfContents = _chunkRWML7TWGcjs.TableOfContents; exports.TableRow = _chunkRPW7YL3Dcjs.TableRow; exports.TemplateSuggestions = _chunkRWML7TWGcjs.TemplateSuggestions; exports.TrackChanges = _chunkCCKP4XANcjs.TrackChanges; exports.TrackChangesStore = _chunkCCKP4XANcjs.TrackChangesStore; exports.TrackedDeletion = _chunkCCKP4XANcjs.TrackedDeletion; exports.TrackedFormatChange = _chunkCCKP4XANcjs.TrackedFormatChange; exports.TrackedInsertion = _chunkCCKP4XANcjs.TrackedInsertion; exports.agentCaretPluginKey = _chunkRPW7YL3Dcjs.agentCaretPluginKey; exports.applyDocumentComparison = _chunkRWML7TWGcjs.applyDocumentComparison; exports.applyReplacements = _chunkRPW7YL3Dcjs.applyReplacements; exports.autocorrectPluginKey = _chunkRWML7TWGcjs.autocorrectPluginKey; exports.buildOutlineTree = _chunkRWML7TWGcjs.buildOutlineTree; exports.capitalizeSentenceRules = _chunkRWML7TWGcjs.capitalizeSentenceRules; exports.captureSelectionFormat = _chunkRWML7TWGcjs.captureSelectionFormat; exports.chartPluginKey = _chunkRPW7YL3Dcjs.chartPluginKey; exports.clearAgentCaret = _chunkRPW7YL3Dcjs.clearAgentCaret; exports.commentsPluginKey = _chunkRWML7TWGcjs.commentsPluginKey; exports.compareInEditor = _chunkRWML7TWGcjs.compareInEditor; exports.compileFindPattern = _chunkRPW7YL3Dcjs.compileFindPattern; exports.computeOutline = _chunkRWML7TWGcjs.computeOutline; exports.createAgentCaretPlugin = _chunkRPW7YL3Dcjs.createAgentCaretPlugin; exports.createChartNodeView = _chunkRPW7YL3Dcjs.createChartNodeView; exports.createCommentStore = _chunkCCKP4XANcjs.createCommentStore; exports.createFindReplaceCommands = _chunkRWML7TWGcjs.createFindReplaceCommands; exports.createMentionExtension = _chunkRWML7TWGcjs.createMentionExtension; exports.createOutlineStore = _chunkRWML7TWGcjs.createOutlineStore; exports.createParagraphStylesStore = _chunkRWML7TWGcjs.createParagraphStylesStore; exports.createReviewId = _chunkCCKP4XANcjs.createReviewId; exports.createRichTextPreset = _chunkRWML7TWGcjs.createRichTextPreset; exports.createSearchBudget = _chunkRPW7YL3Dcjs.createSearchBudget; exports.createStyleRegistry = _chunkF652BKMScjs.createStyleRegistry; exports.createTableCommands = _chunkRWML7TWGcjs.createTableCommands; exports.createTableExtensions = _chunkRPW7YL3Dcjs.createTableExtensions; exports.createTableNestingPlugin = _chunkRPW7YL3Dcjs.createTableNestingPlugin; exports.createTableStore = _chunkRPW7YL3Dcjs.createTableStore; exports.crossReferencePluginKey = _chunkRWML7TWGcjs.crossReferencePluginKey; exports.defaultAutocorrectRules = _chunkRWML7TWGcjs.defaultAutocorrectRules; exports.describeBlockChange = _chunkCCKP4XANcjs.describeBlockChange; exports.describeFormatChange = _chunkCCKP4XANcjs.describeFormatChange; exports.documentStructureCommandItems = _chunkRWML7TWGcjs.documentStructureCommandItems; exports.ensureAgentCaret = _chunkRPW7YL3Dcjs.ensureAgentCaret; exports.expandReplacement = _chunkRPW7YL3Dcjs.expandReplacement; exports.fileImportPluginKey = _chunkRWML7TWGcjs.fileImportPluginKey; exports.findAllMatches = _chunkRPW7YL3Dcjs.findAllMatches; exports.findAutocorrection = _chunkRWML7TWGcjs.findAutocorrection; exports.findCommentRanges = _chunkRWML7TWGcjs.findCommentRanges; exports.findHexColors = _chunkRWML7TWGcjs.findHexColors; exports.findReplacePluginKey = _chunkRWML7TWGcjs.findReplacePluginKey; exports.foldCodePoint = _chunkRPW7YL3Dcjs.foldCodePoint; exports.footnotesMarkdownIt = _chunkRWML7TWGcjs.footnotesMarkdownIt; exports.footnotesPluginKey = _chunkRWML7TWGcjs.footnotesPluginKey; exports.formatFindStatus = _chunkRWML7TWGcjs.formatFindStatus; exports.formatReviewTime = _chunkCCKP4XANcjs.formatReviewTime; exports.fractionRules = _chunkRWML7TWGcjs.fractionRules; exports.getActiveHeading = _chunkRWML7TWGcjs.getActiveHeading; exports.getAgentCarets = _chunkRPW7YL3Dcjs.getAgentCarets; exports.getBookmarks = _chunkRWML7TWGcjs.getBookmarks; exports.getCommentAnchors = _chunkRWML7TWGcjs.getCommentAnchors; exports.getCommentAuthor = _chunkRWML7TWGcjs.getCommentAuthor; exports.getCommentIdsAt = _chunkRWML7TWGcjs.getCommentIdsAt; exports.getCommentStore = _chunkRWML7TWGcjs.getCommentStore; exports.getCrossReferenceTargets = _chunkRWML7TWGcjs.getCrossReferenceTargets; exports.getDocumentCharts = _chunkRPW7YL3Dcjs.getDocumentCharts; exports.getDocumentStructureCommandItems = _chunkRWML7TWGcjs.getDocumentStructureCommandItems; exports.getFindReplaceState = _chunkRWML7TWGcjs.getFindReplaceState; exports.getFindReplaceStore = _chunkRWML7TWGcjs.getFindReplaceStore; exports.getFootnotes = _chunkRWML7TWGcjs.getFootnotes; exports.getMentionNodes = _chunkRWML7TWGcjs.getMentionNodes; exports.getOutline = _chunkRWML7TWGcjs.getOutline; exports.getParagraphStyleAt = _chunkRWML7TWGcjs.getParagraphStyleAt; exports.getStyleRegistry = _chunkRWML7TWGcjs.getStyleRegistry; exports.getTableActionState = _chunkRPW7YL3Dcjs.getTableActionState; exports.getTableOfContentsEntries = _chunkRWML7TWGcjs.getTableOfContentsEntries; exports.getTableState = _chunkRPW7YL3Dcjs.getTableState; exports.getTrackChangesStore = _chunkCCKP4XANcjs.getTrackChangesStore; exports.getTrackedChangeAt = _chunkCCKP4XANcjs.getTrackedChangeAt; exports.getTrackedChanges = _chunkCCKP4XANcjs.getTrackedChanges; exports.handleImageInsertion = _chunkRWML7TWGcjs.handleImageInsertion; exports.handleTablePasteWithoutNesting = _chunkRPW7YL3Dcjs.handleTablePasteWithoutNesting; exports.imagePastePluginKey = _chunkRWML7TWGcjs.imagePastePluginKey; exports.insertImageNode = _chunkRWML7TWGcjs.insertImageNode; exports.insertSliceAfterTable = _chunkRPW7YL3Dcjs.insertSliceAfterTable; exports.isChartEnabled = _chunkRPW7YL3Dcjs.isChartEnabled; exports.isGfmTable = _chunkRPW7YL3Dcjs.isGfmTable; exports.isInTableCell = _chunkRPW7YL3Dcjs.isInTableCell; exports.isInsidePromptToken = _chunkRWML7TWGcjs.isInsidePromptToken; exports.isMoveSized = _chunkCCKP4XANcjs.isMoveSized; exports.isParagraphStyleAvailable = _chunkRWML7TWGcjs.isParagraphStyleAvailable; exports.isSelectionInTable = _chunkRPW7YL3Dcjs.isSelectionInTable; exports.isTableEnabled = _chunkRPW7YL3Dcjs.isTableEnabled; exports.isTrackChangesEnabled = _chunkCCKP4XANcjs.isTrackChangesEnabled; exports.isValidStyleId = _chunkF652BKMScjs.isValidStyleId; exports.markAgentChanges = _chunkRPW7YL3Dcjs.markAgentChanges; exports.navigateToHeading = _chunkRWML7TWGcjs.navigateToHeading; exports.normalizeSparklineValues = _chunkRPW7YL3Dcjs.normalizeSparklineValues; exports.normalizeTableCellAlignment = _chunkRPW7YL3Dcjs.normalizeTableCellAlignment; exports.normalizeTableCellColor = _chunkRPW7YL3Dcjs.normalizeTableCellColor; exports.outermostTableDepth = _chunkRPW7YL3Dcjs.outermostTableDepth; exports.outlinePluginKey = _chunkRWML7TWGcjs.outlinePluginKey; exports.paragraphStylesPluginKey = _chunkRWML7TWGcjs.paragraphStylesPluginKey; exports.parseReplacement = _chunkRPW7YL3Dcjs.parseReplacement; exports.removeImageNode = _chunkRWML7TWGcjs.removeImageNode; exports.replaceWithTextTransaction = _chunkRPW7YL3Dcjs.replaceWithTextTransaction; exports.resolveTrackedChanges = _chunkCCKP4XANcjs.resolveTrackedChanges; exports.richClipboardPluginKey = _chunkRWML7TWGcjs.richClipboardPluginKey; exports.runTableAction = _chunkRPW7YL3Dcjs.runTableAction; exports.safeCSSValue = _chunkF652BKMScjs.safeCSSValue; exports.searchDocument = _chunkRPW7YL3Dcjs.searchDocument; exports.setAgentCaret = _chunkRPW7YL3Dcjs.setAgentCaret; exports.setMentionRoleAt = _chunkRWML7TWGcjs.setMentionRoleAt; exports.shouldShowTableBubbleMenu = _chunkRPW7YL3Dcjs.shouldShowTableBubbleMenu; exports.sliceContainsTable = _chunkRPW7YL3Dcjs.sliceContainsTable; exports.smartQuoteRules = _chunkRWML7TWGcjs.smartQuoteRules; exports.smilieAutocorrectRules = _chunkRWML7TWGcjs.smilieAutocorrectRules; exports.sparklineLabel = _chunkRPW7YL3Dcjs.sparklineLabel; exports.staticChartSvg = _chunkRPW7YL3Dcjs.staticChartSvg; exports.symbolRules = _chunkRWML7TWGcjs.symbolRules; exports.syncFootnotes = _chunkRWML7TWGcjs.syncFootnotes; exports.tableNestingPluginKey = _chunkRPW7YL3Dcjs.tableNestingPluginKey; exports.tableOfContentsMarkdownIt = _chunkRWML7TWGcjs.tableOfContentsMarkdownIt; exports.tableOfContentsPluginKey = _chunkRWML7TWGcjs.tableOfContentsPluginKey; exports.trackChangesPluginKey = _chunkCCKP4XANcjs.trackChangesPluginKey; exports.trackedChangeLabel = _chunkCCKP4XANcjs.trackedChangeLabel; exports.twoInitialCapitalsRules = _chunkRWML7TWGcjs.twoInitialCapitalsRules; exports.typeAgentText = _chunkRPW7YL3Dcjs.typeAgentText; exports.unnestTables = _chunkRPW7YL3Dcjs.unnestTables; exports.updateImageSrc = _chunkRWML7TWGcjs.updateImageSrc; exports.validateFindPattern = _chunkRWML7TWGcjs.validateFindPattern; exports.writeRichClipboard = _chunkRWML7TWGcjs.writeRichClipboard;
|
package/dist/extensions/index.js
CHANGED
|
@@ -95,7 +95,7 @@ import {
|
|
|
95
95
|
updateImageSrc,
|
|
96
96
|
validateFindPattern,
|
|
97
97
|
writeRichClipboard
|
|
98
|
-
} from "../chunk-
|
|
98
|
+
} from "../chunk-UOJS6PUP.js";
|
|
99
99
|
import "../chunk-4LGWAJDI.js";
|
|
100
100
|
import {
|
|
101
101
|
DEFAULT_STYLES,
|
|
@@ -171,7 +171,7 @@ import {
|
|
|
171
171
|
tableNestingPluginKey,
|
|
172
172
|
typeAgentText,
|
|
173
173
|
unnestTables
|
|
174
|
-
} from "../chunk-
|
|
174
|
+
} from "../chunk-5G3KYRER.js";
|
|
175
175
|
import "../chunk-KI2VBONS.js";
|
|
176
176
|
import "../chunk-YM75DN54.js";
|
|
177
177
|
import "../chunk-RN767PO6.js";
|
|
@@ -428,7 +428,10 @@ function createGenerationToolProvider(options) {
|
|
|
428
428
|
};
|
|
429
429
|
return {
|
|
430
430
|
id: _nullishCoalesce(options.id, () => ( "generation")),
|
|
431
|
-
...options.namespace ? { namespace: options.namespace } : {},
|
|
431
|
+
...options.namespace !== void 0 ? { namespace: options.namespace } : {},
|
|
432
|
+
title: "Media generation",
|
|
433
|
+
description: "Plan, estimate and run paid media generation (images, video, audio, vectors) with the configured models.",
|
|
434
|
+
skill: "pixerate-generation",
|
|
432
435
|
tools,
|
|
433
436
|
...options.subscribe ? { subscribe: options.subscribe } : {},
|
|
434
437
|
clearIdempotencyKeys(key) {
|
|
@@ -1147,6 +1150,9 @@ function createGenerationHistoryToolProvider(options) {
|
|
|
1147
1150
|
return {
|
|
1148
1151
|
id: _nullishCoalesce(options.id, () => ( "generation-history")),
|
|
1149
1152
|
namespace: options.namespace,
|
|
1153
|
+
title: "Generation history",
|
|
1154
|
+
description: "Past media generations: list and inspect them, recreate one or make variations.",
|
|
1155
|
+
skill: "pixerate-generation",
|
|
1150
1156
|
tools: [listGenerations, getGeneration, recreate, vary],
|
|
1151
1157
|
subscribe: (notify) => store.subscribe(notify)
|
|
1152
1158
|
};
|
package/dist/generation/index.js
CHANGED
|
@@ -428,7 +428,10 @@ function createGenerationToolProvider(options) {
|
|
|
428
428
|
};
|
|
429
429
|
return {
|
|
430
430
|
id: options.id ?? "generation",
|
|
431
|
-
...options.namespace ? { namespace: options.namespace } : {},
|
|
431
|
+
...options.namespace !== void 0 ? { namespace: options.namespace } : {},
|
|
432
|
+
title: "Media generation",
|
|
433
|
+
description: "Plan, estimate and run paid media generation (images, video, audio, vectors) with the configured models.",
|
|
434
|
+
skill: "pixerate-generation",
|
|
432
435
|
tools,
|
|
433
436
|
...options.subscribe ? { subscribe: options.subscribe } : {},
|
|
434
437
|
clearIdempotencyKeys(key) {
|
|
@@ -1147,6 +1150,9 @@ function createGenerationHistoryToolProvider(options) {
|
|
|
1147
1150
|
return {
|
|
1148
1151
|
id: options.id ?? "generation-history",
|
|
1149
1152
|
namespace: options.namespace,
|
|
1153
|
+
title: "Generation history",
|
|
1154
|
+
description: "Past media generations: list and inspect them, recreate one or make variations.",
|
|
1155
|
+
skill: "pixerate-generation",
|
|
1150
1156
|
tools: [listGenerations, getGeneration, recreate, vary],
|
|
1151
1157
|
subscribe: (notify) => store.subscribe(notify)
|
|
1152
1158
|
};
|
|
@@ -375,7 +375,7 @@ var _chunkUCRL6JEVcjs = require('../chunk-UCRL6JEV.cjs');
|
|
|
375
375
|
var _chunkPY4GWSE2cjs = require('../chunk-PY4GWSE2.cjs');
|
|
376
376
|
|
|
377
377
|
|
|
378
|
-
var
|
|
378
|
+
var _chunkN2FGYZ4Qcjs = require('../chunk-N2FGYZ4Q.cjs');
|
|
379
379
|
|
|
380
380
|
|
|
381
381
|
|
|
@@ -633,7 +633,7 @@ require('../chunk-NM3G4VQT.cjs');
|
|
|
633
633
|
|
|
634
634
|
|
|
635
635
|
|
|
636
|
-
var
|
|
636
|
+
var _chunkRUZQMYXHcjs = require('../chunk-RUZQMYXH.cjs');
|
|
637
637
|
require('../chunk-WOFXZ3XU.cjs');
|
|
638
638
|
|
|
639
639
|
|
|
@@ -2835,7 +2835,7 @@ function checkImageEffectPlace(d, place) {
|
|
|
2835
2835
|
const allowed = IMAGE_EFFECT_PLACES[place];
|
|
2836
2836
|
if (d.kind === "motion" || !d.uses.some((u) => allowed.includes(u))) {
|
|
2837
2837
|
const instead = place === "filter" && d.uses.some((u) => IMAGE_EFFECT_PLACES.layer.includes(u)) ? "; add it as an effect layer with add_effect_layer instead" : place === "layer" && d.uses.includes("filter") ? "; apply it to a layer as a smart filter with apply_effect instead" : "";
|
|
2838
|
-
throw new (0,
|
|
2838
|
+
throw new (0, _chunkRUZQMYXHcjs.EffectUnsupportedError)(
|
|
2839
2839
|
`"${d.id}" (${d.name}) is a ${d.uses.join(" / ")} effect, and ${place === "filter" ? "a smart filter takes filter effects" : "an effect layer takes generator, overlay or title effects"}${instead}.`,
|
|
2840
2840
|
d.id
|
|
2841
2841
|
);
|
|
@@ -2859,9 +2859,9 @@ function effectPixelsToSurface(p, depth) {
|
|
|
2859
2859
|
const d = new Uint16Array(f.length);
|
|
2860
2860
|
const code = (v) => v > 0 ? v < 1 ? Math.round(v * 65535) : 65535 : 0;
|
|
2861
2861
|
for (let i = 0; i < f.length; i += 4) {
|
|
2862
|
-
d[i] = code(
|
|
2863
|
-
d[i + 1] = code(
|
|
2864
|
-
d[i + 2] = code(
|
|
2862
|
+
d[i] = code(_chunkRUZQMYXHcjs.linearToSrgb.call(void 0, f[i]));
|
|
2863
|
+
d[i + 1] = code(_chunkRUZQMYXHcjs.linearToSrgb.call(void 0, f[i + 1]));
|
|
2864
|
+
d[i + 2] = code(_chunkRUZQMYXHcjs.linearToSrgb.call(void 0, f[i + 2]));
|
|
2865
2865
|
d[i + 3] = code(f[i + 3]);
|
|
2866
2866
|
}
|
|
2867
2867
|
return _chunkCWM3CUUXcjs.surfaceFromDeepPixels.call(void 0, { width: p.width, height: p.height, data: d }, 4);
|
|
@@ -2878,7 +2878,7 @@ var ImageEffectsEngine = (_class4 = class {
|
|
|
2878
2878
|
__init31() {this.generation = 0}
|
|
2879
2879
|
|
|
2880
2880
|
constructor(options = {}) {;_class4.prototype.__init26.call(this);_class4.prototype.__init27.call(this);_class4.prototype.__init28.call(this);_class4.prototype.__init29.call(this);_class4.prototype.__init30.call(this);_class4.prototype.__init31.call(this);
|
|
2881
|
-
this.slot = _nullishCoalesce(options.slot, () => ( new (0,
|
|
2881
|
+
this.slot = _nullishCoalesce(options.slot, () => ( new (0, _chunkRUZQMYXHcjs.EffectsSlot)()));
|
|
2882
2882
|
this.maxEntries = _nullishCoalesce(options.maxEntries, () => ( 24));
|
|
2883
2883
|
this.pool = new (0, _chunkPY4GWSE2cjs.EffectRendererPool)({ maxRenderers: options.maxRenderers });
|
|
2884
2884
|
this.detach = this.slot.subscribe(() => {
|
|
@@ -2938,7 +2938,7 @@ var ImageEffectsEngine = (_class4 = class {
|
|
|
2938
2938
|
const provider = this.slot.require();
|
|
2939
2939
|
const depth = _nullishCoalesce(size.depth, () => ( 8));
|
|
2940
2940
|
const out = await this.render(provider, effect, size.width, size.height, depth, { time: _nullishCoalesce(size.time, () => ( 0)), values });
|
|
2941
|
-
return out.width === size.width && out.height === size.height ? out :
|
|
2941
|
+
return out.width === size.width && out.height === size.height ? out : _chunkRUZQMYXHcjs.createEffectPixels.call(void 0, size.width, size.height);
|
|
2942
2942
|
}
|
|
2943
2943
|
/** Why the result for `key` failed, if it did. */
|
|
2944
2944
|
failure(key) {
|
|
@@ -4151,7 +4151,7 @@ var ImageEditorController = (_class7 = class {
|
|
|
4151
4151
|
/** For `compositePixels` and mask evaluation (the renderer keeps its own for the viewport). */
|
|
4152
4152
|
__init64() {this.compositor = new (0, _chunkV4GUQCDZcjs.LayerCompositor)()}
|
|
4153
4153
|
/** The effects provider slot (see `setEffectsProvider`). */
|
|
4154
|
-
__init65() {this.effects = new (0,
|
|
4154
|
+
__init65() {this.effects = new (0, _chunkRUZQMYXHcjs.EffectsSlot)()}
|
|
4155
4155
|
/** Renders provider effects: effect smart filter results and effect layers. */
|
|
4156
4156
|
__init66() {this.effectsEngine = new ImageEffectsEngine({ slot: this.effects })}
|
|
4157
4157
|
__init67() {this.effectRefresh = "none"}
|
|
@@ -4376,7 +4376,7 @@ var ImageEditorController = (_class7 = class {
|
|
|
4376
4376
|
*/
|
|
4377
4377
|
async applyEffectFilter(layerId, effect, options = {}) {
|
|
4378
4378
|
const d = await this.describeEffect(effect, "filter");
|
|
4379
|
-
const values =
|
|
4379
|
+
const values = _chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, d, options.values);
|
|
4380
4380
|
const found = _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, layerId);
|
|
4381
4381
|
if (!found) throw new (0, _chunkV4GUQCDZcjs.LayerOperationError)(`There is no layer "${layerId}"; call list_layers for the layer ids.`);
|
|
4382
4382
|
let layers = this.state.layers;
|
|
@@ -4414,7 +4414,7 @@ var ImageEditorController = (_class7 = class {
|
|
|
4414
4414
|
else if (k in d.controls.properties) base[k] = d.defaults[k];
|
|
4415
4415
|
else throw new (0, _chunkV4GUQCDZcjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
|
|
4416
4416
|
}
|
|
4417
|
-
update.values = { ...base, ...
|
|
4417
|
+
update.values = { ...base, ..._chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
|
|
4418
4418
|
}
|
|
4419
4419
|
for (const k of ["enabled", "blend", "opacity"]) if (changes[k] !== void 0) update[k] = changes[k];
|
|
4420
4420
|
let res = _chunkV4GUQCDZcjs.updateSmartFilter.call(void 0, this.state.layers, layerId, filterId, update, this.canvasSize);
|
|
@@ -4429,7 +4429,7 @@ var ImageEditorController = (_class7 = class {
|
|
|
4429
4429
|
*/
|
|
4430
4430
|
async addEffectLayer(effect, options = {}) {
|
|
4431
4431
|
const d = await this.describeEffect(effect, "layer");
|
|
4432
|
-
const values =
|
|
4432
|
+
const values = _chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, d, options.values);
|
|
4433
4433
|
const { width, height } = this.naturalSize;
|
|
4434
4434
|
const pixels = await this.effectsEngine.renderLayer(d.id, values, { width, height, depth: this.bitDepth, time: options.time });
|
|
4435
4435
|
const blend = _chunkV4GUQCDZcjs.parseBlend.call(void 0, options.blend);
|
|
@@ -4472,7 +4472,7 @@ var ImageEditorController = (_class7 = class {
|
|
|
4472
4472
|
else if (k in d.controls.properties) base[k] = d.defaults[k];
|
|
4473
4473
|
else throw new (0, _chunkV4GUQCDZcjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
|
|
4474
4474
|
}
|
|
4475
|
-
const values = { ...base, ...
|
|
4475
|
+
const values = { ...base, ..._chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
|
|
4476
4476
|
const time = _nullishCoalesce(_nullishCoalesce(changes.time, () => ( g.time)), () => ( 0));
|
|
4477
4477
|
const { width, height } = this.naturalSize;
|
|
4478
4478
|
const pixels = await this.effectsEngine.renderLayer(d.id, values, { width, height, depth: this.bitDepth, time });
|
|
@@ -13161,13 +13161,16 @@ function createImageEditorToolProvider(controller, options = {}) {
|
|
|
13161
13161
|
return {
|
|
13162
13162
|
id: _nullishCoalesce(options.id, () => ( "image-editor")),
|
|
13163
13163
|
namespace: options.namespace,
|
|
13164
|
+
title: "Image editor",
|
|
13165
|
+
description: "Layered raster image editing: layers and groups, adjustments and adjustment layers, selections and masks, retouching, painting, shapes and type, transforms, colour management, PSD import and export.",
|
|
13166
|
+
skill: "pixerate-image-editor",
|
|
13164
13167
|
tools: [
|
|
13165
13168
|
getAdjustments,
|
|
13166
13169
|
listControls,
|
|
13167
13170
|
setAdjustments,
|
|
13168
13171
|
addLayer,
|
|
13169
13172
|
renderPreview,
|
|
13170
|
-
|
|
13173
|
+
_chunkN2FGYZ4Qcjs.createCaptureTool.call(void 0, createImageCaptureSurface(controller), { subject: "the image (source orientation, before crop and rotation)", defaultPadding: 0 }),
|
|
13171
13174
|
...createImageSelectionTools(controller),
|
|
13172
13175
|
...createImageEditTools(controller),
|
|
13173
13176
|
...createImageLayerTools(controller),
|
|
@@ -15011,9 +15014,12 @@ function createImageEffectsToolProvider(controller, options = {}) {
|
|
|
15011
15014
|
return { target, effect: _nullishCoalesce(effects.find((e) => e.id === instance), () => ( effects[effects.length - 1])), effects, ...extra };
|
|
15012
15015
|
};
|
|
15013
15016
|
const plainValues = (v) => v;
|
|
15014
|
-
return
|
|
15017
|
+
return _chunkRUZQMYXHcjs.createEffectToolProvider.call(void 0, {
|
|
15015
15018
|
id: _nullishCoalesce(options.id, () => ( "image-effects")),
|
|
15016
15019
|
namespace: options.namespace,
|
|
15020
|
+
title: "Image effects",
|
|
15021
|
+
description: "Provider effects (GPU filters and generators) on image layers as smart filters: search, describe, apply, update and remove them.",
|
|
15022
|
+
skill: "pixerate-image-editor",
|
|
15017
15023
|
target: { noun: "layer", id: "A layer id from list_layers." },
|
|
15018
15024
|
applyUses: ["filter"],
|
|
15019
15025
|
applyDetails: "The effect becomes a smart filter: it runs on the layer's pixels after the smart filters below it, with its own blend and opacity, under the smart filter mask, and can be changed or removed later. A pixel, shape or type layer (or a group) is converted to a smart object first, in the same undo step (one layer keeps its id; the result says converted). Generators and overlays go on their own layer through add_effect_layer.",
|