@elementor/editor-app-bar 0.14.0 → 0.14.2

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 (61) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/index.d.mts +78 -196
  3. package/dist/index.d.ts +78 -196
  4. package/dist/index.js +774 -201
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.mjs +734 -162
  7. package/dist/index.mjs.map +1 -1
  8. package/package.json +9 -8
  9. package/src/components/__tests__/app-bar.test.tsx +23 -0
  10. package/src/components/actions/action.tsx +33 -0
  11. package/src/components/actions/actions-group.tsx +69 -0
  12. package/src/components/actions/link.tsx +33 -0
  13. package/src/components/actions/toggle-action.tsx +35 -0
  14. package/src/components/app-bar.tsx +42 -0
  15. package/src/components/locations/__tests__/locations-components.test.tsx +37 -0
  16. package/src/components/locations/__tests__/menus.test.tsx +158 -0
  17. package/src/components/locations/integrations-menu-location.tsx +44 -0
  18. package/src/components/locations/main-menu-location.tsx +57 -0
  19. package/src/components/locations/page-indication-location.tsx +8 -0
  20. package/src/components/locations/primary-action-location.tsx +8 -0
  21. package/src/components/locations/responsive-location.tsx +8 -0
  22. package/src/components/locations/tools-menu-location.tsx +28 -0
  23. package/src/components/locations/utilities-menu-location.tsx +35 -0
  24. package/src/components/ui/popover-menu-item.tsx +47 -0
  25. package/src/components/ui/popover-menu.tsx +26 -0
  26. package/src/components/ui/popover-sub-menu.tsx +29 -0
  27. package/src/components/ui/toolbar-logo.tsx +84 -0
  28. package/src/components/ui/toolbar-menu-item.tsx +45 -0
  29. package/src/components/ui/toolbar-menu-more.tsx +29 -0
  30. package/src/components/ui/toolbar-menu-toggle-item.tsx +34 -0
  31. package/src/components/ui/toolbar-menu.tsx +15 -0
  32. package/src/contexts/menu-context.tsx +24 -0
  33. package/src/extensions/documents-indicator/index.ts +1 -1
  34. package/src/extensions/documents-preview/index.ts +1 -1
  35. package/src/extensions/documents-save/components/primary-action-menu.tsx +1 -1
  36. package/src/extensions/documents-save/hooks/use-document-copy-and-share-props.ts +1 -1
  37. package/src/extensions/documents-save/hooks/use-document-save-draft-props.ts +1 -1
  38. package/src/extensions/documents-save/hooks/use-document-save-template-props.ts +1 -1
  39. package/src/extensions/documents-save/index.ts +1 -1
  40. package/src/extensions/documents-save/locations.ts +1 -1
  41. package/src/extensions/elements/index.ts +1 -1
  42. package/src/extensions/finder/index.ts +1 -1
  43. package/src/extensions/help/index.ts +1 -1
  44. package/src/extensions/history/index.ts +1 -1
  45. package/src/extensions/keyboard-shortcuts/hooks/use-action-props.ts +1 -2
  46. package/src/extensions/keyboard-shortcuts/index.ts +1 -1
  47. package/src/extensions/site-settings/hooks/use-action-props.ts +1 -2
  48. package/src/extensions/site-settings/index.ts +1 -1
  49. package/src/extensions/structure/hooks/use-action-props.ts +1 -2
  50. package/src/extensions/structure/index.ts +1 -1
  51. package/src/extensions/theme-builder/hooks/use-action-props.ts +1 -2
  52. package/src/extensions/theme-builder/index.ts +1 -1
  53. package/src/extensions/user-preferences/hooks/use-action-props.ts +1 -2
  54. package/src/extensions/user-preferences/index.ts +1 -1
  55. package/src/extensions/wordpress/index.ts +1 -1
  56. package/src/index.ts +14 -10
  57. package/src/init.ts +1 -1
  58. package/src/locations/__tests__/menus.test.tsx +212 -0
  59. package/src/locations/index.ts +27 -0
  60. package/src/locations/menus.tsx +172 -0
  61. package/src/types.ts +4 -0
package/dist/index.mjs CHANGED
@@ -1,20 +1,628 @@
1
- // src/index.ts
1
+ // src/locations/menus.tsx
2
+ import * as React11 from "react";
3
+ import { useMemo } from "react";
4
+ import { createLocation } from "@elementor/locations";
5
+
6
+ // src/components/actions/action.tsx
7
+ import * as React4 from "react";
8
+
9
+ // src/contexts/menu-context.tsx
10
+ import * as React from "react";
11
+ import { createContext, useContext } from "react";
12
+ var MenuContext = createContext({
13
+ type: "toolbar"
14
+ });
15
+ function MenuContextProvider({ type, popupState, children }) {
16
+ return /* @__PURE__ */ React.createElement(MenuContext.Provider, { value: { type, popupState } }, children);
17
+ }
18
+ function useMenuContext() {
19
+ return useContext(MenuContext);
20
+ }
21
+
22
+ // src/components/ui/toolbar-menu-item.tsx
23
+ import * as React2 from "react";
24
+ import { Box, IconButton, Tooltip as BaseTooltip } from "@elementor/ui";
25
+ function ToolbarMenuItem({ title, ...props }) {
26
+ return /* @__PURE__ */ React2.createElement(Tooltip, { title }, /* @__PURE__ */ React2.createElement(Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React2.createElement(
27
+ IconButton,
28
+ {
29
+ ...props,
30
+ "aria-label": title,
31
+ size: "medium",
32
+ sx: {
33
+ "& svg": {
34
+ fontSize: "1.25rem",
35
+ height: "1em",
36
+ width: "1em"
37
+ },
38
+ "&:hover": {
39
+ color: "text.primary"
40
+ }
41
+ }
42
+ }
43
+ )));
44
+ }
45
+ function Tooltip(props) {
46
+ return /* @__PURE__ */ React2.createElement(
47
+ BaseTooltip,
48
+ {
49
+ PopperProps: {
50
+ sx: {
51
+ "&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
52
+ mt: 2
53
+ }
54
+ }
55
+ },
56
+ ...props
57
+ }
58
+ );
59
+ }
60
+
61
+ // src/components/ui/popover-menu-item.tsx
62
+ import * as React3 from "react";
2
63
  import {
3
- __privateMainMenu,
4
- __privateToolsMenu,
5
- __privateUtilitiesMenu,
6
- __privateIntegrationsMenu,
7
- __privateInjectIntoPageIndication,
8
- __privateInjectIntoResponsive,
9
- __privateInjectIntoPrimaryAction
10
- } from "@elementor/editor-app-bar-ui";
64
+ MenuItem,
65
+ ListItemText,
66
+ ListItemIcon,
67
+ withDirection
68
+ } from "@elementor/ui";
69
+ import { ArrowUpRightIcon, ChevronRightIcon } from "@elementor/icons";
70
+ var DirectionalArrowIcon = withDirection(ArrowUpRightIcon);
71
+ var DirectionalChevronIcon = withDirection(ChevronRightIcon);
72
+ function PopoverMenuItem({ text, icon, onClick, href, target, disabled, isGroupParent, ...props }) {
73
+ const isExternalLink = href && target === "_blank";
74
+ return /* @__PURE__ */ React3.createElement(
75
+ MenuItem,
76
+ {
77
+ ...props,
78
+ disabled,
79
+ onClick,
80
+ component: href ? "a" : "div",
81
+ href,
82
+ target,
83
+ sx: {
84
+ "&:hover": {
85
+ color: "text.primary"
86
+ // Overriding global CSS from the editor.
87
+ }
88
+ }
89
+ },
90
+ /* @__PURE__ */ React3.createElement(ListItemIcon, null, icon),
91
+ /* @__PURE__ */ React3.createElement(ListItemText, { primary: text }),
92
+ isExternalLink && /* @__PURE__ */ React3.createElement(DirectionalArrowIcon, null),
93
+ isGroupParent && /* @__PURE__ */ React3.createElement(DirectionalChevronIcon, null)
94
+ );
95
+ }
96
+
97
+ // src/components/actions/action.tsx
98
+ function Action({ icon: Icon, title, visible = true, ...props }) {
99
+ const { type } = useMenuContext();
100
+ if (!visible) {
101
+ return null;
102
+ }
103
+ return type === "toolbar" ? /* @__PURE__ */ React4.createElement(ToolbarMenuItem, { title, ...props }, /* @__PURE__ */ React4.createElement(Icon, null)) : /* @__PURE__ */ React4.createElement(
104
+ PopoverMenuItem,
105
+ {
106
+ ...props,
107
+ text: title,
108
+ icon: /* @__PURE__ */ React4.createElement(Icon, null)
109
+ }
110
+ );
111
+ }
112
+
113
+ // src/components/actions/toggle-action.tsx
114
+ import * as React6 from "react";
115
+
116
+ // src/components/ui/toolbar-menu-toggle-item.tsx
117
+ import * as React5 from "react";
118
+ import { Box as Box2, ToggleButton, Tooltip as Tooltip2 } from "@elementor/ui";
119
+ function ToolbarMenuToggleItem({ title, onClick, ...props }) {
120
+ return /* @__PURE__ */ React5.createElement(Tooltip2, { title }, /* @__PURE__ */ React5.createElement(Box2, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React5.createElement(
121
+ ToggleButton,
122
+ {
123
+ ...props,
124
+ onChange: onClick,
125
+ "aria-label": title,
126
+ size: "small",
127
+ sx: {
128
+ border: 0,
129
+ // Temp fix until the style of the ToggleButton component will be decided.
130
+ "&.Mui-disabled": {
131
+ border: 0
132
+ // Temp fix until the style of the ToggleButton component will be decided.
133
+ },
134
+ "& svg": {
135
+ fontSize: "1.25rem",
136
+ height: "1em",
137
+ width: "1em"
138
+ }
139
+ }
140
+ }
141
+ )));
142
+ }
143
+
144
+ // src/components/actions/toggle-action.tsx
145
+ function ToggleAction({ icon: Icon, title, value, visible = true, ...props }) {
146
+ const { type } = useMenuContext();
147
+ if (!visible) {
148
+ return null;
149
+ }
150
+ return type === "toolbar" ? /* @__PURE__ */ React6.createElement(ToolbarMenuToggleItem, { value: value || title, title, ...props }, /* @__PURE__ */ React6.createElement(Icon, null)) : /* @__PURE__ */ React6.createElement(
151
+ PopoverMenuItem,
152
+ {
153
+ ...props,
154
+ text: title,
155
+ icon: /* @__PURE__ */ React6.createElement(Icon, null)
156
+ }
157
+ );
158
+ }
159
+
160
+ // src/components/actions/link.tsx
161
+ import * as React7 from "react";
162
+ function Link({ icon: Icon, title, visible = true, ...props }) {
163
+ const { type } = useMenuContext();
164
+ if (!visible) {
165
+ return null;
166
+ }
167
+ return type === "toolbar" ? /* @__PURE__ */ React7.createElement(ToolbarMenuItem, { title, ...props }, /* @__PURE__ */ React7.createElement(Icon, null)) : /* @__PURE__ */ React7.createElement(
168
+ PopoverMenuItem,
169
+ {
170
+ ...props,
171
+ text: title,
172
+ icon: /* @__PURE__ */ React7.createElement(Icon, null)
173
+ }
174
+ );
175
+ }
176
+
177
+ // src/components/actions/actions-group.tsx
178
+ import * as React10 from "react";
179
+ import { useId } from "react";
180
+
181
+ // src/components/ui/popover-sub-menu.tsx
182
+ import * as React9 from "react";
183
+
184
+ // src/components/ui/popover-menu.tsx
185
+ import * as React8 from "react";
186
+ import { Menu } from "@elementor/ui";
187
+ function PopoverMenu({ children, popupState, ...props }) {
188
+ return /* @__PURE__ */ React8.createElement(MenuContextProvider, { type: "popover", popupState }, /* @__PURE__ */ React8.createElement(
189
+ Menu,
190
+ {
191
+ PaperProps: {
192
+ sx: { mt: 1.5 }
193
+ },
194
+ ...props,
195
+ MenuListProps: {
196
+ component: "div",
197
+ dense: true
198
+ }
199
+ },
200
+ children
201
+ ));
202
+ }
203
+
204
+ // src/components/ui/popover-sub-menu.tsx
205
+ import { useTheme } from "@elementor/ui";
206
+ function PopoverSubMenu({ children, ...props }) {
207
+ const theme = useTheme();
208
+ const isRTL = theme.direction === "rtl";
209
+ return /* @__PURE__ */ React9.createElement(
210
+ PopoverMenu,
211
+ {
212
+ sx: { pointerEvents: "none" },
213
+ PaperProps: {
214
+ sx: {
215
+ // This is a workaround to support RTL in PopoverMenu, since it doesn't support it yet.
216
+ ...isRTL ? { marginInlineEnd: -1 } : { marginInlineStart: 1 },
217
+ pointerEvents: "auto"
218
+ }
219
+ },
220
+ anchorOrigin: { vertical: "center", horizontal: isRTL ? "left" : "right" },
221
+ transformOrigin: { vertical: "center", horizontal: isRTL ? "right" : "left" },
222
+ ...props
223
+ },
224
+ children
225
+ );
226
+ }
227
+
228
+ // src/components/actions/actions-group.tsx
229
+ import { bindFocus, bindHover, bindMenu, bindPopover, bindTrigger, usePopupState } from "@elementor/ui";
230
+ function ActionsGroup({ icon: Icon, title, visible = true, items, ...props }) {
231
+ const groupId = useId();
232
+ const { type, popupState: parentPopupState } = useMenuContext();
233
+ const popupState = usePopupState({
234
+ parentPopupState,
235
+ variant: "popover",
236
+ popupId: "elementor-v2-app-bar-actions-group-" + groupId
237
+ });
238
+ if (!visible) {
239
+ return null;
240
+ }
241
+ if (type === "toolbar") {
242
+ return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(ToolbarMenuItem, { ...bindTrigger(popupState), title, ...props }, /* @__PURE__ */ React10.createElement(Icon, null)), /* @__PURE__ */ React10.createElement(
243
+ PopoverMenu,
244
+ {
245
+ onClick: popupState.close,
246
+ ...bindMenu(popupState),
247
+ marginThreshold: 8,
248
+ open: popupState.isOpen,
249
+ popupState
250
+ },
251
+ items.map(({ MenuItem: MenuItem2, id: key }) => /* @__PURE__ */ React10.createElement(MenuItem2, { key }))
252
+ ));
253
+ }
254
+ return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(
255
+ PopoverMenuItem,
256
+ {
257
+ ...props,
258
+ ...bindHover(popupState),
259
+ ...bindFocus(popupState),
260
+ text: title,
261
+ icon: /* @__PURE__ */ React10.createElement(Icon, null),
262
+ isGroupParent: true
263
+ }
264
+ ), /* @__PURE__ */ React10.createElement(
265
+ PopoverSubMenu,
266
+ {
267
+ ...props,
268
+ ...bindPopover(popupState),
269
+ popupState
270
+ },
271
+ items.map(({ MenuItem: MenuItem2, id: key }) => /* @__PURE__ */ React10.createElement(MenuItem2, { key }))
272
+ ));
273
+ }
274
+
275
+ // src/locations/menus.tsx
276
+ function createMenu(groups = []) {
277
+ const menuGroups = [
278
+ ...groups,
279
+ "default"
280
+ ];
281
+ const locations = menuGroups.reduce(
282
+ (carry, group) => ({
283
+ ...carry,
284
+ [group]: createLocation()
285
+ }),
286
+ {}
287
+ );
288
+ const [
289
+ registerAction,
290
+ registerToggleAction,
291
+ registerLink
292
+ ] = [Action, ToggleAction, Link].map(
293
+ (Component) => createRegisterMenuItem({
294
+ locations,
295
+ menuGroups,
296
+ component: Component
297
+ })
298
+ );
299
+ const useMenuItems6 = createUseMenuItems(locations);
300
+ const registerSubMenu = createRegisterSubMenu({
301
+ locations,
302
+ menuGroups
303
+ });
304
+ return {
305
+ registerAction,
306
+ registerToggleAction,
307
+ registerLink,
308
+ registerSubMenu,
309
+ useMenuItems: useMenuItems6
310
+ };
311
+ }
312
+ function createRegisterMenuItem({ locations, menuGroups, component, useMenuItems: useMenuItems6 }) {
313
+ return ({ group = "default", id, overwrite, priority, ...args }) => {
314
+ if (!menuGroups.includes(group)) {
315
+ return;
316
+ }
317
+ const useProps = "props" in args ? () => args.props : args.useProps;
318
+ const Component = component;
319
+ const InjectedComponent = (props) => {
320
+ const componentProps = useProps();
321
+ const items = useMenuItems6?.();
322
+ if (items?.length) {
323
+ return /* @__PURE__ */ React11.createElement(
324
+ Component,
325
+ {
326
+ ...props,
327
+ ...componentProps,
328
+ items
329
+ }
330
+ );
331
+ }
332
+ return /* @__PURE__ */ React11.createElement(Component, { ...props, ...componentProps });
333
+ };
334
+ locations[group].inject({
335
+ id,
336
+ component: InjectedComponent,
337
+ options: {
338
+ priority,
339
+ overwrite
340
+ }
341
+ });
342
+ };
343
+ }
344
+ function createRegisterSubMenu({ locations, menuGroups }) {
345
+ return (args) => {
346
+ const menu = createMenu();
347
+ createRegisterMenuItem({
348
+ locations,
349
+ menuGroups,
350
+ component: ActionsGroup,
351
+ useMenuItems: () => menu.useMenuItems().default
352
+ })(args);
353
+ return menu;
354
+ };
355
+ }
356
+ function createUseMenuItems(locations) {
357
+ return () => {
358
+ return useMemo(() => {
359
+ return Object.entries(locations).reduce(
360
+ (carry, [groupName, location]) => {
361
+ const items = location.getInjections().map((injection) => ({
362
+ id: injection.id,
363
+ MenuItem: injection.component
364
+ }));
365
+ return {
366
+ ...carry,
367
+ [groupName]: items
368
+ };
369
+ },
370
+ {}
371
+ );
372
+ }, []);
373
+ };
374
+ }
375
+
376
+ // src/locations/index.ts
377
+ import { createLocation as createLocation2 } from "@elementor/locations";
378
+ var {
379
+ inject: injectIntoPageIndication,
380
+ Slot: PageIndicationSlot
381
+ } = createLocation2();
382
+ var {
383
+ inject: injectIntoResponsive,
384
+ Slot: ResponsiveSlot
385
+ } = createLocation2();
386
+ var {
387
+ inject: injectIntoPrimaryAction,
388
+ Slot: PrimaryActionSlot
389
+ } = createLocation2();
390
+ var mainMenu = createMenu(["exits"]);
391
+ var toolsMenu = createMenu();
392
+ var utilitiesMenu = createMenu();
393
+ var integrationsMenu = createMenu();
11
394
 
12
395
  // src/extensions/documents-save/locations.ts
13
- import { __privateCreateMenu as createMenu } from "@elementor/editor-app-bar-ui";
14
396
  var documentOptionsMenu = createMenu(["save"]);
15
397
 
398
+ // src/components/app-bar.tsx
399
+ import * as React22 from "react";
400
+ import { AppBar as BaseAppBar, Box as Box3, Divider as Divider3, Grid, ThemeProvider, Toolbar } from "@elementor/ui";
401
+
402
+ // src/components/locations/main-menu-location.tsx
403
+ import * as React13 from "react";
404
+ import { usePopupState as usePopupState2, bindMenu as bindMenu2, bindTrigger as bindTrigger2, Stack, Divider } from "@elementor/ui";
405
+
406
+ // src/components/ui/toolbar-logo.tsx
407
+ import * as React12 from "react";
408
+ import { useState } from "react";
409
+ import { __ } from "@wordpress/i18n";
410
+ import { ToggleButton as ToggleButton2, SvgIcon, styled } from "@elementor/ui";
411
+ var ElementorLogo = (props) => {
412
+ return /* @__PURE__ */ React12.createElement(SvgIcon, { viewBox: "0 0 32 32", ...props }, /* @__PURE__ */ React12.createElement("g", null, /* @__PURE__ */ React12.createElement("circle", { cx: "16", cy: "16", r: "16" }), /* @__PURE__ */ React12.createElement("path", { d: "M11.7 9H9V22.3H11.7V9Z" }), /* @__PURE__ */ React12.createElement("path", { d: "M22.4 9H9V11.7H22.4V9Z" }), /* @__PURE__ */ React12.createElement("path", { d: "M22.4 14.4004H9V17.1004H22.4V14.4004Z" }), /* @__PURE__ */ React12.createElement("path", { d: "M22.4 19.6992H9V22.3992H22.4V19.6992Z" })));
413
+ };
414
+ var StyledToggleButton = styled(ToggleButton2)(({ theme }) => ({
415
+ padding: 0,
416
+ border: 0,
417
+ color: theme.palette.text.primary,
418
+ "&.MuiToggleButton-root:hover": {
419
+ backgroundColor: "initial"
420
+ },
421
+ "&.MuiToggleButton-root.Mui-selected": {
422
+ backgroundColor: "initial"
423
+ }
424
+ }));
425
+ var StyledElementorLogo = styled(ElementorLogo, {
426
+ shouldForwardProp: (prop) => prop !== "showMenuIcon"
427
+ })(({ theme, showMenuIcon }) => ({
428
+ "& path": {
429
+ fill: theme.palette.background.default,
430
+ transition: "all 0.2s linear",
431
+ transformOrigin: "bottom left",
432
+ "&:first-of-type": {
433
+ transitionDelay: !showMenuIcon && "0.2s",
434
+ transform: showMenuIcon && "translateY(-9px) scaleY(0)"
435
+ },
436
+ "&:not(:first-of-type)": {
437
+ // Emotion automatically change 4 to -4 in RTL moode.
438
+ transform: !showMenuIcon && `translateX(${theme.direction === "rtl" ? "4" : "9"}px) scaleX(0.6)`
439
+ },
440
+ "&:nth-of-type(2)": {
441
+ transitionDelay: showMenuIcon ? "0" : "0.2s"
442
+ },
443
+ "&:nth-of-type(3)": {
444
+ transitionDelay: "0.1s"
445
+ },
446
+ "&:nth-of-type(4)": {
447
+ transitionDelay: showMenuIcon ? "0.2s" : "0"
448
+ }
449
+ }
450
+ }));
451
+ function ToolbarLogo(props) {
452
+ const [isHoverState, setIsHoverState] = useState(false);
453
+ const showMenuIcon = props.selected || isHoverState;
454
+ return /* @__PURE__ */ React12.createElement(
455
+ StyledToggleButton,
456
+ {
457
+ ...props,
458
+ value: "selected",
459
+ size: "large",
460
+ onMouseEnter: () => setIsHoverState(true),
461
+ onMouseLeave: () => setIsHoverState(false)
462
+ },
463
+ /* @__PURE__ */ React12.createElement(
464
+ StyledElementorLogo,
465
+ {
466
+ fontSize: "large",
467
+ showMenuIcon,
468
+ titleAccess: __("Elementor Logo", "elementor")
469
+ }
470
+ )
471
+ );
472
+ }
473
+
474
+ // src/components/locations/main-menu-location.tsx
475
+ var { useMenuItems } = mainMenu;
476
+ function MainMenuLocation() {
477
+ const menuItems = useMenuItems();
478
+ const popupState = usePopupState2({
479
+ variant: "popover",
480
+ popupId: "elementor-v2-app-bar-main-menu"
481
+ });
482
+ const toolbarLogoProps = bindTrigger2(popupState);
483
+ const onToolbarClick = (e) => {
484
+ const extendedWindow = window;
485
+ const config = extendedWindow?.elementor?.editorEvents?.config;
486
+ if (config) {
487
+ extendedWindow.elementor.editorEvents.dispatchEvent(
488
+ config.names.topBar.elementorLogoDropdown,
489
+ {
490
+ location: config.locations.topBar,
491
+ secondaryLocation: config.secondaryLocations.elementorLogo,
492
+ trigger: config.triggers.dropdownClick,
493
+ element: config.elements.buttonIcon
494
+ }
495
+ );
496
+ }
497
+ toolbarLogoProps.onClick(e);
498
+ };
499
+ return /* @__PURE__ */ React13.createElement(Stack, { sx: { paddingInlineStart: 3 }, direction: "row", alignItems: "center" }, /* @__PURE__ */ React13.createElement(
500
+ ToolbarLogo,
501
+ {
502
+ ...toolbarLogoProps,
503
+ onClick: onToolbarClick,
504
+ selected: popupState.isOpen
505
+ }
506
+ ), /* @__PURE__ */ React13.createElement(
507
+ PopoverMenu,
508
+ {
509
+ onClick: popupState.close,
510
+ ...bindMenu2(popupState),
511
+ marginThreshold: 8
512
+ },
513
+ menuItems.default.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React13.createElement(MenuItem2, { key: id })),
514
+ menuItems.exits.length > 0 && /* @__PURE__ */ React13.createElement(Divider, null),
515
+ menuItems.exits.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React13.createElement(MenuItem2, { key: id }))
516
+ ));
517
+ }
518
+
519
+ // src/components/locations/tools-menu-location.tsx
520
+ import * as React17 from "react";
521
+
522
+ // src/components/ui/toolbar-menu.tsx
523
+ import * as React14 from "react";
524
+ import { Stack as Stack2 } from "@elementor/ui";
525
+ function ToolbarMenu({ children, ...props }) {
526
+ return /* @__PURE__ */ React14.createElement(MenuContextProvider, { type: "toolbar" }, /* @__PURE__ */ React14.createElement(Stack2, { sx: { px: 1.5 }, spacing: 1.5, direction: "row", alignItems: "center", ...props }, children));
527
+ }
528
+
529
+ // src/components/ui/toolbar-menu-more.tsx
530
+ import * as React15 from "react";
531
+ import { bindMenu as bindMenu3, bindTrigger as bindTrigger3, usePopupState as usePopupState3 } from "@elementor/ui";
532
+ import { __ as __2 } from "@wordpress/i18n";
533
+ import { DotsVerticalIcon } from "@elementor/icons";
534
+ function ToolbarMenuMore({ children, id }) {
535
+ const popupState = usePopupState3({
536
+ variant: "popover",
537
+ popupId: id
538
+ });
539
+ return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(ToolbarMenuItem, { ...bindTrigger3(popupState), title: __2("More", "elementor") }, /* @__PURE__ */ React15.createElement(DotsVerticalIcon, null)), /* @__PURE__ */ React15.createElement(PopoverMenu, { onClick: popupState.close, ...bindMenu3(popupState) }, children));
540
+ }
541
+
542
+ // src/components/locations/integrations-menu-location.tsx
543
+ import * as React16 from "react";
544
+ import {
545
+ bindMenu as bindMenu4,
546
+ bindTrigger as bindTrigger4,
547
+ usePopupState as usePopupState4
548
+ } from "@elementor/ui";
549
+ import { __ as __3 } from "@wordpress/i18n";
550
+ import { PlugIcon } from "@elementor/icons";
551
+ var { useMenuItems: useMenuItems2 } = integrationsMenu;
552
+ function IntegrationsMenuLocation() {
553
+ const menuItems = useMenuItems2();
554
+ const popupState = usePopupState4({
555
+ variant: "popover",
556
+ popupId: "elementor-v2-app-bar-integrations"
557
+ });
558
+ if (menuItems.default.length === 0) {
559
+ return null;
560
+ }
561
+ return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(ToolbarMenuItem, { ...bindTrigger4(popupState), title: __3("Integrations", "elementor") }, /* @__PURE__ */ React16.createElement(PlugIcon, null)), /* @__PURE__ */ React16.createElement(
562
+ PopoverMenu,
563
+ {
564
+ onClick: popupState.close,
565
+ ...bindMenu4(popupState),
566
+ marginThreshold: 8,
567
+ open: popupState.isOpen
568
+ },
569
+ menuItems.default.map(
570
+ ({ MenuItem: IntegrationsMenuItem, id }) => /* @__PURE__ */ React16.createElement(IntegrationsMenuItem, { key: id })
571
+ )
572
+ ));
573
+ }
574
+
575
+ // src/components/locations/tools-menu-location.tsx
576
+ var MAX_TOOLBAR_ACTIONS = 5;
577
+ var { useMenuItems: useMenuItems3 } = toolsMenu;
578
+ function ToolsMenuLocation() {
579
+ const menuItems = useMenuItems3();
580
+ const toolbarMenuItems = menuItems.default.slice(0, MAX_TOOLBAR_ACTIONS);
581
+ const popoverMenuItems = menuItems.default.slice(MAX_TOOLBAR_ACTIONS);
582
+ return /* @__PURE__ */ React17.createElement(ToolbarMenu, null, toolbarMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React17.createElement(MenuItem2, { key: id })), /* @__PURE__ */ React17.createElement(IntegrationsMenuLocation, null), popoverMenuItems.length > 0 && /* @__PURE__ */ React17.createElement(ToolbarMenuMore, { id: "elementor-editor-app-bar-tools-more" }, popoverMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React17.createElement(MenuItem2, { key: id }))));
583
+ }
584
+
585
+ // src/components/locations/utilities-menu-location.tsx
586
+ import * as React18 from "react";
587
+ import { Fragment as Fragment4 } from "react";
588
+ import { Divider as Divider2 } from "@elementor/ui";
589
+ var MAX_TOOLBAR_ACTIONS2 = 4;
590
+ var { useMenuItems: useMenuItems4 } = utilitiesMenu;
591
+ function UtilitiesMenuLocation() {
592
+ const menuItems = useMenuItems4();
593
+ const toolbarMenuItems = menuItems.default.slice(0, MAX_TOOLBAR_ACTIONS2);
594
+ const popoverMenuItems = menuItems.default.slice(MAX_TOOLBAR_ACTIONS2);
595
+ return /* @__PURE__ */ React18.createElement(ToolbarMenu, null, toolbarMenuItems.map(
596
+ ({ MenuItem: MenuItem2, id }, index) => /* @__PURE__ */ React18.createElement(Fragment4, { key: id }, index === 0 && /* @__PURE__ */ React18.createElement(Divider2, { orientation: "vertical" }), /* @__PURE__ */ React18.createElement(MenuItem2, null))
597
+ ), popoverMenuItems.length > 0 && /* @__PURE__ */ React18.createElement(ToolbarMenuMore, { id: "elementor-editor-app-bar-utilities-more" }, popoverMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React18.createElement(MenuItem2, { key: id }))));
598
+ }
599
+
600
+ // src/components/locations/primary-action-location.tsx
601
+ import * as React19 from "react";
602
+ function PrimaryActionLocation() {
603
+ return /* @__PURE__ */ React19.createElement(PrimaryActionSlot, null);
604
+ }
605
+
606
+ // src/components/locations/page-indication-location.tsx
607
+ import * as React20 from "react";
608
+ function PageIndicationLocation() {
609
+ return /* @__PURE__ */ React20.createElement(PageIndicationSlot, null);
610
+ }
611
+
612
+ // src/components/locations/responsive-location.tsx
613
+ import * as React21 from "react";
614
+ function ResponsiveLocation() {
615
+ return /* @__PURE__ */ React21.createElement(ResponsiveSlot, null);
616
+ }
617
+
618
+ // src/components/app-bar.tsx
619
+ import { __useActiveDocument as useActiveDocument } from "@elementor/editor-documents";
620
+ function AppBar() {
621
+ const document2 = useActiveDocument();
622
+ return /* @__PURE__ */ React22.createElement(ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React22.createElement(BaseAppBar, { position: "sticky" }, /* @__PURE__ */ React22.createElement(Toolbar, { disableGutters: true, variant: "dense" }, /* @__PURE__ */ React22.createElement(Box3, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)", flexGrow: 1 }, /* @__PURE__ */ React22.createElement(Grid, { container: true }, /* @__PURE__ */ React22.createElement(MainMenuLocation, null), document2?.permissions?.allowAddingWidgets && /* @__PURE__ */ React22.createElement(ToolsMenuLocation, null)), /* @__PURE__ */ React22.createElement(Grid, { container: true, justifyContent: "center" }, /* @__PURE__ */ React22.createElement(ToolbarMenu, { spacing: 1.5 }, /* @__PURE__ */ React22.createElement(Divider3, { orientation: "vertical" }), /* @__PURE__ */ React22.createElement(PageIndicationLocation, null), /* @__PURE__ */ React22.createElement(Divider3, { orientation: "vertical" }), /* @__PURE__ */ React22.createElement(ResponsiveLocation, null), /* @__PURE__ */ React22.createElement(Divider3, { orientation: "vertical" }))), /* @__PURE__ */ React22.createElement(Grid, { container: true, justifyContent: "flex-end" }, /* @__PURE__ */ React22.createElement(UtilitiesMenuLocation, null), /* @__PURE__ */ React22.createElement(PrimaryActionLocation, null))))));
623
+ }
624
+
16
625
  // src/init.ts
17
- import { __privateAppBar as AppBar } from "@elementor/editor-app-bar-ui";
18
626
  import { injectIntoTop as injectIntoTop2 } from "@elementor/editor";
19
627
 
20
628
  // src/sync/redirect-old-menus.ts
@@ -25,27 +633,24 @@ function redirectOldMenus() {
25
633
  });
26
634
  }
27
635
 
28
- // src/extensions/documents-indicator/index.ts
29
- import { __privateInjectIntoPageIndication as injectIntoPageIndication } from "@elementor/editor-app-bar-ui";
30
-
31
636
  // src/extensions/documents-indicator/components/settings-button.tsx
32
- import * as React from "react";
33
- import { Box, ToggleButton, Tooltip as BaseTooltip } from "@elementor/ui";
34
- import { __ } from "@wordpress/i18n";
637
+ import * as React23 from "react";
638
+ import { Box as Box4, ToggleButton as ToggleButton3, Tooltip as BaseTooltip2 } from "@elementor/ui";
639
+ import { __ as __4 } from "@wordpress/i18n";
35
640
  import { __privateOpenRoute as openRoute2, __privateUseRouteStatus as useRouteStatus } from "@elementor/editor-v1-adapters";
36
641
  import { SettingsIcon } from "@elementor/icons";
37
- import { __useActiveDocument as useActiveDocument, __useHostDocument as useHostDocument } from "@elementor/editor-documents";
642
+ import { __useActiveDocument as useActiveDocument2, __useHostDocument as useHostDocument } from "@elementor/editor-documents";
38
643
  function SettingsButton() {
39
- const activeDocument = useActiveDocument();
644
+ const activeDocument = useActiveDocument2();
40
645
  const hostDocument = useHostDocument();
41
646
  const document2 = activeDocument && activeDocument.type.value !== "kit" ? activeDocument : hostDocument;
42
647
  const { isActive, isBlocked } = useRouteStatus("panel/page-settings");
43
648
  if (!document2) {
44
649
  return null;
45
650
  }
46
- const title = __("%s Settings", "elementor").replace("%s", document2.type.label);
47
- return /* @__PURE__ */ React.createElement(Tooltip, { title }, /* @__PURE__ */ React.createElement(Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React.createElement(
48
- ToggleButton,
651
+ const title = __4("%s Settings", "elementor").replace("%s", document2.type.label);
652
+ return /* @__PURE__ */ React23.createElement(Tooltip3, { title }, /* @__PURE__ */ React23.createElement(Box4, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React23.createElement(
653
+ ToggleButton3,
49
654
  {
50
655
  value: "document-settings",
51
656
  selected: isActive,
@@ -77,12 +682,12 @@ function SettingsButton() {
77
682
  }
78
683
  }
79
684
  },
80
- /* @__PURE__ */ React.createElement(SettingsIcon, { fontSize: "small" })
685
+ /* @__PURE__ */ React23.createElement(SettingsIcon, { fontSize: "small" })
81
686
  )));
82
687
  }
83
- function Tooltip(props) {
84
- return /* @__PURE__ */ React.createElement(
85
- BaseTooltip,
688
+ function Tooltip3(props) {
689
+ return /* @__PURE__ */ React23.createElement(
690
+ BaseTooltip2,
86
691
  {
87
692
  PopperProps: {
88
693
  sx: {
@@ -108,19 +713,16 @@ function init() {
108
713
  });
109
714
  }
110
715
 
111
- // src/extensions/documents-preview/index.ts
112
- import { __privateUtilitiesMenu as utilitiesMenu } from "@elementor/editor-app-bar-ui";
113
-
114
716
  // src/extensions/documents-preview/hooks/use-action-props.ts
115
- import { __ as __2 } from "@wordpress/i18n";
717
+ import { __ as __5 } from "@wordpress/i18n";
116
718
  import { EyeIcon } from "@elementor/icons";
117
719
  import { __privateRunCommand as runCommand } from "@elementor/editor-v1-adapters";
118
- import { __useActiveDocument as useActiveDocument2 } from "@elementor/editor-documents";
720
+ import { __useActiveDocument as useActiveDocument3 } from "@elementor/editor-documents";
119
721
  function useActionProps() {
120
- const document2 = useActiveDocument2();
722
+ const document2 = useActiveDocument3();
121
723
  return {
122
724
  icon: EyeIcon,
123
- title: __2("Preview Changes", "elementor"),
725
+ title: __5("Preview Changes", "elementor"),
124
726
  onClick: () => {
125
727
  const extendedWindow = window;
126
728
  const config = extendedWindow?.elementor?.editorEvents?.config;
@@ -155,47 +757,44 @@ function init2() {
155
757
  });
156
758
  }
157
759
 
158
- // src/extensions/documents-save/index.ts
159
- import { __privateInjectIntoPrimaryAction as injectIntoPrimaryAction } from "@elementor/editor-app-bar-ui";
160
-
161
760
  // src/extensions/documents-save/hooks/use-document-save-draft-props.ts
162
- import { __ as __3 } from "@wordpress/i18n";
761
+ import { __ as __6 } from "@wordpress/i18n";
163
762
  import { FileReportIcon } from "@elementor/icons";
164
- import { __useActiveDocument as useActiveDocument3, __useActiveDocumentActions as useActiveDocumentActions } from "@elementor/editor-documents";
763
+ import { __useActiveDocument as useActiveDocument4, __useActiveDocumentActions as useActiveDocumentActions } from "@elementor/editor-documents";
165
764
  function useDocumentSaveDraftProps() {
166
- const document2 = useActiveDocument3();
765
+ const document2 = useActiveDocument4();
167
766
  const { saveDraft } = useActiveDocumentActions();
168
767
  return {
169
768
  icon: FileReportIcon,
170
- title: __3("Save Draft", "elementor"),
769
+ title: __6("Save Draft", "elementor"),
171
770
  onClick: saveDraft,
172
771
  disabled: !document2 || document2.isSaving || document2.isSavingDraft || !document2.isDirty
173
772
  };
174
773
  }
175
774
 
176
775
  // src/extensions/documents-save/hooks/use-document-save-template-props.ts
177
- import { __ as __4 } from "@wordpress/i18n";
776
+ import { __ as __7 } from "@wordpress/i18n";
178
777
  import { FolderIcon } from "@elementor/icons";
179
778
  import { __useActiveDocumentActions as useActiveDocumentActions2 } from "@elementor/editor-documents";
180
779
  function useDocumentSaveTemplateProps() {
181
780
  const { saveTemplate } = useActiveDocumentActions2();
182
781
  return {
183
782
  icon: FolderIcon,
184
- title: __4("Save as Template", "elementor"),
783
+ title: __7("Save as Template", "elementor"),
185
784
  onClick: saveTemplate
186
785
  };
187
786
  }
188
787
 
189
788
  // src/extensions/documents-save/hooks/use-document-view-page-props.ts
190
- import { __ as __5 } from "@wordpress/i18n";
789
+ import { __ as __8 } from "@wordpress/i18n";
191
790
  import { EyeIcon as EyeIcon2 } from "@elementor/icons";
192
- import { __useActiveDocument as useActiveDocument4 } from "@elementor/editor-documents";
791
+ import { __useActiveDocument as useActiveDocument5 } from "@elementor/editor-documents";
193
792
  import { __privateRunCommand as runCommand2 } from "@elementor/editor-v1-adapters";
194
793
  function useDocumentViewPageProps() {
195
- const document2 = useActiveDocument4();
794
+ const document2 = useActiveDocument5();
196
795
  return {
197
796
  icon: EyeIcon2,
198
- title: __5("View Page", "elementor"),
797
+ title: __8("View Page", "elementor"),
199
798
  onClick: () => document2?.id && runCommand2("editor/documents/view", {
200
799
  id: document2.id
201
800
  })
@@ -203,15 +802,14 @@ function useDocumentViewPageProps() {
203
802
  }
204
803
 
205
804
  // src/extensions/documents-save/components/primary-action.tsx
206
- import * as React3 from "react";
207
- import { __ as __6 } from "@wordpress/i18n";
805
+ import * as React25 from "react";
806
+ import { __ as __9 } from "@wordpress/i18n";
208
807
 
209
808
  // src/extensions/documents-save/components/primary-action-menu.tsx
210
- import * as React2 from "react";
211
- import { Divider, styled } from "@elementor/ui";
212
- import { __privatePopoverMenu as PopoverMenu } from "@elementor/editor-app-bar-ui";
213
- var { useMenuItems } = documentOptionsMenu;
214
- var StyledPopoverMenu = styled(PopoverMenu)`
809
+ import * as React24 from "react";
810
+ import { Divider as Divider4, styled as styled2 } from "@elementor/ui";
811
+ var { useMenuItems: useMenuItems5 } = documentOptionsMenu;
812
+ var StyledPopoverMenu = styled2(PopoverMenu)`
215
813
  & > .MuiPopover-paper > .MuiList-root {
216
814
  & > .MuiDivider-root {
217
815
  display: none;
@@ -223,8 +821,8 @@ var StyledPopoverMenu = styled(PopoverMenu)`
223
821
  }
224
822
  `;
225
823
  function PrimaryActionMenu(props) {
226
- const { save: saveActions, default: defaultActions } = useMenuItems();
227
- return /* @__PURE__ */ React2.createElement(
824
+ const { save: saveActions, default: defaultActions } = useMenuItems5();
825
+ return /* @__PURE__ */ React24.createElement(
228
826
  StyledPopoverMenu,
229
827
  {
230
828
  ...props,
@@ -241,37 +839,37 @@ function PrimaryActionMenu(props) {
241
839
  sx: { mt: 0.5 }
242
840
  }
243
841
  },
244
- saveActions.map(({ MenuItem, id }, index) => [
245
- index > 0 && /* @__PURE__ */ React2.createElement(Divider, { key: `${id}-divider` }),
246
- /* @__PURE__ */ React2.createElement(MenuItem, { key: id })
842
+ saveActions.map(({ MenuItem: MenuItem2, id }, index) => [
843
+ index > 0 && /* @__PURE__ */ React24.createElement(Divider4, { key: `${id}-divider` }),
844
+ /* @__PURE__ */ React24.createElement(MenuItem2, { key: id })
247
845
  ]),
248
- saveActions.length > 0 && defaultActions.length > 0 && /* @__PURE__ */ React2.createElement(Divider, null),
249
- defaultActions.map(({ MenuItem, id }, index) => [
250
- index > 0 && /* @__PURE__ */ React2.createElement(Divider, { key: `${id}-divider` }),
251
- /* @__PURE__ */ React2.createElement(MenuItem, { key: id })
846
+ saveActions.length > 0 && defaultActions.length > 0 && /* @__PURE__ */ React24.createElement(Divider4, null),
847
+ defaultActions.map(({ MenuItem: MenuItem2, id }, index) => [
848
+ index > 0 && /* @__PURE__ */ React24.createElement(Divider4, { key: `${id}-divider` }),
849
+ /* @__PURE__ */ React24.createElement(MenuItem2, { key: id })
252
850
  ])
253
851
  );
254
852
  }
255
853
 
256
854
  // src/extensions/documents-save/components/primary-action.tsx
257
855
  import {
258
- bindMenu,
259
- bindTrigger,
260
- Box as Box2,
856
+ bindMenu as bindMenu5,
857
+ bindTrigger as bindTrigger5,
858
+ Box as Box5,
261
859
  Button,
262
860
  ButtonGroup,
263
861
  CircularProgress,
264
- Tooltip as Tooltip2,
265
- usePopupState
862
+ Tooltip as Tooltip4,
863
+ usePopupState as usePopupState5
266
864
  } from "@elementor/ui";
267
- import { __useActiveDocument as useActiveDocument5, __useActiveDocumentActions as useActiveDocumentActions3 } from "@elementor/editor-documents";
865
+ import { __useActiveDocument as useActiveDocument6, __useActiveDocumentActions as useActiveDocumentActions3 } from "@elementor/editor-documents";
268
866
  import { ChevronDownIcon } from "@elementor/icons";
269
867
  import { __privateUseIsPreviewMode as useIsPreviewMode } from "@elementor/editor-v1-adapters";
270
868
  function PrimaryAction() {
271
- const document2 = useActiveDocument5();
869
+ const document2 = useActiveDocument6();
272
870
  const { save } = useActiveDocumentActions3();
273
871
  const isPreviewMode = useIsPreviewMode();
274
- const popupState = usePopupState({
872
+ const popupState = usePopupState5({
275
873
  variant: "popover",
276
874
  popupId: "document-save-options"
277
875
  });
@@ -281,7 +879,7 @@ function PrimaryAction() {
281
879
  const isPublishDisabled = isPreviewMode || !isPublishEnabled(document2);
282
880
  const isSaveOptionsDisabled = isPreviewMode || document2.type.value === "kit";
283
881
  const shouldShowSpinner = document2.isSaving && !isPublishDisabled;
284
- return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(ButtonGroup, { size: "large", variant: "contained" }, /* @__PURE__ */ React3.createElement(
882
+ return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(ButtonGroup, { size: "large", variant: "contained" }, /* @__PURE__ */ React25.createElement(
285
883
  Button,
286
884
  {
287
885
  onClick: () => {
@@ -312,11 +910,11 @@ function PrimaryAction() {
312
910
  },
313
911
  disabled: isPublishDisabled
314
912
  },
315
- shouldShowSpinner ? /* @__PURE__ */ React3.createElement(CircularProgress, { color: "inherit", size: "1.5em" }) : getLabel(document2)
316
- ), /* @__PURE__ */ React3.createElement(
317
- Tooltip2,
913
+ shouldShowSpinner ? /* @__PURE__ */ React25.createElement(CircularProgress, { color: "inherit", size: "1.5em" }) : getLabel(document2)
914
+ ), /* @__PURE__ */ React25.createElement(
915
+ Tooltip4,
318
916
  {
319
- title: __6("Save Options", "elementor"),
917
+ title: __9("Save Options", "elementor"),
320
918
  PopperProps: {
321
919
  sx: {
322
920
  "&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
@@ -326,21 +924,21 @@ function PrimaryAction() {
326
924
  }
327
925
  }
328
926
  },
329
- /* @__PURE__ */ React3.createElement(Box2, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React3.createElement(
927
+ /* @__PURE__ */ React25.createElement(Box5, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React25.createElement(
330
928
  Button,
331
929
  {
332
930
  size: "small",
333
- ...bindTrigger(popupState),
931
+ ...bindTrigger5(popupState),
334
932
  sx: { px: 0, height: "100%", borderRadius: 0 },
335
933
  disabled: isSaveOptionsDisabled,
336
- "aria-label": __6("Save Options", "elementor")
934
+ "aria-label": __9("Save Options", "elementor")
337
935
  },
338
- /* @__PURE__ */ React3.createElement(ChevronDownIcon, null)
936
+ /* @__PURE__ */ React25.createElement(ChevronDownIcon, null)
339
937
  ))
340
- )), /* @__PURE__ */ React3.createElement(PrimaryActionMenu, { ...bindMenu(popupState), onClick: popupState.close }));
938
+ )), /* @__PURE__ */ React25.createElement(PrimaryActionMenu, { ...bindMenu5(popupState), onClick: popupState.close }));
341
939
  }
342
940
  function getLabel(document2) {
343
- return document2.userCan.publish ? __6("Publish", "elementor") : __6("Submit", "elementor");
941
+ return document2.userCan.publish ? __9("Publish", "elementor") : __9("Submit", "elementor");
344
942
  }
345
943
  function isPublishEnabled(document2) {
346
944
  if (document2.type.value === "kit") {
@@ -350,15 +948,15 @@ function isPublishEnabled(document2) {
350
948
  }
351
949
 
352
950
  // src/extensions/documents-save/hooks/use-document-copy-and-share-props.ts
353
- import { __ as __7 } from "@wordpress/i18n";
951
+ import { __ as __10 } from "@wordpress/i18n";
354
952
  import { LinkIcon } from "@elementor/icons";
355
- import { __useActiveDocument as useActiveDocument6, __useActiveDocumentActions as useActiveDocumentActions4 } from "@elementor/editor-documents";
953
+ import { __useActiveDocument as useActiveDocument7, __useActiveDocumentActions as useActiveDocumentActions4 } from "@elementor/editor-documents";
356
954
  function useDocumentCopyAndShareProps() {
357
- const document2 = useActiveDocument6();
955
+ const document2 = useActiveDocument7();
358
956
  const { copyAndShare } = useActiveDocumentActions4();
359
957
  return {
360
958
  icon: LinkIcon,
361
- title: __7("Copy and Share", "elementor"),
959
+ title: __10("Copy and Share", "elementor"),
362
960
  onClick: copyAndShare,
363
961
  disabled: !document2 || document2.isSaving || document2.isSavingDraft || !("publish" === document2.status.value),
364
962
  visible: document2?.permissions?.showCopyAndShare
@@ -396,11 +994,11 @@ function init3() {
396
994
  }
397
995
 
398
996
  // src/extensions/elements/sync/sync-panel-title.ts
399
- import { __ as __8 } from "@wordpress/i18n";
997
+ import { __ as __11 } from "@wordpress/i18n";
400
998
  import { __privateIsRouteActive as isRouteActive, __privateListenTo as listenTo2, routeOpenEvent as routeOpenEvent2, v1ReadyEvent } from "@elementor/editor-v1-adapters";
401
999
  function syncPanelTitle() {
402
- const panelTitle = __8("Elements", "elementor");
403
- const tabTitle = __8("Widgets", "elementor");
1000
+ const panelTitle = __11("Elements", "elementor");
1001
+ const tabTitle = __11("Widgets", "elementor");
404
1002
  listenTo2(
405
1003
  routeOpenEvent2("panel/elements"),
406
1004
  () => {
@@ -428,17 +1026,14 @@ function setTabTitle(title) {
428
1026
  }
429
1027
  }
430
1028
 
431
- // src/extensions/elements/index.ts
432
- import { __privateToolsMenu as toolsMenu } from "@elementor/editor-app-bar-ui";
433
-
434
1029
  // src/extensions/elements/hooks/use-action-props.ts
435
1030
  import { PlusIcon } from "@elementor/icons";
436
- import { __ as __9 } from "@wordpress/i18n";
1031
+ import { __ as __12 } from "@wordpress/i18n";
437
1032
  import { __privateOpenRoute as openRoute3, __privateUseRouteStatus as useRouteStatus2 } from "@elementor/editor-v1-adapters";
438
1033
  function useActionProps2() {
439
1034
  const { isActive, isBlocked } = useRouteStatus2("panel/elements");
440
1035
  return {
441
- title: __9("Add Element", "elementor"),
1036
+ title: __12("Add Element", "elementor"),
442
1037
  icon: PlusIcon,
443
1038
  onClick: () => {
444
1039
  const extendedWindow = window;
@@ -471,11 +1066,8 @@ function init4() {
471
1066
  });
472
1067
  }
473
1068
 
474
- // src/extensions/finder/index.ts
475
- import { __privateUtilitiesMenu as utilitiesMenu2 } from "@elementor/editor-app-bar-ui";
476
-
477
1069
  // src/extensions/finder/hooks/use-action-props.ts
478
- import { __ as __10 } from "@wordpress/i18n";
1070
+ import { __ as __13 } from "@wordpress/i18n";
479
1071
  import { SearchIcon } from "@elementor/icons";
480
1072
  import { __privateRunCommand as runCommand3, __privateUseRouteStatus as useRouteStatus3 } from "@elementor/editor-v1-adapters";
481
1073
  function useActionProps3() {
@@ -484,7 +1076,7 @@ function useActionProps3() {
484
1076
  blockOnPreviewMode: false
485
1077
  });
486
1078
  return {
487
- title: __10("Finder", "elementor"),
1079
+ title: __13("Finder", "elementor"),
488
1080
  icon: SearchIcon,
489
1081
  onClick: () => {
490
1082
  const extendedWindow = window;
@@ -508,7 +1100,7 @@ function useActionProps3() {
508
1100
 
509
1101
  // src/extensions/finder/index.ts
510
1102
  function init5() {
511
- utilitiesMenu2.registerAction({
1103
+ utilitiesMenu.registerAction({
512
1104
  id: "toggle-finder",
513
1105
  priority: 10,
514
1106
  // Before help.
@@ -517,17 +1109,16 @@ function init5() {
517
1109
  }
518
1110
 
519
1111
  // src/extensions/help/index.ts
520
- import { __privateUtilitiesMenu as utilitiesMenu3 } from "@elementor/editor-app-bar-ui";
521
- import { __ as __11 } from "@wordpress/i18n";
1112
+ import { __ as __14 } from "@wordpress/i18n";
522
1113
  import { HelpIcon } from "@elementor/icons";
523
1114
  function init6() {
524
- utilitiesMenu3.registerLink({
1115
+ utilitiesMenu.registerLink({
525
1116
  id: "open-help-center",
526
1117
  priority: 20,
527
1118
  // After Finder.
528
1119
  useProps: () => {
529
1120
  return {
530
- title: __11("Help", "elementor"),
1121
+ title: __14("Help", "elementor"),
531
1122
  href: "https://go.elementor.com/editor-top-bar-learn/",
532
1123
  icon: HelpIcon,
533
1124
  target: "_blank",
@@ -551,17 +1142,14 @@ function init6() {
551
1142
  });
552
1143
  }
553
1144
 
554
- // src/extensions/history/index.ts
555
- import { __privateMainMenu as mainMenu } from "@elementor/editor-app-bar-ui";
556
-
557
1145
  // src/extensions/history/hooks/use-action-props.ts
558
1146
  import { HistoryIcon } from "@elementor/icons";
559
- import { __ as __12 } from "@wordpress/i18n";
1147
+ import { __ as __15 } from "@wordpress/i18n";
560
1148
  import { __privateOpenRoute as openRoute4, __privateUseRouteStatus as useRouteStatus4 } from "@elementor/editor-v1-adapters";
561
1149
  function useActionProps4() {
562
1150
  const { isActive, isBlocked } = useRouteStatus4("panel/history");
563
1151
  return {
564
- title: __12("History", "elementor"),
1152
+ title: __15("History", "elementor"),
565
1153
  icon: HistoryIcon,
566
1154
  onClick: () => {
567
1155
  const extendedWindow = window;
@@ -593,17 +1181,14 @@ function init7() {
593
1181
  });
594
1182
  }
595
1183
 
596
- // src/extensions/keyboard-shortcuts/index.ts
597
- import { __privateMainMenu as mainMenu2 } from "@elementor/editor-app-bar-ui";
598
-
599
1184
  // src/extensions/keyboard-shortcuts/hooks/use-action-props.ts
600
- import { __ as __13 } from "@wordpress/i18n";
1185
+ import { __ as __16 } from "@wordpress/i18n";
601
1186
  import { KeyboardIcon } from "@elementor/icons";
602
1187
  import { __privateRunCommand as runCommand4 } from "@elementor/editor-v1-adapters";
603
1188
  function useActionProps5() {
604
1189
  return {
605
1190
  icon: KeyboardIcon,
606
- title: __13("Keyboard Shortcuts", "elementor"),
1191
+ title: __16("Keyboard Shortcuts", "elementor"),
607
1192
  onClick: () => {
608
1193
  const extendedWindow = window;
609
1194
  const config = extendedWindow?.elementor?.editorEvents?.config;
@@ -625,7 +1210,7 @@ function useActionProps5() {
625
1210
 
626
1211
  // src/extensions/keyboard-shortcuts/index.ts
627
1212
  function init8() {
628
- mainMenu2.registerAction({
1213
+ mainMenu.registerAction({
629
1214
  id: "open-keyboard-shortcuts",
630
1215
  group: "default",
631
1216
  priority: 40,
@@ -638,10 +1223,10 @@ function init8() {
638
1223
  import { injectIntoTop } from "@elementor/editor";
639
1224
 
640
1225
  // src/extensions/site-settings/components/portalled-primary-action.tsx
641
- import * as React6 from "react";
1226
+ import * as React28 from "react";
642
1227
 
643
1228
  // src/extensions/site-settings/components/portal.tsx
644
- import * as React4 from "react";
1229
+ import * as React26 from "react";
645
1230
  import { Portal as BasePortal } from "@elementor/ui";
646
1231
  import { __privateIsRouteActive as isRouteActive2, routeCloseEvent, routeOpenEvent as routeOpenEvent3, __privateUseListenTo as useListenTo } from "@elementor/editor-v1-adapters";
647
1232
  function Portal(props) {
@@ -655,26 +1240,26 @@ function Portal(props) {
655
1240
  if (!containerRef.current) {
656
1241
  return null;
657
1242
  }
658
- return /* @__PURE__ */ React4.createElement(BasePortal, { container: containerRef.current, ...props });
1243
+ return /* @__PURE__ */ React26.createElement(BasePortal, { container: containerRef.current, ...props });
659
1244
  }
660
1245
  function getContainerRef() {
661
1246
  return isRouteActive2("panel/global") ? { current: document.querySelector("#elementor-panel-inner") } : { current: null };
662
1247
  }
663
1248
 
664
1249
  // src/extensions/site-settings/components/primary-action.tsx
665
- import * as React5 from "react";
666
- import { __useActiveDocument as useActiveDocument7, __useActiveDocumentActions as useActiveDocumentActions5 } from "@elementor/editor-documents";
1250
+ import * as React27 from "react";
1251
+ import { __useActiveDocument as useActiveDocument8, __useActiveDocumentActions as useActiveDocumentActions5 } from "@elementor/editor-documents";
667
1252
  import { Button as Button2, CircularProgress as CircularProgress2, Paper } from "@elementor/ui";
668
- import { __ as __14 } from "@wordpress/i18n";
1253
+ import { __ as __17 } from "@wordpress/i18n";
669
1254
  function PrimaryAction2() {
670
- const document2 = useActiveDocument7();
1255
+ const document2 = useActiveDocument8();
671
1256
  const { save } = useActiveDocumentActions5();
672
- return /* @__PURE__ */ React5.createElement(Paper, { sx: {
1257
+ return /* @__PURE__ */ React27.createElement(Paper, { sx: {
673
1258
  px: 5,
674
1259
  py: 4,
675
1260
  borderTop: 1,
676
1261
  borderColor: "divider"
677
- } }, /* @__PURE__ */ React5.createElement(
1262
+ } }, /* @__PURE__ */ React27.createElement(
678
1263
  Button2,
679
1264
  {
680
1265
  variant: "contained",
@@ -683,20 +1268,17 @@ function PrimaryAction2() {
683
1268
  sx: { width: "100%" },
684
1269
  onClick: () => document2 && !document2.isSaving ? save() : null
685
1270
  },
686
- document2?.isSaving ? /* @__PURE__ */ React5.createElement(CircularProgress2, null) : __14("Save Changes", "elementor")
1271
+ document2?.isSaving ? /* @__PURE__ */ React27.createElement(CircularProgress2, null) : __17("Save Changes", "elementor")
687
1272
  ));
688
1273
  }
689
1274
 
690
1275
  // src/extensions/site-settings/components/portalled-primary-action.tsx
691
1276
  function PortalledPrimaryAction() {
692
- return /* @__PURE__ */ React6.createElement(Portal, null, /* @__PURE__ */ React6.createElement(PrimaryAction2, null));
1277
+ return /* @__PURE__ */ React28.createElement(Portal, null, /* @__PURE__ */ React28.createElement(PrimaryAction2, null));
693
1278
  }
694
1279
 
695
- // src/extensions/site-settings/index.ts
696
- import { __privateToolsMenu as toolsMenu2 } from "@elementor/editor-app-bar-ui";
697
-
698
1280
  // src/extensions/site-settings/hooks/use-action-props.ts
699
- import { __ as __15 } from "@wordpress/i18n";
1281
+ import { __ as __18 } from "@wordpress/i18n";
700
1282
  import { __privateRunCommand as runCommand5, __privateUseRouteStatus as useRouteStatus5 } from "@elementor/editor-v1-adapters";
701
1283
  import { AdjustmentsHorizontalIcon } from "@elementor/icons";
702
1284
  function useActionProps6() {
@@ -704,7 +1286,7 @@ function useActionProps6() {
704
1286
  blockOnKitRoutes: false
705
1287
  });
706
1288
  return {
707
- title: __15("Site Settings", "elementor"),
1289
+ title: __18("Site Settings", "elementor"),
708
1290
  icon: AdjustmentsHorizontalIcon,
709
1291
  onClick: () => {
710
1292
  const extendedWindow = window;
@@ -737,24 +1319,21 @@ function init9() {
737
1319
  id: "site-settings-primary-action-portal",
738
1320
  component: PortalledPrimaryAction
739
1321
  });
740
- toolsMenu2.registerToggleAction({
1322
+ toolsMenu.registerToggleAction({
741
1323
  id: "toggle-site-settings",
742
1324
  priority: 2,
743
1325
  useProps: useActionProps6
744
1326
  });
745
1327
  }
746
1328
 
747
- // src/extensions/structure/index.ts
748
- import { __privateToolsMenu as toolsMenu3 } from "@elementor/editor-app-bar-ui";
749
-
750
1329
  // src/extensions/structure/hooks/use-action-props.ts
751
- import { __ as __16 } from "@wordpress/i18n";
1330
+ import { __ as __19 } from "@wordpress/i18n";
752
1331
  import { __privateRunCommand as runCommand6, __privateUseRouteStatus as useRouteStatus6 } from "@elementor/editor-v1-adapters";
753
1332
  import { StructureIcon } from "@elementor/icons";
754
1333
  function useActionProps7() {
755
1334
  const { isActive, isBlocked } = useRouteStatus6("navigator");
756
1335
  return {
757
- title: __16("Structure", "elementor"),
1336
+ title: __19("Structure", "elementor"),
758
1337
  icon: StructureIcon,
759
1338
  onClick: () => {
760
1339
  const extendedWindow = window;
@@ -779,24 +1358,21 @@ function useActionProps7() {
779
1358
 
780
1359
  // src/extensions/structure/index.ts
781
1360
  function init10() {
782
- toolsMenu3.registerToggleAction({
1361
+ toolsMenu.registerToggleAction({
783
1362
  id: "toggle-structure-view",
784
1363
  priority: 3,
785
1364
  useProps: useActionProps7
786
1365
  });
787
1366
  }
788
1367
 
789
- // src/extensions/theme-builder/index.ts
790
- import { __privateMainMenu as mainMenu3 } from "@elementor/editor-app-bar-ui";
791
-
792
1368
  // src/extensions/theme-builder/hooks/use-action-props.ts
793
- import { __ as __17 } from "@wordpress/i18n";
1369
+ import { __ as __20 } from "@wordpress/i18n";
794
1370
  import { ThemeBuilderIcon } from "@elementor/icons";
795
1371
  import { __privateRunCommand as runCommand7 } from "@elementor/editor-v1-adapters";
796
1372
  function useActionProps8() {
797
1373
  return {
798
1374
  icon: ThemeBuilderIcon,
799
- title: __17("Theme Builder", "elementor"),
1375
+ title: __20("Theme Builder", "elementor"),
800
1376
  onClick: () => {
801
1377
  const extendedWindow = window;
802
1378
  const config = extendedWindow?.elementor?.editorEvents?.config;
@@ -818,24 +1394,21 @@ function useActionProps8() {
818
1394
 
819
1395
  // src/extensions/theme-builder/index.ts
820
1396
  function init11() {
821
- mainMenu3.registerAction({
1397
+ mainMenu.registerAction({
822
1398
  id: "open-theme-builder",
823
1399
  useProps: useActionProps8
824
1400
  });
825
1401
  }
826
1402
 
827
- // src/extensions/user-preferences/index.ts
828
- import { __privateMainMenu as mainMenu4 } from "@elementor/editor-app-bar-ui";
829
-
830
1403
  // src/extensions/user-preferences/hooks/use-action-props.ts
831
- import { __ as __18 } from "@wordpress/i18n";
1404
+ import { __ as __21 } from "@wordpress/i18n";
832
1405
  import { ToggleRightIcon } from "@elementor/icons";
833
1406
  import { __privateOpenRoute as openRoute5, __privateUseRouteStatus as useRouteStatus7 } from "@elementor/editor-v1-adapters";
834
1407
  function useActionProps9() {
835
1408
  const { isActive, isBlocked } = useRouteStatus7("panel/editor-preferences");
836
1409
  return {
837
1410
  icon: ToggleRightIcon,
838
- title: __18("User Preferences", "elementor"),
1411
+ title: __21("User Preferences", "elementor"),
839
1412
  onClick: () => {
840
1413
  const extendedWindow = window;
841
1414
  const config = extendedWindow?.elementor?.editorEvents?.config;
@@ -859,7 +1432,7 @@ function useActionProps9() {
859
1432
 
860
1433
  // src/extensions/user-preferences/index.ts
861
1434
  function init12() {
862
- mainMenu4.registerToggleAction({
1435
+ mainMenu.registerToggleAction({
863
1436
  id: "open-user-preferences",
864
1437
  priority: 30,
865
1438
  // After history.
@@ -868,18 +1441,17 @@ function init12() {
868
1441
  }
869
1442
 
870
1443
  // src/extensions/wordpress/index.ts
871
- import { __privateMainMenu as mainMenu5 } from "@elementor/editor-app-bar-ui";
872
- import { __ as __19 } from "@wordpress/i18n";
1444
+ import { __ as __22 } from "@wordpress/i18n";
873
1445
  import { WordpressIcon } from "@elementor/icons";
874
- import { __useActiveDocument as useActiveDocument8 } from "@elementor/editor-documents";
1446
+ import { __useActiveDocument as useActiveDocument9 } from "@elementor/editor-documents";
875
1447
  function init13() {
876
- mainMenu5.registerLink({
1448
+ mainMenu.registerLink({
877
1449
  id: "exit-to-wordpress",
878
1450
  group: "exits",
879
1451
  useProps: () => {
880
- const document2 = useActiveDocument8();
1452
+ const document2 = useActiveDocument9();
881
1453
  return {
882
- title: __19("Exit to WordPress", "elementor"),
1454
+ title: __22("Exit to WordPress", "elementor"),
883
1455
  href: document2?.links?.platformEdit,
884
1456
  icon: WordpressIcon,
885
1457
  onClick: () => {
@@ -933,12 +1505,12 @@ function init15() {
933
1505
  init15();
934
1506
  export {
935
1507
  documentOptionsMenu,
936
- __privateInjectIntoPageIndication as injectIntoPageIndication,
937
- __privateInjectIntoPrimaryAction as injectIntoPrimaryAction,
938
- __privateInjectIntoResponsive as injectIntoResponsive,
939
- __privateIntegrationsMenu as integrationsMenu,
940
- __privateMainMenu as mainMenu,
941
- __privateToolsMenu as toolsMenu,
942
- __privateUtilitiesMenu as utilitiesMenu
1508
+ injectIntoPageIndication,
1509
+ injectIntoPrimaryAction,
1510
+ injectIntoResponsive,
1511
+ integrationsMenu,
1512
+ mainMenu,
1513
+ toolsMenu,
1514
+ utilitiesMenu
943
1515
  };
944
1516
  //# sourceMappingURL=index.mjs.map