@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.js CHANGED
@@ -61,12 +61,52 @@ function useMenuContext() {
61
61
  return (0, import_react.useContext)(MenuContext);
62
62
  }
63
63
 
64
- // src/components/ui/toolbar-menu-item.tsx
64
+ // src/components/ui/popover-menu-item.tsx
65
65
  var React2 = __toESM(require("react"));
66
+ var import_icons = require("@elementor/icons");
66
67
  var import_ui = require("@elementor/ui");
68
+ var DirectionalArrowIcon = (0, import_ui.withDirection)(import_icons.ArrowUpRightIcon);
69
+ var DirectionalChevronIcon = (0, import_ui.withDirection)(import_icons.ChevronRightIcon);
70
+ function PopoverMenuItem({
71
+ text,
72
+ icon,
73
+ onClick,
74
+ href,
75
+ target,
76
+ disabled,
77
+ isGroupParent,
78
+ ...props
79
+ }) {
80
+ const isExternalLink = href && target === "_blank";
81
+ return /* @__PURE__ */ React2.createElement(
82
+ import_ui.MenuItem,
83
+ {
84
+ ...props,
85
+ disabled,
86
+ onClick,
87
+ component: href ? "a" : "div",
88
+ href,
89
+ target,
90
+ sx: {
91
+ "&:hover": {
92
+ color: "text.primary"
93
+ // Overriding global CSS from the editor.
94
+ }
95
+ }
96
+ },
97
+ /* @__PURE__ */ React2.createElement(import_ui.ListItemIcon, null, icon),
98
+ /* @__PURE__ */ React2.createElement(import_ui.ListItemText, { primary: text }),
99
+ isExternalLink && /* @__PURE__ */ React2.createElement(DirectionalArrowIcon, null),
100
+ isGroupParent && /* @__PURE__ */ React2.createElement(DirectionalChevronIcon, null)
101
+ );
102
+ }
103
+
104
+ // src/components/ui/toolbar-menu-item.tsx
105
+ var React3 = __toESM(require("react"));
106
+ var import_ui2 = require("@elementor/ui");
67
107
  function ToolbarMenuItem({ title, ...props }) {
68
- return /* @__PURE__ */ React2.createElement(Tooltip, { title }, /* @__PURE__ */ React2.createElement(import_ui.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React2.createElement(
69
- import_ui.IconButton,
108
+ return /* @__PURE__ */ React3.createElement(Tooltip, { title }, /* @__PURE__ */ React3.createElement(import_ui2.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React3.createElement(
109
+ import_ui2.IconButton,
70
110
  {
71
111
  ...props,
72
112
  "aria-label": title,
@@ -85,8 +125,8 @@ function ToolbarMenuItem({ title, ...props }) {
85
125
  )));
86
126
  }
87
127
  function Tooltip(props) {
88
- return /* @__PURE__ */ React2.createElement(
89
- import_ui.Tooltip,
128
+ return /* @__PURE__ */ React3.createElement(
129
+ import_ui2.Tooltip,
90
130
  {
91
131
  PopperProps: {
92
132
  sx: {
@@ -100,46 +140,6 @@ function Tooltip(props) {
100
140
  );
101
141
  }
102
142
 
103
- // src/components/ui/popover-menu-item.tsx
104
- var React3 = __toESM(require("react"));
105
- var import_ui2 = require("@elementor/ui");
106
- var import_icons = require("@elementor/icons");
107
- var DirectionalArrowIcon = (0, import_ui2.withDirection)(import_icons.ArrowUpRightIcon);
108
- var DirectionalChevronIcon = (0, import_ui2.withDirection)(import_icons.ChevronRightIcon);
109
- function PopoverMenuItem({
110
- text,
111
- icon,
112
- onClick,
113
- href,
114
- target,
115
- disabled,
116
- isGroupParent,
117
- ...props
118
- }) {
119
- const isExternalLink = href && target === "_blank";
120
- return /* @__PURE__ */ React3.createElement(
121
- import_ui2.MenuItem,
122
- {
123
- ...props,
124
- disabled,
125
- onClick,
126
- component: href ? "a" : "div",
127
- href,
128
- target,
129
- sx: {
130
- "&:hover": {
131
- color: "text.primary"
132
- // Overriding global CSS from the editor.
133
- }
134
- }
135
- },
136
- /* @__PURE__ */ React3.createElement(import_ui2.ListItemIcon, null, icon),
137
- /* @__PURE__ */ React3.createElement(import_ui2.ListItemText, { primary: text }),
138
- isExternalLink && /* @__PURE__ */ React3.createElement(DirectionalArrowIcon, null),
139
- isGroupParent && /* @__PURE__ */ React3.createElement(DirectionalChevronIcon, null)
140
- );
141
- }
142
-
143
143
  // src/components/actions/action.tsx
144
144
  function Action({ icon: Icon, title, visible = true, ...props }) {
145
145
  const { type } = useMenuContext();
@@ -227,8 +227,12 @@ var documentOptionsMenu = (0, import_menus2.createMenu)({
227
227
  }
228
228
  });
229
229
 
230
+ // src/init.ts
231
+ var import_editor2 = require("@elementor/editor");
232
+
230
233
  // src/components/app-bar.tsx
231
234
  var React19 = __toESM(require("react"));
235
+ var import_editor_documents = require("@elementor/editor-documents");
232
236
  var import_ui11 = require("@elementor/ui");
233
237
 
234
238
  // src/components/locations/main-menu-location.tsx
@@ -258,8 +262,8 @@ function PopoverMenu({ children, popupState, ...props }) {
258
262
  // src/components/ui/toolbar-logo.tsx
259
263
  var React9 = __toESM(require("react"));
260
264
  var import_react2 = require("react");
261
- var import_i18n = require("@wordpress/i18n");
262
265
  var import_ui5 = require("@elementor/ui");
266
+ var import_i18n = require("@wordpress/i18n");
263
267
  var ElementorLogo = (props) => {
264
268
  return /* @__PURE__ */ React9.createElement(import_ui5.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" })));
265
269
  };
@@ -348,34 +352,52 @@ function MainMenuLocation() {
348
352
  return /* @__PURE__ */ React10.createElement(import_ui6.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, ...(0, import_ui6.bindMenu)(popupState), marginThreshold: 8 }, menuItems.default.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React10.createElement(MenuItem2, { key: id })), menuItems.exits.length > 0 && /* @__PURE__ */ React10.createElement(import_ui6.Divider, null), menuItems.exits.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React10.createElement(MenuItem2, { key: id }))));
349
353
  }
350
354
 
355
+ // src/components/locations/page-indication-location.tsx
356
+ var React11 = __toESM(require("react"));
357
+ function PageIndicationLocation() {
358
+ return /* @__PURE__ */ React11.createElement(PageIndicationSlot, null);
359
+ }
360
+
361
+ // src/components/locations/primary-action-location.tsx
362
+ var React12 = __toESM(require("react"));
363
+ function PrimaryActionLocation() {
364
+ return /* @__PURE__ */ React12.createElement(PrimaryActionSlot, null);
365
+ }
366
+
367
+ // src/components/locations/responsive-location.tsx
368
+ var React13 = __toESM(require("react"));
369
+ function ResponsiveLocation() {
370
+ return /* @__PURE__ */ React13.createElement(ResponsiveSlot, null);
371
+ }
372
+
351
373
  // src/components/locations/tools-menu-location.tsx
352
- var React14 = __toESM(require("react"));
374
+ var React17 = __toESM(require("react"));
353
375
 
354
376
  // src/components/ui/toolbar-menu.tsx
355
- var React11 = __toESM(require("react"));
377
+ var React14 = __toESM(require("react"));
356
378
  var import_ui7 = require("@elementor/ui");
357
379
  function ToolbarMenu({ children, ...props }) {
358
- return /* @__PURE__ */ React11.createElement(MenuContextProvider, { type: "toolbar" }, /* @__PURE__ */ React11.createElement(import_ui7.Stack, { sx: { px: 1.5 }, spacing: 1.5, direction: "row", alignItems: "center", ...props }, children));
380
+ return /* @__PURE__ */ React14.createElement(MenuContextProvider, { type: "toolbar" }, /* @__PURE__ */ React14.createElement(import_ui7.Stack, { sx: { px: 1.5 }, spacing: 1.5, direction: "row", alignItems: "center", ...props }, children));
359
381
  }
360
382
 
361
383
  // src/components/ui/toolbar-menu-more.tsx
362
- var React12 = __toESM(require("react"));
384
+ var React15 = __toESM(require("react"));
385
+ var import_icons2 = require("@elementor/icons");
363
386
  var import_ui8 = require("@elementor/ui");
364
387
  var import_i18n2 = require("@wordpress/i18n");
365
- var import_icons2 = require("@elementor/icons");
366
388
  function ToolbarMenuMore({ children, id }) {
367
389
  const popupState = (0, import_ui8.usePopupState)({
368
390
  variant: "popover",
369
391
  popupId: id
370
392
  });
371
- return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(ToolbarMenuItem, { ...(0, import_ui8.bindTrigger)(popupState), title: (0, import_i18n2.__)("More", "elementor") }, /* @__PURE__ */ React12.createElement(import_icons2.DotsVerticalIcon, null)), /* @__PURE__ */ React12.createElement(PopoverMenu, { onClick: popupState.close, ...(0, import_ui8.bindMenu)(popupState) }, children));
393
+ return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(ToolbarMenuItem, { ...(0, import_ui8.bindTrigger)(popupState), title: (0, import_i18n2.__)("More", "elementor") }, /* @__PURE__ */ React15.createElement(import_icons2.DotsVerticalIcon, null)), /* @__PURE__ */ React15.createElement(PopoverMenu, { onClick: popupState.close, ...(0, import_ui8.bindMenu)(popupState) }, children));
372
394
  }
373
395
 
374
396
  // src/components/locations/integrations-menu-location.tsx
375
- var React13 = __toESM(require("react"));
397
+ var React16 = __toESM(require("react"));
398
+ var import_icons3 = require("@elementor/icons");
376
399
  var import_ui9 = require("@elementor/ui");
377
400
  var import_i18n3 = require("@wordpress/i18n");
378
- var import_icons3 = require("@elementor/icons");
379
401
  var { useMenuItems: useMenuItems2 } = integrationsMenu;
380
402
  function IntegrationsMenuLocation() {
381
403
  const menuItems = useMenuItems2();
@@ -386,7 +408,7 @@ function IntegrationsMenuLocation() {
386
408
  if (menuItems.default.length === 0) {
387
409
  return null;
388
410
  }
389
- return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(ToolbarMenuItem, { ...(0, import_ui9.bindTrigger)(popupState), title: (0, import_i18n3.__)("Integrations", "elementor") }, /* @__PURE__ */ React13.createElement(import_icons3.PlugIcon, null)), /* @__PURE__ */ React13.createElement(
411
+ return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(ToolbarMenuItem, { ...(0, import_ui9.bindTrigger)(popupState), title: (0, import_i18n3.__)("Integrations", "elementor") }, /* @__PURE__ */ React16.createElement(import_icons3.PlugIcon, null)), /* @__PURE__ */ React16.createElement(
390
412
  PopoverMenu,
391
413
  {
392
414
  onClick: popupState.close,
@@ -394,7 +416,7 @@ function IntegrationsMenuLocation() {
394
416
  marginThreshold: 8,
395
417
  open: popupState.isOpen
396
418
  },
397
- menuItems.default.map(({ MenuItem: IntegrationsMenuItem, id }) => /* @__PURE__ */ React13.createElement(IntegrationsMenuItem, { key: id }))
419
+ menuItems.default.map(({ MenuItem: IntegrationsMenuItem, id }) => /* @__PURE__ */ React16.createElement(IntegrationsMenuItem, { key: id }))
398
420
  ));
399
421
  }
400
422
 
@@ -405,11 +427,11 @@ function ToolsMenuLocation() {
405
427
  const menuItems = useMenuItems3();
406
428
  const toolbarMenuItems = menuItems.default.slice(0, MAX_TOOLBAR_ACTIONS);
407
429
  const popoverMenuItems = menuItems.default.slice(MAX_TOOLBAR_ACTIONS);
408
- 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 }))));
430
+ 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 }))));
409
431
  }
410
432
 
411
433
  // src/components/locations/utilities-menu-location.tsx
412
- var React15 = __toESM(require("react"));
434
+ var React18 = __toESM(require("react"));
413
435
  var import_react3 = require("react");
414
436
  var import_ui10 = require("@elementor/ui");
415
437
  var MAX_TOOLBAR_ACTIONS2 = 4;
@@ -419,57 +441,27 @@ function UtilitiesMenuLocation() {
419
441
  const shouldUsePopover = menuItems.default.length > MAX_TOOLBAR_ACTIONS2 + 1;
420
442
  const toolbarMenuItems = shouldUsePopover ? menuItems.default.slice(0, MAX_TOOLBAR_ACTIONS2) : menuItems.default;
421
443
  const popoverMenuItems = shouldUsePopover ? menuItems.default.slice(MAX_TOOLBAR_ACTIONS2) : [];
422
- return /* @__PURE__ */ React15.createElement(ToolbarMenu, null, toolbarMenuItems.map(({ MenuItem: MenuItem2, id }, index) => /* @__PURE__ */ React15.createElement(import_react3.Fragment, { key: id }, index === 0 && /* @__PURE__ */ React15.createElement(import_ui10.Divider, { 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 }))));
423
- }
424
-
425
- // src/components/locations/primary-action-location.tsx
426
- var React16 = __toESM(require("react"));
427
- function PrimaryActionLocation() {
428
- return /* @__PURE__ */ React16.createElement(PrimaryActionSlot, null);
429
- }
430
-
431
- // src/components/locations/page-indication-location.tsx
432
- var React17 = __toESM(require("react"));
433
- function PageIndicationLocation() {
434
- return /* @__PURE__ */ React17.createElement(PageIndicationSlot, null);
435
- }
436
-
437
- // src/components/locations/responsive-location.tsx
438
- var React18 = __toESM(require("react"));
439
- function ResponsiveLocation() {
440
- return /* @__PURE__ */ React18.createElement(ResponsiveSlot, null);
444
+ return /* @__PURE__ */ React18.createElement(ToolbarMenu, null, toolbarMenuItems.map(({ MenuItem: MenuItem2, id }, index) => /* @__PURE__ */ React18.createElement(import_react3.Fragment, { key: id }, index === 0 && /* @__PURE__ */ React18.createElement(import_ui10.Divider, { 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 }))));
441
445
  }
442
446
 
443
447
  // src/components/app-bar.tsx
444
- var import_editor_documents = require("@elementor/editor-documents");
445
448
  function AppBar() {
446
449
  const document2 = (0, import_editor_documents.__useActiveDocument)();
447
450
  return /* @__PURE__ */ React19.createElement(import_ui11.ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React19.createElement(import_ui11.AppBar, { position: "sticky" }, /* @__PURE__ */ React19.createElement(import_ui11.Toolbar, { disableGutters: true, variant: "dense" }, /* @__PURE__ */ React19.createElement(import_ui11.Box, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)", flexGrow: 1 }, /* @__PURE__ */ React19.createElement(import_ui11.Grid, { container: true }, /* @__PURE__ */ React19.createElement(MainMenuLocation, null), document2?.permissions?.allowAddingWidgets && /* @__PURE__ */ React19.createElement(ToolsMenuLocation, null)), /* @__PURE__ */ React19.createElement(import_ui11.Grid, { container: true, justifyContent: "center" }, /* @__PURE__ */ React19.createElement(ToolbarMenu, { spacing: 1.5 }, /* @__PURE__ */ React19.createElement(import_ui11.Divider, { orientation: "vertical" }), /* @__PURE__ */ React19.createElement(PageIndicationLocation, null), /* @__PURE__ */ React19.createElement(import_ui11.Divider, { orientation: "vertical" }), /* @__PURE__ */ React19.createElement(ResponsiveLocation, null), /* @__PURE__ */ React19.createElement(import_ui11.Divider, { orientation: "vertical" }))), /* @__PURE__ */ React19.createElement(import_ui11.Grid, { container: true, justifyContent: "flex-end" }, /* @__PURE__ */ React19.createElement(UtilitiesMenuLocation, null), /* @__PURE__ */ React19.createElement(PrimaryActionLocation, null))))));
448
451
  }
449
452
 
450
- // src/init.ts
451
- var import_editor2 = require("@elementor/editor");
452
-
453
- // src/sync/redirect-old-menus.ts
454
- var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
455
- function redirectOldMenus() {
456
- (0, import_editor_v1_adapters.__privateListenTo)((0, import_editor_v1_adapters.routeOpenEvent)("panel/menu"), () => {
457
- (0, import_editor_v1_adapters.__privateOpenRoute)("panel/elements/categories");
458
- });
459
- }
460
-
461
453
  // src/extensions/documents-indicator/components/settings-button.tsx
462
454
  var React20 = __toESM(require("react"));
455
+ var import_editor_documents2 = require("@elementor/editor-documents");
456
+ var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
457
+ var import_icons4 = require("@elementor/icons");
463
458
  var import_ui12 = require("@elementor/ui");
464
459
  var import_i18n4 = require("@wordpress/i18n");
465
- var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
466
- var import_icons4 = require("@elementor/icons");
467
- var import_editor_documents2 = require("@elementor/editor-documents");
468
460
  function SettingsButton() {
469
461
  const activeDocument = (0, import_editor_documents2.__useActiveDocument)();
470
462
  const hostDocument = (0, import_editor_documents2.__useHostDocument)();
471
463
  const document2 = activeDocument && activeDocument.type.value !== "kit" ? activeDocument : hostDocument;
472
- const { isActive, isBlocked } = (0, import_editor_v1_adapters2.__privateUseRouteStatus)("panel/page-settings");
464
+ const { isActive, isBlocked } = (0, import_editor_v1_adapters.__privateUseRouteStatus)("panel/page-settings");
473
465
  if (!document2) {
474
466
  return null;
475
467
  }
@@ -491,7 +483,7 @@ function SettingsButton() {
491
483
  element: config.elements.buttonIcon
492
484
  });
493
485
  }
494
- (0, import_editor_v1_adapters2.__privateOpenRoute)("panel/page-settings/settings");
486
+ (0, import_editor_v1_adapters.__privateOpenRoute)("panel/page-settings/settings");
495
487
  },
496
488
  "aria-label": title,
497
489
  size: "small",
@@ -536,10 +528,10 @@ function init() {
536
528
  }
537
529
 
538
530
  // src/extensions/documents-preview/hooks/use-action-props.ts
539
- var import_i18n5 = require("@wordpress/i18n");
540
- var import_icons5 = require("@elementor/icons");
541
- var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
542
531
  var import_editor_documents3 = require("@elementor/editor-documents");
532
+ var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
533
+ var import_icons5 = require("@elementor/icons");
534
+ var import_i18n5 = require("@wordpress/i18n");
543
535
  function useActionProps() {
544
536
  const document2 = (0, import_editor_documents3.__useActiveDocument)();
545
537
  return {
@@ -557,7 +549,7 @@ function useActionProps() {
557
549
  });
558
550
  }
559
551
  if (document2) {
560
- (0, import_editor_v1_adapters3.__privateRunCommand)("editor/documents/preview", {
552
+ (0, import_editor_v1_adapters2.__privateRunCommand)("editor/documents/preview", {
561
553
  id: document2.id,
562
554
  force: true
563
555
  });
@@ -576,53 +568,13 @@ function init2() {
576
568
  });
577
569
  }
578
570
 
579
- // src/extensions/documents-save/hooks/use-document-save-draft-props.ts
580
- var import_i18n6 = require("@wordpress/i18n");
581
- var import_icons6 = require("@elementor/icons");
582
- var import_editor_documents4 = require("@elementor/editor-documents");
583
- function useDocumentSaveDraftProps() {
584
- const document2 = (0, import_editor_documents4.__useActiveDocument)();
585
- const { saveDraft } = (0, import_editor_documents4.__useActiveDocumentActions)();
586
- return {
587
- icon: import_icons6.FileReportIcon,
588
- title: (0, import_i18n6.__)("Save Draft", "elementor"),
589
- onClick: saveDraft,
590
- disabled: !document2 || document2.isSaving || document2.isSavingDraft || !document2.isDirty
591
- };
592
- }
593
-
594
- // src/extensions/documents-save/hooks/use-document-save-template-props.ts
595
- var import_i18n7 = require("@wordpress/i18n");
596
- var import_icons7 = require("@elementor/icons");
597
- var import_editor_documents5 = require("@elementor/editor-documents");
598
- function useDocumentSaveTemplateProps() {
599
- const { saveTemplate } = (0, import_editor_documents5.__useActiveDocumentActions)();
600
- return {
601
- icon: import_icons7.FolderIcon,
602
- title: (0, import_i18n7.__)("Save as Template", "elementor"),
603
- onClick: saveTemplate
604
- };
605
- }
606
-
607
- // src/extensions/documents-save/hooks/use-document-view-page-props.ts
608
- var import_i18n8 = require("@wordpress/i18n");
609
- var import_icons8 = require("@elementor/icons");
610
- var import_editor_documents6 = require("@elementor/editor-documents");
611
- var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
612
- function useDocumentViewPageProps() {
613
- const document2 = (0, import_editor_documents6.__useActiveDocument)();
614
- return {
615
- icon: import_icons8.EyeIcon,
616
- title: (0, import_i18n8.__)("View Page", "elementor"),
617
- onClick: () => document2?.id && (0, import_editor_v1_adapters4.__privateRunCommand)("editor/documents/view", {
618
- id: document2.id
619
- })
620
- };
621
- }
622
-
623
571
  // src/extensions/documents-save/components/primary-action.tsx
624
572
  var React22 = __toESM(require("react"));
625
- var import_i18n9 = require("@wordpress/i18n");
573
+ var import_editor_documents4 = require("@elementor/editor-documents");
574
+ var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
575
+ var import_icons6 = require("@elementor/icons");
576
+ var import_ui14 = require("@elementor/ui");
577
+ var import_i18n6 = require("@wordpress/i18n");
626
578
 
627
579
  // src/extensions/documents-save/components/primary-action-menu.tsx
628
580
  var React21 = __toESM(require("react"));
@@ -671,14 +623,10 @@ function PrimaryActionMenu(props) {
671
623
  }
672
624
 
673
625
  // src/extensions/documents-save/components/primary-action.tsx
674
- var import_ui14 = require("@elementor/ui");
675
- var import_editor_documents7 = require("@elementor/editor-documents");
676
- var import_icons9 = require("@elementor/icons");
677
- var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
678
626
  function PrimaryAction() {
679
- const document2 = (0, import_editor_documents7.__useActiveDocument)();
680
- const { save } = (0, import_editor_documents7.__useActiveDocumentActions)();
681
- const isPreviewMode = (0, import_editor_v1_adapters5.__privateUseIsPreviewMode)();
627
+ const document2 = (0, import_editor_documents4.__useActiveDocument)();
628
+ const { save } = (0, import_editor_documents4.__useActiveDocumentActions)();
629
+ const isPreviewMode = (0, import_editor_v1_adapters3.__privateUseIsPreviewMode)();
682
630
  const popupState = (0, import_ui14.usePopupState)({
683
631
  variant: "popover",
684
632
  popupId: "document-save-options"
@@ -721,7 +669,7 @@ function PrimaryAction() {
721
669
  ), /* @__PURE__ */ React22.createElement(
722
670
  import_ui14.Tooltip,
723
671
  {
724
- title: (0, import_i18n9.__)("Save Options", "elementor"),
672
+ title: (0, import_i18n6.__)("Save Options", "elementor"),
725
673
  PopperProps: {
726
674
  sx: {
727
675
  "&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
@@ -738,14 +686,14 @@ function PrimaryAction() {
738
686
  ...(0, import_ui14.bindTrigger)(popupState),
739
687
  sx: { px: 0, height: "100%", borderRadius: 0 },
740
688
  disabled: isSaveOptionsDisabled,
741
- "aria-label": (0, import_i18n9.__)("Save Options", "elementor")
689
+ "aria-label": (0, import_i18n6.__)("Save Options", "elementor")
742
690
  },
743
- /* @__PURE__ */ React22.createElement(import_icons9.ChevronDownIcon, null)
691
+ /* @__PURE__ */ React22.createElement(import_icons6.ChevronDownIcon, null)
744
692
  ))
745
693
  )), /* @__PURE__ */ React22.createElement(PrimaryActionMenu, { ...(0, import_ui14.bindMenu)(popupState), onClick: popupState.close }));
746
694
  }
747
695
  function getLabel(document2) {
748
- return document2.userCan.publish ? (0, import_i18n9.__)("Publish", "elementor") : (0, import_i18n9.__)("Submit", "elementor");
696
+ return document2.userCan.publish ? (0, import_i18n6.__)("Publish", "elementor") : (0, import_i18n6.__)("Submit", "elementor");
749
697
  }
750
698
  function isPublishEnabled(document2) {
751
699
  if (document2.type.value === "kit") {
@@ -755,21 +703,65 @@ function isPublishEnabled(document2) {
755
703
  }
756
704
 
757
705
  // src/extensions/documents-save/hooks/use-document-copy-and-share-props.ts
758
- var import_i18n10 = require("@wordpress/i18n");
759
- var import_icons10 = require("@elementor/icons");
760
- var import_editor_documents8 = require("@elementor/editor-documents");
706
+ var import_editor_documents5 = require("@elementor/editor-documents");
707
+ var import_icons7 = require("@elementor/icons");
708
+ var import_i18n7 = require("@wordpress/i18n");
761
709
  function useDocumentCopyAndShareProps() {
762
- const document2 = (0, import_editor_documents8.__useActiveDocument)();
763
- const { copyAndShare } = (0, import_editor_documents8.__useActiveDocumentActions)();
710
+ const document2 = (0, import_editor_documents5.__useActiveDocument)();
711
+ const { copyAndShare } = (0, import_editor_documents5.__useActiveDocumentActions)();
764
712
  return {
765
- icon: import_icons10.LinkIcon,
766
- title: (0, import_i18n10.__)("Copy and Share", "elementor"),
713
+ icon: import_icons7.LinkIcon,
714
+ title: (0, import_i18n7.__)("Copy and Share", "elementor"),
767
715
  onClick: copyAndShare,
768
716
  disabled: !document2 || document2.isSaving || document2.isSavingDraft || !("publish" === document2.status.value),
769
717
  visible: document2?.permissions?.showCopyAndShare
770
718
  };
771
719
  }
772
720
 
721
+ // src/extensions/documents-save/hooks/use-document-save-draft-props.ts
722
+ var import_editor_documents6 = require("@elementor/editor-documents");
723
+ var import_icons8 = require("@elementor/icons");
724
+ var import_i18n8 = require("@wordpress/i18n");
725
+ function useDocumentSaveDraftProps() {
726
+ const document2 = (0, import_editor_documents6.__useActiveDocument)();
727
+ const { saveDraft } = (0, import_editor_documents6.__useActiveDocumentActions)();
728
+ return {
729
+ icon: import_icons8.FileReportIcon,
730
+ title: (0, import_i18n8.__)("Save Draft", "elementor"),
731
+ onClick: saveDraft,
732
+ disabled: !document2 || document2.isSaving || document2.isSavingDraft || !document2.isDirty
733
+ };
734
+ }
735
+
736
+ // src/extensions/documents-save/hooks/use-document-save-template-props.ts
737
+ var import_editor_documents7 = require("@elementor/editor-documents");
738
+ var import_icons9 = require("@elementor/icons");
739
+ var import_i18n9 = require("@wordpress/i18n");
740
+ function useDocumentSaveTemplateProps() {
741
+ const { saveTemplate } = (0, import_editor_documents7.__useActiveDocumentActions)();
742
+ return {
743
+ icon: import_icons9.FolderIcon,
744
+ title: (0, import_i18n9.__)("Save as Template", "elementor"),
745
+ onClick: saveTemplate
746
+ };
747
+ }
748
+
749
+ // src/extensions/documents-save/hooks/use-document-view-page-props.ts
750
+ var import_editor_documents8 = require("@elementor/editor-documents");
751
+ var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
752
+ var import_icons10 = require("@elementor/icons");
753
+ var import_i18n10 = require("@wordpress/i18n");
754
+ function useDocumentViewPageProps() {
755
+ const document2 = (0, import_editor_documents8.__useActiveDocument)();
756
+ return {
757
+ icon: import_icons10.EyeIcon,
758
+ title: (0, import_i18n10.__)("View Page", "elementor"),
759
+ onClick: () => document2?.id && (0, import_editor_v1_adapters4.__privateRunCommand)("editor/documents/view", {
760
+ id: document2.id
761
+ })
762
+ };
763
+ }
764
+
773
765
  // src/extensions/documents-save/index.ts
774
766
  function init3() {
775
767
  injectIntoPrimaryAction({
@@ -800,12 +792,39 @@ function init3() {
800
792
  });
801
793
  }
802
794
 
803
- // src/extensions/elements/sync/sync-panel-title.ts
795
+ // src/extensions/elements/hooks/use-action-props.ts
796
+ var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
797
+ var import_icons11 = require("@elementor/icons");
804
798
  var import_i18n11 = require("@wordpress/i18n");
799
+ function useActionProps2() {
800
+ const { isActive, isBlocked } = (0, import_editor_v1_adapters5.__privateUseRouteStatus)("panel/elements");
801
+ return {
802
+ title: (0, import_i18n11.__)("Add Element", "elementor"),
803
+ icon: import_icons11.PlusIcon,
804
+ onClick: () => {
805
+ const extendedWindow = window;
806
+ const config = extendedWindow?.elementor?.editorEvents?.config;
807
+ if (config) {
808
+ extendedWindow.elementor.editorEvents.dispatchEvent(config.names.topBar.widgetPanel, {
809
+ location: config.locations.topBar,
810
+ secondaryLocation: config.secondaryLocations["widget-panel"],
811
+ trigger: config.triggers.toggleClick,
812
+ element: config.elements.buttonIcon
813
+ });
814
+ }
815
+ (0, import_editor_v1_adapters5.__privateOpenRoute)("panel/elements/categories");
816
+ },
817
+ selected: isActive,
818
+ disabled: isBlocked
819
+ };
820
+ }
821
+
822
+ // src/extensions/elements/sync/sync-panel-title.ts
805
823
  var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
824
+ var import_i18n12 = require("@wordpress/i18n");
806
825
  function syncPanelTitle() {
807
- const panelTitle = (0, import_i18n11.__)("Elements", "elementor");
808
- const tabTitle = (0, import_i18n11.__)("Widgets", "elementor");
826
+ const panelTitle = (0, import_i18n12.__)("Elements", "elementor");
827
+ const tabTitle = (0, import_i18n12.__)("Widgets", "elementor");
809
828
  (0, import_editor_v1_adapters6.__privateListenTo)((0, import_editor_v1_adapters6.routeOpenEvent)("panel/elements"), () => {
810
829
  setPanelTitle(panelTitle);
811
830
  setTabTitle(tabTitle);
@@ -827,33 +846,6 @@ function setTabTitle(title) {
827
846
  }
828
847
  }
829
848
 
830
- // src/extensions/elements/hooks/use-action-props.ts
831
- var import_icons11 = require("@elementor/icons");
832
- var import_i18n12 = require("@wordpress/i18n");
833
- var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
834
- function useActionProps2() {
835
- const { isActive, isBlocked } = (0, import_editor_v1_adapters7.__privateUseRouteStatus)("panel/elements");
836
- return {
837
- title: (0, import_i18n12.__)("Add Element", "elementor"),
838
- icon: import_icons11.PlusIcon,
839
- onClick: () => {
840
- const extendedWindow = window;
841
- const config = extendedWindow?.elementor?.editorEvents?.config;
842
- if (config) {
843
- extendedWindow.elementor.editorEvents.dispatchEvent(config.names.topBar.widgetPanel, {
844
- location: config.locations.topBar,
845
- secondaryLocation: config.secondaryLocations["widget-panel"],
846
- trigger: config.triggers.toggleClick,
847
- element: config.elements.buttonIcon
848
- });
849
- }
850
- (0, import_editor_v1_adapters7.__privateOpenRoute)("panel/elements/categories");
851
- },
852
- selected: isActive,
853
- disabled: isBlocked
854
- };
855
- }
856
-
857
849
  // src/extensions/elements/index.ts
858
850
  function init4() {
859
851
  syncPanelTitle();
@@ -865,11 +857,11 @@ function init4() {
865
857
  }
866
858
 
867
859
  // src/extensions/finder/hooks/use-action-props.ts
868
- var import_i18n13 = require("@wordpress/i18n");
860
+ var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
869
861
  var import_icons12 = require("@elementor/icons");
870
- var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
862
+ var import_i18n13 = require("@wordpress/i18n");
871
863
  function useActionProps3() {
872
- const { isBlocked } = (0, import_editor_v1_adapters8.__privateUseRouteStatus)("finder", {
864
+ const { isBlocked } = (0, import_editor_v1_adapters7.__privateUseRouteStatus)("finder", {
873
865
  blockOnKitRoutes: false,
874
866
  blockOnPreviewMode: false
875
867
  });
@@ -887,7 +879,7 @@ function useActionProps3() {
887
879
  element: config.elements.buttonIcon
888
880
  });
889
881
  }
890
- (0, import_editor_v1_adapters8.__privateRunCommand)("finder/toggle");
882
+ (0, import_editor_v1_adapters7.__privateRunCommand)("finder/toggle");
891
883
  },
892
884
  disabled: isBlocked
893
885
  };
@@ -904,8 +896,8 @@ function init5() {
904
896
  }
905
897
 
906
898
  // src/extensions/help/index.ts
907
- var import_i18n14 = require("@wordpress/i18n");
908
899
  var import_icons13 = require("@elementor/icons");
900
+ var import_i18n14 = require("@wordpress/i18n");
909
901
  function init6() {
910
902
  utilitiesMenu.registerLink({
911
903
  id: "open-help-center",
@@ -935,11 +927,11 @@ function init6() {
935
927
  }
936
928
 
937
929
  // src/extensions/history/hooks/use-action-props.ts
930
+ var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
938
931
  var import_icons14 = require("@elementor/icons");
939
932
  var import_i18n15 = require("@wordpress/i18n");
940
- var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
941
933
  function useActionProps4() {
942
- const { isActive, isBlocked } = (0, import_editor_v1_adapters9.__privateUseRouteStatus)("panel/history");
934
+ const { isActive, isBlocked } = (0, import_editor_v1_adapters8.__privateUseRouteStatus)("panel/history");
943
935
  return {
944
936
  title: (0, import_i18n15.__)("History", "elementor"),
945
937
  icon: import_icons14.HistoryIcon,
@@ -954,7 +946,7 @@ function useActionProps4() {
954
946
  element: config.elements.link
955
947
  });
956
948
  }
957
- (0, import_editor_v1_adapters9.__privateOpenRoute)("panel/history/actions");
949
+ (0, import_editor_v1_adapters8.__privateOpenRoute)("panel/history/actions");
958
950
  },
959
951
  selected: isActive,
960
952
  disabled: isBlocked
@@ -971,9 +963,9 @@ function init7() {
971
963
  }
972
964
 
973
965
  // src/extensions/keyboard-shortcuts/hooks/use-action-props.ts
974
- var import_i18n16 = require("@wordpress/i18n");
966
+ var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
975
967
  var import_icons15 = require("@elementor/icons");
976
- var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
968
+ var import_i18n16 = require("@wordpress/i18n");
977
969
  function useActionProps5() {
978
970
  return {
979
971
  icon: import_icons15.KeyboardIcon,
@@ -989,7 +981,7 @@ function useActionProps5() {
989
981
  element: config.elements.link
990
982
  });
991
983
  }
992
- (0, import_editor_v1_adapters10.__privateRunCommand)("shortcuts/open");
984
+ (0, import_editor_v1_adapters9.__privateRunCommand)("shortcuts/open");
993
985
  }
994
986
  };
995
987
  }
@@ -1007,10 +999,10 @@ function init8() {
1007
999
 
1008
1000
  // src/extensions/responsive/components/breakpoints-switcher.tsx
1009
1001
  var React23 = __toESM(require("react"));
1010
- var import_i18n17 = require("@wordpress/i18n");
1011
- var import_ui15 = require("@elementor/ui");
1012
1002
  var import_editor_responsive = require("@elementor/editor-responsive");
1013
1003
  var import_icons16 = require("@elementor/icons");
1004
+ var import_ui15 = require("@elementor/ui");
1005
+ var import_i18n17 = require("@wordpress/i18n");
1014
1006
  function BreakpointsSwitcher() {
1015
1007
  const breakpoints = (0, import_editor_responsive.useBreakpoints)();
1016
1008
  const activeBreakpoint = (0, import_editor_responsive.useActiveBreakpoint)();
@@ -1115,11 +1107,11 @@ var React26 = __toESM(require("react"));
1115
1107
 
1116
1108
  // src/extensions/site-settings/components/portal.tsx
1117
1109
  var React24 = __toESM(require("react"));
1110
+ var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
1118
1111
  var import_ui16 = require("@elementor/ui");
1119
- var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
1120
1112
  function Portal(props) {
1121
- const containerRef = (0, import_editor_v1_adapters11.__privateUseListenTo)(
1122
- [(0, import_editor_v1_adapters11.routeOpenEvent)("panel/global"), (0, import_editor_v1_adapters11.routeCloseEvent)("panel/global")],
1113
+ const containerRef = (0, import_editor_v1_adapters10.__privateUseListenTo)(
1114
+ [(0, import_editor_v1_adapters10.routeOpenEvent)("panel/global"), (0, import_editor_v1_adapters10.routeCloseEvent)("panel/global")],
1123
1115
  getContainerRef
1124
1116
  );
1125
1117
  if (!containerRef.current) {
@@ -1128,7 +1120,7 @@ function Portal(props) {
1128
1120
  return /* @__PURE__ */ React24.createElement(import_ui16.Portal, { container: containerRef.current, ...props });
1129
1121
  }
1130
1122
  function getContainerRef() {
1131
- return (0, import_editor_v1_adapters11.__privateIsRouteActive)("panel/global") ? { current: document.querySelector("#elementor-panel-inner") } : { current: null };
1123
+ return (0, import_editor_v1_adapters10.__privateIsRouteActive)("panel/global") ? { current: document.querySelector("#elementor-panel-inner") } : { current: null };
1132
1124
  }
1133
1125
 
1134
1126
  // src/extensions/site-settings/components/primary-action.tsx
@@ -1169,11 +1161,11 @@ function PortalledPrimaryAction() {
1169
1161
  }
1170
1162
 
1171
1163
  // src/extensions/site-settings/hooks/use-action-props.ts
1172
- var import_i18n19 = require("@wordpress/i18n");
1173
- var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
1164
+ var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
1174
1165
  var import_icons17 = require("@elementor/icons");
1166
+ var import_i18n19 = require("@wordpress/i18n");
1175
1167
  function useActionProps6() {
1176
- const { isActive, isBlocked } = (0, import_editor_v1_adapters12.__privateUseRouteStatus)("panel/global", {
1168
+ const { isActive, isBlocked } = (0, import_editor_v1_adapters11.__privateUseRouteStatus)("panel/global", {
1177
1169
  blockOnKitRoutes: false
1178
1170
  });
1179
1171
  return {
@@ -1191,9 +1183,9 @@ function useActionProps6() {
1191
1183
  });
1192
1184
  }
1193
1185
  if (isActive) {
1194
- (0, import_editor_v1_adapters12.__privateRunCommand)("panel/global/close");
1186
+ (0, import_editor_v1_adapters11.__privateRunCommand)("panel/global/close");
1195
1187
  } else {
1196
- (0, import_editor_v1_adapters12.__privateRunCommand)("panel/global/open");
1188
+ (0, import_editor_v1_adapters11.__privateRunCommand)("panel/global/open");
1197
1189
  }
1198
1190
  },
1199
1191
  selected: isActive,
@@ -1215,11 +1207,11 @@ function init10() {
1215
1207
  }
1216
1208
 
1217
1209
  // src/extensions/structure/hooks/use-action-props.ts
1218
- var import_i18n20 = require("@wordpress/i18n");
1219
- var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
1210
+ var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
1220
1211
  var import_icons18 = require("@elementor/icons");
1212
+ var import_i18n20 = require("@wordpress/i18n");
1221
1213
  function useActionProps7() {
1222
- const { isActive, isBlocked } = (0, import_editor_v1_adapters13.__privateUseRouteStatus)("navigator");
1214
+ const { isActive, isBlocked } = (0, import_editor_v1_adapters12.__privateUseRouteStatus)("navigator");
1223
1215
  return {
1224
1216
  title: (0, import_i18n20.__)("Structure", "elementor"),
1225
1217
  icon: import_icons18.StructureIcon,
@@ -1234,7 +1226,7 @@ function useActionProps7() {
1234
1226
  element: config.elements.buttonIcon
1235
1227
  });
1236
1228
  }
1237
- (0, import_editor_v1_adapters13.__privateRunCommand)("navigator/toggle");
1229
+ (0, import_editor_v1_adapters12.__privateRunCommand)("navigator/toggle");
1238
1230
  },
1239
1231
  selected: isActive,
1240
1232
  disabled: isBlocked
@@ -1251,9 +1243,9 @@ function init11() {
1251
1243
  }
1252
1244
 
1253
1245
  // src/extensions/theme-builder/hooks/use-action-props.ts
1254
- var import_i18n21 = require("@wordpress/i18n");
1246
+ var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
1255
1247
  var import_icons19 = require("@elementor/icons");
1256
- var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
1248
+ var import_i18n21 = require("@wordpress/i18n");
1257
1249
  function useActionProps8() {
1258
1250
  return {
1259
1251
  icon: import_icons19.ThemeBuilderIcon,
@@ -1269,7 +1261,7 @@ function useActionProps8() {
1269
1261
  element: config.elements.link
1270
1262
  });
1271
1263
  }
1272
- (0, import_editor_v1_adapters14.__privateRunCommand)("app/open");
1264
+ (0, import_editor_v1_adapters13.__privateRunCommand)("app/open");
1273
1265
  }
1274
1266
  };
1275
1267
  }
@@ -1283,11 +1275,11 @@ function init12() {
1283
1275
  }
1284
1276
 
1285
1277
  // src/extensions/user-preferences/hooks/use-action-props.ts
1286
- var import_i18n22 = require("@wordpress/i18n");
1278
+ var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
1287
1279
  var import_icons20 = require("@elementor/icons");
1288
- var import_editor_v1_adapters15 = require("@elementor/editor-v1-adapters");
1280
+ var import_i18n22 = require("@wordpress/i18n");
1289
1281
  function useActionProps9() {
1290
- const { isActive, isBlocked } = (0, import_editor_v1_adapters15.__privateUseRouteStatus)("panel/editor-preferences");
1282
+ const { isActive, isBlocked } = (0, import_editor_v1_adapters14.__privateUseRouteStatus)("panel/editor-preferences");
1291
1283
  return {
1292
1284
  icon: import_icons20.ToggleRightIcon,
1293
1285
  title: (0, import_i18n22.__)("User Preferences", "elementor"),
@@ -1302,7 +1294,7 @@ function useActionProps9() {
1302
1294
  element: config.elements.link
1303
1295
  });
1304
1296
  }
1305
- (0, import_editor_v1_adapters15.__privateOpenRoute)("panel/editor-preferences");
1297
+ (0, import_editor_v1_adapters14.__privateOpenRoute)("panel/editor-preferences");
1306
1298
  },
1307
1299
  selected: isActive,
1308
1300
  disabled: isBlocked
@@ -1320,9 +1312,9 @@ function init13() {
1320
1312
  }
1321
1313
 
1322
1314
  // src/extensions/wordpress/index.ts
1323
- var import_i18n23 = require("@wordpress/i18n");
1324
- var import_icons21 = require("@elementor/icons");
1325
1315
  var import_editor_documents10 = require("@elementor/editor-documents");
1316
+ var import_icons21 = require("@elementor/icons");
1317
+ var import_i18n23 = require("@wordpress/i18n");
1326
1318
  function init14() {
1327
1319
  mainMenu.registerLink({
1328
1320
  id: "exit-to-wordpress",
@@ -1368,6 +1360,14 @@ function init15() {
1368
1360
  init14();
1369
1361
  }
1370
1362
 
1363
+ // src/sync/redirect-old-menus.ts
1364
+ var import_editor_v1_adapters15 = require("@elementor/editor-v1-adapters");
1365
+ function redirectOldMenus() {
1366
+ (0, import_editor_v1_adapters15.__privateListenTo)((0, import_editor_v1_adapters15.routeOpenEvent)("panel/menu"), () => {
1367
+ (0, import_editor_v1_adapters15.__privateOpenRoute)("panel/elements/categories");
1368
+ });
1369
+ }
1370
+
1371
1371
  // src/init.ts
1372
1372
  function init16() {
1373
1373
  redirectOldMenus();