@elementor/editor-styles-repository 4.1.0 → 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/CHANGELOG.md CHANGED
@@ -260,7 +260,7 @@
260
260
  - e6c904a: Make global classes state changes synchronous
261
261
  - efdadea: Create validation utils in style repository
262
262
  - da38fa9: Remove unused exports and add missing dependencies.
263
- - ffad70a: Fix base styles rendring
263
+ - ffad70a: Fix base styles rendering
264
264
  - ad6fde0: Support history actions in style changes
265
265
  - Updated dependencies [c9133d7]
266
266
  - Updated dependencies [86863c1]
package/dist/index.d.mts CHANGED
@@ -20,6 +20,7 @@ type UpdatePropsActionPayload = {
20
20
  id: StyleDefinitionID;
21
21
  meta: StyleDefinitionVariant['meta'];
22
22
  props: Props;
23
+ mode?: 'merge' | 'replace';
23
24
  };
24
25
  type UpdateCustomCssActionPayload = {
25
26
  id: StyleDefinitionID;
@@ -40,7 +41,7 @@ type StylesProvider = {
40
41
  all: (meta?: Meta) => StyleDefinition[];
41
42
  get: (id: StyleDefinitionID, meta?: Meta) => StyleDefinition | null;
42
43
  resolveCssName: (id: StyleDefinitionID) => string;
43
- create?: (label: StyleDefinition['label'], variants?: StyleDefinitionVariant[]) => StyleDefinitionID;
44
+ create?: (label: StyleDefinition['label'], variants?: StyleDefinitionVariant[], id?: StyleDefinitionID) => StyleDefinitionID;
44
45
  delete?: (id: StyleDefinitionID) => void;
45
46
  update?: (data: UpdateActionPayload) => void;
46
47
  updateProps?: (args: UpdatePropsActionPayload, meta?: Meta) => void;
package/dist/index.d.ts CHANGED
@@ -20,6 +20,7 @@ type UpdatePropsActionPayload = {
20
20
  id: StyleDefinitionID;
21
21
  meta: StyleDefinitionVariant['meta'];
22
22
  props: Props;
23
+ mode?: 'merge' | 'replace';
23
24
  };
24
25
  type UpdateCustomCssActionPayload = {
25
26
  id: StyleDefinitionID;
@@ -40,7 +41,7 @@ type StylesProvider = {
40
41
  all: (meta?: Meta) => StyleDefinition[];
41
42
  get: (id: StyleDefinitionID, meta?: Meta) => StyleDefinition | null;
42
43
  resolveCssName: (id: StyleDefinitionID) => string;
43
- create?: (label: StyleDefinition['label'], variants?: StyleDefinitionVariant[]) => StyleDefinitionID;
44
+ create?: (label: StyleDefinition['label'], variants?: StyleDefinitionVariant[], id?: StyleDefinitionID) => StyleDefinitionID;
44
45
  delete?: (id: StyleDefinitionID) => void;
45
46
  update?: (data: UpdateActionPayload) => void;
46
47
  updateProps?: (args: UpdatePropsActionPayload, meta?: Meta) => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elementor/editor-styles-repository",
3
3
  "description": "Elementor Editor Styles Repository",
4
- "version": "4.1.0",
4
+ "version": "4.2.0-840",
5
5
  "private": false,
6
6
  "author": "Elementor Team",
7
7
  "homepage": "https://elementor.com/",
@@ -33,13 +33,13 @@
33
33
  "dev": "tsup --config=../../tsup.dev.ts"
34
34
  },
35
35
  "dependencies": {
36
- "@elementor/editor-current-user": "4.1.0",
37
- "@elementor/editor-elements": "4.1.0",
38
- "@elementor/editor-props": "4.1.0",
39
- "@elementor/editor-styles": "4.1.0",
40
- "@elementor/editor-v1-adapters": "4.1.0",
41
- "@elementor/schema": "4.1.0",
42
- "@elementor/utils": "4.1.0",
36
+ "@elementor/editor-current-user": "4.2.0-840",
37
+ "@elementor/editor-elements": "4.2.0-840",
38
+ "@elementor/editor-props": "4.2.0-840",
39
+ "@elementor/editor-styles": "4.2.0-840",
40
+ "@elementor/editor-v1-adapters": "4.2.0-840",
41
+ "@elementor/schema": "4.2.0-840",
42
+ "@elementor/utils": "4.2.0-840",
43
43
  "@wordpress/i18n": "^5.13.0"
44
44
  },
45
45
  "peerDependencies": {
package/src/types.ts CHANGED
@@ -24,6 +24,7 @@ export type UpdatePropsActionPayload = {
24
24
  id: StyleDefinitionID;
25
25
  meta: StyleDefinitionVariant[ 'meta' ];
26
26
  props: Props;
27
+ mode?: 'merge' | 'replace';
27
28
  };
28
29
 
29
30
  export type UpdateCustomCssActionPayload = {
@@ -47,7 +48,11 @@ export type StylesProvider = {
47
48
  all: ( meta?: Meta ) => StyleDefinition[];
48
49
  get: ( id: StyleDefinitionID, meta?: Meta ) => StyleDefinition | null;
49
50
  resolveCssName: ( id: StyleDefinitionID ) => string;
50
- create?: ( label: StyleDefinition[ 'label' ], variants?: StyleDefinitionVariant[] ) => StyleDefinitionID;
51
+ create?: (
52
+ label: StyleDefinition[ 'label' ],
53
+ variants?: StyleDefinitionVariant[],
54
+ id?: StyleDefinitionID
55
+ ) => StyleDefinitionID;
51
56
  delete?: ( id: StyleDefinitionID ) => void;
52
57
  update?: ( data: UpdateActionPayload ) => void;
53
58
  updateProps?: ( args: UpdatePropsActionPayload, meta?: Meta ) => void;