@elementor/editor-app-bar 3.33.0-99 → 3.34.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/index.d.mts +1 -1
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +319 -288
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +297 -266
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +9 -9
  8. package/src/components/locations/main-menu-location.tsx +4 -1
  9. package/src/components/locations/utilities-menu-location.tsx +1 -3
  10. package/src/extensions/connect/hooks/use-connect-link-config.tsx +4 -1
  11. package/src/extensions/documents-preview/index.ts +1 -1
  12. package/src/extensions/documents-settings/hooks/use-action-props.ts +51 -0
  13. package/src/extensions/documents-settings/index.ts +10 -0
  14. package/src/extensions/finder/index.ts +1 -1
  15. package/src/extensions/help/hooks/use-action-props.ts +26 -0
  16. package/src/extensions/help/index.ts +6 -29
  17. package/src/extensions/history/index.ts +3 -3
  18. package/src/extensions/index.ts +2 -2
  19. package/src/extensions/keyboard-shortcuts/index.ts +1 -1
  20. package/src/extensions/site-settings/hooks/use-action-props.ts +2 -2
  21. package/src/extensions/site-settings/index.ts +4 -3
  22. package/src/extensions/structure/hooks/structure-icon-with-popup.tsx +84 -0
  23. package/src/extensions/structure/hooks/use-action-props.ts +2 -2
  24. package/src/extensions/structure/index.ts +3 -3
  25. package/src/extensions/theme-builder/index.ts +2 -0
  26. package/src/extensions/user-preferences/index.ts +2 -1
  27. package/src/locations.ts +1 -1
  28. package/src/types.ts +10 -0
  29. package/src/extensions/documents-indicator/components/settings-button.tsx +0 -86
  30. package/src/extensions/documents-indicator/index.ts +0 -12
package/dist/index.js CHANGED
@@ -211,7 +211,7 @@ var components = {
211
211
  Link
212
212
  };
213
213
  var mainMenu = (0, import_menus.createMenu)({
214
- groups: ["exits"],
214
+ groups: ["help", "exits"],
215
215
  components
216
216
  });
217
217
  var toolsMenu = (0, import_menus.createMenu)({ components });
@@ -235,7 +235,7 @@ var import_editor2 = require("@elementor/editor");
235
235
  // src/components/app-bar.tsx
236
236
  var React19 = __toESM(require("react"));
237
237
  var import_editor_documents = require("@elementor/editor-documents");
238
- var import_ui11 = require("@elementor/ui");
238
+ var import_ui10 = require("@elementor/ui");
239
239
 
240
240
  // src/components/locations/main-menu-location.tsx
241
241
  var React10 = __toESM(require("react"));
@@ -339,10 +339,10 @@ function MainMenuLocation() {
339
339
  });
340
340
  const toolbarLogoProps = (0, import_ui6.bindTrigger)(popupState);
341
341
  const onToolbarClick = (e) => {
342
- const extendedWindow = window;
343
- const config = extendedWindow?.elementorCommon?.eventsManager?.config;
342
+ const extendedWindow2 = window;
343
+ const config = extendedWindow2?.elementorCommon?.eventsManager?.config;
344
344
  if (config) {
345
- extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.elementorLogoDropdown, {
345
+ extendedWindow2.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.elementorLogoDropdown, {
346
346
  location: config.locations.topBar,
347
347
  secondaryLocation: config.secondaryLocations.eLogoMenu,
348
348
  trigger: config.triggers.dropdownClick,
@@ -351,7 +351,7 @@ function MainMenuLocation() {
351
351
  }
352
352
  toolbarLogoProps.onClick(e);
353
353
  };
354
- 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 }))));
354
+ 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 })), /* @__PURE__ */ React10.createElement(import_ui6.Divider, null), menuItems.help.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React10.createElement(MenuItem2, { key: id })), menuItems.exits.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React10.createElement(MenuItem2, { key: id }))));
355
355
  }
356
356
 
357
357
  // src/components/locations/page-indication-location.tsx
@@ -435,7 +435,6 @@ function ToolsMenuLocation() {
435
435
  // src/components/locations/utilities-menu-location.tsx
436
436
  var React18 = __toESM(require("react"));
437
437
  var import_react3 = require("react");
438
- var import_ui10 = require("@elementor/ui");
439
438
  var MAX_TOOLBAR_ACTIONS2 = 4;
440
439
  var { useMenuItems: useMenuItems4 } = utilitiesMenu;
441
440
  function UtilitiesMenuLocation() {
@@ -443,13 +442,13 @@ function UtilitiesMenuLocation() {
443
442
  const shouldUsePopover = menuItems.default.length > MAX_TOOLBAR_ACTIONS2 + 1;
444
443
  const toolbarMenuItems = shouldUsePopover ? menuItems.default.slice(0, MAX_TOOLBAR_ACTIONS2) : menuItems.default;
445
444
  const popoverMenuItems = shouldUsePopover ? menuItems.default.slice(MAX_TOOLBAR_ACTIONS2) : [];
446
- 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 }))));
445
+ return /* @__PURE__ */ React18.createElement(ToolbarMenu, null, toolbarMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React18.createElement(import_react3.Fragment, { key: id }, /* @__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 }))));
447
446
  }
448
447
 
449
448
  // src/components/app-bar.tsx
450
449
  function AppBar() {
451
450
  const document2 = (0, import_editor_documents.__useActiveDocument)();
452
- 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, flexWrap: "nowrap" }, /* @__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", flexWrap: "nowrap" }, /* @__PURE__ */ React19.createElement(UtilitiesMenuLocation, null), /* @__PURE__ */ React19.createElement(PrimaryActionLocation, null))))));
451
+ return /* @__PURE__ */ React19.createElement(import_ui10.ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React19.createElement(import_ui10.AppBar, { position: "sticky" }, /* @__PURE__ */ React19.createElement(import_ui10.Toolbar, { disableGutters: true, variant: "dense" }, /* @__PURE__ */ React19.createElement(import_ui10.Box, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)", flexGrow: 1 }, /* @__PURE__ */ React19.createElement(import_ui10.Grid, { container: true, flexWrap: "nowrap" }, /* @__PURE__ */ React19.createElement(MainMenuLocation, null), document2?.permissions?.allowAddingWidgets && /* @__PURE__ */ React19.createElement(ToolsMenuLocation, null)), /* @__PURE__ */ React19.createElement(import_ui10.Grid, { container: true, justifyContent: "center" }, /* @__PURE__ */ React19.createElement(ToolbarMenu, { spacing: 1.5 }, /* @__PURE__ */ React19.createElement(import_ui10.Divider, { orientation: "vertical" }), /* @__PURE__ */ React19.createElement(PageIndicationLocation, null), /* @__PURE__ */ React19.createElement(import_ui10.Divider, { orientation: "vertical" }), /* @__PURE__ */ React19.createElement(ResponsiveLocation, null), /* @__PURE__ */ React19.createElement(import_ui10.Divider, { orientation: "vertical" }))), /* @__PURE__ */ React19.createElement(import_ui10.Grid, { container: true, justifyContent: "flex-end", flexWrap: "nowrap" }, /* @__PURE__ */ React19.createElement(UtilitiesMenuLocation, null), /* @__PURE__ */ React19.createElement(PrimaryActionLocation, null))))));
453
452
  }
454
453
 
455
454
  // src/extensions/connect/hooks/use-connect-link-config.tsx
@@ -458,10 +457,10 @@ var import_icons4 = require("@elementor/icons");
458
457
  var import_i18n4 = require("@wordpress/i18n");
459
458
  var dispatchConnectClickEvent = (eventName) => {
460
459
  try {
461
- const extendedWindow = window;
462
- const config = extendedWindow?.elementorCommon?.eventsManager?.config;
460
+ const extendedWindow2 = window;
461
+ const config = extendedWindow2?.elementorCommon?.eventsManager?.config;
463
462
  if (config) {
464
- extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar[eventName], {
463
+ extendedWindow2.elementorCommon.eventsManager.dispatchEvent(config.names.topBar[eventName], {
465
464
  location: config.locations.topBar,
466
465
  secondaryLocation: config.secondaryLocations.eLogoMenu,
467
466
  trigger: config.triggers.dropdownClick,
@@ -473,27 +472,29 @@ var dispatchConnectClickEvent = (eventName) => {
473
472
  }
474
473
  };
475
474
  function useConnectLinkConfig() {
476
- const extendedWindow = window;
475
+ const extendedWindow2 = window;
477
476
  let isUserConnected = false;
478
- const isPro = extendedWindow?.elementor?.helpers.hasPro();
477
+ const isPro = extendedWindow2?.elementor?.helpers.hasPro();
479
478
  let target = "_blank";
480
479
  if (isPro) {
481
- isUserConnected = extendedWindow?.elementorPro?.config.isActive ?? false;
480
+ isUserConnected = extendedWindow2?.elementorPro?.config.isActive ?? false;
482
481
  } else {
483
- isUserConnected = extendedWindow?.elementorCommon?.config.library_connect.is_connected ?? false;
482
+ isUserConnected = extendedWindow2?.elementorCommon?.config.library_connect.is_connected ?? false;
484
483
  target = "_self";
485
484
  }
486
485
  const handleConnectClick = (0, import_react4.useCallback)(
487
486
  (event) => {
488
487
  event.preventDefault();
489
- if (extendedWindow.jQuery && extendedWindow.jQuery.fn?.elementorConnect) {
490
- const connectUrl = extendedWindow?.elementor?.config.user.top_bar.connect_url;
491
- const $tempButton = extendedWindow.jQuery("<a>");
488
+ if (extendedWindow2.jQuery && extendedWindow2.jQuery.fn?.elementorConnect) {
489
+ const connectUrl = extendedWindow2?.elementor?.config.user.top_bar.connect_url;
490
+ const $tempButton = extendedWindow2.jQuery("<a>");
492
491
  $tempButton?.attr("href", connectUrl)?.attr("target", "_blank")?.attr("rel", "opener")?.css("display", "none")?.appendTo("body");
493
492
  $tempButton.elementorConnect({
494
493
  success: () => {
495
494
  dispatchConnectClickEvent("accountConnected");
496
- extendedWindow.location.reload();
495
+ setTimeout(() => {
496
+ extendedWindow2.location.reload();
497
+ }, 200);
497
498
  }
498
499
  });
499
500
  $tempButton[0].click();
@@ -503,16 +504,16 @@ function useConnectLinkConfig() {
503
504
  }, 1e3);
504
505
  }
505
506
  },
506
- [extendedWindow]
507
+ [extendedWindow2]
507
508
  );
508
509
  return isUserConnected ? {
509
510
  title: (0, import_i18n4.__)("My Elementor", "elementor"),
510
- href: extendedWindow?.elementor?.config.user.top_bar.my_elementor_url,
511
+ href: extendedWindow2?.elementor?.config.user.top_bar.my_elementor_url,
511
512
  icon: import_icons4.UserIcon,
512
513
  target: "_blank"
513
514
  } : {
514
515
  title: (0, import_i18n4.__)("Connect my account", "elementor"),
515
- href: extendedWindow?.elementor?.config.user.top_bar.connect_url,
516
+ href: extendedWindow2?.elementor?.config.user.top_bar.connect_url,
516
517
  icon: import_icons4.UserIcon,
517
518
  target,
518
519
  onClick: handleConnectClick
@@ -529,101 +530,21 @@ function init() {
529
530
  });
530
531
  }
531
532
 
532
- // src/extensions/documents-indicator/components/settings-button.tsx
533
- var React20 = __toESM(require("react"));
533
+ // src/extensions/documents-preview/hooks/use-action-props.ts
534
534
  var import_editor_documents2 = require("@elementor/editor-documents");
535
535
  var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
536
536
  var import_icons5 = require("@elementor/icons");
537
- var import_ui12 = require("@elementor/ui");
538
537
  var import_i18n5 = require("@wordpress/i18n");
539
- function SettingsButton() {
540
- const activeDocument = (0, import_editor_documents2.__useActiveDocument)();
541
- const hostDocument = (0, import_editor_documents2.__useHostDocument)();
542
- const document2 = activeDocument && activeDocument.type.value !== "kit" ? activeDocument : hostDocument;
543
- const { isActive, isBlocked } = (0, import_editor_v1_adapters.__privateUseRouteStatus)("panel/page-settings");
544
- if (!document2) {
545
- return null;
546
- }
547
- const title = (0, import_i18n5.__)("%s Settings", "elementor").replace("%s", document2.type.label);
548
- return /* @__PURE__ */ React20.createElement(Tooltip3, { title }, /* @__PURE__ */ React20.createElement(import_ui12.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React20.createElement(
549
- import_ui12.ToggleButton,
550
- {
551
- value: "document-settings",
552
- selected: isActive,
553
- disabled: isBlocked,
554
- onChange: () => {
555
- const extendedWindow = window;
556
- const config = extendedWindow?.elementorCommon?.eventsManager?.config;
557
- if (config) {
558
- extendedWindow.elementorCommon.eventsManager.dispatchEvent(
559
- config.names.topBar.documentSettings,
560
- {
561
- location: config.locations.topBar,
562
- secondaryLocation: config.secondaryLocations["document-settings"],
563
- trigger: config.triggers.click,
564
- element: config.elements.buttonIcon
565
- }
566
- );
567
- }
568
- (0, import_editor_v1_adapters.__privateOpenRoute)("panel/page-settings/settings");
569
- },
570
- "aria-label": title,
571
- size: "small",
572
- sx: {
573
- border: 0,
574
- // Temp fix until the style of the ToggleButton component will be decided.
575
- "&.Mui-disabled": {
576
- border: 0
577
- // Temp fix until the style of the ToggleButton component will be decided.
578
- }
579
- }
580
- },
581
- /* @__PURE__ */ React20.createElement(import_icons5.SettingsIcon, { fontSize: "small" })
582
- )));
583
- }
584
- function Tooltip3(props) {
585
- return /* @__PURE__ */ React20.createElement(
586
- import_ui12.Tooltip,
587
- {
588
- PopperProps: {
589
- sx: {
590
- "&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
591
- mt: 1.7
592
- }
593
- }
594
- },
595
- ...props
596
- }
597
- );
598
- }
599
-
600
- // src/extensions/documents-indicator/index.ts
601
- function init2() {
602
- injectIntoPageIndication({
603
- id: "document-settings-button",
604
- component: SettingsButton,
605
- options: {
606
- priority: 20
607
- // After document indicator.
608
- }
609
- });
610
- }
611
-
612
- // src/extensions/documents-preview/hooks/use-action-props.ts
613
- var import_editor_documents3 = require("@elementor/editor-documents");
614
- var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
615
- var import_icons6 = require("@elementor/icons");
616
- var import_i18n6 = require("@wordpress/i18n");
617
538
  function useActionProps() {
618
- const document2 = (0, import_editor_documents3.__useActiveDocument)();
539
+ const document2 = (0, import_editor_documents2.__useActiveDocument)();
619
540
  return {
620
- icon: import_icons6.EyeIcon,
621
- title: (0, import_i18n6.__)("Preview Changes", "elementor"),
541
+ icon: import_icons5.EyeIcon,
542
+ title: (0, import_i18n5.__)("Preview Changes", "elementor"),
622
543
  onClick: () => {
623
- const extendedWindow = window;
624
- const config = extendedWindow?.elementorCommon?.eventsManager?.config;
544
+ const extendedWindow2 = window;
545
+ const config = extendedWindow2?.elementorCommon?.eventsManager?.config;
625
546
  if (config) {
626
- extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.previewPage, {
547
+ extendedWindow2.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.previewPage, {
627
548
  location: config.locations.topBar,
628
549
  secondaryLocation: config.secondaryLocations["preview-page"],
629
550
  trigger: config.triggers.click,
@@ -631,7 +552,7 @@ function useActionProps() {
631
552
  });
632
553
  }
633
554
  if (document2) {
634
- (0, import_editor_v1_adapters2.__privateRunCommand)("editor/documents/preview", {
555
+ (0, import_editor_v1_adapters.__privateRunCommand)("editor/documents/preview", {
635
556
  id: document2.id,
636
557
  force: true
637
558
  });
@@ -641,28 +562,27 @@ function useActionProps() {
641
562
  }
642
563
 
643
564
  // src/extensions/documents-preview/index.ts
644
- function init3() {
565
+ function init2() {
645
566
  utilitiesMenu.registerAction({
646
567
  id: "document-preview-button",
647
568
  priority: 30,
648
- // After help.
649
569
  useProps: useActionProps
650
570
  });
651
571
  }
652
572
 
653
573
  // src/extensions/documents-save/components/primary-action.tsx
654
- var React22 = __toESM(require("react"));
655
- var import_editor_documents4 = require("@elementor/editor-documents");
656
- var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
657
- var import_icons7 = require("@elementor/icons");
658
- var import_ui14 = require("@elementor/ui");
659
- var import_i18n7 = require("@wordpress/i18n");
574
+ var React21 = __toESM(require("react"));
575
+ var import_editor_documents3 = require("@elementor/editor-documents");
576
+ var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
577
+ var import_icons6 = require("@elementor/icons");
578
+ var import_ui12 = require("@elementor/ui");
579
+ var import_i18n6 = require("@wordpress/i18n");
660
580
 
661
581
  // src/extensions/documents-save/components/primary-action-menu.tsx
662
- var React21 = __toESM(require("react"));
663
- var import_ui13 = require("@elementor/ui");
582
+ var React20 = __toESM(require("react"));
583
+ var import_ui11 = require("@elementor/ui");
664
584
  var { useMenuItems: useMenuItems5 } = documentOptionsMenu;
665
- var StyledPopoverMenu = (0, import_ui13.styled)(PopoverMenu)`
585
+ var StyledPopoverMenu = (0, import_ui11.styled)(PopoverMenu)`
666
586
  & > .MuiPopover-paper > .MuiList-root {
667
587
  & > .MuiDivider-root {
668
588
  display: none;
@@ -675,7 +595,7 @@ var StyledPopoverMenu = (0, import_ui13.styled)(PopoverMenu)`
675
595
  `;
676
596
  function PrimaryActionMenu(props) {
677
597
  const { save: saveActions, default: defaultActions } = useMenuItems5();
678
- return /* @__PURE__ */ React21.createElement(
598
+ return /* @__PURE__ */ React20.createElement(
679
599
  StyledPopoverMenu,
680
600
  {
681
601
  ...props,
@@ -693,24 +613,24 @@ function PrimaryActionMenu(props) {
693
613
  }
694
614
  },
695
615
  saveActions.map(({ MenuItem: MenuItem2, id }, index) => [
696
- index > 0 && /* @__PURE__ */ React21.createElement(import_ui13.Divider, { key: `${id}-divider` }),
697
- /* @__PURE__ */ React21.createElement(MenuItem2, { key: id })
616
+ index > 0 && /* @__PURE__ */ React20.createElement(import_ui11.Divider, { key: `${id}-divider` }),
617
+ /* @__PURE__ */ React20.createElement(MenuItem2, { key: id })
698
618
  ]),
699
- saveActions.length > 0 && defaultActions.length > 0 && /* @__PURE__ */ React21.createElement(import_ui13.Divider, null),
619
+ saveActions.length > 0 && defaultActions.length > 0 && /* @__PURE__ */ React20.createElement(import_ui11.Divider, null),
700
620
  defaultActions.map(({ MenuItem: MenuItem2, id }, index) => [
701
- index > 0 && /* @__PURE__ */ React21.createElement(import_ui13.Divider, { key: `${id}-divider` }),
702
- /* @__PURE__ */ React21.createElement(MenuItem2, { key: id })
621
+ index > 0 && /* @__PURE__ */ React20.createElement(import_ui11.Divider, { key: `${id}-divider` }),
622
+ /* @__PURE__ */ React20.createElement(MenuItem2, { key: id })
703
623
  ])
704
624
  );
705
625
  }
706
626
 
707
627
  // src/extensions/documents-save/components/primary-action.tsx
708
628
  function PrimaryAction() {
709
- const document2 = (0, import_editor_documents4.__useActiveDocument)();
710
- const { save } = (0, import_editor_documents4.__useActiveDocumentActions)();
711
- const editMode = (0, import_editor_v1_adapters3.useEditMode)();
629
+ const document2 = (0, import_editor_documents3.__useActiveDocument)();
630
+ const { save } = (0, import_editor_documents3.__useActiveDocumentActions)();
631
+ const editMode = (0, import_editor_v1_adapters2.useEditMode)();
712
632
  const isEditMode = editMode === "edit";
713
- const popupState = (0, import_ui14.usePopupState)({
633
+ const popupState = (0, import_ui12.usePopupState)({
714
634
  variant: "popover",
715
635
  popupId: "document-save-options"
716
636
  });
@@ -720,14 +640,14 @@ function PrimaryAction() {
720
640
  const isPublishDisabled = !isEditMode || !isPublishEnabled(document2);
721
641
  const isSaveOptionsDisabled = !isEditMode || document2.type.value === "kit";
722
642
  const shouldShowSpinner = document2.isSaving && !isPublishDisabled;
723
- return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(import_ui14.ButtonGroup, { size: "large", variant: "contained" }, /* @__PURE__ */ React22.createElement(
724
- import_ui14.Button,
643
+ return /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(import_ui12.ButtonGroup, { size: "large", variant: "contained" }, /* @__PURE__ */ React21.createElement(
644
+ import_ui12.Button,
725
645
  {
726
646
  onClick: () => {
727
- const extendedWindow = window;
728
- const config = extendedWindow?.elementorCommon?.eventsManager?.config;
647
+ const extendedWindow2 = window;
648
+ const config = extendedWindow2?.elementorCommon?.eventsManager?.config;
729
649
  if (config) {
730
- extendedWindow.elementorCommon.eventsManager.dispatchEvent(
650
+ extendedWindow2.elementorCommon.eventsManager.dispatchEvent(
731
651
  config.names.topBar.publishButton,
732
652
  {
733
653
  location: config.locations.topBar,
@@ -751,11 +671,11 @@ function PrimaryAction() {
751
671
  },
752
672
  disabled: isPublishDisabled
753
673
  },
754
- shouldShowSpinner ? /* @__PURE__ */ React22.createElement(import_ui14.CircularProgress, { color: "inherit", size: "1.5em" }) : getLabel(document2)
755
- ), /* @__PURE__ */ React22.createElement(
756
- import_ui14.Tooltip,
674
+ shouldShowSpinner ? /* @__PURE__ */ React21.createElement(import_ui12.CircularProgress, { color: "inherit", size: "1.5em" }) : getLabel(document2)
675
+ ), /* @__PURE__ */ React21.createElement(
676
+ import_ui12.Tooltip,
757
677
  {
758
- title: (0, import_i18n7.__)("Save Options", "elementor"),
678
+ title: (0, import_i18n6.__)("Save Options", "elementor"),
759
679
  PopperProps: {
760
680
  sx: {
761
681
  "&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
@@ -765,21 +685,21 @@ function PrimaryAction() {
765
685
  }
766
686
  }
767
687
  },
768
- /* @__PURE__ */ React22.createElement(import_ui14.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React22.createElement(
769
- import_ui14.Button,
688
+ /* @__PURE__ */ React21.createElement(import_ui12.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React21.createElement(
689
+ import_ui12.Button,
770
690
  {
771
691
  size: "small",
772
- ...(0, import_ui14.bindTrigger)(popupState),
692
+ ...(0, import_ui12.bindTrigger)(popupState),
773
693
  sx: { px: 0, height: "100%", borderRadius: 0 },
774
694
  disabled: isSaveOptionsDisabled,
775
- "aria-label": (0, import_i18n7.__)("Save Options", "elementor")
695
+ "aria-label": (0, import_i18n6.__)("Save Options", "elementor")
776
696
  },
777
- /* @__PURE__ */ React22.createElement(import_icons7.ChevronDownIcon, null)
697
+ /* @__PURE__ */ React21.createElement(import_icons6.ChevronDownIcon, null)
778
698
  ))
779
- )), /* @__PURE__ */ React22.createElement(PrimaryActionMenu, { ...(0, import_ui14.bindMenu)(popupState), onClick: popupState.close }));
699
+ )), /* @__PURE__ */ React21.createElement(PrimaryActionMenu, { ...(0, import_ui12.bindMenu)(popupState), onClick: popupState.close }));
780
700
  }
781
701
  function getLabel(document2) {
782
- return document2.userCan.publish ? (0, import_i18n7.__)("Publish", "elementor") : (0, import_i18n7.__)("Submit", "elementor");
702
+ return document2.userCan.publish ? (0, import_i18n6.__)("Publish", "elementor") : (0, import_i18n6.__)("Submit", "elementor");
783
703
  }
784
704
  function isPublishEnabled(document2) {
785
705
  if (document2.type.value === "kit") {
@@ -789,15 +709,15 @@ function isPublishEnabled(document2) {
789
709
  }
790
710
 
791
711
  // src/extensions/documents-save/hooks/use-document-copy-and-share-props.ts
792
- var import_editor_documents5 = require("@elementor/editor-documents");
793
- var import_icons8 = require("@elementor/icons");
794
- var import_i18n8 = require("@wordpress/i18n");
712
+ var import_editor_documents4 = require("@elementor/editor-documents");
713
+ var import_icons7 = require("@elementor/icons");
714
+ var import_i18n7 = require("@wordpress/i18n");
795
715
  function useDocumentCopyAndShareProps() {
796
- const document2 = (0, import_editor_documents5.__useActiveDocument)();
797
- const { copyAndShare } = (0, import_editor_documents5.__useActiveDocumentActions)();
716
+ const document2 = (0, import_editor_documents4.__useActiveDocument)();
717
+ const { copyAndShare } = (0, import_editor_documents4.__useActiveDocumentActions)();
798
718
  return {
799
- icon: import_icons8.LinkIcon,
800
- title: (0, import_i18n8.__)("Copy and Share", "elementor"),
719
+ icon: import_icons7.LinkIcon,
720
+ title: (0, import_i18n7.__)("Copy and Share", "elementor"),
801
721
  onClick: copyAndShare,
802
722
  disabled: !document2 || document2.isSaving || document2.isSavingDraft || !("publish" === document2.status.value),
803
723
  visible: document2?.permissions?.showCopyAndShare
@@ -805,51 +725,51 @@ function useDocumentCopyAndShareProps() {
805
725
  }
806
726
 
807
727
  // src/extensions/documents-save/hooks/use-document-save-draft-props.ts
808
- var import_editor_documents6 = require("@elementor/editor-documents");
809
- var import_icons9 = require("@elementor/icons");
810
- var import_i18n9 = require("@wordpress/i18n");
728
+ var import_editor_documents5 = require("@elementor/editor-documents");
729
+ var import_icons8 = require("@elementor/icons");
730
+ var import_i18n8 = require("@wordpress/i18n");
811
731
  function useDocumentSaveDraftProps() {
812
- const document2 = (0, import_editor_documents6.__useActiveDocument)();
813
- const { saveDraft } = (0, import_editor_documents6.__useActiveDocumentActions)();
732
+ const document2 = (0, import_editor_documents5.__useActiveDocument)();
733
+ const { saveDraft } = (0, import_editor_documents5.__useActiveDocumentActions)();
814
734
  return {
815
- icon: import_icons9.FileReportIcon,
816
- title: (0, import_i18n9.__)("Save Draft", "elementor"),
735
+ icon: import_icons8.FileReportIcon,
736
+ title: (0, import_i18n8.__)("Save Draft", "elementor"),
817
737
  onClick: saveDraft,
818
738
  disabled: !document2 || document2.isSaving || document2.isSavingDraft || !document2.isDirty
819
739
  };
820
740
  }
821
741
 
822
742
  // src/extensions/documents-save/hooks/use-document-save-template-props.ts
823
- var import_editor_documents7 = require("@elementor/editor-documents");
824
- var import_icons10 = require("@elementor/icons");
825
- var import_i18n10 = require("@wordpress/i18n");
743
+ var import_editor_documents6 = require("@elementor/editor-documents");
744
+ var import_icons9 = require("@elementor/icons");
745
+ var import_i18n9 = require("@wordpress/i18n");
826
746
  function useDocumentSaveTemplateProps() {
827
- const { saveTemplate } = (0, import_editor_documents7.__useActiveDocumentActions)();
747
+ const { saveTemplate } = (0, import_editor_documents6.__useActiveDocumentActions)();
828
748
  return {
829
- icon: import_icons10.FolderIcon,
830
- title: (0, import_i18n10.__)("Save as Template", "elementor"),
749
+ icon: import_icons9.FolderIcon,
750
+ title: (0, import_i18n9.__)("Save as Template", "elementor"),
831
751
  onClick: saveTemplate
832
752
  };
833
753
  }
834
754
 
835
755
  // src/extensions/documents-save/hooks/use-document-view-page-props.ts
836
- var import_editor_documents8 = require("@elementor/editor-documents");
837
- var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
838
- var import_icons11 = require("@elementor/icons");
839
- var import_i18n11 = require("@wordpress/i18n");
756
+ var import_editor_documents7 = require("@elementor/editor-documents");
757
+ var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
758
+ var import_icons10 = require("@elementor/icons");
759
+ var import_i18n10 = require("@wordpress/i18n");
840
760
  function useDocumentViewPageProps() {
841
- const document2 = (0, import_editor_documents8.__useActiveDocument)();
761
+ const document2 = (0, import_editor_documents7.__useActiveDocument)();
842
762
  return {
843
- icon: import_icons11.EyeIcon,
844
- title: (0, import_i18n11.__)("View Page", "elementor"),
845
- onClick: () => document2?.id && (0, import_editor_v1_adapters4.__privateRunCommand)("editor/documents/view", {
763
+ icon: import_icons10.EyeIcon,
764
+ title: (0, import_i18n10.__)("View Page", "elementor"),
765
+ onClick: () => document2?.id && (0, import_editor_v1_adapters3.__privateRunCommand)("editor/documents/view", {
846
766
  id: document2.id
847
767
  })
848
768
  };
849
769
  }
850
770
 
851
771
  // src/extensions/documents-save/index.ts
852
- function init4() {
772
+ function init3() {
853
773
  injectIntoPrimaryAction({
854
774
  id: "document-primary-action",
855
775
  component: PrimaryAction
@@ -878,20 +798,67 @@ function init4() {
878
798
  });
879
799
  }
880
800
 
801
+ // src/extensions/documents-settings/hooks/use-action-props.ts
802
+ var import_editor_documents8 = require("@elementor/editor-documents");
803
+ var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
804
+ var import_icons11 = require("@elementor/icons");
805
+ var import_i18n11 = require("@wordpress/i18n");
806
+ function useActionProps2() {
807
+ const activeDocument = (0, import_editor_documents8.__useActiveDocument)();
808
+ const hostDocument = (0, import_editor_documents8.__useHostDocument)();
809
+ const { isActive, isBlocked } = (0, import_editor_v1_adapters4.__privateUseRouteStatus)("panel/page-settings");
810
+ const document2 = activeDocument && activeDocument.type.value !== "kit" ? activeDocument : hostDocument;
811
+ const ButtonTitle = document2 ? (
812
+ /* translators: %s: Post type label. */
813
+ (0, import_i18n11.__)("%s Settings", "elementor").replace("%s", document2.type.label)
814
+ ) : (0, import_i18n11.__)("Document Settings", "elementor");
815
+ return {
816
+ title: ButtonTitle,
817
+ icon: import_icons11.FileSettingsIcon,
818
+ onClick: () => {
819
+ if (!document2) {
820
+ return;
821
+ }
822
+ const extendedWindow2 = window;
823
+ const config = extendedWindow2?.elementorCommon?.eventsManager?.config;
824
+ if (config) {
825
+ extendedWindow2.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.documentSettings, {
826
+ location: config.locations.topBar,
827
+ secondaryLocation: config.secondaryLocations["document-settings"],
828
+ trigger: config.triggers.click,
829
+ element: config.elements.buttonIcon
830
+ });
831
+ }
832
+ (0, import_editor_v1_adapters4.__privateOpenRoute)("panel/page-settings/settings");
833
+ },
834
+ selected: isActive,
835
+ disabled: isBlocked || !document2
836
+ };
837
+ }
838
+
839
+ // src/extensions/documents-settings/index.ts
840
+ function init4() {
841
+ toolsMenu.registerToggleAction({
842
+ id: "document-settings-button",
843
+ priority: 2,
844
+ useProps: useActionProps2
845
+ });
846
+ }
847
+
881
848
  // src/extensions/elements/hooks/use-action-props.ts
882
849
  var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
883
850
  var import_icons12 = require("@elementor/icons");
884
851
  var import_i18n12 = require("@wordpress/i18n");
885
- function useActionProps2() {
852
+ function useActionProps3() {
886
853
  const { isActive, isBlocked } = (0, import_editor_v1_adapters5.__privateUseRouteStatus)("panel/elements");
887
854
  return {
888
855
  title: (0, import_i18n12.__)("Add Element", "elementor"),
889
856
  icon: import_icons12.PlusIcon,
890
857
  onClick: () => {
891
- const extendedWindow = window;
892
- const config = extendedWindow?.elementorCommon?.eventsManager?.config;
858
+ const extendedWindow2 = window;
859
+ const config = extendedWindow2?.elementorCommon?.eventsManager?.config;
893
860
  if (config) {
894
- extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.widgetPanel, {
861
+ extendedWindow2.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.widgetPanel, {
895
862
  location: config.locations.topBar,
896
863
  secondaryLocation: config.secondaryLocations["widget-panel"],
897
864
  trigger: config.triggers.toggleClick,
@@ -938,7 +905,7 @@ function init5() {
938
905
  toolsMenu.registerToggleAction({
939
906
  id: "open-elements-panel",
940
907
  priority: 1,
941
- useProps: useActionProps2
908
+ useProps: useActionProps3
942
909
  });
943
910
  }
944
911
 
@@ -946,15 +913,15 @@ function init5() {
946
913
  var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
947
914
  var import_icons13 = require("@elementor/icons");
948
915
  var import_i18n14 = require("@wordpress/i18n");
949
- function useActionProps3() {
916
+ function useActionProps4() {
950
917
  return {
951
918
  title: (0, import_i18n14.__)("Finder", "elementor"),
952
919
  icon: import_icons13.SearchIcon,
953
920
  onClick: () => {
954
- const extendedWindow = window;
955
- const config = extendedWindow?.elementorCommon?.eventsManager?.config;
921
+ const extendedWindow2 = window;
922
+ const config = extendedWindow2?.elementorCommon?.eventsManager?.config;
956
923
  if (config) {
957
- extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.finder, {
924
+ extendedWindow2.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.finder, {
958
925
  location: config.locations.topBar,
959
926
  secondaryLocation: config.secondaryLocations.finder,
960
927
  trigger: config.triggers.toggleClick,
@@ -971,40 +938,41 @@ function init6() {
971
938
  utilitiesMenu.registerAction({
972
939
  id: "toggle-finder",
973
940
  priority: 15,
974
- // Before Preview.
975
- useProps: useActionProps3
941
+ useProps: useActionProps4
976
942
  });
977
943
  }
978
944
 
979
- // src/extensions/help/index.ts
945
+ // src/extensions/help/hooks/use-action-props.ts
980
946
  var import_icons14 = require("@elementor/icons");
981
947
  var import_i18n15 = require("@wordpress/i18n");
948
+ function useActionProps5() {
949
+ return {
950
+ title: (0, import_i18n15.__)("Help Center", "elementor"),
951
+ href: "https://go.elementor.com/editor-top-bar-learn/",
952
+ icon: import_icons14.HelpIcon,
953
+ target: "_blank",
954
+ onClick: () => {
955
+ const extendedWindow2 = window;
956
+ const config = extendedWindow2?.elementorCommon?.eventsManager?.config;
957
+ if (config) {
958
+ extendedWindow2.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.help, {
959
+ location: config.locations.topBar,
960
+ secondaryLocation: config.secondaryLocations.help,
961
+ trigger: config.triggers.click,
962
+ element: config.elements.buttonIcon
963
+ });
964
+ }
965
+ }
966
+ };
967
+ }
968
+
969
+ // src/extensions/help/index.ts
982
970
  function init7() {
983
- utilitiesMenu.registerLink({
971
+ mainMenu.registerLink({
984
972
  id: "open-help-center",
985
- priority: 25,
986
- // After Finder.
987
- useProps: () => {
988
- return {
989
- title: (0, import_i18n15.__)("Help", "elementor"),
990
- href: "https://go.elementor.com/editor-top-bar-learn/",
991
- icon: import_icons14.HelpIcon,
992
- target: "_blank",
993
- showExternalLinkIcon: true,
994
- onClick: () => {
995
- const extendedWindow = window;
996
- const config = extendedWindow?.elementorCommon?.eventsManager?.config;
997
- if (config) {
998
- extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.help, {
999
- location: config.locations.topBar,
1000
- secondaryLocation: config.secondaryLocations.help,
1001
- trigger: config.triggers.click,
1002
- element: config.elements.buttonIcon
1003
- });
1004
- }
1005
- }
1006
- };
1007
- }
973
+ group: "help",
974
+ priority: 10,
975
+ useProps: useActionProps5
1008
976
  });
1009
977
  }
1010
978
 
@@ -1012,16 +980,16 @@ function init7() {
1012
980
  var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
1013
981
  var import_icons15 = require("@elementor/icons");
1014
982
  var import_i18n16 = require("@wordpress/i18n");
1015
- function useActionProps4() {
983
+ function useActionProps6() {
1016
984
  const { isActive, isBlocked } = (0, import_editor_v1_adapters8.__privateUseRouteStatus)("panel/history");
1017
985
  return {
1018
986
  title: (0, import_i18n16.__)("History", "elementor"),
1019
987
  icon: import_icons15.HistoryIcon,
1020
988
  onClick: () => {
1021
- const extendedWindow = window;
1022
- const config = extendedWindow?.elementorCommon?.eventsManager?.config;
989
+ const extendedWindow2 = window;
990
+ const config = extendedWindow2?.elementorCommon?.eventsManager?.config;
1023
991
  if (config) {
1024
- extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.history, {
992
+ extendedWindow2.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.history, {
1025
993
  location: config.locations.topBar,
1026
994
  secondaryLocation: config.secondaryLocations.elementorLogo,
1027
995
  trigger: config.triggers.click,
@@ -1037,10 +1005,10 @@ function useActionProps4() {
1037
1005
 
1038
1006
  // src/extensions/history/index.ts
1039
1007
  function init8() {
1040
- mainMenu.registerToggleAction({
1008
+ toolsMenu.registerToggleAction({
1041
1009
  id: "open-history",
1042
- priority: 20,
1043
- useProps: useActionProps4
1010
+ priority: 15,
1011
+ useProps: useActionProps6
1044
1012
  });
1045
1013
  }
1046
1014
 
@@ -1048,15 +1016,15 @@ function init8() {
1048
1016
  var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
1049
1017
  var import_icons16 = require("@elementor/icons");
1050
1018
  var import_i18n17 = require("@wordpress/i18n");
1051
- function useActionProps5() {
1019
+ function useActionProps7() {
1052
1020
  return {
1053
1021
  icon: import_icons16.KeyboardIcon,
1054
1022
  title: (0, import_i18n17.__)("Keyboard Shortcuts", "elementor"),
1055
1023
  onClick: () => {
1056
- const extendedWindow = window;
1057
- const config = extendedWindow?.elementorCommon?.eventsManager?.config;
1024
+ const extendedWindow2 = window;
1025
+ const config = extendedWindow2?.elementorCommon?.eventsManager?.config;
1058
1026
  if (config) {
1059
- extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.keyboardShortcuts, {
1027
+ extendedWindow2.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.keyboardShortcuts, {
1060
1028
  location: config.locations.topBar,
1061
1029
  secondaryLocation: config.secondaryLocations.elementorLogo,
1062
1030
  trigger: config.triggers.click,
@@ -1074,16 +1042,15 @@ function init9() {
1074
1042
  id: "open-keyboard-shortcuts",
1075
1043
  group: "default",
1076
1044
  priority: 40,
1077
- // After user preferences.
1078
- useProps: useActionProps5
1045
+ useProps: useActionProps7
1079
1046
  });
1080
1047
  }
1081
1048
 
1082
1049
  // src/extensions/responsive/components/breakpoints-switcher.tsx
1083
- var React23 = __toESM(require("react"));
1050
+ var React22 = __toESM(require("react"));
1084
1051
  var import_editor_responsive = require("@elementor/editor-responsive");
1085
1052
  var import_icons17 = require("@elementor/icons");
1086
- var import_ui15 = require("@elementor/ui");
1053
+ var import_ui13 = require("@elementor/ui");
1087
1054
  var import_i18n18 = require("@wordpress/i18n");
1088
1055
  function BreakpointsSwitcher() {
1089
1056
  const breakpoints = (0, import_editor_responsive.useBreakpoints)();
@@ -1093,10 +1060,10 @@ function BreakpointsSwitcher() {
1093
1060
  return null;
1094
1061
  }
1095
1062
  const onChange = (_, value) => {
1096
- const extendedWindow = window;
1097
- const config = extendedWindow?.elementorCommon?.eventsManager?.config;
1063
+ const extendedWindow2 = window;
1064
+ const config = extendedWindow2?.elementorCommon?.eventsManager?.config;
1098
1065
  if (config) {
1099
- extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.responsiveControls, {
1066
+ extendedWindow2.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.responsiveControls, {
1100
1067
  location: config.locations.topBar,
1101
1068
  secondaryLocation: config.secondaryLocations.responsiveControls,
1102
1069
  trigger: config.triggers.click,
@@ -1106,8 +1073,8 @@ function BreakpointsSwitcher() {
1106
1073
  }
1107
1074
  activateBreakpoint(value);
1108
1075
  };
1109
- return /* @__PURE__ */ React23.createElement(
1110
- import_ui15.Tabs,
1076
+ return /* @__PURE__ */ React22.createElement(
1077
+ import_ui13.Tabs,
1111
1078
  {
1112
1079
  textColor: "inherit",
1113
1080
  indicatorColor: "secondary",
@@ -1123,13 +1090,13 @@ function BreakpointsSwitcher() {
1123
1090
  breakpoints.map(({ id, label, type, width }) => {
1124
1091
  const Icon = iconsMap[id];
1125
1092
  const title = labelsMap[type || "default"].replace("%s", label).replace("%d", width?.toString() || "");
1126
- return /* @__PURE__ */ React23.createElement(
1127
- import_ui15.Tab,
1093
+ return /* @__PURE__ */ React22.createElement(
1094
+ import_ui13.Tab,
1128
1095
  {
1129
1096
  value: id,
1130
1097
  key: id,
1131
1098
  "aria-label": title,
1132
- icon: /* @__PURE__ */ React23.createElement(Tooltip5, { title }, /* @__PURE__ */ React23.createElement(Icon, null)),
1099
+ icon: /* @__PURE__ */ React22.createElement(Tooltip4, { title }, /* @__PURE__ */ React22.createElement(Icon, null)),
1133
1100
  sx: { minWidth: "auto" },
1134
1101
  "data-testid": `switch-device-to-${id}`
1135
1102
  }
@@ -1137,9 +1104,9 @@ function BreakpointsSwitcher() {
1137
1104
  })
1138
1105
  );
1139
1106
  }
1140
- function Tooltip5(props) {
1141
- return /* @__PURE__ */ React23.createElement(
1142
- import_ui15.Tooltip,
1107
+ function Tooltip4(props) {
1108
+ return /* @__PURE__ */ React22.createElement(
1109
+ import_ui13.Tooltip,
1143
1110
  {
1144
1111
  PopperProps: {
1145
1112
  sx: {
@@ -1185,12 +1152,12 @@ function init10() {
1185
1152
  var import_editor = require("@elementor/editor");
1186
1153
 
1187
1154
  // src/extensions/site-settings/components/portalled-primary-action.tsx
1188
- var React26 = __toESM(require("react"));
1155
+ var React25 = __toESM(require("react"));
1189
1156
 
1190
1157
  // src/extensions/site-settings/components/portal.tsx
1191
- var React24 = __toESM(require("react"));
1158
+ var React23 = __toESM(require("react"));
1192
1159
  var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
1193
- var import_ui16 = require("@elementor/ui");
1160
+ var import_ui14 = require("@elementor/ui");
1194
1161
  function Portal(props) {
1195
1162
  const containerRef = (0, import_editor_v1_adapters10.__privateUseListenTo)(
1196
1163
  [(0, import_editor_v1_adapters10.routeOpenEvent)("panel/global"), (0, import_editor_v1_adapters10.routeCloseEvent)("panel/global")],
@@ -1199,22 +1166,22 @@ function Portal(props) {
1199
1166
  if (!containerRef.current) {
1200
1167
  return null;
1201
1168
  }
1202
- return /* @__PURE__ */ React24.createElement(import_ui16.Portal, { container: containerRef.current, ...props });
1169
+ return /* @__PURE__ */ React23.createElement(import_ui14.Portal, { container: containerRef.current, ...props });
1203
1170
  }
1204
1171
  function getContainerRef() {
1205
1172
  return (0, import_editor_v1_adapters10.__privateIsRouteActive)("panel/global") ? { current: document.querySelector("#elementor-panel-inner") } : { current: null };
1206
1173
  }
1207
1174
 
1208
1175
  // src/extensions/site-settings/components/primary-action.tsx
1209
- var React25 = __toESM(require("react"));
1176
+ var React24 = __toESM(require("react"));
1210
1177
  var import_editor_documents9 = require("@elementor/editor-documents");
1211
- var import_ui17 = require("@elementor/ui");
1178
+ var import_ui15 = require("@elementor/ui");
1212
1179
  var import_i18n19 = require("@wordpress/i18n");
1213
1180
  function PrimaryAction2() {
1214
1181
  const document2 = (0, import_editor_documents9.__useActiveDocument)();
1215
1182
  const { save } = (0, import_editor_documents9.__useActiveDocumentActions)();
1216
- return /* @__PURE__ */ React25.createElement(
1217
- import_ui17.Paper,
1183
+ return /* @__PURE__ */ React24.createElement(
1184
+ import_ui15.Paper,
1218
1185
  {
1219
1186
  sx: {
1220
1187
  px: 5,
@@ -1223,8 +1190,8 @@ function PrimaryAction2() {
1223
1190
  borderColor: "divider"
1224
1191
  }
1225
1192
  },
1226
- /* @__PURE__ */ React25.createElement(
1227
- import_ui17.Button,
1193
+ /* @__PURE__ */ React24.createElement(
1194
+ import_ui15.Button,
1228
1195
  {
1229
1196
  variant: "contained",
1230
1197
  disabled: !document2 || !document2.isDirty,
@@ -1232,32 +1199,32 @@ function PrimaryAction2() {
1232
1199
  sx: { width: "100%" },
1233
1200
  onClick: () => document2 && !document2.isSaving ? save() : null
1234
1201
  },
1235
- document2?.isSaving ? /* @__PURE__ */ React25.createElement(import_ui17.CircularProgress, null) : (0, import_i18n19.__)("Save Changes", "elementor")
1202
+ document2?.isSaving ? /* @__PURE__ */ React24.createElement(import_ui15.CircularProgress, null) : (0, import_i18n19.__)("Save Changes", "elementor")
1236
1203
  )
1237
1204
  );
1238
1205
  }
1239
1206
 
1240
1207
  // src/extensions/site-settings/components/portalled-primary-action.tsx
1241
1208
  function PortalledPrimaryAction() {
1242
- return /* @__PURE__ */ React26.createElement(Portal, null, /* @__PURE__ */ React26.createElement(PrimaryAction2, null));
1209
+ return /* @__PURE__ */ React25.createElement(Portal, null, /* @__PURE__ */ React25.createElement(PrimaryAction2, null));
1243
1210
  }
1244
1211
 
1245
1212
  // src/extensions/site-settings/hooks/use-action-props.ts
1246
1213
  var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
1247
1214
  var import_icons18 = require("@elementor/icons");
1248
1215
  var import_i18n20 = require("@wordpress/i18n");
1249
- function useActionProps6() {
1216
+ function useActionProps8() {
1250
1217
  const { isActive, isBlocked } = (0, import_editor_v1_adapters11.__privateUseRouteStatus)("panel/global", {
1251
1218
  blockOnKitRoutes: false
1252
1219
  });
1253
1220
  return {
1254
1221
  title: (0, import_i18n20.__)("Site Settings", "elementor"),
1255
- icon: import_icons18.AdjustmentsHorizontalIcon,
1222
+ icon: import_icons18.SettingsIcon,
1256
1223
  onClick: () => {
1257
- const extendedWindow = window;
1258
- const config = extendedWindow?.elementorCommon?.eventsManager?.config;
1224
+ const extendedWindow2 = window;
1225
+ const config = extendedWindow2?.elementorCommon?.eventsManager?.config;
1259
1226
  if (config) {
1260
- extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.siteSettings, {
1227
+ extendedWindow2.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.siteSettings, {
1261
1228
  location: config.locations.topBar,
1262
1229
  secondaryLocation: config.secondaryLocations.siteSettings,
1263
1230
  trigger: config.triggers.toggleClick,
@@ -1281,27 +1248,89 @@ function init11() {
1281
1248
  id: "site-settings-primary-action-portal",
1282
1249
  component: PortalledPrimaryAction
1283
1250
  });
1284
- toolsMenu.registerToggleAction({
1251
+ mainMenu.registerToggleAction({
1285
1252
  id: "toggle-site-settings",
1286
- priority: 2,
1287
- useProps: useActionProps6
1253
+ group: "default",
1254
+ priority: 1,
1255
+ useProps: useActionProps8
1288
1256
  });
1289
1257
  }
1290
1258
 
1291
1259
  // src/extensions/structure/hooks/use-action-props.ts
1292
1260
  var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
1261
+ var import_i18n22 = require("@wordpress/i18n");
1262
+
1263
+ // src/extensions/structure/hooks/structure-icon-with-popup.tsx
1264
+ var React26 = __toESM(require("react"));
1265
+ var import_react5 = require("react");
1293
1266
  var import_icons19 = require("@elementor/icons");
1267
+ var import_ui16 = require("@elementor/ui");
1294
1268
  var import_i18n21 = require("@wordpress/i18n");
1295
- function useActionProps7() {
1269
+ var extendedWindow = window;
1270
+ var StructurePopupContent = ({ onClose }) => {
1271
+ const handleDismiss = async () => {
1272
+ onClose();
1273
+ extendedWindow.elementorCommon?.ajax?.addRequest?.("structure_popup_dismiss").catch(() => {
1274
+ });
1275
+ };
1276
+ const stopEventPropagation = (event) => {
1277
+ event.stopPropagation();
1278
+ };
1279
+ return /* @__PURE__ */ React26.createElement(import_ui16.Card, { elevation: 0, sx: { maxWidth: 300 }, onClick: stopEventPropagation }, /* @__PURE__ */ React26.createElement(import_ui16.CardContent, null, /* @__PURE__ */ React26.createElement(import_ui16.Typography, { variant: "subtitle2", sx: { mb: 2 } }, (0, import_i18n21.__)("Refreshed Top Bar layout!", "elementor")), /* @__PURE__ */ React26.createElement(import_ui16.Typography, { variant: "body2" }, (0, import_i18n21.__)("We\u2019ve fine-tuned the Top Bar to make navigation faster and smoother.", "elementor"))), /* @__PURE__ */ React26.createElement(import_ui16.CardActions, { sx: { pt: 0 } }, /* @__PURE__ */ React26.createElement(
1280
+ import_ui16.Button,
1281
+ {
1282
+ size: "small",
1283
+ color: "secondary",
1284
+ href: "https://go.elementor.com/editor-top-bar-learn/",
1285
+ target: "_blank"
1286
+ },
1287
+ (0, import_i18n21.__)("Learn More", "elementor")
1288
+ ), /* @__PURE__ */ React26.createElement(import_ui16.Button, { size: "small", variant: "contained", onClick: handleDismiss }, (0, import_i18n21.__)("Got it", "elementor"))));
1289
+ };
1290
+ var StructureIconWithPopup = () => {
1291
+ const [showPopup, setShowPopup] = (0, import_react5.useState)(false);
1292
+ (0, import_react5.useEffect)(() => {
1293
+ if (extendedWindow.elementorShowInfotip?.shouldShow === "1") {
1294
+ setShowPopup(true);
1295
+ }
1296
+ }, []);
1297
+ const handleClosePopup = () => {
1298
+ setShowPopup(false);
1299
+ };
1300
+ if (extendedWindow.elementorShowInfotip?.shouldShow !== "1") {
1301
+ return /* @__PURE__ */ React26.createElement(import_icons19.StructureIcon, null);
1302
+ }
1303
+ return /* @__PURE__ */ React26.createElement(
1304
+ import_ui16.Infotip,
1305
+ {
1306
+ placement: "bottom",
1307
+ arrow: false,
1308
+ content: /* @__PURE__ */ React26.createElement(StructurePopupContent, { onClose: handleClosePopup }),
1309
+ open: showPopup,
1310
+ PopperProps: {
1311
+ modifiers: [
1312
+ {
1313
+ name: "offset",
1314
+ options: { offset: [-16, 12] }
1315
+ }
1316
+ ]
1317
+ }
1318
+ },
1319
+ /* @__PURE__ */ React26.createElement(import_icons19.StructureIcon, null)
1320
+ );
1321
+ };
1322
+
1323
+ // src/extensions/structure/hooks/use-action-props.ts
1324
+ function useActionProps9() {
1296
1325
  const { isActive, isBlocked } = (0, import_editor_v1_adapters12.__privateUseRouteStatus)("navigator");
1297
1326
  return {
1298
- title: (0, import_i18n21.__)("Structure", "elementor"),
1299
- icon: import_icons19.StructureIcon,
1327
+ title: (0, import_i18n22.__)("Structure", "elementor"),
1328
+ icon: StructureIconWithPopup,
1300
1329
  onClick: () => {
1301
- const extendedWindow = window;
1302
- const config = extendedWindow?.elementorCommon?.eventsManager?.config;
1330
+ const extendedWindow2 = window;
1331
+ const config = extendedWindow2?.elementorCommon?.eventsManager?.config;
1303
1332
  if (config) {
1304
- extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.structure, {
1333
+ extendedWindow2.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.structure, {
1305
1334
  location: config.locations.topBar,
1306
1335
  secondaryLocation: config.secondaryLocations.structure,
1307
1336
  trigger: config.triggers.toggleClick,
@@ -1317,26 +1346,26 @@ function useActionProps7() {
1317
1346
 
1318
1347
  // src/extensions/structure/index.ts
1319
1348
  function init12() {
1320
- toolsMenu.registerToggleAction({
1349
+ utilitiesMenu.registerToggleAction({
1321
1350
  id: "toggle-structure-view",
1322
- priority: 3,
1323
- useProps: useActionProps7
1351
+ priority: 25,
1352
+ useProps: useActionProps9
1324
1353
  });
1325
1354
  }
1326
1355
 
1327
1356
  // src/extensions/theme-builder/hooks/use-action-props.ts
1328
1357
  var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
1329
1358
  var import_icons20 = require("@elementor/icons");
1330
- var import_i18n22 = require("@wordpress/i18n");
1331
- function useActionProps8() {
1359
+ var import_i18n23 = require("@wordpress/i18n");
1360
+ function useActionProps10() {
1332
1361
  return {
1333
1362
  icon: import_icons20.ThemeBuilderIcon,
1334
- title: (0, import_i18n22.__)("Theme Builder", "elementor"),
1363
+ title: (0, import_i18n23.__)("Theme Builder", "elementor"),
1335
1364
  onClick: () => {
1336
- const extendedWindow = window;
1337
- const config = extendedWindow?.elementorCommon?.eventsManager?.config;
1365
+ const extendedWindow2 = window;
1366
+ const config = extendedWindow2?.elementorCommon?.eventsManager?.config;
1338
1367
  if (config) {
1339
- extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.themeBuilder, {
1368
+ extendedWindow2.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.themeBuilder, {
1340
1369
  location: config.locations.topBar,
1341
1370
  secondaryLocation: config.secondaryLocations.elementorLogo,
1342
1371
  trigger: config.triggers.click,
@@ -1352,24 +1381,26 @@ function useActionProps8() {
1352
1381
  function init13() {
1353
1382
  mainMenu.registerAction({
1354
1383
  id: "open-theme-builder",
1355
- useProps: useActionProps8
1384
+ group: "default",
1385
+ priority: 10,
1386
+ useProps: useActionProps10
1356
1387
  });
1357
1388
  }
1358
1389
 
1359
1390
  // src/extensions/user-preferences/hooks/use-action-props.ts
1360
1391
  var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
1361
1392
  var import_icons21 = require("@elementor/icons");
1362
- var import_i18n23 = require("@wordpress/i18n");
1363
- function useActionProps9() {
1393
+ var import_i18n24 = require("@wordpress/i18n");
1394
+ function useActionProps11() {
1364
1395
  const { isActive, isBlocked } = (0, import_editor_v1_adapters14.__privateUseRouteStatus)("panel/editor-preferences");
1365
1396
  return {
1366
1397
  icon: import_icons21.ToggleRightIcon,
1367
- title: (0, import_i18n23.__)("User Preferences", "elementor"),
1398
+ title: (0, import_i18n24.__)("User Preferences", "elementor"),
1368
1399
  onClick: () => {
1369
- const extendedWindow = window;
1370
- const config = extendedWindow?.elementorCommon?.eventsManager?.config;
1400
+ const extendedWindow2 = window;
1401
+ const config = extendedWindow2?.elementorCommon?.eventsManager?.config;
1371
1402
  if (config) {
1372
- extendedWindow.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.userPreferences, {
1403
+ extendedWindow2.elementorCommon.eventsManager.dispatchEvent(config.names.topBar.userPreferences, {
1373
1404
  location: config.locations.topBar,
1374
1405
  secondaryLocation: config.secondaryLocations.elementorLogo,
1375
1406
  trigger: config.triggers.click,
@@ -1387,16 +1418,16 @@ function useActionProps9() {
1387
1418
  function init14() {
1388
1419
  mainMenu.registerToggleAction({
1389
1420
  id: "open-user-preferences",
1421
+ group: "default",
1390
1422
  priority: 30,
1391
- // After history.
1392
- useProps: useActionProps9
1423
+ useProps: useActionProps11
1393
1424
  });
1394
1425
  }
1395
1426
 
1396
1427
  // src/extensions/wordpress/index.ts
1397
1428
  var import_editor_documents10 = require("@elementor/editor-documents");
1398
1429
  var import_icons22 = require("@elementor/icons");
1399
- var import_i18n24 = require("@wordpress/i18n");
1430
+ var import_i18n25 = require("@wordpress/i18n");
1400
1431
  function init15() {
1401
1432
  mainMenu.registerLink({
1402
1433
  id: "exit-to-wordpress",
@@ -1405,14 +1436,14 @@ function init15() {
1405
1436
  useProps: () => {
1406
1437
  const document2 = (0, import_editor_documents10.__useActiveDocument)();
1407
1438
  return {
1408
- title: (0, import_i18n24.__)("Exit to WordPress", "elementor"),
1439
+ title: (0, import_i18n25.__)("Exit to WordPress", "elementor"),
1409
1440
  href: document2?.links?.platformEdit,
1410
1441
  icon: import_icons22.WordpressIcon,
1411
1442
  onClick: () => {
1412
- const extendedWindow = window;
1413
- const config = extendedWindow?.elementorCommon?.eventsManager?.config;
1443
+ const extendedWindow2 = window;
1444
+ const config = extendedWindow2?.elementorCommon?.eventsManager?.config;
1414
1445
  if (config) {
1415
- extendedWindow.elementorCommon.eventsManager.dispatchEvent(
1446
+ extendedWindow2.elementorCommon.eventsManager.dispatchEvent(
1416
1447
  config.names.topBar.exitToWordpress,
1417
1448
  {
1418
1449
  location: config.locations.topBar,