@elementor/editor-controls 4.4.0-1144 → 4.4.0-1146
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 +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +318 -183
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +295 -161
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -16
- package/src/controls/icon-library/font-awesome-7-catalog.ts +2 -0
- package/src/controls/icon-library/font-awesome-glyph.tsx +67 -1
- package/src/controls/icon-library/icon-library-grid.tsx +2 -1
- package/src/controls/icon-library/icon-library-popover.tsx +14 -5
- package/src/controls/icon-library/icon-library-providers.ts +48 -4
- package/src/controls/icon-library/merge-icons-by-id.ts +25 -0
- package/src/controls/notice-control.tsx +12 -5
- package/src/controls/svg-media-preview.tsx +32 -7
- package/src/index.ts +1 -0
package/dist/index.d.mts
CHANGED
|
@@ -463,6 +463,8 @@ type FontAwesome7Icon = FontAwesome7IconDefinition & {
|
|
|
463
463
|
value: string;
|
|
464
464
|
glyphClass?: string;
|
|
465
465
|
svgMarkup?: string;
|
|
466
|
+
/** Markup is resolved on demand by the icon library providers, once the icon is displayed. */
|
|
467
|
+
lazySvg?: boolean;
|
|
466
468
|
};
|
|
467
469
|
|
|
468
470
|
type IconLibraryProviderState = {
|
|
@@ -473,6 +475,11 @@ type IconLibraryProvider = {
|
|
|
473
475
|
id: string;
|
|
474
476
|
useIcons: (enabled: boolean) => IconLibraryProviderState;
|
|
475
477
|
resolveSvg?: (library: string, iconValue: string, signal?: AbortSignal) => Promise<string | null>;
|
|
478
|
+
/**
|
|
479
|
+
* Resolves markup for picker tiles and the control preview. Falls back to `resolveSvg` when omitted.
|
|
480
|
+
* Use it when `resolveSvg` has side effects that should only happen for icons that are actually rendered.
|
|
481
|
+
*/
|
|
482
|
+
resolvePreviewSvg?: (library: string, iconValue: string, signal?: AbortSignal) => Promise<string | null>;
|
|
476
483
|
};
|
|
477
484
|
/**
|
|
478
485
|
* Register before the icon picker mounts. Each picker instance snapshots the providers on mount,
|
|
@@ -482,6 +489,7 @@ type IconLibraryProvider = {
|
|
|
482
489
|
declare function registerIconLibraryProvider(provider: IconLibraryProvider): void;
|
|
483
490
|
declare function unregisterIconLibraryProvider(id: string): void;
|
|
484
491
|
declare function resolveProviderIconSvg(library: string, iconValue: string, signal?: AbortSignal): Promise<string | null>;
|
|
492
|
+
declare function resolveProviderIconPreviewSvg(library: string, iconValue: string, signal?: AbortSignal): Promise<string | null>;
|
|
485
493
|
|
|
486
494
|
declare function enqueueIconFonts(library: string): void;
|
|
487
495
|
|
|
@@ -966,4 +974,4 @@ declare function useTypingBuffer(options?: UseTypingBufferOptions): {
|
|
|
966
974
|
startsWith: (haystack: string, needle: string) => boolean;
|
|
967
975
|
};
|
|
968
976
|
|
|
969
|
-
export { type AdornmentComponent, type AngleUnit, AspectRatioControl, AttachmentTypeControl, AttributesControl, BackgroundControl, BoxShadowRepeaterControl, ChipsControl, ClearIconButton, ColorControl, ControlActions, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateRangeControl, DateTimeControl, DisplayConditionsControl, EmailFormActionControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontAwesome7Icon, type FontAwesome7IconDefinition, type FontCategory, FontFamilyControl, GapControl, GridSpanControl, HtmlTagControl, type IconLibraryProvider, IconLibraryUploadButton, IconLibraryUploadPromotion, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, type InlineEditorToolbarProps, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, MentionTextAreaControl, NoticeControl, NumberControl, NumberInput, PopoverContent, PopoverGridContainer, PositionControl, type PromotionTrackingData, PromotionTrigger, type PromotionTriggerRef, PropKeyProvider, PropProvider, type PropProviderProps, QueryChipsControl, QueryControl, QueryFilterRepeaterControl, RepeatableControl, Repeater, type RepeaterItem, SelectControl, SelectControlWrapper, type SetRepeaterValuesMeta, type SetValue, type SetValueMeta, SizeComponent, SizeControl, StrokeControl, StyledToggleButton, StyledToggleButtonGroup, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, TimeRangeControl, TimeStringControl, type TimeUnit, type ToggleButtonGroupItem, ToggleButtonGroupUi, ToggleControl, type ToggleControlProps, TransformRepeaterControl, TransformSettingsControl, TransitionRepeaterControl, type Unit, UnstableSizeControl, UnstableSizeField, UrlControl, type UseTypingBufferOptions, type V4PromotionData, type V4PromotionKey, VideoMediaControl, createControl, createControlReplacementsRegistry, enqueueFont, enqueueIconFonts, getControlReplacements, getFontAwesome7IconName, injectIntoIconLibraryUploadAction, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, isUnitExtendedOption, registerControlReplacement, registerIconLibraryProvider, resetFontAwesome7IconsCache, resolveFontAwesome7Icon, resolveProviderIconSvg, trackUpgradePromotionClick, trackViewPromotion, transitionProperties, transitionsItemsList, unregisterIconLibraryProvider, useBoundProp, useControlActions, useControlReplacement, useFontFamilies, useSyncExternalState, useTypingBuffer };
|
|
977
|
+
export { type AdornmentComponent, type AngleUnit, AspectRatioControl, AttachmentTypeControl, AttributesControl, BackgroundControl, BoxShadowRepeaterControl, ChipsControl, ClearIconButton, ColorControl, ControlActions, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateRangeControl, DateTimeControl, DisplayConditionsControl, EmailFormActionControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontAwesome7Icon, type FontAwesome7IconDefinition, type FontCategory, FontFamilyControl, GapControl, GridSpanControl, HtmlTagControl, type IconLibraryProvider, IconLibraryUploadButton, IconLibraryUploadPromotion, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, type InlineEditorToolbarProps, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, MentionTextAreaControl, NoticeControl, NumberControl, NumberInput, PopoverContent, PopoverGridContainer, PositionControl, type PromotionTrackingData, PromotionTrigger, type PromotionTriggerRef, PropKeyProvider, PropProvider, type PropProviderProps, QueryChipsControl, QueryControl, QueryFilterRepeaterControl, RepeatableControl, Repeater, type RepeaterItem, SelectControl, SelectControlWrapper, type SetRepeaterValuesMeta, type SetValue, type SetValueMeta, SizeComponent, SizeControl, StrokeControl, StyledToggleButton, StyledToggleButtonGroup, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, TimeRangeControl, TimeStringControl, type TimeUnit, type ToggleButtonGroupItem, ToggleButtonGroupUi, ToggleControl, type ToggleControlProps, TransformRepeaterControl, TransformSettingsControl, TransitionRepeaterControl, type Unit, UnstableSizeControl, UnstableSizeField, UrlControl, type UseTypingBufferOptions, type V4PromotionData, type V4PromotionKey, VideoMediaControl, createControl, createControlReplacementsRegistry, enqueueFont, enqueueIconFonts, getControlReplacements, getFontAwesome7IconName, injectIntoIconLibraryUploadAction, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, isUnitExtendedOption, registerControlReplacement, registerIconLibraryProvider, resetFontAwesome7IconsCache, resolveFontAwesome7Icon, resolveProviderIconPreviewSvg, resolveProviderIconSvg, trackUpgradePromotionClick, trackViewPromotion, transitionProperties, transitionsItemsList, unregisterIconLibraryProvider, useBoundProp, useControlActions, useControlReplacement, useFontFamilies, useSyncExternalState, useTypingBuffer };
|
package/dist/index.d.ts
CHANGED
|
@@ -463,6 +463,8 @@ type FontAwesome7Icon = FontAwesome7IconDefinition & {
|
|
|
463
463
|
value: string;
|
|
464
464
|
glyphClass?: string;
|
|
465
465
|
svgMarkup?: string;
|
|
466
|
+
/** Markup is resolved on demand by the icon library providers, once the icon is displayed. */
|
|
467
|
+
lazySvg?: boolean;
|
|
466
468
|
};
|
|
467
469
|
|
|
468
470
|
type IconLibraryProviderState = {
|
|
@@ -473,6 +475,11 @@ type IconLibraryProvider = {
|
|
|
473
475
|
id: string;
|
|
474
476
|
useIcons: (enabled: boolean) => IconLibraryProviderState;
|
|
475
477
|
resolveSvg?: (library: string, iconValue: string, signal?: AbortSignal) => Promise<string | null>;
|
|
478
|
+
/**
|
|
479
|
+
* Resolves markup for picker tiles and the control preview. Falls back to `resolveSvg` when omitted.
|
|
480
|
+
* Use it when `resolveSvg` has side effects that should only happen for icons that are actually rendered.
|
|
481
|
+
*/
|
|
482
|
+
resolvePreviewSvg?: (library: string, iconValue: string, signal?: AbortSignal) => Promise<string | null>;
|
|
476
483
|
};
|
|
477
484
|
/**
|
|
478
485
|
* Register before the icon picker mounts. Each picker instance snapshots the providers on mount,
|
|
@@ -482,6 +489,7 @@ type IconLibraryProvider = {
|
|
|
482
489
|
declare function registerIconLibraryProvider(provider: IconLibraryProvider): void;
|
|
483
490
|
declare function unregisterIconLibraryProvider(id: string): void;
|
|
484
491
|
declare function resolveProviderIconSvg(library: string, iconValue: string, signal?: AbortSignal): Promise<string | null>;
|
|
492
|
+
declare function resolveProviderIconPreviewSvg(library: string, iconValue: string, signal?: AbortSignal): Promise<string | null>;
|
|
485
493
|
|
|
486
494
|
declare function enqueueIconFonts(library: string): void;
|
|
487
495
|
|
|
@@ -966,4 +974,4 @@ declare function useTypingBuffer(options?: UseTypingBufferOptions): {
|
|
|
966
974
|
startsWith: (haystack: string, needle: string) => boolean;
|
|
967
975
|
};
|
|
968
976
|
|
|
969
|
-
export { type AdornmentComponent, type AngleUnit, AspectRatioControl, AttachmentTypeControl, AttributesControl, BackgroundControl, BoxShadowRepeaterControl, ChipsControl, ClearIconButton, ColorControl, ControlActions, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateRangeControl, DateTimeControl, DisplayConditionsControl, EmailFormActionControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontAwesome7Icon, type FontAwesome7IconDefinition, type FontCategory, FontFamilyControl, GapControl, GridSpanControl, HtmlTagControl, type IconLibraryProvider, IconLibraryUploadButton, IconLibraryUploadPromotion, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, type InlineEditorToolbarProps, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, MentionTextAreaControl, NoticeControl, NumberControl, NumberInput, PopoverContent, PopoverGridContainer, PositionControl, type PromotionTrackingData, PromotionTrigger, type PromotionTriggerRef, PropKeyProvider, PropProvider, type PropProviderProps, QueryChipsControl, QueryControl, QueryFilterRepeaterControl, RepeatableControl, Repeater, type RepeaterItem, SelectControl, SelectControlWrapper, type SetRepeaterValuesMeta, type SetValue, type SetValueMeta, SizeComponent, SizeControl, StrokeControl, StyledToggleButton, StyledToggleButtonGroup, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, TimeRangeControl, TimeStringControl, type TimeUnit, type ToggleButtonGroupItem, ToggleButtonGroupUi, ToggleControl, type ToggleControlProps, TransformRepeaterControl, TransformSettingsControl, TransitionRepeaterControl, type Unit, UnstableSizeControl, UnstableSizeField, UrlControl, type UseTypingBufferOptions, type V4PromotionData, type V4PromotionKey, VideoMediaControl, createControl, createControlReplacementsRegistry, enqueueFont, enqueueIconFonts, getControlReplacements, getFontAwesome7IconName, injectIntoIconLibraryUploadAction, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, isUnitExtendedOption, registerControlReplacement, registerIconLibraryProvider, resetFontAwesome7IconsCache, resolveFontAwesome7Icon, resolveProviderIconSvg, trackUpgradePromotionClick, trackViewPromotion, transitionProperties, transitionsItemsList, unregisterIconLibraryProvider, useBoundProp, useControlActions, useControlReplacement, useFontFamilies, useSyncExternalState, useTypingBuffer };
|
|
977
|
+
export { type AdornmentComponent, type AngleUnit, AspectRatioControl, AttachmentTypeControl, AttributesControl, BackgroundControl, BoxShadowRepeaterControl, ChipsControl, ClearIconButton, ColorControl, ControlActions, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateRangeControl, DateTimeControl, DisplayConditionsControl, EmailFormActionControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontAwesome7Icon, type FontAwesome7IconDefinition, type FontCategory, FontFamilyControl, GapControl, GridSpanControl, HtmlTagControl, type IconLibraryProvider, IconLibraryUploadButton, IconLibraryUploadPromotion, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, type InlineEditorToolbarProps, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, MentionTextAreaControl, NoticeControl, NumberControl, NumberInput, PopoverContent, PopoverGridContainer, PositionControl, type PromotionTrackingData, PromotionTrigger, type PromotionTriggerRef, PropKeyProvider, PropProvider, type PropProviderProps, QueryChipsControl, QueryControl, QueryFilterRepeaterControl, RepeatableControl, Repeater, type RepeaterItem, SelectControl, SelectControlWrapper, type SetRepeaterValuesMeta, type SetValue, type SetValueMeta, SizeComponent, SizeControl, StrokeControl, StyledToggleButton, StyledToggleButtonGroup, SvgMediaControl, SwitchControl, TextAreaControl, TextControl, TimeRangeControl, TimeStringControl, type TimeUnit, type ToggleButtonGroupItem, ToggleButtonGroupUi, ToggleControl, type ToggleControlProps, TransformRepeaterControl, TransformSettingsControl, TransitionRepeaterControl, type Unit, UnstableSizeControl, UnstableSizeField, UrlControl, type UseTypingBufferOptions, type V4PromotionData, type V4PromotionKey, VideoMediaControl, createControl, createControlReplacementsRegistry, enqueueFont, enqueueIconFonts, getControlReplacements, getFontAwesome7IconName, injectIntoIconLibraryUploadAction, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, isUnitExtendedOption, registerControlReplacement, registerIconLibraryProvider, resetFontAwesome7IconsCache, resolveFontAwesome7Icon, resolveProviderIconPreviewSvg, resolveProviderIconSvg, trackUpgradePromotionClick, trackViewPromotion, transitionProperties, transitionsItemsList, unregisterIconLibraryProvider, useBoundProp, useControlActions, useControlReplacement, useFontFamilies, useSyncExternalState, useTypingBuffer };
|