@elementor/editor-editing-panel 0.18.0 → 0.19.0

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.
Files changed (60) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/index.d.mts +3 -2
  3. package/dist/index.d.ts +3 -2
  4. package/dist/index.js +381 -330
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +291 -240
  7. package/dist/index.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/src/components/editing-panel-error-fallback.tsx +12 -0
  10. package/src/components/editing-panel.tsx +23 -12
  11. package/src/components/settings-tab.tsx +3 -3
  12. package/src/components/style-sections/background-section/background-color-control.tsx +20 -0
  13. package/src/components/style-sections/background-section/background-section.tsx +15 -0
  14. package/src/components/style-sections/effects-section/box-shadow-repeater.tsx +1 -1
  15. package/src/components/style-sections/spacing-section/linked-dimensions-control.tsx +1 -1
  16. package/src/components/style-sections/typography-section/text-alignment-control.tsx +1 -1
  17. package/src/components/style-sections/typography-section/text-direction-control.tsx +1 -1
  18. package/src/components/style-sections/typography-section/text-style-control.tsx +1 -1
  19. package/src/components/style-sections/typography-section/transform-control.tsx +1 -1
  20. package/src/components/style-tab.tsx +5 -3
  21. package/src/control-replacement.tsx +3 -0
  22. package/src/controls/components/text-field-inner-selection.tsx +2 -2
  23. package/src/controls/control-context.tsx +1 -1
  24. package/src/controls/control-replacement.ts +1 -1
  25. package/src/controls/control-types/color-control.tsx +1 -1
  26. package/src/controls/control-types/image-control.tsx +1 -1
  27. package/src/controls/control-types/image-media-control.tsx +2 -2
  28. package/src/controls/control-types/select-control.tsx +1 -1
  29. package/src/controls/control-types/size-control.tsx +1 -1
  30. package/src/controls/control-types/toggle-control.tsx +1 -1
  31. package/src/controls/create-control-replacement.tsx +53 -0
  32. package/src/controls/create-control.tsx +12 -3
  33. package/src/controls/hooks/use-style-control.ts +3 -3
  34. package/src/{hooks → controls/hooks}/use-widget-settings.ts +1 -1
  35. package/src/{props → controls/props}/is-transformable.ts +1 -2
  36. package/src/{types.ts → controls/props/types.ts} +0 -38
  37. package/src/{contexts/element-context.tsx → controls/providers/element-provider.tsx} +4 -4
  38. package/src/controls/settings-control.tsx +5 -5
  39. package/src/controls/style-control.tsx +1 -1
  40. package/src/{sync → controls/sync}/get-container.ts +1 -1
  41. package/src/{sync → controls/sync}/update-settings.ts +1 -1
  42. package/src/controls/types.ts +39 -0
  43. package/src/dynamics/components/dynamic-selection-control.tsx +1 -1
  44. package/src/dynamics/components/dynamic-selection.tsx +5 -5
  45. package/src/dynamics/dynamic-control.tsx +1 -1
  46. package/src/dynamics/hooks/use-dynamic-tag.ts +2 -2
  47. package/src/dynamics/hooks/use-prop-dynamic-action.tsx +2 -2
  48. package/src/dynamics/hooks/use-prop-dynamic-tags.ts +3 -3
  49. package/src/dynamics/hooks/use-prop-value-history.ts +3 -3
  50. package/src/dynamics/init.ts +1 -1
  51. package/src/dynamics/types.ts +2 -1
  52. package/src/dynamics/utils.ts +2 -2
  53. package/src/hooks/use-element-style-prop.ts +3 -2
  54. package/src/hooks/use-element-styles.ts +1 -1
  55. package/src/hooks/use-element-type.ts +1 -1
  56. package/src/index.ts +1 -1
  57. package/src/sync/get-element-styles.ts +2 -2
  58. package/src/sync/get-selected-elements.ts +1 -1
  59. package/src/sync/types.ts +2 -1
  60. package/src/sync/update-style.ts +3 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.19.0
4
+
5
+ ### Minor Changes
6
+
7
+ - e5a2a79: Add error handling
8
+ - 08bc1c0: Moved the element provider and types into controls
9
+ - d68e4df: Add background section with background-color control
10
+
11
+ ### Patch Changes
12
+
13
+ - a4b1789: Add `CreateControlReplacement` util
14
+ - b9d3b21: Fix typography section controls alignment
15
+
3
16
  ## 0.18.0
4
17
 
5
18
  ### Minor Changes
package/dist/index.d.mts CHANGED
@@ -25,11 +25,12 @@ type PropKey = string;
25
25
  type ReplaceWhenParams = {
26
26
  value: PropValue;
27
27
  };
28
- type ControlReplacement = {
28
+ type CreateControlReplacement = {
29
29
  component: ComponentType;
30
30
  condition: ({ value }: ReplaceWhenParams) => boolean;
31
31
  };
32
- declare function replaceControl({ component, condition }: ControlReplacement): void;
32
+
33
+ declare const replaceControl: ({ component, condition }: CreateControlReplacement) => void;
33
34
 
34
35
  type ControlContext<T extends PropValue> = {
35
36
  bind: PropKey;
package/dist/index.d.ts CHANGED
@@ -25,11 +25,12 @@ type PropKey = string;
25
25
  type ReplaceWhenParams = {
26
26
  value: PropValue;
27
27
  };
28
- type ControlReplacement = {
28
+ type CreateControlReplacement = {
29
29
  component: ComponentType;
30
30
  condition: ({ value }: ReplaceWhenParams) => boolean;
31
31
  };
32
- declare function replaceControl({ component, condition }: ControlReplacement): void;
32
+
33
+ declare const replaceControl: ({ component, condition }: CreateControlReplacement) => void;
33
34
 
34
35
  type ControlContext<T extends PropValue> = {
35
36
  bind: PropKey;