@elementor/editor-components 3.35.0-440 → 3.35.0-441

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.js CHANGED
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
36
36
 
37
37
  // src/init.ts
38
38
  var import_editor = require("@elementor/editor");
39
- var import_editor_canvas9 = require("@elementor/editor-canvas");
39
+ var import_editor_canvas8 = require("@elementor/editor-canvas");
40
40
  var import_editor_documents13 = require("@elementor/editor-documents");
41
41
  var import_editor_editing_panel8 = require("@elementor/editor-editing-panel");
42
42
  var import_editor_elements_panel = require("@elementor/editor-elements-panel");
@@ -3151,10 +3151,9 @@ var import_react_dom = require("react-dom");
3151
3151
  var import_i18n23 = require("@wordpress/i18n");
3152
3152
 
3153
3153
  // src/hooks/use-canvas-document.ts
3154
- var import_editor_canvas7 = require("@elementor/editor-canvas");
3155
3154
  var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
3156
3155
  function useCanvasDocument() {
3157
- return (0, import_editor_v1_adapters6.__privateUseListenTo)((0, import_editor_v1_adapters6.commandEndEvent)("editor/documents/attach-preview"), () => (0, import_editor_canvas7.getCanvasIframeDocument)());
3156
+ return (0, import_editor_v1_adapters6.__privateUseListenTo)((0, import_editor_v1_adapters6.commandEndEvent)("editor/documents/attach-preview"), () => (0, import_editor_v1_adapters6.getCanvasIframeDocument)());
3158
3157
  }
3159
3158
 
3160
3159
  // src/hooks/use-element-rect.ts
@@ -4342,7 +4341,7 @@ function hasOverrides(settings) {
4342
4341
  var import_editor_mcp3 = require("@elementor/editor-mcp");
4343
4342
 
4344
4343
  // src/mcp/save-as-component-tool.ts
4345
- var import_editor_canvas8 = require("@elementor/editor-canvas");
4344
+ var import_editor_canvas7 = require("@elementor/editor-canvas");
4346
4345
  var import_editor_elements19 = require("@elementor/editor-elements");
4347
4346
  var import_editor_mcp2 = require("@elementor/editor-mcp");
4348
4347
  var import_http_client2 = require("@elementor/http-client");
@@ -4527,17 +4526,17 @@ Use this tool when the user wants to:
4527
4526
  - Element elType is a 'widget'
4528
4527
 
4529
4528
  # **CRITICAL - REQUIRED RESOURCES (Must read before using this tool)**
4530
- 1. [${import_editor_canvas8.DOCUMENT_STRUCTURE_URI}]
4529
+ 1. [${import_editor_canvas7.DOCUMENT_STRUCTURE_URI}]
4531
4530
  **MANDATORY** - Required to understand the document structure and identify child elements for overridable properties.
4532
4531
  Use this resource to find element IDs and understand the element hierarchy.
4533
4532
 
4534
- 2. [${import_editor_canvas8.WIDGET_SCHEMA_URI}]
4533
+ 2. [${import_editor_canvas7.WIDGET_SCHEMA_URI}]
4535
4534
  **MANDATORY** - Required to understand which properties are available for each widget type.
4536
4535
  Use this to identify available propKeys in the atomic_props_schema for child elements.
4537
4536
 
4538
4537
  # Instructions - MUST FOLLOW IN ORDER
4539
4538
  ## Step 1: Identify the Target Element
4540
- 1. Read the [${import_editor_canvas8.DOCUMENT_STRUCTURE_URI}] resource to understand the document structure
4539
+ 1. Read the [${import_editor_canvas7.DOCUMENT_STRUCTURE_URI}] resource to understand the document structure
4541
4540
  2. Locate the element you want to save as a component by its element_id
4542
4541
  3. Verify the element type is a valid element type
4543
4542
  4. Ensure the element is not locked and is not already a component
@@ -4547,11 +4546,11 @@ Do this step to make child element properties customizable.
4547
4546
  Skip that step ONLY if the user explicitly requests to not make any properties customizable.
4548
4547
 
4549
4548
  1. **Identify Child Elements**
4550
- - Use the [${import_editor_canvas8.DOCUMENT_STRUCTURE_URI}] resource to find all child elements
4549
+ - Use the [${import_editor_canvas7.DOCUMENT_STRUCTURE_URI}] resource to find all child elements
4551
4550
  - Note the elementId and widgetType/elType of each child element you want to customize
4552
4551
 
4553
4552
  2. **Find Available Properties**
4554
- - Use the [${import_editor_canvas8.WIDGET_SCHEMA_URI}] resource to find the child element's widget type schema
4553
+ - Use the [${import_editor_canvas7.WIDGET_SCHEMA_URI}] resource to find the child element's widget type schema
4555
4554
  - Review the atomic_props_schema to find available propKeys (ONLY use top-level props)
4556
4555
  - Common propKeys include: "text", "url", "tag", "size", etc.
4557
4556
  - Use only the top level properties, do not use nested properties.
@@ -4570,7 +4569,7 @@ Call the tool with:
4570
4569
 
4571
4570
  # CONSTRAINTS
4572
4571
  - NEVER try to override properties of the parent element itself - ONLY child elements
4573
- - NEVER use invalid propKeys - always verify against the widget's atomic_props_schema in [${import_editor_canvas8.WIDGET_SCHEMA_URI}]
4572
+ - NEVER use invalid propKeys - always verify against the widget's atomic_props_schema in [${import_editor_canvas7.WIDGET_SCHEMA_URI}]
4574
4573
  - Property keys must exist in the child element's atomic_props_schema
4575
4574
  - Element IDs must exist within the target element's children
4576
4575
  - When tool execution fails, read the error message and adjust accordingly
@@ -4579,7 +4578,7 @@ Call the tool with:
4579
4578
  saveAsComponentPrompt.parameter(
4580
4579
  "element_id",
4581
4580
  `**MANDATORY** The unique identifier of the element to save as a component.
4582
- Use the [${import_editor_canvas8.DOCUMENT_STRUCTURE_URI}] resource to find available element IDs.`
4581
+ Use the [${import_editor_canvas7.DOCUMENT_STRUCTURE_URI}] resource to find available element IDs.`
4583
4582
  );
4584
4583
  saveAsComponentPrompt.parameter(
4585
4584
  "component_name",
@@ -4604,8 +4603,8 @@ Structure:
4604
4603
  \`\`\`
4605
4604
 
4606
4605
  To populate this correctly:
4607
- 1. Use [${import_editor_canvas8.DOCUMENT_STRUCTURE_URI}] to find child element IDs and their widgetType
4608
- 2. Use [${import_editor_canvas8.WIDGET_SCHEMA_URI}] to find the atomic_props_schema for each child element's widgetType
4606
+ 1. Use [${import_editor_canvas7.DOCUMENT_STRUCTURE_URI}] to find child element IDs and their widgetType
4607
+ 2. Use [${import_editor_canvas7.WIDGET_SCHEMA_URI}] to find the atomic_props_schema for each child element's widgetType
4609
4608
  3. Only include properties you want to be customizable in component instances
4610
4609
  4. Provide a unique, user-friendly label for each property (e.g., "Hero Headline", "CTA Button Text")`
4611
4610
  );
@@ -5009,7 +5008,7 @@ function init() {
5009
5008
  import_editor_styles_repository2.stylesRepository.register(componentsStylesProvider);
5010
5009
  (0, import_store80.__registerSlice)(slice);
5011
5010
  (0, import_editor_panels4.__registerPanel)(panel);
5012
- (0, import_editor_canvas9.registerElementType)(
5011
+ (0, import_editor_canvas8.registerElementType)(
5013
5012
  COMPONENT_WIDGET_TYPE,
5014
5013
  (options) => createComponentType({ ...options, showLockedByModal: openEditModeDialog })
5015
5014
  );
@@ -5067,9 +5066,9 @@ function init() {
5067
5066
  condition: (_, elementType) => elementType.key === "e-component",
5068
5067
  component: InstanceEditingPanel
5069
5068
  });
5070
- import_editor_canvas9.settingsTransformersRegistry.register("component-instance", componentInstanceTransformer);
5071
- import_editor_canvas9.settingsTransformersRegistry.register("overridable", componentOverridableTransformer);
5072
- import_editor_canvas9.settingsTransformersRegistry.register("override", componentOverrideTransformer);
5069
+ import_editor_canvas8.settingsTransformersRegistry.register("component-instance", componentInstanceTransformer);
5070
+ import_editor_canvas8.settingsTransformersRegistry.register("overridable", componentOverridableTransformer);
5071
+ import_editor_canvas8.settingsTransformersRegistry.register("override", componentOverrideTransformer);
5073
5072
  initRegenerateOverrideKeys();
5074
5073
  initCleanupOverridablePropsOnDelete();
5075
5074
  initMcp();