@pixerate/editor 0.139.1 → 0.140.1

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 (152) hide show
  1. package/README.md +25 -4
  2. package/dist/agent/formatTools.d.cts +15 -0
  3. package/dist/agent/formatTools.d.ts +15 -0
  4. package/dist/agent/index.cjs +408 -49
  5. package/dist/agent/index.js +375 -16
  6. package/dist/agent/providers.d.cts +5 -3
  7. package/dist/agent/providers.d.ts +5 -3
  8. package/dist/animation-editor/effect-tools.d.cts +1 -1
  9. package/dist/animation-editor/effect-tools.d.ts +1 -1
  10. package/dist/animation-editor/index.cjs +250 -116
  11. package/dist/animation-editor/index.js +228 -94
  12. package/dist/animation-editor/instructions.d.cts +1 -1
  13. package/dist/animation-editor/instructions.d.ts +1 -1
  14. package/dist/animation-editor/parse.d.cts +3 -1
  15. package/dist/animation-editor/parse.d.ts +3 -1
  16. package/dist/animation-editor/tools.d.cts +8 -3
  17. package/dist/animation-editor/tools.d.ts +8 -3
  18. package/dist/bridge/cli.cjs +4 -3
  19. package/dist/bridge/cli.js +3 -2
  20. package/dist/bridge/index.cjs +8 -3
  21. package/dist/bridge/index.d.cts +7 -0
  22. package/dist/bridge/index.d.ts +7 -0
  23. package/dist/bridge/index.js +9 -4
  24. package/dist/bridge/skills.d.cts +9 -0
  25. package/dist/bridge/skills.d.ts +9 -0
  26. package/dist/canvas/effect-tools.d.cts +1 -1
  27. package/dist/canvas/effect-tools.d.ts +1 -1
  28. package/dist/canvas/index.cjs +22 -17
  29. package/dist/canvas/index.js +8 -3
  30. package/dist/chart/file-tools.d.cts +1 -1
  31. package/dist/chart/file-tools.d.ts +1 -1
  32. package/dist/chart/index.cjs +7 -1
  33. package/dist/chart/index.js +7 -1
  34. package/dist/chart/tools.d.cts +1 -1
  35. package/dist/chart/tools.d.ts +1 -1
  36. package/dist/chunk-2BSBFBOA.cjs +46 -0
  37. package/dist/{chunk-SWZTQWY7.js → chunk-2INPJDNY.js} +1 -1
  38. package/dist/{chunk-CCKP4XAN.cjs → chunk-34RQAGWI.cjs} +27 -7
  39. package/dist/{chunk-HXCBQ7A6.cjs → chunk-3AJMR7EG.cjs} +7 -4
  40. package/dist/{chunk-BKMU3V6K.js → chunk-5ED73EC6.js} +8 -1
  41. package/dist/{chunk-NKBUVQJW.cjs → chunk-5WOY52O6.cjs} +15 -15
  42. package/dist/{chunk-VRIR53SW.js → chunk-6GAYGQDC.js} +10 -8
  43. package/dist/{chunk-HZZXBTLB.js → chunk-6IN474P4.js} +25 -5
  44. package/dist/{chunk-KHMVB3SJ.js → chunk-7KWJEYIK.js} +4 -1
  45. package/dist/{chunk-R47NQICB.cjs → chunk-AGCD3EHB.cjs} +47 -10
  46. package/dist/{chunk-6I63VZ45.js → chunk-CXXKJBQZ.js} +5 -1
  47. package/dist/{chunk-6NXVDJDR.cjs → chunk-G43MNQ4C.cjs} +5 -5
  48. package/dist/chunk-HDK3T2QS.cjs +1159 -0
  49. package/dist/chunk-HF5QZS7Z.js +46 -0
  50. package/dist/{chunk-S7I3RI5Z.cjs → chunk-HMGWFXEC.cjs} +27 -24
  51. package/dist/{chunk-6NCBFBXA.js → chunk-IQ6KKXOU.js} +1 -1
  52. package/dist/{chunk-T6Y5FV7G.cjs → chunk-L434J57V.cjs} +10 -8
  53. package/dist/{chunk-UCRL6JEV.cjs → chunk-L5OWG2NA.cjs} +8 -3
  54. package/dist/{chunk-CZRWP6IW.cjs → chunk-N2FGYZ4Q.cjs} +8 -1
  55. package/dist/{chunk-GUPQ5BNA.cjs → chunk-PUR6BZFA.cjs} +112 -111
  56. package/dist/chunk-RB62U6MS.js +1159 -0
  57. package/dist/{chunk-3V746PF4.cjs → chunk-RUZQMYXH.cjs} +4 -1
  58. package/dist/{chunk-HGHXGCKG.cjs → chunk-SVFEVKLF.cjs} +1 -1
  59. package/dist/{chunk-PCNCT4ZY.js → chunk-UMS6YFA6.js} +40 -3
  60. package/dist/{chunk-4LGWAJDI.js → chunk-V5OOP74P.js} +5 -2
  61. package/dist/{chunk-BWT4IWLK.cjs → chunk-VKF3PWKR.cjs} +7 -7
  62. package/dist/{chunk-PQMADRCI.js → chunk-WBJ6BG4R.js} +23 -22
  63. package/dist/{chunk-WIYAOZZU.js → chunk-WHKNYFM2.js} +7 -2
  64. package/dist/{chunk-TBSPPVTT.js → chunk-XCK7QK5D.js} +1 -1
  65. package/dist/{chunk-F652BKMS.cjs → chunk-YN6JKAUE.cjs} +6 -2
  66. package/dist/{chunk-YTGF4TJR.js → chunk-ZLZKGHSZ.js} +5 -2
  67. package/dist/{chunk-USU2FL3N.js → chunk-ZNHB5RG6.js} +1 -1
  68. package/dist/commands/agentTools.d.cts +1 -1
  69. package/dist/commands/agentTools.d.ts +1 -1
  70. package/dist/commands/index.cjs +3 -0
  71. package/dist/commands/index.js +3 -0
  72. package/dist/compare/index.cjs +4 -3
  73. package/dist/compare/index.js +3 -2
  74. package/dist/diagram/index.cjs +3 -0
  75. package/dist/diagram/index.js +3 -0
  76. package/dist/diagram/tools.d.cts +1 -1
  77. package/dist/diagram/tools.d.ts +1 -1
  78. package/dist/effects/index.cjs +32 -32
  79. package/dist/effects/index.js +1 -1
  80. package/dist/effects/tools.d.cts +5 -1
  81. package/dist/effects/tools.d.ts +5 -1
  82. package/dist/export/index.cjs +4 -3
  83. package/dist/export/index.js +3 -2
  84. package/dist/extensions/index.cjs +11 -8
  85. package/dist/extensions/index.d.cts +1 -0
  86. package/dist/extensions/index.d.ts +1 -0
  87. package/dist/extensions/index.js +10 -7
  88. package/dist/extensions/safe-merge-attributes.d.cts +10 -0
  89. package/dist/extensions/safe-merge-attributes.d.ts +10 -0
  90. package/dist/generation/index.cjs +7 -1
  91. package/dist/generation/index.js +7 -1
  92. package/dist/image-editor/index.cjs +25 -18
  93. package/dist/image-editor/index.js +10 -3
  94. package/dist/image-editor/provider-effect-tools.d.cts +1 -1
  95. package/dist/image-editor/provider-effect-tools.d.ts +1 -1
  96. package/dist/image-editor/tools.d.cts +1 -1
  97. package/dist/image-editor/tools.d.ts +1 -1
  98. package/dist/index.cjs +42 -29
  99. package/dist/index.d.cts +1 -0
  100. package/dist/index.d.ts +1 -0
  101. package/dist/index.js +22 -9
  102. package/dist/paint-editor/effect-tools.d.cts +1 -1
  103. package/dist/paint-editor/effect-tools.d.ts +1 -1
  104. package/dist/paint-editor/index.cjs +18 -8
  105. package/dist/paint-editor/index.js +13 -3
  106. package/dist/paint-editor/tools.d.cts +1 -1
  107. package/dist/paint-editor/tools.d.ts +1 -1
  108. package/dist/persistence/index.cjs +3 -2
  109. package/dist/persistence/index.js +2 -1
  110. package/dist/serializers/index.cjs +5 -4
  111. package/dist/serializers/index.js +4 -3
  112. package/dist/tools/bridge-client.d.cts +3 -3
  113. package/dist/tools/bridge-client.d.ts +3 -3
  114. package/dist/tools/capture.d.cts +5 -1
  115. package/dist/tools/capture.d.ts +5 -1
  116. package/dist/tools/definitions.d.cts +2 -2
  117. package/dist/tools/definitions.d.ts +2 -2
  118. package/dist/tools/index.cjs +39 -5
  119. package/dist/tools/index.d.cts +4 -0
  120. package/dist/tools/index.d.ts +4 -0
  121. package/dist/tools/index.js +39 -5
  122. package/dist/tools/mcp-server.d.cts +24 -6
  123. package/dist/tools/mcp-server.d.ts +24 -6
  124. package/dist/tools/registry.d.cts +81 -6
  125. package/dist/tools/registry.d.ts +81 -6
  126. package/dist/tools/safe-json.d.cts +27 -0
  127. package/dist/tools/safe-json.d.ts +27 -0
  128. package/dist/tools/search.d.cts +30 -0
  129. package/dist/tools/search.d.ts +30 -0
  130. package/dist/tools/skills.d.cts +26 -0
  131. package/dist/tools/skills.d.ts +26 -0
  132. package/dist/tools/view.d.cts +95 -0
  133. package/dist/tools/view.d.ts +95 -0
  134. package/dist/vector/effect-tools.d.cts +1 -1
  135. package/dist/vector/effect-tools.d.ts +1 -1
  136. package/dist/vector/index.cjs +13 -7
  137. package/dist/vector/index.js +8 -2
  138. package/dist/video-editor/effect-tools.d.cts +1 -1
  139. package/dist/video-editor/effect-tools.d.ts +1 -1
  140. package/dist/video-editor/index.cjs +275 -269
  141. package/dist/video-editor/index.js +8 -2
  142. package/dist/video-editor/tools.d.cts +1 -1
  143. package/dist/video-editor/tools.d.ts +1 -1
  144. package/package.json +31 -29
  145. package/skills/README.md +8 -3
  146. package/skills/pixerate-agent-tools/SKILL.md +33 -7
  147. package/skills/pixerate-animation-editor/SKILL.md +7 -0
  148. package/skills/pixerate-rich-text/SKILL.md +18 -4
  149. package/dist/chunk-5RRYDFU2.js +0 -466
  150. package/dist/chunk-SPVIXXIB.cjs +0 -466
  151. /package/dist/{chunk-SMJK5HBJ.js → chunk-K73HMKQP.js} +0 -0
  152. /package/dist/{chunk-DDF6WQ62.cjs → chunk-LACYURUW.cjs} +0 -0
@@ -541,7 +541,7 @@ var _chunkNM3G4VQTcjs = require('../chunk-NM3G4VQT.cjs');
541
541
 
542
542
 
543
543
 
544
- var _chunk3V746PF4cjs = require('../chunk-3V746PF4.cjs');
544
+ var _chunkRUZQMYXHcjs = require('../chunk-RUZQMYXH.cjs');
545
545
  require('../chunk-WOFXZ3XU.cjs');
546
546
 
547
547
 
@@ -7968,7 +7968,7 @@ var VectorEditorController = (_class7 = class _VectorEditorController {
7968
7968
  }
7969
7969
  // --- Provider effects ---
7970
7970
  /** The effects provider slot (see `setEffectsProvider`). */
7971
- __init59() {this.effects = new (0, _chunk3V746PF4cjs.EffectsSlot)()}
7971
+ __init59() {this.effects = new (0, _chunkRUZQMYXHcjs.EffectsSlot)()}
7972
7972
  /** The registered effects provider, or `null`. */
7973
7973
  get effectsProvider() {
7974
7974
  return this.effects.provider;
@@ -7992,10 +7992,10 @@ var VectorEditorController = (_class7 = class _VectorEditorController {
7992
7992
  /** The effect's picture as group children, scaled into `box` (an affine fit). */
7993
7993
  async vectorEffectPicture(effect, values) {
7994
7994
  const provider = this.effects.require();
7995
- if (!provider.applyVectorEffect) throw new (0, _chunk3V746PF4cjs.EffectUnsupportedError)(`${provider.name} has no vector effects.`);
7995
+ if (!provider.applyVectorEffect) throw new (0, _chunkRUZQMYXHcjs.EffectUnsupportedError)(`${provider.name} has no vector effects.`);
7996
7996
  const d = await provider.describe(effect);
7997
- if (d.kind !== "vector") throw new (0, _chunk3V746PF4cjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) is a ${d.kind} effect; the vector editor adds vector effects, which bring their own picture${d.kind === "motion" ? " (apply motion in the animation editor)" : ""}.`, d.id);
7998
- const resolved = _chunk3V746PF4cjs.resolveEffectValues.call(void 0, d, values);
7997
+ if (d.kind !== "vector") throw new (0, _chunkRUZQMYXHcjs.EffectUnsupportedError)(`"${d.id}" (${d.name}) is a ${d.kind} effect; the vector editor adds vector effects, which bring their own picture${d.kind === "motion" ? " (apply motion in the animation editor)" : ""}.`, d.id);
7998
+ const resolved = _chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, d, values);
7999
7999
  const motion = await provider.applyVectorEffect(d.id, this.toSvg(), resolved);
8000
8000
  const parsed = _chunkRCUX6CT2cjs.parseVectorSvg.call(void 0, motion.svg);
8001
8001
  if (!parsed.nodes.length) throw new Error(`"${d.name}" drew no shapes the editor can read.`);
@@ -18396,7 +18396,10 @@ function createVectorGenerationToolProvider(controller, options) {
18396
18396
  };
18397
18397
  return {
18398
18398
  id: _nullishCoalesce(options.id, () => ( "vector-generation")),
18399
- ...options.namespace ? { namespace: options.namespace } : {},
18399
+ ...options.namespace !== void 0 ? { namespace: options.namespace } : {},
18400
+ title: "Vector generation",
18401
+ description: "Generate vector art from a prompt with a configured model, and regenerate it.",
18402
+ skill: "pixerate-vector",
18400
18403
  tools: () => readOnly() ? [list] : [list, generate, regenerate],
18401
18404
  // The write tools come and go with a read-only state that can change.
18402
18405
  ...typeof options.readOnly === "function" ? { subscribe: (notify) => controller.subscribe(() => notify()) } : {}
@@ -18551,9 +18554,12 @@ function createVectorEffectsToolProvider(controller, options = {}) {
18551
18554
  const effects = _optionalChain([g, 'optionalAccess', _753 => _753.providerEffect]) ? [info(g)] : [];
18552
18555
  return { target: id, effect: _nullishCoalesce(removed, () => ( effects[0])), effects };
18553
18556
  };
18554
- return _chunk3V746PF4cjs.createEffectToolProvider.call(void 0, {
18557
+ return _chunkRUZQMYXHcjs.createEffectToolProvider.call(void 0, {
18555
18558
  id: _nullishCoalesce(options.id, () => ( "vector-effects")),
18556
18559
  namespace: options.namespace,
18560
+ title: "Vector effects",
18561
+ description: "Provider effects placed in the vector document as effect groups.",
18562
+ skill: "pixerate-vector",
18557
18563
  target: { noun: "group", id: `For apply_effect: "document" for the top level, or a group id to put the picture in. For update_effect and remove_effect: the effect group's id from list_applied_effects.` },
18558
18564
  applyUses: ["title", "overlay", "generator", "interactive"],
18559
18565
  applyDetails: `Only vector effects (kind vector: lower thirds, stickers, loaders, badges) can be added: the effect's SVG at rest becomes a group of editable shapes, fitted into the middle half of the document and selected; move or scale it like any group. Its motion plays in the animation editor (add_vector_effect there). update_effect with effect "picture" draws it again with new values; remove_effect keeps the shapes as a plain group. index, enabled and opacity do not apply.`,
@@ -541,7 +541,7 @@ import {
541
541
  EffectsSlot,
542
542
  createEffectToolProvider,
543
543
  resolveEffectValues
544
- } from "../chunk-KHMVB3SJ.js";
544
+ } from "../chunk-7KWJEYIK.js";
545
545
  import "../chunk-V2ZCJRDM.js";
546
546
  import {
547
547
  GRAIN_PATTERNS
@@ -18396,7 +18396,10 @@ function createVectorGenerationToolProvider(controller, options) {
18396
18396
  };
18397
18397
  return {
18398
18398
  id: options.id ?? "vector-generation",
18399
- ...options.namespace ? { namespace: options.namespace } : {},
18399
+ ...options.namespace !== void 0 ? { namespace: options.namespace } : {},
18400
+ title: "Vector generation",
18401
+ description: "Generate vector art from a prompt with a configured model, and regenerate it.",
18402
+ skill: "pixerate-vector",
18400
18403
  tools: () => readOnly() ? [list] : [list, generate, regenerate],
18401
18404
  // The write tools come and go with a read-only state that can change.
18402
18405
  ...typeof options.readOnly === "function" ? { subscribe: (notify) => controller.subscribe(() => notify()) } : {}
@@ -18554,6 +18557,9 @@ function createVectorEffectsToolProvider(controller, options = {}) {
18554
18557
  return createEffectToolProvider({
18555
18558
  id: options.id ?? "vector-effects",
18556
18559
  namespace: options.namespace,
18560
+ title: "Vector effects",
18561
+ description: "Provider effects placed in the vector document as effect groups.",
18562
+ skill: "pixerate-vector",
18557
18563
  target: { noun: "group", id: `For apply_effect: "document" for the top level, or a group id to put the picture in. For update_effect and remove_effect: the effect group's id from list_applied_effects.` },
18558
18564
  applyUses: ["title", "overlay", "generator", "interactive"],
18559
18565
  applyDetails: `Only vector effects (kind vector: lower thirds, stickers, loaders, badges) can be added: the effect's SVG at rest becomes a group of editable shapes, fitted into the middle half of the document and selected; move or scale it like any group. Its motion plays in the animation editor (add_vector_effect there). update_effect with effect "picture" draws it again with new values; remove_effect keeps the shapes as a plain group. index, enabled and opacity do not apply.`,
@@ -11,7 +11,7 @@ import { type VideoClip } from './types.cjs';
11
11
  export interface VideoEffectsToolProviderOptions {
12
12
  /** Provider id (unique per registry). Default `video-effects`. */
13
13
  id?: string;
14
- /** Always prefix tool names with `<namespace>__`. */
14
+ /** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
15
15
  namespace?: string;
16
16
  /** The project cannot be edited: write tools are hidden. A string is the reason. */
17
17
  readOnly?: boolean | string | (() => boolean | string);
@@ -11,7 +11,7 @@ import { type VideoClip } from './types.js';
11
11
  export interface VideoEffectsToolProviderOptions {
12
12
  /** Provider id (unique per registry). Default `video-effects`. */
13
13
  id?: string;
14
- /** Always prefix tool names with `<namespace>__`. */
14
+ /** Tool-name prefix (`<namespace>__<name>`); defaults to the provider id, `''` for bare names. */
15
15
  namespace?: string;
16
16
  /** The project cannot be edited: write tools are hidden. A string is the reason. */
17
17
  readOnly?: boolean | string | (() => boolean | string);