@elementor/editor-canvas 4.0.0-649 → 4.0.0-659
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
|
@@ -1017,7 +1017,7 @@ function createProviderSubscriber2({ provider, renderStyles, setStyleItems, cach
|
|
|
1017
1017
|
}
|
|
1018
1018
|
async function createItems(signal) {
|
|
1019
1019
|
const allStyles = provider.actions.all();
|
|
1020
|
-
const styles = allStyles.reverse().map((style) => {
|
|
1020
|
+
const styles = [...allStyles].reverse().map((style) => {
|
|
1021
1021
|
return {
|
|
1022
1022
|
...style,
|
|
1023
1023
|
cssName: provider.actions.resolveCssName(style.id)
|
package/dist/index.mjs
CHANGED
|
@@ -983,7 +983,7 @@ function createProviderSubscriber2({ provider, renderStyles, setStyleItems, cach
|
|
|
983
983
|
}
|
|
984
984
|
async function createItems(signal) {
|
|
985
985
|
const allStyles = provider.actions.all();
|
|
986
|
-
const styles = allStyles.reverse().map((style) => {
|
|
986
|
+
const styles = [...allStyles].reverse().map((style) => {
|
|
987
987
|
return {
|
|
988
988
|
...style,
|
|
989
989
|
cssName: provider.actions.resolveCssName(style.id)
|
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-659",
|
|
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-659",
|
|
41
|
+
"@elementor/editor-controls": "4.0.0-659",
|
|
42
|
+
"@elementor/editor-documents": "4.0.0-659",
|
|
43
|
+
"@elementor/editor-elements": "4.0.0-659",
|
|
44
|
+
"@elementor/editor-interactions": "4.0.0-659",
|
|
45
|
+
"@elementor/editor-mcp": "4.0.0-659",
|
|
46
|
+
"@elementor/editor-notifications": "4.0.0-659",
|
|
47
|
+
"@elementor/editor-props": "4.0.0-659",
|
|
48
|
+
"@elementor/editor-responsive": "4.0.0-659",
|
|
49
|
+
"@elementor/editor-styles": "4.0.0-659",
|
|
50
|
+
"@elementor/editor-styles-repository": "4.0.0-659",
|
|
51
|
+
"@elementor/editor-ui": "4.0.0-659",
|
|
52
|
+
"@elementor/editor-v1-adapters": "4.0.0-659",
|
|
53
|
+
"@elementor/schema": "4.0.0-659",
|
|
54
|
+
"@elementor/twing": "4.0.0-659",
|
|
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-659",
|
|
57
|
+
"@elementor/wp-media": "4.0.0-659",
|
|
58
58
|
"@floating-ui/react": "^0.27.5",
|
|
59
59
|
"@wordpress/i18n": "^5.13.0"
|
|
60
60
|
},
|
|
@@ -128,6 +128,9 @@ describe( 'useStyleItems', () => {
|
|
|
128
128
|
|
|
129
129
|
jest.mocked( stylesRepository ).getProviders.mockReturnValue( [ mockProvider1, mockProvider2 ] );
|
|
130
130
|
|
|
131
|
+
const provider1OriginalOrder = mockProvider1.actions.all().map( ( s ) => s.id );
|
|
132
|
+
const provider2OriginalOrder = mockProvider2.actions.all().map( ( s ) => s.id );
|
|
133
|
+
|
|
131
134
|
let attachPreviewCallback: () => Promise< void >;
|
|
132
135
|
|
|
133
136
|
jest.mocked( registerDataHook ).mockImplementation( ( position, command, callback ) => {
|
|
@@ -156,6 +159,9 @@ describe( 'useStyleItems', () => {
|
|
|
156
159
|
{ id: 'style2', breakpoint: 'desktop' },
|
|
157
160
|
{ id: 'style1', breakpoint: 'desktop' },
|
|
158
161
|
] );
|
|
162
|
+
|
|
163
|
+
expect( mockProvider1.actions.all().map( ( s ) => s.id ) ).toEqual( provider1OriginalOrder );
|
|
164
|
+
expect( mockProvider2.actions.all().map( ( s ) => s.id ) ).toEqual( provider2OriginalOrder );
|
|
159
165
|
} );
|
|
160
166
|
|
|
161
167
|
it( 'should return style items ordered by provider priority and breakpoint', async () => {
|
|
@@ -181,7 +181,7 @@ function createProviderSubscriber( { provider, renderStyles, setStyleItems, cach
|
|
|
181
181
|
async function createItems( signal: AbortSignal ) {
|
|
182
182
|
const allStyles = provider.actions.all();
|
|
183
183
|
|
|
184
|
-
const styles = allStyles.reverse().map( ( style ) => {
|
|
184
|
+
const styles = [ ...allStyles ].reverse().map( ( style ) => {
|
|
185
185
|
return {
|
|
186
186
|
...style,
|
|
187
187
|
cssName: provider.actions.resolveCssName( style.id ),
|