@pixerate/editor 0.148.0 → 0.150.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 +11 -5
- package/dist/agent/index.js +9 -3
- package/dist/animation/index.cjs +4 -2
- package/dist/animation/index.js +3 -1
- package/dist/animation-editor/effect-tools.d.cts +5 -0
- package/dist/animation-editor/effect-tools.d.ts +5 -0
- package/dist/animation-editor/index.cjs +4 -4
- package/dist/animation-editor/index.js +4 -4
- package/dist/animation-editor/playback.d.cts +3 -2
- package/dist/animation-editor/playback.d.ts +3 -2
- package/dist/animation-editor/tools.d.cts +5 -0
- package/dist/animation-editor/tools.d.ts +5 -0
- package/dist/chart/index.cjs +9 -9
- package/dist/chart/index.js +3 -3
- package/dist/chart/playback.d.cts +2 -2
- package/dist/chart/playback.d.ts +2 -2
- package/dist/chart/tools.d.cts +5 -0
- package/dist/chart/tools.d.ts +5 -0
- package/dist/{chunk-HUHBJWTD.js → chunk-6DXDUVSL.js} +17 -1
- package/dist/{chunk-AG2EXVCR.cjs → chunk-ERAGQL2N.cjs} +2 -2
- package/dist/{chunk-D2ENR3LB.cjs → chunk-GMWNBSBS.cjs} +36 -20
- package/dist/{chunk-SA37RU2O.js → chunk-KMU6QJB7.js} +1 -1
- package/dist/{chunk-PEEP2YR7.js → chunk-O2ANJFUF.js} +23 -1
- package/dist/{chunk-UJGAA6AK.cjs → chunk-SWTUM32H.cjs} +23 -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/image-editor/index.cjs +29 -5
- package/dist/image-editor/index.js +28 -4
- package/dist/image-editor/playback.d.cts +22 -3
- package/dist/image-editor/playback.d.ts +22 -3
- package/dist/image-editor/provider-effect-tools.d.cts +5 -0
- package/dist/image-editor/provider-effect-tools.d.ts +5 -0
- package/dist/image-editor/tools.d.cts +5 -0
- package/dist/image-editor/tools.d.ts +5 -0
- package/dist/paint-editor/effect-tools.d.cts +5 -0
- package/dist/paint-editor/effect-tools.d.ts +5 -0
- package/dist/paint-editor/index.cjs +9 -9
- package/dist/paint-editor/index.js +4 -4
- package/dist/paint-editor/playback.d.cts +2 -2
- package/dist/paint-editor/playback.d.ts +2 -2
- package/dist/paint-editor/tools.d.cts +5 -0
- package/dist/paint-editor/tools.d.ts +5 -0
- package/dist/tools/index.cjs +10 -4
- package/dist/tools/index.js +9 -3
- package/dist/tools/playback.d.cts +28 -0
- package/dist/tools/playback.d.ts +28 -0
- package/dist/tools/presence.d.cts +17 -0
- package/dist/tools/presence.d.ts +17 -0
- package/dist/video-editor/effect-tools.d.cts +5 -0
- package/dist/video-editor/effect-tools.d.ts +5 -0
- package/dist/video-editor/index.cjs +4 -4
- package/dist/video-editor/index.js +4 -4
- package/dist/video-editor/playback.d.cts +3 -2
- package/dist/video-editor/playback.d.ts +3 -2
- package/dist/video-editor/tools.d.cts +5 -0
- package/dist/video-editor/tools.d.ts +5 -0
- package/package.json +1 -1
package/dist/agent/index.cjs
CHANGED
|
@@ -19,7 +19,7 @@ require('../chunk-4EFNS2HV.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkERAGQL2Ncjs = require('../chunk-ERAGQL2N.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -55,7 +55,9 @@ var _chunkY4BWZB6Jcjs = require('../chunk-Y4BWZB6J.cjs');
|
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
var _chunkGMWNBSBScjs = require('../chunk-GMWNBSBS.cjs');
|
|
59
61
|
|
|
60
62
|
|
|
61
63
|
|
|
@@ -153,7 +155,8 @@ require('../chunk-N3KJFGXT.cjs');
|
|
|
153
155
|
|
|
154
156
|
|
|
155
157
|
|
|
156
|
-
|
|
158
|
+
|
|
159
|
+
var _chunkSWTUM32Hcjs = require('../chunk-SWTUM32H.cjs');
|
|
157
160
|
|
|
158
161
|
|
|
159
162
|
var _chunkWOFXZ3XUcjs = require('../chunk-WOFXZ3XU.cjs');
|
|
@@ -588,7 +591,7 @@ function planCanvasPlaybackSteps(steps, nodes, rectOptions) {
|
|
|
588
591
|
const node = placed.get(id);
|
|
589
592
|
if (node) placed.set(id, { ...node, position });
|
|
590
593
|
}
|
|
591
|
-
const rect =
|
|
594
|
+
const rect = _chunkGMWNBSBScjs.unionRects.call(void 0, moved.map(([id]) => rectOf(id)));
|
|
592
595
|
if (rect) after.push({ type: "move", to: centre(rect) }, { type: "focus", rect }, { type: "wait", ms: 450 });
|
|
593
596
|
break;
|
|
594
597
|
}
|
|
@@ -2249,4 +2252,7 @@ function createCanvasComponentToolProvider(controller, options = { id: "canvas-c
|
|
|
2249
2252
|
|
|
2250
2253
|
|
|
2251
2254
|
|
|
2252
|
-
|
|
2255
|
+
|
|
2256
|
+
|
|
2257
|
+
|
|
2258
|
+
exports.AgentPlayback = _chunkGMWNBSBScjs.AgentPlayback; exports.CAPTURE_EXCLUDE_SELECTOR = _chunkSVFEVKLFcjs.CAPTURE_EXCLUDE_SELECTOR; exports.CAPTURE_OVERLAY_SELECTORS = _chunkSVFEVKLFcjs.CAPTURE_OVERLAY_SELECTORS; exports.EDITOR_CANVAS_TOOLS = _chunkSVFEVKLFcjs.EDITOR_CANVAS_TOOLS; exports.EDITOR_MCP_TOOLS = _chunkSVFEVKLFcjs.EDITOR_MCP_TOOLS; exports.EDITOR_PROMPT_TOOLS = _chunkSVFEVKLFcjs.EDITOR_PROMPT_TOOLS; exports.EDIT_OPERATION_REQUIRED_ARGUMENTS = _chunkSVFEVKLFcjs.EDIT_OPERATION_REQUIRED_ARGUMENTS; exports.EXPORT_EXCLUDED_SELECTORS = _chunkSVFEVKLFcjs.EXPORT_EXCLUDED_SELECTORS; exports.JSON_RPC_ERRORS = _chunkY4BWZB6Jcjs.JSON_RPC_ERRORS; exports.MCP_PROTOCOL_VERSIONS = _chunkY4BWZB6Jcjs.MCP_PROTOCOL_VERSIONS; exports.MCP_TOOL_CANVAS_ADD_NODE = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_ADD_NODE; exports.MCP_TOOL_CANVAS_CONNECT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_CONNECT; exports.MCP_TOOL_CANVAS_HIGHLIGHT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_HIGHLIGHT; exports.MCP_TOOL_CANVAS_LAYOUT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_LAYOUT; exports.MCP_TOOL_CANVAS_REMOVE_NODES = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_REMOVE_NODES; exports.MCP_TOOL_CANVAS_SELECT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_SELECT; exports.MCP_TOOL_CANVAS_UPDATE_NODE = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_UPDATE_NODE; exports.MCP_TOOL_EDIT_CANVAS = _chunkSVFEVKLFcjs.MCP_TOOL_EDIT_CANVAS; exports.MCP_TOOL_EDIT_PROMPT = _chunkSVFEVKLFcjs.MCP_TOOL_EDIT_PROMPT; exports.MCP_TOOL_GET_EDITOR_STATE = _chunkSVFEVKLFcjs.MCP_TOOL_GET_EDITOR_STATE; exports.MCP_TOOL_PROMPT_INSERT_TEXT = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_INSERT_TEXT; exports.MCP_TOOL_PROMPT_REPLACE_RANGE = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_REPLACE_RANGE; exports.MCP_TOOL_PROMPT_SELECT = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_SELECT; exports.MCP_TOOL_PROMPT_SET_VARIABLE = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_SET_VARIABLE; exports.MCP_TOOL_VIEW_EDITOR = _chunkSVFEVKLFcjs.MCP_TOOL_VIEW_EDITOR; exports.PRESENCE_COLORS = _chunkSWTUM32Hcjs.PRESENCE_COLORS; exports.PerformanceQueue = _chunkSWTUM32Hcjs.PerformanceQueue; exports.PresenceStore = _chunkSWTUM32Hcjs.PresenceStore; exports.TOOL_BRIDGE_DEFAULT_PORT = _chunkY4BWZB6Jcjs.TOOL_BRIDGE_DEFAULT_PORT; exports.TOOL_BRIDGE_PROTOCOL = _chunkY4BWZB6Jcjs.TOOL_BRIDGE_PROTOCOL; exports.TOOL_DISCOVERY_TOOLS = _chunkY4BWZB6Jcjs.TOOL_DISCOVERY_TOOLS; exports.TOOL_NAMESPACE_SEPARATOR = _chunkY4BWZB6Jcjs.TOOL_NAMESPACE_SEPARATOR; exports.ToolRegistry = _chunkY4BWZB6Jcjs.ToolRegistry; exports.ToolRegistryError = _chunkY4BWZB6Jcjs.ToolRegistryError; exports.ToolRegistryView = _chunkY4BWZB6Jcjs.ToolRegistryView; exports.UNSAFE_JSON_KEYS = _chunk2BSBFBOAcjs.UNSAFE_JSON_KEYS; exports.baseToolName = _chunkY4BWZB6Jcjs.baseToolName; exports.captureInputSchema = _chunkN2FGYZ4Qcjs.captureInputSchema; exports.captureOutputSize = _chunkN2FGYZ4Qcjs.captureOutputSize; exports.cloneElementWithStyles = _chunkSVFEVKLFcjs.cloneElementWithStyles; exports.connectToolBridge = _chunkY4BWZB6Jcjs.connectToolBridge; exports.createAgentPlayback = _chunkGMWNBSBScjs.createAgentPlayback; exports.createCanvasComponentToolProvider = createCanvasComponentToolProvider; exports.createCaptureTool = _chunkN2FGYZ4Qcjs.createCaptureTool; exports.createCaptureToolProvider = _chunkN2FGYZ4Qcjs.createCaptureToolProvider; exports.createDocumentChartTools = createDocumentChartTools; exports.createEditorMcpToolProvider = createEditorMcpToolProvider; exports.createElementCaptureSurface = _chunkSVFEVKLFcjs.createElementCaptureSurface; exports.createInstantPresenceClock = _chunkSWTUM32Hcjs.createInstantPresenceClock; exports.createMcpServer = _chunkY4BWZB6Jcjs.createMcpServer; exports.createPlaybackToolProvider = _chunkGMWNBSBScjs.createPlaybackToolProvider; exports.createRichTextToolProvider = createRichTextToolProvider; exports.createSpreadsheetToolProvider = createSpreadsheetToolProvider; exports.createToolRegistry = _chunkY4BWZB6Jcjs.createToolRegistry; exports.derivePlaybackSteps = _chunkGMWNBSBScjs.derivePlaybackSteps; exports.elementToSvg = _chunkSVFEVKLFcjs.elementToSvg; exports.errorResult = _chunkY4BWZB6Jcjs.errorResult; exports.isUnsafeJsonKey = _chunk2BSBFBOAcjs.isUnsafeJsonKey; exports.listSkills = _chunkY4BWZB6Jcjs.listSkills; exports.locatePlaybackChrome = _chunkGMWNBSBScjs.locatePlaybackChrome; exports.normalizeSide = normalizeSide; exports.parseSkillFrontmatter = _chunkY4BWZB6Jcjs.parseSkillFrontmatter; exports.planAgentCommand = planAgentCommand; exports.planCanvasPlaybackSteps = planCanvasPlaybackSteps; exports.planCanvasToolPlayback = planCanvasToolPlayback; exports.planToolCall = planToolCall; exports.playbackRectFromClient = _chunkGMWNBSBScjs.playbackRectFromClient; exports.playbackRefsFromArgs = _chunkGMWNBSBScjs.playbackRefsFromArgs; exports.playbackRefsFromResult = _chunkGMWNBSBScjs.playbackRefsFromResult; exports.rasterizeElement = _chunkSVFEVKLFcjs.rasterizeElement; exports.readSkillFile = _chunkY4BWZB6Jcjs.readSkillFile; exports.readingTime = _chunkGMWNBSBScjs.readingTime; exports.realPresenceClock = _chunkSWTUM32Hcjs.realPresenceClock; exports.resolveCaptureRequest = _chunkN2FGYZ4Qcjs.resolveCaptureRequest; exports.runToolScript = _chunkERAGQL2Ncjs.runToolScript; exports.searchTokens = _chunkY4BWZB6Jcjs.searchTokens; exports.searchTools = _chunkY4BWZB6Jcjs.searchTools; exports.stripPrototypeKeys = _chunk2BSBFBOAcjs.stripPrototypeKeys; exports.summarize = _chunkY4BWZB6Jcjs.summarize; exports.toCapturedImageData = _chunkN2FGYZ4Qcjs.toCapturedImageData; exports.toToolResult = _chunkY4BWZB6Jcjs.toToolResult; exports.toolCallToAgentCommand = toolCallToAgentCommand; exports.toolResultError = _chunkERAGQL2Ncjs.toolResultError; exports.toolResultValue = _chunkERAGQL2Ncjs.toolResultValue; exports.toolsetInstructions = _chunkY4BWZB6Jcjs.toolsetInstructions; exports.toolsetName = _chunkY4BWZB6Jcjs.toolsetName; exports.trackPresenceDrag = _chunkSWTUM32Hcjs.trackPresenceDrag; exports.tweenPresenceCursor = _chunkSWTUM32Hcjs.tweenPresenceCursor; exports.unionCaptureRects = _chunkN2FGYZ4Qcjs.unionCaptureRects; exports.unionRects = _chunkGMWNBSBScjs.unionRects; exports.unknownToolMessage = _chunkY4BWZB6Jcjs.unknownToolMessage; exports.validateAgentCommand = validateAgentCommand; exports.validateJsonSchema = _chunkWOFXZ3XUcjs.validateJsonSchema;
|
package/dist/agent/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
runToolScript,
|
|
20
20
|
toolResultError,
|
|
21
21
|
toolResultValue
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-KMU6QJB7.js";
|
|
23
23
|
import {
|
|
24
24
|
JSON_RPC_ERRORS,
|
|
25
25
|
MCP_PROTOCOL_VERSIONS,
|
|
@@ -51,11 +51,13 @@ import {
|
|
|
51
51
|
createAgentPlayback,
|
|
52
52
|
createPlaybackToolProvider,
|
|
53
53
|
derivePlaybackSteps,
|
|
54
|
+
locatePlaybackChrome,
|
|
55
|
+
playbackRectFromClient,
|
|
54
56
|
playbackRefsFromArgs,
|
|
55
57
|
playbackRefsFromResult,
|
|
56
58
|
readingTime,
|
|
57
59
|
unionRects
|
|
58
|
-
} from "../chunk-
|
|
60
|
+
} from "../chunk-6DXDUVSL.js";
|
|
59
61
|
import {
|
|
60
62
|
CAPTURE_EXCLUDE_SELECTOR,
|
|
61
63
|
CAPTURE_OVERLAY_SELECTORS,
|
|
@@ -152,8 +154,9 @@ import {
|
|
|
152
154
|
PresenceStore,
|
|
153
155
|
createInstantPresenceClock,
|
|
154
156
|
realPresenceClock,
|
|
157
|
+
trackPresenceDrag,
|
|
155
158
|
tweenPresenceCursor
|
|
156
|
-
} from "../chunk-
|
|
159
|
+
} from "../chunk-O2ANJFUF.js";
|
|
157
160
|
import {
|
|
158
161
|
validateJsonSchema
|
|
159
162
|
} from "../chunk-V2ZCJRDM.js";
|
|
@@ -2218,12 +2221,14 @@ export {
|
|
|
2218
2221
|
errorResult,
|
|
2219
2222
|
isUnsafeJsonKey,
|
|
2220
2223
|
listSkills,
|
|
2224
|
+
locatePlaybackChrome,
|
|
2221
2225
|
normalizeSide,
|
|
2222
2226
|
parseSkillFrontmatter,
|
|
2223
2227
|
planAgentCommand,
|
|
2224
2228
|
planCanvasPlaybackSteps,
|
|
2225
2229
|
planCanvasToolPlayback,
|
|
2226
2230
|
planToolCall,
|
|
2231
|
+
playbackRectFromClient,
|
|
2227
2232
|
playbackRefsFromArgs,
|
|
2228
2233
|
playbackRefsFromResult,
|
|
2229
2234
|
rasterizeElement,
|
|
@@ -2243,6 +2248,7 @@ export {
|
|
|
2243
2248
|
toolResultValue,
|
|
2244
2249
|
toolsetInstructions,
|
|
2245
2250
|
toolsetName,
|
|
2251
|
+
trackPresenceDrag,
|
|
2246
2252
|
tweenPresenceCursor,
|
|
2247
2253
|
unionCaptureRects,
|
|
2248
2254
|
unionRects,
|
package/dist/animation/index.cjs
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
var _chunkSWTUM32Hcjs = require('../chunk-SWTUM32H.cjs');
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
|
|
@@ -100,4 +101,5 @@ require('../chunk-IPJ3TEYR.cjs');
|
|
|
100
101
|
|
|
101
102
|
|
|
102
103
|
|
|
103
|
-
|
|
104
|
+
|
|
105
|
+
exports.ANIMATION_EASING_LABELS = _chunkDWJJI6RTcjs.ANIMATION_EASING_LABELS; exports.ANIMATION_EASING_PRESETS = _chunkDWJJI6RTcjs.ANIMATION_EASING_PRESETS; exports.ANIMATION_TIME_EPSILON = _chunkSUF6WRXRcjs.ANIMATION_TIME_EPSILON; exports.AnimationPlayer = _chunkSUF6WRXRcjs.AnimationPlayer; exports.CUBIC_BEZIER_PRESETS = _chunkDWJJI6RTcjs.CUBIC_BEZIER_PRESETS; exports.MOTION_BEHAVIORS = _chunk7B5GTJXBcjs.MOTION_BEHAVIORS; exports.ManualClock = _chunkSUF6WRXRcjs.ManualClock; exports.PRESENCE_COLORS = _chunkSWTUM32Hcjs.PRESENCE_COLORS; exports.PerformanceQueue = _chunkSWTUM32Hcjs.PerformanceQueue; exports.PresenceStore = _chunkSWTUM32Hcjs.PresenceStore; exports.SPRING_PRESETS = _chunkDWJJI6RTcjs.SPRING_PRESETS; exports.behaviorProgress = _chunk7B5GTJXBcjs.behaviorProgress; exports.createAnimationPlayer = _chunkSUF6WRXRcjs.createAnimationPlayer; exports.createInstantPresenceClock = _chunkSWTUM32Hcjs.createInstantPresenceClock; exports.cubicBezierAt = _chunkDWJJI6RTcjs.cubicBezierAt; exports.easingFromInfluence = _chunkDWJJI6RTcjs.easingFromInfluence; exports.easingLabel = _chunkDWJJI6RTcjs.easingLabel; exports.easingToCss = _chunkDWJJI6RTcjs.easingToCss; exports.elasticAt = _chunkDWJJI6RTcjs.elasticAt; exports.evaluateEasing = _chunkDWJJI6RTcjs.evaluateEasing; exports.evaluateTrack = _chunkSUF6WRXRcjs.evaluateTrack; exports.formatOklab = _chunkLEUZ4FRCcjs.formatOklab; exports.fractalWiggle = _chunk7B5GTJXBcjs.fractalWiggle; exports.interpolateAnimationValue = _chunkSUF6WRXRcjs.interpolateAnimationValue; exports.isAnimationEasing = _chunkDWJJI6RTcjs.isAnimationEasing; exports.isAnimationKeyframe = _chunkSUF6WRXRcjs.isAnimationKeyframe; exports.isMotionBehavior = _chunk7B5GTJXBcjs.isMotionBehavior; exports.mixColorsOklab = _chunkLEUZ4FRCcjs.mixColorsOklab; exports.motionSeedFromId = _chunk7B5GTJXBcjs.motionSeedFromId; exports.normalizeKeyframes = _chunkSUF6WRXRcjs.normalizeKeyframes; exports.oklabToRgb = _chunkLEUZ4FRCcjs.oklabToRgb; exports.pageHidden = _chunkSUF6WRXRcjs.pageHidden; exports.parseCssEasing = _chunkDWJJI6RTcjs.parseCssEasing; exports.parseOklab = _chunkLEUZ4FRCcjs.parseOklab; exports.quinticFade = _chunk7B5GTJXBcjs.quinticFade; exports.realClock = _chunkSUF6WRXRcjs.realClock; exports.realPresenceClock = _chunkSWTUM32Hcjs.realPresenceClock; exports.resolveEasing = _chunkDWJJI6RTcjs.resolveEasing; exports.reverseCubicBezier = _chunkDWJJI6RTcjs.reverseCubicBezier; exports.rgbToOklab = _chunkLEUZ4FRCcjs.rgbToOklab; exports.springAt = _chunkDWJJI6RTcjs.springAt; exports.springSettleMs = _chunkDWJJI6RTcjs.springSettleMs; exports.trackPresenceDrag = _chunkSWTUM32Hcjs.trackPresenceDrag; exports.tweenPresenceCursor = _chunkSWTUM32Hcjs.tweenPresenceCursor; exports.wrapAnimationTime = _chunkSUF6WRXRcjs.wrapAnimationTime;
|
package/dist/animation/index.js
CHANGED
|
@@ -4,8 +4,9 @@ import {
|
|
|
4
4
|
PresenceStore,
|
|
5
5
|
createInstantPresenceClock,
|
|
6
6
|
realPresenceClock,
|
|
7
|
+
trackPresenceDrag,
|
|
7
8
|
tweenPresenceCursor
|
|
8
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-O2ANJFUF.js";
|
|
9
10
|
import {
|
|
10
11
|
MOTION_BEHAVIORS,
|
|
11
12
|
behaviorProgress,
|
|
@@ -98,6 +99,7 @@ export {
|
|
|
98
99
|
rgbToOklab,
|
|
99
100
|
springAt,
|
|
100
101
|
springSettleMs,
|
|
102
|
+
trackPresenceDrag,
|
|
101
103
|
tweenPresenceCursor,
|
|
102
104
|
wrapAnimationTime
|
|
103
105
|
};
|
|
@@ -12,6 +12,11 @@ export interface AnimationEffectsToolProviderOptions {
|
|
|
12
12
|
namespace?: string;
|
|
13
13
|
/** The scene cannot be edited: write tools are hidden. A string is the reason. */
|
|
14
14
|
readOnly?: boolean | string | (() => boolean | string);
|
|
15
|
+
/**
|
|
16
|
+
* The agent playback surface its calls are acted out on (default `animation`, where `AnimationEditor` attaches).
|
|
17
|
+
* Set it when one registry holds several editors of this kind, each attached under its own surface id.
|
|
18
|
+
*/
|
|
19
|
+
playbackSurface?: string;
|
|
15
20
|
}
|
|
16
21
|
/** The effect tools for an animation editor (see the module comment). */
|
|
17
22
|
export declare function createAnimationEffectsToolProvider(controller: AnimationEditorController, options?: AnimationEffectsToolProviderOptions): AgentToolProvider;
|
|
@@ -12,6 +12,11 @@ export interface AnimationEffectsToolProviderOptions {
|
|
|
12
12
|
namespace?: string;
|
|
13
13
|
/** The scene cannot be edited: write tools are hidden. A string is the reason. */
|
|
14
14
|
readOnly?: boolean | string | (() => boolean | string);
|
|
15
|
+
/**
|
|
16
|
+
* The agent playback surface its calls are acted out on (default `animation`, where `AnimationEditor` attaches).
|
|
17
|
+
* Set it when one registry holds several editors of this kind, each attached under its own surface id.
|
|
18
|
+
*/
|
|
19
|
+
playbackSurface?: string;
|
|
15
20
|
}
|
|
16
21
|
/** The effect tools for an animation editor (see the module comment). */
|
|
17
22
|
export declare function createAnimationEffectsToolProvider(controller: AnimationEditorController, options?: AnimationEffectsToolProviderOptions): AgentToolProvider;
|
|
@@ -4397,12 +4397,12 @@ function planAnimationToolPlayback(tool, args) {
|
|
|
4397
4397
|
for (const id of elementsOf(args)) steps.push({ type: "target", ref: { kind: "element", id } });
|
|
4398
4398
|
return steps.length ? steps : null;
|
|
4399
4399
|
}
|
|
4400
|
-
function withAnimationPlayback(provider, surface
|
|
4400
|
+
function withAnimationPlayback(provider, surface) {
|
|
4401
4401
|
const plan = (tool) => tool.plan || tool.playback !== void 0 ? tool : { ...tool, plan: (args) => planAnimationToolPlayback(tool.name, args) };
|
|
4402
4402
|
const tools = provider.tools;
|
|
4403
4403
|
return {
|
|
4404
4404
|
...provider,
|
|
4405
|
-
playbackSurface: _nullishCoalesce(provider.playbackSurface, () => (
|
|
4405
|
+
playbackSurface: _nullishCoalesce(_nullishCoalesce(surface, () => ( provider.playbackSurface)), () => ( "animation")),
|
|
4406
4406
|
tools: typeof tools === "function" ? () => tools().map(plan) : tools.map(plan)
|
|
4407
4407
|
};
|
|
4408
4408
|
}
|
|
@@ -5505,7 +5505,7 @@ function createAnimationEditorToolProvider(controller, options = {}) {
|
|
|
5505
5505
|
}
|
|
5506
5506
|
});
|
|
5507
5507
|
}
|
|
5508
|
-
});
|
|
5508
|
+
}, options.playbackSurface);
|
|
5509
5509
|
}
|
|
5510
5510
|
|
|
5511
5511
|
// src/animation-editor/instructions.ts
|
|
@@ -5928,7 +5928,7 @@ function createAnimationEffectsToolProvider(controller, options = {}) {
|
|
|
5928
5928
|
}
|
|
5929
5929
|
}
|
|
5930
5930
|
]
|
|
5931
|
-
}));
|
|
5931
|
+
}), options.playbackSurface);
|
|
5932
5932
|
}
|
|
5933
5933
|
|
|
5934
5934
|
|
|
@@ -4397,12 +4397,12 @@ function planAnimationToolPlayback(tool, args) {
|
|
|
4397
4397
|
for (const id of elementsOf(args)) steps.push({ type: "target", ref: { kind: "element", id } });
|
|
4398
4398
|
return steps.length ? steps : null;
|
|
4399
4399
|
}
|
|
4400
|
-
function withAnimationPlayback(provider, surface
|
|
4400
|
+
function withAnimationPlayback(provider, surface) {
|
|
4401
4401
|
const plan = (tool) => tool.plan || tool.playback !== void 0 ? tool : { ...tool, plan: (args) => planAnimationToolPlayback(tool.name, args) };
|
|
4402
4402
|
const tools = provider.tools;
|
|
4403
4403
|
return {
|
|
4404
4404
|
...provider,
|
|
4405
|
-
playbackSurface: provider.playbackSurface ??
|
|
4405
|
+
playbackSurface: surface ?? provider.playbackSurface ?? "animation",
|
|
4406
4406
|
tools: typeof tools === "function" ? () => tools().map(plan) : tools.map(plan)
|
|
4407
4407
|
};
|
|
4408
4408
|
}
|
|
@@ -5505,7 +5505,7 @@ function createAnimationEditorToolProvider(controller, options = {}) {
|
|
|
5505
5505
|
}
|
|
5506
5506
|
});
|
|
5507
5507
|
}
|
|
5508
|
-
});
|
|
5508
|
+
}, options.playbackSurface);
|
|
5509
5509
|
}
|
|
5510
5510
|
|
|
5511
5511
|
// src/animation-editor/instructions.ts
|
|
@@ -5928,7 +5928,7 @@ function createAnimationEffectsToolProvider(controller, options = {}) {
|
|
|
5928
5928
|
}
|
|
5929
5929
|
}
|
|
5930
5930
|
]
|
|
5931
|
-
}));
|
|
5931
|
+
}), options.playbackSurface);
|
|
5932
5932
|
}
|
|
5933
5933
|
export {
|
|
5934
5934
|
ANIMATION_EDITOR_AGENT_INSTRUCTIONS,
|
|
@@ -4,7 +4,8 @@ import type { PlaybackStep } from '../tools/playback.cjs';
|
|
|
4
4
|
export declare function planAnimationToolPlayback(tool: string, args: Record<string, any>): PlaybackStep[] | null;
|
|
5
5
|
/**
|
|
6
6
|
* Gives an animation tool provider agent playback: each tool plans its steps with
|
|
7
|
-
* `planAnimationToolPlayback` and every call plays on `surface
|
|
8
|
-
* `
|
|
7
|
+
* `planAnimationToolPlayback` and every call plays on `surface`. An explicit `surface` wins over
|
|
8
|
+
* the provider's own `playbackSurface`; with neither, it is `animation` (where `AnimationEditor`
|
|
9
|
+
* attaches itself).
|
|
9
10
|
*/
|
|
10
11
|
export declare function withAnimationPlayback(provider: AgentToolProvider, surface?: string): AgentToolProvider;
|
|
@@ -4,7 +4,8 @@ import type { PlaybackStep } from '../tools/playback.js';
|
|
|
4
4
|
export declare function planAnimationToolPlayback(tool: string, args: Record<string, any>): PlaybackStep[] | null;
|
|
5
5
|
/**
|
|
6
6
|
* Gives an animation tool provider agent playback: each tool plans its steps with
|
|
7
|
-
* `planAnimationToolPlayback` and every call plays on `surface
|
|
8
|
-
* `
|
|
7
|
+
* `planAnimationToolPlayback` and every call plays on `surface`. An explicit `surface` wins over
|
|
8
|
+
* the provider's own `playbackSurface`; with neither, it is `animation` (where `AnimationEditor`
|
|
9
|
+
* attaches itself).
|
|
9
10
|
*/
|
|
10
11
|
export declare function withAnimationPlayback(provider: AgentToolProvider, surface?: string): AgentToolProvider;
|
|
@@ -20,6 +20,11 @@ export interface AnimationEditorToolProviderOptions {
|
|
|
20
20
|
data: string;
|
|
21
21
|
mimeType: string;
|
|
22
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* The agent playback surface its calls are acted out on (default `animation`, where `AnimationEditor` attaches).
|
|
25
|
+
* Set it when one registry holds several editors of this kind, each attached under its own surface id.
|
|
26
|
+
*/
|
|
27
|
+
playbackSurface?: string;
|
|
23
28
|
}
|
|
24
29
|
/**
|
|
25
30
|
* Full JSON Schema of each command type: every field with its range, default and meaning, self-contained.
|
|
@@ -20,6 +20,11 @@ export interface AnimationEditorToolProviderOptions {
|
|
|
20
20
|
data: string;
|
|
21
21
|
mimeType: string;
|
|
22
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* The agent playback surface its calls are acted out on (default `animation`, where `AnimationEditor` attaches).
|
|
25
|
+
* Set it when one registry holds several editors of this kind, each attached under its own surface id.
|
|
26
|
+
*/
|
|
27
|
+
playbackSurface?: string;
|
|
23
28
|
}
|
|
24
29
|
/**
|
|
25
30
|
* Full JSON Schema of each command type: every field with its range, default and meaning, self-contained.
|
package/dist/chart/index.cjs
CHANGED
|
@@ -149,7 +149,7 @@ var _chunkN3KJFGXTcjs = require('../chunk-N3KJFGXT.cjs');
|
|
|
149
149
|
|
|
150
150
|
|
|
151
151
|
|
|
152
|
-
var
|
|
152
|
+
var _chunkSWTUM32Hcjs = require('../chunk-SWTUM32H.cjs');
|
|
153
153
|
|
|
154
154
|
|
|
155
155
|
var _chunkALNIFK5Gcjs = require('../chunk-ALNIFK5G.cjs');
|
|
@@ -928,11 +928,11 @@ function chartHitTest(scene, point, measure = (t, s, w = 400) => t.length * s *
|
|
|
928
928
|
}
|
|
929
929
|
|
|
930
930
|
// src/chart/presence.ts
|
|
931
|
-
var ChartPresence = class extends
|
|
931
|
+
var ChartPresence = class extends _chunkSWTUM32Hcjs.PresenceStore {
|
|
932
932
|
};
|
|
933
|
-
var CHART_PRESENCE_COLORS =
|
|
934
|
-
var realChartClock =
|
|
935
|
-
var createInstantChartClock =
|
|
933
|
+
var CHART_PRESENCE_COLORS = _chunkSWTUM32Hcjs.PRESENCE_COLORS;
|
|
934
|
+
var realChartClock = _chunkSWTUM32Hcjs.realPresenceClock;
|
|
935
|
+
var createInstantChartClock = _chunkSWTUM32Hcjs.createInstantPresenceClock;
|
|
936
936
|
function chartPointAnchor(scene, seriesId, index) {
|
|
937
937
|
const mark = scene.marks.find((m) => (m.role === "bar" || m.role === "point") && _optionalChain([m, 'access', _71 => _71.target, 'optionalAccess', _72 => _72.kind]) === "point" && m.target.seriesId === seriesId && m.target.index === index);
|
|
938
938
|
if (!mark) return null;
|
|
@@ -999,7 +999,7 @@ var ChartDirector = class {
|
|
|
999
999
|
this.presence = presence;
|
|
1000
1000
|
this.options = options;
|
|
1001
1001
|
this.clock = _nullishCoalesce(options.clock, () => ( realChartClock));
|
|
1002
|
-
this.queue = new (0,
|
|
1002
|
+
this.queue = new (0, _chunkSWTUM32Hcjs.PerformanceQueue)(presence, {
|
|
1003
1003
|
clock: this.clock,
|
|
1004
1004
|
linger: options.linger,
|
|
1005
1005
|
beginGesture: (key) => controller.beginGesture(key),
|
|
@@ -1030,7 +1030,7 @@ var ChartDirector = class {
|
|
|
1030
1030
|
return null;
|
|
1031
1031
|
}
|
|
1032
1032
|
move(id, from, to, ms, each) {
|
|
1033
|
-
return
|
|
1033
|
+
return _chunkSWTUM32Hcjs.tweenPresenceCursor.call(void 0, this.presence, this.clock, id, from, to, ms, each);
|
|
1034
1034
|
}
|
|
1035
1035
|
async performOne(id, command) {
|
|
1036
1036
|
const stale = this.stale(command);
|
|
@@ -1158,7 +1158,7 @@ function withChartPlayback(provider, options) {
|
|
|
1158
1158
|
const tools = provider.tools;
|
|
1159
1159
|
return {
|
|
1160
1160
|
...provider,
|
|
1161
|
-
playbackSurface: _nullishCoalesce(_nullishCoalesce(
|
|
1161
|
+
playbackSurface: _nullishCoalesce(_nullishCoalesce(options.surface, () => ( provider.playbackSurface)), () => ( "chart")),
|
|
1162
1162
|
tools: typeof tools === "function" ? () => tools().map(plan) : tools.map(plan)
|
|
1163
1163
|
};
|
|
1164
1164
|
}
|
|
@@ -1746,7 +1746,7 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1746
1746
|
}
|
|
1747
1747
|
});
|
|
1748
1748
|
}
|
|
1749
|
-
}, { director: !!options.director });
|
|
1749
|
+
}, { director: !!options.director, surface: options.playbackSurface });
|
|
1750
1750
|
}
|
|
1751
1751
|
|
|
1752
1752
|
// src/chart/stream.ts
|
package/dist/chart/index.js
CHANGED
|
@@ -149,7 +149,7 @@ import {
|
|
|
149
149
|
createInstantPresenceClock,
|
|
150
150
|
realPresenceClock,
|
|
151
151
|
tweenPresenceCursor
|
|
152
|
-
} from "../chunk-
|
|
152
|
+
} from "../chunk-O2ANJFUF.js";
|
|
153
153
|
import {
|
|
154
154
|
readZip
|
|
155
155
|
} from "../chunk-CIQIM2IP.js";
|
|
@@ -1158,7 +1158,7 @@ function withChartPlayback(provider, options) {
|
|
|
1158
1158
|
const tools = provider.tools;
|
|
1159
1159
|
return {
|
|
1160
1160
|
...provider,
|
|
1161
|
-
playbackSurface:
|
|
1161
|
+
playbackSurface: options.surface ?? provider.playbackSurface ?? "chart",
|
|
1162
1162
|
tools: typeof tools === "function" ? () => tools().map(plan) : tools.map(plan)
|
|
1163
1163
|
};
|
|
1164
1164
|
}
|
|
@@ -1746,7 +1746,7 @@ function createChartToolProvider(controller, options = {}) {
|
|
|
1746
1746
|
}
|
|
1747
1747
|
});
|
|
1748
1748
|
}
|
|
1749
|
-
}, { director: !!options.director });
|
|
1749
|
+
}, { director: !!options.director, surface: options.playbackSurface });
|
|
1750
1750
|
}
|
|
1751
1751
|
|
|
1752
1752
|
// src/chart/stream.ts
|
|
@@ -13,8 +13,8 @@ export declare function locateChartPoint(spec: ChartSpec, scene: ChartScene, ref
|
|
|
13
13
|
/** The cursor steps for one chart tool call (by bare name), or null to fall back to the ids it names. */
|
|
14
14
|
export declare function planChartToolPlayback(tool: string, args: Record<string, any>): PlaybackStep[] | null;
|
|
15
15
|
/**
|
|
16
|
-
* Gives a chart tool provider agent playback on `surface
|
|
17
|
-
* attaches). With a director, value changes and selections play through it (`playback: 'self'`).
|
|
16
|
+
* Gives a chart tool provider agent playback on `surface`. An explicit `surface` wins over the
|
|
17
|
+
* provider's own `playbackSurface`; with neither, it is `chart` (where `ChartEditor` attaches). With a director, value changes and selections play through it (`playback: 'self'`).
|
|
18
18
|
*/
|
|
19
19
|
export declare function withChartPlayback(provider: AgentToolProvider, options: {
|
|
20
20
|
director: boolean;
|
package/dist/chart/playback.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ export declare function locateChartPoint(spec: ChartSpec, scene: ChartScene, ref
|
|
|
13
13
|
/** The cursor steps for one chart tool call (by bare name), or null to fall back to the ids it names. */
|
|
14
14
|
export declare function planChartToolPlayback(tool: string, args: Record<string, any>): PlaybackStep[] | null;
|
|
15
15
|
/**
|
|
16
|
-
* Gives a chart tool provider agent playback on `surface
|
|
17
|
-
* attaches). With a director, value changes and selections play through it (`playback: 'self'`).
|
|
16
|
+
* Gives a chart tool provider agent playback on `surface`. An explicit `surface` wins over the
|
|
17
|
+
* provider's own `playbackSurface`; with neither, it is `chart` (where `ChartEditor` attaches). With a director, value changes and selections play through it (`playback: 'self'`).
|
|
18
18
|
*/
|
|
19
19
|
export declare function withChartPlayback(provider: AgentToolProvider, options: {
|
|
20
20
|
director: boolean;
|
package/dist/chart/tools.d.cts
CHANGED
|
@@ -39,6 +39,11 @@ export interface ChartToolProviderOptions {
|
|
|
39
39
|
data: string;
|
|
40
40
|
mimeType: string;
|
|
41
41
|
};
|
|
42
|
+
/**
|
|
43
|
+
* The agent playback surface its calls are acted out on (default `chart`, where `ChartEditor` attaches).
|
|
44
|
+
* Set it when one registry holds several editors of this kind, each attached under its own surface id.
|
|
45
|
+
*/
|
|
46
|
+
playbackSurface?: string;
|
|
42
47
|
}
|
|
43
48
|
/**
|
|
44
49
|
* When to look at the chart, for `render_chart`'s description (after vectorcraft's
|
package/dist/chart/tools.d.ts
CHANGED
|
@@ -39,6 +39,11 @@ export interface ChartToolProviderOptions {
|
|
|
39
39
|
data: string;
|
|
40
40
|
mimeType: string;
|
|
41
41
|
};
|
|
42
|
+
/**
|
|
43
|
+
* The agent playback surface its calls are acted out on (default `chart`, where `ChartEditor` attaches).
|
|
44
|
+
* Set it when one registry holds several editors of this kind, each attached under its own surface id.
|
|
45
|
+
*/
|
|
46
|
+
playbackSurface?: string;
|
|
42
47
|
}
|
|
43
48
|
/**
|
|
44
49
|
* When to look at the chart, for `render_chart`'s description (after vectorcraft's
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PRESENCE_COLORS,
|
|
3
3
|
realPresenceClock
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-O2ANJFUF.js";
|
|
5
5
|
|
|
6
6
|
// src/tools/playback.ts
|
|
7
7
|
var ARG_KINDS = {
|
|
@@ -80,6 +80,20 @@ function unionRects(rects) {
|
|
|
80
80
|
const y = Math.min(...list.map((r) => r.y));
|
|
81
81
|
return { x, y, width: Math.max(...list.map((r) => r.x + r.width)) - x, height: Math.max(...list.map((r) => r.y + r.height)) - y };
|
|
82
82
|
}
|
|
83
|
+
function playbackRectFromClient(rect, fromViewport) {
|
|
84
|
+
if (!rect || !(rect.width > 0) || !(rect.height > 0)) return null;
|
|
85
|
+
const map = fromViewport ?? ((p) => p);
|
|
86
|
+
const a = map({ x: rect.left, y: rect.top });
|
|
87
|
+
const b = map({ x: rect.left + rect.width, y: rect.top + rect.height });
|
|
88
|
+
return { x: Math.min(a.x, b.x), y: Math.min(a.y, b.y), width: Math.abs(b.x - a.x), height: Math.abs(b.y - a.y) };
|
|
89
|
+
}
|
|
90
|
+
function locatePlaybackChrome(ref, chrome, fromViewport) {
|
|
91
|
+
if (!chrome) return null;
|
|
92
|
+
const own = chrome.locate?.(ref);
|
|
93
|
+
if (own) return own;
|
|
94
|
+
const el = chrome.locateElement?.(ref);
|
|
95
|
+
return el ? playbackRectFromClient(el.getBoundingClientRect(), fromViewport) : null;
|
|
96
|
+
}
|
|
83
97
|
function normalizePlan(plan) {
|
|
84
98
|
if (!plan) return null;
|
|
85
99
|
if (Array.isArray(plan)) return plan.length ? { steps: plan } : null;
|
|
@@ -441,6 +455,8 @@ export {
|
|
|
441
455
|
derivePlaybackSteps,
|
|
442
456
|
readingTime,
|
|
443
457
|
unionRects,
|
|
458
|
+
playbackRectFromClient,
|
|
459
|
+
locatePlaybackChrome,
|
|
444
460
|
AgentPlayback,
|
|
445
461
|
createAgentPlayback,
|
|
446
462
|
createPlaybackToolProvider
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkGMWNBSBScjs = require('./chunk-GMWNBSBS.cjs');
|
|
4
4
|
|
|
5
5
|
// src/tools/script.ts
|
|
6
6
|
function toolResultValue(result) {
|
|
@@ -36,7 +36,7 @@ async function runToolScript(source, script, options = {}) {
|
|
|
36
36
|
if (step.say) {
|
|
37
37
|
emit({ type: "say", step: i, text: step.say });
|
|
38
38
|
_optionalChain([options, 'access', _6 => _6.playback, 'optionalAccess', _7 => _7.say, 'call', _8 => _8(step.say, options.actor ? { actor: options.actor } : {})]);
|
|
39
|
-
await pause(
|
|
39
|
+
await pause(_chunkGMWNBSBScjs.readingTime.call(void 0, step.say));
|
|
40
40
|
}
|
|
41
41
|
if (!step.tool) continue;
|
|
42
42
|
if (control.stopped) return finish(false);
|