@elementor/editor-canvas 4.0.0-666 → 4.0.0-668
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 +5 -7
- package/dist/index.mjs +10 -12
- package/package.json +18 -18
- package/src/index.ts +1 -1
- package/src/style-commands/__tests__/paste-style.test.ts +5 -3
- package/src/style-commands/__tests__/reset-style.test.ts +3 -3
- package/src/style-commands/paste-style.ts +7 -1
- package/src/style-commands/reset-style.ts +1 -1
- package/src/style-commands/undoable-actions/paste-element-style.ts +1 -1
- package/src/style-commands/undoable-actions/reset-element-style.ts +1 -1
- /package/src/{style-commands/utils.ts → utils/command-utils.ts} +0 -0
package/dist/index.js
CHANGED
|
@@ -4231,13 +4231,7 @@ var import_editor_elements15 = require("@elementor/editor-elements");
|
|
|
4231
4231
|
var import_editor_props10 = require("@elementor/editor-props");
|
|
4232
4232
|
var import_editor_v1_adapters16 = require("@elementor/editor-v1-adapters");
|
|
4233
4233
|
|
|
4234
|
-
// src/
|
|
4235
|
-
var import_editor_elements14 = require("@elementor/editor-elements");
|
|
4236
|
-
var import_editor_styles_repository4 = require("@elementor/editor-styles-repository");
|
|
4237
|
-
var import_editor_v1_adapters15 = require("@elementor/editor-v1-adapters");
|
|
4238
|
-
var import_i18n6 = require("@wordpress/i18n");
|
|
4239
|
-
|
|
4240
|
-
// src/style-commands/utils.ts
|
|
4234
|
+
// src/utils/command-utils.ts
|
|
4241
4235
|
var import_editor_elements13 = require("@elementor/editor-elements");
|
|
4242
4236
|
var import_editor_props9 = require("@elementor/editor-props");
|
|
4243
4237
|
var import_i18n5 = require("@wordpress/i18n");
|
|
@@ -4280,6 +4274,10 @@ function getTitleForContainers(containers) {
|
|
|
4280
4274
|
}
|
|
4281
4275
|
|
|
4282
4276
|
// src/style-commands/undoable-actions/paste-element-style.ts
|
|
4277
|
+
var import_editor_elements14 = require("@elementor/editor-elements");
|
|
4278
|
+
var import_editor_styles_repository4 = require("@elementor/editor-styles-repository");
|
|
4279
|
+
var import_editor_v1_adapters15 = require("@elementor/editor-v1-adapters");
|
|
4280
|
+
var import_i18n6 = require("@wordpress/i18n");
|
|
4283
4281
|
var undoablePasteElementStyle = () => (0, import_editor_v1_adapters15.undoable)(
|
|
4284
4282
|
{
|
|
4285
4283
|
do: ({ containers, newStyle }) => {
|
package/dist/index.mjs
CHANGED
|
@@ -4225,18 +4225,7 @@ import {
|
|
|
4225
4225
|
commandStartEvent
|
|
4226
4226
|
} from "@elementor/editor-v1-adapters";
|
|
4227
4227
|
|
|
4228
|
-
// src/
|
|
4229
|
-
import {
|
|
4230
|
-
createElementStyle as createElementStyle2,
|
|
4231
|
-
deleteElementStyle,
|
|
4232
|
-
getElementStyles as getElementStyles3,
|
|
4233
|
-
updateElementStyle as updateElementStyle2
|
|
4234
|
-
} from "@elementor/editor-elements";
|
|
4235
|
-
import { ELEMENTS_STYLES_RESERVED_LABEL } from "@elementor/editor-styles-repository";
|
|
4236
|
-
import { undoable as undoable2 } from "@elementor/editor-v1-adapters";
|
|
4237
|
-
import { __ as __6 } from "@wordpress/i18n";
|
|
4238
|
-
|
|
4239
|
-
// src/style-commands/utils.ts
|
|
4228
|
+
// src/utils/command-utils.ts
|
|
4240
4229
|
import { getElementLabel as getElementLabel2, getWidgetsCache as getWidgetsCache8 } from "@elementor/editor-elements";
|
|
4241
4230
|
import { CLASSES_PROP_KEY } from "@elementor/editor-props";
|
|
4242
4231
|
import { __ as __5 } from "@wordpress/i18n";
|
|
@@ -4279,6 +4268,15 @@ function getTitleForContainers(containers) {
|
|
|
4279
4268
|
}
|
|
4280
4269
|
|
|
4281
4270
|
// src/style-commands/undoable-actions/paste-element-style.ts
|
|
4271
|
+
import {
|
|
4272
|
+
createElementStyle as createElementStyle2,
|
|
4273
|
+
deleteElementStyle,
|
|
4274
|
+
getElementStyles as getElementStyles3,
|
|
4275
|
+
updateElementStyle as updateElementStyle2
|
|
4276
|
+
} from "@elementor/editor-elements";
|
|
4277
|
+
import { ELEMENTS_STYLES_RESERVED_LABEL } from "@elementor/editor-styles-repository";
|
|
4278
|
+
import { undoable as undoable2 } from "@elementor/editor-v1-adapters";
|
|
4279
|
+
import { __ as __6 } from "@wordpress/i18n";
|
|
4282
4280
|
var undoablePasteElementStyle = () => undoable2(
|
|
4283
4281
|
{
|
|
4284
4282
|
do: ({ containers, newStyle }) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-canvas",
|
|
3
3
|
"description": "Elementor Editor Canvas",
|
|
4
|
-
"version": "4.0.0-
|
|
4
|
+
"version": "4.0.0-668",
|
|
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": "4.0.0-
|
|
41
|
-
"@elementor/editor-controls": "4.0.0-
|
|
42
|
-
"@elementor/editor-documents": "4.0.0-
|
|
43
|
-
"@elementor/editor-elements": "4.0.0-
|
|
44
|
-
"@elementor/editor-interactions": "4.0.0-
|
|
45
|
-
"@elementor/editor-mcp": "4.0.0-
|
|
46
|
-
"@elementor/editor-notifications": "4.0.0-
|
|
47
|
-
"@elementor/editor-props": "4.0.0-
|
|
48
|
-
"@elementor/editor-responsive": "4.0.0-
|
|
49
|
-
"@elementor/editor-styles": "4.0.0-
|
|
50
|
-
"@elementor/editor-styles-repository": "4.0.0-
|
|
51
|
-
"@elementor/editor-ui": "4.0.0-
|
|
52
|
-
"@elementor/editor-v1-adapters": "4.0.0-
|
|
53
|
-
"@elementor/schema": "4.0.0-
|
|
54
|
-
"@elementor/twing": "4.0.0-
|
|
40
|
+
"@elementor/editor": "4.0.0-668",
|
|
41
|
+
"@elementor/editor-controls": "4.0.0-668",
|
|
42
|
+
"@elementor/editor-documents": "4.0.0-668",
|
|
43
|
+
"@elementor/editor-elements": "4.0.0-668",
|
|
44
|
+
"@elementor/editor-interactions": "4.0.0-668",
|
|
45
|
+
"@elementor/editor-mcp": "4.0.0-668",
|
|
46
|
+
"@elementor/editor-notifications": "4.0.0-668",
|
|
47
|
+
"@elementor/editor-props": "4.0.0-668",
|
|
48
|
+
"@elementor/editor-responsive": "4.0.0-668",
|
|
49
|
+
"@elementor/editor-styles": "4.0.0-668",
|
|
50
|
+
"@elementor/editor-styles-repository": "4.0.0-668",
|
|
51
|
+
"@elementor/editor-ui": "4.0.0-668",
|
|
52
|
+
"@elementor/editor-v1-adapters": "4.0.0-668",
|
|
53
|
+
"@elementor/schema": "4.0.0-668",
|
|
54
|
+
"@elementor/twing": "4.0.0-668",
|
|
55
55
|
"@elementor/ui": "1.36.17",
|
|
56
|
-
"@elementor/utils": "4.0.0-
|
|
57
|
-
"@elementor/wp-media": "4.0.0-
|
|
56
|
+
"@elementor/utils": "4.0.0-668",
|
|
57
|
+
"@elementor/wp-media": "4.0.0-668",
|
|
58
58
|
"@floating-ui/react": "^0.27.5",
|
|
59
59
|
"@wordpress/i18n": "^5.13.0"
|
|
60
60
|
},
|
package/src/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { BREAKPOINTS_SCHEMA_URI } from './mcp/resources/breakpoints-resource';
|
|
|
2
2
|
export { STYLE_SCHEMA_URI } from './mcp/resources/widgets-schema-resource';
|
|
3
3
|
|
|
4
4
|
export { init } from './init';
|
|
5
|
-
export { isAtomicWidget } from './
|
|
5
|
+
export { isAtomicWidget } from './utils/command-utils';
|
|
6
6
|
|
|
7
7
|
export {
|
|
8
8
|
createTemplatedElementView,
|
|
@@ -19,14 +19,16 @@ import { classesPropTypeUtil } from '@elementor/editor-props';
|
|
|
19
19
|
import { type StyleDefinition } from '@elementor/editor-styles';
|
|
20
20
|
import { ELEMENTS_STYLES_RESERVED_LABEL } from '@elementor/editor-styles-repository';
|
|
21
21
|
|
|
22
|
+
import { getClipboardElements } from '../../utils/command-utils';
|
|
22
23
|
import { initPasteStyleCommand } from '../paste-style';
|
|
23
|
-
import { getClipboardElements } from '../utils';
|
|
24
24
|
|
|
25
25
|
jest.mock( '@elementor/editor-elements' );
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
|
|
27
|
+
jest.mock( '../../utils/command-utils', () => ( {
|
|
28
|
+
...jest.requireActual( '../../utils/command-utils' ),
|
|
28
29
|
getClipboardElements: jest.fn(),
|
|
29
30
|
} ) );
|
|
31
|
+
|
|
30
32
|
jest.mock( '@elementor/editor-v1-adapters', () => ( {
|
|
31
33
|
...jest.requireActual( '@elementor/editor-v1-adapters' ),
|
|
32
34
|
blockCommand: jest.fn(),
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
import { createElementStyle, deleteElementStyle, getElementStyles } from '@elementor/editor-elements';
|
|
8
8
|
import { ELEMENTS_STYLES_RESERVED_LABEL } from '@elementor/editor-styles-repository';
|
|
9
9
|
|
|
10
|
+
import { getClassesProp, hasAtomicWidgets, isAtomicWidget } from '../../utils/command-utils';
|
|
10
11
|
import { initResetStyleCommand } from '../reset-style';
|
|
11
|
-
import { getClassesProp, hasAtomicWidgets, isAtomicWidget } from '../utils';
|
|
12
12
|
|
|
13
13
|
jest.mock( '@elementor/editor-elements' );
|
|
14
14
|
|
|
15
|
-
jest.mock( '
|
|
16
|
-
...jest.requireActual( '
|
|
15
|
+
jest.mock( '../../utils/command-utils', () => ( {
|
|
16
|
+
...jest.requireActual( '../../utils/command-utils' ),
|
|
17
17
|
getClassesProp: jest.fn(),
|
|
18
18
|
hasAtomicWidgets: jest.fn(),
|
|
19
19
|
isAtomicWidget: jest.fn(),
|
|
@@ -8,8 +8,14 @@ import {
|
|
|
8
8
|
commandStartEvent,
|
|
9
9
|
} from '@elementor/editor-v1-adapters';
|
|
10
10
|
|
|
11
|
+
import {
|
|
12
|
+
type ContainerArgs,
|
|
13
|
+
getClassesProp,
|
|
14
|
+
getClipboardElements,
|
|
15
|
+
hasAtomicWidgets,
|
|
16
|
+
isAtomicWidget,
|
|
17
|
+
} from '../utils/command-utils';
|
|
11
18
|
import { undoablePasteElementStyle } from './undoable-actions/paste-element-style';
|
|
12
|
-
import { type ContainerArgs, getClassesProp, getClipboardElements, hasAtomicWidgets, isAtomicWidget } from './utils';
|
|
13
19
|
|
|
14
20
|
type PasteStylesCommandArgs = ContainerArgs & {
|
|
15
21
|
storageKey?: string;
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
commandStartEvent,
|
|
7
7
|
} from '@elementor/editor-v1-adapters';
|
|
8
8
|
|
|
9
|
+
import { type ContainerArgs, hasAtomicWidgets, isAtomicWidget } from '../utils/command-utils';
|
|
9
10
|
import { undoableResetElementStyle } from './undoable-actions/reset-element-style';
|
|
10
|
-
import { type ContainerArgs, hasAtomicWidgets, isAtomicWidget } from './utils';
|
|
11
11
|
|
|
12
12
|
export function initResetStyleCommand() {
|
|
13
13
|
const resetElementStyles = undoableResetElementStyle();
|
|
@@ -10,7 +10,7 @@ import { ELEMENTS_STYLES_RESERVED_LABEL } from '@elementor/editor-styles-reposit
|
|
|
10
10
|
import { undoable } from '@elementor/editor-v1-adapters';
|
|
11
11
|
import { __ } from '@wordpress/i18n';
|
|
12
12
|
|
|
13
|
-
import { getClassesProp, getTitleForContainers } from '
|
|
13
|
+
import { getClassesProp, getTitleForContainers } from '../../utils/command-utils';
|
|
14
14
|
|
|
15
15
|
type PasteElementStyleArgs = {
|
|
16
16
|
containers: V1Element[];
|
|
@@ -3,7 +3,7 @@ import { ELEMENTS_STYLES_RESERVED_LABEL } from '@elementor/editor-styles-reposit
|
|
|
3
3
|
import { undoable } from '@elementor/editor-v1-adapters';
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
5
|
|
|
6
|
-
import { getClassesProp, getTitleForContainers } from '
|
|
6
|
+
import { getClassesProp, getTitleForContainers } from '../../utils/command-utils';
|
|
7
7
|
|
|
8
8
|
type ResetElementStyleArgs = {
|
|
9
9
|
containers: V1Element[];
|
|
File without changes
|