@elementor/editor-controls 4.0.0-607 → 4.0.0-619
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 +17 -4
- package/dist/index.d.ts +17 -4
- package/dist/index.js +904 -759
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +682 -539
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/components/size-control/size-input.tsx +20 -13
- package/src/components/text-field-popover.tsx +7 -0
- package/src/controls/aspect-ratio-control.tsx +12 -1
- package/src/controls/number-control.tsx +10 -2
- package/src/controls/svg-media-control.tsx +1 -1
- package/src/controls/transform-control/transform-repeater-control.tsx +19 -19
- package/src/controls/video-media-control.tsx +102 -0
- package/src/hooks/use-typing-buffer.ts +52 -0
- package/src/index.ts +10 -2
- package/src/hooks/use-element-can-have-children.ts +0 -17
package/dist/index.d.mts
CHANGED
|
@@ -43,6 +43,7 @@ type AngleUnit = (typeof angleUnits)[number];
|
|
|
43
43
|
type TimeUnit = (typeof timeUnits)[number];
|
|
44
44
|
type ExtendedOption = (typeof defaultExtendedOptions)[number];
|
|
45
45
|
type Unit = LengthUnit | AngleUnit | TimeUnit;
|
|
46
|
+
declare function isUnitExtendedOption(unit: Unit | ExtendedOption): unit is ExtendedOption;
|
|
46
47
|
|
|
47
48
|
type SizeVariant = 'length' | 'angle' | 'time';
|
|
48
49
|
type UnitProps<T extends readonly Unit[]> = {
|
|
@@ -300,6 +301,8 @@ declare const AspectRatioControl: ControlComponent$1<({ label }: {
|
|
|
300
301
|
|
|
301
302
|
declare const SvgMediaControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
302
303
|
|
|
304
|
+
declare const VideoMediaControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
305
|
+
|
|
303
306
|
declare const BackgroundControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
304
307
|
|
|
305
308
|
declare const SwitchControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
@@ -355,7 +358,9 @@ declare const KeyValueControl: ControlComponent$1<(props?: KeyValueControlProps)
|
|
|
355
358
|
|
|
356
359
|
declare const PositionControl: () => React$1.JSX.Element;
|
|
357
360
|
|
|
358
|
-
declare const TransformRepeaterControl: ControlComponent$1<(
|
|
361
|
+
declare const TransformRepeaterControl: ControlComponent$1<({ showChildrenPerspective }: {
|
|
362
|
+
showChildrenPerspective: boolean;
|
|
363
|
+
}) => React$1.JSX.Element>;
|
|
359
364
|
|
|
360
365
|
declare const TransformSettingsControl: ({ popupState, anchorRef, showChildrenPerspective, }: {
|
|
361
366
|
popupState: PopupState;
|
|
@@ -710,8 +715,16 @@ type UseInternalStateOptions<TValue> = {
|
|
|
710
715
|
};
|
|
711
716
|
declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue, options?: CreateOptions, meta?: SetValueMeta) => void];
|
|
712
717
|
|
|
713
|
-
declare const useElementCanHaveChildren: () => boolean;
|
|
714
|
-
|
|
715
718
|
declare const useFontFamilies: () => FontCategory[];
|
|
716
719
|
|
|
717
|
-
|
|
720
|
+
type UseTypingBufferOptions = {
|
|
721
|
+
limit?: number;
|
|
722
|
+
timeout?: number;
|
|
723
|
+
};
|
|
724
|
+
declare function useTypingBuffer(options?: UseTypingBufferOptions): {
|
|
725
|
+
buffer: string;
|
|
726
|
+
appendKey: (key: string) => string;
|
|
727
|
+
startsWith: (haystack: string, needle: string) => boolean;
|
|
728
|
+
};
|
|
729
|
+
|
|
730
|
+
export { type AdornmentComponent, type AngleUnit, AspectRatioControl, AttributesControl, BackgroundControl, BoxShadowRepeaterControl, ChipsControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateTimeControl, DisplayConditionsControl, EmailFormActionControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, GapControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, type InlineEditorToolbarProps, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, NumberInput, PopoverContent, PopoverGridContainer, PositionControl, PromotionTrigger, type PromotionTriggerRef, PropKeyProvider, PropProvider, type PropProviderProps, QueryControl, RepeatableControl, Repeater, type RepeaterItem, SelectControl, SelectControlWrapper, type SetRepeaterValuesMeta, type SetValue, type SetValueMeta, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type TimeUnit, type ToggleButtonGroupItem, ToggleButtonGroupUi, ToggleControl, type ToggleControlProps, TransformRepeaterControl, TransformSettingsControl, TransitionRepeaterControl, type Unit, UnstableSizeField, UrlControl, type UseTypingBufferOptions, type V4PromotionData, type V4PromotionKey, VideoMediaControl, createControl, createControlReplacementsRegistry, enqueueFont, getControlReplacements, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, isUnitExtendedOption, registerControlReplacement, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useFontFamilies, useSyncExternalState, useTypingBuffer };
|
package/dist/index.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ type AngleUnit = (typeof angleUnits)[number];
|
|
|
43
43
|
type TimeUnit = (typeof timeUnits)[number];
|
|
44
44
|
type ExtendedOption = (typeof defaultExtendedOptions)[number];
|
|
45
45
|
type Unit = LengthUnit | AngleUnit | TimeUnit;
|
|
46
|
+
declare function isUnitExtendedOption(unit: Unit | ExtendedOption): unit is ExtendedOption;
|
|
46
47
|
|
|
47
48
|
type SizeVariant = 'length' | 'angle' | 'time';
|
|
48
49
|
type UnitProps<T extends readonly Unit[]> = {
|
|
@@ -300,6 +301,8 @@ declare const AspectRatioControl: ControlComponent$1<({ label }: {
|
|
|
300
301
|
|
|
301
302
|
declare const SvgMediaControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
302
303
|
|
|
304
|
+
declare const VideoMediaControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
305
|
+
|
|
303
306
|
declare const BackgroundControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
304
307
|
|
|
305
308
|
declare const SwitchControl: ControlComponent$1<() => React$1.JSX.Element>;
|
|
@@ -355,7 +358,9 @@ declare const KeyValueControl: ControlComponent$1<(props?: KeyValueControlProps)
|
|
|
355
358
|
|
|
356
359
|
declare const PositionControl: () => React$1.JSX.Element;
|
|
357
360
|
|
|
358
|
-
declare const TransformRepeaterControl: ControlComponent$1<(
|
|
361
|
+
declare const TransformRepeaterControl: ControlComponent$1<({ showChildrenPerspective }: {
|
|
362
|
+
showChildrenPerspective: boolean;
|
|
363
|
+
}) => React$1.JSX.Element>;
|
|
359
364
|
|
|
360
365
|
declare const TransformSettingsControl: ({ popupState, anchorRef, showChildrenPerspective, }: {
|
|
361
366
|
popupState: PopupState;
|
|
@@ -710,8 +715,16 @@ type UseInternalStateOptions<TValue> = {
|
|
|
710
715
|
};
|
|
711
716
|
declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhen, fallback, }: UseInternalStateOptions<TValue>) => readonly [TValue, (setter: ((value: TValue) => TValue) | TValue, options?: CreateOptions, meta?: SetValueMeta) => void];
|
|
712
717
|
|
|
713
|
-
declare const useElementCanHaveChildren: () => boolean;
|
|
714
|
-
|
|
715
718
|
declare const useFontFamilies: () => FontCategory[];
|
|
716
719
|
|
|
717
|
-
|
|
720
|
+
type UseTypingBufferOptions = {
|
|
721
|
+
limit?: number;
|
|
722
|
+
timeout?: number;
|
|
723
|
+
};
|
|
724
|
+
declare function useTypingBuffer(options?: UseTypingBufferOptions): {
|
|
725
|
+
buffer: string;
|
|
726
|
+
appendKey: (key: string) => string;
|
|
727
|
+
startsWith: (haystack: string, needle: string) => boolean;
|
|
728
|
+
};
|
|
729
|
+
|
|
730
|
+
export { type AdornmentComponent, type AngleUnit, AspectRatioControl, AttributesControl, BackgroundControl, BoxShadowRepeaterControl, ChipsControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateTimeControl, DisplayConditionsControl, EmailFormActionControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, GapControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, type InlineEditorToolbarProps, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, NumberInput, PopoverContent, PopoverGridContainer, PositionControl, PromotionTrigger, type PromotionTriggerRef, PropKeyProvider, PropProvider, type PropProviderProps, QueryControl, RepeatableControl, Repeater, type RepeaterItem, SelectControl, SelectControlWrapper, type SetRepeaterValuesMeta, type SetValue, type SetValueMeta, SizeControl, StrokeControl, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, type TimeUnit, type ToggleButtonGroupItem, ToggleButtonGroupUi, ToggleControl, type ToggleControlProps, TransformRepeaterControl, TransformSettingsControl, TransitionRepeaterControl, type Unit, UnstableSizeField, UrlControl, type UseTypingBufferOptions, type V4PromotionData, type V4PromotionKey, VideoMediaControl, createControl, createControlReplacementsRegistry, enqueueFont, getControlReplacements, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, isUnitExtendedOption, registerControlReplacement, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useFontFamilies, useSyncExternalState, useTypingBuffer };
|