@elementor/editor-controls 3.35.0-493 → 3.35.1

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 CHANGED
@@ -1,10 +1,11 @@
1
1
  import * as React$1 from 'react';
2
- import { RefObject, ReactNode, FC, PropsWithChildren, ComponentProps, ReactElement, ComponentType } from 'react';
3
- import { SxProps, SelectProps, UnstableColorFieldProps, ToggleButtonProps, StackProps, PopupState, Theme, FormLabelProps, Grid } from '@elementor/ui';
2
+ import { RefObject, ReactNode, FC, PropsWithChildren, ComponentProps, ReactElement, Dispatch, SetStateAction, ComponentType } from 'react';
3
+ import { SxProps, SelectProps, UnstableColorFieldProps, StackProps, ToggleButtonProps, PopupState, Theme, FormLabelProps, Grid } from '@elementor/ui';
4
4
  import { StringPropValue, PropTypeUtil, PropValue, PropKey, LinkPropValue, TransformablePropValue, PropType, CreateOptions } from '@elementor/editor-props';
5
5
  import { StyleDefinitionState } from '@elementor/editor-styles';
6
- import { ElementID } from '@elementor/editor-elements';
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 = {
@@ -390,6 +391,27 @@ declare const InlineEditingControl: ControlComponent$1<({ sx, attributes, props,
390
391
 
391
392
  declare const ControlFormLabel: (props: FormLabelProps) => React$1.JSX.Element;
392
393
 
394
+ declare const DisplayConditionsControl: ControlComponent$1<() => React$1.JSX.Element>;
395
+
396
+ declare const AttributesControl: ControlComponent$1<() => React$1.JSX.Element>;
397
+
398
+ type V4PromotionData = {
399
+ title: string;
400
+ content: string;
401
+ image: string;
402
+ ctaUrl: string;
403
+ };
404
+ type V4PromotionKey = 'displayConditions' | 'customCss' | 'attributes';
405
+
406
+ type PromotionTriggerProps = {
407
+ promotionKey: V4PromotionKey;
408
+ children?: ReactNode;
409
+ };
410
+ type PromotionTriggerRef = {
411
+ toggle: () => void;
412
+ };
413
+ declare const PromotionTrigger: React$1.ForwardRefExoticComponent<PromotionTriggerProps & React$1.RefAttributes<PromotionTriggerRef>>;
414
+
393
415
  type ClearIconButtonProps = {
394
416
  onClick?: () => void;
395
417
  tooltipText: React$1.ReactNode;
@@ -559,26 +581,24 @@ declare const PopoverGridContainer: React$1.ForwardRefExoticComponent<{
559
581
  type InlineEditorProps = {
560
582
  value: string | null;
561
583
  setValue: (value: string | null) => void;
562
- attributes?: Record<string, string>;
584
+ editorProps?: EditorProps;
563
585
  elementClasses?: string;
564
586
  sx?: SxProps<Theme>;
565
- onBlur?: (event: Event) => void;
566
- showToolbar?: boolean;
587
+ onBlur?: () => void;
567
588
  autofocus?: boolean;
568
- getInitialPopoverPosition?: () => {
569
- left: number;
570
- top: number;
571
- };
572
589
  expectedTag?: string | null;
573
- elementId?: ElementID;
590
+ onEditorCreate?: Dispatch<SetStateAction<Editor | null>>;
591
+ wrapperClassName?: string;
592
+ onSelectionEnd?: (view: EditorView) => void;
574
593
  };
575
594
  declare const InlineEditor: React$1.ForwardRefExoticComponent<InlineEditorProps & React$1.RefAttributes<unknown>>;
576
595
 
577
596
  type InlineEditorToolbarProps = {
578
597
  editor: Editor;
579
598
  elementId?: ElementID;
599
+ sx?: SxProps<Theme>;
580
600
  };
581
- declare const InlineEditorToolbar: ({ editor, elementId }: InlineEditorToolbarProps) => React$1.JSX.Element;
601
+ declare const InlineEditorToolbar: ({ editor, elementId, sx }: InlineEditorToolbarProps) => React$1.JSX.Element;
582
602
 
583
603
  type AnyComponentType = ComponentType<any>;
584
604
  declare const brandSymbol: unique symbol;
@@ -671,4 +691,4 @@ declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhe
671
691
 
672
692
  declare const useElementCanHaveChildren: () => boolean;
673
693
 
674
- 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, FloatingActionsBar, 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, UrlControl, createControl, createControlReplacementsRegistry, enqueueFont, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useElementCanHaveChildren, useFloatingActionsBar, useSyncExternalState };
694
+ export { type AdornmentComponent, type AngleUnit, AspectRatioControl, AttributesControl, BackgroundControl, BoxShadowRepeaterControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateTimeControl, DisplayConditionsControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, FloatingActionsBar, type FontCategory, FontFamilyControl, GapControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, type InlineEditorToolbarProps, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, 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, UrlControl, type V4PromotionData, type V4PromotionKey, createControl, createControlReplacementsRegistry, enqueueFont, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useElementCanHaveChildren, useFloatingActionsBar, 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, ReactElement, ComponentType } from 'react';
3
- import { SxProps, SelectProps, UnstableColorFieldProps, ToggleButtonProps, StackProps, PopupState, Theme, FormLabelProps, Grid } from '@elementor/ui';
2
+ import { RefObject, ReactNode, FC, PropsWithChildren, ComponentProps, ReactElement, Dispatch, SetStateAction, ComponentType } from 'react';
3
+ import { SxProps, SelectProps, UnstableColorFieldProps, StackProps, ToggleButtonProps, PopupState, Theme, FormLabelProps, Grid } from '@elementor/ui';
4
4
  import { StringPropValue, PropTypeUtil, PropValue, PropKey, LinkPropValue, TransformablePropValue, PropType, CreateOptions } from '@elementor/editor-props';
5
5
  import { StyleDefinitionState } from '@elementor/editor-styles';
6
- import { ElementID } from '@elementor/editor-elements';
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 = {
@@ -390,6 +391,27 @@ declare const InlineEditingControl: ControlComponent$1<({ sx, attributes, props,
390
391
 
391
392
  declare const ControlFormLabel: (props: FormLabelProps) => React$1.JSX.Element;
392
393
 
394
+ declare const DisplayConditionsControl: ControlComponent$1<() => React$1.JSX.Element>;
395
+
396
+ declare const AttributesControl: ControlComponent$1<() => React$1.JSX.Element>;
397
+
398
+ type V4PromotionData = {
399
+ title: string;
400
+ content: string;
401
+ image: string;
402
+ ctaUrl: string;
403
+ };
404
+ type V4PromotionKey = 'displayConditions' | 'customCss' | 'attributes';
405
+
406
+ type PromotionTriggerProps = {
407
+ promotionKey: V4PromotionKey;
408
+ children?: ReactNode;
409
+ };
410
+ type PromotionTriggerRef = {
411
+ toggle: () => void;
412
+ };
413
+ declare const PromotionTrigger: React$1.ForwardRefExoticComponent<PromotionTriggerProps & React$1.RefAttributes<PromotionTriggerRef>>;
414
+
393
415
  type ClearIconButtonProps = {
394
416
  onClick?: () => void;
395
417
  tooltipText: React$1.ReactNode;
@@ -559,26 +581,24 @@ declare const PopoverGridContainer: React$1.ForwardRefExoticComponent<{
559
581
  type InlineEditorProps = {
560
582
  value: string | null;
561
583
  setValue: (value: string | null) => void;
562
- attributes?: Record<string, string>;
584
+ editorProps?: EditorProps;
563
585
  elementClasses?: string;
564
586
  sx?: SxProps<Theme>;
565
- onBlur?: (event: Event) => void;
566
- showToolbar?: boolean;
587
+ onBlur?: () => void;
567
588
  autofocus?: boolean;
568
- getInitialPopoverPosition?: () => {
569
- left: number;
570
- top: number;
571
- };
572
589
  expectedTag?: string | null;
573
- elementId?: ElementID;
590
+ onEditorCreate?: Dispatch<SetStateAction<Editor | null>>;
591
+ wrapperClassName?: string;
592
+ onSelectionEnd?: (view: EditorView) => void;
574
593
  };
575
594
  declare const InlineEditor: React$1.ForwardRefExoticComponent<InlineEditorProps & React$1.RefAttributes<unknown>>;
576
595
 
577
596
  type InlineEditorToolbarProps = {
578
597
  editor: Editor;
579
598
  elementId?: ElementID;
599
+ sx?: SxProps<Theme>;
580
600
  };
581
- declare const InlineEditorToolbar: ({ editor, elementId }: InlineEditorToolbarProps) => React$1.JSX.Element;
601
+ declare const InlineEditorToolbar: ({ editor, elementId, sx }: InlineEditorToolbarProps) => React$1.JSX.Element;
582
602
 
583
603
  type AnyComponentType = ComponentType<any>;
584
604
  declare const brandSymbol: unique symbol;
@@ -671,4 +691,4 @@ declare const useSyncExternalState: <TValue>({ external, setExternal, persistWhe
671
691
 
672
692
  declare const useElementCanHaveChildren: () => boolean;
673
693
 
674
- 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, FloatingActionsBar, 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, UrlControl, createControl, createControlReplacementsRegistry, enqueueFont, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useElementCanHaveChildren, useFloatingActionsBar, useSyncExternalState };
694
+ export { type AdornmentComponent, type AngleUnit, AspectRatioControl, AttributesControl, BackgroundControl, BoxShadowRepeaterControl, ClearIconButton, ColorControl, type ControlActionsItems, ControlActionsProvider, ControlAdornments, ControlAdornmentsProvider, type ControlComponent$1 as ControlComponent, ControlFormLabel, type ControlReplacement, ControlReplacementsProvider, ControlToggleButtonGroup, DateTimeControl, DisplayConditionsControl, type EqualUnequalItems, EqualUnequalSizesControl, type ExtendedOption, FilterRepeaterControl, FloatingActionsBar, type FontCategory, FontFamilyControl, GapControl, HtmlTagControl, ImageControl, InlineEditingControl, InlineEditor, InlineEditorToolbar, type InlineEditorToolbarProps, ItemSelector, type ItemsActionPayload, KeyValueControl, type LengthUnit, LinkControl, LinkedDimensionsControl, NumberControl, 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, UrlControl, type V4PromotionData, type V4PromotionKey, createControl, createControlReplacementsRegistry, enqueueFont, injectIntoRepeaterItemActions, injectIntoRepeaterItemIcon, injectIntoRepeaterItemLabel, transitionProperties, transitionsItemsList, useBoundProp, useControlActions, useControlReplacement, useElementCanHaveChildren, useFloatingActionsBar, useSyncExternalState };