@elementor/editor-controls 4.3.0-1058 → 4.3.0-1059

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
@@ -29,11 +29,11 @@ declare const TextControl: ControlComponent$1<({ placeholder: propPlaceholder, e
29
29
  ariaLabel?: string;
30
30
  }) => React$1.JSX.Element>;
31
31
 
32
- type Props$d = {
32
+ type Props$e = {
33
33
  placeholder?: string;
34
34
  ariaLabel?: string;
35
35
  };
36
- declare const TextAreaControl: ControlComponent$1<({ placeholder: propPlaceholder, ariaLabel }: Props$d) => React$1.JSX.Element>;
36
+ declare const TextAreaControl: ControlComponent$1<({ placeholder: propPlaceholder, ariaLabel }: Props$e) => React$1.JSX.Element>;
37
37
 
38
38
  type Suggestion = {
39
39
  label: string;
@@ -41,14 +41,14 @@ type Suggestion = {
41
41
  };
42
42
 
43
43
  type TriggerPosition = 'start' | 'auto';
44
- type Props$c = {
44
+ type Props$d = {
45
45
  placeholder?: string;
46
46
  ariaLabel?: string;
47
47
  suggestions: Suggestion[];
48
48
  rows?: number;
49
49
  triggerPosition?: TriggerPosition;
50
50
  };
51
- declare const MentionTextAreaControl: ControlComponent$1<({ placeholder, ariaLabel, suggestions: allSuggestions, rows, triggerPosition }: Props$c) => React$1.JSX.Element>;
51
+ declare const MentionTextAreaControl: ControlComponent$1<({ placeholder, ariaLabel, suggestions: allSuggestions, rows, triggerPosition }: Props$d) => React$1.JSX.Element>;
52
52
 
53
53
  type SizeUnit$1 = SizePropValue['value']['unit'];
54
54
  type ExtendedOption = Extract<SizeUnit$1, 'auto' | 'custom'>;
@@ -137,12 +137,12 @@ type ChipsControlProps = {
137
137
  };
138
138
  declare const ChipsControl: ControlComponent$1<({ options, freeChips }: ChipsControlProps) => React$1.JSX.Element>;
139
139
 
140
- type Props$b = Partial<Omit<UnstableColorFieldProps, 'value' | 'onChange'>> & {
140
+ type Props$c = Partial<Omit<UnstableColorFieldProps, 'value' | 'onChange'>> & {
141
141
  propTypeUtil?: PropTypeUtil<string, string>;
142
142
  anchorEl?: HTMLElement | null;
143
143
  id?: string;
144
144
  };
145
- declare const ColorControl: ControlComponent$1<({ propTypeUtil, anchorEl, slotProps, id, ...props }: Props$b) => React$1.JSX.Element>;
145
+ declare const ColorControl: ControlComponent$1<({ propTypeUtil, anchorEl, slotProps, id, ...props }: Props$c) => React$1.JSX.Element>;
146
146
 
147
147
  type RenderContentProps = {
148
148
  size: ToggleButtonProps['size'];
@@ -162,7 +162,7 @@ declare const StyledToggleButton: _emotion_styled.StyledComponent<any, {}, {
162
162
  }>;
163
163
  type ExclusiveValue<TValue> = TValue;
164
164
  type NonExclusiveValue<TValue> = TValue[];
165
- type Props$a<TValue> = {
165
+ type Props$b<TValue> = {
166
166
  disabled?: boolean;
167
167
  justify?: StackProps['justifyContent'];
168
168
  size?: ToggleButtonProps['size'];
@@ -179,10 +179,10 @@ type Props$a<TValue> = {
179
179
  value: ExclusiveValue<TValue>;
180
180
  onChange: (value: ExclusiveValue<TValue>) => void;
181
181
  });
182
- declare const ToggleButtonGroupUi: <TValue>(props: Props$a<TValue> & {
182
+ declare const ToggleButtonGroupUi: <TValue>(props: Props$b<TValue> & {
183
183
  ref?: React$1.Ref<HTMLDivElement>;
184
184
  }) => React$1.ReactElement;
185
- declare const ControlToggleButtonGroup: <TValue>(props: Props$a<TValue>) => React$1.JSX.Element;
185
+ declare const ControlToggleButtonGroup: <TValue>(props: Props$b<TValue>) => React$1.JSX.Element;
186
186
 
187
187
  type ToggleControlProps<T extends PropValue> = {
188
188
  options: Array<ToggleButtonGroupItem<T> & {
@@ -214,22 +214,22 @@ type Item$1 = {
214
214
  bind: PropKey;
215
215
  };
216
216
  type EqualUnequalItems = [Item$1, Item$1, Item$1, Item$1];
217
- type Props$9<TMultiPropType extends string, TPropValue extends MultiSizePropValue> = {
217
+ type Props$a<TMultiPropType extends string, TPropValue extends MultiSizePropValue> = {
218
218
  label: string;
219
219
  icon: ReactNode;
220
220
  tooltipLabel: string;
221
221
  items: EqualUnequalItems;
222
222
  multiSizePropTypeUtil: PropTypeUtil<TMultiPropType, TPropValue>;
223
223
  };
224
- declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$9<TMultiPropType, TPropValue>): React$1.JSX.Element;
224
+ declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$a<TMultiPropType, TPropValue>): React$1.JSX.Element;
225
225
 
226
- type Props$8 = {
226
+ type Props$9 = {
227
227
  label: string;
228
228
  isSiteRtl?: boolean;
229
229
  extendedOptions?: ExtendedOption[];
230
230
  min?: number;
231
231
  };
232
- declare const LinkedDimensionsControl: ({ label, isSiteRtl, min }: Props$8) => React$1.JSX.Element;
232
+ declare const LinkedDimensionsControl: ({ label, isSiteRtl, min }: Props$9) => React$1.JSX.Element;
233
233
 
234
234
  type FontCategory = {
235
235
  label: string;
@@ -282,7 +282,7 @@ type ControlProps<TControlProps = unknown> = TControlProps & {
282
282
  };
283
283
  };
284
284
 
285
- type Props$7 = ControlProps<{
285
+ type Props$8 = ControlProps<{
286
286
  queryOptions: {
287
287
  params: Record<string, unknown>;
288
288
  url: string;
@@ -294,19 +294,19 @@ type Props$7 = ControlProps<{
294
294
  ariaLabel?: string;
295
295
  }>;
296
296
  type DestinationProp = LinkPropValue['value']['destination'];
297
- declare const LinkControl: ControlComponent$1<(props: Props$7) => React$1.JSX.Element>;
297
+ declare const LinkControl: ControlComponent$1<(props: Props$8) => React$1.JSX.Element>;
298
298
 
299
299
  type SelectOption = {
300
300
  label: string;
301
301
  value: StringPropValue['value'];
302
302
  disabled?: boolean;
303
303
  };
304
- type Props$6 = ControlProps<{
304
+ type Props$7 = ControlProps<{
305
305
  options: SelectOption[];
306
306
  onChange?: (newValue: string | null, previousValue: string | null | undefined) => void;
307
307
  fallbackLabels?: Record<string, string>;
308
308
  }>;
309
- declare const HtmlTagControl: ControlComponent$1<(props: Props$6) => React$1.JSX.Element>;
309
+ declare const HtmlTagControl: ControlComponent$1<(props: Props$7) => React$1.JSX.Element>;
310
310
 
311
311
  type QueryChipsControlProps = {
312
312
  queryOptions: {
@@ -318,7 +318,7 @@ type QueryChipsControlProps = {
318
318
  };
319
319
  declare const QueryChipsControl: ControlComponent$1<(props: QueryChipsControlProps) => React$1.JSX.Element>;
320
320
 
321
- type Props$5 = {
321
+ type Props$6 = {
322
322
  queryOptions: {
323
323
  params: Record<string, unknown>;
324
324
  url: string;
@@ -329,7 +329,7 @@ type Props$5 = {
329
329
  onSetValue?: (value: DestinationProp | null) => void;
330
330
  ariaLabel?: string;
331
331
  };
332
- declare const QueryControl: ControlComponent$1<(props: Props$5) => React$1.JSX.Element>;
332
+ declare const QueryControl: ControlComponent$1<(props: Props$6) => React$1.JSX.Element>;
333
333
 
334
334
  type QueryFilterRepeaterControlProps = {
335
335
  allowedKeys: string[];
@@ -460,11 +460,12 @@ declare const TimeStringControl: ControlComponent$1<({ inputDisabled, ariaLabel,
460
460
 
461
461
  declare const TimeRangeControl: ControlComponent$1<() => React$1.JSX.Element>;
462
462
 
463
- declare const InlineEditingControl: ControlComponent$1<({ sx, attributes, props, }: {
463
+ type Props$5 = ControlProps<{
464
464
  sx?: SxProps<Theme>;
465
465
  attributes?: Record<string, string>;
466
- props?: ComponentProps<"div">;
467
- }) => React$1.JSX.Element>;
466
+ props?: ComponentProps<'div'>;
467
+ }>;
468
+ declare const InlineEditingControl: ControlComponent$1<({ sx, attributes, props, context: { elementId } }: Props$5) => React$1.JSX.Element>;
468
469
 
469
470
  declare const EmailFormActionControl: ControlComponent$1<({ toPlaceholder, label }: {
470
471
  toPlaceholder?: string;
@@ -702,6 +703,7 @@ type InlineEditorProps = {
702
703
  autofocus?: boolean;
703
704
  expectedTag?: string | null;
704
705
  onEditorCreate?: Dispatch<SetStateAction<Editor | null>>;
706
+ onEditorDestroy?: () => void;
705
707
  wrapperClassName?: string;
706
708
  onSelectionEnd?: (view: EditorView) => void;
707
709
  mountElement?: HTMLElement | null;
@@ -712,8 +714,9 @@ type InlineEditorToolbarProps = {
712
714
  editor: Editor;
713
715
  elementId?: ElementID;
714
716
  sx?: SxProps<Theme>;
717
+ inControlPanel?: boolean;
715
718
  };
716
- declare const InlineEditorToolbar: ({ editor, elementId, sx }: InlineEditorToolbarProps) => React$1.JSX.Element;
719
+ declare const InlineEditorToolbar: ({ editor, elementId, sx, inControlPanel, }: InlineEditorToolbarProps) => React$1.JSX.Element;
717
720
 
718
721
  type Props$2<TValue> = {
719
722
  value: TValue;
package/dist/index.d.ts CHANGED
@@ -29,11 +29,11 @@ declare const TextControl: ControlComponent$1<({ placeholder: propPlaceholder, e
29
29
  ariaLabel?: string;
30
30
  }) => React$1.JSX.Element>;
31
31
 
32
- type Props$d = {
32
+ type Props$e = {
33
33
  placeholder?: string;
34
34
  ariaLabel?: string;
35
35
  };
36
- declare const TextAreaControl: ControlComponent$1<({ placeholder: propPlaceholder, ariaLabel }: Props$d) => React$1.JSX.Element>;
36
+ declare const TextAreaControl: ControlComponent$1<({ placeholder: propPlaceholder, ariaLabel }: Props$e) => React$1.JSX.Element>;
37
37
 
38
38
  type Suggestion = {
39
39
  label: string;
@@ -41,14 +41,14 @@ type Suggestion = {
41
41
  };
42
42
 
43
43
  type TriggerPosition = 'start' | 'auto';
44
- type Props$c = {
44
+ type Props$d = {
45
45
  placeholder?: string;
46
46
  ariaLabel?: string;
47
47
  suggestions: Suggestion[];
48
48
  rows?: number;
49
49
  triggerPosition?: TriggerPosition;
50
50
  };
51
- declare const MentionTextAreaControl: ControlComponent$1<({ placeholder, ariaLabel, suggestions: allSuggestions, rows, triggerPosition }: Props$c) => React$1.JSX.Element>;
51
+ declare const MentionTextAreaControl: ControlComponent$1<({ placeholder, ariaLabel, suggestions: allSuggestions, rows, triggerPosition }: Props$d) => React$1.JSX.Element>;
52
52
 
53
53
  type SizeUnit$1 = SizePropValue['value']['unit'];
54
54
  type ExtendedOption = Extract<SizeUnit$1, 'auto' | 'custom'>;
@@ -137,12 +137,12 @@ type ChipsControlProps = {
137
137
  };
138
138
  declare const ChipsControl: ControlComponent$1<({ options, freeChips }: ChipsControlProps) => React$1.JSX.Element>;
139
139
 
140
- type Props$b = Partial<Omit<UnstableColorFieldProps, 'value' | 'onChange'>> & {
140
+ type Props$c = Partial<Omit<UnstableColorFieldProps, 'value' | 'onChange'>> & {
141
141
  propTypeUtil?: PropTypeUtil<string, string>;
142
142
  anchorEl?: HTMLElement | null;
143
143
  id?: string;
144
144
  };
145
- declare const ColorControl: ControlComponent$1<({ propTypeUtil, anchorEl, slotProps, id, ...props }: Props$b) => React$1.JSX.Element>;
145
+ declare const ColorControl: ControlComponent$1<({ propTypeUtil, anchorEl, slotProps, id, ...props }: Props$c) => React$1.JSX.Element>;
146
146
 
147
147
  type RenderContentProps = {
148
148
  size: ToggleButtonProps['size'];
@@ -162,7 +162,7 @@ declare const StyledToggleButton: _emotion_styled.StyledComponent<any, {}, {
162
162
  }>;
163
163
  type ExclusiveValue<TValue> = TValue;
164
164
  type NonExclusiveValue<TValue> = TValue[];
165
- type Props$a<TValue> = {
165
+ type Props$b<TValue> = {
166
166
  disabled?: boolean;
167
167
  justify?: StackProps['justifyContent'];
168
168
  size?: ToggleButtonProps['size'];
@@ -179,10 +179,10 @@ type Props$a<TValue> = {
179
179
  value: ExclusiveValue<TValue>;
180
180
  onChange: (value: ExclusiveValue<TValue>) => void;
181
181
  });
182
- declare const ToggleButtonGroupUi: <TValue>(props: Props$a<TValue> & {
182
+ declare const ToggleButtonGroupUi: <TValue>(props: Props$b<TValue> & {
183
183
  ref?: React$1.Ref<HTMLDivElement>;
184
184
  }) => React$1.ReactElement;
185
- declare const ControlToggleButtonGroup: <TValue>(props: Props$a<TValue>) => React$1.JSX.Element;
185
+ declare const ControlToggleButtonGroup: <TValue>(props: Props$b<TValue>) => React$1.JSX.Element;
186
186
 
187
187
  type ToggleControlProps<T extends PropValue> = {
188
188
  options: Array<ToggleButtonGroupItem<T> & {
@@ -214,22 +214,22 @@ type Item$1 = {
214
214
  bind: PropKey;
215
215
  };
216
216
  type EqualUnequalItems = [Item$1, Item$1, Item$1, Item$1];
217
- type Props$9<TMultiPropType extends string, TPropValue extends MultiSizePropValue> = {
217
+ type Props$a<TMultiPropType extends string, TPropValue extends MultiSizePropValue> = {
218
218
  label: string;
219
219
  icon: ReactNode;
220
220
  tooltipLabel: string;
221
221
  items: EqualUnequalItems;
222
222
  multiSizePropTypeUtil: PropTypeUtil<TMultiPropType, TPropValue>;
223
223
  };
224
- declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$9<TMultiPropType, TPropValue>): React$1.JSX.Element;
224
+ declare function EqualUnequalSizesControl<TMultiPropType extends string, TPropValue extends MultiSizePropValue>({ label, icon, tooltipLabel, items, multiSizePropTypeUtil, }: Props$a<TMultiPropType, TPropValue>): React$1.JSX.Element;
225
225
 
226
- type Props$8 = {
226
+ type Props$9 = {
227
227
  label: string;
228
228
  isSiteRtl?: boolean;
229
229
  extendedOptions?: ExtendedOption[];
230
230
  min?: number;
231
231
  };
232
- declare const LinkedDimensionsControl: ({ label, isSiteRtl, min }: Props$8) => React$1.JSX.Element;
232
+ declare const LinkedDimensionsControl: ({ label, isSiteRtl, min }: Props$9) => React$1.JSX.Element;
233
233
 
234
234
  type FontCategory = {
235
235
  label: string;
@@ -282,7 +282,7 @@ type ControlProps<TControlProps = unknown> = TControlProps & {
282
282
  };
283
283
  };
284
284
 
285
- type Props$7 = ControlProps<{
285
+ type Props$8 = ControlProps<{
286
286
  queryOptions: {
287
287
  params: Record<string, unknown>;
288
288
  url: string;
@@ -294,19 +294,19 @@ type Props$7 = ControlProps<{
294
294
  ariaLabel?: string;
295
295
  }>;
296
296
  type DestinationProp = LinkPropValue['value']['destination'];
297
- declare const LinkControl: ControlComponent$1<(props: Props$7) => React$1.JSX.Element>;
297
+ declare const LinkControl: ControlComponent$1<(props: Props$8) => React$1.JSX.Element>;
298
298
 
299
299
  type SelectOption = {
300
300
  label: string;
301
301
  value: StringPropValue['value'];
302
302
  disabled?: boolean;
303
303
  };
304
- type Props$6 = ControlProps<{
304
+ type Props$7 = ControlProps<{
305
305
  options: SelectOption[];
306
306
  onChange?: (newValue: string | null, previousValue: string | null | undefined) => void;
307
307
  fallbackLabels?: Record<string, string>;
308
308
  }>;
309
- declare const HtmlTagControl: ControlComponent$1<(props: Props$6) => React$1.JSX.Element>;
309
+ declare const HtmlTagControl: ControlComponent$1<(props: Props$7) => React$1.JSX.Element>;
310
310
 
311
311
  type QueryChipsControlProps = {
312
312
  queryOptions: {
@@ -318,7 +318,7 @@ type QueryChipsControlProps = {
318
318
  };
319
319
  declare const QueryChipsControl: ControlComponent$1<(props: QueryChipsControlProps) => React$1.JSX.Element>;
320
320
 
321
- type Props$5 = {
321
+ type Props$6 = {
322
322
  queryOptions: {
323
323
  params: Record<string, unknown>;
324
324
  url: string;
@@ -329,7 +329,7 @@ type Props$5 = {
329
329
  onSetValue?: (value: DestinationProp | null) => void;
330
330
  ariaLabel?: string;
331
331
  };
332
- declare const QueryControl: ControlComponent$1<(props: Props$5) => React$1.JSX.Element>;
332
+ declare const QueryControl: ControlComponent$1<(props: Props$6) => React$1.JSX.Element>;
333
333
 
334
334
  type QueryFilterRepeaterControlProps = {
335
335
  allowedKeys: string[];
@@ -460,11 +460,12 @@ declare const TimeStringControl: ControlComponent$1<({ inputDisabled, ariaLabel,
460
460
 
461
461
  declare const TimeRangeControl: ControlComponent$1<() => React$1.JSX.Element>;
462
462
 
463
- declare const InlineEditingControl: ControlComponent$1<({ sx, attributes, props, }: {
463
+ type Props$5 = ControlProps<{
464
464
  sx?: SxProps<Theme>;
465
465
  attributes?: Record<string, string>;
466
- props?: ComponentProps<"div">;
467
- }) => React$1.JSX.Element>;
466
+ props?: ComponentProps<'div'>;
467
+ }>;
468
+ declare const InlineEditingControl: ControlComponent$1<({ sx, attributes, props, context: { elementId } }: Props$5) => React$1.JSX.Element>;
468
469
 
469
470
  declare const EmailFormActionControl: ControlComponent$1<({ toPlaceholder, label }: {
470
471
  toPlaceholder?: string;
@@ -702,6 +703,7 @@ type InlineEditorProps = {
702
703
  autofocus?: boolean;
703
704
  expectedTag?: string | null;
704
705
  onEditorCreate?: Dispatch<SetStateAction<Editor | null>>;
706
+ onEditorDestroy?: () => void;
705
707
  wrapperClassName?: string;
706
708
  onSelectionEnd?: (view: EditorView) => void;
707
709
  mountElement?: HTMLElement | null;
@@ -712,8 +714,9 @@ type InlineEditorToolbarProps = {
712
714
  editor: Editor;
713
715
  elementId?: ElementID;
714
716
  sx?: SxProps<Theme>;
717
+ inControlPanel?: boolean;
715
718
  };
716
- declare const InlineEditorToolbar: ({ editor, elementId, sx }: InlineEditorToolbarProps) => React$1.JSX.Element;
719
+ declare const InlineEditorToolbar: ({ editor, elementId, sx, inControlPanel, }: InlineEditorToolbarProps) => React$1.JSX.Element;
717
720
 
718
721
  type Props$2<TValue> = {
719
722
  value: TValue;