@elementor/editor-canvas 3.35.0-376 → 3.35.0-378
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
|
@@ -1660,6 +1660,7 @@ function createTemplatedElementView({
|
|
|
1660
1660
|
|
|
1661
1661
|
// src/legacy/replacements/inline-editing/inline-editing-elements.tsx
|
|
1662
1662
|
var React5 = __toESM(require("react"));
|
|
1663
|
+
var import_react11 = require("react");
|
|
1663
1664
|
var import_client = require("react-dom/client");
|
|
1664
1665
|
var import_editor_controls2 = require("@elementor/editor-controls");
|
|
1665
1666
|
var import_editor_elements3 = require("@elementor/editor-elements");
|
|
@@ -1788,7 +1789,12 @@ var InlineEditingReplacement = class extends ReplacementBase {
|
|
|
1788
1789
|
setContentValue(value) {
|
|
1789
1790
|
const settingKey = this.getInlineEditablePropertyName();
|
|
1790
1791
|
const valueToSave = value ? import_editor_props3.htmlPropTypeUtil.create(value) : null;
|
|
1791
|
-
|
|
1792
|
+
(0, import_editor_v1_adapters8.__privateRunCommandSync)("document/elements/settings", {
|
|
1793
|
+
container: (0, import_editor_elements3.getContainer)(this.id),
|
|
1794
|
+
settings: {
|
|
1795
|
+
[settingKey]: valueToSave
|
|
1796
|
+
}
|
|
1797
|
+
});
|
|
1792
1798
|
}
|
|
1793
1799
|
getExpectedTag() {
|
|
1794
1800
|
const propsSchema = (0, import_editor_elements3.getElementType)(this.type)?.propsSchema;
|
|
@@ -1811,9 +1817,9 @@ var InlineEditingReplacement = class extends ReplacementBase {
|
|
|
1811
1817
|
InlineEditorApp = ({ classes }) => {
|
|
1812
1818
|
const propValue = this.getContentValue();
|
|
1813
1819
|
const expectedTag = this.getExpectedTag();
|
|
1814
|
-
const wrapperRef =
|
|
1815
|
-
const [isWrapperRendered, setIsWrapperRendered] =
|
|
1816
|
-
|
|
1820
|
+
const wrapperRef = (0, import_react11.useRef)(null);
|
|
1821
|
+
const [isWrapperRendered, setIsWrapperRendered] = (0, import_react11.useState)(false);
|
|
1822
|
+
(0, import_react11.useEffect)(() => {
|
|
1817
1823
|
setIsWrapperRendered(!!wrapperRef.current);
|
|
1818
1824
|
}, []);
|
|
1819
1825
|
return /* @__PURE__ */ React5.createElement(import_ui4.ThemeProvider, null, /* @__PURE__ */ React5.createElement(import_ui4.Box, { ref: wrapperRef }, isWrapperRendered && /* @__PURE__ */ React5.createElement(OutlineOverlay, { element: wrapperRef.current, id: this.id, isSelected: true }), /* @__PURE__ */ React5.createElement(
|
package/dist/index.mjs
CHANGED
|
@@ -1619,14 +1619,15 @@ function createTemplatedElementView({
|
|
|
1619
1619
|
|
|
1620
1620
|
// src/legacy/replacements/inline-editing/inline-editing-elements.tsx
|
|
1621
1621
|
import * as React5 from "react";
|
|
1622
|
+
import { useEffect as useEffect7, useRef as useRef2, useState as useState4 } from "react";
|
|
1622
1623
|
import { createRoot } from "react-dom/client";
|
|
1623
1624
|
import { InlineEditor } from "@elementor/editor-controls";
|
|
1624
|
-
import { getElementType } from "@elementor/editor-elements";
|
|
1625
|
+
import { getContainer, getElementType } from "@elementor/editor-elements";
|
|
1625
1626
|
import {
|
|
1626
1627
|
htmlPropTypeUtil,
|
|
1627
1628
|
stringPropTypeUtil
|
|
1628
1629
|
} from "@elementor/editor-props";
|
|
1629
|
-
import { isExperimentActive } from "@elementor/editor-v1-adapters";
|
|
1630
|
+
import { __privateRunCommandSync as runCommandSync, isExperimentActive } from "@elementor/editor-v1-adapters";
|
|
1630
1631
|
import { Box as Box2, ThemeProvider } from "@elementor/ui";
|
|
1631
1632
|
|
|
1632
1633
|
// src/legacy/replacements/base.ts
|
|
@@ -1750,7 +1751,12 @@ var InlineEditingReplacement = class extends ReplacementBase {
|
|
|
1750
1751
|
setContentValue(value) {
|
|
1751
1752
|
const settingKey = this.getInlineEditablePropertyName();
|
|
1752
1753
|
const valueToSave = value ? htmlPropTypeUtil.create(value) : null;
|
|
1753
|
-
|
|
1754
|
+
runCommandSync("document/elements/settings", {
|
|
1755
|
+
container: getContainer(this.id),
|
|
1756
|
+
settings: {
|
|
1757
|
+
[settingKey]: valueToSave
|
|
1758
|
+
}
|
|
1759
|
+
});
|
|
1754
1760
|
}
|
|
1755
1761
|
getExpectedTag() {
|
|
1756
1762
|
const propsSchema = getElementType(this.type)?.propsSchema;
|
|
@@ -1773,9 +1779,9 @@ var InlineEditingReplacement = class extends ReplacementBase {
|
|
|
1773
1779
|
InlineEditorApp = ({ classes }) => {
|
|
1774
1780
|
const propValue = this.getContentValue();
|
|
1775
1781
|
const expectedTag = this.getExpectedTag();
|
|
1776
|
-
const wrapperRef =
|
|
1777
|
-
const [isWrapperRendered, setIsWrapperRendered] =
|
|
1778
|
-
|
|
1782
|
+
const wrapperRef = useRef2(null);
|
|
1783
|
+
const [isWrapperRendered, setIsWrapperRendered] = useState4(false);
|
|
1784
|
+
useEffect7(() => {
|
|
1779
1785
|
setIsWrapperRendered(!!wrapperRef.current);
|
|
1780
1786
|
}, []);
|
|
1781
1787
|
return /* @__PURE__ */ React5.createElement(ThemeProvider, null, /* @__PURE__ */ React5.createElement(Box2, { ref: wrapperRef }, isWrapperRendered && /* @__PURE__ */ React5.createElement(OutlineOverlay, { element: wrapperRef.current, id: this.id, isSelected: true }), /* @__PURE__ */ React5.createElement(
|
|
@@ -1994,7 +2000,7 @@ import {
|
|
|
1994
2000
|
createElement as createElement6,
|
|
1995
2001
|
deleteElement,
|
|
1996
2002
|
generateElementId,
|
|
1997
|
-
getContainer,
|
|
2003
|
+
getContainer as getContainer2,
|
|
1998
2004
|
getWidgetsCache as getWidgetsCache5
|
|
1999
2005
|
} from "@elementor/editor-elements";
|
|
2000
2006
|
|
|
@@ -2585,7 +2591,7 @@ var initBuildCompositionsTool = (reg) => {
|
|
|
2585
2591
|
const softErrors = [];
|
|
2586
2592
|
const rootContainers = [];
|
|
2587
2593
|
const widgetsCache = getWidgetsCache5() || {};
|
|
2588
|
-
const documentContainer =
|
|
2594
|
+
const documentContainer = getContainer2("document");
|
|
2589
2595
|
try {
|
|
2590
2596
|
const parser = new DOMParser();
|
|
2591
2597
|
xml = parser.parseFromString(xmlStructure, "application/xml");
|
|
@@ -2931,7 +2937,7 @@ Check the styles schema at the resource [${STYLE_SCHEMA_URI.replace(
|
|
|
2931
2937
|
}
|
|
2932
2938
|
|
|
2933
2939
|
// src/mcp/tools/get-element-config/tool.ts
|
|
2934
|
-
import { getContainer as
|
|
2940
|
+
import { getContainer as getContainer3, getElementStyles as getElementStyles2, getWidgetsCache as getWidgetsCache6 } from "@elementor/editor-elements";
|
|
2935
2941
|
import { Schema as Schema4 } from "@elementor/editor-props";
|
|
2936
2942
|
import { z as z3 } from "@elementor/schema";
|
|
2937
2943
|
var schema = {
|
|
@@ -2970,7 +2976,7 @@ var initGetElementConfigTool = (reg) => {
|
|
|
2970
2976
|
speedPriority: 0.9
|
|
2971
2977
|
},
|
|
2972
2978
|
handler: async ({ elementId }) => {
|
|
2973
|
-
const element =
|
|
2979
|
+
const element = getContainer3(elementId);
|
|
2974
2980
|
if (!element) {
|
|
2975
2981
|
throw new Error(`Element with ID ${elementId} not found.`);
|
|
2976
2982
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-canvas",
|
|
3
3
|
"description": "Elementor Editor Canvas",
|
|
4
|
-
"version": "3.35.0-
|
|
4
|
+
"version": "3.35.0-378",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Elementor Team",
|
|
7
7
|
"homepage": "https://elementor.com/",
|
|
@@ -37,24 +37,24 @@
|
|
|
37
37
|
"react-dom": "^18.3.1"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@elementor/editor": "3.35.0-
|
|
41
|
-
"@elementor/editor-controls": "3.35.0-
|
|
42
|
-
"@elementor/editor-documents": "3.35.0-
|
|
43
|
-
"@elementor/editor-elements": "3.35.0-
|
|
44
|
-
"@elementor/editor-interactions": "3.35.0-
|
|
45
|
-
"@elementor/editor-mcp": "3.35.0-
|
|
46
|
-
"@elementor/editor-notifications": "3.35.0-
|
|
47
|
-
"@elementor/editor-props": "3.35.0-
|
|
48
|
-
"@elementor/editor-responsive": "3.35.0-
|
|
49
|
-
"@elementor/editor-styles": "3.35.0-
|
|
50
|
-
"@elementor/editor-styles-repository": "3.35.0-
|
|
51
|
-
"@elementor/editor-ui": "3.35.0-
|
|
52
|
-
"@elementor/editor-v1-adapters": "3.35.0-
|
|
53
|
-
"@elementor/schema": "3.35.0-
|
|
54
|
-
"@elementor/twing": "3.35.0-
|
|
40
|
+
"@elementor/editor": "3.35.0-378",
|
|
41
|
+
"@elementor/editor-controls": "3.35.0-378",
|
|
42
|
+
"@elementor/editor-documents": "3.35.0-378",
|
|
43
|
+
"@elementor/editor-elements": "3.35.0-378",
|
|
44
|
+
"@elementor/editor-interactions": "3.35.0-378",
|
|
45
|
+
"@elementor/editor-mcp": "3.35.0-378",
|
|
46
|
+
"@elementor/editor-notifications": "3.35.0-378",
|
|
47
|
+
"@elementor/editor-props": "3.35.0-378",
|
|
48
|
+
"@elementor/editor-responsive": "3.35.0-378",
|
|
49
|
+
"@elementor/editor-styles": "3.35.0-378",
|
|
50
|
+
"@elementor/editor-styles-repository": "3.35.0-378",
|
|
51
|
+
"@elementor/editor-ui": "3.35.0-378",
|
|
52
|
+
"@elementor/editor-v1-adapters": "3.35.0-378",
|
|
53
|
+
"@elementor/schema": "3.35.0-378",
|
|
54
|
+
"@elementor/twing": "3.35.0-378",
|
|
55
55
|
"@elementor/ui": "1.36.17",
|
|
56
|
-
"@elementor/utils": "3.35.0-
|
|
57
|
-
"@elementor/wp-media": "3.35.0-
|
|
56
|
+
"@elementor/utils": "3.35.0-378",
|
|
57
|
+
"@elementor/wp-media": "3.35.0-378",
|
|
58
58
|
"@floating-ui/react": "^0.27.5",
|
|
59
59
|
"@wordpress/i18n": "^5.13.0"
|
|
60
60
|
},
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { useEffect, useRef, useState } from 'react';
|
|
2
3
|
import { createRoot, type Root } from 'react-dom/client';
|
|
3
4
|
import { InlineEditor } from '@elementor/editor-controls';
|
|
4
|
-
import { getElementType } from '@elementor/editor-elements';
|
|
5
|
+
import { getContainer, getElementType } from '@elementor/editor-elements';
|
|
5
6
|
import {
|
|
6
7
|
htmlPropTypeUtil,
|
|
7
8
|
stringPropTypeUtil,
|
|
8
9
|
type StringPropValue,
|
|
9
10
|
type TransformablePropValue,
|
|
10
11
|
} from '@elementor/editor-props';
|
|
11
|
-
import { isExperimentActive } from '@elementor/editor-v1-adapters';
|
|
12
|
+
import { __privateRunCommandSync as runCommandSync, isExperimentActive } from '@elementor/editor-v1-adapters';
|
|
12
13
|
import { Box, ThemeProvider } from '@elementor/ui';
|
|
13
14
|
|
|
14
15
|
import { OutlineOverlay } from '../../../components/outline-overlay';
|
|
@@ -112,7 +113,12 @@ export default class InlineEditingReplacement extends ReplacementBase {
|
|
|
112
113
|
const settingKey = this.getInlineEditablePropertyName();
|
|
113
114
|
const valueToSave = value ? htmlPropTypeUtil.create( value ) : null;
|
|
114
115
|
|
|
115
|
-
|
|
116
|
+
runCommandSync( 'document/elements/settings', {
|
|
117
|
+
container: getContainer( this.id ),
|
|
118
|
+
settings: {
|
|
119
|
+
[ settingKey ]: valueToSave,
|
|
120
|
+
},
|
|
121
|
+
} );
|
|
116
122
|
}
|
|
117
123
|
|
|
118
124
|
getExpectedTag() {
|
|
@@ -148,10 +154,10 @@ export default class InlineEditingReplacement extends ReplacementBase {
|
|
|
148
154
|
InlineEditorApp = ( { classes }: { classes: string } ) => {
|
|
149
155
|
const propValue = this.getContentValue();
|
|
150
156
|
const expectedTag = this.getExpectedTag();
|
|
151
|
-
const wrapperRef =
|
|
152
|
-
const [ isWrapperRendered, setIsWrapperRendered ] =
|
|
157
|
+
const wrapperRef = useRef< HTMLDivElement | null >( null );
|
|
158
|
+
const [ isWrapperRendered, setIsWrapperRendered ] = useState( false );
|
|
153
159
|
|
|
154
|
-
|
|
160
|
+
useEffect( () => {
|
|
155
161
|
setIsWrapperRendered( !! wrapperRef.current );
|
|
156
162
|
}, [] );
|
|
157
163
|
|