@pixerate/editor 0.180.0 → 0.182.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.cjs +39 -39
- package/dist/agent/index.js +8 -8
- package/dist/animation/index.cjs +2 -2
- package/dist/animation/index.js +1 -1
- package/dist/canvas/index.cjs +6 -6
- package/dist/canvas/index.js +2 -2
- package/dist/chart/index.cjs +169 -164
- package/dist/chart/index.d.cts +1 -0
- package/dist/chart/index.d.ts +1 -0
- package/dist/chart/index.js +13 -8
- package/dist/chart/layout-streamgraph.d.cts +15 -0
- package/dist/chart/layout-streamgraph.d.ts +15 -0
- package/dist/chart/spec.d.cts +1 -1
- package/dist/chart/spec.d.ts +1 -1
- package/dist/chart/types.d.cts +2 -1
- package/dist/chart/types.d.ts +2 -1
- package/dist/{chunk-KPWG3PSW.js → chunk-23E5GI2U.js} +8 -2
- package/dist/{chunk-IMHRN4ZZ.js → chunk-3MO3ZS7E.js} +3 -3
- package/dist/{chunk-5EMS4BZG.cjs → chunk-3SLBXKAW.cjs} +15 -7
- package/dist/{chunk-GXEC4FS6.cjs → chunk-5DQPDXOM.cjs} +82 -76
- package/dist/{chunk-ORZF4JOO.js → chunk-6ZZKRH7R.js} +3 -1
- package/dist/{chunk-FHNGNL3V.cjs → chunk-CZBRY4SW.cjs} +51 -51
- package/dist/{chunk-WL4IN36A.js → chunk-EHTX34RE.js} +13 -5
- package/dist/{chunk-ZXTO6U7T.js → chunk-GI3AVES4.js} +1 -1
- package/dist/{chunk-34UCPHYO.js → chunk-GOBOCZZI.js} +2 -2
- package/dist/{chunk-VKHJJUBK.cjs → chunk-HUAISCUX.cjs} +22 -18
- package/dist/{chunk-O2ANJFUF.js → chunk-IVSWRVB4.js} +8 -1
- package/dist/{chunk-SWTUM32H.cjs → chunk-K7ENM55P.cjs} +8 -1
- package/dist/{chunk-OLCHKGGO.js → chunk-L6Y7TSQ4.js} +5 -1
- package/dist/{chunk-TUXKLM5W.cjs → chunk-N76AMOKE.cjs} +224 -42
- package/dist/{chunk-RLOIEDA3.cjs → chunk-O7QXVGMP.cjs} +16 -16
- package/dist/{chunk-R2VHVQVY.js → chunk-PI2UYMZY.js} +3 -3
- package/dist/{chunk-E45AIIWY.cjs → chunk-RUONPPMC.cjs} +8 -8
- package/dist/{chunk-GTF4RYXJ.cjs → chunk-SOSBOS5T.cjs} +22 -22
- package/dist/{chunk-NJGFSOPP.cjs → chunk-U4QN36YT.cjs} +2 -2
- package/dist/{chunk-FKYGM35R.js → chunk-UFEDHACQ.js} +2 -2
- package/dist/{chunk-OJQVKJYD.js → chunk-WKMUBATU.js} +183 -1
- package/dist/{chunk-OUO3DSRT.cjs → chunk-WRZ6C4TU.cjs} +3 -1
- package/dist/commands/index.cjs +3 -3
- package/dist/commands/index.js +2 -2
- package/dist/diagram/index.cjs +7 -7
- package/dist/diagram/index.js +1 -1
- package/dist/export/index.cjs +4 -4
- package/dist/export/index.js +3 -3
- package/dist/extensions/index.cjs +7 -7
- package/dist/extensions/index.js +6 -6
- package/dist/image-editor/controller.d.cts +2 -0
- package/dist/image-editor/controller.d.ts +2 -0
- package/dist/image-editor/index.cjs +135 -115
- package/dist/image-editor/index.js +28 -8
- package/dist/image-editor/playback.d.cts +14 -4
- package/dist/image-editor/playback.d.ts +14 -4
- package/dist/image-editor/selection/segmentation.d.cts +3 -0
- package/dist/image-editor/selection/segmentation.d.ts +3 -0
- package/dist/index.cjs +13 -13
- package/dist/index.js +7 -7
- package/dist/paint-editor/index.cjs +6 -6
- package/dist/paint-editor/index.js +1 -1
- package/dist/tools/index.cjs +4 -4
- package/dist/tools/index.js +3 -3
- package/dist/tools/playback.d.cts +4 -1
- package/dist/tools/playback.d.ts +4 -1
- package/dist/tools/presence.d.cts +15 -3
- package/dist/tools/presence.d.ts +15 -3
- package/dist/tools/registry.d.cts +7 -1
- package/dist/tools/registry.d.ts +7 -1
- package/package.json +1 -1
package/dist/tools/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
runToolScript,
|
|
9
9
|
toolResultError,
|
|
10
10
|
toolResultValue
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-GI3AVES4.js";
|
|
12
12
|
import {
|
|
13
13
|
JSON_RPC_ERRORS,
|
|
14
14
|
MCP_PROTOCOL_VERSIONS,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
playbackRefsFromResult,
|
|
47
47
|
readingTime,
|
|
48
48
|
unionRects
|
|
49
|
-
} from "../chunk-
|
|
49
|
+
} from "../chunk-EHTX34RE.js";
|
|
50
50
|
import {
|
|
51
51
|
CAPTURE_EXCLUDE_SELECTOR,
|
|
52
52
|
CAPTURE_OVERLAY_SELECTORS,
|
|
@@ -92,7 +92,7 @@ import {
|
|
|
92
92
|
realPresenceClock,
|
|
93
93
|
trackPresenceDrag,
|
|
94
94
|
tweenPresenceCursor
|
|
95
|
-
} from "../chunk-
|
|
95
|
+
} from "../chunk-IVSWRVB4.js";
|
|
96
96
|
import {
|
|
97
97
|
validateJsonSchema
|
|
98
98
|
} from "../chunk-V2ZCJRDM.js";
|
|
@@ -36,8 +36,11 @@ export type PlaybackStep = {
|
|
|
36
36
|
type: 'say';
|
|
37
37
|
text: string;
|
|
38
38
|
ms?: number;
|
|
39
|
-
}
|
|
39
|
+
}
|
|
40
|
+
/** Button down. `gesture: 'path'` tells the surface the drag that follows traces an outline (a lasso), not a box. */
|
|
41
|
+
| {
|
|
40
42
|
type: 'press';
|
|
43
|
+
gesture?: 'path';
|
|
41
44
|
} | {
|
|
42
45
|
type: 'release';
|
|
43
46
|
}
|
package/dist/tools/playback.d.ts
CHANGED
|
@@ -36,8 +36,11 @@ export type PlaybackStep = {
|
|
|
36
36
|
type: 'say';
|
|
37
37
|
text: string;
|
|
38
38
|
ms?: number;
|
|
39
|
-
}
|
|
39
|
+
}
|
|
40
|
+
/** Button down. `gesture: 'path'` tells the surface the drag that follows traces an outline (a lasso), not a box. */
|
|
41
|
+
| {
|
|
40
42
|
type: 'press';
|
|
43
|
+
gesture?: 'path';
|
|
41
44
|
} | {
|
|
42
45
|
type: 'release';
|
|
43
46
|
}
|
|
@@ -7,6 +7,8 @@ export interface PresenceActor {
|
|
|
7
7
|
y: number;
|
|
8
8
|
/** The button is down (dragging). */
|
|
9
9
|
pressed: boolean;
|
|
10
|
+
/** What a drag traces while `pressed`: `path` for a freehand outline (a lasso), else a box from the press. */
|
|
11
|
+
gesture?: 'path';
|
|
10
12
|
/** A short note shown next to the cursor (what the agent is doing). */
|
|
11
13
|
message?: string;
|
|
12
14
|
/** A rectangle (surface coordinates) the agent is working on, drawn as a highlight ring. */
|
|
@@ -87,13 +89,23 @@ export interface PresenceDragBox {
|
|
|
87
89
|
width: number;
|
|
88
90
|
height: number;
|
|
89
91
|
}
|
|
92
|
+
/** An agent's drag so far: the box from the press to the cursor, and the points it passed through. */
|
|
93
|
+
export interface PresenceDrag extends PresenceDragBox {
|
|
94
|
+
/** The cursor positions since the press, in order (the press first). */
|
|
95
|
+
path: readonly {
|
|
96
|
+
x: number;
|
|
97
|
+
y: number;
|
|
98
|
+
}[];
|
|
99
|
+
/** `path` when the agent traces an outline (see `PresenceActor.gesture`); a box drag otherwise. */
|
|
100
|
+
gesture?: 'path';
|
|
101
|
+
}
|
|
90
102
|
/**
|
|
91
103
|
* Follows a presence store for an agent's drag (press, move, release) and reports the box from
|
|
92
|
-
* the press to the cursor, so a surface can draw its own drag feedback (a crop
|
|
93
|
-
* being pulled out) under the agent's cursor. `onEnd` runs on release, or when the cursor leaves
|
|
104
|
+
* the press to the cursor and the path it took, so a surface can draw its own drag feedback (a crop
|
|
105
|
+
* box, a marquee being pulled out or a lasso being traced) under the agent's cursor. `onEnd` runs on release, or when the cursor leaves
|
|
94
106
|
* the surface mid-drag. Pass the result to `PresenceStore.subscribe`.
|
|
95
107
|
*/
|
|
96
108
|
export declare function trackPresenceDrag(handlers: {
|
|
97
|
-
onDrag: (
|
|
109
|
+
onDrag: (drag: PresenceDrag) => void;
|
|
98
110
|
onEnd: () => void;
|
|
99
111
|
}): (state: PresenceState) => void;
|
package/dist/tools/presence.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export interface PresenceActor {
|
|
|
7
7
|
y: number;
|
|
8
8
|
/** The button is down (dragging). */
|
|
9
9
|
pressed: boolean;
|
|
10
|
+
/** What a drag traces while `pressed`: `path` for a freehand outline (a lasso), else a box from the press. */
|
|
11
|
+
gesture?: 'path';
|
|
10
12
|
/** A short note shown next to the cursor (what the agent is doing). */
|
|
11
13
|
message?: string;
|
|
12
14
|
/** A rectangle (surface coordinates) the agent is working on, drawn as a highlight ring. */
|
|
@@ -87,13 +89,23 @@ export interface PresenceDragBox {
|
|
|
87
89
|
width: number;
|
|
88
90
|
height: number;
|
|
89
91
|
}
|
|
92
|
+
/** An agent's drag so far: the box from the press to the cursor, and the points it passed through. */
|
|
93
|
+
export interface PresenceDrag extends PresenceDragBox {
|
|
94
|
+
/** The cursor positions since the press, in order (the press first). */
|
|
95
|
+
path: readonly {
|
|
96
|
+
x: number;
|
|
97
|
+
y: number;
|
|
98
|
+
}[];
|
|
99
|
+
/** `path` when the agent traces an outline (see `PresenceActor.gesture`); a box drag otherwise. */
|
|
100
|
+
gesture?: 'path';
|
|
101
|
+
}
|
|
90
102
|
/**
|
|
91
103
|
* Follows a presence store for an agent's drag (press, move, release) and reports the box from
|
|
92
|
-
* the press to the cursor, so a surface can draw its own drag feedback (a crop
|
|
93
|
-
* being pulled out) under the agent's cursor. `onEnd` runs on release, or when the cursor leaves
|
|
104
|
+
* the press to the cursor and the path it took, so a surface can draw its own drag feedback (a crop
|
|
105
|
+
* box, a marquee being pulled out or a lasso being traced) under the agent's cursor. `onEnd` runs on release, or when the cursor leaves
|
|
94
106
|
* the surface mid-drag. Pass the result to `PresenceStore.subscribe`.
|
|
95
107
|
*/
|
|
96
108
|
export declare function trackPresenceDrag(handlers: {
|
|
97
|
-
onDrag: (
|
|
109
|
+
onDrag: (drag: PresenceDrag) => void;
|
|
98
110
|
onEnd: () => void;
|
|
99
111
|
}): (state: PresenceState) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type JsonSchema, type SchemaValidationError } from './schema.cjs';
|
|
2
2
|
import { ToolRegistryView, type ToolViewOptions } from './view.cjs';
|
|
3
|
-
import type { ToolPlanner } from './playback.cjs';
|
|
3
|
+
import type { PlaybackStep, ToolPlanner } from './playback.cjs';
|
|
4
4
|
import type { PresenceActorInfo } from './presence.cjs';
|
|
5
5
|
/**
|
|
6
6
|
* MCP-shaped tool definition, as returned by `tools/list`.
|
|
@@ -57,6 +57,12 @@ export interface ToolCallContext {
|
|
|
57
57
|
* (`await context.stage?.()`), so they appear one by one; without playback it is absent.
|
|
58
58
|
*/
|
|
59
59
|
stage?: () => Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Set by agent playback while the handler runs: acts out cursor steps (surface coordinates) the
|
|
62
|
+
* handler only learns mid-call, such as the outline a model returned, before it lands its change.
|
|
63
|
+
* `commit`, `stage` and `open` steps are ignored. Without playback it is absent.
|
|
64
|
+
*/
|
|
65
|
+
perform?: (steps: readonly PlaybackStep[]) => Promise<void>;
|
|
60
66
|
}
|
|
61
67
|
/** Options for `callTool`. */
|
|
62
68
|
export interface ToolCallOptions {
|
package/dist/tools/registry.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type JsonSchema, type SchemaValidationError } from './schema.js';
|
|
2
2
|
import { ToolRegistryView, type ToolViewOptions } from './view.js';
|
|
3
|
-
import type { ToolPlanner } from './playback.js';
|
|
3
|
+
import type { PlaybackStep, ToolPlanner } from './playback.js';
|
|
4
4
|
import type { PresenceActorInfo } from './presence.js';
|
|
5
5
|
/**
|
|
6
6
|
* MCP-shaped tool definition, as returned by `tools/list`.
|
|
@@ -57,6 +57,12 @@ export interface ToolCallContext {
|
|
|
57
57
|
* (`await context.stage?.()`), so they appear one by one; without playback it is absent.
|
|
58
58
|
*/
|
|
59
59
|
stage?: () => Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Set by agent playback while the handler runs: acts out cursor steps (surface coordinates) the
|
|
62
|
+
* handler only learns mid-call, such as the outline a model returned, before it lands its change.
|
|
63
|
+
* `commit`, `stage` and `open` steps are ignored. Without playback it is absent.
|
|
64
|
+
*/
|
|
65
|
+
perform?: (steps: readonly PlaybackStep[]) => Promise<void>;
|
|
60
66
|
}
|
|
61
67
|
/** Options for `callTool`. */
|
|
62
68
|
export interface ToolCallOptions {
|