@elementor/editor-components 4.1.0-manual → 4.2.0-840

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elementor/editor-components",
3
3
  "description": "Elementor editor components",
4
- "version": "4.1.0-manual",
4
+ "version": "4.2.0-840",
5
5
  "private": false,
6
6
  "author": "Elementor Team",
7
7
  "homepage": "https://elementor.com/",
@@ -40,31 +40,32 @@
40
40
  "dev": "tsup --config=../../tsup.dev.ts"
41
41
  },
42
42
  "dependencies": {
43
- "@elementor/editor": "4.1.0-manual",
44
- "@elementor/editor-canvas": "4.1.0-manual",
45
- "@elementor/editor-controls": "4.1.0-manual",
46
- "@elementor/editor-documents": "4.1.0-manual",
47
- "@elementor/editor-editing-panel": "4.1.0-manual",
48
- "@elementor/editor-elements": "4.1.0-manual",
49
- "@elementor/editor-elements-panel": "4.1.0-manual",
50
- "@elementor/editor-mcp": "4.1.0-manual",
51
- "@elementor/editor-templates": "4.1.0-manual",
52
- "@elementor/editor-panels": "4.1.0-manual",
53
- "@elementor/editor-props": "4.1.0-manual",
54
- "@elementor/editor-styles-repository": "4.1.0-manual",
55
- "@elementor/editor-ui": "4.1.0-manual",
56
- "@elementor/editor-v1-adapters": "4.1.0-manual",
57
- "@elementor/http-client": "4.1.0-manual",
58
- "@elementor/icons": "^1.68.0",
59
- "@elementor/events": "4.1.0-manual",
60
- "@elementor/query": "4.1.0-manual",
61
- "@elementor/schema": "4.1.0-manual",
62
- "@elementor/store": "4.1.0-manual",
43
+ "@elementor/editor": "4.2.0-840",
44
+ "@elementor/editor-canvas": "4.2.0-840",
45
+ "@elementor/editor-controls": "4.2.0-840",
46
+ "@elementor/editor-documents": "4.2.0-840",
47
+ "@elementor/editor-editing-panel": "4.2.0-840",
48
+ "@elementor/editor-elements": "4.2.0-840",
49
+ "@elementor/editor-elements-panel": "4.2.0-840",
50
+ "@elementor/editor-global-classes": "4.2.0-840",
51
+ "@elementor/editor-mcp": "4.2.0-840",
52
+ "@elementor/editor-templates": "4.2.0-840",
53
+ "@elementor/editor-panels": "4.2.0-840",
54
+ "@elementor/editor-props": "4.2.0-840",
55
+ "@elementor/editor-styles-repository": "4.2.0-840",
56
+ "@elementor/editor-ui": "4.2.0-840",
57
+ "@elementor/editor-v1-adapters": "4.2.0-840",
58
+ "@elementor/http-client": "4.2.0-840",
59
+ "@elementor/icons": "~1.75.1",
60
+ "@elementor/events": "4.2.0-840",
61
+ "@elementor/query": "4.2.0-840",
62
+ "@elementor/schema": "4.2.0-840",
63
+ "@elementor/store": "4.2.0-840",
63
64
  "@elementor/ui": "1.37.5",
64
- "@elementor/utils": "4.1.0-manual",
65
+ "@elementor/utils": "4.2.0-840",
65
66
  "@wordpress/i18n": "^5.13.0",
66
- "@elementor/editor-notifications": "4.1.0-manual",
67
- "@elementor/editor-current-user": "4.1.0-manual"
67
+ "@elementor/editor-notifications": "4.2.0-840",
68
+ "@elementor/editor-current-user": "4.2.0-840"
68
69
  },
69
70
  "peerDependencies": {
70
71
  "react": "^18.3.1",
@@ -7,10 +7,10 @@ import {
7
7
  createTemplatedElementView,
8
8
  type ElementModel,
9
9
  type ElementType,
10
- type ElementView,
11
10
  type LegacyWindow,
12
11
  type NamespacedRenderContext,
13
12
  type RenderContext,
13
+ type TemplatedElementView,
14
14
  } from '@elementor/editor-canvas';
15
15
  import { getCurrentDocument } from '@elementor/editor-documents';
16
16
  import { type V1ElementData } from '@elementor/editor-elements';
@@ -151,7 +151,7 @@ export function createComponentType( options: ComponentTypeOptions ): typeof Ele
151
151
  };
152
152
  }
153
153
 
154
- function createComponentView( options: ComponentTypeOptions ): typeof ElementView {
154
+ function createComponentView( options: ComponentTypeOptions ): typeof TemplatedElementView {
155
155
  const legacyWindow = window as unknown as LegacyWindow & ExtendedWindow;
156
156
 
157
157
  return class extends createTemplatedElementView( options ) {
@@ -1,5 +1,6 @@
1
1
  import { type Document } from '@elementor/editor-documents';
2
2
  import { type V1ElementData } from '@elementor/editor-elements';
3
+ import { addDocumentClasses } from '@elementor/editor-global-classes';
3
4
  import { type StyleDefinition } from '@elementor/editor-styles';
4
5
  import { __dispatch as dispatch, __getState as getState } from '@elementor/store';
5
6
 
@@ -23,7 +24,11 @@ export function loadComponentsStyles( documents: ComponentDocumentsMap ) {
23
24
 
24
25
  function addStyles( documents: ComponentDocumentsMap ) {
25
26
  const styles = Object.fromEntries(
26
- [ ...documents.entries() ].map( ( [ id, document ] ) => [ id, extractStylesFromDocument( document ) ] )
27
+ [ ...documents.entries() ].map( ( [ id, document ] ) => {
28
+ addDocumentClasses( id );
29
+
30
+ return [ id, extractStylesFromDocument( document ) ];
31
+ } )
27
32
  );
28
33
 
29
34
  dispatch( slice.actions.addStyles( styles ) );