@elementor/editor-editing-panel 0.14.2 → 0.15.0
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 +18 -0
- package/dist/index.d.mts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +327 -263
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +309 -259
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/components/editing-panel.tsx +1 -1
- package/src/components/settings-tab.tsx +6 -17
- package/src/components/style-sections/size-section.tsx +5 -6
- package/src/components/style-sections/typography-section/font-size-control.tsx +16 -0
- package/src/components/style-sections/typography-section/font-weight-control.tsx +24 -0
- package/src/{controls/control-types → components/style-sections/typography-section}/text-style-control.tsx +16 -14
- package/src/components/style-sections/typography-section/typography-section.tsx +20 -0
- package/src/components/style-tab.tsx +1 -1
- package/src/contexts/element-context.tsx +5 -3
- package/src/controls/components/control-container.tsx +18 -0
- package/src/controls/control-replacement.ts +26 -0
- package/src/controls/control-types/image-control.tsx +3 -18
- package/src/controls/control-types/size-control.tsx +4 -2
- package/src/controls/control-types/text-area-control.tsx +1 -1
- package/src/controls/control.tsx +50 -0
- package/src/controls/{get-control-by-type.ts → controls-registry.tsx} +13 -9
- package/src/controls/settings-control.tsx +8 -21
- package/src/hooks/use-dynamic-tags-config.ts +35 -0
- package/src/hooks/use-element-type.ts +5 -0
- package/src/index.ts +3 -0
- package/src/sync/get-atomic-dynamic-tags.ts +14 -0
- package/src/sync/get-elementor-config.ts +7 -0
- package/src/sync/types.ts +15 -1
- package/src/types.ts +14 -0
- package/LICENSE +0 -674
- package/src/components/style-sections/typography-section.tsx +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 0.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c67ae92: Add control component
|
|
8
|
+
- c9c430d: Create hook for supported dynamic categories
|
|
9
|
+
- 68acbed: Add font size control, separate customs from generic controls
|
|
10
|
+
- 4929220: Refactor - move `elementType` into `ElementContext`
|
|
11
|
+
- c3a53d7: Add icons to `TextStyleControl`
|
|
12
|
+
- 730ef85: Add `getDynamicTagsByCategories` function
|
|
13
|
+
- ed21ec8: Create a font weight control in the editor panel
|
|
14
|
+
- 4c6e274: Add support for default values from the widget schema
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 44d49dd: Update `@elementor/ui` version
|
|
19
|
+
- ad3cd19: Fix settings control layout when there is no label
|
|
20
|
+
|
|
3
21
|
All notable changes to this project will be documented in this file.
|
|
4
22
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
23
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,30 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
1
2
|
|
|
2
|
-
|
|
3
|
+
type MaybeArray<T> = T | T[];
|
|
4
|
+
type TransformablePropValue<T = unknown> = {
|
|
5
|
+
$$type: string;
|
|
6
|
+
value: T;
|
|
7
|
+
};
|
|
8
|
+
type PlainPropValue = MaybeArray<string | number | boolean | object | null | undefined>;
|
|
9
|
+
type PropValue = PlainPropValue | TransformablePropValue;
|
|
10
|
+
type PropKey = string;
|
|
11
|
+
|
|
12
|
+
type ReplaceWhenParams = {
|
|
13
|
+
value: PropValue;
|
|
14
|
+
};
|
|
15
|
+
type ControlReplacement = {
|
|
16
|
+
component: React.ComponentType;
|
|
17
|
+
condition: ({ value }: ReplaceWhenParams) => boolean;
|
|
18
|
+
};
|
|
19
|
+
declare const replaceControl: ({ component, condition }: ControlReplacement) => void;
|
|
20
|
+
|
|
21
|
+
type ControlContext<T extends PropValue> = {
|
|
22
|
+
bind: PropKey;
|
|
23
|
+
setValue: (value: T | undefined) => void;
|
|
24
|
+
value: T | undefined;
|
|
25
|
+
};
|
|
26
|
+
declare const ControlContext: react.Context<ControlContext<PropValue> | null>;
|
|
27
|
+
declare function useControl<T extends PropValue>(): ControlContext<T | undefined>;
|
|
28
|
+
declare function useControl<T extends PropValue>(defaultValue: T): ControlContext<T>;
|
|
29
|
+
|
|
30
|
+
export { replaceControl, useControl };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,30 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
1
2
|
|
|
2
|
-
|
|
3
|
+
type MaybeArray<T> = T | T[];
|
|
4
|
+
type TransformablePropValue<T = unknown> = {
|
|
5
|
+
$$type: string;
|
|
6
|
+
value: T;
|
|
7
|
+
};
|
|
8
|
+
type PlainPropValue = MaybeArray<string | number | boolean | object | null | undefined>;
|
|
9
|
+
type PropValue = PlainPropValue | TransformablePropValue;
|
|
10
|
+
type PropKey = string;
|
|
11
|
+
|
|
12
|
+
type ReplaceWhenParams = {
|
|
13
|
+
value: PropValue;
|
|
14
|
+
};
|
|
15
|
+
type ControlReplacement = {
|
|
16
|
+
component: React.ComponentType;
|
|
17
|
+
condition: ({ value }: ReplaceWhenParams) => boolean;
|
|
18
|
+
};
|
|
19
|
+
declare const replaceControl: ({ component, condition }: ControlReplacement) => void;
|
|
20
|
+
|
|
21
|
+
type ControlContext<T extends PropValue> = {
|
|
22
|
+
bind: PropKey;
|
|
23
|
+
setValue: (value: T | undefined) => void;
|
|
24
|
+
value: T | undefined;
|
|
25
|
+
};
|
|
26
|
+
declare const ControlContext: react.Context<ControlContext<PropValue> | null>;
|
|
27
|
+
declare function useControl<T extends PropValue>(): ControlContext<T | undefined>;
|
|
28
|
+
declare function useControl<T extends PropValue>(defaultValue: T): ControlContext<T>;
|
|
29
|
+
|
|
30
|
+
export { replaceControl, useControl };
|