@elementor/editor-editing-panel 3.35.0-340 → 3.35.0-342

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
@@ -404,8 +404,8 @@ declare const controlTypes: {
404
404
  ariaLabel?: string;
405
405
  isRepeaterControl?: boolean;
406
406
  } & {
407
- units?: ("em" | "px" | "%" | "rem" | "vw" | "vh")[] | undefined;
408
- defaultUnit?: "em" | "px" | "%" | "rem" | "vw" | "vh" | undefined;
407
+ units?: ("em" | "px" | "%" | "rem" | "vw" | "vh" | "ch")[] | undefined;
408
+ defaultUnit?: "em" | "px" | "%" | "rem" | "vw" | "vh" | "ch" | undefined;
409
409
  } & {
410
410
  variant: "length";
411
411
  }) | ({
@@ -447,7 +447,7 @@ declare const controlTypes: {
447
447
  readonly propTypeUtil: {
448
448
  extract: (prop: unknown) => {
449
449
  size: number;
450
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
450
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
451
451
  } | {
452
452
  size: number;
453
453
  unit: "deg" | "rad" | "grad" | "turn";
@@ -463,7 +463,7 @@ declare const controlTypes: {
463
463
  } | null;
464
464
  isValid: (prop: unknown) => prop is _elementor_editor_props.TransformablePropValue<"size", {
465
465
  size: number;
466
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
466
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
467
467
  } | {
468
468
  size: number;
469
469
  unit: "deg" | "rad" | "grad" | "turn";
@@ -480,7 +480,7 @@ declare const controlTypes: {
480
480
  create: {
481
481
  (value: {
482
482
  size: number;
483
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
483
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
484
484
  } | {
485
485
  size: number;
486
486
  unit: "deg" | "rad" | "grad" | "turn";
@@ -495,7 +495,7 @@ declare const controlTypes: {
495
495
  unit: "custom";
496
496
  }): _elementor_editor_props.TransformablePropValue<"size", {
497
497
  size: number;
498
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
498
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
499
499
  } | {
500
500
  size: number;
501
501
  unit: "deg" | "rad" | "grad" | "turn";
@@ -511,7 +511,7 @@ declare const controlTypes: {
511
511
  }>;
512
512
  (value: {
513
513
  size: number;
514
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
514
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
515
515
  } | {
516
516
  size: number;
517
517
  unit: "deg" | "rad" | "grad" | "turn";
@@ -526,7 +526,7 @@ declare const controlTypes: {
526
526
  unit: "custom";
527
527
  }, createOptions?: _elementor_editor_props.CreateOptions): _elementor_editor_props.TransformablePropValue<"size", {
528
528
  size: number;
529
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
529
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
530
530
  } | {
531
531
  size: number;
532
532
  unit: "deg" | "rad" | "grad" | "turn";
@@ -542,7 +542,7 @@ declare const controlTypes: {
542
542
  }>;
543
543
  (value: (prev?: {
544
544
  size: number;
545
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
545
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
546
546
  } | {
547
547
  size: number;
548
548
  unit: "deg" | "rad" | "grad" | "turn";
@@ -557,7 +557,7 @@ declare const controlTypes: {
557
557
  unit: "custom";
558
558
  } | undefined) => {
559
559
  size: number;
560
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
560
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
561
561
  } | {
562
562
  size: number;
563
563
  unit: "deg" | "rad" | "grad" | "turn";
@@ -572,7 +572,7 @@ declare const controlTypes: {
572
572
  unit: "custom";
573
573
  }, createOptions: _elementor_editor_props.CreateOptions): _elementor_editor_props.TransformablePropValue<"size", {
574
574
  size: number;
575
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
575
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
576
576
  } | {
577
577
  size: number;
578
578
  unit: "deg" | "rad" | "grad" | "turn";
@@ -591,7 +591,7 @@ declare const controlTypes: {
591
591
  $$type: zod.ZodLiteral<"size">;
592
592
  value: zod.ZodType<{
593
593
  size: number;
594
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
594
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
595
595
  } | {
596
596
  size: number;
597
597
  unit: "deg" | "rad" | "grad" | "turn";
@@ -606,7 +606,7 @@ declare const controlTypes: {
606
606
  unit: "custom";
607
607
  }, zod.ZodTypeDef, {
608
608
  size: number;
609
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
609
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
610
610
  } | {
611
611
  size: number;
612
612
  unit: "deg" | "rad" | "grad" | "turn";
@@ -625,7 +625,7 @@ declare const controlTypes: {
625
625
  $$type: "size";
626
626
  value: {
627
627
  size: number;
628
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
628
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
629
629
  } | {
630
630
  size: number;
631
631
  unit: "deg" | "rad" | "grad" | "turn";
@@ -644,7 +644,7 @@ declare const controlTypes: {
644
644
  $$type: "size";
645
645
  value: {
646
646
  size: number;
647
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
647
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
648
648
  } | {
649
649
  size: number;
650
650
  unit: "deg" | "rad" | "grad" | "turn";
@@ -1275,6 +1275,8 @@ declare const useCustomCss: () => {
1275
1275
  }) => void;
1276
1276
  };
1277
1277
 
1278
+ declare const useStateByElement: <T>(key: string, initialValue: T) => readonly [T, (newValue: T) => void];
1279
+
1278
1280
  declare const HISTORY_DEBOUNCE_WAIT = 800;
1279
1281
  type TitleOptions = {
1280
1282
  provider: StylesProvider | null;
@@ -1329,8 +1331,18 @@ declare const registerFieldIndicator: ({ fieldType, id, indicator, priority, }:
1329
1331
  fieldType: FieldType;
1330
1332
  }) => void;
1331
1333
 
1334
+ type EditingPanelReplacement = {
1335
+ condition: (element: Element, elementType: ElementType) => boolean;
1336
+ component: ComponentType;
1337
+ priority: number;
1338
+ };
1339
+ declare const registerEditingPanelReplacement: ({ id, priority, ...props }: Omit<EditingPanelReplacement, "priority"> & {
1340
+ id: string;
1341
+ priority?: number;
1342
+ }) => void;
1343
+
1332
1344
  declare function doGetAppliedClasses(elementId: string, classesPropType?: string): string[];
1333
1345
  declare function doApplyClasses(elementId: string, classIds: StyleDefinitionID[], classesPropType?: string): void;
1334
1346
  declare function doUnapplyClass(elementId: string, classId: StyleDefinitionID, classesPropType?: string): boolean;
1335
1347
 
1336
- export { CustomCssIndicator, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, type PopoverActionProps, PopoverBody, SectionContent, SettingsControl, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type ValidationEvent, type ValidationResult, controlActionsMenu, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, getSubtitle, getTitle, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoPanelHeaderTop, injectIntoStyleTab, registerControlReplacement, registerFieldIndicator, registerStyleProviderToColors, stylesInheritanceTransformersRegistry, useClassesProp, useCustomCss, useElement, useFontFamilies, usePanelActions, usePanelStatus, useSectionWidth, useStyle, useStylesRerender };
1348
+ export { type ControlType, CustomCssIndicator, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, type PopoverActionProps, PopoverBody, SectionContent, SettingsControl, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type ValidationEvent, type ValidationResult, controlActionsMenu, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, 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
@@ -404,8 +404,8 @@ declare const controlTypes: {
404
404
  ariaLabel?: string;
405
405
  isRepeaterControl?: boolean;
406
406
  } & {
407
- units?: ("em" | "px" | "%" | "rem" | "vw" | "vh")[] | undefined;
408
- defaultUnit?: "em" | "px" | "%" | "rem" | "vw" | "vh" | undefined;
407
+ units?: ("em" | "px" | "%" | "rem" | "vw" | "vh" | "ch")[] | undefined;
408
+ defaultUnit?: "em" | "px" | "%" | "rem" | "vw" | "vh" | "ch" | undefined;
409
409
  } & {
410
410
  variant: "length";
411
411
  }) | ({
@@ -447,7 +447,7 @@ declare const controlTypes: {
447
447
  readonly propTypeUtil: {
448
448
  extract: (prop: unknown) => {
449
449
  size: number;
450
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
450
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
451
451
  } | {
452
452
  size: number;
453
453
  unit: "deg" | "rad" | "grad" | "turn";
@@ -463,7 +463,7 @@ declare const controlTypes: {
463
463
  } | null;
464
464
  isValid: (prop: unknown) => prop is _elementor_editor_props.TransformablePropValue<"size", {
465
465
  size: number;
466
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
466
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
467
467
  } | {
468
468
  size: number;
469
469
  unit: "deg" | "rad" | "grad" | "turn";
@@ -480,7 +480,7 @@ declare const controlTypes: {
480
480
  create: {
481
481
  (value: {
482
482
  size: number;
483
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
483
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
484
484
  } | {
485
485
  size: number;
486
486
  unit: "deg" | "rad" | "grad" | "turn";
@@ -495,7 +495,7 @@ declare const controlTypes: {
495
495
  unit: "custom";
496
496
  }): _elementor_editor_props.TransformablePropValue<"size", {
497
497
  size: number;
498
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
498
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
499
499
  } | {
500
500
  size: number;
501
501
  unit: "deg" | "rad" | "grad" | "turn";
@@ -511,7 +511,7 @@ declare const controlTypes: {
511
511
  }>;
512
512
  (value: {
513
513
  size: number;
514
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
514
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
515
515
  } | {
516
516
  size: number;
517
517
  unit: "deg" | "rad" | "grad" | "turn";
@@ -526,7 +526,7 @@ declare const controlTypes: {
526
526
  unit: "custom";
527
527
  }, createOptions?: _elementor_editor_props.CreateOptions): _elementor_editor_props.TransformablePropValue<"size", {
528
528
  size: number;
529
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
529
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
530
530
  } | {
531
531
  size: number;
532
532
  unit: "deg" | "rad" | "grad" | "turn";
@@ -542,7 +542,7 @@ declare const controlTypes: {
542
542
  }>;
543
543
  (value: (prev?: {
544
544
  size: number;
545
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
545
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
546
546
  } | {
547
547
  size: number;
548
548
  unit: "deg" | "rad" | "grad" | "turn";
@@ -557,7 +557,7 @@ declare const controlTypes: {
557
557
  unit: "custom";
558
558
  } | undefined) => {
559
559
  size: number;
560
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
560
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
561
561
  } | {
562
562
  size: number;
563
563
  unit: "deg" | "rad" | "grad" | "turn";
@@ -572,7 +572,7 @@ declare const controlTypes: {
572
572
  unit: "custom";
573
573
  }, createOptions: _elementor_editor_props.CreateOptions): _elementor_editor_props.TransformablePropValue<"size", {
574
574
  size: number;
575
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
575
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
576
576
  } | {
577
577
  size: number;
578
578
  unit: "deg" | "rad" | "grad" | "turn";
@@ -591,7 +591,7 @@ declare const controlTypes: {
591
591
  $$type: zod.ZodLiteral<"size">;
592
592
  value: zod.ZodType<{
593
593
  size: number;
594
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
594
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
595
595
  } | {
596
596
  size: number;
597
597
  unit: "deg" | "rad" | "grad" | "turn";
@@ -606,7 +606,7 @@ declare const controlTypes: {
606
606
  unit: "custom";
607
607
  }, zod.ZodTypeDef, {
608
608
  size: number;
609
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
609
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
610
610
  } | {
611
611
  size: number;
612
612
  unit: "deg" | "rad" | "grad" | "turn";
@@ -625,7 +625,7 @@ declare const controlTypes: {
625
625
  $$type: "size";
626
626
  value: {
627
627
  size: number;
628
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
628
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
629
629
  } | {
630
630
  size: number;
631
631
  unit: "deg" | "rad" | "grad" | "turn";
@@ -644,7 +644,7 @@ declare const controlTypes: {
644
644
  $$type: "size";
645
645
  value: {
646
646
  size: number;
647
- unit: "px" | "em" | "rem" | "%" | "vw" | "vh";
647
+ unit: "px" | "em" | "rem" | "%" | "vw" | "vh" | "ch";
648
648
  } | {
649
649
  size: number;
650
650
  unit: "deg" | "rad" | "grad" | "turn";
@@ -1275,6 +1275,8 @@ declare const useCustomCss: () => {
1275
1275
  }) => void;
1276
1276
  };
1277
1277
 
1278
+ declare const useStateByElement: <T>(key: string, initialValue: T) => readonly [T, (newValue: T) => void];
1279
+
1278
1280
  declare const HISTORY_DEBOUNCE_WAIT = 800;
1279
1281
  type TitleOptions = {
1280
1282
  provider: StylesProvider | null;
@@ -1329,8 +1331,18 @@ declare const registerFieldIndicator: ({ fieldType, id, indicator, priority, }:
1329
1331
  fieldType: FieldType;
1330
1332
  }) => void;
1331
1333
 
1334
+ type EditingPanelReplacement = {
1335
+ condition: (element: Element, elementType: ElementType) => boolean;
1336
+ component: ComponentType;
1337
+ priority: number;
1338
+ };
1339
+ declare const registerEditingPanelReplacement: ({ id, priority, ...props }: Omit<EditingPanelReplacement, "priority"> & {
1340
+ id: string;
1341
+ priority?: number;
1342
+ }) => void;
1343
+
1332
1344
  declare function doGetAppliedClasses(elementId: string, classesPropType?: string): string[];
1333
1345
  declare function doApplyClasses(elementId: string, classIds: StyleDefinitionID[], classesPropType?: string): void;
1334
1346
  declare function doUnapplyClass(elementId: string, classId: StyleDefinitionID, classesPropType?: string): boolean;
1335
1347
 
1336
- export { CustomCssIndicator, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, type PopoverActionProps, PopoverBody, SectionContent, SettingsControl, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type ValidationEvent, type ValidationResult, controlActionsMenu, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, getSubtitle, getTitle, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoPanelHeaderTop, injectIntoStyleTab, registerControlReplacement, registerFieldIndicator, registerStyleProviderToColors, stylesInheritanceTransformersRegistry, useClassesProp, useCustomCss, useElement, useFontFamilies, usePanelActions, usePanelStatus, useSectionWidth, useStyle, useStylesRerender };
1348
+ export { type ControlType, CustomCssIndicator, ElementProvider, FIELD_TYPE, HISTORY_DEBOUNCE_WAIT, type PopoverActionProps, PopoverBody, SectionContent, SettingsControl, StyleIndicator, StyleTabSection, StylesProviderCannotUpdatePropsError, type ValidationEvent, type ValidationResult, controlActionsMenu, controlsRegistry, createTopLevelObjectType, doApplyClasses, doGetAppliedClasses, doUnapplyClass, getSubtitle, getTitle, init, injectIntoClassSelectorActions, injectIntoCssClassConvert, injectIntoPanelHeaderTop, injectIntoStyleTab, registerControlReplacement, registerEditingPanelReplacement, registerFieldIndicator, registerStyleProviderToColors, stylesInheritanceTransformersRegistry, useClassesProp, useCustomCss, useElement, useFontFamilies, usePanelActions, usePanelStatus, useSectionWidth, useStateByElement, useStyle, useStylesRerender };