@elementor/editor-variables 0.18.0 → 3.32.0-21
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 +0 -28
- package/dist/index.d.mts +19 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.js +1282 -1026
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1262 -990
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -14
- package/src/api.ts +18 -2
- package/src/components/fields/color-field.tsx +3 -3
- package/src/components/fields/font-field.tsx +21 -10
- package/src/components/fields/label-field.tsx +31 -5
- package/src/components/ui/edit-confirmation-dialog.tsx +75 -0
- package/src/components/ui/missing-variable-alert.tsx +39 -0
- package/src/components/ui/no-variables.tsx +59 -26
- package/src/components/ui/tags/missing-tag.tsx +25 -0
- package/src/components/ui/variable/assigned-variable.tsx +11 -14
- package/src/components/ui/variable/deleted-variable.tsx +102 -50
- package/src/components/ui/variable/missing-variable.tsx +44 -0
- package/src/components/{color-variable-creation.tsx → variable-creation.tsx} +51 -22
- package/src/components/variable-edit.tsx +221 -0
- package/src/components/variable-restore.tsx +117 -0
- package/src/components/variable-selection-popover.tsx +91 -92
- package/src/components/variables-manager/variables-manager-panel.tsx +115 -0
- package/src/components/{font-variables-selection.tsx → variables-selection.tsx} +38 -17
- package/src/context/variable-selection-popover.context.tsx +19 -0
- package/src/context/variable-type-context.tsx +23 -0
- package/src/controls/variable-control.tsx +26 -0
- package/src/hooks/use-initial-value.ts +22 -0
- package/src/hooks/use-permissions.ts +15 -0
- package/src/hooks/use-prop-variable-action.tsx +53 -0
- package/src/hooks/use-prop-variables.ts +2 -2
- package/src/index.ts +1 -0
- package/src/init.ts +33 -4
- package/src/register-variable-types.tsx +29 -0
- package/src/repeater-injections.ts +5 -1
- package/src/service.ts +2 -19
- package/src/transformers/inheritance-transformer.tsx +30 -0
- package/src/transformers/utils/resolve-css-variable.ts +24 -0
- package/src/transformers/variable-transformer.ts +3 -16
- package/src/utils/tracking.ts +39 -0
- package/src/utils/validations.ts +40 -6
- package/src/variables-registry/create-variable-type-registry.ts +77 -0
- package/src/variables-registry/variable-type-registry.ts +3 -0
- package/src/components/color-variable-edit.tsx +0 -157
- package/src/components/color-variables-selection.tsx +0 -128
- package/src/components/font-variable-creation.tsx +0 -106
- package/src/components/font-variable-edit.tsx +0 -157
- package/src/components/variable-selection-popover.context.ts +0 -7
- package/src/controls/color-variable-control.tsx +0 -39
- package/src/controls/font-variable-control.tsx +0 -37
- package/src/hooks/use-prop-color-variable-action.tsx +0 -25
- package/src/hooks/use-prop-font-variable-action.tsx +0 -25
- package/src/init-color-variables.ts +0 -27
- package/src/init-font-variables.ts +0 -24
- package/src/utils.ts +0 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,33 +1,5 @@
|
|
|
1
1
|
# @elementor/editor-variables
|
|
2
2
|
|
|
3
|
-
## 0.18.0
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- 1ff40ee: Support for user-defined variable names in css
|
|
8
|
-
- aff9ad2: Update the deleted variable tag.
|
|
9
|
-
- e46222c: Add tooltip to variable chip.
|
|
10
|
-
- 4ef12df: Update text translations
|
|
11
|
-
- 99d7a44: Add input validation for server errors.
|
|
12
|
-
- 102e64b: Added fallback values for variables on canvas for visual consistency
|
|
13
|
-
|
|
14
|
-
### Patch Changes
|
|
15
|
-
|
|
16
|
-
- 0db150c: Update the popover height.
|
|
17
|
-
- Updated dependencies [22b87fb]
|
|
18
|
-
- Updated dependencies [64b3e09]
|
|
19
|
-
- Updated dependencies [3904505]
|
|
20
|
-
- Updated dependencies [3d530f6]
|
|
21
|
-
- Updated dependencies [0db150c]
|
|
22
|
-
- Updated dependencies [cdbd491]
|
|
23
|
-
- Updated dependencies [b90d7db]
|
|
24
|
-
- @elementor/editor-editing-panel@1.50.0
|
|
25
|
-
- @elementor/editor-controls@1.5.0
|
|
26
|
-
- @elementor/editor-canvas@0.28.0
|
|
27
|
-
- @elementor/editor-props@0.18.0
|
|
28
|
-
- @elementor/editor-ui@0.14.2
|
|
29
|
-
- @elementor/editor@0.21.1
|
|
30
|
-
|
|
31
3
|
## 0.17.0
|
|
32
4
|
|
|
33
5
|
### Minor Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
import * as _elementor_editor_props from '@elementor/editor-props';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import * as _mui_material from '@mui/material';
|
|
4
|
+
|
|
1
5
|
declare function init(): void;
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
declare const registerVariableType: ({ icon, startIcon, valueField, propTypeUtil, variableType, fallbackPropTypeUtil, }: {
|
|
8
|
+
icon: react.ForwardRefExoticComponent<Omit<_mui_material.SvgIconProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
9
|
+
startIcon?: ({ value }: {
|
|
10
|
+
value: string;
|
|
11
|
+
}) => react.JSX.Element;
|
|
12
|
+
valueField: ({ value, onChange }: {
|
|
13
|
+
value: string;
|
|
14
|
+
onChange: (value: string) => void;
|
|
15
|
+
}) => react.JSX.Element;
|
|
16
|
+
variableType: string;
|
|
17
|
+
fallbackPropTypeUtil: any;
|
|
18
|
+
propTypeUtil: _elementor_editor_props.PropTypeUtil<string, string>;
|
|
19
|
+
}) => void;
|
|
20
|
+
|
|
21
|
+
export { init, registerVariableType };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
import * as _elementor_editor_props from '@elementor/editor-props';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import * as _mui_material from '@mui/material';
|
|
4
|
+
|
|
1
5
|
declare function init(): void;
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
declare const registerVariableType: ({ icon, startIcon, valueField, propTypeUtil, variableType, fallbackPropTypeUtil, }: {
|
|
8
|
+
icon: react.ForwardRefExoticComponent<Omit<_mui_material.SvgIconProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
|
|
9
|
+
startIcon?: ({ value }: {
|
|
10
|
+
value: string;
|
|
11
|
+
}) => react.JSX.Element;
|
|
12
|
+
valueField: ({ value, onChange }: {
|
|
13
|
+
value: string;
|
|
14
|
+
onChange: (value: string) => void;
|
|
15
|
+
}) => react.JSX.Element;
|
|
16
|
+
variableType: string;
|
|
17
|
+
fallbackPropTypeUtil: any;
|
|
18
|
+
propTypeUtil: _elementor_editor_props.PropTypeUtil<string, string>;
|
|
19
|
+
}) => void;
|
|
20
|
+
|
|
21
|
+
export { init, registerVariableType };
|