@wordpress/edit-post 7.19.3 → 7.20.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 (280) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +22 -22
  3. package/build/components/block-manager/category.js +5 -4
  4. package/build/components/block-manager/category.js.map +1 -1
  5. package/build/components/block-manager/checklist.js +5 -5
  6. package/build/components/block-manager/checklist.js.map +1 -1
  7. package/build/components/block-manager/index.js +10 -9
  8. package/build/components/block-manager/index.js.map +1 -1
  9. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +5 -5
  10. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  11. package/build/components/device-preview/index.js +5 -5
  12. package/build/components/device-preview/index.js.map +1 -1
  13. package/build/components/header/document-actions/index.js +9 -9
  14. package/build/components/header/document-actions/index.js.map +1 -1
  15. package/build/components/header/fullscreen-mode-close/index.js +6 -6
  16. package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
  17. package/build/components/header/header-toolbar/index.js +9 -8
  18. package/build/components/header/header-toolbar/index.js.map +1 -1
  19. package/build/components/header/header-toolbar/index.native.js +12 -11
  20. package/build/components/header/header-toolbar/index.native.js.map +1 -1
  21. package/build/components/header/index.js +14 -14
  22. package/build/components/header/index.js.map +1 -1
  23. package/build/components/header/index.native.js +3 -2
  24. package/build/components/header/index.native.js.map +1 -1
  25. package/build/components/header/main-dashboard-button/index.js +2 -2
  26. package/build/components/header/main-dashboard-button/index.js.map +1 -1
  27. package/build/components/header/mode-switcher/index.js +3 -3
  28. package/build/components/header/mode-switcher/index.js.map +1 -1
  29. package/build/components/header/more-menu/index.js +6 -6
  30. package/build/components/header/more-menu/index.js.map +1 -1
  31. package/build/components/header/plugin-more-menu-item/index.js +3 -3
  32. package/build/components/header/plugin-more-menu-item/index.js.map +1 -1
  33. package/build/components/header/plugin-sidebar-more-menu-item/index.js +5 -5
  34. package/build/components/header/plugin-sidebar-more-menu-item/index.js.map +1 -1
  35. package/build/components/header/post-publish-button-or-toggle.js +2 -2
  36. package/build/components/header/post-publish-button-or-toggle.js.map +1 -1
  37. package/build/components/header/preferences-menu-item/index.js +2 -2
  38. package/build/components/header/preferences-menu-item/index.js.map +1 -1
  39. package/build/components/header/tools-more-menu-group/index.js +3 -3
  40. package/build/components/header/tools-more-menu-group/index.js.map +1 -1
  41. package/build/components/header/writing-menu/index.js +6 -6
  42. package/build/components/header/writing-menu/index.js.map +1 -1
  43. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
  44. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  45. package/build/components/keyboard-shortcut-help-modal/index.js +15 -15
  46. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  47. package/build/components/keyboard-shortcut-help-modal/shortcut.js +8 -7
  48. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  49. package/build/components/layout/actions-panel.js +9 -8
  50. package/build/components/layout/actions-panel.js.map +1 -1
  51. package/build/components/layout/index.js +22 -21
  52. package/build/components/layout/index.js.map +1 -1
  53. package/build/components/layout/index.native.js +10 -9
  54. package/build/components/layout/index.native.js.map +1 -1
  55. package/build/components/meta-boxes/index.js +5 -4
  56. package/build/components/meta-boxes/index.js.map +1 -1
  57. package/build/components/meta-boxes/meta-boxes-area/index.js +6 -5
  58. package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  59. package/build/components/preferences-modal/index.js +27 -26
  60. package/build/components/preferences-modal/index.js.map +1 -1
  61. package/build/components/preferences-modal/meta-boxes-section.js +4 -4
  62. package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
  63. package/build/components/preferences-modal/options/enable-custom-fields.js +5 -4
  64. package/build/components/preferences-modal/options/enable-custom-fields.js.map +1 -1
  65. package/build/components/preferences-modal/options/enable-plugin-document-setting-panel.js +2 -2
  66. package/build/components/preferences-modal/options/enable-plugin-document-setting-panel.js.map +1 -1
  67. package/build/components/secondary-sidebar/inserter-sidebar.js +7 -6
  68. package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
  69. package/build/components/secondary-sidebar/list-view-outline.js +18 -18
  70. package/build/components/secondary-sidebar/list-view-outline.js.map +1 -1
  71. package/build/components/secondary-sidebar/list-view-sidebar.js +9 -8
  72. package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
  73. package/build/components/sidebar/discussion-panel/index.js +6 -6
  74. package/build/components/sidebar/discussion-panel/index.js.map +1 -1
  75. package/build/components/sidebar/featured-image/index.js +3 -3
  76. package/build/components/sidebar/featured-image/index.js.map +1 -1
  77. package/build/components/sidebar/last-revision/index.js +3 -3
  78. package/build/components/sidebar/last-revision/index.js.map +1 -1
  79. package/build/components/sidebar/page-attributes/index.js +3 -3
  80. package/build/components/sidebar/page-attributes/index.js.map +1 -1
  81. package/build/components/sidebar/plugin-document-setting-panel/index.js +6 -6
  82. package/build/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
  83. package/build/components/sidebar/plugin-post-publish-panel/index.js +5 -5
  84. package/build/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
  85. package/build/components/sidebar/plugin-post-status-info/index.js +7 -7
  86. package/build/components/sidebar/plugin-post-status-info/index.js.map +1 -1
  87. package/build/components/sidebar/plugin-pre-publish-panel/index.js +5 -5
  88. package/build/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
  89. package/build/components/sidebar/plugin-sidebar/index.js +4 -4
  90. package/build/components/sidebar/plugin-sidebar/index.js.map +1 -1
  91. package/build/components/sidebar/post-author/index.js +3 -3
  92. package/build/components/sidebar/post-author/index.js.map +1 -1
  93. package/build/components/sidebar/post-excerpt/index.js +3 -3
  94. package/build/components/sidebar/post-excerpt/index.js.map +1 -1
  95. package/build/components/sidebar/post-format/index.js +3 -3
  96. package/build/components/sidebar/post-format/index.js.map +1 -1
  97. package/build/components/sidebar/post-pending-status/index.js +2 -2
  98. package/build/components/sidebar/post-pending-status/index.js.map +1 -1
  99. package/build/components/sidebar/post-schedule/index.js +7 -6
  100. package/build/components/sidebar/post-schedule/index.js.map +1 -1
  101. package/build/components/sidebar/post-slug/index.js +3 -3
  102. package/build/components/sidebar/post-slug/index.js.map +1 -1
  103. package/build/components/sidebar/post-status/index.js +28 -30
  104. package/build/components/sidebar/post-status/index.js.map +1 -1
  105. package/build/components/sidebar/post-sticky/index.js +2 -2
  106. package/build/components/sidebar/post-sticky/index.js.map +1 -1
  107. package/build/components/sidebar/post-taxonomies/index.js +3 -3
  108. package/build/components/sidebar/post-taxonomies/index.js.map +1 -1
  109. package/build/components/sidebar/post-taxonomies/taxonomy-panel.js +2 -2
  110. package/build/components/sidebar/post-taxonomies/taxonomy-panel.js.map +1 -1
  111. package/build/components/sidebar/post-template/create-modal.js +9 -8
  112. package/build/components/sidebar/post-template/create-modal.js.map +1 -1
  113. package/build/components/sidebar/post-template/form.js +7 -6
  114. package/build/components/sidebar/post-template/form.js.map +1 -1
  115. package/build/components/sidebar/post-template/index.js +6 -5
  116. package/build/components/sidebar/post-template/index.js.map +1 -1
  117. package/build/components/sidebar/post-trash/index.js +2 -2
  118. package/build/components/sidebar/post-trash/index.js.map +1 -1
  119. package/build/components/sidebar/post-url/index.js +6 -5
  120. package/build/components/sidebar/post-url/index.js.map +1 -1
  121. package/build/components/sidebar/post-visibility/index.js +8 -7
  122. package/build/components/sidebar/post-visibility/index.js.map +1 -1
  123. package/build/components/sidebar/settings-header/index.js +4 -4
  124. package/build/components/sidebar/settings-header/index.js.map +1 -1
  125. package/build/components/sidebar/settings-sidebar/index.js +6 -5
  126. package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
  127. package/build/components/sidebar/template-summary/index.js +5 -5
  128. package/build/components/sidebar/template-summary/index.js.map +1 -1
  129. package/build/components/start-page-options/index.js +7 -6
  130. package/build/components/start-page-options/index.js.map +1 -1
  131. package/build/components/text-editor/index.js +6 -6
  132. package/build/components/text-editor/index.js.map +1 -1
  133. package/build/components/view-link/index.js +2 -2
  134. package/build/components/view-link/index.js.map +1 -1
  135. package/build/components/visual-editor/block-inspector-button.js +2 -2
  136. package/build/components/visual-editor/block-inspector-button.js.map +1 -1
  137. package/build/components/visual-editor/header.native.js +4 -3
  138. package/build/components/visual-editor/header.native.js.map +1 -1
  139. package/build/components/visual-editor/index.js +14 -13
  140. package/build/components/visual-editor/index.js.map +1 -1
  141. package/build/components/visual-editor/index.native.js +3 -2
  142. package/build/components/visual-editor/index.native.js.map +1 -1
  143. package/build/components/welcome-guide/default.js +17 -16
  144. package/build/components/welcome-guide/default.js.map +1 -1
  145. package/build/components/welcome-guide/image.js +4 -4
  146. package/build/components/welcome-guide/image.js.map +1 -1
  147. package/build/components/welcome-guide/index.js +2 -2
  148. package/build/components/welcome-guide/index.js.map +1 -1
  149. package/build/components/welcome-guide/template.js +5 -5
  150. package/build/components/welcome-guide/template.js.map +1 -1
  151. package/build/editor.js +5 -4
  152. package/build/editor.js.map +1 -1
  153. package/build/editor.native.js +5 -4
  154. package/build/editor.native.js.map +1 -1
  155. package/build/hooks/validate-multiple-use/index.js +11 -11
  156. package/build/hooks/validate-multiple-use/index.js.map +1 -1
  157. package/build/index.js +3 -2
  158. package/build/index.js.map +1 -1
  159. package/build/index.native.js +2 -2
  160. package/build/index.native.js.map +1 -1
  161. package/build/plugins/copy-content-menu-item/index.js +2 -2
  162. package/build/plugins/copy-content-menu-item/index.js.map +1 -1
  163. package/build/plugins/index.js +6 -6
  164. package/build/plugins/index.js.map +1 -1
  165. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js +2 -2
  166. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js.map +1 -1
  167. package/build/plugins/welcome-guide-menu-item/index.js +2 -2
  168. package/build/plugins/welcome-guide-menu-item/index.js.map +1 -1
  169. package/build-module/components/block-manager/category.js +1 -1
  170. package/build-module/components/block-manager/checklist.js +1 -1
  171. package/build-module/components/block-manager/index.js +1 -1
  172. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +3 -3
  173. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  174. package/build-module/components/device-preview/index.js +1 -1
  175. package/build-module/components/header/document-actions/index.js +1 -1
  176. package/build-module/components/header/fullscreen-mode-close/index.js +1 -1
  177. package/build-module/components/header/header-toolbar/index.js +1 -1
  178. package/build-module/components/header/header-toolbar/index.native.js +1 -1
  179. package/build-module/components/header/index.js +1 -1
  180. package/build-module/components/header/index.native.js +1 -1
  181. package/build-module/components/header/main-dashboard-button/index.js +1 -1
  182. package/build-module/components/header/mode-switcher/index.js +1 -1
  183. package/build-module/components/header/more-menu/index.js +1 -1
  184. package/build-module/components/header/plugin-more-menu-item/index.js +3 -3
  185. package/build-module/components/header/plugin-more-menu-item/index.js.map +1 -1
  186. package/build-module/components/header/plugin-sidebar-more-menu-item/index.js +4 -4
  187. package/build-module/components/header/plugin-sidebar-more-menu-item/index.js.map +1 -1
  188. package/build-module/components/header/post-publish-button-or-toggle.js +1 -1
  189. package/build-module/components/header/preferences-menu-item/index.js +1 -1
  190. package/build-module/components/header/tools-more-menu-group/index.js +1 -1
  191. package/build-module/components/header/writing-menu/index.js +1 -1
  192. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -1
  193. package/build-module/components/keyboard-shortcut-help-modal/index.js +1 -1
  194. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +1 -1
  195. package/build-module/components/layout/actions-panel.js +1 -1
  196. package/build-module/components/layout/index.js +1 -1
  197. package/build-module/components/layout/index.native.js +1 -1
  198. package/build-module/components/meta-boxes/index.js +1 -1
  199. package/build-module/components/meta-boxes/meta-boxes-area/index.js +2 -2
  200. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  201. package/build-module/components/preferences-modal/index.js +1 -1
  202. package/build-module/components/preferences-modal/meta-boxes-section.js +1 -1
  203. package/build-module/components/preferences-modal/options/enable-custom-fields.js +1 -1
  204. package/build-module/components/preferences-modal/options/enable-plugin-document-setting-panel.js +1 -1
  205. package/build-module/components/secondary-sidebar/inserter-sidebar.js +1 -1
  206. package/build-module/components/secondary-sidebar/list-view-outline.js +1 -1
  207. package/build-module/components/secondary-sidebar/list-view-sidebar.js +1 -1
  208. package/build-module/components/sidebar/discussion-panel/index.js +1 -1
  209. package/build-module/components/sidebar/featured-image/index.js +1 -1
  210. package/build-module/components/sidebar/last-revision/index.js +1 -1
  211. package/build-module/components/sidebar/page-attributes/index.js +1 -1
  212. package/build-module/components/sidebar/plugin-document-setting-panel/index.js +4 -4
  213. package/build-module/components/sidebar/plugin-document-setting-panel/index.js.map +1 -1
  214. package/build-module/components/sidebar/plugin-post-publish-panel/index.js +4 -4
  215. package/build-module/components/sidebar/plugin-post-publish-panel/index.js.map +1 -1
  216. package/build-module/components/sidebar/plugin-post-status-info/index.js +6 -6
  217. package/build-module/components/sidebar/plugin-post-status-info/index.js.map +1 -1
  218. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js +4 -4
  219. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js.map +1 -1
  220. package/build-module/components/sidebar/plugin-sidebar/index.js +3 -3
  221. package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -1
  222. package/build-module/components/sidebar/post-author/index.js +1 -1
  223. package/build-module/components/sidebar/post-excerpt/index.js +1 -1
  224. package/build-module/components/sidebar/post-format/index.js +1 -1
  225. package/build-module/components/sidebar/post-pending-status/index.js +1 -1
  226. package/build-module/components/sidebar/post-schedule/index.js +1 -1
  227. package/build-module/components/sidebar/post-slug/index.js +1 -1
  228. package/build-module/components/sidebar/post-status/index.js +25 -26
  229. package/build-module/components/sidebar/post-status/index.js.map +1 -1
  230. package/build-module/components/sidebar/post-sticky/index.js +1 -1
  231. package/build-module/components/sidebar/post-taxonomies/index.js +1 -1
  232. package/build-module/components/sidebar/post-taxonomies/taxonomy-panel.js +1 -1
  233. package/build-module/components/sidebar/post-template/create-modal.js +1 -1
  234. package/build-module/components/sidebar/post-template/form.js +1 -1
  235. package/build-module/components/sidebar/post-template/index.js +1 -1
  236. package/build-module/components/sidebar/post-trash/index.js +1 -1
  237. package/build-module/components/sidebar/post-url/index.js +1 -1
  238. package/build-module/components/sidebar/post-visibility/index.js +1 -1
  239. package/build-module/components/sidebar/settings-header/index.js +1 -1
  240. package/build-module/components/sidebar/settings-sidebar/index.js +1 -1
  241. package/build-module/components/sidebar/template-summary/index.js +1 -1
  242. package/build-module/components/start-page-options/index.js +1 -1
  243. package/build-module/components/text-editor/index.js +1 -1
  244. package/build-module/components/view-link/index.js +1 -1
  245. package/build-module/components/visual-editor/block-inspector-button.js +1 -1
  246. package/build-module/components/visual-editor/header.native.js +1 -1
  247. package/build-module/components/visual-editor/index.js +1 -1
  248. package/build-module/components/visual-editor/index.native.js +1 -1
  249. package/build-module/components/welcome-guide/default.js +1 -1
  250. package/build-module/components/welcome-guide/image.js +1 -1
  251. package/build-module/components/welcome-guide/index.js +1 -1
  252. package/build-module/components/welcome-guide/template.js +1 -1
  253. package/build-module/editor.js +1 -1
  254. package/build-module/editor.native.js +1 -1
  255. package/build-module/hooks/validate-multiple-use/index.js +3 -3
  256. package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
  257. package/build-module/index.js +1 -1
  258. package/build-module/index.native.js +1 -1
  259. package/build-module/plugins/copy-content-menu-item/index.js +1 -1
  260. package/build-module/plugins/index.js +1 -1
  261. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js +1 -1
  262. package/build-module/plugins/welcome-guide-menu-item/index.js +1 -1
  263. package/build-style/classic-rtl.css +1 -1
  264. package/build-style/classic.css +1 -1
  265. package/build-style/style-rtl.css +13 -17
  266. package/build-style/style.css +13 -17
  267. package/package.json +32 -32
  268. package/src/components/block-settings-menu/plugin-block-settings-menu-item.js +2 -2
  269. package/src/components/header/plugin-more-menu-item/index.js +3 -3
  270. package/src/components/header/plugin-sidebar-more-menu-item/index.js +3 -3
  271. package/src/components/meta-boxes/meta-boxes-area/index.js +1 -1
  272. package/src/components/sidebar/plugin-document-setting-panel/index.js +3 -3
  273. package/src/components/sidebar/plugin-post-publish-panel/index.js +3 -3
  274. package/src/components/sidebar/plugin-post-status-info/index.js +5 -5
  275. package/src/components/sidebar/plugin-pre-publish-panel/index.js +3 -3
  276. package/src/components/sidebar/plugin-sidebar/index.js +2 -2
  277. package/src/components/sidebar/post-status/index.js +19 -25
  278. package/src/hooks/validate-multiple-use/index.js +2 -2
  279. package/src/style.scss +0 -1
  280. package/src/components/sidebar/post-status/style.scss +0 -5
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
+ var _react = require("react");
7
8
  var _element = require("@wordpress/element");
8
9
  var _keycodes = require("@wordpress/keycodes");
9
10
  /**
@@ -16,16 +17,16 @@ function KeyCombination({
16
17
  }) {
17
18
  const shortcut = keyCombination.modifier ? _keycodes.displayShortcutList[keyCombination.modifier](keyCombination.character) : keyCombination.character;
18
19
  const ariaLabel = keyCombination.modifier ? _keycodes.shortcutAriaLabel[keyCombination.modifier](keyCombination.character) : keyCombination.character;
19
- return (0, _element.createElement)("kbd", {
20
+ return (0, _react.createElement)("kbd", {
20
21
  className: "edit-post-keyboard-shortcut-help-modal__shortcut-key-combination",
21
22
  "aria-label": forceAriaLabel || ariaLabel
22
23
  }, (Array.isArray(shortcut) ? shortcut : [shortcut]).map((character, index) => {
23
24
  if (character === '+') {
24
- return (0, _element.createElement)(_element.Fragment, {
25
+ return (0, _react.createElement)(_element.Fragment, {
25
26
  key: index
26
27
  }, character);
27
28
  }
28
- return (0, _element.createElement)("kbd", {
29
+ return (0, _react.createElement)("kbd", {
29
30
  key: index,
30
31
  className: "edit-post-keyboard-shortcut-help-modal__shortcut-key"
31
32
  }, character);
@@ -37,14 +38,14 @@ function Shortcut({
37
38
  aliases = [],
38
39
  ariaLabel
39
40
  }) {
40
- return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)("div", {
41
+ return (0, _react.createElement)(_element.Fragment, null, (0, _react.createElement)("div", {
41
42
  className: "edit-post-keyboard-shortcut-help-modal__shortcut-description"
42
- }, description), (0, _element.createElement)("div", {
43
+ }, description), (0, _react.createElement)("div", {
43
44
  className: "edit-post-keyboard-shortcut-help-modal__shortcut-term"
44
- }, (0, _element.createElement)(KeyCombination, {
45
+ }, (0, _react.createElement)(KeyCombination, {
45
46
  keyCombination: keyCombination,
46
47
  forceAriaLabel: ariaLabel
47
- }), aliases.map((alias, index) => (0, _element.createElement)(KeyCombination, {
48
+ }), aliases.map((alias, index) => (0, _react.createElement)(KeyCombination, {
48
49
  keyCombination: alias,
49
50
  forceAriaLabel: ariaLabel,
50
51
  key: index
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_keycodes","KeyCombination","keyCombination","forceAriaLabel","shortcut","modifier","displayShortcutList","character","ariaLabel","shortcutAriaLabel","createElement","className","Array","isArray","map","index","Fragment","key","Shortcut","description","aliases","alias","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/keyboard-shortcut-help-modal/shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"edit-post-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ ( Array.isArray( shortcut ) ? shortcut : [ shortcut ] ).map(\n\t\t\t\t( character, index ) => {\n\t\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<kbd\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tclassName=\"edit-post-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ character }\n\t\t\t\t\t\t</kbd>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-post-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"edit-post-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA,SAASE,cAAcA,CAAE;EAAEC,cAAc;EAAEC;AAAe,CAAC,EAAG;EAC7D,MAAMC,QAAQ,GAAGF,cAAc,CAACG,QAAQ,GACrCC,6BAAmB,CAAEJ,cAAc,CAACG,QAAQ,CAAE,CAC9CH,cAAc,CAACK,SACf,CAAC,GACDL,cAAc,CAACK,SAAS;EAC3B,MAAMC,SAAS,GAAGN,cAAc,CAACG,QAAQ,GACtCI,2BAAiB,CAAEP,cAAc,CAACG,QAAQ,CAAE,CAC5CH,cA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AAA,GAEcJ,QAAQ;AAAAK,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
1
+ {"version":3,"names":["_element","require","_keycodes","KeyCombination","keyCombination","forceAriaLabel","shortcut","modifier","displayShortcutList","character","ariaLabel","shortcutAriaLabel","_react","createElement","className","Array","isArray","map","index","Fragment","key","Shortcut","description","aliases","alias","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/keyboard-shortcut-help-modal/shortcut.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"edit-post-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ ( Array.isArray( shortcut ) ? shortcut : [ shortcut ] ).map(\n\t\t\t\t( character, index ) => {\n\t\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<kbd\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tclassName=\"edit-post-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ character }\n\t\t\t\t\t\t</kbd>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-post-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"edit-post-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAIA,SAASE,cAAcA,CAAE;EAAEC,cAAc;EAAEC;AAAe,CAAC,EAAG;EAC7D,MAAMC,QAAQ,GAAGF,cAAc,CAACG,QAAQ,GACrCC,6BAAmB,CAAEJ,cAAc,CAACG,QAAQ,CAAE,CAC9CH,cAAc,CAACK,SACf,CAAC,GACDL,cAAc,CAACK,SAAS;EAC3B,MAAMC,SAAS,GAAGN,cAAc,CAACG,QAAQ,GACtCI,2BAAiB,CAAEP,cAAc,CAACG,QAAQ,CAAE,CAC5CH,cAAc,CAACK,SACf,CAAC,GACDL,cAAc,CAACK,SAAS;EAE3B,OACC,IAAAG,MAAA,CAAAC,aAAA;IACCC,SAAS,EAAC,kEAAkE;IAC5E,cAAaT,cAAc,IAAIK;EAAW,GAExC,CAAEK,KAAK,CAACC,OAAO,CAAEV,QAAS,CAAC,GAAGA,QAAQ,GAAG,CAAEA,QAAQ,CAAE,EAAGW,GAAG,CAC5D,CAAER,SAAS,EAAES,KAAK,KAAM;IACvB,IAAKT,SAAS,KAAK,GAAG,EAAG;MACxB,OAAO,IAAAG,MAAA,CAAAC,aAAA,EAACb,QAAA,CAAAmB,QAAQ;QAACC,GAAG,EAAGF;MAAO,GAAGT,SAAqB,CAAC;IACxD;IAEA,OACC,IAAAG,MAAA,CAAAC,aAAA;MACCO,GAAG,EAAGF,KAAO;MACbJ,SAAS,EAAC;IAAsD,GAE9DL,SACE,CAAC;EAER,CACD,CACI,CAAC;AAER;AAEA,SAASY,QAAQA,CAAE;EAAEC,WAAW;EAAElB,cAAc;EAAEmB,OAAO,GAAG,EAAE;EAAEb;AAAU,CAAC,EAAG;EAC7E,OACC,IAAAE,MAAA,CAAAC,aAAA,EAAAb,QAAA,CAAAmB,QAAA,QACC,IAAAP,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAA8D,GAC1EQ,WACE,CAAC,EACN,IAAAV,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAAuD,GACrE,IAAAF,MAAA,CAAAC,aAAA,EAACV,cAAc;IACdC,cAAc,EAAGA,cAAgB;IACjCC,cAAc,EAAGK;EAAW,CAC5B,CAAC,EACAa,OAAO,CAACN,GAAG,CAAE,CAAEO,KAAK,EAAEN,KAAK,KAC5B,IAAAN,MAAA,CAAAC,aAAA,EAACV,cAAc;IACdC,cAAc,EAAGoB,KAAO;IACxBnB,cAAc,EAAGK,SAAW;IAC5BU,GAAG,EAAGF;EAAO,CACb,CACA,CACE,CACJ,CAAC;AAEL;AAAC,IAAAO,QAAA,GAEcJ,QAAQ;AAAAK,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
@@ -6,11 +6,12 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.ActionsPanelFill = void 0;
8
8
  exports.default = ActionsPanel;
9
- var _element = require("@wordpress/element");
9
+ var _react = require("react");
10
10
  var _editor = require("@wordpress/editor");
11
11
  var _data = require("@wordpress/data");
12
12
  var _components = require("@wordpress/components");
13
13
  var _i18n = require("@wordpress/i18n");
14
+ var _element = require("@wordpress/element");
14
15
  var _pluginPostPublishPanel = _interopRequireDefault(require("../sidebar/plugin-post-publish-panel"));
15
16
  var _pluginPrePublishPanel = _interopRequireDefault(require("../sidebar/plugin-pre-publish-panel"));
16
17
  var _store = require("../../store");
@@ -52,25 +53,25 @@ function ActionsPanel({
52
53
  // We don't want more than one present at a time, decide which to render.
53
54
  let unmountableContent;
54
55
  if (publishSidebarOpened) {
55
- unmountableContent = (0, _element.createElement)(_editor.PostPublishPanel, {
56
+ unmountableContent = (0, _react.createElement)(_editor.PostPublishPanel, {
56
57
  onClose: closePublishSidebar,
57
58
  forceIsDirty: hasActiveMetaboxes,
58
59
  PrePublishExtension: _pluginPrePublishPanel.default.Slot,
59
60
  PostPublishExtension: _pluginPostPublishPanel.default.Slot
60
61
  });
61
62
  } else if (hasNonPostEntityChanges) {
62
- unmountableContent = (0, _element.createElement)("div", {
63
+ unmountableContent = (0, _react.createElement)("div", {
63
64
  className: "edit-post-layout__toggle-entities-saved-states-panel"
64
- }, (0, _element.createElement)(_components.Button, {
65
+ }, (0, _react.createElement)(_components.Button, {
65
66
  variant: "secondary",
66
67
  className: "edit-post-layout__toggle-entities-saved-states-panel-button",
67
68
  onClick: openEntitiesSavedStates,
68
69
  "aria-expanded": false
69
70
  }, (0, _i18n.__)('Open save panel')));
70
71
  } else {
71
- unmountableContent = (0, _element.createElement)("div", {
72
+ unmountableContent = (0, _react.createElement)("div", {
72
73
  className: "edit-post-layout__toggle-publish-panel"
73
- }, (0, _element.createElement)(_components.Button, {
74
+ }, (0, _react.createElement)(_components.Button, {
74
75
  variant: "secondary",
75
76
  className: "edit-post-layout__toggle-publish-panel-button",
76
77
  onClick: togglePublishSidebar,
@@ -80,9 +81,9 @@ function ActionsPanel({
80
81
 
81
82
  // Since EntitiesSavedStates controls its own panel, we can keep it
82
83
  // always mounted to retain its own component state (such as checkboxes).
83
- return (0, _element.createElement)(_element.Fragment, null, isEntitiesSavedStatesOpen && (0, _element.createElement)(_editor.EntitiesSavedStates, {
84
+ return (0, _react.createElement)(_react.Fragment, null, isEntitiesSavedStatesOpen && (0, _react.createElement)(_editor.EntitiesSavedStates, {
84
85
  close: closeEntitiesSavedStates
85
- }), (0, _element.createElement)(Slot, {
86
+ }), (0, _react.createElement)(Slot, {
86
87
  bubblesVirtually: true
87
88
  }), !isEntitiesSavedStatesOpen && unmountableContent);
88
89
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_editor","_data","_components","_i18n","_pluginPostPublishPanel","_interopRequireDefault","_pluginPrePublishPanel","_store","Fill","Slot","createSlotFill","ActionsPanelFill","exports","ActionsPanel","setEntitiesSavedStatesCallback","closeEntitiesSavedStates","isEntitiesSavedStatesOpen","closePublishSidebar","togglePublishSidebar","useDispatch","editPostStore","publishSidebarOpened","hasActiveMetaboxes","hasNonPostEntityChanges","useSelect","select","isPublishSidebarOpened","hasMetaBoxes","editorStore","openEntitiesSavedStates","useCallback","unmountableContent","createElement","PostPublishPanel","onClose","forceIsDirty","PrePublishExtension","PluginPrePublishPanel","PostPublishExtension","PluginPostPublishPanel","className","Button","variant","onClick","__","Fragment","EntitiesSavedStates","close","bubblesVirtually"],"sources":["@wordpress/edit-post/src/components/layout/actions-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tEntitiesSavedStates,\n\tPostPublishPanel,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { Button, createSlotFill } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useCallback } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport PluginPostPublishPanel from '../sidebar/plugin-post-publish-panel';\nimport PluginPrePublishPanel from '../sidebar/plugin-pre-publish-panel';\nimport { store as editPostStore } from '../../store';\n\nconst { Fill, Slot } = createSlotFill( 'ActionsPanel' );\n\nexport const ActionsPanelFill = Fill;\n\nexport default function ActionsPanel( {\n\tsetEntitiesSavedStatesCallback,\n\tcloseEntitiesSavedStates,\n\tisEntitiesSavedStatesOpen,\n} ) {\n\tconst { closePublishSidebar, togglePublishSidebar } =\n\t\tuseDispatch( editPostStore );\n\tconst {\n\t\tpublishSidebarOpened,\n\t\thasActiveMetaboxes,\n\t\thasNonPostEntityChanges,\n\t} = useSelect(\n\t\t( select ) => ( {\n\t\t\tpublishSidebarOpened:\n\t\t\t\tselect( editPostStore ).isPublishSidebarOpened(),\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\thasNonPostEntityChanges:\n\t\t\t\tselect( editorStore ).hasNonPostEntityChanges(),\n\t\t} ),\n\t\t[]\n\t);\n\n\tconst openEntitiesSavedStates = useCallback(\n\t\t() => setEntitiesSavedStatesCallback( true ),\n\t\t[]\n\t);\n\n\t// It is ok for these components to be unmounted when not in visual use.\n\t// We don't want more than one present at a time, decide which to render.\n\tlet unmountableContent;\n\tif ( publishSidebarOpened ) {\n\t\tunmountableContent = (\n\t\t\t<PostPublishPanel\n\t\t\t\tonClose={ closePublishSidebar }\n\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\tPrePublishExtension={ PluginPrePublishPanel.Slot }\n\t\t\t\tPostPublishExtension={ PluginPostPublishPanel.Slot }\n\t\t\t/>\n\t\t);\n\t} else if ( hasNonPostEntityChanges ) {\n\t\tunmountableContent = (\n\t\t\t<div className=\"edit-post-layout__toggle-entities-saved-states-panel\">\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tclassName=\"edit-post-layout__toggle-entities-saved-states-panel-button\"\n\t\t\t\t\tonClick={ openEntitiesSavedStates }\n\t\t\t\t\taria-expanded={ false }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Open save panel' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t);\n\t} else {\n\t\tunmountableContent = (\n\t\t\t<div className=\"edit-post-layout__toggle-publish-panel\">\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tclassName=\"edit-post-layout__toggle-publish-panel-button\"\n\t\t\t\t\tonClick={ togglePublishSidebar }\n\t\t\t\t\taria-expanded={ false }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Open publish panel' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Since EntitiesSavedStates controls its own panel, we can keep it\n\t// always mounted to retain its own component state (such as checkboxes).\n\treturn (\n\t\t<>\n\t\t\t{ isEntitiesSavedStatesOpen && (\n\t\t\t\t<EntitiesSavedStates close={ closeEntitiesSavedStates } />\n\t\t\t) }\n\t\t\t<Slot bubblesVirtually />\n\t\t\t{ ! isEntitiesSavedStatesOpen && unmountableContent }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;AAWA,IAAAA,QAAA,GAAAC,OAAA;AARA,IAAAC,OAAA,GAAAD,OAAA;AAKA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,uBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,sBAAA,GAAAD,sBAAA,CAAAN,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAjBA;AACA;AACA;;AAUA;AACA;AACA;;AAKA,MAAM;EAAES,IAAI;EAAEC;AAAK,CAAC,GAAG,IAAAC,0BAAc,EAAE,cAAe,CAAC;AAEhD,MAAMC,gBAAgB,GAAGH,IAAI;AAACI,OAAA,CAAAD,gBAAA,GAAAA,gBAAA;AAEtB,SAASE,YAAYA,CAAE;EACrCC,8BAA8B;EAC9BC,wBAAwB;EACxBC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC,mBAAmB;IAAEC;EAAqB,CAAC,GAClD,IAAAC,iBAAW,EAAEC,YAAc,CAAC;EAC7B,MAAM;IACLC,oBAAoB;IACpBC,kBAAkB;IAClBC;EACD,CAAC,GAAG,IAAAC,eAAS,EACVC,MAAM,KAAQ;IACfJ,oBAAoB,EACnBI,MAAM,CAAEL,YAAc,CAAC,CAACM,sBAAsB,C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ACJ,CACL;EACF;;EAEA;EACA;EACA,OACC,IAAA9C,QAAA,CAAAkC,aAAA,EAAAlC,QAAA,CAAA+C,QAAA,QACG7B,yBAAyB,IAC1B,IAAAlB,QAAA,CAAAkC,aAAA,EAAChC,OAAA,CAAA8C,mBAAmB;IAACC,KAAK,EAAGhC;EAA0B,CAAE,CACzD,EACD,IAAAjB,QAAA,CAAAkC,aAAA,EAACvB,IAAI;IAACuC,gBAAgB;EAAA,CAAE,CAAC,EACvB,CAAEhC,yBAAyB,IAAIe,kBAChC,CAAC;AAEL"}
1
+ {"version":3,"names":["_editor","require","_data","_components","_i18n","_element","_pluginPostPublishPanel","_interopRequireDefault","_pluginPrePublishPanel","_store","Fill","Slot","createSlotFill","ActionsPanelFill","exports","ActionsPanel","setEntitiesSavedStatesCallback","closeEntitiesSavedStates","isEntitiesSavedStatesOpen","closePublishSidebar","togglePublishSidebar","useDispatch","editPostStore","publishSidebarOpened","hasActiveMetaboxes","hasNonPostEntityChanges","useSelect","select","isPublishSidebarOpened","hasMetaBoxes","editorStore","openEntitiesSavedStates","useCallback","unmountableContent","_react","createElement","PostPublishPanel","onClose","forceIsDirty","PrePublishExtension","PluginPrePublishPanel","PostPublishExtension","PluginPostPublishPanel","className","Button","variant","onClick","__","Fragment","EntitiesSavedStates","close","bubblesVirtually"],"sources":["@wordpress/edit-post/src/components/layout/actions-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tEntitiesSavedStates,\n\tPostPublishPanel,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { Button, createSlotFill } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useCallback } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport PluginPostPublishPanel from '../sidebar/plugin-post-publish-panel';\nimport PluginPrePublishPanel from '../sidebar/plugin-pre-publish-panel';\nimport { store as editPostStore } from '../../store';\n\nconst { Fill, Slot } = createSlotFill( 'ActionsPanel' );\n\nexport const ActionsPanelFill = Fill;\n\nexport default function ActionsPanel( {\n\tsetEntitiesSavedStatesCallback,\n\tcloseEntitiesSavedStates,\n\tisEntitiesSavedStatesOpen,\n} ) {\n\tconst { closePublishSidebar, togglePublishSidebar } =\n\t\tuseDispatch( editPostStore );\n\tconst {\n\t\tpublishSidebarOpened,\n\t\thasActiveMetaboxes,\n\t\thasNonPostEntityChanges,\n\t} = useSelect(\n\t\t( select ) => ( {\n\t\t\tpublishSidebarOpened:\n\t\t\t\tselect( editPostStore ).isPublishSidebarOpened(),\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\thasNonPostEntityChanges:\n\t\t\t\tselect( editorStore ).hasNonPostEntityChanges(),\n\t\t} ),\n\t\t[]\n\t);\n\n\tconst openEntitiesSavedStates = useCallback(\n\t\t() => setEntitiesSavedStatesCallback( true ),\n\t\t[]\n\t);\n\n\t// It is ok for these components to be unmounted when not in visual use.\n\t// We don't want more than one present at a time, decide which to render.\n\tlet unmountableContent;\n\tif ( publishSidebarOpened ) {\n\t\tunmountableContent = (\n\t\t\t<PostPublishPanel\n\t\t\t\tonClose={ closePublishSidebar }\n\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\tPrePublishExtension={ PluginPrePublishPanel.Slot }\n\t\t\t\tPostPublishExtension={ PluginPostPublishPanel.Slot }\n\t\t\t/>\n\t\t);\n\t} else if ( hasNonPostEntityChanges ) {\n\t\tunmountableContent = (\n\t\t\t<div className=\"edit-post-layout__toggle-entities-saved-states-panel\">\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tclassName=\"edit-post-layout__toggle-entities-saved-states-panel-button\"\n\t\t\t\t\tonClick={ openEntitiesSavedStates }\n\t\t\t\t\taria-expanded={ false }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Open save panel' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t);\n\t} else {\n\t\tunmountableContent = (\n\t\t\t<div className=\"edit-post-layout__toggle-publish-panel\">\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tclassName=\"edit-post-layout__toggle-publish-panel-button\"\n\t\t\t\t\tonClick={ togglePublishSidebar }\n\t\t\t\t\taria-expanded={ false }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Open publish panel' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Since EntitiesSavedStates controls its own panel, we can keep it\n\t// always mounted to retain its own component state (such as checkboxes).\n\treturn (\n\t\t<>\n\t\t\t{ isEntitiesSavedStatesOpen && (\n\t\t\t\t<EntitiesSavedStates close={ closeEntitiesSavedStates } />\n\t\t\t) }\n\t\t\t<Slot bubblesVirtually />\n\t\t\t{ ! isEntitiesSavedStatesOpen && unmountableContent }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAIA,IAAAK,uBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,sBAAA,GAAAD,sBAAA,CAAAN,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAjBA;AACA;AACA;;AAUA;AACA;AACA;;AAKA,MAAM;EAAES,IAAI;EAAEC;AAAK,CAAC,GAAG,IAAAC,0BAAc,EAAE,cAAe,CAAC;AAEhD,MAAMC,gBAAgB,GAAGH,IAAI;AAACI,OAAA,CAAAD,gBAAA,GAAAA,gBAAA;AAEtB,SAASE,YAAYA,CAAE;EACrCC,8BAA8B;EAC9BC,wBAAwB;EACxBC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC,mBAAmB;IAAEC;EAAqB,CAAC,GAClD,IAAAC,iBAAW,EAAEC,YAAc,CAAC;EAC7B,MAAM;IACLC,oB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C,WAAW;MACnBF,SAAS,EAAC,+CAA+C;MACzDG,OAAO,EAAG1B,oBAAsB;MAChC,iBAAgB;IAAO,GAErB,IAAA2B,QAAE,EAAE,oBAAqB,CACpB,CACJ,CACL;EACF;;EAEA;EACA;EACA,OACC,IAAAb,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAc,QAAA,QACG9B,yBAAyB,IAC1B,IAAAgB,MAAA,CAAAC,aAAA,EAACnC,OAAA,CAAAiD,mBAAmB;IAACC,KAAK,EAAGjC;EAA0B,CAAE,CACzD,EACD,IAAAiB,MAAA,CAAAC,aAAA,EAACxB,IAAI;IAACwC,gBAAgB;EAAA,CAAE,CAAC,EACvB,CAAEjC,yBAAyB,IAAIe,kBAChC,CAAC;AAEL"}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _element = require("@wordpress/element");
8
+ var _react = require("react");
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
10
  var _editor = require("@wordpress/editor");
11
11
  var _data = require("@wordpress/data");
@@ -15,6 +15,7 @@ var _compose = require("@wordpress/compose");
15
15
  var _plugins = require("@wordpress/plugins");
16
16
  var _i18n = require("@wordpress/i18n");
17
17
  var _interface = require("@wordpress/interface");
18
+ var _element = require("@wordpress/element");
18
19
  var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
19
20
  var _notices = require("@wordpress/notices");
20
21
  var _textEditor = _interopRequireDefault(require("../text-editor"));
@@ -192,10 +193,10 @@ function Layout() {
192
193
  const secondarySidebarLabel = isListViewOpened ? (0, _i18n.__)('Document Overview') : (0, _i18n.__)('Block Library');
193
194
  const secondarySidebar = () => {
194
195
  if (mode === 'visual' && isInserterOpened) {
195
- return (0, _element.createElement)(_inserterSidebar.default, null);
196
+ return (0, _react.createElement)(_inserterSidebar.default, null);
196
197
  }
197
198
  if (mode === 'visual' && isListViewOpened) {
198
- return (0, _element.createElement)(_listViewSidebar.default, {
199
+ return (0, _react.createElement)(_listViewSidebar.default, {
199
200
  listViewToggleElement: listViewToggleElement
200
201
  });
201
202
  }
@@ -205,47 +206,47 @@ function Layout() {
205
206
  createErrorNotice((0, _i18n.sprintf)( /* translators: %s: plugin name */
206
207
  (0, _i18n.__)('The "%s" plugin has encountered an error and cannot be rendered.'), name));
207
208
  }
208
- return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_interface.FullscreenMode, {
209
+ return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_interface.FullscreenMode, {
209
210
  isActive: isFullscreenActive
210
- }), (0, _element.createElement)(_browserUrl.default, null), (0, _element.createElement)(_editor.UnsavedChangesWarning, null), (0, _element.createElement)(_editor.AutosaveMonitor, null), (0, _element.createElement)(_editor.LocalAutosaveMonitor, null), (0, _element.createElement)(_keyboardShortcuts2.default, null), (0, _element.createElement)(_editor.EditorKeyboardShortcutsRegister, null), (0, _element.createElement)(_editor.EditorKeyboardShortcuts, null), (0, _element.createElement)(_interface.InterfaceSkeleton, {
211
+ }), (0, _react.createElement)(_browserUrl.default, null), (0, _react.createElement)(_editor.UnsavedChangesWarning, null), (0, _react.createElement)(_editor.AutosaveMonitor, null), (0, _react.createElement)(_editor.LocalAutosaveMonitor, null), (0, _react.createElement)(_keyboardShortcuts2.default, null), (0, _react.createElement)(_editor.EditorKeyboardShortcutsRegister, null), (0, _react.createElement)(_editor.EditorKeyboardShortcuts, null), (0, _react.createElement)(_interface.InterfaceSkeleton, {
211
212
  isDistractionFree: isDistractionFree && isLargeViewport,
212
213
  className: className,
213
214
  labels: {
214
215
  ...interfaceLabels,
215
216
  secondarySidebar: secondarySidebarLabel
216
217
  },
217
- header: (0, _element.createElement)(_header.default, {
218
+ header: (0, _react.createElement)(_header.default, {
218
219
  setEntitiesSavedStatesCallback: setEntitiesSavedStatesCallback,
219
220
  setListViewToggleElement: setListViewToggleElement
220
221
  }),
221
- editorNotices: (0, _element.createElement)(_editor.EditorNotices, null),
222
+ editorNotices: (0, _react.createElement)(_editor.EditorNotices, null),
222
223
  secondarySidebar: secondarySidebar(),
223
- sidebar: (!isMobileViewport || sidebarIsOpened) && (0, _element.createElement)(_element.Fragment, null, !isMobileViewport && !sidebarIsOpened && (0, _element.createElement)("div", {
224
+ sidebar: (!isMobileViewport || sidebarIsOpened) && (0, _react.createElement)(_react.Fragment, null, !isMobileViewport && !sidebarIsOpened && (0, _react.createElement)("div", {
224
225
  className: "edit-post-layout__toggle-sidebar-panel"
225
- }, (0, _element.createElement)(_components.Button, {
226
+ }, (0, _react.createElement)(_components.Button, {
226
227
  variant: "secondary",
227
228
  className: "edit-post-layout__toggle-sidebar-panel-button",
228
229
  onClick: openSidebarPanel,
229
230
  "aria-expanded": false
230
- }, hasBlockSelected ? (0, _i18n.__)('Open block settings') : (0, _i18n.__)('Open document settings'))), (0, _element.createElement)(_interface.ComplementaryArea.Slot, {
231
+ }, hasBlockSelected ? (0, _i18n.__)('Open block settings') : (0, _i18n.__)('Open document settings'))), (0, _react.createElement)(_interface.ComplementaryArea.Slot, {
231
232
  scope: "core/edit-post"
232
233
  })),
233
- notices: (0, _element.createElement)(_editor.EditorSnackbars, null),
234
- content: (0, _element.createElement)(_element.Fragment, null, !isDistractionFree && (0, _element.createElement)(_editor.EditorNotices, null), (mode === 'text' || !isRichEditingEnabled) && (0, _element.createElement)(_textEditor.default, null), isRichEditingEnabled && mode === 'visual' && (0, _element.createElement)(_visualEditor.default, {
234
+ notices: (0, _react.createElement)(_editor.EditorSnackbars, null),
235
+ content: (0, _react.createElement)(_react.Fragment, null, !isDistractionFree && (0, _react.createElement)(_editor.EditorNotices, null), (mode === 'text' || !isRichEditingEnabled) && (0, _react.createElement)(_textEditor.default, null), isRichEditingEnabled && mode === 'visual' && (0, _react.createElement)(_visualEditor.default, {
235
236
  styles: styles
236
- }), !isDistractionFree && !isTemplateMode && (0, _element.createElement)("div", {
237
+ }), !isDistractionFree && !isTemplateMode && (0, _react.createElement)("div", {
237
238
  className: "edit-post-layout__metaboxes"
238
- }, (0, _element.createElement)(_metaBoxes.default, {
239
+ }, (0, _react.createElement)(_metaBoxes.default, {
239
240
  location: "normal"
240
- }), (0, _element.createElement)(_metaBoxes.default, {
241
+ }), (0, _react.createElement)(_metaBoxes.default, {
241
242
  location: "advanced"
242
- })), isMobileViewport && sidebarIsOpened && (0, _element.createElement)(_components.ScrollLock, null)),
243
- footer: !isDistractionFree && !isMobileViewport && showBlockBreadcrumbs && isRichEditingEnabled && mode === 'visual' && (0, _element.createElement)("div", {
243
+ })), isMobileViewport && sidebarIsOpened && (0, _react.createElement)(_components.ScrollLock, null)),
244
+ footer: !isDistractionFree && !isMobileViewport && showBlockBreadcrumbs && isRichEditingEnabled && mode === 'visual' && (0, _react.createElement)("div", {
244
245
  className: "edit-post-layout__footer"
245
- }, (0, _element.createElement)(_blockEditor.BlockBreadcrumb, {
246
+ }, (0, _react.createElement)(_blockEditor.BlockBreadcrumb, {
246
247
  rootLabelText: documentLabel
247
248
  })),
248
- actions: (0, _element.createElement)(_actionsPanel.default, {
249
+ actions: (0, _react.createElement)(_actionsPanel.default, {
249
250
  closeEntitiesSavedStates: closeEntitiesSavedStates,
250
251
  isEntitiesSavedStatesOpen: entitiesSavedStatesCallback,
251
252
  setEntitiesSavedStatesCallback: setEntitiesSavedStatesCallback
@@ -254,9 +255,9 @@ function Layout() {
254
255
  previous: previousShortcut,
255
256
  next: nextShortcut
256
257
  }
257
- }), (0, _element.createElement)(_preferencesModal.default, null), (0, _element.createElement)(_keyboardShortcutHelpModal.default, null), (0, _element.createElement)(_welcomeGuide.default, null), (0, _element.createElement)(_editor.PostSyncStatusModal, null), (0, _element.createElement)(_startPageOptions.default, null), (0, _element.createElement)(_plugins.PluginArea, {
258
+ }), (0, _react.createElement)(_preferencesModal.default, null), (0, _react.createElement)(_keyboardShortcutHelpModal.default, null), (0, _react.createElement)(_welcomeGuide.default, null), (0, _react.createElement)(_editor.PostSyncStatusModal, null), (0, _react.createElement)(_startPageOptions.default, null), (0, _react.createElement)(_plugins.PluginArea, {
258
259
  onError: onPluginAreaError
259
- }), (0, _element.createElement)(_settingsSidebar.default, null));
260
+ }), (0, _react.createElement)(_settingsSidebar.default, null));
260
261
  }
261
262
  var _default = Layout;
262
263
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_classnames","_interopRequireDefault","_editor","_data","_blockEditor","_components","_compose","_plugins","_i18n","_interface","_keyboardShortcuts","_notices","_textEditor","_visualEditor","_keyboardShortcuts2","_keyboardShortcutHelpModal","_preferencesModal","_browserUrl","_header","_inserterSidebar","_listViewSidebar","_settingsSidebar","_metaBoxes","_welcomeGuide","_actionsPanel","_startPageOptions","_store","_lockUnlock","getLayoutStyles","unlock","blockEditorPrivateApis","interfaceLabels","header","__","body","sidebar","actions","footer","useEditorStyles","hasThemeStyleSupport","editorSettings","useSelect","select","editPostStore","isFeatureActive","editorStore","getEditorSettings","useMemo","_editorSettings$style","_editorSettings$style2","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","Layout","useBlockCommands","isMobileViewport","useViewportMatch","isHugeViewport","isLargeViewport","openGeneralSidebar","closeGeneralSidebar","setIsInserterOpened","useDispatch","createErrorNotice","noticesStore","mode","isFullscreenActive","isRichEditingEnabled","sidebarIsOpened","hasActiveMetaboxes","hasFixedToolbar","previousShortcut","nextShortcut","hasBlockSelected","isInserterOpened","isListViewOpened","showIconLabels","isDistractionFree","showBlockBreadcrumbs","isTemplateMode","documentLabel","getPostTypeLabel","postTypeLabel","isEditingTemplate","interfaceStore","getActiveComplementaryArea","name","isPublishSidebarOpened","getEditorMode","richEditingEnabled","hasMetaBoxes","keyboardShortcutsStore","getAllShortcutKeyCombinations","_x","openSidebarPanel","useEffect","entitiesSavedStatesCallback","setEntitiesSavedStatesCallback","useState","listViewToggleElement","setListViewToggleElement","closeEntitiesSavedStates","useCallback","arg","document","classList","add","remove","className","classnames","secondarySidebarLabel","secondarySidebar","createElement","default","onPluginAreaError","sprintf","Fragment","FullscreenMode","isActive","UnsavedChangesWarning","AutosaveMonitor","LocalAutosaveMonitor","EditorKeyboardShortcutsRegister","EditorKeyboardShortcuts","InterfaceSkeleton","labels","editorNotices","EditorNotices","Button","variant","onClick","ComplementaryArea","Slot","scope","notices","EditorSnackbars","content","location","ScrollLock","BlockBreadcrumb","rootLabelText","isEntitiesSavedStatesOpen","shortcuts","previous","next","PostSyncStatusModal","PluginArea","onError","_default","exports"],"sources":["@wordpress/edit-post/src/components/layout/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAutosaveMonitor,\n\tLocalAutosaveMonitor,\n\tUnsavedChangesWarning,\n\tEditorNotices,\n\tEditorKeyboardShortcutsRegister,\n\tEditorKeyboardShortcuts,\n\tEditorSnackbars,\n\tPostSyncStatusModal,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tuseBlockCommands,\n\tBlockBreadcrumb,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { Button, ScrollLock } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport {\n\tComplementaryArea,\n\tFullscreenMode,\n\tInterfaceSkeleton,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport { useState, useEffect, useCallback, useMemo } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport TextEditor from '../text-editor';\nimport VisualEditor from '../visual-editor';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';\nimport EditPostPreferencesModal from '../preferences-modal';\nimport BrowserURL from '../browser-url';\nimport Header from '../header';\nimport InserterSidebar from '../secondary-sidebar/inserter-sidebar';\nimport ListViewSidebar from '../secondary-sidebar/list-view-sidebar';\nimport SettingsSidebar from '../sidebar/settings-sidebar';\nimport MetaBoxes from '../meta-boxes';\nimport WelcomeGuide from '../welcome-guide';\nimport ActionsPanel from './actions-panel';\nimport StartPageOptions from '../start-page-options';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the editor top bar landmark region. */\n\theader: __( 'Editor top bar' ),\n\t/* translators: accessibility text for the editor content landmark region. */\n\tbody: __( 'Editor content' ),\n\t/* translators: accessibility text for the editor settings landmark region. */\n\tsidebar: __( 'Editor settings' ),\n\t/* translators: accessibility text for the editor publish landmark region. */\n\tactions: __( 'Editor publish' ),\n\t/* translators: accessibility text for the editor footer landmark region. */\n\tfooter: __( 'Editor footer' ),\n};\n\nfunction useEditorStyles() {\n\tconst { hasThemeStyleSupport, editorSettings } = useSelect(\n\t\t( select ) => ( {\n\t\t\thasThemeStyleSupport:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'themeStyles' ),\n\t\t\teditorSettings: select( editorStore ).getEditorSettings(),\n\t\t} ),\n\t\t[]\n\t);\n\n\t// Compute the default styles.\n\treturn useMemo( () => {\n\t\tconst presetStyles =\n\t\t\teditorSettings.styles?.filter(\n\t\t\t\t( style ) =>\n\t\t\t\t\tstyle.__unstableType && style.__unstableType !== 'theme'\n\t\t\t) ?? [];\n\n\t\tconst defaultEditorStyles = [\n\t\t\t...editorSettings.defaultEditorStyles,\n\t\t\t...presetStyles,\n\t\t];\n\n\t\t// Has theme styles if the theme supports them and if some styles were not preset styles (in which case they're theme styles).\n\t\tconst hasThemeStyles =\n\t\t\thasThemeStyleSupport &&\n\t\t\tpresetStyles.length !== ( editorSettings.styles?.length ?? 0 );\n\n\t\t// If theme styles are not present or displayed, ensure that\n\t\t// base layout styles are still present in the editor.\n\t\tif ( ! editorSettings.disableLayoutStyles && ! hasThemeStyles ) {\n\t\t\tdefaultEditorStyles.push( {\n\t\t\t\tcss: getLayoutStyles( {\n\t\t\t\t\tstyle: {},\n\t\t\t\t\tselector: 'body',\n\t\t\t\t\thasBlockGapSupport: false,\n\t\t\t\t\thasFallbackGapSupport: true,\n\t\t\t\t\tfallbackGapValue: '0.5em',\n\t\t\t\t} ),\n\t\t\t} );\n\t\t}\n\n\t\treturn hasThemeStyles ? editorSettings.styles : defaultEditorStyles;\n\t}, [\n\t\teditorSettings.defaultEditorStyles,\n\t\teditorSettings.disableLayoutStyles,\n\t\teditorSettings.styles,\n\t\thasThemeStyleSupport,\n\t] );\n}\n\nfunction Layout() {\n\tuseBlockCommands();\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isHugeViewport = useViewportMatch( 'huge', '>=' );\n\tconst isLargeViewport = useViewportMatch( 'large' );\n\tconst { openGeneralSidebar, closeGeneralSidebar, setIsInserterOpened } =\n\t\tuseDispatch( editPostStore );\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst {\n\t\tmode,\n\t\tisFullscreenActive,\n\t\tisRichEditingEnabled,\n\t\tsidebarIsOpened,\n\t\thasActiveMetaboxes,\n\t\thasFixedToolbar,\n\t\tpreviousShortcut,\n\t\tnextShortcut,\n\t\thasBlockSelected,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\n\t\tshowBlockBreadcrumbs,\n\t\tisTemplateMode,\n\t\tdocumentLabel,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditorSettings, getPostTypeLabel } = select( editorStore );\n\t\tconst editorSettings = getEditorSettings();\n\t\tconst postTypeLabel = getPostTypeLabel();\n\n\t\treturn {\n\t\t\tisTemplateMode: select( editPostStore ).isEditingTemplate(),\n\t\t\thasFixedToolbar:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fixedToolbar' ),\n\t\t\tsidebarIsOpened: !! (\n\t\t\t\tselect( interfaceStore ).getActiveComplementaryArea(\n\t\t\t\t\teditPostStore.name\n\t\t\t\t) || select( editPostStore ).isPublishSidebarOpened()\n\t\t\t),\n\t\t\tisFullscreenActive:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\tisInserterOpened: select( editPostStore ).isInserterOpened(),\n\t\t\tisListViewOpened: select( editPostStore ).isListViewOpened(),\n\t\t\tmode: select( editPostStore ).getEditorMode(),\n\t\t\tisRichEditingEnabled: editorSettings.richEditingEnabled,\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-post/previous-region' ),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-post/next-region' ),\n\t\t\tshowIconLabels:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'showIconLabels' ),\n\t\t\tisDistractionFree:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'distractionFree' ),\n\t\t\tshowBlockBreadcrumbs: select( editPostStore ).isFeatureActive(\n\t\t\t\t'showBlockBreadcrumbs'\n\t\t\t),\n\t\t\t// translators: Default label for the Document in the Block Breadcrumb.\n\t\t\tdocumentLabel: postTypeLabel || _x( 'Document', 'noun' ),\n\t\t};\n\t}, [] );\n\n\tconst styles = useEditorStyles();\n\n\tconst openSidebarPanel = () =>\n\t\topenGeneralSidebar(\n\t\t\thasBlockSelected ? 'edit-post/block' : 'edit-post/document'\n\t\t);\n\n\t// Inserter and Sidebars are mutually exclusive\n\tuseEffect( () => {\n\t\tif ( sidebarIsOpened && ! isHugeViewport ) {\n\t\t\tsetIsInserterOpened( false );\n\t\t}\n\t}, [ sidebarIsOpened, isHugeViewport ] );\n\tuseEffect( () => {\n\t\tif ( isInserterOpened && ! isHugeViewport ) {\n\t\t\tcloseGeneralSidebar();\n\t\t}\n\t}, [ isInserterOpened, isHugeViewport ] );\n\n\t// Local state for save panel.\n\t// Note 'truthy' callback implies an open panel.\n\tconst [ entitiesSavedStatesCallback, setEntitiesSavedStatesCallback ] =\n\t\tuseState( false );\n\n\tconst [ listViewToggleElement, setListViewToggleElement ] =\n\t\tuseState( null );\n\n\tconst closeEntitiesSavedStates = useCallback(\n\t\t( arg ) => {\n\t\t\tif ( typeof entitiesSavedStatesCallback === 'function' ) {\n\t\t\t\tentitiesSavedStatesCallback( arg );\n\t\t\t}\n\t\t\tsetEntitiesSavedStatesCallback( false );\n\t\t},\n\t\t[ entitiesSavedStatesCallback ]\n\t);\n\n\t// We need to add the show-icon-labels class to the body element so it is applied to modals.\n\tif ( showIconLabels ) {\n\t\tdocument.body.classList.add( 'show-icon-labels' );\n\t} else {\n\t\tdocument.body.classList.remove( 'show-icon-labels' );\n\t}\n\n\tconst className = classnames( 'edit-post-layout', 'is-mode-' + mode, {\n\t\t'is-sidebar-opened': sidebarIsOpened,\n\t\t'has-fixed-toolbar': hasFixedToolbar,\n\t\t'has-metaboxes': hasActiveMetaboxes,\n\t\t'is-distraction-free': isDistractionFree && isLargeViewport,\n\t\t'is-entity-save-view-open': !! entitiesSavedStatesCallback,\n\t} );\n\n\tconst secondarySidebarLabel = isListViewOpened\n\t\t? __( 'Document Overview' )\n\t\t: __( 'Block Library' );\n\n\tconst secondarySidebar = () => {\n\t\tif ( mode === 'visual' && isInserterOpened ) {\n\t\t\treturn <InserterSidebar />;\n\t\t}\n\t\tif ( mode === 'visual' && isListViewOpened ) {\n\t\t\treturn (\n\t\t\t\t<ListViewSidebar\n\t\t\t\t\tlistViewToggleElement={ listViewToggleElement }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t};\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\treturn (\n\t\t<>\n\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t<BrowserURL />\n\t\t\t<UnsavedChangesWarning />\n\t\t\t<AutosaveMonitor />\n\t\t\t<LocalAutosaveMonitor />\n\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t<EditorKeyboardShortcuts />\n\n\t\t\t<InterfaceSkeleton\n\t\t\t\tisDistractionFree={ isDistractionFree && isLargeViewport }\n\t\t\t\tclassName={ className }\n\t\t\t\tlabels={ {\n\t\t\t\t\t...interfaceLabels,\n\t\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t\t} }\n\t\t\t\theader={\n\t\t\t\t\t<Header\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetListViewToggleElement={ setListViewToggleElement }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\teditorNotices={ <EditorNotices /> }\n\t\t\t\tsecondarySidebar={ secondarySidebar() }\n\t\t\t\tsidebar={\n\t\t\t\t\t( ! isMobileViewport || sidebarIsOpened ) && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ ! isMobileViewport && ! sidebarIsOpened && (\n\t\t\t\t\t\t\t\t<div className=\"edit-post-layout__toggle-sidebar-panel\">\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"edit-post-layout__toggle-sidebar-panel-button\"\n\t\t\t\t\t\t\t\t\t\tonClick={ openSidebarPanel }\n\t\t\t\t\t\t\t\t\t\taria-expanded={ false }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ hasBlockSelected\n\t\t\t\t\t\t\t\t\t\t\t? __( 'Open block settings' )\n\t\t\t\t\t\t\t\t\t\t\t: __( 'Open document settings' ) }\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<ComplementaryArea.Slot scope=\"core/edit-post\" />\n\t\t\t\t\t\t</>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tnotices={ <EditorSnackbars /> }\n\t\t\t\tcontent={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isDistractionFree && <EditorNotices /> }\n\t\t\t\t\t\t{ ( mode === 'text' || ! isRichEditingEnabled ) && (\n\t\t\t\t\t\t\t<TextEditor />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isRichEditingEnabled && mode === 'visual' && (\n\t\t\t\t\t\t\t<VisualEditor styles={ styles } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! isDistractionFree && ! isTemplateMode && (\n\t\t\t\t\t\t\t<div className=\"edit-post-layout__metaboxes\">\n\t\t\t\t\t\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t\t\t\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isMobileViewport && sidebarIsOpened && (\n\t\t\t\t\t\t\t<ScrollLock />\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t\tfooter={\n\t\t\t\t\t! isDistractionFree &&\n\t\t\t\t\t! isMobileViewport &&\n\t\t\t\t\tshowBlockBreadcrumbs &&\n\t\t\t\t\tisRichEditingEnabled &&\n\t\t\t\t\tmode === 'visual' && (\n\t\t\t\t\t\t<div className=\"edit-post-layout__footer\">\n\t\t\t\t\t\t\t<BlockBreadcrumb rootLabelText={ documentLabel } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<ActionsPanel\n\t\t\t\t\t\tcloseEntitiesSavedStates={ closeEntitiesSavedStates }\n\t\t\t\t\t\tisEntitiesSavedStatesOpen={\n\t\t\t\t\t\t\tentitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tshortcuts={ {\n\t\t\t\t\tprevious: previousShortcut,\n\t\t\t\t\tnext: nextShortcut,\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<EditPostPreferencesModal />\n\t\t\t<KeyboardShortcutHelpModal />\n\t\t\t<WelcomeGuide />\n\t\t\t<PostSyncStatusModal />\n\t\t\t<StartPageOptions />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t<SettingsSidebar />\n\t\t</>\n\t);\n}\n\nexport default Layout;\n"],"mappings":";;;;;;;AAmCA,IAAAA,QAAA,GAAAC,OAAA;AAhCA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,OAAA,GAAAH,OAAA;AAWA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AAKA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,KAAA,GAAAT,OAAA;AACA,IAAAU,UAAA,GAAAV,OAAA;AAOA,IAAAW,kBAAA,GAAAX,OAAA;AACA,IAAAY,QAAA,GAAAZ,OAAA;AAKA,IAAAa,WAAA,GAAAX,sBAAA,CAAAF,OAAA;AACA,IAAAc,aAAA,GAAAZ,sBAAA,CAAAF,OAAA;AACA,IAAAe,mBAAA,GAAAb,sBAAA,CAAAF,OAAA;AACA,IAAAgB,0BAAA,GAAAd,sBAAA,CA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AA8B,EAC7BA;IACA,CACD,CACD;IACD6C,SAAS,EAAG;MACXC,QAAQ,EAAExE,gBAAgB;MAC1ByE,IAAI,EAAExE;IACP;EAAG,CACH,CAAC,EACF,IAAAtF,QAAA,CAAA8H,aAAA,EAAC5G,iBAAA,CAAA6G,OAAwB,MAAE,CAAC,EAC5B,IAAA/H,QAAA,CAAA8H,aAAA,EAAC7G,0BAAA,CAAA8G,OAAyB,MAAE,CAAC,EAC7B,IAAA/H,QAAA,CAAA8H,aAAA,EAACrG,aAAA,CAAAsG,OAAY,MAAE,CAAC,EAChB,IAAA/H,QAAA,CAAA8H,aAAA,EAAC1H,OAAA,CAAA2J,mBAAmB,MAAE,CAAC,EACvB,IAAA/J,QAAA,CAAA8H,aAAA,EAACnG,iBAAA,CAAAoG,OAAgB,MAAE,CAAC,EACpB,IAAA/H,QAAA,CAAA8H,aAAA,EAACrH,QAAA,CAAAuJ,UAAU;IAACC,OAAO,EAAGjC;EAAmB,CAAE,CAAC,EAC5C,IAAAhI,QAAA,CAAA8H,aAAA,EAACvG,gBAAA,CAAAwG,OAAe,MAAE,CACjB,CAAC;AAEL;AAAC,IAAAmC,QAAA,GAEc/F,MAAM;AAAAgG,OAAA,CAAApC,OAAA,GAAAmC,QAAA"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_editor","_data","_blockEditor","_components","_compose","_plugins","_i18n","_interface","_element","_keyboardShortcuts","_notices","_textEditor","_visualEditor","_keyboardShortcuts2","_keyboardShortcutHelpModal","_preferencesModal","_browserUrl","_header","_inserterSidebar","_listViewSidebar","_settingsSidebar","_metaBoxes","_welcomeGuide","_actionsPanel","_startPageOptions","_store","_lockUnlock","getLayoutStyles","unlock","blockEditorPrivateApis","interfaceLabels","header","__","body","sidebar","actions","footer","useEditorStyles","hasThemeStyleSupport","editorSettings","useSelect","select","editPostStore","isFeatureActive","editorStore","getEditorSettings","useMemo","_editorSettings$style","_editorSettings$style2","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","Layout","useBlockCommands","isMobileViewport","useViewportMatch","isHugeViewport","isLargeViewport","openGeneralSidebar","closeGeneralSidebar","setIsInserterOpened","useDispatch","createErrorNotice","noticesStore","mode","isFullscreenActive","isRichEditingEnabled","sidebarIsOpened","hasActiveMetaboxes","hasFixedToolbar","previousShortcut","nextShortcut","hasBlockSelected","isInserterOpened","isListViewOpened","showIconLabels","isDistractionFree","showBlockBreadcrumbs","isTemplateMode","documentLabel","getPostTypeLabel","postTypeLabel","isEditingTemplate","interfaceStore","getActiveComplementaryArea","name","isPublishSidebarOpened","getEditorMode","richEditingEnabled","hasMetaBoxes","keyboardShortcutsStore","getAllShortcutKeyCombinations","_x","openSidebarPanel","useEffect","entitiesSavedStatesCallback","setEntitiesSavedStatesCallback","useState","listViewToggleElement","setListViewToggleElement","closeEntitiesSavedStates","useCallback","arg","document","classList","add","remove","className","classnames","secondarySidebarLabel","secondarySidebar","_react","createElement","default","onPluginAreaError","sprintf","Fragment","FullscreenMode","isActive","UnsavedChangesWarning","AutosaveMonitor","LocalAutosaveMonitor","EditorKeyboardShortcutsRegister","EditorKeyboardShortcuts","InterfaceSkeleton","labels","editorNotices","EditorNotices","Button","variant","onClick","ComplementaryArea","Slot","scope","notices","EditorSnackbars","content","location","ScrollLock","BlockBreadcrumb","rootLabelText","isEntitiesSavedStatesOpen","shortcuts","previous","next","PostSyncStatusModal","PluginArea","onError","_default","exports"],"sources":["@wordpress/edit-post/src/components/layout/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAutosaveMonitor,\n\tLocalAutosaveMonitor,\n\tUnsavedChangesWarning,\n\tEditorNotices,\n\tEditorKeyboardShortcutsRegister,\n\tEditorKeyboardShortcuts,\n\tEditorSnackbars,\n\tPostSyncStatusModal,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tuseBlockCommands,\n\tBlockBreadcrumb,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { Button, ScrollLock } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport {\n\tComplementaryArea,\n\tFullscreenMode,\n\tInterfaceSkeleton,\n\tstore as interfaceStore,\n} from '@wordpress/interface';\nimport { useState, useEffect, useCallback, useMemo } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport TextEditor from '../text-editor';\nimport VisualEditor from '../visual-editor';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';\nimport EditPostPreferencesModal from '../preferences-modal';\nimport BrowserURL from '../browser-url';\nimport Header from '../header';\nimport InserterSidebar from '../secondary-sidebar/inserter-sidebar';\nimport ListViewSidebar from '../secondary-sidebar/list-view-sidebar';\nimport SettingsSidebar from '../sidebar/settings-sidebar';\nimport MetaBoxes from '../meta-boxes';\nimport WelcomeGuide from '../welcome-guide';\nimport ActionsPanel from './actions-panel';\nimport StartPageOptions from '../start-page-options';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the editor top bar landmark region. */\n\theader: __( 'Editor top bar' ),\n\t/* translators: accessibility text for the editor content landmark region. */\n\tbody: __( 'Editor content' ),\n\t/* translators: accessibility text for the editor settings landmark region. */\n\tsidebar: __( 'Editor settings' ),\n\t/* translators: accessibility text for the editor publish landmark region. */\n\tactions: __( 'Editor publish' ),\n\t/* translators: accessibility text for the editor footer landmark region. */\n\tfooter: __( 'Editor footer' ),\n};\n\nfunction useEditorStyles() {\n\tconst { hasThemeStyleSupport, editorSettings } = useSelect(\n\t\t( select ) => ( {\n\t\t\thasThemeStyleSupport:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'themeStyles' ),\n\t\t\teditorSettings: select( editorStore ).getEditorSettings(),\n\t\t} ),\n\t\t[]\n\t);\n\n\t// Compute the default styles.\n\treturn useMemo( () => {\n\t\tconst presetStyles =\n\t\t\teditorSettings.styles?.filter(\n\t\t\t\t( style ) =>\n\t\t\t\t\tstyle.__unstableType && style.__unstableType !== 'theme'\n\t\t\t) ?? [];\n\n\t\tconst defaultEditorStyles = [\n\t\t\t...editorSettings.defaultEditorStyles,\n\t\t\t...presetStyles,\n\t\t];\n\n\t\t// Has theme styles if the theme supports them and if some styles were not preset styles (in which case they're theme styles).\n\t\tconst hasThemeStyles =\n\t\t\thasThemeStyleSupport &&\n\t\t\tpresetStyles.length !== ( editorSettings.styles?.length ?? 0 );\n\n\t\t// If theme styles are not present or displayed, ensure that\n\t\t// base layout styles are still present in the editor.\n\t\tif ( ! editorSettings.disableLayoutStyles && ! hasThemeStyles ) {\n\t\t\tdefaultEditorStyles.push( {\n\t\t\t\tcss: getLayoutStyles( {\n\t\t\t\t\tstyle: {},\n\t\t\t\t\tselector: 'body',\n\t\t\t\t\thasBlockGapSupport: false,\n\t\t\t\t\thasFallbackGapSupport: true,\n\t\t\t\t\tfallbackGapValue: '0.5em',\n\t\t\t\t} ),\n\t\t\t} );\n\t\t}\n\n\t\treturn hasThemeStyles ? editorSettings.styles : defaultEditorStyles;\n\t}, [\n\t\teditorSettings.defaultEditorStyles,\n\t\teditorSettings.disableLayoutStyles,\n\t\teditorSettings.styles,\n\t\thasThemeStyleSupport,\n\t] );\n}\n\nfunction Layout() {\n\tuseBlockCommands();\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isHugeViewport = useViewportMatch( 'huge', '>=' );\n\tconst isLargeViewport = useViewportMatch( 'large' );\n\tconst { openGeneralSidebar, closeGeneralSidebar, setIsInserterOpened } =\n\t\tuseDispatch( editPostStore );\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst {\n\t\tmode,\n\t\tisFullscreenActive,\n\t\tisRichEditingEnabled,\n\t\tsidebarIsOpened,\n\t\thasActiveMetaboxes,\n\t\thasFixedToolbar,\n\t\tpreviousShortcut,\n\t\tnextShortcut,\n\t\thasBlockSelected,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\n\t\tshowBlockBreadcrumbs,\n\t\tisTemplateMode,\n\t\tdocumentLabel,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditorSettings, getPostTypeLabel } = select( editorStore );\n\t\tconst editorSettings = getEditorSettings();\n\t\tconst postTypeLabel = getPostTypeLabel();\n\n\t\treturn {\n\t\t\tisTemplateMode: select( editPostStore ).isEditingTemplate(),\n\t\t\thasFixedToolbar:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fixedToolbar' ),\n\t\t\tsidebarIsOpened: !! (\n\t\t\t\tselect( interfaceStore ).getActiveComplementaryArea(\n\t\t\t\t\teditPostStore.name\n\t\t\t\t) || select( editPostStore ).isPublishSidebarOpened()\n\t\t\t),\n\t\t\tisFullscreenActive:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\tisInserterOpened: select( editPostStore ).isInserterOpened(),\n\t\t\tisListViewOpened: select( editPostStore ).isListViewOpened(),\n\t\t\tmode: select( editPostStore ).getEditorMode(),\n\t\t\tisRichEditingEnabled: editorSettings.richEditingEnabled,\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\tpreviousShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-post/previous-region' ),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/edit-post/next-region' ),\n\t\t\tshowIconLabels:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'showIconLabels' ),\n\t\t\tisDistractionFree:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'distractionFree' ),\n\t\t\tshowBlockBreadcrumbs: select( editPostStore ).isFeatureActive(\n\t\t\t\t'showBlockBreadcrumbs'\n\t\t\t),\n\t\t\t// translators: Default label for the Document in the Block Breadcrumb.\n\t\t\tdocumentLabel: postTypeLabel || _x( 'Document', 'noun' ),\n\t\t};\n\t}, [] );\n\n\tconst styles = useEditorStyles();\n\n\tconst openSidebarPanel = () =>\n\t\topenGeneralSidebar(\n\t\t\thasBlockSelected ? 'edit-post/block' : 'edit-post/document'\n\t\t);\n\n\t// Inserter and Sidebars are mutually exclusive\n\tuseEffect( () => {\n\t\tif ( sidebarIsOpened && ! isHugeViewport ) {\n\t\t\tsetIsInserterOpened( false );\n\t\t}\n\t}, [ sidebarIsOpened, isHugeViewport ] );\n\tuseEffect( () => {\n\t\tif ( isInserterOpened && ! isHugeViewport ) {\n\t\t\tcloseGeneralSidebar();\n\t\t}\n\t}, [ isInserterOpened, isHugeViewport ] );\n\n\t// Local state for save panel.\n\t// Note 'truthy' callback implies an open panel.\n\tconst [ entitiesSavedStatesCallback, setEntitiesSavedStatesCallback ] =\n\t\tuseState( false );\n\n\tconst [ listViewToggleElement, setListViewToggleElement ] =\n\t\tuseState( null );\n\n\tconst closeEntitiesSavedStates = useCallback(\n\t\t( arg ) => {\n\t\t\tif ( typeof entitiesSavedStatesCallback === 'function' ) {\n\t\t\t\tentitiesSavedStatesCallback( arg );\n\t\t\t}\n\t\t\tsetEntitiesSavedStatesCallback( false );\n\t\t},\n\t\t[ entitiesSavedStatesCallback ]\n\t);\n\n\t// We need to add the show-icon-labels class to the body element so it is applied to modals.\n\tif ( showIconLabels ) {\n\t\tdocument.body.classList.add( 'show-icon-labels' );\n\t} else {\n\t\tdocument.body.classList.remove( 'show-icon-labels' );\n\t}\n\n\tconst className = classnames( 'edit-post-layout', 'is-mode-' + mode, {\n\t\t'is-sidebar-opened': sidebarIsOpened,\n\t\t'has-fixed-toolbar': hasFixedToolbar,\n\t\t'has-metaboxes': hasActiveMetaboxes,\n\t\t'is-distraction-free': isDistractionFree && isLargeViewport,\n\t\t'is-entity-save-view-open': !! entitiesSavedStatesCallback,\n\t} );\n\n\tconst secondarySidebarLabel = isListViewOpened\n\t\t? __( 'Document Overview' )\n\t\t: __( 'Block Library' );\n\n\tconst secondarySidebar = () => {\n\t\tif ( mode === 'visual' && isInserterOpened ) {\n\t\t\treturn <InserterSidebar />;\n\t\t}\n\t\tif ( mode === 'visual' && isListViewOpened ) {\n\t\t\treturn (\n\t\t\t\t<ListViewSidebar\n\t\t\t\t\tlistViewToggleElement={ listViewToggleElement }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t};\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\treturn (\n\t\t<>\n\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t<BrowserURL />\n\t\t\t<UnsavedChangesWarning />\n\t\t\t<AutosaveMonitor />\n\t\t\t<LocalAutosaveMonitor />\n\t\t\t<EditPostKeyboardShortcuts />\n\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t<EditorKeyboardShortcuts />\n\n\t\t\t<InterfaceSkeleton\n\t\t\t\tisDistractionFree={ isDistractionFree && isLargeViewport }\n\t\t\t\tclassName={ className }\n\t\t\t\tlabels={ {\n\t\t\t\t\t...interfaceLabels,\n\t\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t\t} }\n\t\t\t\theader={\n\t\t\t\t\t<Header\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetListViewToggleElement={ setListViewToggleElement }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\teditorNotices={ <EditorNotices /> }\n\t\t\t\tsecondarySidebar={ secondarySidebar() }\n\t\t\t\tsidebar={\n\t\t\t\t\t( ! isMobileViewport || sidebarIsOpened ) && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ ! isMobileViewport && ! sidebarIsOpened && (\n\t\t\t\t\t\t\t\t<div className=\"edit-post-layout__toggle-sidebar-panel\">\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"edit-post-layout__toggle-sidebar-panel-button\"\n\t\t\t\t\t\t\t\t\t\tonClick={ openSidebarPanel }\n\t\t\t\t\t\t\t\t\t\taria-expanded={ false }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ hasBlockSelected\n\t\t\t\t\t\t\t\t\t\t\t? __( 'Open block settings' )\n\t\t\t\t\t\t\t\t\t\t\t: __( 'Open document settings' ) }\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<ComplementaryArea.Slot scope=\"core/edit-post\" />\n\t\t\t\t\t\t</>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tnotices={ <EditorSnackbars /> }\n\t\t\t\tcontent={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isDistractionFree && <EditorNotices /> }\n\t\t\t\t\t\t{ ( mode === 'text' || ! isRichEditingEnabled ) && (\n\t\t\t\t\t\t\t<TextEditor />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isRichEditingEnabled && mode === 'visual' && (\n\t\t\t\t\t\t\t<VisualEditor styles={ styles } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! isDistractionFree && ! isTemplateMode && (\n\t\t\t\t\t\t\t<div className=\"edit-post-layout__metaboxes\">\n\t\t\t\t\t\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t\t\t\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isMobileViewport && sidebarIsOpened && (\n\t\t\t\t\t\t\t<ScrollLock />\n\t\t\t\t\t\t) }\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t\tfooter={\n\t\t\t\t\t! isDistractionFree &&\n\t\t\t\t\t! isMobileViewport &&\n\t\t\t\t\tshowBlockBreadcrumbs &&\n\t\t\t\t\tisRichEditingEnabled &&\n\t\t\t\t\tmode === 'visual' && (\n\t\t\t\t\t\t<div className=\"edit-post-layout__footer\">\n\t\t\t\t\t\t\t<BlockBreadcrumb rootLabelText={ documentLabel } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<ActionsPanel\n\t\t\t\t\t\tcloseEntitiesSavedStates={ closeEntitiesSavedStates }\n\t\t\t\t\t\tisEntitiesSavedStatesOpen={\n\t\t\t\t\t\t\tentitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tshortcuts={ {\n\t\t\t\t\tprevious: previousShortcut,\n\t\t\t\t\tnext: nextShortcut,\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<EditPostPreferencesModal />\n\t\t\t<KeyboardShortcutHelpModal />\n\t\t\t<WelcomeGuide />\n\t\t\t<PostSyncStatusModal />\n\t\t\t<StartPageOptions />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t<SettingsSidebar />\n\t\t</>\n\t);\n}\n\n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AEL;AAAC,IAAAmC,QAAA,GAEchG,MAAM;AAAAiG,OAAA,CAAApC,OAAA,GAAAmC,QAAA"}
@@ -5,9 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _element = require("@wordpress/element");
8
+ var _react = require("react");
9
9
  var _reactNative = require("react-native");
10
10
  var _reactNativeSafeArea = _interopRequireDefault(require("react-native-safe-area"));
11
+ var _element = require("@wordpress/element");
11
12
  var _data = require("@wordpress/data");
12
13
  var _blockEditor = require("@wordpress/block-editor");
13
14
  var _compose = require("@wordpress/compose");
@@ -84,7 +85,7 @@ class Layout extends _element.Component {
84
85
  const {
85
86
  globalStyles
86
87
  } = this.props;
87
- return (0, _element.createElement)(_components.HTMLTextInput, {
88
+ return (0, _react.createElement)(_components.HTMLTextInput, {
88
89
  parentHeight: this.state.rootViewHeight,
89
90
  style: globalStyles
90
91
  });
@@ -96,7 +97,7 @@ class Layout extends _element.Component {
96
97
  if (!isReady) {
97
98
  return null;
98
99
  }
99
- return (0, _element.createElement)(_visualEditor.default, {
100
+ return (0, _react.createElement)(_visualEditor.default, {
100
101
  setTitleRef: this.props.setTitleRef
101
102
  });
102
103
  }
@@ -121,24 +122,24 @@ class Layout extends _element.Component {
121
122
  const editorStyles = [getStylesFromColorScheme(_style.default.background, _style.default.backgroundDark), globalStyles?.background && {
122
123
  backgroundColor: globalStyles.background
123
124
  }];
124
- return (0, _element.createElement)(_components.Tooltip.Slot, null, (0, _element.createElement)(_reactNative.SafeAreaView, {
125
+ return (0, _react.createElement)(_components.Tooltip.Slot, null, (0, _react.createElement)(_reactNative.SafeAreaView, {
125
126
  style: containerStyles,
126
127
  onLayout: this.onRootViewLayout
127
- }, (0, _element.createElement)(_editor.AutosaveMonitor, {
128
+ }, (0, _react.createElement)(_editor.AutosaveMonitor, {
128
129
  disableIntervalChecks: true
129
- }), (0, _element.createElement)(_reactNative.View, {
130
+ }), (0, _react.createElement)(_reactNative.View, {
130
131
  style: editorStyles
131
- }, isHtmlView ? this.renderHTML() : this.renderVisual(), !isHtmlView && _reactNative.Platform.OS === 'android' && (0, _element.createElement)(_blockEditor.FloatingToolbar, null), (0, _element.createElement)(_components.NoticeList, null)), (0, _element.createElement)(_reactNative.View, {
132
+ }, isHtmlView ? this.renderHTML() : this.renderVisual(), !isHtmlView && _reactNative.Platform.OS === 'android' && (0, _react.createElement)(_blockEditor.FloatingToolbar, null), (0, _react.createElement)(_components.NoticeList, null)), (0, _react.createElement)(_reactNative.View, {
132
133
  style: {
133
134
  flex: 0,
134
135
  flexBasis: marginBottom,
135
136
  height: marginBottom
136
137
  }
137
- }), !isHtmlView && (0, _element.createElement)(_components.KeyboardAvoidingView, {
138
+ }), !isHtmlView && (0, _react.createElement)(_components.KeyboardAvoidingView, {
138
139
  parentHeight: this.state.rootViewHeight,
139
140
  style: toolbarKeyboardAvoidingViewStyle,
140
141
  withAnimatedHeight: true
141
- }, _reactNative.Platform.OS === 'ios' && (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_components.__unstableAutocompletionItemsSlot, null), (0, _element.createElement)(_blockEditor.FloatingToolbar, null)), (0, _element.createElement)(_header.default, null), (0, _element.createElement)(_blockEditor.BottomSheetSettings, null)), _reactNative.Platform.OS === 'android' && (0, _element.createElement)(_components.__unstableAutocompletionItemsSlot, null)));
142
+ }, _reactNative.Platform.OS === 'ios' && (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_components.__unstableAutocompletionItemsSlot, null), (0, _react.createElement)(_blockEditor.FloatingToolbar, null)), (0, _react.createElement)(_header.default, null), (0, _react.createElement)(_blockEditor.BottomSheetSettings, null)), _reactNative.Platform.OS === 'android' && (0, _react.createElement)(_components.__unstableAutocompletionItemsSlot, null)));
142
143
  }
143
144
  }
144
145
  var _default = (0, _compose.compose)([(0, _data.withSelect)(select => {
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_reactNative","_reactNativeSafeArea","_interopRequireDefault","_data","_blockEditor","_compose","_components","_editor","_reactNativeBridge","_style","_style2","_header","_visualEditor","_store","Layout","Component","constructor","arguments","onSafeAreaInsetsUpdate","bind","onRootViewLayout","state","rootViewHeight","safeAreaInsets","top","bottom","right","left","SafeArea","getSafeAreaInsetsForRootView","then","componentDidMount","_isMounted","safeAreaSubscription","addEventListener","componentWillUnmount","remove","result","setState","event","setHeightState","height","nativeEvent","layout","sendNativeEditorDidLayout","renderHTML","globalStyles","props","createElement","HTMLTextInput","parentHeight","style","renderVisual","isReady","default","setTitleRef","render","getStylesFromColorScheme","mode","isHtmlView","marginBottom","Platform","OS","headerToolbarStyles","containerStyles","styles","container","containerDark","toolbarKeyboardAvoidingViewStyle","toolbarKeyboardAvoidingView","backgroundColor","editorStyles","background","backgroundDark","Tooltip","Slot","SafeAreaView","onLayout","AutosaveMonitor","disableIntervalChecks","View","FloatingToolbar","NoticeList","flex","flexBasis","KeyboardAvoidingView","withAnimatedHeight","Fragment","__unstableAutocompletionItemsSlot","BottomSheetSettings","_default","compose","withSelect","select","__unstableIsEditorReady","isEditorReady","editorStore","getEditorMode","editPostStore","getSettings","blockEditorStore","__experimentalGlobalStylesBaseStyles","color","withPreferredColorScheme","exports"],"sources":["@wordpress/edit-post/src/components/layout/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Platform, SafeAreaView, View } from 'react-native';\nimport SafeArea from 'react-native-safe-area';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport {\n\tBottomSheetSettings,\n\tFloatingToolbar,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { compose, withPreferredColorScheme } from '@wordpress/compose';\nimport {\n\tHTMLTextInput,\n\tKeyboardAvoidingView,\n\tNoticeList,\n\tTooltip,\n\t__unstableAutocompletionItemsSlot as AutocompletionItemsSlot,\n} from '@wordpress/components';\nimport { AutosaveMonitor, store as editorStore } from '@wordpress/editor';\nimport { sendNativeEditorDidLayout } from '@wordpress/react-native-bridge';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport headerToolbarStyles from '../header/header-toolbar/style.scss';\nimport Header from '../header';\nimport VisualEditor from '../visual-editor';\nimport { store as editPostStore } from '../../store';\n\nclass Layout extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.onSafeAreaInsetsUpdate = this.onSafeAreaInsetsUpdate.bind( this );\n\t\tthis.onRootViewLayout = this.onRootViewLayout.bind( this );\n\n\t\tthis.state = {\n\t\t\trootViewHeight: 0,\n\t\t\tsafeAreaInsets: { top: 0, bottom: 0, right: 0, left: 0 },\n\t\t};\n\n\t\tSafeArea.getSafeAreaInsetsForRootView().then(\n\t\t\tthis.onSafeAreaInsetsUpdate\n\t\t);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis._isMounted = true;\n\t\tthis.safeAreaSubscription = SafeArea.addEventListener(\n\t\t\t'safeAreaInsetsForRootViewDidChange',\n\t\t\tthis.onSafeAreaInsetsUpdate\n\t\t);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.safeAreaSubscription?.remove();\n\t\tthis._isMounted = false;\n\t}\n\n\tonSafeAreaInsetsUpdate( result ) {\n\t\tconst { safeAreaInsets } = result;\n\t\tif ( this._isMounted ) {\n\t\t\tthis.setState( { safeAreaInsets } );\n\t\t}\n\t}\n\n\tonRootViewLayout( event ) {\n\t\tif ( this._isMounted ) {\n\t\t\tthis.setHeightState( event );\n\t\t}\n\t}\n\n\tsetHeightState( event ) {\n\t\tconst { height } = event.nativeEvent.layout;\n\t\tif ( height !== this.state.rootViewHeight ) {\n\t\t\tthis.setState(\n\t\t\t\t{ rootViewHeight: height },\n\t\t\t\tsendNativeEditorDidLayout\n\t\t\t);\n\t\t}\n\t}\n\n\trenderHTML() {\n\t\tconst { globalStyles } = this.props;\n\t\treturn (\n\t\t\t<HTMLTextInput\n\t\t\t\tparentHeight={ this.state.rootViewHeight }\n\t\t\t\tstyle={ globalStyles }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderVisual() {\n\t\tconst { isReady } = this.props;\n\n\t\tif ( ! isReady ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn <VisualEditor setTitleRef={ this.props.setTitleRef } />;\n\t}\n\n\trender() {\n\t\tconst { getStylesFromColorScheme, mode, globalStyles } = this.props;\n\n\t\tconst isHtmlView = mode === 'text';\n\n\t\t// Add a margin view at the bottom for the header.\n\t\tconst marginBottom =\n\t\t\tPlatform.OS === 'android' && ! isHtmlView\n\t\t\t\t? headerToolbarStyles[ 'header-toolbar__container' ].height\n\t\t\t\t: 0;\n\n\t\tconst containerStyles = getStylesFromColorScheme(\n\t\t\tstyles.container,\n\t\t\tstyles.containerDark\n\t\t);\n\n\t\tconst toolbarKeyboardAvoidingViewStyle = {\n\t\t\t...styles.toolbarKeyboardAvoidingView,\n\t\t\tleft: this.state.safeAreaInsets.left,\n\t\t\tright: this.state.safeAreaInsets.right,\n\t\t\tbottom: this.state.safeAreaInsets.bottom,\n\t\t\tbackgroundColor: containerStyles.backgroundColor,\n\t\t};\n\n\t\tconst editorStyles = [\n\t\t\tgetStylesFromColorScheme(\n\t\t\t\tstyles.background,\n\t\t\t\tstyles.backgroundDark\n\t\t\t),\n\t\t\tglobalStyles?.background && {\n\t\t\t\tbackgroundColor: globalStyles.background,\n\t\t\t},\n\t\t];\n\n\t\treturn (\n\t\t\t<Tooltip.Slot>\n\t\t\t\t<SafeAreaView\n\t\t\t\t\tstyle={ containerStyles }\n\t\t\t\t\tonLayout={ this.onRootViewLayout }\n\t\t\t\t>\n\t\t\t\t\t<AutosaveMonitor disableIntervalChecks />\n\t\t\t\t\t<View style={ editorStyles }>\n\t\t\t\t\t\t{ isHtmlView ? this.renderHTML() : this.renderVisual() }\n\t\t\t\t\t\t{ ! isHtmlView && Platform.OS === 'android' && (\n\t\t\t\t\t\t\t<FloatingToolbar />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<NoticeList />\n\t\t\t\t\t</View>\n\t\t\t\t\t<View\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\tflex: 0,\n\t\t\t\t\t\t\tflexBasis: marginBottom,\n\t\t\t\t\t\t\theight: marginBottom,\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ ! isHtmlView && (\n\t\t\t\t\t\t<KeyboardAvoidingView\n\t\t\t\t\t\t\tparentHeight={ this.state.rootViewHeight }\n\t\t\t\t\t\t\tstyle={ toolbarKeyboardAvoidingViewStyle }\n\t\t\t\t\t\t\twithAnimatedHeight\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ Platform.OS === 'ios' && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<AutocompletionItemsSlot />\n\t\t\t\t\t\t\t\t\t<FloatingToolbar />\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<Header />\n\t\t\t\t\t\t\t<BottomSheetSettings />\n\t\t\t\t\t\t</KeyboardAvoidingView>\n\t\t\t\t\t) }\n\t\t\t\t\t{ Platform.OS === 'android' && <AutocompletionItemsSlot /> }\n\t\t\t\t</SafeAreaView>\n\t\t\t</Tooltip.Slot>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { __unstableIsEditorReady: isEditorReady } =\n\t\t\tselect( editorStore );\n\t\tconst { getEditorMode } = select( editPostStore );\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst globalStyles =\n\t\t\tgetSettings()?.__experimentalGlobalStylesBaseStyles?.color;\n\n\t\treturn {\n\t\t\tisReady: isEditorReady(),\n\t\t\tmode: getEditorMode(),\n\t\t\tglobalStyles,\n\t\t};\n\t} ),\n\twithPreferredColorScheme,\n] )( Layout );\n"],"mappings":";;;;;;;AASA,IAAAA,QAAA,GAAAC,OAAA;AANA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAMA,IAA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AAAC,gBAAO,EAAE,CACvB,IAAAC,gBAAU,EAAIC,MAAM,IAAM;EACzB,MAAM;IAAEC,uBAAuB,EAAEC;EAAc,CAAC,GAC/CF,MAAM,CAAEG,aAAY,CAAC;EACtB,MAAM;IAAEC;EAAc,CAAC,GAAGJ,MAAM,CAAEK,YAAc,CAAC;EACjD,MAAM;IAAEC;EAAY,CAAC,GAAGN,MAAM,CAAEO,kBAAiB,CAAC;EAClD,MAAMtD,YAAY,GACjBqD,WAAW,CAAC,CAAC,EAAEE,oCAAoC,EAAEC,KAAK;EAE3D,OAAO;IACNjD,OAAO,EAAE0C,aAAa,CAAC,CAAC;IACxBrC,IAAI,EAAEuC,aAAa,CAAC,CAAC;IACrBnD;EACD,CAAC;AACF,CAAE,CAAC,EACHyD,iCAAwB,CACvB,CAAC,CAAEzF,MAAO,CAAC;AAAA0F,OAAA,CAAAlD,OAAA,GAAAoC,QAAA"}
1
+ {"version":3,"names":["_reactNative","require","_reactNativeSafeArea","_interopRequireDefault","_element","_data","_blockEditor","_compose","_components","_editor","_reactNativeBridge","_style","_style2","_header","_visualEditor","_store","Layout","Component","constructor","arguments","onSafeAreaInsetsUpdate","bind","onRootViewLayout","state","rootViewHeight","safeAreaInsets","top","bottom","right","left","SafeArea","getSafeAreaInsetsForRootView","then","componentDidMount","_isMounted","safeAreaSubscription","addEventListener","componentWillUnmount","remove","result","setState","event","setHeightState","height","nativeEvent","layout","sendNativeEditorDidLayout","renderHTML","globalStyles","props","_react","createElement","HTMLTextInput","parentHeight","style","renderVisual","isReady","default","setTitleRef","render","getStylesFromColorScheme","mode","isHtmlView","marginBottom","Platform","OS","headerToolbarStyles","containerStyles","styles","container","containerDark","toolbarKeyboardAvoidingViewStyle","toolbarKeyboardAvoidingView","backgroundColor","editorStyles","background","backgroundDark","Tooltip","Slot","SafeAreaView","onLayout","AutosaveMonitor","disableIntervalChecks","View","FloatingToolbar","NoticeList","flex","flexBasis","KeyboardAvoidingView","withAnimatedHeight","Fragment","__unstableAutocompletionItemsSlot","BottomSheetSettings","_default","compose","withSelect","select","__unstableIsEditorReady","isEditorReady","editorStore","getEditorMode","editPostStore","getSettings","blockEditorStore","__experimentalGlobalStylesBaseStyles","color","withPreferredColorScheme","exports"],"sources":["@wordpress/edit-post/src/components/layout/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Platform, SafeAreaView, View } from 'react-native';\nimport SafeArea from 'react-native-safe-area';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport {\n\tBottomSheetSettings,\n\tFloatingToolbar,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { compose, withPreferredColorScheme } from '@wordpress/compose';\nimport {\n\tHTMLTextInput,\n\tKeyboardAvoidingView,\n\tNoticeList,\n\tTooltip,\n\t__unstableAutocompletionItemsSlot as AutocompletionItemsSlot,\n} from '@wordpress/components';\nimport { AutosaveMonitor, store as editorStore } from '@wordpress/editor';\nimport { sendNativeEditorDidLayout } from '@wordpress/react-native-bridge';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport headerToolbarStyles from '../header/header-toolbar/style.scss';\nimport Header from '../header';\nimport VisualEditor from '../visual-editor';\nimport { store as editPostStore } from '../../store';\n\nclass Layout extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.onSafeAreaInsetsUpdate = this.onSafeAreaInsetsUpdate.bind( this );\n\t\tthis.onRootViewLayout = this.onRootViewLayout.bind( this );\n\n\t\tthis.state = {\n\t\t\trootViewHeight: 0,\n\t\t\tsafeAreaInsets: { top: 0, bottom: 0, right: 0, left: 0 },\n\t\t};\n\n\t\tSafeArea.getSafeAreaInsetsForRootView().then(\n\t\t\tthis.onSafeAreaInsetsUpdate\n\t\t);\n\t}\n\n\tcomponentDidMount() {\n\t\tthis._isMounted = true;\n\t\tthis.safeAreaSubscription = SafeArea.addEventListener(\n\t\t\t'safeAreaInsetsForRootViewDidChange',\n\t\t\tthis.onSafeAreaInsetsUpdate\n\t\t);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.safeAreaSubscription?.remove();\n\t\tthis._isMounted = false;\n\t}\n\n\tonSafeAreaInsetsUpdate( result ) {\n\t\tconst { safeAreaInsets } = result;\n\t\tif ( this._isMounted ) {\n\t\t\tthis.setState( { safeAreaInsets } );\n\t\t}\n\t}\n\n\tonRootViewLayout( event ) {\n\t\tif ( this._isMounted ) {\n\t\t\tthis.setHeightState( event );\n\t\t}\n\t}\n\n\tsetHeightState( event ) {\n\t\tconst { height } = event.nativeEvent.layout;\n\t\tif ( height !== this.state.rootViewHeight ) {\n\t\t\tthis.setState(\n\t\t\t\t{ rootViewHeight: height },\n\t\t\t\tsendNativeEditorDidLayout\n\t\t\t);\n\t\t}\n\t}\n\n\trenderHTML() {\n\t\tconst { globalStyles } = this.props;\n\t\treturn (\n\t\t\t<HTMLTextInput\n\t\t\t\tparentHeight={ this.state.rootViewHeight }\n\t\t\t\tstyle={ globalStyles }\n\t\t\t/>\n\t\t);\n\t}\n\n\trenderVisual() {\n\t\tconst { isReady } = this.props;\n\n\t\tif ( ! isReady ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn <VisualEditor setTitleRef={ this.props.setTitleRef } />;\n\t}\n\n\trender() {\n\t\tconst { getStylesFromColorScheme, mode, globalStyles } = this.props;\n\n\t\tconst isHtmlView = mode === 'text';\n\n\t\t// Add a margin view at the bottom for the header.\n\t\tconst marginBottom =\n\t\t\tPlatform.OS === 'android' && ! isHtmlView\n\t\t\t\t? headerToolbarStyles[ 'header-toolbar__container' ].height\n\t\t\t\t: 0;\n\n\t\tconst containerStyles = getStylesFromColorScheme(\n\t\t\tstyles.container,\n\t\t\tstyles.containerDark\n\t\t);\n\n\t\tconst toolbarKeyboardAvoidingViewStyle = {\n\t\t\t...styles.toolbarKeyboardAvoidingView,\n\t\t\tleft: this.state.safeAreaInsets.left,\n\t\t\tright: this.state.safeAreaInsets.right,\n\t\t\tbottom: this.state.safeAreaInsets.bottom,\n\t\t\tbackgroundColor: containerStyles.backgroundColor,\n\t\t};\n\n\t\tconst editorStyles = [\n\t\t\tgetStylesFromColorScheme(\n\t\t\t\tstyles.background,\n\t\t\t\tstyles.backgroundDark\n\t\t\t),\n\t\t\tglobalStyles?.background && {\n\t\t\t\tbackgroundColor: globalStyles.background,\n\t\t\t},\n\t\t];\n\n\t\treturn (\n\t\t\t<Tooltip.Slot>\n\t\t\t\t<SafeAreaView\n\t\t\t\t\tstyle={ containerStyles }\n\t\t\t\t\tonLayout={ this.onRootViewLayout }\n\t\t\t\t>\n\t\t\t\t\t<AutosaveMonitor disableIntervalChecks />\n\t\t\t\t\t<View style={ editorStyles }>\n\t\t\t\t\t\t{ isHtmlView ? this.renderHTML() : this.renderVisual() }\n\t\t\t\t\t\t{ ! isHtmlView && Platform.OS === 'android' && (\n\t\t\t\t\t\t\t<FloatingToolbar />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<NoticeList />\n\t\t\t\t\t</View>\n\t\t\t\t\t<View\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\tflex: 0,\n\t\t\t\t\t\t\tflexBasis: marginBottom,\n\t\t\t\t\t\t\theight: marginBottom,\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ ! isHtmlView && (\n\t\t\t\t\t\t<KeyboardAvoidingView\n\t\t\t\t\t\t\tparentHeight={ this.state.rootViewHeight }\n\t\t\t\t\t\t\tstyle={ toolbarKeyboardAvoidingViewStyle }\n\t\t\t\t\t\t\twithAnimatedHeight\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ Platform.OS === 'ios' && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<AutocompletionItemsSlot />\n\t\t\t\t\t\t\t\t\t<FloatingToolbar />\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<Header />\n\t\t\t\t\t\t\t<BottomSheetSettings />\n\t\t\t\t\t\t</KeyboardAvoidingView>\n\t\t\t\t\t) }\n\t\t\t\t\t{ Platform.OS === 'android' && <AutocompletionItemsSlot /> }\n\t\t\t\t</SafeAreaView>\n\t\t\t</Tooltip.Slot>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { __unstableIsEditorReady: isEditorReady } =\n\t\t\tselect( editorStore );\n\t\tconst { getEditorMode } = select( editPostStore );\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst globalStyles =\n\t\t\tgetSettings()?.__experimentalGlobalStylesBaseStyles?.color;\n\n\t\treturn {\n\t\t\tisReady: isEditorReady(),\n\t\t\tmode: getEditorMode(),\n\t\t\tglobalStyles,\n\t\t};\n\t} ),\n\twithPreferredColorScheme,\n] )( Layout );\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AAKA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAOA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAT,OAAA;AAKA,IAAAU,MAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,OAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,OAAA,GAAAV,sBAAA,CAAAF,OAAA;AACA,IAAAa,aAAA,GAAAX,sBAAA,CAAAF,OAAA;AACA,IAAAc,MAAA,GAAAd,OAAA;AAlCA;AACA;AACA;;AAIA;AACA;AACA;;AAmBA;AACA;AACA;;AAOA,MAAMe,MAAM,SAASC,kBAAS,CAAC;EAC9BC,WAAWA,CAAA,EAAG;IACb,KAAK,CAAE,GAAGC,SAAU,CAAC;IAErB,IAAI,CAACC,sBAAsB,GAAG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{
5
5
  value: true
6
6
  });
7
7
  exports.default = MetaBoxes;
8
- var _element = require("@wordpress/element");
8
+ var _react = require("react");
9
9
  var _data = require("@wordpress/data");
10
+ var _element = require("@wordpress/element");
10
11
  var _editor = require("@wordpress/editor");
11
12
  var _metaBoxesArea = _interopRequireDefault(require("./meta-boxes-area"));
12
13
  var _metaBoxVisibility = _interopRequireDefault(require("./meta-box-visibility"));
@@ -53,12 +54,12 @@ function MetaBoxes({
53
54
  if (!areMetaBoxesInitialized) {
54
55
  return null;
55
56
  }
56
- return (0, _element.createElement)(_element.Fragment, null, (metaBoxes !== null && metaBoxes !== void 0 ? metaBoxes : []).map(({
57
+ return (0, _react.createElement)(_react.Fragment, null, (metaBoxes !== null && metaBoxes !== void 0 ? metaBoxes : []).map(({
57
58
  id
58
- }) => (0, _element.createElement)(_metaBoxVisibility.default, {
59
+ }) => (0, _react.createElement)(_metaBoxVisibility.default, {
59
60
  key: id,
60
61
  id: id
61
- })), (0, _element.createElement)(_metaBoxesArea.default, {
62
+ })), (0, _react.createElement)(_metaBoxesArea.default, {
62
63
  location: location
63
64
  }));
64
65
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_data","_editor","_metaBoxesArea","_interopRequireDefault","_metaBoxVisibility","_store","MetaBoxes","location","registry","useRegistry","metaBoxes","areMetaBoxesInitialized","isEditorReady","useSelect","select","__unstableIsEditorReady","editorStore","getMetaBoxesPerLocation","_areMetaBoxesInitialized","editPostStore","useEffect","dispatch","initializeMetaBoxes","createElement","Fragment","map","id","default","key"],"sources":["@wordpress/edit-post/src/components/meta-boxes/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useRegistry } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport MetaBoxesArea from './meta-boxes-area';\nimport MetaBoxVisibility from './meta-box-visibility';\nimport { store as editPostStore } from '../../store';\n\nexport default function MetaBoxes( { location } ) {\n\tconst registry = useRegistry();\n\tconst { metaBoxes, areMetaBoxesInitialized, isEditorReady } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { __unstableIsEditorReady } = select( editorStore );\n\t\t\tconst {\n\t\t\t\tgetMetaBoxesPerLocation,\n\t\t\t\tareMetaBoxesInitialized: _areMetaBoxesInitialized,\n\t\t\t} = select( editPostStore );\n\t\t\treturn {\n\t\t\t\tmetaBoxes: getMetaBoxesPerLocation( location ),\n\t\t\t\tareMetaBoxesInitialized: _areMetaBoxesInitialized(),\n\t\t\t\tisEditorReady: __unstableIsEditorReady(),\n\t\t\t};\n\t\t},\n\t\t[ location ]\n\t);\n\n\t// When editor is ready, initialize postboxes (wp core script) and metabox\n\t// saving. This initializes all meta box locations, not just this specific\n\t// one.\n\tuseEffect( () => {\n\t\tif ( isEditorReady && ! areMetaBoxesInitialized ) {\n\t\t\tregistry.dispatch( editPostStore ).initializeMetaBoxes();\n\t\t}\n\t}, [ isEditorReady, areMetaBoxesInitialized ] );\n\n\tif ( ! areMetaBoxesInitialized ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ ( metaBoxes ?? [] ).map( ( { id } ) => (\n\t\t\t\t<MetaBoxVisibility key={ id } id={ id } />\n\t\t\t) ) }\n\t\t\t<MetaBoxesArea location={ location } />\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAIA,IAAAA,QAAA,GAAAC,OAAA;AADA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AAKA,IAAAG,cAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAZA;AACA;AACA;;AAKA;AACA;AACA;;AAKe,SAASO,SAASA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACjD,MAAMC,QAAQ,GAAG,IAAAC,iBAAW,EAAC,CAAC;EAC9B,MAAM;IAAEC,SAAS;IAAEC,uBAAuB;IAAEC;EAAc,CAAC,GAAG,IAAAC,eAAS,EACpEC,MAAM,IAAM;IACb,MAAM;MAAEC;IAAwB,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;IACzD,MAAM;MACLC,uBAAuB;MACvBN,uBAAuB,EAAEO;IAC1B,CAAC,GAAGJ,MAAM,CAAEK,YAAc,CAAC;IAC3B,OAAO;MACNT,SAAS,EAAEO,uBAAuB,CAAEV,QAAS,CAAC;MAC9CI,uBAAuB,EAAEO,wBAAwB,CAAC,CAAC;MACnDN,aAAa,EAAEG,uBAAuB,CAAC;IACxC,CAAC;EACF,CAAC,EACD,CAAER,QAAQ,CACX,CAAC;;EAED;EACA;EACA;EACA,IAAAa,kBAAS,EAAE,MAAM;IAChB,IAAKR,aAAa,IAAI,CAAED,uBAAuB,EAAG;MACjDH,QAAQ,CAACa,QAAQ,CAAEF,YAAc,CAAC,CAACG,mBAAmB,CAAC,CAAC;IACzD;EACD,CAAC,EAAE,CAAEV,aAAa,EAAED,uBAAuB,CAAG,CAAC;EAE/C,IAAK,CAAEA,uBAAuB,EAAG;IAChC,OAAO,IAAI;EACZ;EAEA,OACC,IAAAb,QAAA,CAAAyB,aAAA,EAAAzB,QAAA,CAAA0B,QAAA,QACG,CAAEd,SAAS,aAATA,SAAS,cAATA,SAAS,GAAI,EAAE,EAAGe,GAAG,CAAE,CAAE;IAAEC;EAAG,CAAC,KAClC,IAAA5B,QAAA,CAAAyB,aAAA,EAACnB,kBAAA,CAAAuB,OAAiB;IAACC,GAAG,EAAGF,EAAI;IAACA,EAAE,EAAGA;EAAI,CAAE,CACxC,CAAC,EACH,IAAA5B,QAAA,CAAAyB,aAAA,EAACrB,cAAA,CAAAyB,OAAa;IAACpB,QAAQ,EAAGA;EAAU,CAAE,CACrC,CAAC;AAEL"}
1
+ {"version":3,"names":["_data","require","_element","_editor","_metaBoxesArea","_interopRequireDefault","_metaBoxVisibility","_store","MetaBoxes","location","registry","useRegistry","metaBoxes","areMetaBoxesInitialized","isEditorReady","useSelect","select","__unstableIsEditorReady","editorStore","getMetaBoxesPerLocation","_areMetaBoxesInitialized","editPostStore","useEffect","dispatch","initializeMetaBoxes","_react","createElement","Fragment","map","id","default","key"],"sources":["@wordpress/edit-post/src/components/meta-boxes/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useRegistry } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport MetaBoxesArea from './meta-boxes-area';\nimport MetaBoxVisibility from './meta-box-visibility';\nimport { store as editPostStore } from '../../store';\n\nexport default function MetaBoxes( { location } ) {\n\tconst registry = useRegistry();\n\tconst { metaBoxes, areMetaBoxesInitialized, isEditorReady } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { __unstableIsEditorReady } = select( editorStore );\n\t\t\tconst {\n\t\t\t\tgetMetaBoxesPerLocation,\n\t\t\t\tareMetaBoxesInitialized: _areMetaBoxesInitialized,\n\t\t\t} = select( editPostStore );\n\t\t\treturn {\n\t\t\t\tmetaBoxes: getMetaBoxesPerLocation( location ),\n\t\t\t\tareMetaBoxesInitialized: _areMetaBoxesInitialized(),\n\t\t\t\tisEditorReady: __unstableIsEditorReady(),\n\t\t\t};\n\t\t},\n\t\t[ location ]\n\t);\n\n\t// When editor is ready, initialize postboxes (wp core script) and metabox\n\t// saving. This initializes all meta box locations, not just this specific\n\t// one.\n\tuseEffect( () => {\n\t\tif ( isEditorReady && ! areMetaBoxesInitialized ) {\n\t\t\tregistry.dispatch( editPostStore ).initializeMetaBoxes();\n\t\t}\n\t}, [ isEditorReady, areMetaBoxesInitialized ] );\n\n\tif ( ! areMetaBoxesInitialized ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ ( metaBoxes ?? [] ).map( ( { id } ) => (\n\t\t\t\t<MetaBoxVisibility key={ id } id={ id } />\n\t\t\t) ) }\n\t\t\t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