@elementor/editor-controls 3.32.0-68 → 3.32.0-69
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.d.mts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +782 -708
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +562 -489
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -14
- package/src/bound-prop-context/prop-context.tsx +2 -1
- package/src/bound-prop-context/use-bound-prop.ts +8 -4
- package/src/components/number-input.tsx +41 -0
- package/src/components/size-control/size-input.tsx +5 -9
- package/src/components/size-control/text-field-inner-selection.tsx +9 -6
- package/src/controls/background-control/background-overlay/background-image-overlay/background-image-overlay-position.tsx +2 -0
- package/src/controls/linked-dimensions-control.tsx +19 -2
- package/src/controls/number-control.tsx +20 -21
- package/src/controls/position-control.tsx +8 -2
- package/src/controls/size-control.tsx +16 -7
- package/src/controls/transform-control/functions/axis-row.tsx +1 -0
- package/src/hooks/use-sync-external-state.tsx +6 -3
package/dist/index.d.mts
CHANGED
|
@@ -49,6 +49,7 @@ type BaseSizeControlProps = {
|
|
|
49
49
|
extendedOptions?: ExtendedOption[];
|
|
50
50
|
disableCustom?: boolean;
|
|
51
51
|
anchorRef?: RefObject<HTMLDivElement | null>;
|
|
52
|
+
min?: number;
|
|
52
53
|
};
|
|
53
54
|
type LengthSizeControlProps = BaseSizeControlProps & UnitProps<LengthUnit[]> & {
|
|
54
55
|
variant: 'length';
|
|
@@ -60,7 +61,7 @@ type TimeSizeControlProps = BaseSizeControlProps & UnitProps<TimeUnit[]> & {
|
|
|
60
61
|
variant: 'time';
|
|
61
62
|
};
|
|
62
63
|
type SizeControlProps = LengthSizeControlProps | AngleSizeControlProps | TimeSizeControlProps;
|
|
63
|
-
declare const SizeControl: ControlComponent<({ variant, defaultUnit, units, placeholder, startIcon, anchorRef, extendedOptions, disableCustom, }: Omit<SizeControlProps, "variant"> & {
|
|
64
|
+
declare const SizeControl: ControlComponent<({ variant, defaultUnit, units, placeholder, startIcon, anchorRef, extendedOptions, disableCustom, min, }: Omit<SizeControlProps, "variant"> & {
|
|
64
65
|
variant?: SizeVariant;
|
|
65
66
|
}) => React$1.JSX.Element>;
|
|
66
67
|
|
|
@@ -155,10 +156,11 @@ type Props$2<TMultiPropType extends string, TPropValue extends MultiSizePropValu
|
|
|
155
156
|
};
|
|
156
157
|
declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$2<TMultiPropType, TPropValue>): React$1.JSX.Element;
|
|
157
158
|
|
|
158
|
-
declare const LinkedDimensionsControl: ControlComponent<({ label, isSiteRtl, extendedOptions, }: {
|
|
159
|
+
declare const LinkedDimensionsControl: ControlComponent<({ label, isSiteRtl, extendedOptions, min, }: {
|
|
159
160
|
label: string;
|
|
160
161
|
isSiteRtl?: boolean;
|
|
161
162
|
extendedOptions?: ExtendedOption[];
|
|
163
|
+
min?: number;
|
|
162
164
|
}) => React$1.JSX.Element>;
|
|
163
165
|
|
|
164
166
|
type FontCategory = {
|
|
@@ -334,6 +336,7 @@ declare const useControlActions: () => ControlActionsContext;
|
|
|
334
336
|
|
|
335
337
|
type SetValueMeta = {
|
|
336
338
|
bind?: PropKey;
|
|
339
|
+
validation?: (value: PropValue) => boolean;
|
|
337
340
|
};
|
|
338
341
|
type SetValue<T> = (value: T, options?: CreateOptions, meta?: SetValueMeta) => void;
|
|
339
342
|
type PropContext<T extends PropValue, P extends PropType> = {
|
|
@@ -424,10 +427,10 @@ declare const injectIntoRepeaterItemActions: (args: _elementor_locations.InjectA
|
|
|
424
427
|
|
|
425
428
|
type UseInternalStateOptions<TValue> = {
|
|
426
429
|
external: TValue | null;
|
|
427
|
-
setExternal: (value: TValue | null) => void;
|
|
430
|
+
setExternal: (value: TValue | null, options?: CreateOptions, meta?: SetValueMeta) => void;
|
|
428
431
|
persistWhen: (value: TValue | null) => boolean;
|
|
429
432
|
fallback: (value: TValue | null) => TValue;
|
|
430
433
|
};
|
|
431
|
-
declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue) => void];
|
|
434
|
+
declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue, options?: CreateOptions, meta?: SetValueMeta) => void];
|
|
432
435
|
|
|
433
436
|
export { type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, CssEditor, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, GapControl, ImageControl, ItemSelector, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, RepeatableControl, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type TimeUnit, type ToggleButtonGroupItem, ToggleControl, type ToggleControlProps, TransformBaseControl, TransformRepeaterControl, TransitionRepeaterControl, type Unit, UrlControl, createControl, createControlReplacementsRegistry, enqueueFont, injectIntoRepeaterHeaderActions, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useFloatingActionsBar, useSyncExternalState };
|
package/dist/index.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ type BaseSizeControlProps = {
|
|
|
49
49
|
extendedOptions?: ExtendedOption[];
|
|
50
50
|
disableCustom?: boolean;
|
|
51
51
|
anchorRef?: RefObject<HTMLDivElement | null>;
|
|
52
|
+
min?: number;
|
|
52
53
|
};
|
|
53
54
|
type LengthSizeControlProps = BaseSizeControlProps & UnitProps<LengthUnit[]> & {
|
|
54
55
|
variant: 'length';
|
|
@@ -60,7 +61,7 @@ type TimeSizeControlProps = BaseSizeControlProps & UnitProps<TimeUnit[]> & {
|
|
|
60
61
|
variant: 'time';
|
|
61
62
|
};
|
|
62
63
|
type SizeControlProps = LengthSizeControlProps | AngleSizeControlProps | TimeSizeControlProps;
|
|
63
|
-
declare const SizeControl: ControlComponent<({ variant, defaultUnit, units, placeholder, startIcon, anchorRef, extendedOptions, disableCustom, }: Omit<SizeControlProps, "variant"> & {
|
|
64
|
+
declare const SizeControl: ControlComponent<({ variant, defaultUnit, units, placeholder, startIcon, anchorRef, extendedOptions, disableCustom, min, }: Omit<SizeControlProps, "variant"> & {
|
|
64
65
|
variant?: SizeVariant;
|
|
65
66
|
}) => React$1.JSX.Element>;
|
|
66
67
|
|
|
@@ -155,10 +156,11 @@ type Props$2<TMultiPropType extends string, TPropValue extends MultiSizePropValu
|
|
|
155
156
|
};
|
|
156
157
|
declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$2<TMultiPropType, TPropValue>): React$1.JSX.Element;
|
|
157
158
|
|
|
158
|
-
declare const LinkedDimensionsControl: ControlComponent<({ label, isSiteRtl, extendedOptions, }: {
|
|
159
|
+
declare const LinkedDimensionsControl: ControlComponent<({ label, isSiteRtl, extendedOptions, min, }: {
|
|
159
160
|
label: string;
|
|
160
161
|
isSiteRtl?: boolean;
|
|
161
162
|
extendedOptions?: ExtendedOption[];
|
|
163
|
+
min?: number;
|
|
162
164
|
}) => React$1.JSX.Element>;
|
|
163
165
|
|
|
164
166
|
type FontCategory = {
|
|
@@ -334,6 +336,7 @@ declare const useControlActions: () => ControlActionsContext;
|
|
|
334
336
|
|
|
335
337
|
type SetValueMeta = {
|
|
336
338
|
bind?: PropKey;
|
|
339
|
+
validation?: (value: PropValue) => boolean;
|
|
337
340
|
};
|
|
338
341
|
type SetValue<T> = (value: T, options?: CreateOptions, meta?: SetValueMeta) => void;
|
|
339
342
|
type PropContext<T extends PropValue, P extends PropType> = {
|
|
@@ -424,10 +427,10 @@ declare const injectIntoRepeaterItemActions: (args: _elementor_locations.InjectA
|
|
|
424
427
|
|
|
425
428
|
type UseInternalStateOptions<TValue> = {
|
|
426
429
|
external: TValue | null;
|
|
427
|
-
setExternal: (value: TValue | null) => void;
|
|
430
|
+
setExternal: (value: TValue | null, options?: CreateOptions, meta?: SetValueMeta) => void;
|
|
428
431
|
persistWhen: (value: TValue | null) => boolean;
|
|
429
432
|
fallback: (value: TValue | null) => TValue;
|
|
430
433
|
};
|
|
431
|
-
declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue) => void];
|
|
434
|
+
declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue, options?: CreateOptions, meta?: SetValueMeta) => void];
|
|
432
435
|
|
|
433
436
|
export { type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent, ControlFormLabel, ControlReplacementsProvider, ControlToggleButtonGroup, CssEditor, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, GapControl, ImageControl, ItemSelector, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PositionControl, PropKeyProvider, PropProvider, type PropProviderProps, RepeatableControl, SelectControl, type SetValue, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type TimeUnit, type ToggleButtonGroupItem, ToggleControl, type ToggleControlProps, TransformBaseControl, TransformRepeaterControl, TransitionRepeaterControl, type Unit, UrlControl, createControl, createControlReplacementsRegistry, enqueueFont, injectIntoRepeaterHeaderActions, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useFloatingActionsBar, useSyncExternalState };
|