@pixerate/editor 0.140.3 → 0.141.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.
Files changed (85) hide show
  1. package/dist/agent/canvasPlayback.d.cts +15 -0
  2. package/dist/agent/canvasPlayback.d.ts +15 -0
  3. package/dist/agent/index.cjs +144 -23
  4. package/dist/agent/index.d.cts +1 -0
  5. package/dist/agent/index.d.ts +1 -0
  6. package/dist/agent/index.js +125 -4
  7. package/dist/agent/providers.d.cts +8 -0
  8. package/dist/agent/providers.d.ts +8 -0
  9. package/dist/agent/types.d.cts +3 -0
  10. package/dist/agent/types.d.ts +3 -0
  11. package/dist/animation/index.cjs +2 -2
  12. package/dist/animation/index.js +1 -1
  13. package/dist/animation/presence.d.cts +1 -75
  14. package/dist/animation/presence.d.ts +1 -75
  15. package/dist/animation-editor/index.cjs +55 -55
  16. package/dist/animation-editor/index.js +2 -2
  17. package/dist/bridge/cli.cjs +3 -3
  18. package/dist/bridge/cli.js +2 -2
  19. package/dist/bridge/index.cjs +3 -3
  20. package/dist/bridge/index.js +2 -2
  21. package/dist/canvas/index.cjs +336 -646
  22. package/dist/canvas/index.d.cts +1 -0
  23. package/dist/canvas/index.d.ts +1 -0
  24. package/dist/canvas/index.js +44 -354
  25. package/dist/canvas/playback.d.cts +14 -0
  26. package/dist/canvas/playback.d.ts +14 -0
  27. package/dist/chart/index.cjs +7 -7
  28. package/dist/chart/index.js +1 -1
  29. package/dist/chunk-6SFREX6H.cjs +406 -0
  30. package/dist/{chunk-XGOU44RJ.js → chunk-77SG47WT.js} +80 -9
  31. package/dist/{chunk-2SHFIVC3.js → chunk-DAS7M4RY.js} +1 -1
  32. package/dist/chunk-DW4CV5H4.js +591 -0
  33. package/dist/{chunk-UMS6YFA6.js → chunk-EAQ4BGNS.js} +1 -1
  34. package/dist/{chunk-AGCD3EHB.cjs → chunk-ENIZYNEF.cjs} +7 -7
  35. package/dist/{chunk-VSR5A22L.cjs → chunk-H6FX45CP.cjs} +35 -35
  36. package/dist/{chunk-RCUX6CT2.cjs → chunk-HRI3ZMDM.cjs} +110 -39
  37. package/dist/chunk-MFFE55CS.js +406 -0
  38. package/dist/{chunk-BSGPXPTW.js → chunk-PEEP2YR7.js} +1 -1
  39. package/dist/{chunk-RB62U6MS.js → chunk-RFBFTLVN.js} +27 -5
  40. package/dist/chunk-UBRYHNRU.cjs +591 -0
  41. package/dist/{chunk-GEY73RUW.cjs → chunk-UJGAA6AK.cjs} +1 -1
  42. package/dist/{chunk-6UZCFD7Y.js → chunk-VM6JYWXQ.js} +1 -1
  43. package/dist/{chunk-O3ZU6QIZ.cjs → chunk-XNZWATSB.cjs} +81 -81
  44. package/dist/{chunk-HDK3T2QS.cjs → chunk-Y4BWZB6J.cjs} +29 -7
  45. package/dist/commands/index.cjs +37 -1
  46. package/dist/commands/index.js +36 -0
  47. package/dist/commands/registry.d.cts +11 -0
  48. package/dist/commands/registry.d.ts +11 -0
  49. package/dist/diagram/index.cjs +7 -7
  50. package/dist/diagram/index.js +1 -1
  51. package/dist/image-editor/index.cjs +720 -628
  52. package/dist/image-editor/index.d.cts +1 -0
  53. package/dist/image-editor/index.d.ts +1 -0
  54. package/dist/image-editor/index.js +109 -17
  55. package/dist/image-editor/playback.d.cts +22 -0
  56. package/dist/image-editor/playback.d.ts +22 -0
  57. package/dist/paint-editor/index.cjs +13 -13
  58. package/dist/paint-editor/index.js +3 -3
  59. package/dist/tools/index.cjs +33 -3
  60. package/dist/tools/index.d.cts +2 -0
  61. package/dist/tools/index.d.ts +2 -0
  62. package/dist/tools/index.js +32 -2
  63. package/dist/tools/playback.d.cts +205 -0
  64. package/dist/tools/playback.d.ts +205 -0
  65. package/dist/tools/presence.d.cts +82 -0
  66. package/dist/tools/presence.d.ts +82 -0
  67. package/dist/tools/registry.d.cts +45 -6
  68. package/dist/tools/registry.d.ts +45 -6
  69. package/dist/tools/view.d.cts +2 -4
  70. package/dist/tools/view.d.ts +2 -4
  71. package/dist/vector/index.cjs +1159 -1042
  72. package/dist/vector/index.d.cts +1 -0
  73. package/dist/vector/index.d.ts +1 -0
  74. package/dist/vector/index.js +142 -25
  75. package/dist/vector/playback.d.cts +13 -0
  76. package/dist/vector/playback.d.ts +13 -0
  77. package/package.json +1 -1
  78. package/skills/pixerate-agent-tools/SKILL.md +13 -0
  79. package/skills/pixerate-canvas/SKILL.md +3 -0
  80. package/skills/pixerate-image-editor/SKILL.md +2 -2
  81. package/skills/pixerate-vector/SKILL.md +5 -0
  82. package/dist/chunk-BTZS3KZY.js +0 -221
  83. package/dist/chunk-MRD3NXKR.cjs +0 -221
  84. /package/dist/{chunk-K73HMKQP.js → chunk-PLKIYNJZ.js} +0 -0
  85. /package/dist/{chunk-LACYURUW.cjs → chunk-TNCWKC5M.cjs} +0 -0
@@ -61,3 +61,4 @@ export { rectToQuad, homographyFromPoints, applyHomography, invertHomography, ho
61
61
  export * from './layers/transform-ui.cjs';
62
62
  export * from './effects.cjs';
63
63
  export * from './provider-effect-tools.cjs';
64
+ export * from './playback.cjs';
@@ -61,3 +61,4 @@ export { rectToQuad, homographyFromPoints, applyHomography, invertHomography, ho
61
61
  export * from './layers/transform-ui.js';
62
62
  export * from './effects.js';
63
63
  export * from './provider-effect-tools.js';
64
+ export * from './playback.js';
@@ -363,7 +363,7 @@ import {
363
363
  writePsd,
364
364
  xyToTempTint,
365
365
  xyToUv
366
- } from "../chunk-6UZCFD7Y.js";
366
+ } from "../chunk-VM6JYWXQ.js";
367
367
  import {
368
368
  parseCssColor
369
369
  } from "../chunk-3CI7FRMK.js";
@@ -622,7 +622,7 @@ import {
622
622
  warpMeshParamAt,
623
623
  warpMeshRows,
624
624
  warpPresetMesh
625
- } from "../chunk-XGOU44RJ.js";
625
+ } from "../chunk-77SG47WT.js";
626
626
  import "../chunk-ORDXMBD4.js";
627
627
  import "../chunk-M6DNZNVY.js";
628
628
  import "../chunk-WEIK3UYB.js";
@@ -9221,6 +9221,93 @@ var DEPTH_MASK_CONTROLS = [
9221
9221
  }
9222
9222
  ];
9223
9223
 
9224
+ // src/image-editor/playback.ts
9225
+ var IMAGE_PLAYBACK_KIND = "layer";
9226
+ var PAINT = /^(paint_stroke|clone_stamp|heal_brush|spot_heal|dodge|burn|sponge|smudge|blur_stroke|sharpen_stroke|history_brush|set_clone_source|set_clone_transform|fill_pixels|clear_pixels|set_paint|set_retouch_options|load_mixer_brush|clean_mixer_brush)$/;
9227
+ var SELECT = /^(select_region|select_by_color|modify_selection|refine_selection|transform_selection|apply_selection_as_mask|layer_via_copy)$/;
9228
+ var ANNOTATE = /^(add_shape_layer|update_shape|add_shape_component|set_shape_component|remove_shape_component|merge_shape_components|add_text_layer|set_text|set_text_style|set_paragraph_style|set_text_frame|convert_text_to_shape)$/;
9229
+ var CROP = /^(set_crop|reset_crop|set_rotation|flip_image|transform_layer|warp_layer|flip_layer|offset_layer)$/;
9230
+ var ADJUST = /^(set_adjustments|add_adjustment_layer|update_adjustment_layer|remove_adjustment_layer|move_adjustment_layer)$/;
9231
+ function imagePlaybackPanel(tool) {
9232
+ if (ADJUST.test(tool)) return "adjust";
9233
+ if (PAINT.test(tool)) return "paint";
9234
+ if (SELECT.test(tool)) return "select";
9235
+ if (ANNOTATE.test(tool)) return "annotate";
9236
+ if (CROP.test(tool)) return "crop";
9237
+ if (/layer|effect|filter|smart|group|mask|merge|flatten|profile|colors|proof|light/.test(tool)) return "layers";
9238
+ return null;
9239
+ }
9240
+ function createImagePlaybackLocator(controller) {
9241
+ return (ref) => {
9242
+ if (ref.kind !== IMAGE_PLAYBACK_KIND && ref.kind !== "item") return null;
9243
+ const b = controller.getLayerBounds(ref.id);
9244
+ return b && b.width > 0 && b.height > 0 ? { x: b.x, y: b.y, width: b.width, height: b.height } : null;
9245
+ };
9246
+ }
9247
+ var num = (v) => typeof v === "number" && Number.isFinite(v);
9248
+ var isPoint = (p) => !!p && typeof p === "object" && num(p.x) && num(p.y);
9249
+ function trace(points, max = 32) {
9250
+ const list = points.length <= max ? points : Array.from({ length: max }, (_, i) => points[Math.round(i * (points.length - 1) / (max - 1))]);
9251
+ if (!list.length) return [];
9252
+ if (list.length === 1) return [{ type: "move", to: list[0] }, { type: "press" }, { type: "release" }];
9253
+ let total = 0;
9254
+ for (let i = 1; i < list.length; i++) total += Math.hypot(list[i].x - list[i - 1].x, list[i].y - list[i - 1].y);
9255
+ const ms = (i) => total > 0 ? Math.max(16, 900 * Math.hypot(list[i].x - list[i - 1].x, list[i].y - list[i - 1].y) / total) : 16;
9256
+ return [
9257
+ { type: "move", to: list[0] },
9258
+ { type: "press" },
9259
+ ...list.slice(1).map((to, i) => ({ type: "drag", to, ms: ms(i + 1) })),
9260
+ { type: "release" }
9261
+ ];
9262
+ }
9263
+ function boxOf(args) {
9264
+ for (const o of [args, args.shape, args.box, args.rect, args.bounds]) {
9265
+ if (!o || typeof o !== "object") continue;
9266
+ if ([o.x, o.y, o.width, o.height].every(num)) return { from: { x: o.x, y: o.y }, to: { x: o.x + o.width, y: o.y + o.height } };
9267
+ if ([o.x1, o.y1, o.x2, o.y2].every(num)) return { from: { x: o.x1, y: o.y1 }, to: { x: o.x2, y: o.y2 } };
9268
+ }
9269
+ return null;
9270
+ }
9271
+ function layersOf(args) {
9272
+ const out = [];
9273
+ const add2 = (v) => typeof v === "string" && v && !out.includes(v) && out.push(v);
9274
+ add2(args.layerId);
9275
+ add2(args.id);
9276
+ add2(args.target);
9277
+ for (const key of ["ids", "layerIds"]) if (Array.isArray(args[key])) args[key].forEach(add2);
9278
+ return out.slice(0, 6);
9279
+ }
9280
+ function planImageToolPlayback(tool, args) {
9281
+ const steps = [];
9282
+ const panel = imagePlaybackPanel(tool);
9283
+ if (panel) steps.push({ type: "open", ref: { kind: "panel", id: panel } });
9284
+ const points = Array.isArray(args.points) ? args.points.filter(isPoint) : [];
9285
+ const box = boxOf(args);
9286
+ if (points.length) steps.push(...trace(points));
9287
+ else if (box) steps.push({ type: "move", to: box.from }, { type: "press" }, { type: "drag", to: box.to }, { type: "release" });
9288
+ else if (num(args.x) && num(args.y)) steps.push({ type: "move", to: { x: args.x, y: args.y } }, { type: "press" }, { type: "release" });
9289
+ else if (tool === "set_adjustments" && args.values && typeof args.values === "object") {
9290
+ for (const key of Object.keys(args.values).slice(0, 4)) {
9291
+ const m = /^layers\.([^.]+)\.(.+)$/.exec(key);
9292
+ steps.push({ type: "target", ref: m ? { kind: "control", id: m[2] } : { kind: "control", id: key } });
9293
+ }
9294
+ } else for (const id of layersOf(args)) steps.push({ type: "target", ref: { kind: IMAGE_PLAYBACK_KIND, id } });
9295
+ if (typeof args.text === "string" && args.text.trim()) {
9296
+ const line = args.text.replace(/\s+/g, " ").trim();
9297
+ steps.push({ type: "type", text: line.length > 60 ? `${line.slice(0, 59)}\u2026` : line });
9298
+ }
9299
+ return steps.length ? steps : null;
9300
+ }
9301
+ function withImagePlayback(provider, surface = "image") {
9302
+ const plan = (tool) => tool.plan || tool.playback !== void 0 ? tool : { ...tool, plan: (args) => planImageToolPlayback(tool.name, args) };
9303
+ const tools = provider.tools;
9304
+ return {
9305
+ ...provider,
9306
+ playbackSurface: provider.playbackSurface ?? surface,
9307
+ tools: typeof tools === "function" ? () => tools().map(plan) : tools.map(plan)
9308
+ };
9309
+ }
9310
+
9224
9311
  // src/image-editor/selection/tool-options.ts
9225
9312
  var SELECTION_TOOLS = [
9226
9313
  { id: "wand", label: "Magic Wand" },
@@ -9271,7 +9358,7 @@ var modeSchema = {
9271
9358
  enum: [...SELECTION_MODES],
9272
9359
  description: "How the result combines with the current selection (default replace)."
9273
9360
  };
9274
- var num = (v, d) => typeof v === "number" && Number.isFinite(v) ? v : d;
9361
+ var num2 = (v, d) => typeof v === "number" && Number.isFinite(v) ? v : d;
9275
9362
  function summary(controller) {
9276
9363
  const sel = controller.getSelection();
9277
9364
  const { width, height } = controller.getState().imageDimensions;
@@ -9321,7 +9408,7 @@ function createImageSelectionTools(controller) {
9321
9408
  },
9322
9409
  annotations: writeAnnotations("Select a region", true),
9323
9410
  handler: ({ shape, x, y, width, height, mode, feather }) => {
9324
- const opts = { mode: parseSelectionMode(mode), feather: num(feather, 0) };
9411
+ const opts = { mode: parseSelectionMode(mode), feather: num2(feather, 0) };
9325
9412
  switch (shape) {
9326
9413
  case "all":
9327
9414
  controller.selectAll();
@@ -9334,7 +9421,7 @@ function createImageSelectionTools(controller) {
9334
9421
  break;
9335
9422
  case "rect":
9336
9423
  case "ellipse": {
9337
- const rect = { x: num(x, NaN), y: num(y, NaN), width: num(width, NaN), height: num(height, NaN) };
9424
+ const rect = { x: num2(x, NaN), y: num2(y, NaN), width: num2(width, NaN), height: num2(height, NaN) };
9338
9425
  if (![rect.x, rect.y, rect.width, rect.height].every(Number.isFinite)) {
9339
9426
  throw new Error("rect and ellipse need numeric x, y, width and height.");
9340
9427
  }
@@ -9379,9 +9466,9 @@ function createImageSelectionTools(controller) {
9379
9466
  sample: sample ?? "composite"
9380
9467
  };
9381
9468
  if (typeof color === "string") {
9382
- await controller.selectColorRange([{ color }], { ...common, fuzziness: num(fuzziness, 40) });
9469
+ await controller.selectColorRange([{ color }], { ...common, fuzziness: num2(fuzziness, 40) });
9383
9470
  } else if (typeof x === "number" && typeof y === "number") {
9384
- await controller.magicWand({ x, y }, { ...common, tolerance: num(tolerance, 32), contiguous: contiguous !== false });
9471
+ await controller.magicWand({ x, y }, { ...common, tolerance: num2(tolerance, 32), contiguous: contiguous !== false });
9385
9472
  } else {
9386
9473
  throw new Error("Pass x and y (magic wand) or color (#rrggbb).");
9387
9474
  }
@@ -9405,7 +9492,7 @@ function createImageSelectionTools(controller) {
9405
9492
  handler: ({ op, radius }) => {
9406
9493
  if (!SELECTION_MODIFY_OPS.includes(op)) throw new Error(`Unknown op "${String(op)}".`);
9407
9494
  if (!controller.getSelection()) throw new Error("Nothing is selected.");
9408
- controller.modifySelection(op, Math.min(500, Math.max(0, num(radius, 0))));
9495
+ controller.modifySelection(op, Math.min(500, Math.max(0, num2(radius, 0))));
9409
9496
  return summary(controller);
9410
9497
  }
9411
9498
  };
@@ -9429,12 +9516,12 @@ function createImageSelectionTools(controller) {
9429
9516
  handler: async (params) => {
9430
9517
  if (!controller.getSelection()) throw new Error("Nothing is selected.");
9431
9518
  await controller.refineSelection({
9432
- radius: num(params.radius, 8),
9519
+ radius: num2(params.radius, 8),
9433
9520
  smartRadius: params.smartRadius === true,
9434
- smooth: num(params.smooth, 0),
9435
- feather: num(params.feather, 0),
9436
- contrast: num(params.contrast, 0),
9437
- shiftEdge: num(params.shiftEdge, 0)
9521
+ smooth: num2(params.smooth, 0),
9522
+ feather: num2(params.feather, 0),
9523
+ contrast: num2(params.contrast, 0),
9524
+ shiftEdge: num2(params.shiftEdge, 0)
9438
9525
  });
9439
9526
  return summary(controller);
9440
9527
  }
@@ -13159,7 +13246,7 @@ function createImageEditorToolProvider(controller, options = {}) {
13159
13246
  };
13160
13247
  }
13161
13248
  };
13162
- return {
13249
+ return withImagePlayback({
13163
13250
  id: options.id ?? "image-editor",
13164
13251
  namespace: options.namespace,
13165
13252
  title: "Image editor",
@@ -13186,7 +13273,7 @@ function createImageEditorToolProvider(controller, options = {}) {
13186
13273
  ...createPigmentTools(),
13187
13274
  ...createImagePsdTools(controller)
13188
13275
  ]
13189
- };
13276
+ });
13190
13277
  }
13191
13278
 
13192
13279
  // src/image-editor/curve-editing.ts
@@ -15015,7 +15102,7 @@ function createImageEffectsToolProvider(controller, options = {}) {
15015
15102
  return { target, effect: effects.find((e) => e.id === instance) ?? effects[effects.length - 1], effects, ...extra };
15016
15103
  };
15017
15104
  const plainValues = (v) => v;
15018
- return createEffectToolProvider({
15105
+ return withImagePlayback(createEffectToolProvider({
15019
15106
  id: options.id ?? "image-effects",
15020
15107
  namespace: options.namespace,
15021
15108
  title: "Image effects",
@@ -15083,7 +15170,7 @@ function createImageEffectsToolProvider(controller, options = {}) {
15083
15170
  }
15084
15171
  }
15085
15172
  ]
15086
- });
15173
+ }));
15087
15174
  }
15088
15175
  export {
15089
15176
  ADJUSTMENT_KEYS,
@@ -15168,6 +15255,7 @@ export {
15168
15255
  IMAGE_EDITOR_STATE_VERSION,
15169
15256
  IMAGE_EFFECT_PLACES,
15170
15257
  IMAGE_FILTER_PRESETS,
15258
+ IMAGE_PLAYBACK_KIND,
15171
15259
  INTENTS,
15172
15260
  INTENT_OPTIONS,
15173
15261
  INTERPOLATIONS,
@@ -15449,6 +15537,7 @@ export {
15449
15537
  createImageEffectsToolProvider,
15450
15538
  createImageLayerTools,
15451
15539
  createImagePaintTools,
15540
+ createImagePlaybackLocator,
15452
15541
  createImagePsdTools,
15453
15542
  createImageRetouchTools,
15454
15543
  createImageSelectionTools,
@@ -15610,6 +15699,7 @@ export {
15610
15699
  identityWarpMesh,
15611
15700
  imageEditorStateMigrations,
15612
15701
  imageLayerAppliedEffects,
15702
+ imagePlaybackPanel,
15613
15703
  imageToCanvasPoint,
15614
15704
  importPsd,
15615
15705
  inflate,
@@ -15788,6 +15878,7 @@ export {
15788
15878
  placementAt,
15789
15879
  placementBounds,
15790
15880
  placementGeometry,
15881
+ planImageToolPlayback,
15791
15882
  pngDataUrl,
15792
15883
  pointerPressure,
15793
15884
  pointerStrokeSample,
@@ -16022,6 +16113,7 @@ export {
16022
16113
  whiteBalanceFromSample,
16023
16114
  whiteBalanceMatrix,
16024
16115
  withFilterMaskSurface,
16116
+ withImagePlayback,
16025
16117
  withNewIds,
16026
16118
  writeAdjustmentBlock,
16027
16119
  writeDeepRegion,
@@ -0,0 +1,22 @@
1
+ import type { AgentToolProvider } from '../tools/registry.cjs';
2
+ import type { PlaybackRect, PlaybackRef, PlaybackStep } from '../tools/playback.cjs';
3
+ import type { ImageEditorController } from './controller.cjs';
4
+ /** The playback kind of an image layer (`{ kind: 'layer', id }`, as in `data-layer-id`). */
5
+ export declare const IMAGE_PLAYBACK_KIND = "layer";
6
+ /** The editor's panels (its tabs), as `{ kind: 'panel', id }` refs. */
7
+ export type ImagePlaybackPanel = 'crop' | 'adjust' | 'layers' | 'paint' | 'select' | 'annotate';
8
+ /** The panel a write tool's change shows in (by its bare name), or null. */
9
+ export declare function imagePlaybackPanel(tool: string): ImagePlaybackPanel | null;
10
+ /** Finds `{ kind: 'layer', id }` (the layer's pixels, in document pixels) for agent playback. */
11
+ export declare function createImagePlaybackLocator(controller: Pick<ImageEditorController, 'getLayerBounds'>): (ref: PlaybackRef) => PlaybackRect | null;
12
+ /**
13
+ * The cursor steps for one image tool call (by bare name), or null to fall back to the ids it names.
14
+ * Steps open the tool's panel first, then act on the canvas or on the panel's controls.
15
+ */
16
+ export declare function planImageToolPlayback(tool: string, args: Record<string, any>): PlaybackStep[] | null;
17
+ /**
18
+ * Gives an image tool provider agent playback: each write tool plans its steps with
19
+ * `planImageToolPlayback` and every call plays on the `surface` (default `image`, where
20
+ * `ImageEditor` attaches itself).
21
+ */
22
+ export declare function withImagePlayback(provider: AgentToolProvider, surface?: string): AgentToolProvider;
@@ -0,0 +1,22 @@
1
+ import type { AgentToolProvider } from '../tools/registry.js';
2
+ import type { PlaybackRect, PlaybackRef, PlaybackStep } from '../tools/playback.js';
3
+ import type { ImageEditorController } from './controller.js';
4
+ /** The playback kind of an image layer (`{ kind: 'layer', id }`, as in `data-layer-id`). */
5
+ export declare const IMAGE_PLAYBACK_KIND = "layer";
6
+ /** The editor's panels (its tabs), as `{ kind: 'panel', id }` refs. */
7
+ export type ImagePlaybackPanel = 'crop' | 'adjust' | 'layers' | 'paint' | 'select' | 'annotate';
8
+ /** The panel a write tool's change shows in (by its bare name), or null. */
9
+ export declare function imagePlaybackPanel(tool: string): ImagePlaybackPanel | null;
10
+ /** Finds `{ kind: 'layer', id }` (the layer's pixels, in document pixels) for agent playback. */
11
+ export declare function createImagePlaybackLocator(controller: Pick<ImageEditorController, 'getLayerBounds'>): (ref: PlaybackRef) => PlaybackRect | null;
12
+ /**
13
+ * The cursor steps for one image tool call (by bare name), or null to fall back to the ids it names.
14
+ * Steps open the tool's panel first, then act on the canvas or on the panel's controls.
15
+ */
16
+ export declare function planImageToolPlayback(tool: string, args: Record<string, any>): PlaybackStep[] | null;
17
+ /**
18
+ * Gives an image tool provider agent playback: each write tool plans its steps with
19
+ * `planImageToolPlayback` and every call plays on the `surface` (default `image`, where
20
+ * `ImageEditor` attaches itself).
21
+ */
22
+ export declare function withImagePlayback(provider: AgentToolProvider, surface?: string): AgentToolProvider;
@@ -7,7 +7,7 @@ var _chunkVKF3PWKRcjs = require('../chunk-VKF3PWKR.cjs');
7
7
 
8
8
 
9
9
 
10
- var _chunkO3ZU6QIZcjs = require('../chunk-O3ZU6QIZ.cjs');
10
+ var _chunkXNZWATSBcjs = require('../chunk-XNZWATSB.cjs');
11
11
  require('../chunk-A2IS7EHE.cjs');
12
12
 
13
13
 
@@ -53,8 +53,8 @@ var _chunkJLWLX52Lcjs = require('../chunk-JLWLX52L.cjs');
53
53
 
54
54
 
55
55
 
56
- var _chunkGEY73RUWcjs = require('../chunk-GEY73RUW.cjs');
57
- require('../chunk-RCUX6CT2.cjs');
56
+ var _chunkUJGAA6AKcjs = require('../chunk-UJGAA6AK.cjs');
57
+ require('../chunk-HRI3ZMDM.cjs');
58
58
 
59
59
 
60
60
 
@@ -1627,11 +1627,11 @@ function header(state, options) {
1627
1627
  return out;
1628
1628
  }
1629
1629
  function serializePaintDocument(state, options = {}) {
1630
- const { layers, assets } = _chunkO3ZU6QIZcjs.serializeLayers.call(void 0, state.layers);
1630
+ const { layers, assets } = _chunkXNZWATSBcjs.serializeLayers.call(void 0, state.layers);
1631
1631
  return { ...header(state, options), layers, assets };
1632
1632
  }
1633
1633
  async function serializePaintDocumentExternal(state, store, options = {}) {
1634
- const { layers, assets } = await _chunkO3ZU6QIZcjs.serializeLayersExternal.call(void 0, state.layers, store);
1634
+ const { layers, assets } = await _chunkXNZWATSBcjs.serializeLayersExternal.call(void 0, state.layers, store);
1635
1635
  return { ...header(state, options), layers, assets };
1636
1636
  }
1637
1637
  function paintLayersOnly(layers, problems) {
@@ -1668,7 +1668,7 @@ function deserializePaintDocument(raw) {
1668
1668
  const canvas = normalizeCanvas({ width: r.width, height: r.height, dpi: _nullishCoalesce(r.dpi, () => ( void 0)) });
1669
1669
  const paper = _chunkBXMIBMVGcjs.normalizePaper.call(void 0, _nullishCoalesce(r.paper, () => ( {})));
1670
1670
  const assets = r.assets && typeof r.assets === "object" ? r.assets : {};
1671
- const layers = paintLayersOnly(_chunkO3ZU6QIZcjs.deserializeLayers.call(void 0, r.layers, { assets, problems }), problems);
1671
+ const layers = paintLayersOnly(_chunkXNZWATSBcjs.deserializeLayers.call(void 0, r.layers, { assets, problems }), problems);
1672
1672
  const wanted = typeof r.activeLayerId === "string" ? r.activeLayerId : null;
1673
1673
  const activeLayerId = wanted && _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, wanted) ? wanted : _nullishCoalesce(_optionalChain([_chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers), 'access', _70 => _70.filter, 'call', _71 => _71((l) => l.type === "pixel"), 'access', _72 => _72.pop, 'call', _73 => _73(), 'optionalAccess', _74 => _74.id]), () => ( null));
1674
1674
  const wetEvents = Array.isArray(r.wetEvents) ? r.wetEvents.filter((e) => e && typeof e === "object" && Number.isInteger(e.clock) && typeof e.kind === "string") : [];
@@ -1682,7 +1682,7 @@ async function deserializePaintDocumentAsync(raw, store) {
1682
1682
  if (!raw || typeof raw !== "object") throw new Error("Not a paint document: expected a JSON object.");
1683
1683
  const r = raw;
1684
1684
  const problems = [];
1685
- const assets = await _chunkO3ZU6QIZcjs.resolveExternalAssets.call(void 0, _nullishCoalesce(r.assets, () => ( {})), store, problems);
1685
+ const assets = await _chunkXNZWATSBcjs.resolveExternalAssets.call(void 0, _nullishCoalesce(r.assets, () => ( {})), store, problems);
1686
1686
  const loaded = deserializePaintDocument({ ...r, assets });
1687
1687
  return { ...loaded, problems: [...problems, ...loaded.problems] };
1688
1688
  }
@@ -5346,7 +5346,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
5346
5346
  return next.type === "group" ? { ...next, children: toStandard(next.children) } : next;
5347
5347
  });
5348
5348
  const layers = toStandard(dried);
5349
- const result = _chunkO3ZU6QIZcjs.exportPsd.call(void 0, { width, height, layers: [paperLayer, ...layers], merged, resolution: dpi });
5349
+ const result = _chunkXNZWATSBcjs.exportPsd.call(void 0, { width, height, layers: [paperLayer, ...layers], merged, resolution: dpi });
5350
5350
  for (const [mode, names] of changed) {
5351
5351
  const label = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.BLEND_MODES, 'access', _268 => _268.find, 'call', _269 => _269((m) => m.id === mode), 'optionalAccess', _270 => _270.label]), () => ( mode));
5352
5352
  const std = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.BLEND_MODES, 'access', _271 => _271.find, 'call', _272 => _272((m) => m.id === _chunkCWM3CUUXcjs.standardBlendMode.call(void 0, mode)), 'optionalAccess', _273 => _273.label]), () => ( _chunkCWM3CUUXcjs.standardBlendMode.call(void 0, mode)));
@@ -5889,7 +5889,7 @@ function resampleInto(src, rect, width, height) {
5889
5889
  }
5890
5890
 
5891
5891
  // src/paint-editor/presence.ts
5892
- var PaintPresence = class extends _chunkGEY73RUWcjs.PresenceStore {
5892
+ var PaintPresence = class extends _chunkUJGAA6AKcjs.PresenceStore {
5893
5893
  };
5894
5894
  var FRAME = 16;
5895
5895
  function strokeSchedule(points) {
@@ -5933,8 +5933,8 @@ var PaintDirector = class {
5933
5933
  this.controller = controller;
5934
5934
  this.presence = presence;
5935
5935
  this.options = options;
5936
- this.clock = _nullishCoalesce(options.clock, () => ( _chunkGEY73RUWcjs.realPresenceClock));
5937
- this.queue = new (0, _chunkGEY73RUWcjs.PerformanceQueue)(presence, { clock: this.clock, linger: options.linger });
5936
+ this.clock = _nullishCoalesce(options.clock, () => ( _chunkUJGAA6AKcjs.realPresenceClock));
5937
+ this.queue = new (0, _chunkUJGAA6AKcjs.PerformanceQueue)(presence, { clock: this.clock, linger: options.linger });
5938
5938
  }
5939
5939
 
5940
5940
 
@@ -5969,7 +5969,7 @@ var PaintDirector = class {
5969
5969
  this.presence.set({ id, x: to.x, y: to.y });
5970
5970
  return;
5971
5971
  }
5972
- await _chunkGEY73RUWcjs.tweenPresenceCursor.call(void 0, this.presence, this.clock, id, this.where(id), to, this.ms(ms));
5972
+ await _chunkUJGAA6AKcjs.tweenPresenceCursor.call(void 0, this.presence, this.clock, id, this.where(id), to, this.ms(ms));
5973
5973
  }
5974
5974
  async say(id, text, ms) {
5975
5975
  if (!text) return;
@@ -5999,7 +5999,7 @@ var PaintDirector = class {
5999
5999
  await this.glide(id, path[0]);
6000
6000
  this.presence.set({ id, pressed: true });
6001
6001
  try {
6002
- for (let i = 1; i < path.length; i++) await _chunkGEY73RUWcjs.tweenPresenceCursor.call(void 0, this.presence, this.clock, id, path[i - 1], path[i], this.ms(i % 2 ? 260 : 90));
6002
+ for (let i = 1; i < path.length; i++) await _chunkUJGAA6AKcjs.tweenPresenceCursor.call(void 0, this.presence, this.clock, id, path[i - 1], path[i], this.ms(i % 2 ? 260 : 90));
6003
6003
  } finally {
6004
6004
  this.presence.set({ id, pressed: false });
6005
6005
  }
@@ -7,7 +7,7 @@ import {
7
7
  resolveExternalAssets,
8
8
  serializeLayers,
9
9
  serializeLayersExternal
10
- } from "../chunk-6UZCFD7Y.js";
10
+ } from "../chunk-VM6JYWXQ.js";
11
11
  import "../chunk-3CI7FRMK.js";
12
12
  import {
13
13
  EffectRendererPool
@@ -53,8 +53,8 @@ import {
53
53
  PresenceStore,
54
54
  realPresenceClock,
55
55
  tweenPresenceCursor
56
- } from "../chunk-BSGPXPTW.js";
57
- import "../chunk-XGOU44RJ.js";
56
+ } from "../chunk-PEEP2YR7.js";
57
+ import "../chunk-77SG47WT.js";
58
58
  import {
59
59
  BRUSH_ID,
60
60
  BRUSH_ROTATIONS,
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-LACYURUW.cjs');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-TNCWKC5M.cjs');
2
2
 
3
3
 
4
4
 
@@ -24,7 +24,16 @@
24
24
 
25
25
 
26
26
 
27
- var _chunkHDK3T2QScjs = require('../chunk-HDK3T2QS.cjs');
27
+ var _chunkY4BWZB6Jcjs = require('../chunk-Y4BWZB6J.cjs');
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+ var _chunk6SFREX6Hcjs = require('../chunk-6SFREX6H.cjs');
28
37
 
29
38
 
30
39
 
@@ -69,6 +78,14 @@ var _chunkN2FGYZ4Qcjs = require('../chunk-N2FGYZ4Q.cjs');
69
78
  var _chunk2BSBFBOAcjs = require('../chunk-2BSBFBOA.cjs');
70
79
 
71
80
 
81
+
82
+
83
+
84
+
85
+
86
+ var _chunkUJGAA6AKcjs = require('../chunk-UJGAA6AK.cjs');
87
+
88
+
72
89
  var _chunkWOFXZ3XUcjs = require('../chunk-WOFXZ3XU.cjs');
73
90
 
74
91
 
@@ -132,4 +149,17 @@ var _chunkWOFXZ3XUcjs = require('../chunk-WOFXZ3XU.cjs');
132
149
 
133
150
 
134
151
 
135
- 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 = _chunkHDK3T2QScjs.JSON_RPC_ERRORS; exports.MCP_PROTOCOL_VERSIONS = _chunkHDK3T2QScjs.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.TOOL_BRIDGE_DEFAULT_PORT = _chunkHDK3T2QScjs.TOOL_BRIDGE_DEFAULT_PORT; exports.TOOL_BRIDGE_PROTOCOL = _chunkHDK3T2QScjs.TOOL_BRIDGE_PROTOCOL; exports.TOOL_DISCOVERY_TOOLS = _chunkHDK3T2QScjs.TOOL_DISCOVERY_TOOLS; exports.TOOL_NAMESPACE_SEPARATOR = _chunkHDK3T2QScjs.TOOL_NAMESPACE_SEPARATOR; exports.ToolRegistry = _chunkHDK3T2QScjs.ToolRegistry; exports.ToolRegistryError = _chunkHDK3T2QScjs.ToolRegistryError; exports.ToolRegistryView = _chunkHDK3T2QScjs.ToolRegistryView; exports.UNSAFE_JSON_KEYS = _chunk2BSBFBOAcjs.UNSAFE_JSON_KEYS; exports.baseToolName = _chunkHDK3T2QScjs.baseToolName; exports.captureInputSchema = _chunkN2FGYZ4Qcjs.captureInputSchema; exports.captureOutputSize = _chunkN2FGYZ4Qcjs.captureOutputSize; exports.cloneElementWithStyles = _chunkSVFEVKLFcjs.cloneElementWithStyles; exports.connectToolBridge = _chunkHDK3T2QScjs.connectToolBridge; exports.createCaptureTool = _chunkN2FGYZ4Qcjs.createCaptureTool; exports.createCaptureToolProvider = _chunkN2FGYZ4Qcjs.createCaptureToolProvider; exports.createElementCaptureSurface = _chunkSVFEVKLFcjs.createElementCaptureSurface; exports.createMcpServer = _chunkHDK3T2QScjs.createMcpServer; exports.createToolRegistry = _chunkHDK3T2QScjs.createToolRegistry; exports.elementToSvg = _chunkSVFEVKLFcjs.elementToSvg; exports.errorResult = _chunkHDK3T2QScjs.errorResult; exports.isUnsafeJsonKey = _chunk2BSBFBOAcjs.isUnsafeJsonKey; exports.listSkills = _chunkHDK3T2QScjs.listSkills; exports.parseSkillFrontmatter = _chunkHDK3T2QScjs.parseSkillFrontmatter; exports.rasterizeElement = _chunkSVFEVKLFcjs.rasterizeElement; exports.readSkillFile = _chunkHDK3T2QScjs.readSkillFile; exports.resolveCaptureRequest = _chunkN2FGYZ4Qcjs.resolveCaptureRequest; exports.searchTokens = _chunkHDK3T2QScjs.searchTokens; exports.searchTools = _chunkHDK3T2QScjs.searchTools; exports.stripPrototypeKeys = _chunk2BSBFBOAcjs.stripPrototypeKeys; exports.summarize = _chunkHDK3T2QScjs.summarize; exports.toCapturedImageData = _chunkN2FGYZ4Qcjs.toCapturedImageData; exports.toToolResult = _chunkHDK3T2QScjs.toToolResult; exports.toolsetInstructions = _chunkHDK3T2QScjs.toolsetInstructions; exports.toolsetName = _chunkHDK3T2QScjs.toolsetName; exports.unionCaptureRects = _chunkN2FGYZ4Qcjs.unionCaptureRects; exports.unknownToolMessage = _chunkHDK3T2QScjs.unknownToolMessage; exports.validateJsonSchema = _chunkWOFXZ3XUcjs.validateJsonSchema;
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+ exports.AgentPlayback = _chunk6SFREX6Hcjs.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 = _chunkUJGAA6AKcjs.PRESENCE_COLORS; exports.PerformanceQueue = _chunkUJGAA6AKcjs.PerformanceQueue; exports.PresenceStore = _chunkUJGAA6AKcjs.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 = _chunk6SFREX6Hcjs.createAgentPlayback; exports.createCaptureTool = _chunkN2FGYZ4Qcjs.createCaptureTool; exports.createCaptureToolProvider = _chunkN2FGYZ4Qcjs.createCaptureToolProvider; exports.createElementCaptureSurface = _chunkSVFEVKLFcjs.createElementCaptureSurface; exports.createInstantPresenceClock = _chunkUJGAA6AKcjs.createInstantPresenceClock; exports.createMcpServer = _chunkY4BWZB6Jcjs.createMcpServer; exports.createToolRegistry = _chunkY4BWZB6Jcjs.createToolRegistry; exports.derivePlaybackSteps = _chunk6SFREX6Hcjs.derivePlaybackSteps; exports.elementToSvg = _chunkSVFEVKLFcjs.elementToSvg; exports.errorResult = _chunkY4BWZB6Jcjs.errorResult; exports.isUnsafeJsonKey = _chunk2BSBFBOAcjs.isUnsafeJsonKey; exports.listSkills = _chunkY4BWZB6Jcjs.listSkills; exports.parseSkillFrontmatter = _chunkY4BWZB6Jcjs.parseSkillFrontmatter; exports.playbackRefsFromArgs = _chunk6SFREX6Hcjs.playbackRefsFromArgs; exports.playbackRefsFromResult = _chunk6SFREX6Hcjs.playbackRefsFromResult; exports.rasterizeElement = _chunkSVFEVKLFcjs.rasterizeElement; exports.readSkillFile = _chunkY4BWZB6Jcjs.readSkillFile; exports.readingTime = _chunk6SFREX6Hcjs.readingTime; exports.realPresenceClock = _chunkUJGAA6AKcjs.realPresenceClock; exports.resolveCaptureRequest = _chunkN2FGYZ4Qcjs.resolveCaptureRequest; 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.toolsetInstructions = _chunkY4BWZB6Jcjs.toolsetInstructions; exports.toolsetName = _chunkY4BWZB6Jcjs.toolsetName; exports.tweenPresenceCursor = _chunkUJGAA6AKcjs.tweenPresenceCursor; exports.unionCaptureRects = _chunkN2FGYZ4Qcjs.unionCaptureRects; exports.unionRects = _chunk6SFREX6Hcjs.unionRects; exports.unknownToolMessage = _chunkY4BWZB6Jcjs.unknownToolMessage; exports.validateJsonSchema = _chunkWOFXZ3XUcjs.validateJsonSchema;
@@ -18,3 +18,5 @@ export * from './view.cjs';
18
18
  export * from './search.cjs';
19
19
  export * from './skills.cjs';
20
20
  export * from './safe-json.cjs';
21
+ export * from './presence.cjs';
22
+ export * from './playback.cjs';
@@ -18,3 +18,5 @@ export * from './view.js';
18
18
  export * from './search.js';
19
19
  export * from './skills.js';
20
20
  export * from './safe-json.js';
21
+ export * from './presence.js';
22
+ export * from './playback.js';
@@ -1,4 +1,4 @@
1
- import "../chunk-K73HMKQP.js";
1
+ import "../chunk-PLKIYNJZ.js";
2
2
  import {
3
3
  JSON_RPC_ERRORS,
4
4
  MCP_PROTOCOL_VERSIONS,
@@ -24,7 +24,16 @@ import {
24
24
  toolsetInstructions,
25
25
  toolsetName,
26
26
  unknownToolMessage
27
- } from "../chunk-RB62U6MS.js";
27
+ } from "../chunk-RFBFTLVN.js";
28
+ import {
29
+ AgentPlayback,
30
+ createAgentPlayback,
31
+ derivePlaybackSteps,
32
+ playbackRefsFromArgs,
33
+ playbackRefsFromResult,
34
+ readingTime,
35
+ unionRects
36
+ } from "../chunk-MFFE55CS.js";
28
37
  import {
29
38
  CAPTURE_EXCLUDE_SELECTOR,
30
39
  CAPTURE_OVERLAY_SELECTORS,
@@ -67,10 +76,19 @@ import {
67
76
  isUnsafeJsonKey,
68
77
  stripPrototypeKeys
69
78
  } from "../chunk-HF5QZS7Z.js";
79
+ import {
80
+ PRESENCE_COLORS,
81
+ PerformanceQueue,
82
+ PresenceStore,
83
+ createInstantPresenceClock,
84
+ realPresenceClock,
85
+ tweenPresenceCursor
86
+ } from "../chunk-PEEP2YR7.js";
70
87
  import {
71
88
  validateJsonSchema
72
89
  } from "../chunk-V2ZCJRDM.js";
73
90
  export {
91
+ AgentPlayback,
74
92
  CAPTURE_EXCLUDE_SELECTOR,
75
93
  CAPTURE_OVERLAY_SELECTORS,
76
94
  EDITOR_CANVAS_TOOLS,
@@ -95,6 +113,9 @@ export {
95
113
  MCP_TOOL_PROMPT_SELECT,
96
114
  MCP_TOOL_PROMPT_SET_VARIABLE,
97
115
  MCP_TOOL_VIEW_EDITOR,
116
+ PRESENCE_COLORS,
117
+ PerformanceQueue,
118
+ PresenceStore,
98
119
  TOOL_BRIDGE_DEFAULT_PORT,
99
120
  TOOL_BRIDGE_PROTOCOL,
100
121
  TOOL_DISCOVERY_TOOLS,
@@ -108,18 +129,25 @@ export {
108
129
  captureOutputSize,
109
130
  cloneElementWithStyles,
110
131
  connectToolBridge,
132
+ createAgentPlayback,
111
133
  createCaptureTool,
112
134
  createCaptureToolProvider,
113
135
  createElementCaptureSurface,
136
+ createInstantPresenceClock,
114
137
  createMcpServer,
115
138
  createToolRegistry,
139
+ derivePlaybackSteps,
116
140
  elementToSvg,
117
141
  errorResult,
118
142
  isUnsafeJsonKey,
119
143
  listSkills,
120
144
  parseSkillFrontmatter,
145
+ playbackRefsFromArgs,
146
+ playbackRefsFromResult,
121
147
  rasterizeElement,
122
148
  readSkillFile,
149
+ readingTime,
150
+ realPresenceClock,
123
151
  resolveCaptureRequest,
124
152
  searchTokens,
125
153
  searchTools,
@@ -129,7 +157,9 @@ export {
129
157
  toToolResult,
130
158
  toolsetInstructions,
131
159
  toolsetName,
160
+ tweenPresenceCursor,
132
161
  unionCaptureRects,
162
+ unionRects,
133
163
  unknownToolMessage,
134
164
  validateJsonSchema
135
165
  };