@elementor/editor-app-bar 0.20.0 → 0.22.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 (53) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/index.js +226 -226
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.mjs +245 -245
  5. package/dist/index.mjs.map +1 -1
  6. package/package.json +11 -11
  7. package/src/components/actions/action.tsx +3 -2
  8. package/src/components/actions/link.tsx +3 -2
  9. package/src/components/actions/toggle-action.tsx +2 -1
  10. package/src/components/app-bar.tsx +5 -4
  11. package/src/components/locations/integrations-menu-location.tsx +3 -2
  12. package/src/components/locations/main-menu-location.tsx +3 -2
  13. package/src/components/locations/page-indication-location.tsx +1 -0
  14. package/src/components/locations/primary-action-location.tsx +1 -0
  15. package/src/components/locations/responsive-location.tsx +1 -0
  16. package/src/components/locations/tools-menu-location.tsx +1 -0
  17. package/src/components/locations/utilities-menu-location.tsx +3 -2
  18. package/src/components/ui/popover-menu-item.tsx +1 -1
  19. package/src/components/ui/popover-menu.tsx +2 -1
  20. package/src/components/ui/toolbar-logo.tsx +1 -1
  21. package/src/components/ui/toolbar-menu-item.tsx +1 -1
  22. package/src/components/ui/toolbar-menu-more.tsx +4 -3
  23. package/src/components/ui/toolbar-menu-toggle-item.tsx +1 -1
  24. package/src/components/ui/toolbar-menu.tsx +2 -1
  25. package/src/contexts/menu-context.tsx +2 -2
  26. package/src/extensions/documents-indicator/components/settings-button.tsx +8 -7
  27. package/src/extensions/documents-preview/hooks/use-action-props.ts +5 -4
  28. package/src/extensions/documents-save/components/primary-action-menu.tsx +2 -1
  29. package/src/extensions/documents-save/components/primary-action.tsx +11 -10
  30. package/src/extensions/documents-save/hooks/use-document-copy-and-share-props.ts +4 -3
  31. package/src/extensions/documents-save/hooks/use-document-save-draft-props.ts +4 -3
  32. package/src/extensions/documents-save/hooks/use-document-save-template-props.ts +4 -3
  33. package/src/extensions/documents-save/hooks/use-document-view-page-props.ts +2 -2
  34. package/src/extensions/documents-save/index.ts +2 -2
  35. package/src/extensions/documents-save/locations.ts +1 -0
  36. package/src/extensions/elements/hooks/use-action-props.ts +4 -3
  37. package/src/extensions/elements/index.ts +1 -1
  38. package/src/extensions/elements/sync/sync-panel-title.ts +1 -1
  39. package/src/extensions/finder/hooks/use-action-props.ts +4 -3
  40. package/src/extensions/help/index.ts +4 -3
  41. package/src/extensions/history/hooks/use-action-props.ts +4 -3
  42. package/src/extensions/keyboard-shortcuts/hooks/use-action-props.ts +4 -3
  43. package/src/extensions/responsive/components/breakpoints-switcher.tsx +10 -9
  44. package/src/extensions/site-settings/components/portal.tsx +2 -2
  45. package/src/extensions/site-settings/components/portalled-primary-action.tsx +1 -0
  46. package/src/extensions/site-settings/hooks/use-action-props.ts +3 -2
  47. package/src/extensions/site-settings/index.ts +2 -1
  48. package/src/extensions/structure/hooks/use-action-props.ts +3 -2
  49. package/src/extensions/theme-builder/hooks/use-action-props.ts +4 -3
  50. package/src/extensions/user-preferences/hooks/use-action-props.ts +4 -3
  51. package/src/extensions/wordpress/index.ts +5 -4
  52. package/src/init.ts +3 -2
  53. package/src/locations.ts +1 -0
package/dist/index.mjs CHANGED
@@ -18,11 +18,51 @@ function useMenuContext() {
18
18
  return useContext(MenuContext);
19
19
  }
20
20
 
21
- // src/components/ui/toolbar-menu-item.tsx
21
+ // src/components/ui/popover-menu-item.tsx
22
22
  import * as React2 from "react";
23
+ import { ArrowUpRightIcon, ChevronRightIcon } from "@elementor/icons";
24
+ import { ListItemIcon, ListItemText, MenuItem, withDirection } from "@elementor/ui";
25
+ var DirectionalArrowIcon = withDirection(ArrowUpRightIcon);
26
+ var DirectionalChevronIcon = withDirection(ChevronRightIcon);
27
+ function PopoverMenuItem({
28
+ text,
29
+ icon,
30
+ onClick,
31
+ href,
32
+ target,
33
+ disabled,
34
+ isGroupParent,
35
+ ...props
36
+ }) {
37
+ const isExternalLink = href && target === "_blank";
38
+ return /* @__PURE__ */ React2.createElement(
39
+ MenuItem,
40
+ {
41
+ ...props,
42
+ disabled,
43
+ onClick,
44
+ component: href ? "a" : "div",
45
+ href,
46
+ target,
47
+ sx: {
48
+ "&:hover": {
49
+ color: "text.primary"
50
+ // Overriding global CSS from the editor.
51
+ }
52
+ }
53
+ },
54
+ /* @__PURE__ */ React2.createElement(ListItemIcon, null, icon),
55
+ /* @__PURE__ */ React2.createElement(ListItemText, { primary: text }),
56
+ isExternalLink && /* @__PURE__ */ React2.createElement(DirectionalArrowIcon, null),
57
+ isGroupParent && /* @__PURE__ */ React2.createElement(DirectionalChevronIcon, null)
58
+ );
59
+ }
60
+
61
+ // src/components/ui/toolbar-menu-item.tsx
62
+ import * as React3 from "react";
23
63
  import { Box, IconButton, Tooltip as BaseTooltip } from "@elementor/ui";
24
64
  function ToolbarMenuItem({ title, ...props }) {
25
- return /* @__PURE__ */ React2.createElement(Tooltip, { title }, /* @__PURE__ */ React2.createElement(Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React2.createElement(
65
+ return /* @__PURE__ */ React3.createElement(Tooltip, { title }, /* @__PURE__ */ React3.createElement(Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React3.createElement(
26
66
  IconButton,
27
67
  {
28
68
  ...props,
@@ -42,7 +82,7 @@ function ToolbarMenuItem({ title, ...props }) {
42
82
  )));
43
83
  }
44
84
  function Tooltip(props) {
45
- return /* @__PURE__ */ React2.createElement(
85
+ return /* @__PURE__ */ React3.createElement(
46
86
  BaseTooltip,
47
87
  {
48
88
  PopperProps: {
@@ -57,46 +97,6 @@ function Tooltip(props) {
57
97
  );
58
98
  }
59
99
 
60
- // src/components/ui/popover-menu-item.tsx
61
- import * as React3 from "react";
62
- import { MenuItem, ListItemText, ListItemIcon, withDirection } from "@elementor/ui";
63
- import { ArrowUpRightIcon, ChevronRightIcon } from "@elementor/icons";
64
- var DirectionalArrowIcon = withDirection(ArrowUpRightIcon);
65
- var DirectionalChevronIcon = withDirection(ChevronRightIcon);
66
- function PopoverMenuItem({
67
- text,
68
- icon,
69
- onClick,
70
- href,
71
- target,
72
- disabled,
73
- isGroupParent,
74
- ...props
75
- }) {
76
- const isExternalLink = href && target === "_blank";
77
- return /* @__PURE__ */ React3.createElement(
78
- MenuItem,
79
- {
80
- ...props,
81
- disabled,
82
- onClick,
83
- component: href ? "a" : "div",
84
- href,
85
- target,
86
- sx: {
87
- "&:hover": {
88
- color: "text.primary"
89
- // Overriding global CSS from the editor.
90
- }
91
- }
92
- },
93
- /* @__PURE__ */ React3.createElement(ListItemIcon, null, icon),
94
- /* @__PURE__ */ React3.createElement(ListItemText, { primary: text }),
95
- isExternalLink && /* @__PURE__ */ React3.createElement(DirectionalArrowIcon, null),
96
- isGroupParent && /* @__PURE__ */ React3.createElement(DirectionalChevronIcon, null)
97
- );
98
- }
99
-
100
100
  // src/components/actions/action.tsx
101
101
  function Action({ icon: Icon, title, visible = true, ...props }) {
102
102
  const { type } = useMenuContext();
@@ -184,13 +184,17 @@ var documentOptionsMenu = createMenu2({
184
184
  }
185
185
  });
186
186
 
187
+ // src/init.ts
188
+ import { injectIntoTop as injectIntoTop2 } from "@elementor/editor";
189
+
187
190
  // src/components/app-bar.tsx
188
191
  import * as React19 from "react";
192
+ import { __useActiveDocument as useActiveDocument } from "@elementor/editor-documents";
189
193
  import { AppBar as BaseAppBar, Box as Box3, Divider as Divider3, Grid, ThemeProvider, Toolbar } from "@elementor/ui";
190
194
 
191
195
  // src/components/locations/main-menu-location.tsx
192
196
  import * as React10 from "react";
193
- import { usePopupState, bindMenu, bindTrigger, Stack, Divider } from "@elementor/ui";
197
+ import { bindMenu, bindTrigger, Divider, Stack, usePopupState } from "@elementor/ui";
194
198
 
195
199
  // src/components/ui/popover-menu.tsx
196
200
  import * as React8 from "react";
@@ -215,8 +219,8 @@ function PopoverMenu({ children, popupState, ...props }) {
215
219
  // src/components/ui/toolbar-logo.tsx
216
220
  import * as React9 from "react";
217
221
  import { useState } from "react";
222
+ import { styled, SvgIcon, ToggleButton as ToggleButton2 } from "@elementor/ui";
218
223
  import { __ } from "@wordpress/i18n";
219
- import { ToggleButton as ToggleButton2, SvgIcon, styled } from "@elementor/ui";
220
224
  var ElementorLogo = (props) => {
221
225
  return /* @__PURE__ */ React9.createElement(SvgIcon, { viewBox: "0 0 32 32", ...props }, /* @__PURE__ */ React9.createElement("g", null, /* @__PURE__ */ React9.createElement("circle", { cx: "16", cy: "16", r: "16" }), /* @__PURE__ */ React9.createElement("path", { d: "M11.7 9H9V22.3H11.7V9Z" }), /* @__PURE__ */ React9.createElement("path", { d: "M22.4 9H9V11.7H22.4V9Z" }), /* @__PURE__ */ React9.createElement("path", { d: "M22.4 14.4004H9V17.1004H22.4V14.4004Z" }), /* @__PURE__ */ React9.createElement("path", { d: "M22.4 19.6992H9V22.3992H22.4V19.6992Z" })));
222
226
  };
@@ -305,34 +309,52 @@ function MainMenuLocation() {
305
309
  return /* @__PURE__ */ React10.createElement(Stack, { sx: { paddingInlineStart: 3 }, direction: "row", alignItems: "center" }, /* @__PURE__ */ React10.createElement(ToolbarLogo, { ...toolbarLogoProps, onClick: onToolbarClick, selected: popupState.isOpen }), /* @__PURE__ */ React10.createElement(PopoverMenu, { onClick: popupState.close, ...bindMenu(popupState), marginThreshold: 8 }, menuItems.default.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React10.createElement(MenuItem2, { key: id })), menuItems.exits.length > 0 && /* @__PURE__ */ React10.createElement(Divider, null), menuItems.exits.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React10.createElement(MenuItem2, { key: id }))));
306
310
  }
307
311
 
312
+ // src/components/locations/page-indication-location.tsx
313
+ import * as React11 from "react";
314
+ function PageIndicationLocation() {
315
+ return /* @__PURE__ */ React11.createElement(PageIndicationSlot, null);
316
+ }
317
+
318
+ // src/components/locations/primary-action-location.tsx
319
+ import * as React12 from "react";
320
+ function PrimaryActionLocation() {
321
+ return /* @__PURE__ */ React12.createElement(PrimaryActionSlot, null);
322
+ }
323
+
324
+ // src/components/locations/responsive-location.tsx
325
+ import * as React13 from "react";
326
+ function ResponsiveLocation() {
327
+ return /* @__PURE__ */ React13.createElement(ResponsiveSlot, null);
328
+ }
329
+
308
330
  // src/components/locations/tools-menu-location.tsx
309
- import * as React14 from "react";
331
+ import * as React17 from "react";
310
332
 
311
333
  // src/components/ui/toolbar-menu.tsx
312
- import * as React11 from "react";
334
+ import * as React14 from "react";
313
335
  import { Stack as Stack2 } from "@elementor/ui";
314
336
  function ToolbarMenu({ children, ...props }) {
315
- return /* @__PURE__ */ React11.createElement(MenuContextProvider, { type: "toolbar" }, /* @__PURE__ */ React11.createElement(Stack2, { sx: { px: 1.5 }, spacing: 1.5, direction: "row", alignItems: "center", ...props }, children));
337
+ return /* @__PURE__ */ React14.createElement(MenuContextProvider, { type: "toolbar" }, /* @__PURE__ */ React14.createElement(Stack2, { sx: { px: 1.5 }, spacing: 1.5, direction: "row", alignItems: "center", ...props }, children));
316
338
  }
317
339
 
318
340
  // src/components/ui/toolbar-menu-more.tsx
319
- import * as React12 from "react";
341
+ import * as React15 from "react";
342
+ import { DotsVerticalIcon } from "@elementor/icons";
320
343
  import { bindMenu as bindMenu2, bindTrigger as bindTrigger2, usePopupState as usePopupState2 } from "@elementor/ui";
321
344
  import { __ as __2 } from "@wordpress/i18n";
322
- import { DotsVerticalIcon } from "@elementor/icons";
323
345
  function ToolbarMenuMore({ children, id }) {
324
346
  const popupState = usePopupState2({
325
347
  variant: "popover",
326
348
  popupId: id
327
349
  });
328
- return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(ToolbarMenuItem, { ...bindTrigger2(popupState), title: __2("More", "elementor") }, /* @__PURE__ */ React12.createElement(DotsVerticalIcon, null)), /* @__PURE__ */ React12.createElement(PopoverMenu, { onClick: popupState.close, ...bindMenu2(popupState) }, children));
350
+ return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(ToolbarMenuItem, { ...bindTrigger2(popupState), title: __2("More", "elementor") }, /* @__PURE__ */ React15.createElement(DotsVerticalIcon, null)), /* @__PURE__ */ React15.createElement(PopoverMenu, { onClick: popupState.close, ...bindMenu2(popupState) }, children));
329
351
  }
330
352
 
331
353
  // src/components/locations/integrations-menu-location.tsx
332
- import * as React13 from "react";
354
+ import * as React16 from "react";
355
+ import { PlugIcon } from "@elementor/icons";
333
356
  import { bindMenu as bindMenu3, bindTrigger as bindTrigger3, usePopupState as usePopupState3 } from "@elementor/ui";
334
357
  import { __ as __3 } from "@wordpress/i18n";
335
- import { PlugIcon } from "@elementor/icons";
336
358
  var { useMenuItems: useMenuItems2 } = integrationsMenu;
337
359
  function IntegrationsMenuLocation() {
338
360
  const menuItems = useMenuItems2();
@@ -343,7 +365,7 @@ function IntegrationsMenuLocation() {
343
365
  if (menuItems.default.length === 0) {
344
366
  return null;
345
367
  }
346
- return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(ToolbarMenuItem, { ...bindTrigger3(popupState), title: __3("Integrations", "elementor") }, /* @__PURE__ */ React13.createElement(PlugIcon, null)), /* @__PURE__ */ React13.createElement(
368
+ return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(ToolbarMenuItem, { ...bindTrigger3(popupState), title: __3("Integrations", "elementor") }, /* @__PURE__ */ React16.createElement(PlugIcon, null)), /* @__PURE__ */ React16.createElement(
347
369
  PopoverMenu,
348
370
  {
349
371
  onClick: popupState.close,
@@ -351,7 +373,7 @@ function IntegrationsMenuLocation() {
351
373
  marginThreshold: 8,
352
374
  open: popupState.isOpen
353
375
  },
354
- menuItems.default.map(({ MenuItem: IntegrationsMenuItem, id }) => /* @__PURE__ */ React13.createElement(IntegrationsMenuItem, { key: id }))
376
+ menuItems.default.map(({ MenuItem: IntegrationsMenuItem, id }) => /* @__PURE__ */ React16.createElement(IntegrationsMenuItem, { key: id }))
355
377
  ));
356
378
  }
357
379
 
@@ -362,11 +384,11 @@ function ToolsMenuLocation() {
362
384
  const menuItems = useMenuItems3();
363
385
  const toolbarMenuItems = menuItems.default.slice(0, MAX_TOOLBAR_ACTIONS);
364
386
  const popoverMenuItems = menuItems.default.slice(MAX_TOOLBAR_ACTIONS);
365
- return /* @__PURE__ */ React14.createElement(ToolbarMenu, null, toolbarMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React14.createElement(MenuItem2, { key: id })), /* @__PURE__ */ React14.createElement(IntegrationsMenuLocation, null), popoverMenuItems.length > 0 && /* @__PURE__ */ React14.createElement(ToolbarMenuMore, { id: "elementor-editor-app-bar-tools-more" }, popoverMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React14.createElement(MenuItem2, { key: id }))));
387
+ 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 }))));
366
388
  }
367
389
 
368
390
  // src/components/locations/utilities-menu-location.tsx
369
- import * as React15 from "react";
391
+ import * as React18 from "react";
370
392
  import { Fragment as Fragment3 } from "react";
371
393
  import { Divider as Divider2 } from "@elementor/ui";
372
394
  var MAX_TOOLBAR_ACTIONS2 = 4;
@@ -376,62 +398,28 @@ function UtilitiesMenuLocation() {
376
398
  const shouldUsePopover = menuItems.default.length > MAX_TOOLBAR_ACTIONS2 + 1;
377
399
  const toolbarMenuItems = shouldUsePopover ? menuItems.default.slice(0, MAX_TOOLBAR_ACTIONS2) : menuItems.default;
378
400
  const popoverMenuItems = shouldUsePopover ? menuItems.default.slice(MAX_TOOLBAR_ACTIONS2) : [];
379
- return /* @__PURE__ */ React15.createElement(ToolbarMenu, null, toolbarMenuItems.map(({ MenuItem: MenuItem2, id }, index) => /* @__PURE__ */ React15.createElement(Fragment3, { key: id }, index === 0 && /* @__PURE__ */ React15.createElement(Divider2, { orientation: "vertical" }), /* @__PURE__ */ React15.createElement(MenuItem2, null))), popoverMenuItems.length > 0 && /* @__PURE__ */ React15.createElement(ToolbarMenuMore, { id: "elementor-editor-app-bar-utilities-more" }, popoverMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React15.createElement(MenuItem2, { key: id }))));
380
- }
381
-
382
- // src/components/locations/primary-action-location.tsx
383
- import * as React16 from "react";
384
- function PrimaryActionLocation() {
385
- return /* @__PURE__ */ React16.createElement(PrimaryActionSlot, null);
386
- }
387
-
388
- // src/components/locations/page-indication-location.tsx
389
- import * as React17 from "react";
390
- function PageIndicationLocation() {
391
- return /* @__PURE__ */ React17.createElement(PageIndicationSlot, null);
392
- }
393
-
394
- // src/components/locations/responsive-location.tsx
395
- import * as React18 from "react";
396
- function ResponsiveLocation() {
397
- return /* @__PURE__ */ React18.createElement(ResponsiveSlot, null);
401
+ return /* @__PURE__ */ React18.createElement(ToolbarMenu, null, toolbarMenuItems.map(({ MenuItem: MenuItem2, id }, index) => /* @__PURE__ */ React18.createElement(Fragment3, { key: id }, index === 0 && /* @__PURE__ */ React18.createElement(Divider2, { orientation: "vertical" }), /* @__PURE__ */ React18.createElement(MenuItem2, null))), 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 }))));
398
402
  }
399
403
 
400
404
  // src/components/app-bar.tsx
401
- import { __useActiveDocument as useActiveDocument } from "@elementor/editor-documents";
402
405
  function AppBar() {
403
406
  const document2 = useActiveDocument();
404
407
  return /* @__PURE__ */ React19.createElement(ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React19.createElement(BaseAppBar, { position: "sticky" }, /* @__PURE__ */ React19.createElement(Toolbar, { disableGutters: true, variant: "dense" }, /* @__PURE__ */ React19.createElement(Box3, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)", flexGrow: 1 }, /* @__PURE__ */ React19.createElement(Grid, { container: true }, /* @__PURE__ */ React19.createElement(MainMenuLocation, null), document2?.permissions?.allowAddingWidgets && /* @__PURE__ */ React19.createElement(ToolsMenuLocation, null)), /* @__PURE__ */ React19.createElement(Grid, { container: true, justifyContent: "center" }, /* @__PURE__ */ React19.createElement(ToolbarMenu, { spacing: 1.5 }, /* @__PURE__ */ React19.createElement(Divider3, { orientation: "vertical" }), /* @__PURE__ */ React19.createElement(PageIndicationLocation, null), /* @__PURE__ */ React19.createElement(Divider3, { orientation: "vertical" }), /* @__PURE__ */ React19.createElement(ResponsiveLocation, null), /* @__PURE__ */ React19.createElement(Divider3, { orientation: "vertical" }))), /* @__PURE__ */ React19.createElement(Grid, { container: true, justifyContent: "flex-end" }, /* @__PURE__ */ React19.createElement(UtilitiesMenuLocation, null), /* @__PURE__ */ React19.createElement(PrimaryActionLocation, null))))));
405
408
  }
406
409
 
407
- // src/init.ts
408
- import { injectIntoTop as injectIntoTop2 } from "@elementor/editor";
409
-
410
- // src/sync/redirect-old-menus.ts
411
- import {
412
- __privateListenTo as listenTo,
413
- __privateOpenRoute as openRoute,
414
- routeOpenEvent
415
- } from "@elementor/editor-v1-adapters";
416
- function redirectOldMenus() {
417
- listenTo(routeOpenEvent("panel/menu"), () => {
418
- openRoute("panel/elements/categories");
419
- });
420
- }
421
-
422
410
  // src/extensions/documents-indicator/components/settings-button.tsx
423
411
  import * as React20 from "react";
424
- import { Box as Box4, ToggleButton as ToggleButton3, Tooltip as BaseTooltip2 } from "@elementor/ui";
425
- import { __ as __4 } from "@wordpress/i18n";
426
- import {
427
- __privateOpenRoute as openRoute2,
428
- __privateUseRouteStatus as useRouteStatus
429
- } from "@elementor/editor-v1-adapters";
430
- import { SettingsIcon } from "@elementor/icons";
431
412
  import {
432
413
  __useActiveDocument as useActiveDocument2,
433
414
  __useHostDocument as useHostDocument
434
415
  } from "@elementor/editor-documents";
416
+ import {
417
+ __privateOpenRoute as openRoute,
418
+ __privateUseRouteStatus as useRouteStatus
419
+ } from "@elementor/editor-v1-adapters";
420
+ import { SettingsIcon } from "@elementor/icons";
421
+ import { Box as Box4, ToggleButton as ToggleButton3, Tooltip as BaseTooltip2 } from "@elementor/ui";
422
+ import { __ as __4 } from "@wordpress/i18n";
435
423
  function SettingsButton() {
436
424
  const activeDocument = useActiveDocument2();
437
425
  const hostDocument = useHostDocument();
@@ -458,7 +446,7 @@ function SettingsButton() {
458
446
  element: config.elements.buttonIcon
459
447
  });
460
448
  }
461
- openRoute2("panel/page-settings/settings");
449
+ openRoute("panel/page-settings/settings");
462
450
  },
463
451
  "aria-label": title,
464
452
  size: "small",
@@ -503,10 +491,10 @@ function init() {
503
491
  }
504
492
 
505
493
  // src/extensions/documents-preview/hooks/use-action-props.ts
506
- import { __ as __5 } from "@wordpress/i18n";
507
- import { EyeIcon } from "@elementor/icons";
508
- import { __privateRunCommand as runCommand } from "@elementor/editor-v1-adapters";
509
494
  import { __useActiveDocument as useActiveDocument3 } from "@elementor/editor-documents";
495
+ import { __privateRunCommand as runCommand } from "@elementor/editor-v1-adapters";
496
+ import { EyeIcon } from "@elementor/icons";
497
+ import { __ as __5 } from "@wordpress/i18n";
510
498
  function useActionProps() {
511
499
  const document2 = useActiveDocument3();
512
500
  return {
@@ -543,56 +531,25 @@ function init2() {
543
531
  });
544
532
  }
545
533
 
546
- // src/extensions/documents-save/hooks/use-document-save-draft-props.ts
547
- import { __ as __6 } from "@wordpress/i18n";
548
- import { FileReportIcon } from "@elementor/icons";
534
+ // src/extensions/documents-save/components/primary-action.tsx
535
+ import * as React22 from "react";
549
536
  import {
550
537
  __useActiveDocument as useActiveDocument4,
551
538
  __useActiveDocumentActions as useActiveDocumentActions
552
539
  } from "@elementor/editor-documents";
553
- function useDocumentSaveDraftProps() {
554
- const document2 = useActiveDocument4();
555
- const { saveDraft } = useActiveDocumentActions();
556
- return {
557
- icon: FileReportIcon,
558
- title: __6("Save Draft", "elementor"),
559
- onClick: saveDraft,
560
- disabled: !document2 || document2.isSaving || document2.isSavingDraft || !document2.isDirty
561
- };
562
- }
563
-
564
- // src/extensions/documents-save/hooks/use-document-save-template-props.ts
565
- import { __ as __7 } from "@wordpress/i18n";
566
- import { FolderIcon } from "@elementor/icons";
567
- import { __useActiveDocumentActions as useActiveDocumentActions2 } from "@elementor/editor-documents";
568
- function useDocumentSaveTemplateProps() {
569
- const { saveTemplate } = useActiveDocumentActions2();
570
- return {
571
- icon: FolderIcon,
572
- title: __7("Save as Template", "elementor"),
573
- onClick: saveTemplate
574
- };
575
- }
576
-
577
- // src/extensions/documents-save/hooks/use-document-view-page-props.ts
578
- import { __ as __8 } from "@wordpress/i18n";
579
- import { EyeIcon as EyeIcon2 } from "@elementor/icons";
580
- import { __useActiveDocument as useActiveDocument5 } from "@elementor/editor-documents";
581
- import { __privateRunCommand as runCommand2 } from "@elementor/editor-v1-adapters";
582
- function useDocumentViewPageProps() {
583
- const document2 = useActiveDocument5();
584
- return {
585
- icon: EyeIcon2,
586
- title: __8("View Page", "elementor"),
587
- onClick: () => document2?.id && runCommand2("editor/documents/view", {
588
- id: document2.id
589
- })
590
- };
591
- }
592
-
593
- // src/extensions/documents-save/components/primary-action.tsx
594
- import * as React22 from "react";
595
- import { __ as __9 } from "@wordpress/i18n";
540
+ import { __privateUseIsPreviewMode as useIsPreviewMode } from "@elementor/editor-v1-adapters";
541
+ import { ChevronDownIcon } from "@elementor/icons";
542
+ import {
543
+ bindMenu as bindMenu4,
544
+ bindTrigger as bindTrigger4,
545
+ Box as Box5,
546
+ Button,
547
+ ButtonGroup,
548
+ CircularProgress,
549
+ Tooltip as Tooltip4,
550
+ usePopupState as usePopupState4
551
+ } from "@elementor/ui";
552
+ import { __ as __6 } from "@wordpress/i18n";
596
553
 
597
554
  // src/extensions/documents-save/components/primary-action-menu.tsx
598
555
  import * as React21 from "react";
@@ -641,25 +598,9 @@ function PrimaryActionMenu(props) {
641
598
  }
642
599
 
643
600
  // src/extensions/documents-save/components/primary-action.tsx
644
- import {
645
- bindMenu as bindMenu4,
646
- bindTrigger as bindTrigger4,
647
- Box as Box5,
648
- Button,
649
- ButtonGroup,
650
- CircularProgress,
651
- Tooltip as Tooltip4,
652
- usePopupState as usePopupState4
653
- } from "@elementor/ui";
654
- import {
655
- __useActiveDocument as useActiveDocument6,
656
- __useActiveDocumentActions as useActiveDocumentActions3
657
- } from "@elementor/editor-documents";
658
- import { ChevronDownIcon } from "@elementor/icons";
659
- import { __privateUseIsPreviewMode as useIsPreviewMode } from "@elementor/editor-v1-adapters";
660
601
  function PrimaryAction() {
661
- const document2 = useActiveDocument6();
662
- const { save } = useActiveDocumentActions3();
602
+ const document2 = useActiveDocument4();
603
+ const { save } = useActiveDocumentActions();
663
604
  const isPreviewMode = useIsPreviewMode();
664
605
  const popupState = usePopupState4({
665
606
  variant: "popover",
@@ -703,7 +644,7 @@ function PrimaryAction() {
703
644
  ), /* @__PURE__ */ React22.createElement(
704
645
  Tooltip4,
705
646
  {
706
- title: __9("Save Options", "elementor"),
647
+ title: __6("Save Options", "elementor"),
707
648
  PopperProps: {
708
649
  sx: {
709
650
  "&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
@@ -720,14 +661,14 @@ function PrimaryAction() {
720
661
  ...bindTrigger4(popupState),
721
662
  sx: { px: 0, height: "100%", borderRadius: 0 },
722
663
  disabled: isSaveOptionsDisabled,
723
- "aria-label": __9("Save Options", "elementor")
664
+ "aria-label": __6("Save Options", "elementor")
724
665
  },
725
666
  /* @__PURE__ */ React22.createElement(ChevronDownIcon, null)
726
667
  ))
727
668
  )), /* @__PURE__ */ React22.createElement(PrimaryActionMenu, { ...bindMenu4(popupState), onClick: popupState.close }));
728
669
  }
729
670
  function getLabel(document2) {
730
- return document2.userCan.publish ? __9("Publish", "elementor") : __9("Submit", "elementor");
671
+ return document2.userCan.publish ? __6("Publish", "elementor") : __6("Submit", "elementor");
731
672
  }
732
673
  function isPublishEnabled(document2) {
733
674
  if (document2.type.value === "kit") {
@@ -737,24 +678,71 @@ function isPublishEnabled(document2) {
737
678
  }
738
679
 
739
680
  // src/extensions/documents-save/hooks/use-document-copy-and-share-props.ts
740
- import { __ as __10 } from "@wordpress/i18n";
741
- import { LinkIcon } from "@elementor/icons";
742
681
  import {
743
- __useActiveDocument as useActiveDocument7,
744
- __useActiveDocumentActions as useActiveDocumentActions4
682
+ __useActiveDocument as useActiveDocument5,
683
+ __useActiveDocumentActions as useActiveDocumentActions2
745
684
  } from "@elementor/editor-documents";
685
+ import { LinkIcon } from "@elementor/icons";
686
+ import { __ as __7 } from "@wordpress/i18n";
746
687
  function useDocumentCopyAndShareProps() {
747
- const document2 = useActiveDocument7();
748
- const { copyAndShare } = useActiveDocumentActions4();
688
+ const document2 = useActiveDocument5();
689
+ const { copyAndShare } = useActiveDocumentActions2();
749
690
  return {
750
691
  icon: LinkIcon,
751
- title: __10("Copy and Share", "elementor"),
692
+ title: __7("Copy and Share", "elementor"),
752
693
  onClick: copyAndShare,
753
694
  disabled: !document2 || document2.isSaving || document2.isSavingDraft || !("publish" === document2.status.value),
754
695
  visible: document2?.permissions?.showCopyAndShare
755
696
  };
756
697
  }
757
698
 
699
+ // src/extensions/documents-save/hooks/use-document-save-draft-props.ts
700
+ import {
701
+ __useActiveDocument as useActiveDocument6,
702
+ __useActiveDocumentActions as useActiveDocumentActions3
703
+ } from "@elementor/editor-documents";
704
+ import { FileReportIcon } from "@elementor/icons";
705
+ import { __ as __8 } from "@wordpress/i18n";
706
+ function useDocumentSaveDraftProps() {
707
+ const document2 = useActiveDocument6();
708
+ const { saveDraft } = useActiveDocumentActions3();
709
+ return {
710
+ icon: FileReportIcon,
711
+ title: __8("Save Draft", "elementor"),
712
+ onClick: saveDraft,
713
+ disabled: !document2 || document2.isSaving || document2.isSavingDraft || !document2.isDirty
714
+ };
715
+ }
716
+
717
+ // src/extensions/documents-save/hooks/use-document-save-template-props.ts
718
+ import { __useActiveDocumentActions as useActiveDocumentActions4 } from "@elementor/editor-documents";
719
+ import { FolderIcon } from "@elementor/icons";
720
+ import { __ as __9 } from "@wordpress/i18n";
721
+ function useDocumentSaveTemplateProps() {
722
+ const { saveTemplate } = useActiveDocumentActions4();
723
+ return {
724
+ icon: FolderIcon,
725
+ title: __9("Save as Template", "elementor"),
726
+ onClick: saveTemplate
727
+ };
728
+ }
729
+
730
+ // src/extensions/documents-save/hooks/use-document-view-page-props.ts
731
+ import { __useActiveDocument as useActiveDocument7 } from "@elementor/editor-documents";
732
+ import { __privateRunCommand as runCommand2 } from "@elementor/editor-v1-adapters";
733
+ import { EyeIcon as EyeIcon2 } from "@elementor/icons";
734
+ import { __ as __10 } from "@wordpress/i18n";
735
+ function useDocumentViewPageProps() {
736
+ const document2 = useActiveDocument7();
737
+ return {
738
+ icon: EyeIcon2,
739
+ title: __10("View Page", "elementor"),
740
+ onClick: () => document2?.id && runCommand2("editor/documents/view", {
741
+ id: document2.id
742
+ })
743
+ };
744
+ }
745
+
758
746
  // src/extensions/documents-save/index.ts
759
747
  function init3() {
760
748
  injectIntoPrimaryAction({
@@ -785,49 +773,17 @@ function init3() {
785
773
  });
786
774
  }
787
775
 
788
- // src/extensions/elements/sync/sync-panel-title.ts
789
- import { __ as __11 } from "@wordpress/i18n";
790
- import {
791
- __privateIsRouteActive as isRouteActive,
792
- __privateListenTo as listenTo2,
793
- routeOpenEvent as routeOpenEvent2,
794
- v1ReadyEvent
795
- } from "@elementor/editor-v1-adapters";
796
- function syncPanelTitle() {
797
- const panelTitle = __11("Elements", "elementor");
798
- const tabTitle = __11("Widgets", "elementor");
799
- listenTo2(routeOpenEvent2("panel/elements"), () => {
800
- setPanelTitle(panelTitle);
801
- setTabTitle(tabTitle);
802
- });
803
- listenTo2(v1ReadyEvent(), () => {
804
- if (isRouteActive("panel/elements")) {
805
- setPanelTitle(panelTitle);
806
- setTabTitle(tabTitle);
807
- }
808
- });
809
- }
810
- function setPanelTitle(title) {
811
- window.elementor?.getPanelView?.()?.getHeaderView?.()?.setTitle?.(title);
812
- }
813
- function setTabTitle(title) {
814
- const tab = document.querySelector('.elementor-component-tab[data-tab="categories"]');
815
- if (tab) {
816
- tab.textContent = title;
817
- }
818
- }
819
-
820
776
  // src/extensions/elements/hooks/use-action-props.ts
821
- import { PlusIcon } from "@elementor/icons";
822
- import { __ as __12 } from "@wordpress/i18n";
823
777
  import {
824
- __privateOpenRoute as openRoute3,
778
+ __privateOpenRoute as openRoute2,
825
779
  __privateUseRouteStatus as useRouteStatus2
826
780
  } from "@elementor/editor-v1-adapters";
781
+ import { PlusIcon } from "@elementor/icons";
782
+ import { __ as __11 } from "@wordpress/i18n";
827
783
  function useActionProps2() {
828
784
  const { isActive, isBlocked } = useRouteStatus2("panel/elements");
829
785
  return {
830
- title: __12("Add Element", "elementor"),
786
+ title: __11("Add Element", "elementor"),
831
787
  icon: PlusIcon,
832
788
  onClick: () => {
833
789
  const extendedWindow = window;
@@ -840,13 +796,45 @@ function useActionProps2() {
840
796
  element: config.elements.buttonIcon
841
797
  });
842
798
  }
843
- openRoute3("panel/elements/categories");
799
+ openRoute2("panel/elements/categories");
844
800
  },
845
801
  selected: isActive,
846
802
  disabled: isBlocked
847
803
  };
848
804
  }
849
805
 
806
+ // src/extensions/elements/sync/sync-panel-title.ts
807
+ import {
808
+ __privateIsRouteActive as isRouteActive,
809
+ __privateListenTo as listenTo,
810
+ routeOpenEvent,
811
+ v1ReadyEvent
812
+ } from "@elementor/editor-v1-adapters";
813
+ import { __ as __12 } from "@wordpress/i18n";
814
+ function syncPanelTitle() {
815
+ const panelTitle = __12("Elements", "elementor");
816
+ const tabTitle = __12("Widgets", "elementor");
817
+ listenTo(routeOpenEvent("panel/elements"), () => {
818
+ setPanelTitle(panelTitle);
819
+ setTabTitle(tabTitle);
820
+ });
821
+ listenTo(v1ReadyEvent(), () => {
822
+ if (isRouteActive("panel/elements")) {
823
+ setPanelTitle(panelTitle);
824
+ setTabTitle(tabTitle);
825
+ }
826
+ });
827
+ }
828
+ function setPanelTitle(title) {
829
+ window.elementor?.getPanelView?.()?.getHeaderView?.()?.setTitle?.(title);
830
+ }
831
+ function setTabTitle(title) {
832
+ const tab = document.querySelector('.elementor-component-tab[data-tab="categories"]');
833
+ if (tab) {
834
+ tab.textContent = title;
835
+ }
836
+ }
837
+
850
838
  // src/extensions/elements/index.ts
851
839
  function init4() {
852
840
  syncPanelTitle();
@@ -858,12 +846,12 @@ function init4() {
858
846
  }
859
847
 
860
848
  // src/extensions/finder/hooks/use-action-props.ts
861
- import { __ as __13 } from "@wordpress/i18n";
862
- import { SearchIcon } from "@elementor/icons";
863
849
  import {
864
850
  __privateRunCommand as runCommand3,
865
851
  __privateUseRouteStatus as useRouteStatus3
866
852
  } from "@elementor/editor-v1-adapters";
853
+ import { SearchIcon } from "@elementor/icons";
854
+ import { __ as __13 } from "@wordpress/i18n";
867
855
  function useActionProps3() {
868
856
  const { isBlocked } = useRouteStatus3("finder", {
869
857
  blockOnKitRoutes: false,
@@ -900,8 +888,8 @@ function init5() {
900
888
  }
901
889
 
902
890
  // src/extensions/help/index.ts
903
- import { __ as __14 } from "@wordpress/i18n";
904
891
  import { HelpIcon } from "@elementor/icons";
892
+ import { __ as __14 } from "@wordpress/i18n";
905
893
  function init6() {
906
894
  utilitiesMenu.registerLink({
907
895
  id: "open-help-center",
@@ -931,12 +919,12 @@ function init6() {
931
919
  }
932
920
 
933
921
  // src/extensions/history/hooks/use-action-props.ts
934
- import { HistoryIcon } from "@elementor/icons";
935
- import { __ as __15 } from "@wordpress/i18n";
936
922
  import {
937
- __privateOpenRoute as openRoute4,
923
+ __privateOpenRoute as openRoute3,
938
924
  __privateUseRouteStatus as useRouteStatus4
939
925
  } from "@elementor/editor-v1-adapters";
926
+ import { HistoryIcon } from "@elementor/icons";
927
+ import { __ as __15 } from "@wordpress/i18n";
940
928
  function useActionProps4() {
941
929
  const { isActive, isBlocked } = useRouteStatus4("panel/history");
942
930
  return {
@@ -953,7 +941,7 @@ function useActionProps4() {
953
941
  element: config.elements.link
954
942
  });
955
943
  }
956
- openRoute4("panel/history/actions");
944
+ openRoute3("panel/history/actions");
957
945
  },
958
946
  selected: isActive,
959
947
  disabled: isBlocked
@@ -970,9 +958,9 @@ function init7() {
970
958
  }
971
959
 
972
960
  // src/extensions/keyboard-shortcuts/hooks/use-action-props.ts
973
- import { __ as __16 } from "@wordpress/i18n";
974
- import { KeyboardIcon } from "@elementor/icons";
975
961
  import { __privateRunCommand as runCommand4 } from "@elementor/editor-v1-adapters";
962
+ import { KeyboardIcon } from "@elementor/icons";
963
+ import { __ as __16 } from "@wordpress/i18n";
976
964
  function useActionProps5() {
977
965
  return {
978
966
  icon: KeyboardIcon,
@@ -1006,22 +994,22 @@ function init8() {
1006
994
 
1007
995
  // src/extensions/responsive/components/breakpoints-switcher.tsx
1008
996
  import * as React23 from "react";
1009
- import { __ as __17 } from "@wordpress/i18n";
1010
- import { Tab, Tabs, Tooltip as BaseTooltip3 } from "@elementor/ui";
1011
997
  import {
1012
- useBreakpoints,
1013
998
  useActivateBreakpoint,
1014
- useActiveBreakpoint
999
+ useActiveBreakpoint,
1000
+ useBreakpoints
1015
1001
  } from "@elementor/editor-responsive";
1016
1002
  import {
1017
1003
  DesktopIcon,
1018
- TabletPortraitIcon,
1019
- MobilePortraitIcon,
1020
- WidescreenIcon,
1021
1004
  LaptopIcon,
1005
+ MobileLandscapeIcon,
1006
+ MobilePortraitIcon,
1022
1007
  TabletLandscapeIcon,
1023
- MobileLandscapeIcon
1008
+ TabletPortraitIcon,
1009
+ WidescreenIcon
1024
1010
  } from "@elementor/icons";
1011
+ import { Tab, Tabs, Tooltip as BaseTooltip3 } from "@elementor/ui";
1012
+ import { __ as __17 } from "@wordpress/i18n";
1025
1013
  function BreakpointsSwitcher() {
1026
1014
  const breakpoints = useBreakpoints();
1027
1015
  const activeBreakpoint = useActiveBreakpoint();
@@ -1126,16 +1114,16 @@ import * as React26 from "react";
1126
1114
 
1127
1115
  // src/extensions/site-settings/components/portal.tsx
1128
1116
  import * as React24 from "react";
1129
- import { Portal as BasePortal } from "@elementor/ui";
1130
1117
  import {
1131
1118
  __privateIsRouteActive as isRouteActive2,
1119
+ __privateUseListenTo as useListenTo,
1132
1120
  routeCloseEvent,
1133
- routeOpenEvent as routeOpenEvent3,
1134
- __privateUseListenTo as useListenTo
1121
+ routeOpenEvent as routeOpenEvent2
1135
1122
  } from "@elementor/editor-v1-adapters";
1123
+ import { Portal as BasePortal } from "@elementor/ui";
1136
1124
  function Portal(props) {
1137
1125
  const containerRef = useListenTo(
1138
- [routeOpenEvent3("panel/global"), routeCloseEvent("panel/global")],
1126
+ [routeOpenEvent2("panel/global"), routeCloseEvent("panel/global")],
1139
1127
  getContainerRef
1140
1128
  );
1141
1129
  if (!containerRef.current) {
@@ -1188,12 +1176,12 @@ function PortalledPrimaryAction() {
1188
1176
  }
1189
1177
 
1190
1178
  // src/extensions/site-settings/hooks/use-action-props.ts
1191
- import { __ as __19 } from "@wordpress/i18n";
1192
1179
  import {
1193
1180
  __privateRunCommand as runCommand5,
1194
1181
  __privateUseRouteStatus as useRouteStatus5
1195
1182
  } from "@elementor/editor-v1-adapters";
1196
1183
  import { AdjustmentsHorizontalIcon } from "@elementor/icons";
1184
+ import { __ as __19 } from "@wordpress/i18n";
1197
1185
  function useActionProps6() {
1198
1186
  const { isActive, isBlocked } = useRouteStatus5("panel/global", {
1199
1187
  blockOnKitRoutes: false
@@ -1237,12 +1225,12 @@ function init10() {
1237
1225
  }
1238
1226
 
1239
1227
  // src/extensions/structure/hooks/use-action-props.ts
1240
- import { __ as __20 } from "@wordpress/i18n";
1241
1228
  import {
1242
1229
  __privateRunCommand as runCommand6,
1243
1230
  __privateUseRouteStatus as useRouteStatus6
1244
1231
  } from "@elementor/editor-v1-adapters";
1245
1232
  import { StructureIcon } from "@elementor/icons";
1233
+ import { __ as __20 } from "@wordpress/i18n";
1246
1234
  function useActionProps7() {
1247
1235
  const { isActive, isBlocked } = useRouteStatus6("navigator");
1248
1236
  return {
@@ -1276,9 +1264,9 @@ function init11() {
1276
1264
  }
1277
1265
 
1278
1266
  // src/extensions/theme-builder/hooks/use-action-props.ts
1279
- import { __ as __21 } from "@wordpress/i18n";
1280
- import { ThemeBuilderIcon } from "@elementor/icons";
1281
1267
  import { __privateRunCommand as runCommand7 } from "@elementor/editor-v1-adapters";
1268
+ import { ThemeBuilderIcon } from "@elementor/icons";
1269
+ import { __ as __21 } from "@wordpress/i18n";
1282
1270
  function useActionProps8() {
1283
1271
  return {
1284
1272
  icon: ThemeBuilderIcon,
@@ -1308,12 +1296,12 @@ function init12() {
1308
1296
  }
1309
1297
 
1310
1298
  // src/extensions/user-preferences/hooks/use-action-props.ts
1311
- import { __ as __22 } from "@wordpress/i18n";
1312
- import { ToggleRightIcon } from "@elementor/icons";
1313
1299
  import {
1314
- __privateOpenRoute as openRoute5,
1300
+ __privateOpenRoute as openRoute4,
1315
1301
  __privateUseRouteStatus as useRouteStatus7
1316
1302
  } from "@elementor/editor-v1-adapters";
1303
+ import { ToggleRightIcon } from "@elementor/icons";
1304
+ import { __ as __22 } from "@wordpress/i18n";
1317
1305
  function useActionProps9() {
1318
1306
  const { isActive, isBlocked } = useRouteStatus7("panel/editor-preferences");
1319
1307
  return {
@@ -1330,7 +1318,7 @@ function useActionProps9() {
1330
1318
  element: config.elements.link
1331
1319
  });
1332
1320
  }
1333
- openRoute5("panel/editor-preferences");
1321
+ openRoute4("panel/editor-preferences");
1334
1322
  },
1335
1323
  selected: isActive,
1336
1324
  disabled: isBlocked
@@ -1348,9 +1336,9 @@ function init13() {
1348
1336
  }
1349
1337
 
1350
1338
  // src/extensions/wordpress/index.ts
1351
- import { __ as __23 } from "@wordpress/i18n";
1352
- import { WordpressIcon } from "@elementor/icons";
1353
1339
  import { __useActiveDocument as useActiveDocument9 } from "@elementor/editor-documents";
1340
+ import { WordpressIcon } from "@elementor/icons";
1341
+ import { __ as __23 } from "@wordpress/i18n";
1354
1342
  function init14() {
1355
1343
  mainMenu.registerLink({
1356
1344
  id: "exit-to-wordpress",
@@ -1396,6 +1384,18 @@ function init15() {
1396
1384
  init14();
1397
1385
  }
1398
1386
 
1387
+ // src/sync/redirect-old-menus.ts
1388
+ import {
1389
+ __privateListenTo as listenTo2,
1390
+ __privateOpenRoute as openRoute5,
1391
+ routeOpenEvent as routeOpenEvent3
1392
+ } from "@elementor/editor-v1-adapters";
1393
+ function redirectOldMenus() {
1394
+ listenTo2(routeOpenEvent3("panel/menu"), () => {
1395
+ openRoute5("panel/elements/categories");
1396
+ });
1397
+ }
1398
+
1399
1399
  // src/init.ts
1400
1400
  function init16() {
1401
1401
  redirectOldMenus();