@wordpress/edit-widgets 6.57.0 → 7.1.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 (195) hide show
  1. package/build/blocks/widget-area/edit/index.cjs +106 -116
  2. package/build/blocks/widget-area/edit/index.cjs.map +1 -7
  3. package/build/blocks/widget-area/edit/inner-blocks.cjs +44 -62
  4. package/build/blocks/widget-area/edit/inner-blocks.cjs.map +1 -7
  5. package/build/blocks/widget-area/edit/use-is-dragging-within.cjs +41 -53
  6. package/build/blocks/widget-area/edit/use-is-dragging-within.cjs.map +1 -7
  7. package/build/blocks/widget-area/index.cjs +40 -44
  8. package/build/blocks/widget-area/index.cjs.map +1 -7
  9. package/build/components/error-boundary/index.cjs +115 -155
  10. package/build/components/error-boundary/index.cjs.map +1 -7
  11. package/build/components/header/document-tools/index.cjs +80 -115
  12. package/build/components/header/document-tools/index.cjs.map +1 -7
  13. package/build/components/header/index.cjs +72 -80
  14. package/build/components/header/index.cjs.map +1 -7
  15. package/build/components/header/undo-redo/redo.cjs +30 -52
  16. package/build/components/header/undo-redo/redo.cjs.map +1 -7
  17. package/build/components/header/undo-redo/undo.cjs +29 -51
  18. package/build/components/header/undo-redo/undo.cjs.map +1 -7
  19. package/build/components/keyboard-shortcut-help-modal/config.cjs +88 -85
  20. package/build/components/keyboard-shortcut-help-modal/config.cjs.map +1 -7
  21. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs +40 -57
  22. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs.map +1 -7
  23. package/build/components/keyboard-shortcut-help-modal/index.cjs +94 -161
  24. package/build/components/keyboard-shortcut-help-modal/index.cjs.map +1 -7
  25. package/build/components/keyboard-shortcut-help-modal/shortcut.cjs +37 -75
  26. package/build/components/keyboard-shortcut-help-modal/shortcut.cjs.map +1 -7
  27. package/build/components/keyboard-shortcuts/index.cjs +107 -140
  28. package/build/components/keyboard-shortcuts/index.cjs.map +1 -7
  29. package/build/components/layout/index.cjs +65 -74
  30. package/build/components/layout/index.cjs.map +1 -7
  31. package/build/components/layout/interface.cjs +82 -102
  32. package/build/components/layout/interface.cjs.map +1 -7
  33. package/build/components/layout/unsaved-changes-warning.cjs +44 -48
  34. package/build/components/layout/unsaved-changes-warning.cjs.map +1 -7
  35. package/build/components/more-menu/index.cjs +125 -191
  36. package/build/components/more-menu/index.cjs.map +1 -7
  37. package/build/components/more-menu/tools-more-menu-group.cjs +9 -29
  38. package/build/components/more-menu/tools-more-menu-group.cjs.map +1 -7
  39. package/build/components/notices/index.cjs +19 -39
  40. package/build/components/notices/index.cjs.map +1 -7
  41. package/build/components/save-button/index.cjs +31 -58
  42. package/build/components/save-button/index.cjs.map +1 -7
  43. package/build/components/secondary-sidebar/index.cjs +38 -45
  44. package/build/components/secondary-sidebar/index.cjs.map +1 -7
  45. package/build/components/secondary-sidebar/inserter-sidebar.cjs +50 -51
  46. package/build/components/secondary-sidebar/inserter-sidebar.cjs.map +1 -7
  47. package/build/components/secondary-sidebar/list-view-sidebar.cjs +51 -82
  48. package/build/components/secondary-sidebar/list-view-sidebar.cjs.map +1 -7
  49. package/build/components/sidebar/index.cjs +117 -180
  50. package/build/components/sidebar/index.cjs.map +1 -7
  51. package/build/components/sidebar/widget-areas.cjs +43 -85
  52. package/build/components/sidebar/widget-areas.cjs.map +1 -7
  53. package/build/components/welcome-guide/index.cjs +110 -186
  54. package/build/components/welcome-guide/index.cjs.map +1 -7
  55. package/build/components/widget-areas-block-editor-content/index.cjs +59 -63
  56. package/build/components/widget-areas-block-editor-content/index.cjs.map +1 -7
  57. package/build/components/widget-areas-block-editor-provider/index.cjs +105 -140
  58. package/build/components/widget-areas-block-editor-provider/index.cjs.map +1 -7
  59. package/build/constants.cjs +11 -32
  60. package/build/constants.cjs.map +1 -7
  61. package/build/filters/index.cjs +7 -4
  62. package/build/filters/move-to-widget-area.cjs +38 -53
  63. package/build/filters/move-to-widget-area.cjs.map +1 -7
  64. package/build/filters/replace-media-upload.cjs +11 -9
  65. package/build/filters/replace-media-upload.cjs.map +1 -7
  66. package/build/hooks/use-last-selected-widget-area.cjs +28 -49
  67. package/build/hooks/use-last-selected-widget-area.cjs.map +1 -7
  68. package/build/hooks/use-widget-library-insertion-point.cjs +33 -67
  69. package/build/hooks/use-widget-library-insertion-point.cjs.map +1 -7
  70. package/build/index.cjs +96 -97
  71. package/build/index.cjs.map +1 -7
  72. package/build/lock-unlock.cjs +10 -35
  73. package/build/lock-unlock.cjs.map +1 -7
  74. package/build/store/actions.cjs +269 -278
  75. package/build/store/actions.cjs.map +1 -7
  76. package/build/store/constants.cjs +12 -29
  77. package/build/store/constants.cjs.map +1 -7
  78. package/build/store/index.cjs +61 -52
  79. package/build/store/index.cjs.map +1 -7
  80. package/build/store/private-selectors.cjs +11 -32
  81. package/build/store/private-selectors.cjs.map +1 -7
  82. package/build/store/reducer.cjs +107 -88
  83. package/build/store/reducer.cjs.map +1 -7
  84. package/build/store/resolvers.cjs +60 -91
  85. package/build/store/resolvers.cjs.map +1 -7
  86. package/build/store/selectors.cjs +196 -229
  87. package/build/store/selectors.cjs.map +1 -7
  88. package/build/store/transformers.cjs +51 -82
  89. package/build/store/transformers.cjs.map +1 -7
  90. package/build/store/utils.cjs +76 -63
  91. package/build/store/utils.cjs.map +1 -7
  92. package/build-module/blocks/widget-area/edit/index.mjs +82 -94
  93. package/build-module/blocks/widget-area/edit/index.mjs.map +1 -7
  94. package/build-module/blocks/widget-area/edit/inner-blocks.mjs +19 -35
  95. package/build-module/blocks/widget-area/edit/inner-blocks.mjs.map +1 -7
  96. package/build-module/blocks/widget-area/edit/use-is-dragging-within.mjs +36 -33
  97. package/build-module/blocks/widget-area/edit/use-is-dragging-within.mjs.map +1 -7
  98. package/build-module/blocks/widget-area/index.mjs +12 -15
  99. package/build-module/blocks/widget-area/index.mjs.map +1 -7
  100. package/build-module/components/error-boundary/index.mjs +103 -128
  101. package/build-module/components/error-boundary/index.mjs.map +1 -7
  102. package/build-module/components/header/document-tools/index.mjs +51 -84
  103. package/build-module/components/header/document-tools/index.mjs.map +1 -7
  104. package/build-module/components/header/index.mjs +40 -47
  105. package/build-module/components/header/index.mjs.map +1 -7
  106. package/build-module/components/header/undo-redo/redo.mjs +20 -27
  107. package/build-module/components/header/undo-redo/redo.mjs.map +1 -7
  108. package/build-module/components/header/undo-redo/undo.mjs +19 -26
  109. package/build-module/components/header/undo-redo/undo.mjs.map +1 -7
  110. package/build-module/components/keyboard-shortcut-help-modal/config.mjs +83 -61
  111. package/build-module/components/keyboard-shortcut-help-modal/config.mjs.map +1 -7
  112. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs +19 -33
  113. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs.map +1 -7
  114. package/build-module/components/keyboard-shortcut-help-modal/index.mjs +67 -136
  115. package/build-module/components/keyboard-shortcut-help-modal/index.mjs.map +1 -7
  116. package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs +31 -54
  117. package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs.map +1 -7
  118. package/build-module/components/keyboard-shortcuts/index.mjs +99 -119
  119. package/build-module/components/keyboard-shortcuts/index.mjs.map +1 -7
  120. package/build-module/components/layout/index.mjs +29 -40
  121. package/build-module/components/layout/index.mjs.map +1 -7
  122. package/build-module/components/layout/interface.mjs +53 -76
  123. package/build-module/components/layout/interface.mjs.map +1 -7
  124. package/build-module/components/layout/unsaved-changes-warning.mjs +37 -26
  125. package/build-module/components/layout/unsaved-changes-warning.mjs.map +1 -7
  126. package/build-module/components/more-menu/index.mjs +95 -162
  127. package/build-module/components/more-menu/index.mjs.map +1 -7
  128. package/build-module/components/more-menu/tools-more-menu-group.mjs +5 -9
  129. package/build-module/components/more-menu/tools-more-menu-group.mjs.map +1 -7
  130. package/build-module/components/notices/index.mjs +12 -17
  131. package/build-module/components/notices/index.mjs.map +1 -7
  132. package/build-module/components/save-button/index.mjs +23 -35
  133. package/build-module/components/save-button/index.mjs.map +1 -7
  134. package/build-module/components/secondary-sidebar/index.mjs +15 -20
  135. package/build-module/components/secondary-sidebar/index.mjs.map +1 -7
  136. package/build-module/components/secondary-sidebar/inserter-sidebar.mjs +27 -25
  137. package/build-module/components/secondary-sidebar/inserter-sidebar.mjs.map +1 -7
  138. package/build-module/components/secondary-sidebar/list-view-sidebar.mjs +39 -55
  139. package/build-module/components/secondary-sidebar/list-view-sidebar.mjs.map +1 -7
  140. package/build-module/components/sidebar/index.mjs +96 -162
  141. package/build-module/components/sidebar/index.mjs.map +1 -7
  142. package/build-module/components/sidebar/widget-areas.mjs +30 -57
  143. package/build-module/components/sidebar/widget-areas.mjs.map +1 -7
  144. package/build-module/components/welcome-guide/index.mjs +103 -164
  145. package/build-module/components/welcome-guide/index.mjs.map +1 -7
  146. package/build-module/components/widget-areas-block-editor-content/index.mjs +35 -44
  147. package/build-module/components/widget-areas-block-editor-content/index.mjs.map +1 -7
  148. package/build-module/components/widget-areas-block-editor-provider/index.mjs +76 -109
  149. package/build-module/components/widget-areas-block-editor-provider/index.mjs.map +1 -7
  150. package/build-module/constants.mjs +5 -7
  151. package/build-module/constants.mjs.map +1 -7
  152. package/build-module/filters/index.mjs +0 -2
  153. package/build-module/filters/move-to-widget-area.mjs +28 -48
  154. package/build-module/filters/move-to-widget-area.mjs.map +1 -7
  155. package/build-module/filters/replace-media-upload.mjs +5 -8
  156. package/build-module/filters/replace-media-upload.mjs.map +1 -7
  157. package/build-module/hooks/use-last-selected-widget-area.mjs +23 -29
  158. package/build-module/hooks/use-last-selected-widget-area.mjs.map +1 -7
  159. package/build-module/hooks/use-widget-library-insertion-point.mjs +28 -47
  160. package/build-module/hooks/use-widget-library-insertion-point.mjs.map +1 -7
  161. package/build-module/index.mjs +62 -79
  162. package/build-module/index.mjs.map +1 -7
  163. package/build-module/lock-unlock.mjs +5 -10
  164. package/build-module/lock-unlock.mjs.map +1 -7
  165. package/build-module/store/actions.mjs +250 -247
  166. package/build-module/store/actions.mjs.map +1 -7
  167. package/build-module/store/constants.mjs +7 -5
  168. package/build-module/store/constants.mjs.map +1 -7
  169. package/build-module/store/index.mjs +18 -16
  170. package/build-module/store/index.mjs.map +1 -7
  171. package/build-module/store/private-selectors.mjs +5 -7
  172. package/build-module/store/private-selectors.mjs.map +1 -7
  173. package/build-module/store/reducer.mjs +95 -58
  174. package/build-module/store/reducer.mjs.map +1 -7
  175. package/build-module/store/resolvers.mjs +52 -71
  176. package/build-module/store/resolvers.mjs.map +1 -7
  177. package/build-module/store/selectors.mjs +178 -199
  178. package/build-module/store/selectors.mjs.map +1 -7
  179. package/build-module/store/transformers.mjs +44 -56
  180. package/build-module/store/transformers.mjs.map +1 -7
  181. package/build-module/store/utils.mjs +64 -32
  182. package/build-module/store/utils.mjs.map +1 -7
  183. package/build-style/style-rtl.css +12 -12
  184. package/build-style/style.css +12 -12
  185. package/package.json +35 -36
  186. package/src/components/header/index.jsx +2 -2
  187. package/src/components/layout/interface.jsx +4 -1
  188. package/src/components/layout/style.scss +11 -0
  189. package/src/components/notices/style.scss +2 -2
  190. package/src/components/sidebar/index.jsx +18 -18
  191. package/src/components/welcome-guide/index.jsx +4 -2
  192. package/src/components/widget-areas-block-editor-content/index.jsx +4 -3
  193. package/CHANGELOG.md +0 -325
  194. package/build/filters/index.cjs.map +0 -7
  195. package/build-module/filters/index.mjs.map +0 -7
@@ -1,146 +1,113 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // packages/edit-widgets/src/components/keyboard-shortcuts/index.js
20
- var keyboard_shortcuts_exports = {};
21
- __export(keyboard_shortcuts_exports, {
22
- default: () => keyboard_shortcuts_default
1
+ "use strict";
2
+ Object.defineProperties(exports, {
3
+ __esModule: { value: true },
4
+ [Symbol.toStringTag]: { value: "Module" }
23
5
  });
24
- module.exports = __toCommonJS(keyboard_shortcuts_exports);
25
- var import_element = require("@wordpress/element");
26
- var import_keyboard_shortcuts = require("@wordpress/keyboard-shortcuts");
27
- var import_keycodes = require("@wordpress/keycodes");
28
- var import_data = require("@wordpress/data");
29
- var import_i18n = require("@wordpress/i18n");
30
- var import_core_data = require("@wordpress/core-data");
31
- var import_block_editor = require("@wordpress/block-editor");
32
- var import_store = require("../../store/index.cjs");
33
- var import_lock_unlock = require("../../lock-unlock.cjs");
34
- var { usesNativeUndo } = (0, import_lock_unlock.unlock)(import_block_editor.privateApis);
6
+ let _wordpress_element = require("@wordpress/element");
7
+ let _wordpress_keyboard_shortcuts = require("@wordpress/keyboard-shortcuts");
8
+ let _wordpress_keycodes = require("@wordpress/keycodes");
9
+ let _wordpress_data = require("@wordpress/data");
10
+ let _wordpress_i18n = require("@wordpress/i18n");
11
+ let _wordpress_core_data = require("@wordpress/core-data");
12
+ let _wordpress_block_editor = require("@wordpress/block-editor");
13
+ let ______store_index_js = require("../../store/index.cjs");
14
+ // packages/edit-widgets/src/components/keyboard-shortcuts/index.js
15
+ const { usesNativeUndo } = (0, require("../../lock-unlock.cjs").unlock)(_wordpress_block_editor.privateApis);
35
16
  function KeyboardShortcuts() {
36
- const { redo, undo } = (0, import_data.useDispatch)(import_core_data.store);
37
- const { saveEditedWidgetAreas } = (0, import_data.useDispatch)(import_store.store);
38
- (0, import_keyboard_shortcuts.useShortcut)("core/edit-widgets/undo", (event) => {
39
- if (usesNativeUndo(event)) {
40
- return;
41
- }
42
- undo();
43
- event.preventDefault();
44
- });
45
- (0, import_keyboard_shortcuts.useShortcut)("core/edit-widgets/redo", (event) => {
46
- if (usesNativeUndo(event)) {
47
- return;
48
- }
49
- redo();
50
- event.preventDefault();
51
- });
52
- (0, import_keyboard_shortcuts.useShortcut)("core/edit-widgets/save", (event) => {
53
- event.preventDefault();
54
- saveEditedWidgetAreas();
55
- });
56
- return null;
17
+ const { redo, undo } = (0, _wordpress_data.useDispatch)(_wordpress_core_data.store);
18
+ const { saveEditedWidgetAreas } = (0, _wordpress_data.useDispatch)(______store_index_js.store);
19
+ (0, _wordpress_keyboard_shortcuts.useShortcut)("core/edit-widgets/undo", (event) => {
20
+ if (usesNativeUndo(event)) return;
21
+ undo();
22
+ event.preventDefault();
23
+ });
24
+ (0, _wordpress_keyboard_shortcuts.useShortcut)("core/edit-widgets/redo", (event) => {
25
+ if (usesNativeUndo(event)) return;
26
+ redo();
27
+ event.preventDefault();
28
+ });
29
+ (0, _wordpress_keyboard_shortcuts.useShortcut)("core/edit-widgets/save", (event) => {
30
+ event.preventDefault();
31
+ saveEditedWidgetAreas();
32
+ });
33
+ return null;
57
34
  }
58
35
  function KeyboardShortcutsRegister() {
59
- const { registerShortcut } = (0, import_data.useDispatch)(import_keyboard_shortcuts.store);
60
- (0, import_element.useEffect)(() => {
61
- registerShortcut({
62
- name: "core/edit-widgets/undo",
63
- category: "global",
64
- description: (0, import_i18n.__)("Undo your last changes."),
65
- keyCombination: {
66
- modifier: "primary",
67
- character: "z"
68
- }
69
- });
70
- registerShortcut({
71
- name: "core/edit-widgets/redo",
72
- category: "global",
73
- description: (0, import_i18n.__)("Redo your last undo."),
74
- keyCombination: {
75
- modifier: "primaryShift",
76
- character: "z"
77
- },
78
- // Disable on Apple OS because it conflicts with the browser's
79
- // history shortcut. It's a fine alias for both Windows and Linux.
80
- // Since there's no conflict for Ctrl+Shift+Z on both Windows and
81
- // Linux, we keep it as the default for consistency.
82
- aliases: (0, import_keycodes.isAppleOS)() ? [] : [
83
- {
84
- modifier: "primary",
85
- character: "y"
86
- }
87
- ]
88
- });
89
- registerShortcut({
90
- name: "core/edit-widgets/save",
91
- category: "global",
92
- description: (0, import_i18n.__)("Save your changes."),
93
- keyCombination: {
94
- modifier: "primary",
95
- character: "s"
96
- }
97
- });
98
- registerShortcut({
99
- name: "core/edit-widgets/keyboard-shortcuts",
100
- category: "main",
101
- description: (0, import_i18n.__)("Display these keyboard shortcuts."),
102
- keyCombination: {
103
- modifier: "access",
104
- character: "h"
105
- }
106
- });
107
- registerShortcut({
108
- name: "core/edit-widgets/next-region",
109
- category: "global",
110
- description: (0, import_i18n.__)("Navigate to the next part of the editor."),
111
- keyCombination: {
112
- modifier: "ctrl",
113
- character: "`"
114
- },
115
- aliases: [
116
- {
117
- modifier: "access",
118
- character: "n"
119
- }
120
- ]
121
- });
122
- registerShortcut({
123
- name: "core/edit-widgets/previous-region",
124
- category: "global",
125
- description: (0, import_i18n.__)("Navigate to the previous part of the editor."),
126
- keyCombination: {
127
- modifier: "ctrlShift",
128
- character: "`"
129
- },
130
- aliases: [
131
- {
132
- modifier: "access",
133
- character: "p"
134
- },
135
- {
136
- modifier: "ctrlShift",
137
- character: "~"
138
- }
139
- ]
140
- });
141
- }, [registerShortcut]);
142
- return null;
36
+ const { registerShortcut } = (0, _wordpress_data.useDispatch)(_wordpress_keyboard_shortcuts.store);
37
+ (0, _wordpress_element.useEffect)(() => {
38
+ registerShortcut({
39
+ name: "core/edit-widgets/undo",
40
+ category: "global",
41
+ description: (0, _wordpress_i18n.__)("Undo your last changes."),
42
+ keyCombination: {
43
+ modifier: "primary",
44
+ character: "z"
45
+ }
46
+ });
47
+ registerShortcut({
48
+ name: "core/edit-widgets/redo",
49
+ category: "global",
50
+ description: (0, _wordpress_i18n.__)("Redo your last undo."),
51
+ keyCombination: {
52
+ modifier: "primaryShift",
53
+ character: "z"
54
+ },
55
+ aliases: (0, _wordpress_keycodes.isAppleOS)() ? [] : [{
56
+ modifier: "primary",
57
+ character: "y"
58
+ }]
59
+ });
60
+ registerShortcut({
61
+ name: "core/edit-widgets/save",
62
+ category: "global",
63
+ description: (0, _wordpress_i18n.__)("Save your changes."),
64
+ keyCombination: {
65
+ modifier: "primary",
66
+ character: "s"
67
+ }
68
+ });
69
+ registerShortcut({
70
+ name: "core/edit-widgets/keyboard-shortcuts",
71
+ category: "main",
72
+ description: (0, _wordpress_i18n.__)("Display these keyboard shortcuts."),
73
+ keyCombination: {
74
+ modifier: "access",
75
+ character: "h"
76
+ }
77
+ });
78
+ registerShortcut({
79
+ name: "core/edit-widgets/next-region",
80
+ category: "global",
81
+ description: (0, _wordpress_i18n.__)("Navigate to the next part of the editor."),
82
+ keyCombination: {
83
+ modifier: "ctrl",
84
+ character: "`"
85
+ },
86
+ aliases: [{
87
+ modifier: "access",
88
+ character: "n"
89
+ }]
90
+ });
91
+ registerShortcut({
92
+ name: "core/edit-widgets/previous-region",
93
+ category: "global",
94
+ description: (0, _wordpress_i18n.__)("Navigate to the previous part of the editor."),
95
+ keyCombination: {
96
+ modifier: "ctrlShift",
97
+ character: "`"
98
+ },
99
+ aliases: [{
100
+ modifier: "access",
101
+ character: "p"
102
+ }, {
103
+ modifier: "ctrlShift",
104
+ character: "~"
105
+ }]
106
+ });
107
+ }, [registerShortcut]);
108
+ return null;
143
109
  }
144
110
  KeyboardShortcuts.Register = KeyboardShortcutsRegister;
145
- var keyboard_shortcuts_default = KeyboardShortcuts;
146
- //# sourceMappingURL=index.cjs.map
111
+ exports.default = KeyboardShortcuts;
112
+
113
+ //# sourceMappingURL=index.cjs.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/keyboard-shortcuts/index.js"],
4
- "sourcesContent": ["import { useEffect } from '@wordpress/element';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { isAppleOS } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { store as editWidgetsStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { usesNativeUndo } = unlock( blockEditorPrivateApis );\n\nfunction KeyboardShortcuts() {\n\tconst { redo, undo } = useDispatch( coreStore );\n\tconst { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );\n\n\tuseShortcut( 'core/edit-widgets/undo', ( event ) => {\n\t\tif ( usesNativeUndo( event ) ) {\n\t\t\treturn;\n\t\t}\n\t\tundo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/redo', ( event ) => {\n\t\tif ( usesNativeUndo( event ) ) {\n\t\t\treturn;\n\t\t}\n\t\tredo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/save', ( event ) => {\n\t\tevent.preventDefault();\n\t\tsaveEditedWidgetAreas();\n\t} );\n\n\treturn null;\n}\n\nfunction KeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/undo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Undo your last changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/redo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Redo your last undo.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t\t// Disable on Apple OS because it conflicts with the browser's\n\t\t\t// history shortcut. It's a fine alias for both Windows and Linux.\n\t\t\t// Since there's no conflict for Ctrl+Shift+Z on both Windows and\n\t\t\t// Linux, we keep it as the default for consistency.\n\t\t\taliases: isAppleOS()\n\t\t\t\t? []\n\t\t\t\t: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmodifier: 'primary',\n\t\t\t\t\t\t\tcharacter: 'y',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/save',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Save your changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 's',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/keyboard-shortcuts',\n\t\t\tcategory: 'main',\n\t\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'h',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/next-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the next part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrl',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'n',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/previous-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the previous part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'p',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\t\tcharacter: '~',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn null;\n}\n\nKeyboardShortcuts.Register = KeyboardShortcutsRegister;\nexport default KeyboardShortcuts;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA0B;AAC1B,gCAGO;AACP,sBAA0B;AAC1B,kBAA4B;AAC5B,kBAAmB;AACnB,uBAAmC;AACnC,0BAAsD;AACtD,mBAA0C;AAC1C,yBAAuB;AAEvB,IAAM,EAAE,eAAe,QAAI,2BAAQ,oBAAAA,WAAuB;AAE1D,SAAS,oBAAoB;AAC5B,QAAM,EAAE,MAAM,KAAK,QAAI,yBAAa,iBAAAC,KAAU;AAC9C,QAAM,EAAE,sBAAsB,QAAI,yBAAa,aAAAC,KAAiB;AAEhE,6CAAa,0BAA0B,CAAE,UAAW;AACnD,QAAK,eAAgB,KAAM,GAAI;AAC9B;AAAA,IACD;AACA,SAAK;AACL,UAAM,eAAe;AAAA,EACtB,CAAE;AAEF,6CAAa,0BAA0B,CAAE,UAAW;AACnD,QAAK,eAAgB,KAAM,GAAI;AAC9B;AAAA,IACD;AACA,SAAK;AACL,UAAM,eAAe;AAAA,EACtB,CAAE;AAEF,6CAAa,0BAA0B,CAAE,UAAW;AACnD,UAAM,eAAe;AACrB,0BAAsB;AAAA,EACvB,CAAE;AAEF,SAAO;AACR;AAEA,SAAS,4BAA4B;AAEpC,QAAM,EAAE,iBAAiB,QAAI,yBAAa,0BAAAC,KAAuB;AACjE,gCAAW,MAAM;AAChB,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,iBAAa,gBAAI,yBAA0B;AAAA,MAC3C,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,IACD,CAAE;AAEF,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,iBAAa,gBAAI,sBAAuB;AAAA,MACxC,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA;AAAA;AAAA;AAAA;AAAA,MAKA,aAAS,2BAAU,IAChB,CAAC,IACD;AAAA,QACA;AAAA,UACC,UAAU;AAAA,UACV,WAAW;AAAA,QACZ;AAAA,MACD;AAAA,IACH,CAAE;AAEF,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,iBAAa,gBAAI,oBAAqB;AAAA,MACtC,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,IACD,CAAE;AAEF,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,iBAAa,gBAAI,mCAAoC;AAAA,MACrD,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,IACD,CAAE;AAEF,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,iBAAa,gBAAI,0CAA2C;AAAA,MAC5D,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,MACA,SAAS;AAAA,QACR;AAAA,UACC,UAAU;AAAA,UACV,WAAW;AAAA,QACZ;AAAA,MACD;AAAA,IACD,CAAE;AAEF,qBAAkB;AAAA,MACjB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,iBAAa,gBAAI,8CAA+C;AAAA,MAChE,gBAAgB;AAAA,QACf,UAAU;AAAA,QACV,WAAW;AAAA,MACZ;AAAA,MACA,SAAS;AAAA,QACR;AAAA,UACC,UAAU;AAAA,UACV,WAAW;AAAA,QACZ;AAAA,QACA;AAAA,UACC,UAAU;AAAA,UACV,WAAW;AAAA,QACZ;AAAA,MACD;AAAA,IACD,CAAE;AAAA,EACH,GAAG,CAAE,gBAAiB,CAAE;AAExB,SAAO;AACR;AAEA,kBAAkB,WAAW;AAC7B,IAAO,6BAAQ;",
6
- "names": ["blockEditorPrivateApis", "coreStore", "editWidgetsStore", "keyboardShortcutsStore"]
7
- }
1
+ {"version":3,"file":"index.cjs","names":["unlock","blockEditorPrivateApis","useDispatch","coreStore","editWidgetsStore","keyboardShortcutsStore","__","isAppleOS"],"sources":["../../../src/components/keyboard-shortcuts/index.js"],"sourcesContent":["import { useEffect } from '@wordpress/element';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { isAppleOS } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { store as editWidgetsStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { usesNativeUndo } = unlock( blockEditorPrivateApis );\n\nfunction KeyboardShortcuts() {\n\tconst { redo, undo } = useDispatch( coreStore );\n\tconst { saveEditedWidgetAreas } = useDispatch( editWidgetsStore );\n\n\tuseShortcut( 'core/edit-widgets/undo', ( event ) => {\n\t\tif ( usesNativeUndo( event ) ) {\n\t\t\treturn;\n\t\t}\n\t\tundo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/redo', ( event ) => {\n\t\tif ( usesNativeUndo( event ) ) {\n\t\t\treturn;\n\t\t}\n\t\tredo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/edit-widgets/save', ( event ) => {\n\t\tevent.preventDefault();\n\t\tsaveEditedWidgetAreas();\n\t} );\n\n\treturn null;\n}\n\nfunction KeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/undo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Undo your last changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/redo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Redo your last undo.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t\t// Disable on Apple OS because it conflicts with the browser's\n\t\t\t// history shortcut. It's a fine alias for both Windows and Linux.\n\t\t\t// Since there's no conflict for Ctrl+Shift+Z on both Windows and\n\t\t\t// Linux, we keep it as the default for consistency.\n\t\t\taliases: isAppleOS()\n\t\t\t\t? []\n\t\t\t\t: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmodifier: 'primary',\n\t\t\t\t\t\t\tcharacter: 'y',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/save',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Save your changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 's',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/keyboard-shortcuts',\n\t\t\tcategory: 'main',\n\t\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'h',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/next-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the next part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrl',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'n',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-widgets/previous-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the previous part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'p',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\t\tcharacter: '~',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn null;\n}\n\nKeyboardShortcuts.Register = KeyboardShortcutsRegister;\nexport default KeyboardShortcuts;\n"],"mappings":";;;;;;;;;;;;;;AAaA,MAAM,EAAE,oBAAA,G,+BAAmBA,CAAAA,CAAAA,OAAAA,CAAQC,wBAAAA,WAAuB;AAE1D,SAAS,oBAAoB;CAC5B,MAAM,EAAE,MAAM,UAAA,GAASC,gBAAAA,YAAAA,CAAaC,qBAAAA,KAAU;CAC9C,MAAM,EAAE,2BAAA,GAA0BD,gBAAAA,YAAAA,CAAaE,qBAAAA,KAAiB;CAEhE,CAAA,GAAA,8BAAA,YAAA,CAAa,2BAA4B,UAAW;EACnD,IAAK,eAAgB,KAAM,GAC1B;EAED,KAAK;EACL,MAAM,eAAe;CACtB,CAAE;CAEF,CAAA,GAAA,8BAAA,YAAA,CAAa,2BAA4B,UAAW;EACnD,IAAK,eAAgB,KAAM,GAC1B;EAED,KAAK;EACL,MAAM,eAAe;CACtB,CAAE;CAEF,CAAA,GAAA,8BAAA,YAAA,CAAa,2BAA4B,UAAW;EACnD,MAAM,eAAe;EACrB,sBAAsB;CACvB,CAAE;CAEF,OAAO;AACR;AAEA,SAAS,4BAA4B;CAEpC,MAAM,EAAE,sBAAA,GAAqBF,gBAAAA,YAAAA,CAAaG,8BAAAA,KAAuB;CACjE,CAAA,GAAA,mBAAA,UAAA,OAAiB;EAChB,iBAAkB;GACjB,MAAM;GACN,UAAU;GACV,cAAA,GAAaC,gBAAAA,GAAAA,CAAI,yBAA0B;GAC3C,gBAAgB;IACf,UAAU;IACV,WAAW;GACZ;EACD,CAAE;EAEF,iBAAkB;GACjB,MAAM;GACN,UAAU;GACV,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,sBAAuB;GACxC,gBAAgB;IACf,UAAU;IACV,WAAW;GACZ;GAKA,UAAA,GAASC,oBAAAA,UAAAA,CAAU,IAChB,CAAC,IACD,CACA;IACC,UAAU;IACV,WAAW;GACZ,CACD;EACH,CAAE;EAEF,iBAAkB;GACjB,MAAM;GACN,UAAU;GACV,cAAA,GAAaD,gBAAAA,GAAAA,CAAI,oBAAqB;GACtC,gBAAgB;IACf,UAAU;IACV,WAAW;GACZ;EACD,CAAE;EAEF,iBAAkB;GACjB,MAAM;GACN,UAAU;GACV,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,mCAAoC;GACrD,gBAAgB;IACf,UAAU;IACV,WAAW;GACZ;EACD,CAAE;EAEF,iBAAkB;GACjB,MAAM;GACN,UAAU;GACV,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,0CAA2C;GAC5D,gBAAgB;IACf,UAAU;IACV,WAAW;GACZ;GACA,SAAS,CACR;IACC,UAAU;IACV,WAAW;GACZ,CACD;EACD,CAAE;EAEF,iBAAkB;GACjB,MAAM;GACN,UAAU;GACV,cAAA,GAAaA,gBAAAA,GAAAA,CAAI,8CAA+C;GAChE,gBAAgB;IACf,UAAU;IACV,WAAW;GACZ;GACA,SAAS,CACR;IACC,UAAU;IACV,WAAW;GACZ,GACA;IACC,UAAU;IACV,WAAW;GACZ,CACD;EACD,CAAE;CACH,GAAG,CAAE,gBAAiB,CAAE;CAExB,OAAO;AACR;AAEA,kBAAkB,WAAW"}
@@ -1,85 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperties(exports, {
3
+ __esModule: { value: true },
4
+ [Symbol.toStringTag]: { value: "Module" }
5
+ });
6
+ // \0rolldown/runtime.js
1
7
  var __create = Object.create;
2
8
  var __defProp = Object.defineProperty;
3
9
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
10
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
11
  var __getProtoOf = Object.getPrototypeOf;
6
12
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
13
  var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
14
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
15
+ key = keys[i];
16
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: ((k) => from[k]).bind(null, key),
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
18
22
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
24
+ value: mod,
25
+ enumerable: true
26
+ }) : target, mod));
27
+ let _wordpress_admin_ui = require("@wordpress/admin-ui");
28
+ let _wordpress_i18n = require("@wordpress/i18n");
29
+ let _wordpress_element = require("@wordpress/element");
30
+ let _wordpress_data = require("@wordpress/data");
31
+ let _wordpress_plugins = require("@wordpress/plugins");
32
+ let _wordpress_notices = require("@wordpress/notices");
33
+ let _wordpress_components = require("@wordpress/components");
34
+ let _wordpress_theme = require("@wordpress/theme");
35
+ let ___error_boundary_index_jsx = require("../error-boundary/index.cjs");
36
+ ___error_boundary_index_jsx = __toESM(___error_boundary_index_jsx);
37
+ let ___widget_areas_block_editor_provider_index_jsx = require("../widget-areas-block-editor-provider/index.cjs");
38
+ ___widget_areas_block_editor_provider_index_jsx = __toESM(___widget_areas_block_editor_provider_index_jsx);
39
+ let ___sidebar_index_jsx = require("../sidebar/index.cjs");
40
+ ___sidebar_index_jsx = __toESM(___sidebar_index_jsx);
41
+ let __interface_jsx = require("./interface.cjs");
42
+ __interface_jsx = __toESM(__interface_jsx);
43
+ let __unsaved_changes_warning_js = require("./unsaved-changes-warning.cjs");
44
+ __unsaved_changes_warning_js = __toESM(__unsaved_changes_warning_js);
45
+ let ___welcome_guide_index_jsx = require("../welcome-guide/index.cjs");
46
+ ___welcome_guide_index_jsx = __toESM(___welcome_guide_index_jsx);
47
+ let react_jsx_runtime = require("react/jsx-runtime");
29
48
  // packages/edit-widgets/src/components/layout/index.jsx
30
- var layout_exports = {};
31
- __export(layout_exports, {
32
- default: () => layout_default
33
- });
34
- module.exports = __toCommonJS(layout_exports);
35
- var import_admin_ui = require("@wordpress/admin-ui");
36
- var import_i18n = require("@wordpress/i18n");
37
- var import_element = require("@wordpress/element");
38
- var import_data = require("@wordpress/data");
39
- var import_plugins = require("@wordpress/plugins");
40
- var import_notices = require("@wordpress/notices");
41
- var import_components = require("@wordpress/components");
42
- var import_theme = require("@wordpress/theme");
43
- var import_error_boundary = __toESM(require("../error-boundary/index.cjs"));
44
- var import_widget_areas_block_editor_provider = __toESM(require("../widget-areas-block-editor-provider/index.cjs"));
45
- var import_sidebar = __toESM(require("../sidebar/index.cjs"));
46
- var import_interface = __toESM(require("./interface.cjs"));
47
- var import_unsaved_changes_warning = __toESM(require("./unsaved-changes-warning.cjs"));
48
- var import_welcome_guide = __toESM(require("../welcome-guide/index.cjs"));
49
- var import_jsx_runtime = require("react/jsx-runtime");
50
49
  function Layout({ blockEditorSettings }) {
51
- const { createErrorNotice } = (0, import_data.useDispatch)(import_notices.store);
52
- function onPluginAreaError(name) {
53
- createErrorNotice(
54
- (0, import_i18n.sprintf)(
55
- /* translators: %s: plugin name */
56
- (0, import_i18n.__)(
57
- 'The "%s" plugin has encountered an error and cannot be rendered.'
58
- ),
59
- name
60
- )
61
- );
62
- }
63
- const navigateRegionsProps = (0, import_components.__unstableUseNavigateRegions)();
64
- const adminPrimary = (0, import_element.useMemo)(() => (0, import_admin_ui.getAdminThemeColors)().primary, []);
65
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_theme.ThemeProvider, { isRoot: true, color: { primary: adminPrimary }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_error_boundary.default, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ...navigateRegionsProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
66
- import_widget_areas_block_editor_provider.default,
67
- {
68
- blockEditorSettings,
69
- children: [
70
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
71
- import_interface.default,
72
- {
73
- blockEditorSettings
74
- }
75
- ),
76
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar.default, {}),
77
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_plugins.PluginArea, { onError: onPluginAreaError }),
78
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_unsaved_changes_warning.default, {}),
79
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_welcome_guide.default, {})
80
- ]
81
- }
82
- ) }) }) });
50
+ const { createErrorNotice } = (0, _wordpress_data.useDispatch)(_wordpress_notices.store);
51
+ function onPluginAreaError(name) {
52
+ createErrorNotice((0, _wordpress_i18n.sprintf)((0, _wordpress_i18n.__)("The \"%s\" plugin has encountered an error and cannot be rendered."), name));
53
+ }
54
+ const navigateRegionsProps = (0, _wordpress_components.__unstableUseNavigateRegions)();
55
+ const adminPrimary = (0, _wordpress_element.useMemo)(() => (0, _wordpress_admin_ui.getAdminThemeColors)().primary, []);
56
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_wordpress_theme.ThemeProvider, {
57
+ isRoot: true,
58
+ color: { primary: adminPrimary },
59
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(___error_boundary_index_jsx.default, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
60
+ ...navigateRegionsProps,
61
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(___widget_areas_block_editor_provider_index_jsx.default, {
62
+ blockEditorSettings,
63
+ children: [
64
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__interface_jsx.default, { blockEditorSettings }),
65
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(___sidebar_index_jsx.default, {}),
66
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_wordpress_plugins.PluginArea, { onError: onPluginAreaError }),
67
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__unsaved_changes_warning_js.default, {}),
68
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(___welcome_guide_index_jsx.default, {})
69
+ ]
70
+ })
71
+ }) })
72
+ });
83
73
  }
84
- var layout_default = Layout;
85
- //# sourceMappingURL=index.cjs.map
74
+ exports.default = Layout;
75
+
76
+ //# sourceMappingURL=index.cjs.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/components/layout/index.jsx"],
4
- "sourcesContent": ["import { getAdminThemeColors } from '@wordpress/admin-ui';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useMemo } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { PluginArea } from '@wordpress/plugins';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { __unstableUseNavigateRegions as useNavigateRegions } from '@wordpress/components';\nimport { ThemeProvider } from '@wordpress/theme';\nimport ErrorBoundary from '../error-boundary';\nimport WidgetAreasBlockEditorProvider from '../widget-areas-block-editor-provider';\nimport Sidebar from '../sidebar';\nimport Interface from './interface';\nimport UnsavedChangesWarning from './unsaved-changes-warning';\nimport WelcomeGuide from '../welcome-guide';\n\nfunction Layout( { blockEditorSettings } ) {\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\tfunction onPluginAreaError( name ) {\n\t\tcreateErrorNotice(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: plugin name */\n\t\t\t\t__(\n\t\t\t\t\t'The \"%s\" plugin has encountered an error and cannot be rendered.'\n\t\t\t\t),\n\t\t\t\tname\n\t\t\t)\n\t\t);\n\t}\n\n\tconst navigateRegionsProps = useNavigateRegions();\n\tconst adminPrimary = useMemo( () => getAdminThemeColors().primary, [] );\n\n\treturn (\n\t\t<ThemeProvider isRoot color={ { primary: adminPrimary } }>\n\t\t\t<ErrorBoundary>\n\t\t\t\t<div { ...navigateRegionsProps }>\n\t\t\t\t\t<WidgetAreasBlockEditorProvider\n\t\t\t\t\t\tblockEditorSettings={ blockEditorSettings }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Interface\n\t\t\t\t\t\t\tblockEditorSettings={ blockEditorSettings }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Sidebar />\n\t\t\t\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t\t\t\t<UnsavedChangesWarning />\n\t\t\t\t\t\t<WelcomeGuide />\n\t\t\t\t\t</WidgetAreasBlockEditorProvider>\n\t\t\t\t</div>\n\t\t\t</ErrorBoundary>\n\t\t</ThemeProvider>\n\t);\n}\n\nexport default Layout;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAoC;AACpC,kBAA4B;AAC5B,qBAAwB;AACxB,kBAA4B;AAC5B,qBAA2B;AAC3B,qBAAsC;AACtC,wBAAmE;AACnE,mBAA8B;AAC9B,4BAA0B;AAC1B,gDAA2C;AAC3C,qBAAoB;AACpB,uBAAsB;AACtB,qCAAkC;AAClC,2BAAyB;AAwBpB;AAtBL,SAAS,OAAQ,EAAE,oBAAoB,GAAI;AAC1C,QAAM,EAAE,kBAAkB,QAAI,yBAAa,eAAAA,KAAa;AAExD,WAAS,kBAAmB,MAAO;AAClC;AAAA,UACC;AAAA;AAAA,YAEC;AAAA,UACC;AAAA,QACD;AAAA,QACA;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAEA,QAAM,2BAAuB,kBAAAC,8BAAmB;AAChD,QAAM,mBAAe,wBAAS,UAAM,qCAAoB,EAAE,SAAS,CAAC,CAAE;AAEtE,SACC,4CAAC,8BAAc,QAAM,MAAC,OAAQ,EAAE,SAAS,aAAa,GACrD,sDAAC,sBAAAC,SAAA,EACA,sDAAC,SAAM,GAAG,sBACT;AAAA,IAAC,0CAAAC;AAAA,IAAA;AAAA,MACA;AAAA,MAEA;AAAA;AAAA,UAAC,iBAAAC;AAAA,UAAA;AAAA,YACA;AAAA;AAAA,QACD;AAAA,QACA,4CAAC,eAAAC,SAAA,EAAQ;AAAA,QACT,4CAAC,6BAAW,SAAU,mBAAoB;AAAA,QAC1C,4CAAC,+BAAAC,SAAA,EAAsB;AAAA,QACvB,4CAAC,qBAAAC,SAAA,EAAa;AAAA;AAAA;AAAA,EACf,GACD,GACD,GACD;AAEF;AAEA,IAAO,iBAAQ;",
6
- "names": ["noticesStore", "useNavigateRegions", "ErrorBoundary", "WidgetAreasBlockEditorProvider", "Interface", "Sidebar", "UnsavedChangesWarning", "WelcomeGuide"]
7
- }
1
+ {"version":3,"file":"index.cjs","names":["useDispatch","noticesStore","sprintf","__","useNavigateRegions","useMemo","getAdminThemeColors","ThemeProvider","ErrorBoundary","WidgetAreasBlockEditorProvider","Interface","Sidebar","PluginArea","UnsavedChangesWarning","WelcomeGuide"],"sources":["../../../src/components/layout/index.jsx"],"sourcesContent":["import { getAdminThemeColors } from '@wordpress/admin-ui';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useMemo } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { PluginArea } from '@wordpress/plugins';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { __unstableUseNavigateRegions as useNavigateRegions } from '@wordpress/components';\nimport { ThemeProvider } from '@wordpress/theme';\nimport ErrorBoundary from '../error-boundary';\nimport WidgetAreasBlockEditorProvider from '../widget-areas-block-editor-provider';\nimport Sidebar from '../sidebar';\nimport Interface from './interface';\nimport UnsavedChangesWarning from './unsaved-changes-warning';\nimport WelcomeGuide from '../welcome-guide';\n\nfunction Layout( { blockEditorSettings } ) {\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\tfunction onPluginAreaError( name ) {\n\t\tcreateErrorNotice(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: plugin name */\n\t\t\t\t__(\n\t\t\t\t\t'The \"%s\" plugin has encountered an error and cannot be rendered.'\n\t\t\t\t),\n\t\t\t\tname\n\t\t\t)\n\t\t);\n\t}\n\n\tconst navigateRegionsProps = useNavigateRegions();\n\tconst adminPrimary = useMemo( () => getAdminThemeColors().primary, [] );\n\n\treturn (\n\t\t<ThemeProvider isRoot color={ { primary: adminPrimary } }>\n\t\t\t<ErrorBoundary>\n\t\t\t\t<div { ...navigateRegionsProps }>\n\t\t\t\t\t<WidgetAreasBlockEditorProvider\n\t\t\t\t\t\tblockEditorSettings={ blockEditorSettings }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Interface\n\t\t\t\t\t\t\tblockEditorSettings={ blockEditorSettings }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Sidebar />\n\t\t\t\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t\t\t\t<UnsavedChangesWarning />\n\t\t\t\t\t\t<WelcomeGuide />\n\t\t\t\t\t</WidgetAreasBlockEditorProvider>\n\t\t\t\t</div>\n\t\t\t</ErrorBoundary>\n\t\t</ThemeProvider>\n\t);\n}\n\nexport default Layout;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,SAAS,OAAQ,EAAE,uBAAwB;CAC1C,MAAM,EAAE,uBAAA,GAAsBA,gBAAAA,YAAAA,CAAaC,mBAAAA,KAAa;CAExD,SAAS,kBAAmB,MAAO;EAClC,mBAAA,GACCC,gBAAAA,QAAAA,EAAAA,GAECC,gBAAAA,GAAAA,CACC,oEACD,GACA,IACD,CACD;CACD;CAEA,MAAM,wBAAA,GAAuBC,sBAAAA,6BAAAA,CAAmB;CAChD,MAAM,gBAAA,GAAeC,mBAAAA,QAAAA,QAAAA,GAAeC,oBAAAA,oBAAAA,CAAoB,CAAC,CAAC,SAAS,CAAC,CAAE;CAEtE,OACC,iBAAA,GAAA,kBAAA,IAAA,CAACC,iBAAAA,eAAD;EAAe,QAAA;EAAO,OAAQ,EAAE,SAAS,aAAa;EACrD,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,4BAAAA,SAAD,EAAA,UACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GAAK,GAAK;GACT,UAAA,iBAAA,GAAA,kBAAA,KAAA,CAACC,gDAAAA,SAAD;IACuB;IADvB,UAAA;KAGC,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,SAAD,EACuB,oBACtB,CAAA;KACD,iBAAA,GAAA,kBAAA,IAAA,CAACC,qBAAAA,SAAD,CAAU,CAAA;KACV,iBAAA,GAAA,kBAAA,IAAA,CAACC,mBAAAA,YAAD,EAAY,SAAU,kBAAqB,CAAA;KAC3C,iBAAA,GAAA,kBAAA,IAAA,CAACC,6BAAAA,SAAD,CAAwB,CAAA;KACxB,iBAAA,GAAA,kBAAA,IAAA,CAACC,2BAAAA,SAAD,CAAe,CAAA;IACgB;;EAC5B,CAAA,EACS,CAAA;CACD,CAAA;AAEjB"}