@elementor/editor-app-bar 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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.19.0
4
+
5
+ ### Minor Changes
6
+
7
+ - cf81790: Update `@elementor/icons` version
8
+ - 0e70721: Update `@elementor/ui` and `@elementor/icons` versions
9
+
10
+ ### Patch Changes
11
+
12
+ - 0f30451: Adding spacing icons to `editor-editing-panel`
13
+ - 66df921: Extract menus logic into a dedicated package
14
+ - Updated dependencies [0e70721]
15
+ - Updated dependencies [66df921]
16
+ - @elementor/editor@0.14.0
17
+ - @elementor/menus@0.1.0
18
+ - @elementor/editor-documents@0.11.9
19
+
3
20
  ## 0.18.0
4
21
 
5
22
  ### Minor Changes
package/dist/index.d.mts CHANGED
@@ -1,26 +1,16 @@
1
- import * as React from 'react';
2
- import { ElementType, ComponentPropsWithoutRef } from 'react';
1
+ import * as _elementor_menus from '@elementor/menus';
3
2
  import * as _elementor_locations from '@elementor/locations';
4
-
5
- type Props$3 = {
6
- title: string;
7
- icon: ElementType;
8
- disabled?: boolean;
9
- visible?: boolean;
10
- onClick?: () => void;
11
- };
12
- declare function Action({ icon: Icon, title, visible, ...props }: Props$3): React.JSX.Element | null;
3
+ import * as React from 'react';
4
+ import { ElementType } from 'react';
13
5
 
14
6
  type Props$2 = {
15
7
  title: string;
16
8
  icon: ElementType;
17
- selected?: boolean;
18
9
  disabled?: boolean;
19
10
  visible?: boolean;
20
11
  onClick?: () => void;
21
- value?: string;
22
12
  };
23
- declare function ToggleAction({ icon: Icon, title, value, visible, ...props }: Props$2): React.JSX.Element | null;
13
+ declare function Action({ icon: Icon, title, visible, ...props }: Props$2): React.JSX.Element | null;
24
14
 
25
15
  type Props$1 = {
26
16
  title: string;
@@ -34,48 +24,42 @@ declare function Link({ icon: Icon, title, visible, ...props }: Props$1): React.
34
24
  type Props = {
35
25
  title: string;
36
26
  icon: ElementType;
27
+ selected?: boolean;
37
28
  disabled?: boolean;
38
29
  visible?: boolean;
39
- items: ItemsArray;
40
- };
41
- declare function ActionsGroup({ icon: Icon, title, visible, items, ...props }: Props): React.JSX.Element | null;
42
-
43
- type GroupName = string;
44
- type MenuGroup<TGroup extends GroupName> = TGroup | 'default';
45
- type ItemsArray = Array<{
46
- id: string;
47
- MenuItem: ElementType;
48
- }>;
49
- type GroupedItems<TGroup extends GroupName> = Record<MenuGroup<TGroup>, ItemsArray>;
50
- type ItemConfigProps<TComponent extends ElementType> = Omit<ComponentPropsWithoutRef<TComponent>, 'items'>;
51
- type MenuItem<TGroup extends GroupName, TComponent extends ElementType> = {
52
- id: string;
53
- group?: TGroup;
54
- priority?: number;
55
- overwrite?: boolean;
56
- } & ({
57
- props: ItemConfigProps<TComponent>;
58
- useProps?: never;
59
- } | {
60
- useProps: () => ItemConfigProps<TComponent>;
61
- props?: never;
62
- });
63
- type MenuActions<TGroup extends GroupName> = {
64
- registerAction: (args: MenuItem<TGroup, typeof Action>) => void;
65
- registerToggleAction: (args: MenuItem<TGroup, typeof ToggleAction>) => void;
66
- registerLink: (args: MenuItem<TGroup, typeof Link>) => void;
67
- registerSubMenu: (args: MenuItem<'default', typeof ActionsGroup>) => MenuActions<'default'>;
68
- useMenuItems: () => GroupedItems<TGroup>;
30
+ onClick?: () => void;
31
+ value?: string;
69
32
  };
33
+ declare function ToggleAction({ icon: Icon, title, value, visible, ...props }: Props): React.JSX.Element | null;
70
34
 
71
35
  declare const injectIntoPageIndication: (args: _elementor_locations.InjectArgs<object>) => void;
72
36
  declare const injectIntoResponsive: (args: _elementor_locations.InjectArgs<object>) => void;
73
37
  declare const injectIntoPrimaryAction: (args: _elementor_locations.InjectArgs<object>) => void;
74
- declare const mainMenu: MenuActions<"default" | "exits">;
75
- declare const toolsMenu: MenuActions<"default">;
76
- declare const utilitiesMenu: MenuActions<"default">;
77
- declare const integrationsMenu: MenuActions<"default">;
38
+ declare const mainMenu: _elementor_menus.Menu<{
39
+ Action: typeof Action;
40
+ ToggleAction: typeof ToggleAction;
41
+ Link: typeof Link;
42
+ }, "exits">;
43
+ declare const toolsMenu: _elementor_menus.Menu<{
44
+ Action: typeof Action;
45
+ ToggleAction: typeof ToggleAction;
46
+ Link: typeof Link;
47
+ }, "default">;
48
+ declare const utilitiesMenu: _elementor_menus.Menu<{
49
+ Action: typeof Action;
50
+ ToggleAction: typeof ToggleAction;
51
+ Link: typeof Link;
52
+ }, "default">;
53
+ declare const integrationsMenu: _elementor_menus.Menu<{
54
+ Action: typeof Action;
55
+ ToggleAction: typeof ToggleAction;
56
+ Link: typeof Link;
57
+ }, "default">;
78
58
 
79
- declare const documentOptionsMenu: MenuActions<"default" | "save">;
59
+ declare const documentOptionsMenu: _elementor_menus.Menu<{
60
+ Action: typeof Action;
61
+ ToggleAction: typeof ToggleAction;
62
+ Link: typeof Link;
63
+ }, "save">;
80
64
 
81
- export { type Props$3 as ActionProps, type Props$1 as LinkProps, type Props$2 as ToggleActionProps, documentOptionsMenu, injectIntoPageIndication, injectIntoPrimaryAction, injectIntoResponsive, integrationsMenu, mainMenu, toolsMenu, utilitiesMenu };
65
+ export { type Props$2 as ActionProps, type Props$1 as LinkProps, type Props as ToggleActionProps, documentOptionsMenu, injectIntoPageIndication, injectIntoPrimaryAction, injectIntoResponsive, integrationsMenu, mainMenu, toolsMenu, utilitiesMenu };
package/dist/index.d.ts CHANGED
@@ -1,26 +1,16 @@
1
- import * as React from 'react';
2
- import { ElementType, ComponentPropsWithoutRef } from 'react';
1
+ import * as _elementor_menus from '@elementor/menus';
3
2
  import * as _elementor_locations from '@elementor/locations';
4
-
5
- type Props$3 = {
6
- title: string;
7
- icon: ElementType;
8
- disabled?: boolean;
9
- visible?: boolean;
10
- onClick?: () => void;
11
- };
12
- declare function Action({ icon: Icon, title, visible, ...props }: Props$3): React.JSX.Element | null;
3
+ import * as React from 'react';
4
+ import { ElementType } from 'react';
13
5
 
14
6
  type Props$2 = {
15
7
  title: string;
16
8
  icon: ElementType;
17
- selected?: boolean;
18
9
  disabled?: boolean;
19
10
  visible?: boolean;
20
11
  onClick?: () => void;
21
- value?: string;
22
12
  };
23
- declare function ToggleAction({ icon: Icon, title, value, visible, ...props }: Props$2): React.JSX.Element | null;
13
+ declare function Action({ icon: Icon, title, visible, ...props }: Props$2): React.JSX.Element | null;
24
14
 
25
15
  type Props$1 = {
26
16
  title: string;
@@ -34,48 +24,42 @@ declare function Link({ icon: Icon, title, visible, ...props }: Props$1): React.
34
24
  type Props = {
35
25
  title: string;
36
26
  icon: ElementType;
27
+ selected?: boolean;
37
28
  disabled?: boolean;
38
29
  visible?: boolean;
39
- items: ItemsArray;
40
- };
41
- declare function ActionsGroup({ icon: Icon, title, visible, items, ...props }: Props): React.JSX.Element | null;
42
-
43
- type GroupName = string;
44
- type MenuGroup<TGroup extends GroupName> = TGroup | 'default';
45
- type ItemsArray = Array<{
46
- id: string;
47
- MenuItem: ElementType;
48
- }>;
49
- type GroupedItems<TGroup extends GroupName> = Record<MenuGroup<TGroup>, ItemsArray>;
50
- type ItemConfigProps<TComponent extends ElementType> = Omit<ComponentPropsWithoutRef<TComponent>, 'items'>;
51
- type MenuItem<TGroup extends GroupName, TComponent extends ElementType> = {
52
- id: string;
53
- group?: TGroup;
54
- priority?: number;
55
- overwrite?: boolean;
56
- } & ({
57
- props: ItemConfigProps<TComponent>;
58
- useProps?: never;
59
- } | {
60
- useProps: () => ItemConfigProps<TComponent>;
61
- props?: never;
62
- });
63
- type MenuActions<TGroup extends GroupName> = {
64
- registerAction: (args: MenuItem<TGroup, typeof Action>) => void;
65
- registerToggleAction: (args: MenuItem<TGroup, typeof ToggleAction>) => void;
66
- registerLink: (args: MenuItem<TGroup, typeof Link>) => void;
67
- registerSubMenu: (args: MenuItem<'default', typeof ActionsGroup>) => MenuActions<'default'>;
68
- useMenuItems: () => GroupedItems<TGroup>;
30
+ onClick?: () => void;
31
+ value?: string;
69
32
  };
33
+ declare function ToggleAction({ icon: Icon, title, value, visible, ...props }: Props): React.JSX.Element | null;
70
34
 
71
35
  declare const injectIntoPageIndication: (args: _elementor_locations.InjectArgs<object>) => void;
72
36
  declare const injectIntoResponsive: (args: _elementor_locations.InjectArgs<object>) => void;
73
37
  declare const injectIntoPrimaryAction: (args: _elementor_locations.InjectArgs<object>) => void;
74
- declare const mainMenu: MenuActions<"default" | "exits">;
75
- declare const toolsMenu: MenuActions<"default">;
76
- declare const utilitiesMenu: MenuActions<"default">;
77
- declare const integrationsMenu: MenuActions<"default">;
38
+ declare const mainMenu: _elementor_menus.Menu<{
39
+ Action: typeof Action;
40
+ ToggleAction: typeof ToggleAction;
41
+ Link: typeof Link;
42
+ }, "exits">;
43
+ declare const toolsMenu: _elementor_menus.Menu<{
44
+ Action: typeof Action;
45
+ ToggleAction: typeof ToggleAction;
46
+ Link: typeof Link;
47
+ }, "default">;
48
+ declare const utilitiesMenu: _elementor_menus.Menu<{
49
+ Action: typeof Action;
50
+ ToggleAction: typeof ToggleAction;
51
+ Link: typeof Link;
52
+ }, "default">;
53
+ declare const integrationsMenu: _elementor_menus.Menu<{
54
+ Action: typeof Action;
55
+ ToggleAction: typeof ToggleAction;
56
+ Link: typeof Link;
57
+ }, "default">;
78
58
 
79
- declare const documentOptionsMenu: MenuActions<"default" | "save">;
59
+ declare const documentOptionsMenu: _elementor_menus.Menu<{
60
+ Action: typeof Action;
61
+ ToggleAction: typeof ToggleAction;
62
+ Link: typeof Link;
63
+ }, "save">;
80
64
 
81
- export { type Props$3 as ActionProps, type Props$1 as LinkProps, type Props$2 as ToggleActionProps, documentOptionsMenu, injectIntoPageIndication, injectIntoPrimaryAction, injectIntoResponsive, integrationsMenu, mainMenu, toolsMenu, utilitiesMenu };
65
+ export { type Props$2 as ActionProps, type Props$1 as LinkProps, type Props as ToggleActionProps, documentOptionsMenu, injectIntoPageIndication, injectIntoPrimaryAction, injectIntoResponsive, integrationsMenu, mainMenu, toolsMenu, utilitiesMenu };