@elementor/editor-app-bar 0.7.3 → 0.9.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 (52) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/index.js +146 -61
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.mjs +133 -48
  5. package/dist/index.mjs.map +1 -1
  6. package/package.json +6 -6
  7. package/src/components/__tests__/top-bar.test.tsx +2 -0
  8. package/src/components/app-bar.tsx +1 -1
  9. package/src/components/ui/popover-menu-item.tsx +5 -0
  10. package/src/components/ui/popover-menu.tsx +1 -1
  11. package/src/components/ui/toolbar-logo.tsx +10 -6
  12. package/src/components/ui/toolbar-menu-item.tsx +27 -2
  13. package/src/components/ui/toolbar-menu-toggle-item.tsx +15 -1
  14. package/src/components/ui/toolbar-menu.tsx +1 -1
  15. package/src/extensions/documents-indicator/components/__tests__/settings-button.test.tsx +13 -7
  16. package/src/extensions/documents-indicator/components/settings-button.tsx +23 -4
  17. package/src/extensions/documents-preview/hooks/__tests__/use-document-preview-props.test.ts +4 -4
  18. package/src/extensions/documents-preview/hooks/use-action-props.ts +2 -2
  19. package/src/extensions/documents-save/components/__tests__/primary-action-menu.test.tsx +1 -3
  20. package/src/extensions/documents-save/components/__tests__/primary-action.test.tsx +6 -7
  21. package/src/extensions/documents-save/components/primary-action-menu.tsx +2 -2
  22. package/src/extensions/documents-save/components/primary-action.tsx +9 -8
  23. package/src/extensions/documents-save/hooks/__tests__/use-document-save-draft-props.test.ts +3 -3
  24. package/src/extensions/documents-save/hooks/__tests__/use-document-save-template-props.test.ts +2 -2
  25. package/src/extensions/documents-save/hooks/use-document-save-draft-props.ts +1 -1
  26. package/src/extensions/documents-save/hooks/use-document-save-template-props.ts +1 -1
  27. package/src/extensions/elements/hooks/__tests__/use-action-props.test.ts +3 -3
  28. package/src/extensions/elements/hooks/use-action-props.ts +1 -1
  29. package/src/extensions/elements/sync/__tests__/sync-panel-title.test.ts +2 -2
  30. package/src/extensions/elements/sync/sync-panel-title.ts +1 -1
  31. package/src/extensions/finder/hooks/__tests__/use-action-props.test.ts +3 -4
  32. package/src/extensions/finder/hooks/use-action-props.ts +2 -3
  33. package/src/extensions/finder/index.ts +1 -1
  34. package/src/extensions/history/hooks/__tests__/use-action-props.test.ts +3 -3
  35. package/src/extensions/history/hooks/use-action-props.ts +1 -1
  36. package/src/extensions/keyboard-shortcuts/hooks/__tests__/use-action-props.test.ts +2 -2
  37. package/src/extensions/keyboard-shortcuts/hooks/use-action-props.ts +1 -1
  38. package/src/extensions/site-settings/components/__tests__/portalled-primary-action.test.tsx +12 -8
  39. package/src/extensions/site-settings/components/__tests__/primary-action.test.tsx +10 -10
  40. package/src/extensions/site-settings/components/portal.tsx +1 -1
  41. package/src/extensions/site-settings/components/primary-action.tsx +1 -1
  42. package/src/extensions/site-settings/hooks/__tests__/use-action-props.test.ts +3 -3
  43. package/src/extensions/site-settings/hooks/use-action-props.ts +1 -1
  44. package/src/extensions/structure/hooks/__tests__/use-action-props.test.ts +3 -3
  45. package/src/extensions/structure/hooks/use-action-props.ts +1 -1
  46. package/src/extensions/theme-builder/hooks/__tests__/use-action-props.test.ts +2 -2
  47. package/src/extensions/theme-builder/hooks/use-action-props.ts +1 -1
  48. package/src/extensions/user-preferences/hooks/__tests__/use-action-props.test.ts +3 -3
  49. package/src/extensions/user-preferences/hooks/use-action-props.ts +1 -1
  50. package/src/extensions/wordpress/index.ts +1 -1
  51. package/src/sync/__tests__/redirect-old-menus.test.ts +2 -2
  52. package/src/sync/redirect-old-menus.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,33 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.9.0](https://github.com/elementor/elementor-packages/compare/@elementor/editor-app-bar@0.8.0...@elementor/editor-app-bar@0.9.0) (2023-09-14)
7
+
8
+
9
+ ### Features
10
+
11
+ * **v1-adapters:** mark private functions [ED-12029] ([#122](https://github.com/elementor/elementor-packages/issues/122)) ([2e79ccc](https://github.com/elementor/elementor-packages/commit/2e79ccc87add5f0508b5a142f9f6d832b4657062))
12
+
13
+
14
+
15
+
16
+
17
+ # [0.8.0](https://github.com/elementor/elementor-packages/compare/@elementor/editor-app-bar@0.7.3...@elementor/editor-app-bar@0.8.0) (2023-09-11)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * ui adaptations [ED-11933] ([#107](https://github.com/elementor/elementor-packages/issues/107)) ([18ef329](https://github.com/elementor/elementor-packages/commit/18ef32928cbe921d7f5340c37c3c965b117d8d63))
23
+
24
+
25
+ ### Features
26
+
27
+ * **editor-documents:** mark experimental functions [ED-12066] ([#112](https://github.com/elementor/elementor-packages/issues/112)) ([f4b7a9a](https://github.com/elementor/elementor-packages/commit/f4b7a9ac7953a2b48062349495acff05b5640de3))
28
+
29
+
30
+
31
+
32
+
6
33
  ## [0.7.3](https://github.com/elementor/elementor-packages/compare/@elementor/editor-app-bar@0.7.2...@elementor/editor-app-bar@0.7.3) (2023-08-22)
7
34
 
8
35
 
package/dist/index.js CHANGED
@@ -64,7 +64,37 @@ function useMenuContext() {
64
64
  var React2 = __toESM(require("react"));
65
65
  var import_ui = require("@elementor/ui");
66
66
  function ToolbarMenuItem({ title, ...props }) {
67
- return /* @__PURE__ */ React2.createElement(import_ui.Tooltip, { title }, /* @__PURE__ */ React2.createElement(import_ui.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React2.createElement(import_ui.IconButton, { ...props, "aria-label": title, size: "small" })));
67
+ return /* @__PURE__ */ React2.createElement(Tooltip, { title }, /* @__PURE__ */ React2.createElement(import_ui.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React2.createElement(
68
+ import_ui.IconButton,
69
+ {
70
+ ...props,
71
+ "aria-label": title,
72
+ size: "medium",
73
+ sx: {
74
+ "& .MuiSvgIcon-root": {
75
+ fontSize: "1.25rem"
76
+ },
77
+ "&:hover": {
78
+ color: "text.primary"
79
+ }
80
+ }
81
+ }
82
+ )));
83
+ }
84
+ function Tooltip(props) {
85
+ return /* @__PURE__ */ React2.createElement(
86
+ import_ui.Tooltip,
87
+ {
88
+ PopperProps: {
89
+ sx: {
90
+ "&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
91
+ mt: 2
92
+ }
93
+ }
94
+ },
95
+ ...props
96
+ }
97
+ );
68
98
  }
69
99
 
70
100
  // src/components/ui/popover-menu-item.tsx
@@ -82,7 +112,13 @@ function PopoverMenuItem({ text, icon, onClick, href, target, disabled, ...props
82
112
  onClick,
83
113
  component: href ? "a" : "div",
84
114
  href,
85
- target
115
+ target,
116
+ sx: {
117
+ "&:hover": {
118
+ color: "text.primary"
119
+ // Overriding global CSS from the editor.
120
+ }
121
+ }
86
122
  },
87
123
  /* @__PURE__ */ React3.createElement(import_ui2.ListItemIcon, null, icon),
88
124
  /* @__PURE__ */ React3.createElement(import_ui2.ListItemText, { primary: text }),
@@ -113,7 +149,26 @@ var React6 = __toESM(require("react"));
113
149
  var React5 = __toESM(require("react"));
114
150
  var import_ui3 = require("@elementor/ui");
115
151
  function ToolbarMenuToggleItem({ title, onClick, ...props }) {
116
- return /* @__PURE__ */ React5.createElement(import_ui3.Tooltip, { title }, /* @__PURE__ */ React5.createElement(import_ui3.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React5.createElement(import_ui3.ToggleButton, { ...props, onChange: onClick, "aria-label": title, size: "small" })));
152
+ return /* @__PURE__ */ React5.createElement(import_ui3.Tooltip, { title }, /* @__PURE__ */ React5.createElement(import_ui3.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React5.createElement(
153
+ import_ui3.ToggleButton,
154
+ {
155
+ ...props,
156
+ onChange: onClick,
157
+ "aria-label": title,
158
+ size: "small",
159
+ sx: {
160
+ border: 0,
161
+ // Temp fix until the style of the ToggleButton component will be decided.
162
+ "&.Mui-disabled": {
163
+ border: 0
164
+ // Temp fix until the style of the ToggleButton component will be decided.
165
+ },
166
+ "& .MuiSvgIcon-root": {
167
+ fontSize: "1.25rem"
168
+ }
169
+ }
170
+ }
171
+ )));
117
172
  }
118
173
 
119
174
  // src/components/actions/toggle-action.tsx
@@ -258,7 +313,7 @@ function PopoverMenu({ children, ...props }) {
258
313
  import_ui4.Menu,
259
314
  {
260
315
  PaperProps: {
261
- sx: { mt: 4 }
316
+ sx: { mt: 1.5 }
262
317
  },
263
318
  ...props,
264
319
  MenuListProps: {
@@ -279,7 +334,9 @@ var ElementorLogo = (props) => {
279
334
  return /* @__PURE__ */ React10.createElement(import_ui5.SvgIcon, { viewBox: "0 0 32 32", ...props }, /* @__PURE__ */ React10.createElement("g", null, /* @__PURE__ */ React10.createElement("circle", { cx: "16", cy: "16", r: "16" }), /* @__PURE__ */ React10.createElement("path", { d: "M11.7 9H9V22.3H11.7V9Z" }), /* @__PURE__ */ React10.createElement("path", { d: "M22.4 9H9V11.7H22.4V9Z" }), /* @__PURE__ */ React10.createElement("path", { d: "M22.4 14.4004H9V17.1004H22.4V14.4004Z" }), /* @__PURE__ */ React10.createElement("path", { d: "M22.4 19.6992H9V22.3992H22.4V19.6992Z" })));
280
335
  };
281
336
  var StyledToggleButton = (0, import_ui5.styled)(import_ui5.ToggleButton)(({ theme }) => ({
282
- paddingInline: theme.spacing(1),
337
+ padding: 0,
338
+ border: 0,
339
+ color: theme.palette.text.primary,
283
340
  "&.MuiToggleButton-root:hover": {
284
341
  backgroundColor: "initial"
285
342
  },
@@ -290,10 +347,8 @@ var StyledToggleButton = (0, import_ui5.styled)(import_ui5.ToggleButton)(({ them
290
347
  var StyledElementorLogo = (0, import_ui5.styled)(ElementorLogo, {
291
348
  shouldForwardProp: (prop) => prop !== "showMenuIcon"
292
349
  })(({ theme, showMenuIcon }) => ({
293
- width: "auto",
294
- height: "100%",
295
350
  "& path": {
296
- fill: "initial",
351
+ fill: theme.palette.background.default,
297
352
  transition: "all 0.2s linear",
298
353
  transformOrigin: "bottom left",
299
354
  "&:first-of-type": {
@@ -323,11 +378,18 @@ function ToolbarLogo(props) {
323
378
  {
324
379
  ...props,
325
380
  value: "selected",
326
- size: "small",
381
+ size: "large",
327
382
  onMouseEnter: () => setIsHoverState(true),
328
383
  onMouseLeave: () => setIsHoverState(false)
329
384
  },
330
- /* @__PURE__ */ React10.createElement(StyledElementorLogo, { titleAccess: (0, import_i18n.__)("Elementor Logo", "elementor"), showMenuIcon })
385
+ /* @__PURE__ */ React10.createElement(
386
+ StyledElementorLogo,
387
+ {
388
+ fontSize: "large",
389
+ showMenuIcon,
390
+ titleAccess: (0, import_i18n.__)("Elementor Logo", "elementor")
391
+ }
392
+ )
331
393
  );
332
394
  }
333
395
 
@@ -425,7 +487,7 @@ var React16 = __toESM(require("react"));
425
487
  var React14 = __toESM(require("react"));
426
488
  var import_ui9 = require("@elementor/ui");
427
489
  function ToolbarMenu({ children, ...props }) {
428
- return /* @__PURE__ */ React14.createElement(MenuContextProvider, { type: "toolbar" }, /* @__PURE__ */ React14.createElement(import_ui9.Stack, { sx: { px: 4 }, spacing: 4, direction: "row", alignItems: "center", ...props }, children));
490
+ return /* @__PURE__ */ React14.createElement(MenuContextProvider, { type: "toolbar" }, /* @__PURE__ */ React14.createElement(import_ui9.Stack, { sx: { px: 1.5 }, spacing: 1.5, direction: "row", alignItems: "center", ...props }, children));
429
491
  }
430
492
 
431
493
  // src/components/ui/toolbar-menu-more.tsx
@@ -486,7 +548,7 @@ function ResponsiveLocation() {
486
548
 
487
549
  // src/components/app-bar.tsx
488
550
  function AppBar() {
489
- return /* @__PURE__ */ React21.createElement(import_ui12.ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React21.createElement(import_ui12.AppBar, { position: "sticky" }, /* @__PURE__ */ React21.createElement(import_ui12.Box, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)" }, /* @__PURE__ */ React21.createElement(import_ui12.Grid, { container: true }, /* @__PURE__ */ React21.createElement(MainMenuLocation, null), /* @__PURE__ */ React21.createElement(ToolsMenuLocation, null)), /* @__PURE__ */ React21.createElement(import_ui12.Grid, { container: true, justifyContent: "center" }, /* @__PURE__ */ React21.createElement(ToolbarMenu, { spacing: 3 }, /* @__PURE__ */ React21.createElement(import_ui12.Divider, { orientation: "vertical" }), /* @__PURE__ */ React21.createElement(PageIndicationLocation, null), /* @__PURE__ */ React21.createElement(import_ui12.Divider, { orientation: "vertical" }), /* @__PURE__ */ React21.createElement(ResponsiveLocation, null), /* @__PURE__ */ React21.createElement(import_ui12.Divider, { orientation: "vertical" }))), /* @__PURE__ */ React21.createElement(import_ui12.Grid, { container: true, justifyContent: "flex-end" }, /* @__PURE__ */ React21.createElement(UtilitiesMenuLocation, null), /* @__PURE__ */ React21.createElement(PrimaryActionLocation, null)))));
551
+ return /* @__PURE__ */ React21.createElement(import_ui12.ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React21.createElement(import_ui12.AppBar, { position: "sticky" }, /* @__PURE__ */ React21.createElement(import_ui12.Box, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)" }, /* @__PURE__ */ React21.createElement(import_ui12.Grid, { container: true }, /* @__PURE__ */ React21.createElement(MainMenuLocation, null), /* @__PURE__ */ React21.createElement(ToolsMenuLocation, null)), /* @__PURE__ */ React21.createElement(import_ui12.Grid, { container: true, justifyContent: "center" }, /* @__PURE__ */ React21.createElement(ToolbarMenu, { spacing: 1.5 }, /* @__PURE__ */ React21.createElement(import_ui12.Divider, { orientation: "vertical" }), /* @__PURE__ */ React21.createElement(PageIndicationLocation, null), /* @__PURE__ */ React21.createElement(import_ui12.Divider, { orientation: "vertical" }), /* @__PURE__ */ React21.createElement(ResponsiveLocation, null), /* @__PURE__ */ React21.createElement(import_ui12.Divider, { orientation: "vertical" }))), /* @__PURE__ */ React21.createElement(import_ui12.Grid, { container: true, justifyContent: "flex-end" }, /* @__PURE__ */ React21.createElement(UtilitiesMenuLocation, null), /* @__PURE__ */ React21.createElement(PrimaryActionLocation, null)))));
490
552
  }
491
553
 
492
554
  // src/init.ts
@@ -495,8 +557,8 @@ var import_editor2 = require("@elementor/editor");
495
557
  // src/sync/redirect-old-menus.ts
496
558
  var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
497
559
  function redirectOldMenus() {
498
- (0, import_editor_v1_adapters.listenTo)((0, import_editor_v1_adapters.routeOpenEvent)("panel/menu"), () => {
499
- (0, import_editor_v1_adapters.openRoute)("panel/elements/categories");
560
+ (0, import_editor_v1_adapters.__privateListenTo)((0, import_editor_v1_adapters.routeOpenEvent)("panel/menu"), () => {
561
+ (0, import_editor_v1_adapters.__privateOpenRoute)("panel/elements/categories");
500
562
  });
501
563
  }
502
564
 
@@ -508,27 +570,50 @@ var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
508
570
  var import_icons4 = require("@elementor/icons");
509
571
  var import_editor_documents = require("@elementor/editor-documents");
510
572
  function SettingsButton() {
511
- const activeDocument = (0, import_editor_documents.useActiveDocument)();
512
- const hostDocument = (0, import_editor_documents.useHostDocument)();
573
+ const activeDocument = (0, import_editor_documents.__useActiveDocument)();
574
+ const hostDocument = (0, import_editor_documents.__useHostDocument)();
513
575
  const document2 = activeDocument && activeDocument.type.value !== "kit" ? activeDocument : hostDocument;
514
- const { isActive, isBlocked } = (0, import_editor_v1_adapters2.useRouteStatus)("panel/page-settings");
576
+ const { isActive, isBlocked } = (0, import_editor_v1_adapters2.__privateUseRouteStatus)("panel/page-settings");
515
577
  if (!document2) {
516
578
  return null;
517
579
  }
518
580
  const title = (0, import_i18n4.__)("%s Settings", "elementor").replace("%s", document2.type.label);
519
- return /* @__PURE__ */ React22.createElement(import_ui13.Tooltip, { title }, /* @__PURE__ */ React22.createElement(import_ui13.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React22.createElement(
581
+ return /* @__PURE__ */ React22.createElement(Tooltip3, { title }, /* @__PURE__ */ React22.createElement(import_ui13.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React22.createElement(
520
582
  import_ui13.ToggleButton,
521
583
  {
522
584
  value: "document-settings",
523
585
  selected: isActive,
524
586
  disabled: isBlocked,
525
- onChange: () => (0, import_editor_v1_adapters2.openRoute)("panel/page-settings/settings"),
587
+ onChange: () => (0, import_editor_v1_adapters2.__privateOpenRoute)("panel/page-settings/settings"),
526
588
  "aria-label": title,
527
- size: "small"
589
+ size: "small",
590
+ sx: {
591
+ border: 0,
592
+ // Temp fix until the style of the ToggleButton component will be decided.
593
+ "&.Mui-disabled": {
594
+ border: 0
595
+ // Temp fix until the style of the ToggleButton component will be decided.
596
+ }
597
+ }
528
598
  },
529
- /* @__PURE__ */ React22.createElement(import_icons4.SettingsIcon, null)
599
+ /* @__PURE__ */ React22.createElement(import_icons4.SettingsIcon, { fontSize: "small" })
530
600
  )));
531
601
  }
602
+ function Tooltip3(props) {
603
+ return /* @__PURE__ */ React22.createElement(
604
+ import_ui13.Tooltip,
605
+ {
606
+ PopperProps: {
607
+ sx: {
608
+ "&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
609
+ mt: 1.7
610
+ }
611
+ }
612
+ },
613
+ ...props
614
+ }
615
+ );
616
+ }
532
617
 
533
618
  // src/extensions/documents-indicator/index.ts
534
619
  function init() {
@@ -548,11 +633,11 @@ var import_icons5 = require("@elementor/icons");
548
633
  var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
549
634
  var import_editor_documents2 = require("@elementor/editor-documents");
550
635
  function useActionProps() {
551
- const document2 = (0, import_editor_documents2.useActiveDocument)();
636
+ const document2 = (0, import_editor_documents2.__useActiveDocument)();
552
637
  return {
553
638
  icon: import_icons5.EyeIcon,
554
639
  title: (0, import_i18n5.__)("Preview Changes", "elementor"),
555
- onClick: () => document2 && (0, import_editor_v1_adapters3.runCommand)("editor/documents/preview", {
640
+ onClick: () => document2 && (0, import_editor_v1_adapters3.__privateRunCommand)("editor/documents/preview", {
556
641
  id: document2.id,
557
642
  force: true
558
643
  })
@@ -574,8 +659,8 @@ var import_i18n6 = require("@wordpress/i18n");
574
659
  var import_icons6 = require("@elementor/icons");
575
660
  var import_editor_documents3 = require("@elementor/editor-documents");
576
661
  function useDocumentSaveDraftProps() {
577
- const document2 = (0, import_editor_documents3.useActiveDocument)();
578
- const { saveDraft } = (0, import_editor_documents3.useActiveDocumentActions)();
662
+ const document2 = (0, import_editor_documents3.__useActiveDocument)();
663
+ const { saveDraft } = (0, import_editor_documents3.__useActiveDocumentActions)();
579
664
  return {
580
665
  icon: import_icons6.FileReportIcon,
581
666
  title: (0, import_i18n6.__)("Save Draft", "elementor"),
@@ -589,7 +674,7 @@ var import_i18n7 = require("@wordpress/i18n");
589
674
  var import_icons7 = require("@elementor/icons");
590
675
  var import_editor_documents4 = require("@elementor/editor-documents");
591
676
  function useDocumentSaveTemplateProps() {
592
- const { saveTemplate } = (0, import_editor_documents4.useActiveDocumentActions)();
677
+ const { saveTemplate } = (0, import_editor_documents4.__useActiveDocumentActions)();
593
678
  return {
594
679
  icon: import_icons7.FolderIcon,
595
680
  title: (0, import_i18n7.__)("Save as Template", "elementor"),
@@ -628,9 +713,9 @@ function PrimaryActionMenu(props) {
628
713
  vertical: "top",
629
714
  horizontal: "right"
630
715
  },
631
- marginThreshold: 8,
716
+ marginThreshold: 4,
632
717
  PaperProps: {
633
- sx: { mt: 2 }
718
+ sx: { mt: 0.5 }
634
719
  }
635
720
  },
636
721
  saveActions.map(({ MenuItem: MenuItem3, id }, index) => [
@@ -648,9 +733,9 @@ var import_editor_documents5 = require("@elementor/editor-documents");
648
733
  var import_icons8 = require("@elementor/icons");
649
734
  var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
650
735
  function PrimaryAction() {
651
- const document2 = (0, import_editor_documents5.useActiveDocument)();
652
- const { save } = (0, import_editor_documents5.useActiveDocumentActions)();
653
- const isPreviewMode = (0, import_editor_v1_adapters4.useIsPreviewMode)();
736
+ const document2 = (0, import_editor_documents5.__useActiveDocument)();
737
+ const { save } = (0, import_editor_documents5.__useActiveDocumentActions)();
738
+ const isPreviewMode = (0, import_editor_v1_adapters4.__privateUseIsPreviewMode)();
654
739
  const popupState = (0, import_ui15.usePopupState)({
655
740
  variant: "popover",
656
741
  popupId: "document-save-options"
@@ -661,13 +746,13 @@ function PrimaryAction() {
661
746
  const isPublishDisabled = isPreviewMode || !isPublishEnabled(document2);
662
747
  const isSaveOptionsDisabled = isPreviewMode || document2.type.value === "kit";
663
748
  const shouldShowSpinner = document2.isSaving && !isPublishDisabled;
664
- return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(import_ui15.ButtonGroup, { size: "medium", variant: "contained" }, /* @__PURE__ */ React24.createElement(
749
+ return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(import_ui15.ButtonGroup, { size: "large", variant: "contained" }, /* @__PURE__ */ React24.createElement(
665
750
  import_ui15.Button,
666
751
  {
667
752
  onClick: () => !document2.isSaving && save(),
668
753
  sx: {
669
- px: 7,
670
754
  height: "100%",
755
+ borderRadius: 0,
671
756
  maxWidth: "158px",
672
757
  "&.MuiButtonBase-root.MuiButtonGroup-grouped": {
673
758
  minWidth: "110px"
@@ -675,7 +760,7 @@ function PrimaryAction() {
675
760
  },
676
761
  disabled: isPublishDisabled
677
762
  },
678
- shouldShowSpinner ? /* @__PURE__ */ React24.createElement(import_ui15.CircularProgress, null) : getLabel(document2)
763
+ shouldShowSpinner ? /* @__PURE__ */ React24.createElement(import_ui15.CircularProgress, { color: "inherit", size: "1.5em" }) : getLabel(document2)
679
764
  ), /* @__PURE__ */ React24.createElement(
680
765
  import_ui15.Tooltip,
681
766
  {
@@ -683,8 +768,8 @@ function PrimaryAction() {
683
768
  PopperProps: {
684
769
  sx: {
685
770
  "&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
686
- mt: 3,
687
- mr: 1
771
+ mt: 1,
772
+ mr: 0.25
688
773
  }
689
774
  }
690
775
  }
@@ -692,8 +777,9 @@ function PrimaryAction() {
692
777
  /* @__PURE__ */ React24.createElement(import_ui15.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React24.createElement(
693
778
  import_ui15.Button,
694
779
  {
780
+ size: "small",
695
781
  ...(0, import_ui15.bindTrigger)(popupState),
696
- sx: { px: 0, height: "100%" },
782
+ sx: { px: 0, height: "100%", borderRadius: 0 },
697
783
  disabled: isSaveOptionsDisabled,
698
784
  "aria-label": (0, import_i18n8.__)("Save Options", "elementor")
699
785
  },
@@ -739,17 +825,17 @@ var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
739
825
  function syncPanelTitle() {
740
826
  const panelTitle = (0, import_i18n9.__)("Elements", "elementor");
741
827
  const tabTitle = (0, import_i18n9.__)("Widgets", "elementor");
742
- (0, import_editor_v1_adapters5.listenTo)(
828
+ (0, import_editor_v1_adapters5.__privateListenTo)(
743
829
  (0, import_editor_v1_adapters5.routeOpenEvent)("panel/elements"),
744
830
  () => {
745
831
  setPanelTitle(panelTitle);
746
832
  setTabTitle(tabTitle);
747
833
  }
748
834
  );
749
- (0, import_editor_v1_adapters5.listenTo)(
835
+ (0, import_editor_v1_adapters5.__privateListenTo)(
750
836
  (0, import_editor_v1_adapters5.v1ReadyEvent)(),
751
837
  () => {
752
- if ((0, import_editor_v1_adapters5.isRouteActive)("panel/elements")) {
838
+ if ((0, import_editor_v1_adapters5.__privateIsRouteActive)("panel/elements")) {
753
839
  setPanelTitle(panelTitle);
754
840
  setTabTitle(tabTitle);
755
841
  }
@@ -771,11 +857,11 @@ var import_icons9 = require("@elementor/icons");
771
857
  var import_i18n10 = require("@wordpress/i18n");
772
858
  var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
773
859
  function useActionProps2() {
774
- const { isActive, isBlocked } = (0, import_editor_v1_adapters6.useRouteStatus)("panel/elements");
860
+ const { isActive, isBlocked } = (0, import_editor_v1_adapters6.__privateUseRouteStatus)("panel/elements");
775
861
  return {
776
862
  title: (0, import_i18n10.__)("Add Element", "elementor"),
777
863
  icon: import_icons9.PlusIcon,
778
- onClick: () => (0, import_editor_v1_adapters6.openRoute)("panel/elements/categories"),
864
+ onClick: () => (0, import_editor_v1_adapters6.__privateOpenRoute)("panel/elements/categories"),
779
865
  selected: isActive,
780
866
  disabled: isBlocked
781
867
  };
@@ -796,22 +882,21 @@ var import_i18n11 = require("@wordpress/i18n");
796
882
  var import_icons10 = require("@elementor/icons");
797
883
  var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
798
884
  function useActionProps3() {
799
- const { isActive, isBlocked } = (0, import_editor_v1_adapters7.useRouteStatus)("finder", {
885
+ const { isBlocked } = (0, import_editor_v1_adapters7.__privateUseRouteStatus)("finder", {
800
886
  blockOnKitRoutes: false,
801
887
  blockOnPreviewMode: false
802
888
  });
803
889
  return {
804
890
  title: (0, import_i18n11.__)("Finder", "elementor"),
805
891
  icon: import_icons10.SearchIcon,
806
- onClick: () => (0, import_editor_v1_adapters7.runCommand)("finder/toggle"),
807
- selected: isActive,
892
+ onClick: () => (0, import_editor_v1_adapters7.__privateRunCommand)("finder/toggle"),
808
893
  disabled: isBlocked
809
894
  };
810
895
  }
811
896
 
812
897
  // src/extensions/finder/index.ts
813
898
  function init5() {
814
- utilitiesMenu.registerToggleAction({
899
+ utilitiesMenu.registerAction({
815
900
  id: "toggle-finder",
816
901
  priority: 10,
817
902
  // Before help.
@@ -843,11 +928,11 @@ var import_icons12 = require("@elementor/icons");
843
928
  var import_i18n13 = require("@wordpress/i18n");
844
929
  var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
845
930
  function useActionProps4() {
846
- const { isActive, isBlocked } = (0, import_editor_v1_adapters8.useRouteStatus)("panel/history");
931
+ const { isActive, isBlocked } = (0, import_editor_v1_adapters8.__privateUseRouteStatus)("panel/history");
847
932
  return {
848
933
  title: (0, import_i18n13.__)("History", "elementor"),
849
934
  icon: import_icons12.HistoryIcon,
850
- onClick: () => (0, import_editor_v1_adapters8.openRoute)("panel/history/actions"),
935
+ onClick: () => (0, import_editor_v1_adapters8.__privateOpenRoute)("panel/history/actions"),
851
936
  selected: isActive,
852
937
  disabled: isBlocked
853
938
  };
@@ -870,7 +955,7 @@ function useActionProps5() {
870
955
  return {
871
956
  icon: import_icons13.KeyboardIcon,
872
957
  title: (0, import_i18n14.__)("Keyboard Shortcuts", "elementor"),
873
- onClick: () => (0, import_editor_v1_adapters9.runCommand)("shortcuts/open")
958
+ onClick: () => (0, import_editor_v1_adapters9.__privateRunCommand)("shortcuts/open")
874
959
  };
875
960
  }
876
961
 
@@ -896,7 +981,7 @@ var React25 = __toESM(require("react"));
896
981
  var import_ui16 = require("@elementor/ui");
897
982
  var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
898
983
  function Portal(props) {
899
- const containerRef = (0, import_editor_v1_adapters10.useListenTo)(
984
+ const containerRef = (0, import_editor_v1_adapters10.__privateUseListenTo)(
900
985
  [
901
986
  (0, import_editor_v1_adapters10.routeOpenEvent)("panel/global"),
902
987
  (0, import_editor_v1_adapters10.routeCloseEvent)("panel/global")
@@ -909,7 +994,7 @@ function Portal(props) {
909
994
  return /* @__PURE__ */ React25.createElement(import_ui16.Portal, { container: containerRef.current, ...props });
910
995
  }
911
996
  function getContainerRef() {
912
- return (0, import_editor_v1_adapters10.isRouteActive)("panel/global") ? { current: document.querySelector("#elementor-panel-inner") } : { current: null };
997
+ return (0, import_editor_v1_adapters10.__privateIsRouteActive)("panel/global") ? { current: document.querySelector("#elementor-panel-inner") } : { current: null };
913
998
  }
914
999
 
915
1000
  // src/extensions/site-settings/components/primary-action.tsx
@@ -918,8 +1003,8 @@ var import_editor_documents6 = require("@elementor/editor-documents");
918
1003
  var import_ui17 = require("@elementor/ui");
919
1004
  var import_i18n15 = require("@wordpress/i18n");
920
1005
  function PrimaryAction2() {
921
- const document2 = (0, import_editor_documents6.useActiveDocument)();
922
- const { save } = (0, import_editor_documents6.useActiveDocumentActions)();
1006
+ const document2 = (0, import_editor_documents6.__useActiveDocument)();
1007
+ const { save } = (0, import_editor_documents6.__useActiveDocumentActions)();
923
1008
  return /* @__PURE__ */ React26.createElement(import_ui17.Paper, { sx: {
924
1009
  px: 5,
925
1010
  py: 4,
@@ -948,13 +1033,13 @@ var import_i18n16 = require("@wordpress/i18n");
948
1033
  var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
949
1034
  var import_icons14 = require("@elementor/icons");
950
1035
  function useActionProps6() {
951
- const { isActive, isBlocked } = (0, import_editor_v1_adapters11.useRouteStatus)("panel/global", {
1036
+ const { isActive, isBlocked } = (0, import_editor_v1_adapters11.__privateUseRouteStatus)("panel/global", {
952
1037
  blockOnKitRoutes: false
953
1038
  });
954
1039
  return {
955
1040
  title: (0, import_i18n16.__)("Site Settings", "elementor"),
956
1041
  icon: import_icons14.AdjustmentsHorizontalIcon,
957
- onClick: () => isActive ? (0, import_editor_v1_adapters11.runCommand)("panel/global/close") : (0, import_editor_v1_adapters11.runCommand)("panel/global/open"),
1042
+ onClick: () => isActive ? (0, import_editor_v1_adapters11.__privateRunCommand)("panel/global/close") : (0, import_editor_v1_adapters11.__privateRunCommand)("panel/global/open"),
958
1043
  selected: isActive,
959
1044
  disabled: isBlocked
960
1045
  };
@@ -978,11 +1063,11 @@ var import_i18n17 = require("@wordpress/i18n");
978
1063
  var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
979
1064
  var import_icons15 = require("@elementor/icons");
980
1065
  function useActionProps7() {
981
- const { isActive, isBlocked } = (0, import_editor_v1_adapters12.useRouteStatus)("navigator");
1066
+ const { isActive, isBlocked } = (0, import_editor_v1_adapters12.__privateUseRouteStatus)("navigator");
982
1067
  return {
983
1068
  title: (0, import_i18n17.__)("Structure", "elementor"),
984
1069
  icon: import_icons15.StructureIcon,
985
- onClick: () => (0, import_editor_v1_adapters12.runCommand)("navigator/toggle"),
1070
+ onClick: () => (0, import_editor_v1_adapters12.__privateRunCommand)("navigator/toggle"),
986
1071
  selected: isActive,
987
1072
  disabled: isBlocked
988
1073
  };
@@ -1005,7 +1090,7 @@ function useActionProps8() {
1005
1090
  return {
1006
1091
  icon: import_icons16.ThemeBuilderIcon,
1007
1092
  title: (0, import_i18n18.__)("Theme Builder", "elementor"),
1008
- onClick: () => (0, import_editor_v1_adapters13.runCommand)("app/open")
1093
+ onClick: () => (0, import_editor_v1_adapters13.__privateRunCommand)("app/open")
1009
1094
  };
1010
1095
  }
1011
1096
 
@@ -1022,11 +1107,11 @@ var import_i18n19 = require("@wordpress/i18n");
1022
1107
  var import_icons17 = require("@elementor/icons");
1023
1108
  var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
1024
1109
  function useActionProps9() {
1025
- const { isActive, isBlocked } = (0, import_editor_v1_adapters14.useRouteStatus)("panel/editor-preferences");
1110
+ const { isActive, isBlocked } = (0, import_editor_v1_adapters14.__privateUseRouteStatus)("panel/editor-preferences");
1026
1111
  return {
1027
1112
  icon: import_icons17.ToggleRightIcon,
1028
1113
  title: (0, import_i18n19.__)("User Preferences", "elementor"),
1029
- onClick: () => (0, import_editor_v1_adapters14.openRoute)("panel/editor-preferences"),
1114
+ onClick: () => (0, import_editor_v1_adapters14.__privateOpenRoute)("panel/editor-preferences"),
1030
1115
  selected: isActive,
1031
1116
  disabled: isBlocked
1032
1117
  };
@@ -1051,7 +1136,7 @@ function init13() {
1051
1136
  id: "exit-to-wordpress",
1052
1137
  group: "exits",
1053
1138
  useProps: () => {
1054
- const document2 = (0, import_editor_documents7.useActiveDocument)();
1139
+ const document2 = (0, import_editor_documents7.__useActiveDocument)();
1055
1140
  return {
1056
1141
  title: (0, import_i18n20.__)("Exit to WordPress", "elementor"),
1057
1142
  href: document2?.links?.platformEdit,