@elementor/editor-editing-panel 3.35.0-431 → 3.35.0-433

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
@@ -4,9 +4,9 @@ export { useBoundProp } from '@elementor/editor-controls';
4
4
  import * as _elementor_locations from '@elementor/locations';
5
5
  import { StyleDefinition, StyleDefinitionVariant, StyleDefinitionState, StyleDefinitionID } from '@elementor/editor-styles';
6
6
  import * as react from 'react';
7
- import { FC, PropsWithChildren, Dispatch, ElementType as ElementType$1, ComponentType } from 'react';
7
+ import { FC, PropsWithChildren, Dispatch, ElementType as ElementType$1, ComponentType, ComponentProps } from 'react';
8
8
  import { PopoverBody as PopoverBody$1 } from '@elementor/editor-ui';
9
- import { Control, ElementControl, Element, ElementType, ControlLayout } from '@elementor/editor-elements';
9
+ import { Control as Control$1, ElementControl, Element, ElementType, ControlLayout } from '@elementor/editor-elements';
10
10
  import * as _elementor_editor_props from '@elementor/editor-props';
11
11
  import { PropKey, PropTypeUtil, PropsSchema, ObjectPropType } from '@elementor/editor-props';
12
12
  import * as _emotion_styled from '@emotion/styled';
@@ -53,7 +53,7 @@ type SectionContentProps = PropsWithChildren<{
53
53
  declare const SectionContent: FC<SectionContentProps>;
54
54
 
55
55
  declare const SettingsControl: ({ control: { value, type } }: {
56
- control: Control | ElementControl;
56
+ control: Control$1 | ElementControl;
57
57
  }) => react.JSX.Element | null;
58
58
 
59
59
  type SettingsFieldProps = {
@@ -117,6 +117,7 @@ type ContextValueWithoutProvider = {
117
117
  declare function useStyle(): ContextValue;
118
118
 
119
119
  declare const registerControlReplacement: (replacement: {
120
+ id?: string;
120
121
  component: react.ComponentClass<object & {
121
122
  OriginalControl: react.ComponentType;
122
123
  }, any> | react.FunctionComponent<object & {
@@ -128,6 +129,7 @@ declare const registerControlReplacement: (replacement: {
128
129
  }) => boolean;
129
130
  }) => void;
130
131
  declare const getControlReplacements: () => {
132
+ id?: string;
131
133
  component: react.ComponentClass<object & {
132
134
  OriginalControl: react.ComponentType;
133
135
  }, any> | react.FunctionComponent<object & {
@@ -1250,6 +1252,9 @@ declare const controlTypes: {
1250
1252
  };
1251
1253
  };
1252
1254
  type ControlType = keyof typeof controlTypes;
1255
+ type ControlTypes = {
1256
+ [key in ControlType]: (typeof controlTypes)[key]['component'];
1257
+ };
1253
1258
  declare class ControlsRegistry {
1254
1259
  private readonly controlsRegistry;
1255
1260
  constructor(controlsRegistry: ControlRegistry);
@@ -1262,6 +1267,19 @@ declare class ControlsRegistry {
1262
1267
  }
1263
1268
  declare const controlsRegistry: ControlsRegistry;
1264
1269
 
1270
+ type IsRequired<T, K extends keyof T> = object extends Pick<T, K> ? false : true;
1271
+ type AnyPropertyRequired<T> = {
1272
+ [K in keyof T]: IsRequired<T, K>;
1273
+ }[keyof T] extends true ? true : false;
1274
+ type ControlProps<T extends ControlType> = AnyPropertyRequired<ComponentProps<ControlTypes[T]>> extends true ? {
1275
+ props: ComponentProps<ControlTypes[T]>;
1276
+ type: T;
1277
+ } : {
1278
+ props?: ComponentProps<ControlTypes[T]>;
1279
+ type: T;
1280
+ };
1281
+ declare const Control: <T extends ControlType>({ props, type }: ControlProps<T>) => react.JSX.Element;
1282
+
1265
1283
  declare const StylesProviderCannotUpdatePropsError: {
1266
1284
  new ({ cause, context }?: {
1267
1285
  cause?: _elementor_utils.ElementorErrorOptions["cause"];
@@ -1368,4 +1386,4 @@ declare function doGetAppliedClasses(elementId: string, classesPropType?: string
1368
1386
  declare function doApplyClasses(elementId: string, classIds: StyleDefinitionID[], classesPropType?: string): void;
1369
1387
  declare function doUnapplyClass(elementId: string, classId: StyleDefinitionID, classesPropType?: string): boolean;
1370
1388
 
1371
- export { type ControlType, CustomCssIndicator, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, type PopoverActionProps, PopoverBody, SectionContent, SettingsControl, SettingsField, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type ValidationEvent, type ValidationResult, controlActionsMenu, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, getControlReplacements, getFieldIndicators, getSubtitle, getTitle, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoPanelHeaderTop, injectIntoStyleTab, registerControlReplacement, registerEditingPanelReplacement, registerFieldIndicator, registerStyleProviderToColors, stylesInheritanceTransformersRegistry, useClassesProp, useCustomCss, useElement, useFontFamilies, usePanelActions, usePanelStatus, useSectionWidth, useStateByElement, useStyle, useStylesRerender };
1389
+ export { Control as BaseControl, type ControlType, CustomCssIndicator, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, type PopoverActionProps, PopoverBody, SectionContent, SettingsControl, SettingsField, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type ValidationEvent, type ValidationResult, controlActionsMenu, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, getControlReplacements, getFieldIndicators, getSubtitle, getTitle, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoPanelHeaderTop, injectIntoStyleTab, registerControlReplacement, registerEditingPanelReplacement, registerFieldIndicator, registerStyleProviderToColors, stylesInheritanceTransformersRegistry, useClassesProp, useCustomCss, useElement, useFontFamilies, usePanelActions, usePanelStatus, useSectionWidth, useStateByElement, useStyle, useStylesRerender };
package/dist/index.d.ts CHANGED
@@ -4,9 +4,9 @@ export { useBoundProp } from '@elementor/editor-controls';
4
4
  import * as _elementor_locations from '@elementor/locations';
5
5
  import { StyleDefinition, StyleDefinitionVariant, StyleDefinitionState, StyleDefinitionID } from '@elementor/editor-styles';
6
6
  import * as react from 'react';
7
- import { FC, PropsWithChildren, Dispatch, ElementType as ElementType$1, ComponentType } from 'react';
7
+ import { FC, PropsWithChildren, Dispatch, ElementType as ElementType$1, ComponentType, ComponentProps } from 'react';
8
8
  import { PopoverBody as PopoverBody$1 } from '@elementor/editor-ui';
9
- import { Control, ElementControl, Element, ElementType, ControlLayout } from '@elementor/editor-elements';
9
+ import { Control as Control$1, ElementControl, Element, ElementType, ControlLayout } from '@elementor/editor-elements';
10
10
  import * as _elementor_editor_props from '@elementor/editor-props';
11
11
  import { PropKey, PropTypeUtil, PropsSchema, ObjectPropType } from '@elementor/editor-props';
12
12
  import * as _emotion_styled from '@emotion/styled';
@@ -53,7 +53,7 @@ type SectionContentProps = PropsWithChildren<{
53
53
  declare const SectionContent: FC<SectionContentProps>;
54
54
 
55
55
  declare const SettingsControl: ({ control: { value, type } }: {
56
- control: Control | ElementControl;
56
+ control: Control$1 | ElementControl;
57
57
  }) => react.JSX.Element | null;
58
58
 
59
59
  type SettingsFieldProps = {
@@ -117,6 +117,7 @@ type ContextValueWithoutProvider = {
117
117
  declare function useStyle(): ContextValue;
118
118
 
119
119
  declare const registerControlReplacement: (replacement: {
120
+ id?: string;
120
121
  component: react.ComponentClass<object & {
121
122
  OriginalControl: react.ComponentType;
122
123
  }, any> | react.FunctionComponent<object & {
@@ -128,6 +129,7 @@ declare const registerControlReplacement: (replacement: {
128
129
  }) => boolean;
129
130
  }) => void;
130
131
  declare const getControlReplacements: () => {
132
+ id?: string;
131
133
  component: react.ComponentClass<object & {
132
134
  OriginalControl: react.ComponentType;
133
135
  }, any> | react.FunctionComponent<object & {
@@ -1250,6 +1252,9 @@ declare const controlTypes: {
1250
1252
  };
1251
1253
  };
1252
1254
  type ControlType = keyof typeof controlTypes;
1255
+ type ControlTypes = {
1256
+ [key in ControlType]: (typeof controlTypes)[key]['component'];
1257
+ };
1253
1258
  declare class ControlsRegistry {
1254
1259
  private readonly controlsRegistry;
1255
1260
  constructor(controlsRegistry: ControlRegistry);
@@ -1262,6 +1267,19 @@ declare class ControlsRegistry {
1262
1267
  }
1263
1268
  declare const controlsRegistry: ControlsRegistry;
1264
1269
 
1270
+ type IsRequired<T, K extends keyof T> = object extends Pick<T, K> ? false : true;
1271
+ type AnyPropertyRequired<T> = {
1272
+ [K in keyof T]: IsRequired<T, K>;
1273
+ }[keyof T] extends true ? true : false;
1274
+ type ControlProps<T extends ControlType> = AnyPropertyRequired<ComponentProps<ControlTypes[T]>> extends true ? {
1275
+ props: ComponentProps<ControlTypes[T]>;
1276
+ type: T;
1277
+ } : {
1278
+ props?: ComponentProps<ControlTypes[T]>;
1279
+ type: T;
1280
+ };
1281
+ declare const Control: <T extends ControlType>({ props, type }: ControlProps<T>) => react.JSX.Element;
1282
+
1265
1283
  declare const StylesProviderCannotUpdatePropsError: {
1266
1284
  new ({ cause, context }?: {
1267
1285
  cause?: _elementor_utils.ElementorErrorOptions["cause"];
@@ -1368,4 +1386,4 @@ declare function doGetAppliedClasses(elementId: string, classesPropType?: string
1368
1386
  declare function doApplyClasses(elementId: string, classIds: StyleDefinitionID[], classesPropType?: string): void;
1369
1387
  declare function doUnapplyClass(elementId: string, classId: StyleDefinitionID, classesPropType?: string): boolean;
1370
1388
 
1371
- export { type ControlType, CustomCssIndicator, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, type PopoverActionProps, PopoverBody, SectionContent, SettingsControl, SettingsField, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type ValidationEvent, type ValidationResult, controlActionsMenu, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, getControlReplacements, getFieldIndicators, getSubtitle, getTitle, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoPanelHeaderTop, injectIntoStyleTab, registerControlReplacement, registerEditingPanelReplacement, registerFieldIndicator, registerStyleProviderToColors, stylesInheritanceTransformersRegistry, useClassesProp, useCustomCss, useElement, useFontFamilies, usePanelActions, usePanelStatus, useSectionWidth, useStateByElement, useStyle, useStylesRerender };
1389
+ export { Control as BaseControl, type ControlType, CustomCssIndicator, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, type PopoverActionProps, PopoverBody, SectionContent, SettingsControl, SettingsField, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type ValidationEvent, type ValidationResult, controlActionsMenu, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, getControlReplacements, getFieldIndicators, getSubtitle, getTitle, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoPanelHeaderTop, injectIntoStyleTab, registerControlReplacement, registerEditingPanelReplacement, registerFieldIndicator, registerStyleProviderToColors, stylesInheritanceTransformersRegistry, useClassesProp, useCustomCss, useElement, useFontFamilies, usePanelActions, usePanelStatus, useSectionWidth, useStateByElement, useStyle, useStylesRerender };
package/dist/index.js CHANGED
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
+ BaseControl: () => Control,
33
34
  CustomCssIndicator: () => CustomCssIndicator,
34
35
  ElementProvider: () => ElementProvider,
35
36
  FIELD_TYPE: () => FIELD_TYPE,
@@ -6673,6 +6674,7 @@ var blockV1Panel = () => {
6673
6674
  };
6674
6675
  // Annotate the CommonJS export names for ESM import in node:
6675
6676
  0 && (module.exports = {
6677
+ BaseControl,
6676
6678
  CustomCssIndicator,
6677
6679
  ElementProvider,
6678
6680
  FIELD_TYPE,