@elementor/editor-controls 4.0.0-511 → 4.0.0-513
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 +13 -12
- package/dist/index.d.ts +13 -12
- package/dist/index.js +442 -483
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +454 -499
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/components/inline-editor-toolbar.tsx +78 -74
- package/src/components/inline-editor.tsx +157 -231
- package/src/control-replacements.tsx +2 -0
- package/src/index.ts +3 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import { RefObject, ReactNode, FC, PropsWithChildren, ComponentProps, ComponentType } from 'react';
|
|
2
|
+
import { RefObject, ReactNode, FC, PropsWithChildren, ComponentProps, Dispatch, SetStateAction, ComponentType } from 'react';
|
|
3
3
|
import { SxProps, SelectProps, UnstableColorFieldProps, ToggleButtonProps, StackProps, PopupState, Theme, FormLabelProps, Grid } from '@elementor/ui';
|
|
4
4
|
import { StringPropValue, PropTypeUtil, PropValue, PropKey, LinkPropValue, TransformablePropValue, PropType, CreateOptions, SizePropValue } from '@elementor/editor-props';
|
|
5
5
|
import { StyleDefinitionState } from '@elementor/editor-styles';
|
|
6
|
-
import {
|
|
6
|
+
import { EditorProps, EditorView } from '@tiptap/pm/view';
|
|
7
7
|
import { Editor } from '@tiptap/react';
|
|
8
|
+
import { ElementID } from '@elementor/editor-elements';
|
|
8
9
|
import * as _elementor_locations from '@elementor/locations';
|
|
9
10
|
|
|
10
11
|
type ImageControlProps = {
|
|
@@ -551,26 +552,24 @@ declare const PopoverGridContainer: React$1.ForwardRefExoticComponent<{
|
|
|
551
552
|
type InlineEditorProps = {
|
|
552
553
|
value: string | null;
|
|
553
554
|
setValue: (value: string | null) => void;
|
|
554
|
-
|
|
555
|
+
editorProps?: EditorProps;
|
|
555
556
|
elementClasses?: string;
|
|
556
557
|
sx?: SxProps<Theme>;
|
|
557
|
-
onBlur?: (
|
|
558
|
-
showToolbar?: boolean;
|
|
558
|
+
onBlur?: () => void;
|
|
559
559
|
autofocus?: boolean;
|
|
560
|
-
getInitialPopoverPosition?: () => {
|
|
561
|
-
left: number;
|
|
562
|
-
top: number;
|
|
563
|
-
};
|
|
564
560
|
expectedTag?: string | null;
|
|
565
|
-
|
|
561
|
+
onEditorCreate?: Dispatch<SetStateAction<Editor | null>>;
|
|
562
|
+
wrapperClassName?: string;
|
|
563
|
+
onSelectionEnd?: (view: EditorView) => void;
|
|
566
564
|
};
|
|
567
565
|
declare const InlineEditor: React$1.ForwardRefExoticComponent<InlineEditorProps & React$1.RefAttributes<unknown>>;
|
|
568
566
|
|
|
569
567
|
type InlineEditorToolbarProps = {
|
|
570
568
|
editor: Editor;
|
|
571
569
|
elementId?: ElementID;
|
|
570
|
+
sx?: SxProps<Theme>;
|
|
572
571
|
};
|
|
573
|
-
declare const InlineEditorToolbar: ({ editor, elementId }: InlineEditorToolbarProps) => React$1.JSX.Element;
|
|
572
|
+
declare const InlineEditorToolbar: ({ editor, elementId, sx }: InlineEditorToolbarProps) => React$1.JSX.Element;
|
|
574
573
|
|
|
575
574
|
type Props$1<TValue> = {
|
|
576
575
|
units: Unit[];
|
|
@@ -645,6 +644,8 @@ declare const createControlReplacementsRegistry: () => {
|
|
|
645
644
|
registerControlReplacement: (replacement: ControlReplacement) => void;
|
|
646
645
|
getControlReplacements: () => ControlReplacement[];
|
|
647
646
|
};
|
|
647
|
+
declare const registerControlReplacement: (replacement: ControlReplacement) => void;
|
|
648
|
+
declare const getControlReplacements: () => ControlReplacement[];
|
|
648
649
|
|
|
649
650
|
declare function ControlAdornments({ customContext, }: {
|
|
650
651
|
customContext?: {
|
|
@@ -675,4 +676,4 @@ declare const useElementCanHaveChildren: () => boolean;
|
|
|
675
676
|
|
|
676
677
|
declare const useFontFamilies: () => FontCategory[];
|
|
677
678
|
|
|
678
|
-
export { type AdornmentComponent, type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateTimeControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, GapControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PopoverGridContainer, PositionControl, 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, createControl, createControlReplacementsRegistry, enqueueFont, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useElementCanHaveChildren, useFontFamilies, useSyncExternalState };
|
|
679
|
+
export { type AdornmentComponent, type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateTimeControl, 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, PopoverContent, PopoverGridContainer, PositionControl, 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, createControl, createControlReplacementsRegistry, enqueueFont, getControlReplacements, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, registerControlReplacement, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useElementCanHaveChildren, useFontFamilies, useSyncExternalState };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import { RefObject, ReactNode, FC, PropsWithChildren, ComponentProps, ComponentType } from 'react';
|
|
2
|
+
import { RefObject, ReactNode, FC, PropsWithChildren, ComponentProps, Dispatch, SetStateAction, ComponentType } from 'react';
|
|
3
3
|
import { SxProps, SelectProps, UnstableColorFieldProps, ToggleButtonProps, StackProps, PopupState, Theme, FormLabelProps, Grid } from '@elementor/ui';
|
|
4
4
|
import { StringPropValue, PropTypeUtil, PropValue, PropKey, LinkPropValue, TransformablePropValue, PropType, CreateOptions, SizePropValue } from '@elementor/editor-props';
|
|
5
5
|
import { StyleDefinitionState } from '@elementor/editor-styles';
|
|
6
|
-
import {
|
|
6
|
+
import { EditorProps, EditorView } from '@tiptap/pm/view';
|
|
7
7
|
import { Editor } from '@tiptap/react';
|
|
8
|
+
import { ElementID } from '@elementor/editor-elements';
|
|
8
9
|
import * as _elementor_locations from '@elementor/locations';
|
|
9
10
|
|
|
10
11
|
type ImageControlProps = {
|
|
@@ -551,26 +552,24 @@ declare const PopoverGridContainer: React$1.ForwardRefExoticComponent<{
|
|
|
551
552
|
type InlineEditorProps = {
|
|
552
553
|
value: string | null;
|
|
553
554
|
setValue: (value: string | null) => void;
|
|
554
|
-
|
|
555
|
+
editorProps?: EditorProps;
|
|
555
556
|
elementClasses?: string;
|
|
556
557
|
sx?: SxProps<Theme>;
|
|
557
|
-
onBlur?: (
|
|
558
|
-
showToolbar?: boolean;
|
|
558
|
+
onBlur?: () => void;
|
|
559
559
|
autofocus?: boolean;
|
|
560
|
-
getInitialPopoverPosition?: () => {
|
|
561
|
-
left: number;
|
|
562
|
-
top: number;
|
|
563
|
-
};
|
|
564
560
|
expectedTag?: string | null;
|
|
565
|
-
|
|
561
|
+
onEditorCreate?: Dispatch<SetStateAction<Editor | null>>;
|
|
562
|
+
wrapperClassName?: string;
|
|
563
|
+
onSelectionEnd?: (view: EditorView) => void;
|
|
566
564
|
};
|
|
567
565
|
declare const InlineEditor: React$1.ForwardRefExoticComponent<InlineEditorProps & React$1.RefAttributes<unknown>>;
|
|
568
566
|
|
|
569
567
|
type InlineEditorToolbarProps = {
|
|
570
568
|
editor: Editor;
|
|
571
569
|
elementId?: ElementID;
|
|
570
|
+
sx?: SxProps<Theme>;
|
|
572
571
|
};
|
|
573
|
-
declare const InlineEditorToolbar: ({ editor, elementId }: InlineEditorToolbarProps) => React$1.JSX.Element;
|
|
572
|
+
declare const InlineEditorToolbar: ({ editor, elementId, sx }: InlineEditorToolbarProps) => React$1.JSX.Element;
|
|
574
573
|
|
|
575
574
|
type Props$1<TValue> = {
|
|
576
575
|
units: Unit[];
|
|
@@ -645,6 +644,8 @@ declare const createControlReplacementsRegistry: () => {
|
|
|
645
644
|
registerControlReplacement: (replacement: ControlReplacement) => void;
|
|
646
645
|
getControlReplacements: () => ControlReplacement[];
|
|
647
646
|
};
|
|
647
|
+
declare const registerControlReplacement: (replacement: ControlReplacement) => void;
|
|
648
|
+
declare const getControlReplacements: () => ControlReplacement[];
|
|
648
649
|
|
|
649
650
|
declare function ControlAdornments({ customContext, }: {
|
|
650
651
|
customContext?: {
|
|
@@ -675,4 +676,4 @@ declare const useElementCanHaveChildren: () => boolean;
|
|
|
675
676
|
|
|
676
677
|
declare const useFontFamilies: () => FontCategory[];
|
|
677
678
|
|
|
678
|
-
export { type AdornmentComponent, type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateTimeControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, type FontCategory, FontFamilyControl, GapControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, PopoverContent, PopoverGridContainer, PositionControl, 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, createControl, createControlReplacementsRegistry, enqueueFont, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useElementCanHaveChildren, useFontFamilies, useSyncExternalState };
|
|
679
|
+
export { type AdornmentComponent, type AngleUnit, AspectRatioControl, BackgroundControl, BoxShadowRepeaterControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateTimeControl, 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, PopoverContent, PopoverGridContainer, PositionControl, 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, createControl, createControlReplacementsRegistry, enqueueFont, getControlReplacements, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, registerControlReplacement, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useElementCanHaveChildren, useFontFamilies, useSyncExternalState };
|