@elementor/editor-canvas 4.1.0-838 → 4.1.0-beta2

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/index.d.mts CHANGED
@@ -319,8 +319,8 @@ type ImportedGlobalStylesPayload = {
319
319
  data: StyleVariables;
320
320
  };
321
321
  global_classes?: {
322
- items: StyleDefinitionsMap;
323
- order: StyleDefinitionID[];
322
+ added_items: StyleDefinitionsMap;
323
+ added_items_order: StyleDefinitionID[];
324
324
  };
325
325
  };
326
326
 
package/dist/index.d.ts CHANGED
@@ -319,8 +319,8 @@ type ImportedGlobalStylesPayload = {
319
319
  data: StyleVariables;
320
320
  };
321
321
  global_classes?: {
322
- items: StyleDefinitionsMap;
323
- order: StyleDefinitionID[];
322
+ added_items: StyleDefinitionsMap;
323
+ added_items_order: StyleDefinitionID[];
324
324
  };
325
325
  };
326
326
 
package/dist/index.js CHANGED
@@ -121,6 +121,9 @@ function isWidgetAvailableForLLM(config) {
121
121
  if (config.meta?.llm_support === false) {
122
122
  return false;
123
123
  }
124
+ if (config.title === "Component") {
125
+ return false;
126
+ }
124
127
  if (config.atomic_props_schema) {
125
128
  return true;
126
129
  }
@@ -342,7 +345,7 @@ Variables from the user context ARE NOT SUPPORTED AND WILL RESOLVE IN ERROR.
342
345
 
343
346
  // src/init.tsx
344
347
  var import_editor = require("@elementor/editor");
345
- var import_editor_mcp3 = require("@elementor/editor-mcp");
348
+ var import_editor_mcp4 = require("@elementor/editor-mcp");
346
349
 
347
350
  // src/components/classes-rename.tsx
348
351
  var import_react = require("react");
@@ -3882,6 +3885,7 @@ var import_editor_elements13 = require("@elementor/editor-elements");
3882
3885
  var import_editor_elements11 = require("@elementor/editor-elements");
3883
3886
  var import_editor_props6 = require("@elementor/editor-props");
3884
3887
  var import_editor_styles5 = require("@elementor/editor-styles");
3888
+ var import_editor_v1_adapters19 = require("@elementor/editor-v1-adapters");
3885
3889
  function resolvePropValue(value, forceKey) {
3886
3890
  const Utils = window.elementorV2.editorVariables.Utils;
3887
3891
  return import_editor_props6.Schema.adjustLlmPropValueSchema(value, {
@@ -3983,6 +3987,15 @@ var doUpdateElementProperty = (params) => {
3983
3987
  }
3984
3988
  const propKey = elementPropSchema[propertyName].key;
3985
3989
  const value = resolvePropValue(propertyValue, propKey);
3990
+ const { valid, jsonSchema } = import_editor_props6.Schema.validatePropValue(elementPropSchema[propertyName], propertyValue);
3991
+ if (!valid) {
3992
+ throw new Error(
3993
+ `Invalid PropValue for elementId: ${elementId}. PropKey: ${propKey}, PropValue: ${JSON.stringify(
3994
+ propertyValue
3995
+ )}
3996
+ Expected Schema: ${jsonSchema}`
3997
+ );
3998
+ }
3986
3999
  (0, import_editor_elements11.updateElementSettings)({
3987
4000
  id: elementId,
3988
4001
  props: {
@@ -3990,6 +4003,7 @@ var doUpdateElementProperty = (params) => {
3990
4003
  },
3991
4004
  withHistory: false
3992
4005
  });
4006
+ (0, import_editor_v1_adapters19.__privateRunCommandSync)("document/save/set-is-modified", { status: true }, { internal: true });
3993
4007
  };
3994
4008
 
3995
4009
  // src/mcp/utils/validate-input.ts
@@ -4085,6 +4099,7 @@ var CompositionBuilder = class _CompositionBuilder {
4085
4099
  rootContainers = [];
4086
4100
  api = {
4087
4101
  createElement: import_editor_elements13.createElement,
4102
+ deleteElement: import_editor_elements13.deleteElement,
4088
4103
  getWidgetsCache: import_editor_elements13.getWidgetsCache,
4089
4104
  generateElementId: import_editor_elements13.generateElementId,
4090
4105
  getContainer: import_editor_elements13.getContainer,
@@ -4135,7 +4150,8 @@ var CompositionBuilder = class _CompositionBuilder {
4135
4150
  elements: children,
4136
4151
  editor_settings: {
4137
4152
  title: node.getAttribute("configuration-id") ?? void 0
4138
- }
4153
+ },
4154
+ elType: "widget"
4139
4155
  };
4140
4156
  if (isWidget) {
4141
4157
  return { ...base, elType: "widget", widgetType: elementTag };
@@ -4167,12 +4183,6 @@ var CompositionBuilder = class _CompositionBuilder {
4167
4183
  }
4168
4184
  return errors;
4169
4185
  }
4170
- findSchemaForNode(node) {
4171
- const widgetsCache = this.api.getWidgetsCache() || {};
4172
- const widgetType = node.tagName;
4173
- const widgetData = widgetsCache[widgetType]?.atomic_props_schema;
4174
- return widgetData || null;
4175
- }
4176
4186
  matchNodeByConfigId(configId) {
4177
4187
  const node = this.xml.querySelector(`[configuration-id="${configId}"]`);
4178
4188
  if (!node) {
@@ -4294,13 +4304,24 @@ ${childTypeErrors.join("\n")}`);
4294
4304
  const children = Array.from(this.xml.children);
4295
4305
  for (const childNode of children) {
4296
4306
  const modelTree = this.buildModelTree(childNode, widgetsCache);
4297
- const newElement = this.api.createElement({
4298
- container: rootContainer,
4299
- model: modelTree,
4300
- options: { useHistory: false }
4301
- });
4302
- this.rootContainers.push(newElement);
4303
- await this.awaitViewRender(newElement);
4307
+ try {
4308
+ const newElement = this.api.createElement({
4309
+ container: rootContainer,
4310
+ model: modelTree,
4311
+ options: { useHistory: false }
4312
+ });
4313
+ this.rootContainers.push(newElement);
4314
+ await this.awaitViewRender(newElement);
4315
+ } catch (e) {
4316
+ const attemptToRestoreInvalidContainer = this.api.getContainer(modelTree.id);
4317
+ if (attemptToRestoreInvalidContainer) {
4318
+ this.api.deleteElement({
4319
+ container: attemptToRestoreInvalidContainer,
4320
+ options: { useHistory: false }
4321
+ });
4322
+ }
4323
+ throw e;
4324
+ }
4304
4325
  }
4305
4326
  const { configErrors, styleErrors, invalidStyles } = await this.applyProperties();
4306
4327
  return {
@@ -4324,6 +4345,7 @@ function getCompositionTargetContainer(documentContainer, documentType) {
4324
4345
 
4325
4346
  // src/mcp/tools/build-composition/prompt.ts
4326
4347
  var import_editor_mcp2 = require("@elementor/editor-mcp");
4348
+ var BUILD_COMPOSITIONS_GUIDE_URI = "elementor://canvas/tools/build-compositions-guide";
4327
4349
  var generatePrompt = () => {
4328
4350
  const buildCompositionsToolPrompt = (0, import_editor_mcp2.toolPrompts)("build-compositions");
4329
4351
  buildCompositionsToolPrompt.description(`
@@ -4505,12 +4527,25 @@ var outputSchema = {
4505
4527
 
4506
4528
  // src/mcp/tools/build-composition/tool.ts
4507
4529
  var initBuildCompositionsTool = (reg) => {
4508
- const { addTool } = reg;
4530
+ const { addTool, resource } = reg;
4531
+ resource(
4532
+ "build-compositions-guide",
4533
+ BUILD_COMPOSITIONS_GUIDE_URI,
4534
+ {
4535
+ title: "Build Compositions Guide",
4536
+ description: "Detailed guide for using the build-compositions tool",
4537
+ mimeType: "text/plain"
4538
+ },
4539
+ async (uri) => ({
4540
+ contents: [{ uri: uri.href, mimeType: "text/plain", text: generatePrompt() }]
4541
+ })
4542
+ );
4509
4543
  addTool({
4510
4544
  name: "build-compositions",
4511
- description: generatePrompt(),
4545
+ description: "Build V4 element compositions on the Elementor canvas. Read the guide resource before use.",
4512
4546
  schema: inputSchema,
4513
4547
  requiredResources: [
4548
+ { description: "Build compositions guide", uri: BUILD_COMPOSITIONS_GUIDE_URI },
4514
4549
  { description: "Widgets schema", uri: WIDGET_SCHEMA_URI },
4515
4550
  { description: "Styles schema", uri: STYLE_SCHEMA_URI },
4516
4551
  { description: "Global Classes", uri: "elementor://global-classes" },
@@ -4534,29 +4569,38 @@ var initBuildCompositionsTool = (reg) => {
4534
4569
  try {
4535
4570
  const compositionBuilder = CompositionBuilder.fromXMLString(xmlStructure, {
4536
4571
  createElement: import_editor_elements14.createElement,
4572
+ deleteElement: import_editor_elements14.deleteElement,
4537
4573
  getWidgetsCache: import_editor_elements14.getWidgetsCache
4538
4574
  });
4539
4575
  compositionBuilder.setElementConfig(elementConfig);
4540
4576
  compositionBuilder.setStylesConfig(stylesConfig);
4541
4577
  compositionBuilder.setCustomCSS(customCSS);
4542
- const { invalidStyles, rootContainers: generatedRootContainers } = await compositionBuilder.build(targetContainer);
4578
+ const {
4579
+ invalidStyles,
4580
+ configErrors,
4581
+ rootContainers: generatedRootContainers
4582
+ } = await compositionBuilder.build(targetContainer);
4543
4583
  rootContainers.push(...generatedRootContainers);
4544
4584
  generatedXML = new XMLSerializer().serializeToString(compositionBuilder.getXML());
4545
- Object.entries(invalidStyles).forEach(([elementId, rawCssRules]) => {
4546
- const customCss = {
4547
- value: rawCssRules.join(";\n")
4548
- };
4549
- doUpdateElementProperty({
4550
- elementId,
4551
- propertyName: "_styles",
4552
- propertyValue: {
4553
- _styles: {
4554
- custom_css: customCss
4555
- }
4556
- },
4557
- elementType: "widget"
4585
+ if (configErrors.length) {
4586
+ errors.push(...configErrors.map((msg) => new Error(msg)));
4587
+ } else {
4588
+ Object.entries(invalidStyles).forEach(([elementId, rawCssRules]) => {
4589
+ const customCss = {
4590
+ value: rawCssRules.join(";\n")
4591
+ };
4592
+ doUpdateElementProperty({
4593
+ elementId,
4594
+ propertyName: "_styles",
4595
+ propertyValue: {
4596
+ _styles: {
4597
+ custom_css: customCss
4598
+ }
4599
+ },
4600
+ elementType: "widget"
4601
+ });
4558
4602
  });
4559
- });
4603
+ }
4560
4604
  } catch (error) {
4561
4605
  errors.push(error);
4562
4606
  }
@@ -4638,7 +4682,12 @@ function assertCompositionXmlUsesV4WidgetsOnly(xmlStructure) {
4638
4682
  var import_editor_elements15 = require("@elementor/editor-elements");
4639
4683
 
4640
4684
  // src/mcp/tools/configure-element/prompt.ts
4641
- var configureElementToolPrompt = `Configure an existing element on the page.
4685
+ var import_editor_mcp3 = require("@elementor/editor-mcp");
4686
+ var CONFIGURE_ELEMENT_GUIDE_URI = "elementor://canvas/tools/configure-element-guide";
4687
+ var generatePrompt2 = () => {
4688
+ const configureElementToolPrompt = (0, import_editor_mcp3.toolPrompts)("configure-element");
4689
+ configureElementToolPrompt.description(`
4690
+ Configure an existing element on the page.
4642
4691
 
4643
4692
  # **CRITICAL - REQUIRED INFORMATION (Must read before using this tool)**
4644
4693
  1. [${WIDGET_SCHEMA_URI}]
@@ -4653,12 +4702,6 @@ Before using this tool, check the definitions of the elements PropTypes at the r
4653
4702
  All widgets share a common _style property for styling, which uses the common styles schema.
4654
4703
  Retrieve and check the common styles schema at the resource list "styles-schema" at editor-canvas__elementor://styles/schema/{category}
4655
4704
 
4656
- # Parameters
4657
- - propertiesToChange: An object containing the properties to change, with their new values. MANDATORY. When updating a style only, provide an empty object.
4658
- - stylePropertiesToChange: An object containing the style properties to change, with their new values. OPTIONAL
4659
- - elementId: The ID of the element to configure. MANDATORY
4660
- - elementType: The type of the element to configure (i.e. e-heading, e-button). MANDATORY
4661
-
4662
4705
  # When to use this tool
4663
4706
  When a user requires to change anything in an element, such as updating text, colors, sizes, or other configurable properties.
4664
4707
  This tool handles elements of type "widget".
@@ -4687,7 +4730,7 @@ You can use multiple property changes at once by providing multiple entries in t
4687
4730
  Some properties are nested, use the root property name, then objects with nested values inside, as the complete schema suggests.
4688
4731
 
4689
4732
  Make sure you have the "widget-schema-by-type" resource available to retrieve the PropType schema for the element type you are configuring.
4690
- Make sure you have to "styles-schema" resources available to retrieve the common styles schema.
4733
+ Make sure you have the "styles-schema" resources available to retrieve the common styles schema.
4691
4734
 
4692
4735
  # How to configure elements
4693
4736
  We use a dedicated PropType Schema for configuring elements, including styles. When you configure an element, you must use the EXACT PropType Value as defined in the schema.
@@ -4695,8 +4738,21 @@ For styleProperties, use the style schema provided, as it also uses the PropType
4695
4738
  For all non-primitive types, provide the key property as defined in the schema as $$type in the generated object, as it is MANDATORY for parsing.
4696
4739
 
4697
4740
  Use the EXACT "PROP-TYPE" Schema given, and ALWAYS include the "key" property from the original configuration for every property you are changing.
4698
-
4699
- # Example
4741
+ `);
4742
+ configureElementToolPrompt.parameter("elementId", "The ID of the element to configure. MANDATORY.");
4743
+ configureElementToolPrompt.parameter(
4744
+ "elementType",
4745
+ "The type of the element to configure (i.e. e-heading, e-button). MANDATORY."
4746
+ );
4747
+ configureElementToolPrompt.parameter(
4748
+ "propertiesToChange",
4749
+ "An object containing the properties to change, with their new values. MANDATORY. When updating a style only, provide an empty object."
4750
+ );
4751
+ configureElementToolPrompt.parameter(
4752
+ "stylePropertiesToChange",
4753
+ "An object containing the style properties to change, with their new values. OPTIONAL."
4754
+ );
4755
+ configureElementToolPrompt.example(`
4700
4756
  \`\`\`json
4701
4757
  {
4702
4758
  propertiesToChange: {
@@ -4712,7 +4768,7 @@ Use the EXACT "PROP-TYPE" Schema given, and ALWAYS include the "key" property fr
4712
4768
  },
4713
4769
  stylePropertiesToChange: {
4714
4770
  'line-height': {
4715
- $$type: 'size', // MANDATORY do not forget to include the correct $$type for every property
4771
+ $$type: 'size',
4716
4772
  value: {
4717
4773
  size: {
4718
4774
  $$type: 'number',
@@ -4729,11 +4785,20 @@ Use the EXACT "PROP-TYPE" Schema given, and ALWAYS include the "key" property fr
4729
4785
  elementType: 'element-type'
4730
4786
  };
4731
4787
  \`\`\`
4788
+ `);
4789
+ configureElementToolPrompt.instruction(
4790
+ "The $$type property is MANDATORY for every value; it is required to parse the value and apply application-level effects."
4791
+ );
4792
+ configureElementToolPrompt.instruction(`
4793
+ V4 only: If MCP fails, give manual steps using V4 UI.
4732
4794
 
4733
- <IMPORTANT>
4734
- The $$type property is MANDATORY for every value, it is required to parse the value and apply application-level effects.
4735
- </IMPORTANT>
4736
- `;
4795
+ V4 Editor structure:
4796
+ Panel tabs: General (\u2192 Settings section: ID, Tag, Link), Style, Interactions.
4797
+ NO Advanced tab. Never mention Advanced tab.
4798
+ `);
4799
+ return configureElementToolPrompt.prompt();
4800
+ };
4801
+ var CONFIGURE_ELEMENT_GUIDE_TEXT = generatePrompt2();
4737
4802
 
4738
4803
  // src/mcp/tools/configure-element/schema.ts
4739
4804
  var import_schema3 = require("@elementor/schema");
@@ -4759,15 +4824,28 @@ var outputSchema2 = {
4759
4824
 
4760
4825
  // src/mcp/tools/configure-element/tool.ts
4761
4826
  var initConfigureElementTool = (reg) => {
4762
- const { addTool } = reg;
4827
+ const { addTool, resource } = reg;
4828
+ resource(
4829
+ "configure-element-guide",
4830
+ CONFIGURE_ELEMENT_GUIDE_URI,
4831
+ {
4832
+ title: "Configure Element Guide",
4833
+ description: "Detailed guide for using the configure-element tool",
4834
+ mimeType: "text/plain"
4835
+ },
4836
+ async (uri) => ({
4837
+ contents: [{ uri: uri.href, mimeType: "text/plain", text: generatePrompt2() }]
4838
+ })
4839
+ );
4763
4840
  addTool({
4764
4841
  name: "configure-element",
4765
- description: configureElementToolPrompt,
4842
+ description: "Configure an existing V4 element's properties and styles. Read the guide resource before use.",
4766
4843
  schema: inputSchema2,
4767
4844
  outputSchema: outputSchema2,
4768
4845
  requiredResources: [
4769
4846
  { description: "Widgets schema", uri: WIDGET_SCHEMA_URI },
4770
- { description: "Styles schema", uri: STYLE_SCHEMA_URI }
4847
+ { description: "Styles schema", uri: STYLE_SCHEMA_URI },
4848
+ { description: "Configure element guide", uri: CONFIGURE_ELEMENT_GUIDE_URI }
4771
4849
  ],
4772
4850
  modelPreferences: {
4773
4851
  hints: [{ name: "claude-sonnet-4-5" }],
@@ -4965,15 +5043,6 @@ var initGetElementConfigTool = (reg) => {
4965
5043
 
4966
5044
  // src/mcp/canvas-mcp.ts
4967
5045
  var initCanvasMcp = (reg) => {
4968
- const { setMCPDescription } = reg;
4969
- setMCPDescription(
4970
- `Everything related to V4 ( Atomic ) canvas.
4971
- # Canvas workflow for new compositions
4972
- - Configure elements settings and styles
4973
- - Build compositions/sections out of V4 atomic elements using context aware designs using the website resources
4974
- - Get and retrieve element configuration values
4975
- `
4976
- );
4977
5046
  initWidgetsSchemaResource(reg);
4978
5047
  initAvailableWidgetsResource(reg);
4979
5048
  initDocumentStructureResource(reg);
@@ -5101,14 +5170,14 @@ Note: The "size" property controls image resolution/loading, not visual size. Se
5101
5170
  // src/prevent-link-in-link-commands.ts
5102
5171
  var import_editor_elements17 = require("@elementor/editor-elements");
5103
5172
  var import_editor_notifications3 = require("@elementor/editor-notifications");
5104
- var import_editor_v1_adapters19 = require("@elementor/editor-v1-adapters");
5173
+ var import_editor_v1_adapters20 = require("@elementor/editor-v1-adapters");
5105
5174
  var import_i18n4 = require("@wordpress/i18n");
5106
5175
  function initLinkInLinkPrevention() {
5107
- (0, import_editor_v1_adapters19.blockCommand)({
5176
+ (0, import_editor_v1_adapters20.blockCommand)({
5108
5177
  command: "document/elements/paste",
5109
5178
  condition: blockLinkInLinkPaste
5110
5179
  });
5111
- (0, import_editor_v1_adapters19.blockCommand)({
5180
+ (0, import_editor_v1_adapters20.blockCommand)({
5112
5181
  command: "document/elements/move",
5113
5182
  condition: blockLinkInLinkMove
5114
5183
  });
@@ -5184,7 +5253,7 @@ function shouldBlock(sourceElements, targetElements) {
5184
5253
  // src/style-commands/paste-style.ts
5185
5254
  var import_editor_elements20 = require("@elementor/editor-elements");
5186
5255
  var import_editor_props10 = require("@elementor/editor-props");
5187
- var import_editor_v1_adapters21 = require("@elementor/editor-v1-adapters");
5256
+ var import_editor_v1_adapters22 = require("@elementor/editor-v1-adapters");
5188
5257
 
5189
5258
  // src/utils/command-utils.ts
5190
5259
  var import_editor_elements18 = require("@elementor/editor-elements");
@@ -5231,9 +5300,9 @@ function getTitleForContainers(containers) {
5231
5300
  // src/style-commands/undoable-actions/paste-element-style.ts
5232
5301
  var import_editor_elements19 = require("@elementor/editor-elements");
5233
5302
  var import_editor_styles_repository4 = require("@elementor/editor-styles-repository");
5234
- var import_editor_v1_adapters20 = require("@elementor/editor-v1-adapters");
5303
+ var import_editor_v1_adapters21 = require("@elementor/editor-v1-adapters");
5235
5304
  var import_i18n6 = require("@wordpress/i18n");
5236
- var undoablePasteElementStyle = () => (0, import_editor_v1_adapters20.undoable)(
5305
+ var undoablePasteElementStyle = () => (0, import_editor_v1_adapters21.undoable)(
5237
5306
  {
5238
5307
  do: ({ containers, newStyle }) => {
5239
5308
  return containers.map((container) => {
@@ -5309,12 +5378,12 @@ var undoablePasteElementStyle = () => (0, import_editor_v1_adapters20.undoable)(
5309
5378
  // src/style-commands/paste-style.ts
5310
5379
  function initPasteStyleCommand() {
5311
5380
  const pasteElementStyleCommand = undoablePasteElementStyle();
5312
- (0, import_editor_v1_adapters21.blockCommand)({
5381
+ (0, import_editor_v1_adapters22.blockCommand)({
5313
5382
  command: "document/elements/paste-style",
5314
5383
  condition: hasAtomicWidgets
5315
5384
  });
5316
- (0, import_editor_v1_adapters21.__privateListenTo)(
5317
- (0, import_editor_v1_adapters21.commandStartEvent)("document/elements/paste-style"),
5385
+ (0, import_editor_v1_adapters22.__privateListenTo)(
5386
+ (0, import_editor_v1_adapters22.commandStartEvent)("document/elements/paste-style"),
5318
5387
  (e) => pasteStyles(e.args, pasteElementStyleCommand)
5319
5388
  );
5320
5389
  }
@@ -5365,14 +5434,14 @@ function pasteClasses(containers, classes) {
5365
5434
  }
5366
5435
 
5367
5436
  // src/style-commands/reset-style.ts
5368
- var import_editor_v1_adapters23 = require("@elementor/editor-v1-adapters");
5437
+ var import_editor_v1_adapters24 = require("@elementor/editor-v1-adapters");
5369
5438
 
5370
5439
  // src/style-commands/undoable-actions/reset-element-style.ts
5371
5440
  var import_editor_elements21 = require("@elementor/editor-elements");
5372
5441
  var import_editor_styles_repository5 = require("@elementor/editor-styles-repository");
5373
- var import_editor_v1_adapters22 = require("@elementor/editor-v1-adapters");
5442
+ var import_editor_v1_adapters23 = require("@elementor/editor-v1-adapters");
5374
5443
  var import_i18n7 = require("@wordpress/i18n");
5375
- var undoableResetElementStyle = () => (0, import_editor_v1_adapters22.undoable)(
5444
+ var undoableResetElementStyle = () => (0, import_editor_v1_adapters23.undoable)(
5376
5445
  {
5377
5446
  do: ({ containers }) => {
5378
5447
  return containers.map((container) => {
@@ -5416,12 +5485,12 @@ var undoableResetElementStyle = () => (0, import_editor_v1_adapters22.undoable)(
5416
5485
  // src/style-commands/reset-style.ts
5417
5486
  function initResetStyleCommand() {
5418
5487
  const resetElementStyles = undoableResetElementStyle();
5419
- (0, import_editor_v1_adapters23.blockCommand)({
5488
+ (0, import_editor_v1_adapters24.blockCommand)({
5420
5489
  command: "document/elements/reset-style",
5421
5490
  condition: hasAtomicWidgets
5422
5491
  });
5423
- (0, import_editor_v1_adapters23.__privateListenTo)(
5424
- (0, import_editor_v1_adapters23.commandStartEvent)("document/elements/reset-style"),
5492
+ (0, import_editor_v1_adapters24.__privateListenTo)(
5493
+ (0, import_editor_v1_adapters24.commandStartEvent)("document/elements/reset-style"),
5425
5494
  (e) => resetStyles(e.args, resetElementStyles)
5426
5495
  );
5427
5496
  }
@@ -5467,8 +5536,14 @@ function init() {
5467
5536
  component: ClassesRename
5468
5537
  });
5469
5538
  initCanvasMcp(
5470
- (0, import_editor_mcp3.getMCPByDomain)("canvas", {
5471
- instructions: mcpDescription
5539
+ (0, import_editor_mcp4.getMCPByDomain)("canvas", {
5540
+ instructions: `Everything related to V4 ( Atomic ) canvas.
5541
+ # Canvas workflow for new compositions
5542
+ - Configure elements settings and styles
5543
+ - Build compositions/sections out of V4 atomic elements using context aware designs using the website resources
5544
+ - Get and retrieve element configuration values
5545
+ `,
5546
+ docs: mcpDescription
5472
5547
  })
5473
5548
  );
5474
5549
  initTabsModelExtensions();