@pixerate/editor 0.28.0 → 0.29.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 (80) hide show
  1. package/README.md +20 -1
  2. package/dist/HistoryManager-DWSLd6Tf.d.ts +150 -0
  3. package/dist/HistoryManager-DeQQMBCj.d.cts +150 -0
  4. package/dist/agent/index.cjs +20 -427
  5. package/dist/agent/index.cjs.map +1 -1
  6. package/dist/agent/index.d.cts +4 -342
  7. package/dist/agent/index.d.ts +4 -342
  8. package/dist/agent/index.js +14 -421
  9. package/dist/agent/index.js.map +1 -1
  10. package/dist/animation/index.d.cts +3 -73
  11. package/dist/animation/index.d.ts +3 -73
  12. package/dist/{builtins-nMXh9sT3.d.cts → builtins-DxC3aUR2.d.cts} +2 -2
  13. package/dist/{builtins-haN82vjT.d.ts → builtins-NGxNxQfJ.d.ts} +2 -2
  14. package/dist/canvas/index.d.cts +5 -3
  15. package/dist/canvas/index.d.ts +5 -3
  16. package/dist/chunk-36BLROHV.js +438 -0
  17. package/dist/chunk-36BLROHV.js.map +1 -0
  18. package/dist/{chunk-OYEFRO3D.cjs → chunk-6MDQKHRH.cjs} +4 -4
  19. package/dist/{chunk-OYEFRO3D.cjs.map → chunk-6MDQKHRH.cjs.map} +1 -1
  20. package/dist/{chunk-ARRTP33I.js → chunk-D6S5M7HV.js} +2 -2
  21. package/dist/{chunk-ARRTP33I.js.map → chunk-D6S5M7HV.js.map} +1 -1
  22. package/dist/{chunk-MXZJ4PKN.js → chunk-DDADOHJW.js} +8 -8
  23. package/dist/{chunk-CPOKFNBG.cjs → chunk-I6BZB5ZH.cjs} +2 -2
  24. package/dist/{chunk-CPOKFNBG.cjs.map → chunk-I6BZB5ZH.cjs.map} +1 -1
  25. package/dist/chunk-PIIAZV3L.cjs +244 -0
  26. package/dist/chunk-PIIAZV3L.cjs.map +1 -0
  27. package/dist/{chunk-G2I4QJOT.cjs → chunk-QKLRAA4T.cjs} +3 -244
  28. package/dist/chunk-QKLRAA4T.cjs.map +1 -0
  29. package/dist/{chunk-2H7ZHPEJ.js → chunk-QVZZGT4X.js} +1 -242
  30. package/dist/chunk-QVZZGT4X.js.map +1 -0
  31. package/dist/chunk-V7CC7RZ6.cjs +438 -0
  32. package/dist/chunk-V7CC7RZ6.cjs.map +1 -0
  33. package/dist/chunk-YK57D7PW.js +244 -0
  34. package/dist/chunk-YK57D7PW.js.map +1 -0
  35. package/dist/commands/index.cjs +2 -2
  36. package/dist/commands/index.cjs.map +1 -1
  37. package/dist/commands/index.d.cts +2 -2
  38. package/dist/commands/index.d.ts +2 -2
  39. package/dist/commands/index.js +1 -1
  40. package/dist/commands/index.js.map +1 -1
  41. package/dist/easing-B6iAnJHk.d.cts +74 -0
  42. package/dist/easing-B6iAnJHk.d.ts +74 -0
  43. package/dist/extensions/index.cjs +5 -5
  44. package/dist/extensions/index.cjs.map +1 -1
  45. package/dist/extensions/index.js +9 -9
  46. package/dist/generation/index.cjs +2 -2
  47. package/dist/generation/index.cjs.map +1 -1
  48. package/dist/generation/index.js +1 -1
  49. package/dist/generation/index.js.map +1 -1
  50. package/dist/history/index.cjs +4 -2
  51. package/dist/history/index.cjs.map +1 -1
  52. package/dist/history/index.d.cts +3 -149
  53. package/dist/history/index.d.ts +3 -149
  54. package/dist/history/index.js +5 -3
  55. package/dist/image-editor/index.cjs.map +1 -1
  56. package/dist/image-editor/index.js.map +1 -1
  57. package/dist/index.cjs +15 -13
  58. package/dist/index.cjs.map +1 -1
  59. package/dist/index.d.cts +3 -2
  60. package/dist/index.d.ts +3 -2
  61. package/dist/index.js +22 -20
  62. package/dist/index.js.map +1 -1
  63. package/dist/parameters/index.cjs +1283 -0
  64. package/dist/parameters/index.cjs.map +1 -0
  65. package/dist/parameters/index.d.cts +595 -0
  66. package/dist/parameters/index.d.ts +595 -0
  67. package/dist/parameters/index.js +1283 -0
  68. package/dist/parameters/index.js.map +1 -0
  69. package/dist/tools/index.cjs +31 -0
  70. package/dist/tools/index.cjs.map +1 -0
  71. package/dist/tools/index.d.cts +343 -0
  72. package/dist/tools/index.d.ts +343 -0
  73. package/dist/tools/index.js +31 -0
  74. package/dist/tools/index.js.map +1 -0
  75. package/dist/{types-GT5a5YAX.d.cts → types-DsiXGmjo.d.cts} +1 -1
  76. package/dist/{types-GT5a5YAX.d.ts → types-DsiXGmjo.d.ts} +1 -1
  77. package/package.json +11 -1
  78. package/dist/chunk-2H7ZHPEJ.js.map +0 -1
  79. package/dist/chunk-G2I4QJOT.cjs.map +0 -1
  80. /package/dist/{chunk-MXZJ4PKN.js.map → chunk-DDADOHJW.js.map} +0 -0
@@ -1,9 +1,22 @@
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; } var _class;
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
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+ var _chunkV7CC7RZ6cjs = require('../chunk-V7CC7RZ6.cjs');
14
+
2
15
 
3
16
  var _chunkHXDMZQTDcjs = require('../chunk-HXDMZQTD.cjs');
4
17
 
5
18
 
6
- var _chunkCPOKFNBGcjs = require('../chunk-CPOKFNBG.cjs');
19
+ var _chunkI6BZB5ZHcjs = require('../chunk-I6BZB5ZH.cjs');
7
20
 
8
21
 
9
22
 
@@ -289,426 +302,6 @@ function planToolCall(name, args, snapshot, options) {
289
302
  return command ? planAgentCommand(command, snapshot, options) : [];
290
303
  }
291
304
 
292
- // src/agent/tools.ts
293
- var MCP_TOOL_GET_EDITOR_STATE = {
294
- name: "get_editor_state",
295
- title: "Get editor state",
296
- annotations: {
297
- title: "Get editor state",
298
- readOnlyHint: true,
299
- destructiveHint: false,
300
- idempotentHint: true,
301
- openWorldHint: false
302
- },
303
- description: "Retrieves the current state of the document, variables, selection, and canvas graph (nodes and edges).",
304
- inputSchema: {
305
- type: "object",
306
- properties: {
307
- includeDocument: {
308
- type: "boolean",
309
- description: "Whether to include the prompt document text and variables (default: true)."
310
- },
311
- includeCanvas: {
312
- type: "boolean",
313
- description: "Whether to include the canvas nodes and edges (default: true)."
314
- }
315
- }
316
- }
317
- };
318
- var MCP_TOOL_EDIT_CANVAS = {
319
- name: "edit_canvas",
320
- title: "Edit the canvas",
321
- annotations: {
322
- title: "Edit the canvas",
323
- readOnlyHint: false,
324
- destructiveHint: true,
325
- idempotentHint: false,
326
- openWorldHint: false
327
- },
328
- description: "Applies high-level structural operations to the visual canvas (adding nodes, connecting edges, organizing layout, or moving elements).",
329
- inputSchema: {
330
- type: "object",
331
- properties: {
332
- operation: {
333
- type: "string",
334
- enum: [
335
- "add_node",
336
- "remove_nodes",
337
- "connect",
338
- "update_node",
339
- "layout",
340
- "select",
341
- "highlight"
342
- ],
343
- description: "The canvas operation to execute."
344
- },
345
- node: {
346
- type: "object",
347
- description: "Node definition when operation is add_node. Can omit position to auto-place."
348
- },
349
- nearNodeId: {
350
- type: "string",
351
- description: "Anchor node ID to position beside using collision-aware placement."
352
- },
353
- side: {
354
- type: "string",
355
- enum: ["top", "right", "bottom", "left"],
356
- description: "Side of the anchor node to place the new node beside."
357
- },
358
- nodeIds: {
359
- type: "array",
360
- items: { type: "string" },
361
- description: "Array of node IDs for remove_nodes, select, or highlight."
362
- },
363
- source: {
364
- type: "string",
365
- description: "Source node ID for connect operation."
366
- },
367
- target: {
368
- type: "string",
369
- description: "Target node ID for connect operation."
370
- },
371
- label: {
372
- type: "string",
373
- description: "Optional edge label for connect operation."
374
- },
375
- direction: {
376
- type: "string",
377
- enum: ["LR", "TB", "RL", "BT"],
378
- description: "Layout direction (default LR)."
379
- },
380
- incremental: {
381
- type: "boolean",
382
- description: "Preserve existing node coordinates and blend layout (default true)."
383
- }
384
- },
385
- required: ["operation"]
386
- }
387
- };
388
- var MCP_TOOL_EDIT_PROMPT = {
389
- name: "edit_prompt",
390
- title: "Edit the prompt",
391
- annotations: {
392
- title: "Edit the prompt",
393
- readOnlyHint: false,
394
- destructiveHint: true,
395
- idempotentHint: false,
396
- openWorldHint: false
397
- },
398
- description: "Applies edits to the prompt template document, including inserting text, replacing ranges, and setting variables.",
399
- inputSchema: {
400
- type: "object",
401
- properties: {
402
- operation: {
403
- type: "string",
404
- enum: ["insert_text", "replace_range", "set_variable", "select"],
405
- description: "The prompt operation to execute."
406
- },
407
- text: {
408
- type: "string",
409
- description: "Text to insert or replace."
410
- },
411
- at: {
412
- type: "number",
413
- description: "Position to insert text at."
414
- },
415
- from: {
416
- type: "number",
417
- description: "Start offset for replace_range or select."
418
- },
419
- to: {
420
- type: "number",
421
- description: "End offset for replace_range or select."
422
- },
423
- name: {
424
- type: "string",
425
- description: "Variable name for set_variable."
426
- },
427
- value: {
428
- description: "Variable value for set_variable."
429
- }
430
- },
431
- required: ["operation"]
432
- }
433
- };
434
- var MCP_TOOL_VIEW_EDITOR = {
435
- name: "view_editor",
436
- title: "View the editor",
437
- annotations: {
438
- title: "View the editor",
439
- readOnlyHint: true,
440
- destructiveHint: false,
441
- idempotentHint: true,
442
- openWorldHint: false
443
- },
444
- description: "Captures a visual image snapshot (JPEG or PNG) of the editor canvas or viewport for multimodal evaluation. Active agent cursor indicators are automatically excluded from the snapshot.",
445
- inputSchema: {
446
- type: "object",
447
- properties: {
448
- scope: {
449
- type: "string",
450
- enum: ["viewport", "canvas"],
451
- description: "Whether to capture only the visible viewport or the full canvas bounding box (default: viewport)."
452
- },
453
- format: {
454
- type: "string",
455
- enum: ["jpeg", "png"],
456
- description: "Image format of the base64 snapshot (default: jpeg)."
457
- },
458
- maxEdge: {
459
- type: "integer",
460
- description: "Maximum width or height dimension in pixels (default: 1024)."
461
- }
462
- }
463
- }
464
- };
465
- var EXPORT_EXCLUDED_SELECTORS = [
466
- ".pixerate-presence",
467
- ".agent-presence",
468
- ".ursula-presence"
469
- ];
470
- var EDITOR_MCP_TOOLS = [
471
- MCP_TOOL_GET_EDITOR_STATE,
472
- MCP_TOOL_EDIT_CANVAS,
473
- MCP_TOOL_EDIT_PROMPT,
474
- MCP_TOOL_VIEW_EDITOR
475
- ];
476
-
477
- // src/agent/registry.ts
478
- var ToolRegistryError = class extends Error {
479
-
480
- constructor(code, message) {
481
- super(message);
482
- this.name = "ToolRegistryError";
483
- this.code = code;
484
- }
485
- };
486
- var TOOL_NAMESPACE_SEPARATOR = "__";
487
- var TOOL_NAME_REGEX = /^[A-Za-z0-9_.-]{1,128}$/;
488
- var sanitizeNamespace = (id) => id.replace(/[^A-Za-z0-9_-]/g, "_");
489
- function readTools(provider) {
490
- return typeof provider.tools === "function" ? provider.tools() : provider.tools;
491
- }
492
- function toDefinition(name, tool) {
493
- const { handler: _handler, name: _name, ...rest } = tool;
494
- return { name, ...rest };
495
- }
496
- function errorResult(error) {
497
- const details = _optionalChain([error, 'access', _13 => _13.details, 'optionalAccess', _14 => _14.length]) ? "\n" + error.details.map((d) => `- ${d.path}: ${d.message}`).join("\n") : "";
498
- return {
499
- isError: true,
500
- content: [{ type: "text", text: `${error.message}${details}` }],
501
- structuredContent: { error }
502
- };
503
- }
504
- function toToolResult(value) {
505
- if (value && typeof value === "object" && Array.isArray(value.content)) {
506
- return value;
507
- }
508
- if (value === void 0) return { content: [] };
509
- if (typeof value === "string") return { content: [{ type: "text", text: value }] };
510
- const text = JSON.stringify(value);
511
- const isPlainObject = typeof value === "object" && value !== null && !Array.isArray(value);
512
- return {
513
- content: [{ type: "text", text: _nullishCoalesce(text, () => ( String(value))) }],
514
- ...isPlainObject ? { structuredContent: value } : {}
515
- };
516
- }
517
- var ToolRegistry = (_class = class {
518
- /** MCP server capabilities this registry supports. */
519
- __init() {this.capabilities = { tools: { listChanged: true } }}
520
- __init2() {this.entries = []}
521
- __init3() {this.listeners = /* @__PURE__ */ new Set()}
522
-
523
- __init4() {this.timer = null}
524
-
525
- constructor(options = {}) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);
526
- this.options = {
527
- onCollision: _nullishCoalesce(options.onCollision, () => ( "namespace")),
528
- listChangedDelayMs: _nullishCoalesce(options.listChangedDelayMs, () => ( 0)),
529
- validateArguments: _nullishCoalesce(options.validateArguments, () => ( true))
530
- };
531
- this.lastSignature = this.signature();
532
- }
533
- /**
534
- * Registers a provider and returns a function that unregisters it.
535
- * Throws a {@link ToolRegistryError} for a duplicate provider id, an invalid
536
- * tool name, or (with `onCollision: 'error'`) a tool name collision.
537
- */
538
- register(provider) {
539
- if (this.entries.some((e) => e.provider.id === provider.id)) {
540
- throw new ToolRegistryError("duplicate_provider", `Tool provider "${provider.id}" is already registered.`);
541
- }
542
- for (const tool of readTools(provider)) {
543
- if (!TOOL_NAME_REGEX.test(tool.name)) {
544
- throw new ToolRegistryError("invalid_tool", `Invalid tool name "${tool.name}" from provider "${provider.id}".`);
545
- }
546
- }
547
- const entry = { provider };
548
- this.entries.push(entry);
549
- try {
550
- const names = this.resolve(this.options.onCollision === "error").map((t) => t.name);
551
- const duplicate = names.find((name, i) => names.indexOf(name) !== i);
552
- if (duplicate) {
553
- throw new ToolRegistryError("name_collision", `Tool name "${duplicate}" is exposed more than once.`);
554
- }
555
- } catch (error) {
556
- this.entries.pop();
557
- throw error;
558
- }
559
- if (provider.subscribe) {
560
- entry.unsubscribe = provider.subscribe(() => this.notifyListChanged());
561
- }
562
- this.notifyListChanged();
563
- let registered = true;
564
- return () => {
565
- if (!registered) return;
566
- registered = false;
567
- this.unregister(provider);
568
- };
569
- }
570
- /** Removes a provider by id or instance. Returns whether it was registered. */
571
- unregister(providerOrId) {
572
- const index = this.entries.findIndex(
573
- (e) => typeof providerOrId === "string" ? e.provider.id === providerOrId : e.provider === providerOrId
574
- );
575
- if (index === -1) return false;
576
- const [entry] = this.entries.splice(index, 1);
577
- _optionalChain([entry, 'access', _15 => _15.unsubscribe, 'optionalCall', _16 => _16()]);
578
- this.notifyListChanged();
579
- return true;
580
- }
581
- /** Registered provider ids in registration order. */
582
- providerIds() {
583
- return this.entries.map((e) => e.provider.id);
584
- }
585
- /**
586
- * Resolves exposed names. Tools are ordered by provider registration, then
587
- * by their order within the provider.
588
- */
589
- resolve(throwOnCollision = false) {
590
- const all = [];
591
- const counts = /* @__PURE__ */ new Map();
592
- for (const { provider } of this.entries) {
593
- for (const tool of readTools(provider)) {
594
- all.push({ name: tool.name, tool, provider });
595
- if (!provider.namespace) counts.set(tool.name, (_nullishCoalesce(counts.get(tool.name), () => ( 0))) + 1);
596
- }
597
- }
598
- for (const item of all) {
599
- const prefix = _nullishCoalesce(item.provider.namespace, () => ( ((_nullishCoalesce(counts.get(item.name), () => ( 0))) > 1 ? item.provider.id : void 0)));
600
- if (prefix !== void 0) {
601
- if (throwOnCollision && !item.provider.namespace) {
602
- throw new ToolRegistryError(
603
- "name_collision",
604
- `Tool "${item.name}" from provider "${item.provider.id}" collides with another provider's tool.`
605
- );
606
- }
607
- item.name = `${sanitizeNamespace(prefix)}${TOOL_NAMESPACE_SEPARATOR}${item.name}`;
608
- }
609
- }
610
- return all;
611
- }
612
- /** MCP `tools/list` result for the current providers. */
613
- listTools() {
614
- return { tools: this.resolve().map(({ name, tool }) => toDefinition(name, tool)) };
615
- }
616
- /** Whether a tool with this exposed name exists. */
617
- hasTool(name) {
618
- return this.resolve().some((t) => t.name === name);
619
- }
620
- /** Looks up a tool definition by exposed name. */
621
- getTool(name) {
622
- const found = this.resolve().find((t) => t.name === name);
623
- return found ? toDefinition(found.name, found.tool) : void 0;
624
- }
625
- /**
626
- * Calls a tool by exposed name and returns an MCP `tools/call` result.
627
- * Never rejects: unknown tools, invalid arguments and handler errors come
628
- * back as `isError: true` results with a {@link ToolCallError} in
629
- * `structuredContent.error` (MCP transports may map `unknown_tool` to a
630
- * JSON-RPC `-32602` error instead).
631
- */
632
- async callTool(name, args = {}, options = {}) {
633
- const found = this.resolve().find((t) => t.name === name);
634
- if (!found) {
635
- return errorResult({ code: "unknown_tool", message: `Unknown tool "${name}".`, tool: name });
636
- }
637
- const input = _nullishCoalesce(args, () => ( {}));
638
- if (this.options.validateArguments) {
639
- const details = _chunkCPOKFNBGcjs.validateJsonSchema.call(void 0, input, found.tool.inputSchema);
640
- if (details.length > 0) {
641
- return errorResult({
642
- code: "invalid_arguments",
643
- message: `Invalid arguments for tool "${name}".`,
644
- tool: name,
645
- details
646
- });
647
- }
648
- }
649
- try {
650
- const value = await found.tool.handler(input, {
651
- name,
652
- providerId: found.provider.id,
653
- signal: options.signal
654
- });
655
- return toToolResult(value);
656
- } catch (error) {
657
- return errorResult({
658
- code: "tool_failed",
659
- message: error instanceof Error ? error.message : String(error),
660
- tool: name
661
- });
662
- }
663
- }
664
- /**
665
- * Subscribes to tool-list changes. Notifications are coalesced: many
666
- * registrations or provider signals within the delay window produce one
667
- * call, and none if the exposed list ends up unchanged (e.g. a provider
668
- * unmounted and remounted). Returns an unsubscribe function.
669
- */
670
- onListChanged(listener) {
671
- this.listeners.add(listener);
672
- return () => {
673
- this.listeners.delete(listener);
674
- };
675
- }
676
- /** Schedules a coalesced `listChanged` check; providers may call it directly. */
677
- notifyListChanged() {
678
- if (this.timer !== null) return;
679
- this.timer = setTimeout(() => this.flush(), this.options.listChangedDelayMs);
680
- }
681
- /** Runs a pending `listChanged` check immediately. */
682
- flush() {
683
- if (this.timer !== null) {
684
- clearTimeout(this.timer);
685
- this.timer = null;
686
- }
687
- const signature = this.signature();
688
- if (signature === this.lastSignature) return;
689
- this.lastSignature = signature;
690
- const { tools } = this.listTools();
691
- for (const listener of Array.from(this.listeners)) listener(tools);
692
- }
693
- signature() {
694
- try {
695
- return JSON.stringify(this.listTools().tools);
696
- } catch (e2) {
697
- return String(Math.random());
698
- }
699
- }
700
- /** Unregisters every provider and listener and cancels pending notifications. */
701
- dispose() {
702
- if (this.timer !== null) clearTimeout(this.timer);
703
- this.timer = null;
704
- for (const entry of this.entries.splice(0)) _optionalChain([entry, 'access', _17 => _17.unsubscribe, 'optionalCall', _18 => _18()]);
705
- this.listeners.clear();
706
- }
707
- }, _class);
708
- function createToolRegistry(options) {
709
- return new ToolRegistry(options);
710
- }
711
-
712
305
  // src/agent/providers.ts
713
306
  var _state = require('@tiptap/pm/state');
714
307
  var toEditor = (target) => "commands" in target ? target : target.editor;
@@ -987,7 +580,7 @@ function createEditorMcpToolProvider(options) {
987
580
  };
988
581
  const tools = [
989
582
  {
990
- ...MCP_TOOL_GET_EDITOR_STATE,
583
+ ..._chunkV7CC7RZ6cjs.MCP_TOOL_GET_EDITOR_STATE,
991
584
  handler: ({ includeDocument = true, includeCanvas = true }) => {
992
585
  const snapshot = options.getSnapshot();
993
586
  return {
@@ -996,13 +589,13 @@ function createEditorMcpToolProvider(options) {
996
589
  };
997
590
  }
998
591
  },
999
- { ...MCP_TOOL_EDIT_CANVAS, handler: edit(MCP_TOOL_EDIT_CANVAS.name) },
1000
- { ...MCP_TOOL_EDIT_PROMPT, handler: edit(MCP_TOOL_EDIT_PROMPT.name) }
592
+ { ..._chunkV7CC7RZ6cjs.MCP_TOOL_EDIT_CANVAS, handler: edit(_chunkV7CC7RZ6cjs.MCP_TOOL_EDIT_CANVAS.name) },
593
+ { ..._chunkV7CC7RZ6cjs.MCP_TOOL_EDIT_PROMPT, handler: edit(_chunkV7CC7RZ6cjs.MCP_TOOL_EDIT_PROMPT.name) }
1001
594
  ];
1002
595
  if (options.captureView) {
1003
596
  const capture = options.captureView;
1004
597
  tools.push({
1005
- ...MCP_TOOL_VIEW_EDITOR,
598
+ ..._chunkV7CC7RZ6cjs.MCP_TOOL_VIEW_EDITOR,
1006
599
  handler: async (args) => {
1007
600
  const image = await capture(args);
1008
601
  return { content: [{ type: "image", data: image.data, mimeType: image.mimeType }] };
@@ -1183,5 +776,5 @@ function createCanvasComponentToolProvider(controller, options = { id: "canvas-c
1183
776
 
1184
777
 
1185
778
 
1186
- exports.EDITOR_MCP_TOOLS = EDITOR_MCP_TOOLS; exports.EXPORT_EXCLUDED_SELECTORS = EXPORT_EXCLUDED_SELECTORS; exports.MCP_TOOL_EDIT_CANVAS = MCP_TOOL_EDIT_CANVAS; exports.MCP_TOOL_EDIT_PROMPT = MCP_TOOL_EDIT_PROMPT; exports.MCP_TOOL_GET_EDITOR_STATE = MCP_TOOL_GET_EDITOR_STATE; exports.MCP_TOOL_VIEW_EDITOR = MCP_TOOL_VIEW_EDITOR; exports.TOOL_NAMESPACE_SEPARATOR = TOOL_NAMESPACE_SEPARATOR; exports.ToolRegistry = ToolRegistry; exports.ToolRegistryError = ToolRegistryError; exports.createCanvasComponentToolProvider = createCanvasComponentToolProvider; exports.createEditorMcpToolProvider = createEditorMcpToolProvider; exports.createRichTextToolProvider = createRichTextToolProvider; exports.createSpreadsheetToolProvider = createSpreadsheetToolProvider; exports.createToolRegistry = createToolRegistry; exports.normalizeSide = normalizeSide; exports.planAgentCommand = planAgentCommand; exports.planToolCall = planToolCall; exports.toToolResult = toToolResult; exports.toolCallToAgentCommand = toolCallToAgentCommand; exports.validateJsonSchema = _chunkCPOKFNBGcjs.validateJsonSchema;
779
+ exports.EDITOR_MCP_TOOLS = _chunkV7CC7RZ6cjs.EDITOR_MCP_TOOLS; exports.EXPORT_EXCLUDED_SELECTORS = _chunkV7CC7RZ6cjs.EXPORT_EXCLUDED_SELECTORS; exports.MCP_TOOL_EDIT_CANVAS = _chunkV7CC7RZ6cjs.MCP_TOOL_EDIT_CANVAS; exports.MCP_TOOL_EDIT_PROMPT = _chunkV7CC7RZ6cjs.MCP_TOOL_EDIT_PROMPT; exports.MCP_TOOL_GET_EDITOR_STATE = _chunkV7CC7RZ6cjs.MCP_TOOL_GET_EDITOR_STATE; exports.MCP_TOOL_VIEW_EDITOR = _chunkV7CC7RZ6cjs.MCP_TOOL_VIEW_EDITOR; exports.TOOL_NAMESPACE_SEPARATOR = _chunkV7CC7RZ6cjs.TOOL_NAMESPACE_SEPARATOR; exports.ToolRegistry = _chunkV7CC7RZ6cjs.ToolRegistry; exports.ToolRegistryError = _chunkV7CC7RZ6cjs.ToolRegistryError; exports.createCanvasComponentToolProvider = createCanvasComponentToolProvider; exports.createEditorMcpToolProvider = createEditorMcpToolProvider; exports.createRichTextToolProvider = createRichTextToolProvider; exports.createSpreadsheetToolProvider = createSpreadsheetToolProvider; exports.createToolRegistry = _chunkV7CC7RZ6cjs.createToolRegistry; exports.normalizeSide = normalizeSide; exports.planAgentCommand = planAgentCommand; exports.planToolCall = planToolCall; exports.toToolResult = _chunkV7CC7RZ6cjs.toToolResult; exports.toolCallToAgentCommand = toolCallToAgentCommand; exports.validateJsonSchema = _chunkI6BZB5ZHcjs.validateJsonSchema;
1187
780
  //# sourceMappingURL=index.cjs.map