@wordpress/edit-post 7.35.0 → 8.0.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 (202) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/commands/use-commands.js +56 -0
  3. package/build/commands/use-commands.js.map +1 -0
  4. package/build/components/{header/fullscreen-mode-close/index.js → back-button/fullscreen-mode-close.js} +16 -14
  5. package/build/components/back-button/fullscreen-mode-close.js.map +1 -0
  6. package/build/components/back-button/index.js +57 -0
  7. package/build/components/back-button/index.js.map +1 -0
  8. package/build/components/header/header-toolbar/index.native.js +63 -62
  9. package/build/components/header/header-toolbar/index.native.js.map +1 -1
  10. package/build/components/header/index.native.js +2 -2
  11. package/build/components/header/index.native.js.map +1 -1
  12. package/build/components/init-pattern-modal/index.js +50 -43
  13. package/build/components/init-pattern-modal/index.js.map +1 -1
  14. package/build/components/layout/index.js +92 -146
  15. package/build/components/layout/index.js.map +1 -1
  16. package/build/components/layout/index.native.js +28 -21
  17. package/build/components/layout/index.native.js.map +1 -1
  18. package/build/components/layout/use-padding-appender.js.map +1 -0
  19. package/build/components/layout/use-should-iframe.js +46 -0
  20. package/build/components/layout/use-should-iframe.js.map +1 -0
  21. package/build/components/meta-boxes/index.js +10 -9
  22. package/build/components/meta-boxes/index.js.map +1 -1
  23. package/build/components/meta-boxes/meta-boxes-area/index.js +11 -11
  24. package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  25. package/build/components/more-menu/index.js +49 -0
  26. package/build/components/more-menu/index.js.map +1 -0
  27. package/build/components/{header/more-menu → more-menu}/manage-patterns-menu-item.js +5 -4
  28. package/build/components/more-menu/manage-patterns-menu-item.js.map +1 -0
  29. package/build/components/{header/more-menu → more-menu}/welcome-guide-menu-item.js +2 -2
  30. package/build/components/more-menu/welcome-guide-menu-item.js.map +1 -0
  31. package/build/components/preferences-modal/enable-custom-fields.js +23 -18
  32. package/build/components/preferences-modal/enable-custom-fields.js.map +1 -1
  33. package/build/components/preferences-modal/index.js +4 -4
  34. package/build/components/preferences-modal/index.js.map +1 -1
  35. package/build/components/preferences-modal/meta-boxes-section.js +13 -13
  36. package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
  37. package/build/components/visual-editor/header.native.js +11 -10
  38. package/build/components/visual-editor/header.native.js.map +1 -1
  39. package/build/components/visual-editor/index.native.js +3 -3
  40. package/build/components/visual-editor/index.native.js.map +1 -1
  41. package/build/components/welcome-guide/default.js +50 -33
  42. package/build/components/welcome-guide/default.js.map +1 -1
  43. package/build/components/welcome-guide/image.js +13 -12
  44. package/build/components/welcome-guide/image.js.map +1 -1
  45. package/build/components/welcome-guide/index.js +2 -2
  46. package/build/components/welcome-guide/index.js.map +1 -1
  47. package/build/components/welcome-guide/template.js +12 -8
  48. package/build/components/welcome-guide/template.js.map +1 -1
  49. package/build/deprecated.js +9 -9
  50. package/build/deprecated.js.map +1 -1
  51. package/build/editor.js +16 -11
  52. package/build/editor.js.map +1 -1
  53. package/build/editor.native.js +18 -12
  54. package/build/editor.native.js.map +1 -1
  55. package/build/index.js +12 -13
  56. package/build/index.js.map +1 -1
  57. package/build/index.native.js +2 -2
  58. package/build/index.native.js.map +1 -1
  59. package/build/store/selectors.js +1 -1
  60. package/build/store/selectors.js.map +1 -1
  61. package/build-module/commands/use-commands.js +49 -0
  62. package/build-module/commands/use-commands.js.map +1 -0
  63. package/build-module/components/{header/fullscreen-mode-close/index.js → back-button/fullscreen-mode-close.js} +16 -14
  64. package/build-module/components/back-button/fullscreen-mode-close.js.map +1 -0
  65. package/build-module/components/back-button/index.js +49 -0
  66. package/build-module/components/back-button/index.js.map +1 -0
  67. package/build-module/components/header/header-toolbar/index.native.js +64 -62
  68. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  69. package/build-module/components/header/index.native.js +2 -2
  70. package/build-module/components/header/index.native.js.map +1 -1
  71. package/build-module/components/init-pattern-modal/index.js +52 -43
  72. package/build-module/components/init-pattern-modal/index.js.map +1 -1
  73. package/build-module/components/layout/index.js +97 -149
  74. package/build-module/components/layout/index.js.map +1 -1
  75. package/build-module/components/layout/index.native.js +30 -21
  76. package/build-module/components/layout/index.native.js.map +1 -1
  77. package/build-module/components/layout/use-padding-appender.js.map +1 -0
  78. package/build-module/components/layout/use-should-iframe.js +39 -0
  79. package/build-module/components/layout/use-should-iframe.js.map +1 -0
  80. package/build-module/components/meta-boxes/index.js +12 -9
  81. package/build-module/components/meta-boxes/index.js.map +1 -1
  82. package/build-module/components/meta-boxes/meta-boxes-area/index.js +11 -9
  83. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  84. package/build-module/components/more-menu/index.js +43 -0
  85. package/build-module/components/more-menu/index.js.map +1 -0
  86. package/build-module/components/{header/more-menu → more-menu}/manage-patterns-menu-item.js +5 -4
  87. package/build-module/components/more-menu/manage-patterns-menu-item.js.map +1 -0
  88. package/build-module/components/{header/more-menu → more-menu}/welcome-guide-menu-item.js +2 -2
  89. package/build-module/components/more-menu/welcome-guide-menu-item.js.map +1 -0
  90. package/build-module/components/preferences-modal/enable-custom-fields.js +25 -18
  91. package/build-module/components/preferences-modal/enable-custom-fields.js.map +1 -1
  92. package/build-module/components/preferences-modal/index.js +4 -4
  93. package/build-module/components/preferences-modal/index.js.map +1 -1
  94. package/build-module/components/preferences-modal/meta-boxes-section.js +14 -13
  95. package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
  96. package/build-module/components/visual-editor/header.native.js +11 -10
  97. package/build-module/components/visual-editor/header.native.js.map +1 -1
  98. package/build-module/components/visual-editor/index.native.js +3 -3
  99. package/build-module/components/visual-editor/index.native.js.map +1 -1
  100. package/build-module/components/welcome-guide/default.js +52 -33
  101. package/build-module/components/welcome-guide/default.js.map +1 -1
  102. package/build-module/components/welcome-guide/image.js +14 -12
  103. package/build-module/components/welcome-guide/image.js.map +1 -1
  104. package/build-module/components/welcome-guide/index.js +2 -2
  105. package/build-module/components/welcome-guide/index.js.map +1 -1
  106. package/build-module/components/welcome-guide/template.js +14 -8
  107. package/build-module/components/welcome-guide/template.js.map +1 -1
  108. package/build-module/deprecated.js +9 -9
  109. package/build-module/deprecated.js.map +1 -1
  110. package/build-module/editor.js +17 -11
  111. package/build-module/editor.js.map +1 -1
  112. package/build-module/editor.native.js +18 -12
  113. package/build-module/editor.native.js.map +1 -1
  114. package/build-module/index.js +10 -7
  115. package/build-module/index.js.map +1 -1
  116. package/build-module/index.native.js +2 -2
  117. package/build-module/index.native.js.map +1 -1
  118. package/build-module/store/selectors.js +1 -1
  119. package/build-module/store/selectors.js.map +1 -1
  120. package/build-style/style-rtl.css +27 -128
  121. package/build-style/style.css +27 -128
  122. package/package.json +32 -32
  123. package/src/commands/use-commands.js +48 -0
  124. package/src/components/{header/fullscreen-mode-close/index.js → back-button/fullscreen-mode-close.js} +1 -1
  125. package/src/components/back-button/index.js +34 -0
  126. package/src/components/{header/fullscreen-mode-close → back-button}/style.scss +16 -2
  127. package/src/components/{header/fullscreen-mode-close/test/index.js → back-button/test/fullscreen-mode-close.js} +1 -1
  128. package/src/components/layout/index.js +85 -194
  129. package/src/components/layout/style.scss +9 -17
  130. package/src/components/layout/use-should-iframe.js +40 -0
  131. package/src/components/{header/more-menu → more-menu}/index.js +2 -2
  132. package/src/index.js +11 -6
  133. package/src/store/selectors.js +8 -5
  134. package/src/style.scss +2 -5
  135. package/src/test/__snapshots__/editor.native.js.snap +72 -0
  136. package/src/test/editor.native.js +77 -0
  137. package/build/components/header/fullscreen-mode-close/index.js.map +0 -1
  138. package/build/components/header/index.js +0 -69
  139. package/build/components/header/index.js.map +0 -1
  140. package/build/components/header/main-dashboard-button/index.js +0 -33
  141. package/build/components/header/main-dashboard-button/index.js.map +0 -1
  142. package/build/components/header/more-menu/index.js +0 -43
  143. package/build/components/header/more-menu/index.js.map +0 -1
  144. package/build/components/header/more-menu/manage-patterns-menu-item.js.map +0 -1
  145. package/build/components/header/more-menu/welcome-guide-menu-item.js.map +0 -1
  146. package/build/components/text-editor/index.js +0 -61
  147. package/build/components/text-editor/index.js.map +0 -1
  148. package/build/components/visual-editor/block-inspector-button.js +0 -55
  149. package/build/components/visual-editor/block-inspector-button.js.map +0 -1
  150. package/build/components/visual-editor/index.js +0 -98
  151. package/build/components/visual-editor/index.js.map +0 -1
  152. package/build/components/visual-editor/use-padding-appender.js.map +0 -1
  153. package/build/hooks/commands/use-common-commands.js +0 -119
  154. package/build/hooks/commands/use-common-commands.js.map +0 -1
  155. package/build/hooks/components/index.js +0 -11
  156. package/build/hooks/components/index.js.map +0 -1
  157. package/build/hooks/index.js +0 -5
  158. package/build/hooks/index.js.map +0 -1
  159. package/build/hooks/validate-multiple-use/index.js +0 -134
  160. package/build/hooks/validate-multiple-use/index.js.map +0 -1
  161. package/build-module/components/header/fullscreen-mode-close/index.js.map +0 -1
  162. package/build-module/components/header/index.js +0 -61
  163. package/build-module/components/header/index.js.map +0 -1
  164. package/build-module/components/header/main-dashboard-button/index.js +0 -26
  165. package/build-module/components/header/main-dashboard-button/index.js.map +0 -1
  166. package/build-module/components/header/more-menu/index.js +0 -35
  167. package/build-module/components/header/more-menu/index.js.map +0 -1
  168. package/build-module/components/header/more-menu/manage-patterns-menu-item.js.map +0 -1
  169. package/build-module/components/header/more-menu/welcome-guide-menu-item.js.map +0 -1
  170. package/build-module/components/text-editor/index.js +0 -54
  171. package/build-module/components/text-editor/index.js.map +0 -1
  172. package/build-module/components/visual-editor/block-inspector-button.js +0 -47
  173. package/build-module/components/visual-editor/block-inspector-button.js.map +0 -1
  174. package/build-module/components/visual-editor/index.js +0 -90
  175. package/build-module/components/visual-editor/index.js.map +0 -1
  176. package/build-module/components/visual-editor/use-padding-appender.js.map +0 -1
  177. package/build-module/hooks/commands/use-common-commands.js +0 -112
  178. package/build-module/hooks/commands/use-common-commands.js.map +0 -1
  179. package/build-module/hooks/components/index.js +0 -8
  180. package/build-module/hooks/components/index.js.map +0 -1
  181. package/build-module/hooks/index.js +0 -6
  182. package/build-module/hooks/index.js.map +0 -1
  183. package/build-module/hooks/validate-multiple-use/index.js +0 -132
  184. package/build-module/hooks/validate-multiple-use/index.js.map +0 -1
  185. package/src/components/header/index.js +0 -53
  186. package/src/components/header/main-dashboard-button/index.js +0 -28
  187. package/src/components/header/style.scss +0 -14
  188. package/src/components/text-editor/index.js +0 -63
  189. package/src/components/text-editor/style.scss +0 -71
  190. package/src/components/visual-editor/block-inspector-button.js +0 -59
  191. package/src/components/visual-editor/index.js +0 -108
  192. package/src/components/visual-editor/style.scss +0 -53
  193. package/src/hooks/commands/use-common-commands.js +0 -126
  194. package/src/hooks/components/index.js +0 -13
  195. package/src/hooks/index.js +0 -5
  196. package/src/hooks/validate-multiple-use/index.js +0 -163
  197. /package/build/components/{visual-editor → layout}/use-padding-appender.js +0 -0
  198. /package/build-module/components/{visual-editor → layout}/use-padding-appender.js +0 -0
  199. /package/src/components/{header/fullscreen-mode-close/test/__snapshots__/index.js.snap → back-button/test/__snapshots__/fullscreen-mode-close.js.snap} +0 -0
  200. /package/src/components/{visual-editor → layout}/use-padding-appender.js +0 -0
  201. /package/src/components/{header/more-menu → more-menu}/manage-patterns-menu-item.js +0 -0
  202. /package/src/components/{header/more-menu → more-menu}/welcome-guide-menu-item.js +0 -0
@@ -1,4 +1,3 @@
1
- import { createElement, Fragment } from "react";
2
1
  /**
3
2
  * External dependencies
4
3
  */
@@ -7,15 +6,13 @@ import clsx from 'clsx';
7
6
  /**
8
7
  * WordPress dependencies
9
8
  */
10
- import { AutosaveMonitor, LocalAutosaveMonitor, UnsavedChangesWarning, EditorNotices, EditorKeyboardShortcutsRegister, EditorKeyboardShortcuts, EditorSnackbars, store as editorStore, privateApis as editorPrivateApis } from '@wordpress/editor';
9
+ import { AutosaveMonitor, LocalAutosaveMonitor, UnsavedChangesWarning, EditorKeyboardShortcutsRegister, EditorSnackbars, store as editorStore, privateApis as editorPrivateApis } from '@wordpress/editor';
11
10
  import { useSelect, useDispatch } from '@wordpress/data';
12
- import { BlockBreadcrumb, BlockToolbar, privateApis as blockEditorPrivateApis, store as blockEditorStore } from '@wordpress/block-editor';
13
- import { ScrollLock } from '@wordpress/components';
11
+ import { privateApis as blockEditorPrivateApis, store as blockEditorStore } from '@wordpress/block-editor';
14
12
  import { useViewportMatch } from '@wordpress/compose';
15
13
  import { PluginArea } from '@wordpress/plugins';
16
- import { __, _x, sprintf } from '@wordpress/i18n';
17
- import { useState, useCallback, useMemo } from '@wordpress/element';
18
- import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
14
+ import { __, sprintf } from '@wordpress/i18n';
15
+ import { useCallback, useMemo } from '@wordpress/element';
19
16
  import { store as noticesStore } from '@wordpress/notices';
20
17
  import { store as preferencesStore } from '@wordpress/preferences';
21
18
  import { privateApis as commandsPrivateApis } from '@wordpress/commands';
@@ -26,17 +23,21 @@ import { addQueryArgs } from '@wordpress/url';
26
23
  /**
27
24
  * Internal dependencies
28
25
  */
29
- import TextEditor from '../text-editor';
30
- import VisualEditor from '../visual-editor';
26
+ import BackButton from '../back-button';
31
27
  import EditPostKeyboardShortcuts from '../keyboard-shortcuts';
32
28
  import InitPatternModal from '../init-pattern-modal';
33
29
  import BrowserURL from '../browser-url';
34
- import Header from '../header';
35
30
  import MetaBoxes from '../meta-boxes';
31
+ import PostEditorMoreMenu from '../more-menu';
36
32
  import WelcomeGuide from '../welcome-guide';
37
33
  import { store as editPostStore } from '../../store';
38
34
  import { unlock } from '../../lock-unlock';
39
- import useCommonCommands from '../../hooks/commands/use-common-commands';
35
+ import useEditPostCommands from '../../commands/use-commands';
36
+ import { usePaddingAppender } from './use-padding-appender';
37
+ import { useShouldIframe } from './use-should-iframe';
38
+ import { jsx as _jsx } from "react/jsx-runtime";
39
+ import { jsxs as _jsxs } from "react/jsx-runtime";
40
+ import { Fragment as _Fragment } from "react/jsx-runtime";
40
41
  const {
41
42
  getLayoutStyles
42
43
  } = unlock(blockEditorPrivateApis);
@@ -47,42 +48,44 @@ const {
47
48
  useCommandContext
48
49
  } = unlock(commandsPrivateApis);
49
50
  const {
50
- InserterSidebar,
51
- ListViewSidebar,
52
- ComplementaryArea,
51
+ EditorInterface,
53
52
  FullscreenMode,
54
- SavePublishPanels,
55
- InterfaceSkeleton,
56
- interfaceStore,
57
53
  Sidebar
58
54
  } = unlock(editorPrivateApis);
59
55
  const {
60
56
  BlockKeyboardShortcuts
61
57
  } = unlock(blockLibraryPrivateApis);
62
- const interfaceLabels = {
63
- /* translators: accessibility text for the editor top bar landmark region. */
64
- header: __('Editor top bar'),
65
- /* translators: accessibility text for the editor content landmark region. */
66
- body: __('Editor content'),
67
- /* translators: accessibility text for the editor settings landmark region. */
68
- sidebar: __('Editor settings'),
69
- /* translators: accessibility text for the editor publish landmark region. */
70
- actions: __('Editor publish'),
71
- /* translators: accessibility text for the editor footer landmark region. */
72
- footer: __('Editor footer')
73
- };
58
+ const DESIGN_POST_TYPES = ['wp_template', 'wp_template_part', 'wp_block', 'wp_navigation'];
74
59
  function useEditorStyles() {
75
60
  const {
76
61
  hasThemeStyleSupport,
77
- editorSettings
78
- } = useSelect(select => ({
79
- hasThemeStyleSupport: select(editPostStore).isFeatureActive('themeStyles'),
80
- editorSettings: select(editorStore).getEditorSettings()
81
- }), []);
62
+ editorSettings,
63
+ isZoomedOutView,
64
+ hasMetaBoxes,
65
+ renderingMode,
66
+ postType
67
+ } = useSelect(select => {
68
+ const {
69
+ __unstableGetEditorMode
70
+ } = select(blockEditorStore);
71
+ const {
72
+ getCurrentPostType,
73
+ getRenderingMode
74
+ } = select(editorStore);
75
+ const _postType = getCurrentPostType();
76
+ return {
77
+ hasThemeStyleSupport: select(editPostStore).isFeatureActive('themeStyles'),
78
+ editorSettings: select(editorStore).getEditorSettings(),
79
+ isZoomedOutView: __unstableGetEditorMode() === 'zoom-out',
80
+ hasMetaBoxes: select(editPostStore).hasMetaBoxes(),
81
+ renderingMode: getRenderingMode(),
82
+ postType: _postType
83
+ };
84
+ }, []);
82
85
 
83
86
  // Compute the default styles.
84
87
  return useMemo(() => {
85
- var _editorSettings$style, _editorSettings$style2;
88
+ var _editorSettings$style, _editorSettings$style2, _editorSettings$style3;
86
89
  const presetStyles = (_editorSettings$style = editorSettings.styles?.filter(style => style.__unstableType && style.__unstableType !== 'theme')) !== null && _editorSettings$style !== void 0 ? _editorSettings$style : [];
87
90
  const defaultEditorStyles = [...editorSettings.defaultEditorStyles, ...presetStyles];
88
91
 
@@ -102,92 +105,72 @@ function useEditorStyles() {
102
105
  })
103
106
  });
104
107
  }
105
- return hasThemeStyles ? editorSettings.styles : defaultEditorStyles;
108
+ const baseStyles = hasThemeStyles ? (_editorSettings$style3 = editorSettings.styles) !== null && _editorSettings$style3 !== void 0 ? _editorSettings$style3 : [] : defaultEditorStyles;
109
+
110
+ // Add a constant padding for the typewritter effect. When typing at the
111
+ // bottom, there needs to be room to scroll up.
112
+ if (!isZoomedOutView && !hasMetaBoxes && renderingMode === 'post-only' && !DESIGN_POST_TYPES.includes(postType)) {
113
+ baseStyles.push({
114
+ css: 'body{padding-bottom: 40vh}'
115
+ });
116
+ }
117
+ return baseStyles;
106
118
  }, [editorSettings.defaultEditorStyles, editorSettings.disableLayoutStyles, editorSettings.styles, hasThemeStyleSupport]);
107
119
  }
108
120
  function Layout({
109
121
  initialPost
110
122
  }) {
111
123
  useCommands();
112
- useCommonCommands();
113
- const isMobileViewport = useViewportMatch('medium', '<');
124
+ useEditPostCommands();
114
125
  const isWideViewport = useViewportMatch('large');
115
- const isLargeViewport = useViewportMatch('medium');
116
- const {
117
- closeGeneralSidebar
118
- } = useDispatch(editPostStore);
126
+ const paddingAppenderRef = usePaddingAppender();
127
+ const shouldIframe = useShouldIframe();
119
128
  const {
120
129
  createErrorNotice
121
130
  } = useDispatch(noticesStore);
122
131
  const {
123
132
  mode,
124
133
  isFullscreenActive,
125
- isRichEditingEnabled,
126
134
  sidebarIsOpened,
127
135
  hasActiveMetaboxes,
128
- previousShortcut,
129
- nextShortcut,
130
136
  hasBlockSelected,
131
- isInserterOpened,
132
- isListViewOpened,
133
137
  showIconLabels,
134
138
  isDistractionFree,
135
139
  showBlockBreadcrumbs,
136
140
  showMetaBoxes,
137
- documentLabel,
138
141
  hasHistory,
139
- hasBlockBreadcrumbs,
140
- blockEditorMode,
141
- isEditingTemplate
142
+ isEditingTemplate,
143
+ isWelcomeGuideVisible
142
144
  } = useSelect(select => {
143
145
  const {
144
146
  get
145
147
  } = select(preferencesStore);
146
148
  const {
147
- getEditorSettings,
148
- getPostTypeLabel
149
+ getEditorSettings
149
150
  } = select(editorStore);
150
- const editorSettings = getEditorSettings();
151
- const postTypeLabel = getPostTypeLabel();
151
+ const {
152
+ isFeatureActive
153
+ } = select(editPostStore);
152
154
  return {
153
- showMetaBoxes: select(editorStore).getRenderingMode() === 'post-only',
154
- sidebarIsOpened: !!(select(interfaceStore).getActiveComplementaryArea('core') || select(editorStore).isPublishSidebarOpened()),
155
- isFullscreenActive: select(editPostStore).isFeatureActive('fullscreenMode'),
156
- isInserterOpened: select(editorStore).isInserterOpened(),
157
- isListViewOpened: select(editorStore).isListViewOpened(),
158
155
  mode: select(editorStore).getEditorMode(),
159
- isRichEditingEnabled: editorSettings.richEditingEnabled,
156
+ isFullscreenActive: select(editPostStore).isFeatureActive('fullscreenMode'),
160
157
  hasActiveMetaboxes: select(editPostStore).hasMetaBoxes(),
161
- previousShortcut: select(keyboardShortcutsStore).getAllShortcutKeyCombinations('core/editor/previous-region'),
162
- nextShortcut: select(keyboardShortcutsStore).getAllShortcutKeyCombinations('core/editor/next-region'),
158
+ hasBlockSelected: !!select(blockEditorStore).getBlockSelectionStart(),
163
159
  showIconLabels: get('core', 'showIconLabels'),
164
160
  isDistractionFree: get('core', 'distractionFree'),
165
161
  showBlockBreadcrumbs: get('core', 'showBlockBreadcrumbs'),
166
- // translators: Default label for the Document in the Block Breadcrumb.
167
- documentLabel: postTypeLabel || _x('Document', 'noun'),
168
- hasBlockSelected: !!select(blockEditorStore).getBlockSelectionStart(),
162
+ showMetaBoxes: select(editorStore).getRenderingMode() === 'post-only',
169
163
  hasHistory: !!getEditorSettings().onNavigateToPreviousEntityRecord,
170
- hasBlockBreadcrumbs: get('core', 'showBlockBreadcrumbs'),
171
- blockEditorMode: select(blockEditorStore).__unstableGetEditorMode(),
172
- isEditingTemplate: select(editorStore).getCurrentPostType() === 'wp_template'
164
+ isEditingTemplate: select(editorStore).getCurrentPostType() === 'wp_template',
165
+ isWelcomeGuideVisible: isFeatureActive('welcomeGuide')
173
166
  };
174
167
  }, []);
175
168
 
176
169
  // Set the right context for the command palette
177
- const commandContext = hasBlockSelected ? 'block-selection-edit' : 'post-editor-edit';
170
+ const commandContext = hasBlockSelected ? 'block-selection-edit' : 'entity-edit';
178
171
  useCommandContext(commandContext);
179
172
  const styles = useEditorStyles();
180
173
 
181
- // Local state for save panel.
182
- // Note 'truthy' callback implies an open panel.
183
- const [entitiesSavedStatesCallback, setEntitiesSavedStatesCallback] = useState(false);
184
- const closeEntitiesSavedStates = useCallback(arg => {
185
- if (typeof entitiesSavedStatesCallback === 'function') {
186
- entitiesSavedStatesCallback(arg);
187
- }
188
- setEntitiesSavedStatesCallback(false);
189
- }, [entitiesSavedStatesCallback]);
190
-
191
174
  // We need to add the show-icon-labels class to the body element so it is applied to modals.
192
175
  if (showIconLabels) {
193
176
  document.body.classList.add('show-icon-labels');
@@ -198,22 +181,8 @@ function Layout({
198
181
  'is-sidebar-opened': sidebarIsOpened,
199
182
  'has-metaboxes': hasActiveMetaboxes,
200
183
  'is-distraction-free': isDistractionFree && isWideViewport,
201
- 'is-entity-save-view-open': !!entitiesSavedStatesCallback,
202
- 'has-block-breadcrumbs': hasBlockBreadcrumbs && !isDistractionFree && isWideViewport
184
+ 'has-block-breadcrumbs': showBlockBreadcrumbs && !isDistractionFree && isWideViewport
203
185
  });
204
- const secondarySidebarLabel = isListViewOpened ? __('Document Overview') : __('Block Library');
205
- const secondarySidebar = () => {
206
- if (mode === 'visual' && isInserterOpened) {
207
- return createElement(InserterSidebar, {
208
- closeGeneralSidebar: closeGeneralSidebar,
209
- isRightSidebarOpen: sidebarIsOpened
210
- });
211
- }
212
- if (mode === 'visual' && isListViewOpened) {
213
- return createElement(ListViewSidebar, null);
214
- }
215
- return null;
216
- };
217
186
  function onPluginAreaError(name) {
218
187
  createErrorNotice(sprintf( /* translators: %s: plugin name */
219
188
  __('The "%s" plugin has encountered an error and cannot be rendered.'), name));
@@ -256,61 +225,40 @@ function Layout({
256
225
  break;
257
226
  }
258
227
  }, [createSuccessNotice]);
259
- return createElement(Fragment, null, createElement(FullscreenMode, {
260
- isActive: isFullscreenActive
261
- }), createElement(BrowserURL, {
262
- hasHistory: hasHistory
263
- }), createElement(UnsavedChangesWarning, null), createElement(AutosaveMonitor, null), createElement(LocalAutosaveMonitor, null), createElement(EditPostKeyboardShortcuts, null), createElement(EditorKeyboardShortcutsRegister, null), createElement(EditorKeyboardShortcuts, null), createElement(BlockKeyboardShortcuts, null), createElement(InterfaceSkeleton, {
264
- isDistractionFree: isDistractionFree && isWideViewport,
265
- className: className,
266
- labels: {
267
- ...interfaceLabels,
268
- secondarySidebar: secondarySidebarLabel
269
- },
270
- header: createElement(Header, {
271
- setEntitiesSavedStatesCallback: setEntitiesSavedStatesCallback,
228
+ return /*#__PURE__*/_jsxs(_Fragment, {
229
+ children: [/*#__PURE__*/_jsx(FullscreenMode, {
230
+ isActive: isFullscreenActive
231
+ }), /*#__PURE__*/_jsx(BrowserURL, {
232
+ hasHistory: hasHistory
233
+ }), /*#__PURE__*/_jsx(UnsavedChangesWarning, {}), /*#__PURE__*/_jsx(AutosaveMonitor, {}), /*#__PURE__*/_jsx(LocalAutosaveMonitor, {}), /*#__PURE__*/_jsx(EditPostKeyboardShortcuts, {}), /*#__PURE__*/_jsx(EditorKeyboardShortcutsRegister, {}), /*#__PURE__*/_jsx(BlockKeyboardShortcuts, {}), /*#__PURE__*/_jsx(WelcomeGuide, {}), /*#__PURE__*/_jsx(InitPatternModal, {}), /*#__PURE__*/_jsx(PluginArea, {
234
+ onError: onPluginAreaError
235
+ }), !isDistractionFree && /*#__PURE__*/_jsx(Sidebar, {
236
+ onActionPerformed: onActionPerformed,
237
+ extraPanels: !isEditingTemplate && /*#__PURE__*/_jsx(MetaBoxes, {
238
+ location: "side"
239
+ })
240
+ }), /*#__PURE__*/_jsx(PostEditorMoreMenu, {}), /*#__PURE__*/_jsx(BackButton, {
272
241
  initialPost: initialPost
273
- }),
274
- editorNotices: createElement(EditorNotices, null),
275
- secondarySidebar: secondarySidebar(),
276
- sidebar: !isDistractionFree && createElement(ComplementaryArea.Slot, {
277
- scope: "core"
278
- }),
279
- notices: createElement(EditorSnackbars, null),
280
- content: createElement(Fragment, null, !isDistractionFree && createElement(EditorNotices, null), (mode === 'text' || !isRichEditingEnabled) && createElement(TextEditor, null), !isLargeViewport && createElement(BlockToolbar, {
281
- hideDragHandle: true
282
- }), isRichEditingEnabled && mode === 'visual' && createElement(VisualEditor, {
283
- styles: styles
284
- }), !isDistractionFree && showMetaBoxes && createElement("div", {
285
- className: "edit-post-layout__metaboxes"
286
- }, createElement(MetaBoxes, {
287
- location: "normal"
288
- }), createElement(MetaBoxes, {
289
- location: "advanced"
290
- })), isMobileViewport && sidebarIsOpened && createElement(ScrollLock, null)),
291
- footer: !isDistractionFree && !isMobileViewport && showBlockBreadcrumbs && isRichEditingEnabled && blockEditorMode !== 'zoom-out' && mode === 'visual' && createElement("div", {
292
- className: "edit-post-layout__footer"
293
- }, createElement(BlockBreadcrumb, {
294
- rootLabelText: documentLabel
295
- })),
296
- actions: createElement(SavePublishPanels, {
297
- closeEntitiesSavedStates: closeEntitiesSavedStates,
298
- isEntitiesSavedStatesOpen: entitiesSavedStatesCallback,
299
- setEntitiesSavedStatesCallback: setEntitiesSavedStatesCallback,
300
- forceIsDirtyPublishPanel: hasActiveMetaboxes
301
- }),
302
- shortcuts: {
303
- previous: previousShortcut,
304
- next: nextShortcut
305
- }
306
- }), createElement(WelcomeGuide, null), createElement(InitPatternModal, null), createElement(PluginArea, {
307
- onError: onPluginAreaError
308
- }), !isDistractionFree && createElement(Sidebar, {
309
- onActionPerformed: onActionPerformed,
310
- extraPanels: !isEditingTemplate && createElement(MetaBoxes, {
311
- location: "side"
312
- })
313
- }));
242
+ }), /*#__PURE__*/_jsx(EditorSnackbars, {}), /*#__PURE__*/_jsx(EditorInterface, {
243
+ className: className,
244
+ styles: styles,
245
+ forceIsDirty: hasActiveMetaboxes,
246
+ contentRef: paddingAppenderRef,
247
+ disableIframe: !shouldIframe
248
+ // We should auto-focus the canvas (title) on load.
249
+ // eslint-disable-next-line jsx-a11y/no-autofocus
250
+ ,
251
+ autoFocus: !isWelcomeGuideVisible,
252
+ children: !isDistractionFree && showMetaBoxes && /*#__PURE__*/_jsxs("div", {
253
+ className: "edit-post-layout__metaboxes",
254
+ children: [/*#__PURE__*/_jsx(MetaBoxes, {
255
+ location: "normal"
256
+ }), /*#__PURE__*/_jsx(MetaBoxes, {
257
+ location: "advanced"
258
+ })]
259
+ })
260
+ })]
261
+ });
314
262
  }
315
263
  export default Layout;
316
264
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","AutosaveMonitor","LocalAutosaveMonitor","UnsavedChangesWarning","EditorNotices","EditorKeyboardShortcutsRegister","EditorKeyboardShortcuts","EditorSnackbars","store","editorStore","privateApis","editorPrivateApis","useSelect","useDispatch","BlockBreadcrumb","BlockToolbar","blockEditorPrivateApis","blockEditorStore","ScrollLock","useViewportMatch","PluginArea","__","_x","sprintf","useState","useCallback","useMemo","keyboardShortcutsStore","noticesStore","preferencesStore","commandsPrivateApis","coreCommandsPrivateApis","blockLibraryPrivateApis","addQueryArgs","TextEditor","VisualEditor","EditPostKeyboardShortcuts","InitPatternModal","BrowserURL","Header","MetaBoxes","WelcomeGuide","editPostStore","unlock","useCommonCommands","getLayoutStyles","useCommands","useCommandContext","InserterSidebar","ListViewSidebar","ComplementaryArea","FullscreenMode","SavePublishPanels","InterfaceSkeleton","interfaceStore","Sidebar","BlockKeyboardShortcuts","interfaceLabels","header","body","sidebar","actions","footer","useEditorStyles","hasThemeStyleSupport","editorSettings","select","isFeatureActive","getEditorSettings","_editorSettings$style","_editorSettings$style2","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","Layout","initialPost","isMobileViewport","isWideViewport","isLargeViewport","closeGeneralSidebar","createErrorNotice","mode","isFullscreenActive","isRichEditingEnabled","sidebarIsOpened","hasActiveMetaboxes","previousShortcut","nextShortcut","hasBlockSelected","isInserterOpened","isListViewOpened","showIconLabels","isDistractionFree","showBlockBreadcrumbs","showMetaBoxes","documentLabel","hasHistory","hasBlockBreadcrumbs","blockEditorMode","isEditingTemplate","get","getPostTypeLabel","postTypeLabel","getRenderingMode","getActiveComplementaryArea","isPublishSidebarOpened","getEditorMode","richEditingEnabled","hasMetaBoxes","getAllShortcutKeyCombinations","getBlockSelectionStart","onNavigateToPreviousEntityRecord","__unstableGetEditorMode","getCurrentPostType","commandContext","entitiesSavedStatesCallback","setEntitiesSavedStatesCallback","closeEntitiesSavedStates","arg","document","classList","add","remove","className","secondarySidebarLabel","secondarySidebar","createElement","isRightSidebarOpen","onPluginAreaError","name","createSuccessNotice","onActionPerformed","actionId","items","location","href","trashed","post_type","type","ids","id","newItem","title","rendered","label","onClick","postId","post","action","Fragment","isActive","labels","editorNotices","Slot","scope","notices","content","hideDragHandle","rootLabelText","isEntitiesSavedStatesOpen","forceIsDirtyPublishPanel","shortcuts","previous","next","onError","extraPanels"],"sources":["@wordpress/edit-post/src/components/layout/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAutosaveMonitor,\n\tLocalAutosaveMonitor,\n\tUnsavedChangesWarning,\n\tEditorNotices,\n\tEditorKeyboardShortcutsRegister,\n\tEditorKeyboardShortcuts,\n\tEditorSnackbars,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tBlockBreadcrumb,\n\tBlockToolbar,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { ScrollLock } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useState, useCallback, useMemo } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { privateApis as commandsPrivateApis } from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport TextEditor from '../text-editor';\nimport VisualEditor from '../visual-editor';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport InitPatternModal from '../init-pattern-modal';\nimport BrowserURL from '../browser-url';\nimport Header from '../header';\nimport MetaBoxes from '../meta-boxes';\nimport WelcomeGuide from '../welcome-guide';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useCommonCommands from '../../hooks/commands/use-common-commands';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst {\n\tInserterSidebar,\n\tListViewSidebar,\n\tComplementaryArea,\n\tFullscreenMode,\n\tSavePublishPanels,\n\tInterfaceSkeleton,\n\tinterfaceStore,\n\tSidebar,\n} = unlock( editorPrivateApis );\nconst { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );\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( { initialPost } ) {\n\tuseCommands();\n\tuseCommonCommands();\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isWideViewport = useViewportMatch( 'large' );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\n\tconst { closeGeneralSidebar } = useDispatch( 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\tpreviousShortcut,\n\t\tnextShortcut,\n\t\thasBlockSelected,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\n\t\tshowBlockBreadcrumbs,\n\t\tshowMetaBoxes,\n\t\tdocumentLabel,\n\t\thasHistory,\n\t\thasBlockBreadcrumbs,\n\t\tblockEditorMode,\n\t\tisEditingTemplate,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEditorSettings, getPostTypeLabel } = select( editorStore );\n\t\tconst editorSettings = getEditorSettings();\n\t\tconst postTypeLabel = getPostTypeLabel();\n\n\t\treturn {\n\t\t\tshowMetaBoxes:\n\t\t\t\tselect( editorStore ).getRenderingMode() === 'post-only',\n\t\t\tsidebarIsOpened: !! (\n\t\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' ) ||\n\t\t\t\tselect( editorStore ).isPublishSidebarOpened()\n\t\t\t),\n\t\t\tisFullscreenActive:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\tisInserterOpened: select( editorStore ).isInserterOpened(),\n\t\t\tisListViewOpened: select( editorStore ).isListViewOpened(),\n\t\t\tmode: select( editorStore ).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/editor/previous-region' ),\n\t\t\tnextShortcut: select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getAllShortcutKeyCombinations( 'core/editor/next-region' ),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\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\thasBlockSelected:\n\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\thasHistory: !! getEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t\thasBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\tblockEditorMode:\n\t\t\t\tselect( blockEditorStore ).__unstableGetEditorMode(),\n\t\t\tisEditingTemplate:\n\t\t\t\tselect( editorStore ).getCurrentPostType() === 'wp_template',\n\t\t};\n\t}, [] );\n\n\t// Set the right context for the command palette\n\tconst commandContext = hasBlockSelected\n\t\t? 'block-selection-edit'\n\t\t: 'post-editor-edit';\n\tuseCommandContext( commandContext );\n\n\tconst styles = useEditorStyles();\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 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 = clsx( 'edit-post-layout', 'is-mode-' + mode, {\n\t\t'is-sidebar-opened': sidebarIsOpened,\n\t\t'has-metaboxes': hasActiveMetaboxes,\n\t\t'is-distraction-free': isDistractionFree && isWideViewport,\n\t\t'is-entity-save-view-open': !! entitiesSavedStatesCallback,\n\t\t'has-block-breadcrumbs':\n\t\t\thasBlockBreadcrumbs && ! isDistractionFree && isWideViewport,\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 (\n\t\t\t\t<InserterSidebar\n\t\t\t\t\tcloseGeneralSidebar={ closeGeneralSidebar }\n\t\t\t\t\tisRightSidebarOpen={ sidebarIsOpened }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t\tif ( mode === 'visual' && isListViewOpened ) {\n\t\t\treturn <ListViewSidebar />;\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\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\n\tconst onActionPerformed = useCallback(\n\t\t( actionId, items ) => {\n\t\t\tswitch ( actionId ) {\n\t\t\t\tcase 'move-to-trash':\n\t\t\t\t\t{\n\t\t\t\t\t\tdocument.location.href = addQueryArgs( 'edit.php', {\n\t\t\t\t\t\t\ttrashed: 1,\n\t\t\t\t\t\t\tpost_type: items[ 0 ].type,\n\t\t\t\t\t\t\tids: items[ 0 ].id,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'duplicate-post':\n\t\t\t\t\t{\n\t\t\t\t\t\tconst newItem = items[ 0 ];\n\t\t\t\t\t\tconst title =\n\t\t\t\t\t\t\ttypeof newItem.title === 'string'\n\t\t\t\t\t\t\t\t? newItem.title\n\t\t\t\t\t\t\t\t: newItem.title?.rendered;\n\t\t\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Title of the created post e.g: \"Post 1\".\n\t\t\t\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\tid: 'duplicate-post-action',\n\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel: __( 'Edit' ),\n\t\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\t\tconst postId = newItem.id;\n\t\t\t\t\t\t\t\t\t\t\tdocument.location.href =\n\t\t\t\t\t\t\t\t\t\t\t\taddQueryArgs( 'post.php', {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpost: postId,\n\t\t\t\t\t\t\t\t\t\t\t\t\taction: 'edit',\n\t\t\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t[ createSuccessNotice ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t<BrowserURL hasHistory={ hasHistory } />\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\t\t\t<BlockKeyboardShortcuts />\n\n\t\t\t<InterfaceSkeleton\n\t\t\t\tisDistractionFree={ isDistractionFree && isWideViewport }\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\tinitialPost={ initialPost }\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! isDistractionFree && (\n\t\t\t\t\t\t<ComplementaryArea.Slot scope=\"core\" />\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{ ! isLargeViewport && <BlockToolbar hideDragHandle /> }\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 && showMetaBoxes && (\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\tblockEditorMode !== 'zoom-out' &&\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<SavePublishPanels\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\tforceIsDirtyPublishPanel={ hasActiveMetaboxes }\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<WelcomeGuide />\n\t\t\t<InitPatternModal />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t{ ! isDistractionFree && (\n\t\t\t\t<Sidebar\n\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\textraPanels={\n\t\t\t\t\t\t! isEditingTemplate && <MetaBoxes location=\"side\" />\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\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,gBAAgB,MAAE,CAAC,EACpBqG,aAAA,CAACtH,UAAU;IAAC4J,OAAO,EAAGpC;EAAmB,CAAE,CAAC,EAC1C,CAAEpC,iBAAiB,IACpBkC,aAAA,CAACnF,OAAO;IACPwF,iBAAiB,EAAGA,iBAAmB;IACvCkC,WAAW,EACV,CAAElE,iBAAiB,IAAI2B,aAAA,CAAClG,SAAS;MAAC0G,QAAQ,EAAC;IAAM,CAAE;EACnD,CACD,CAED,CAAC;AAEL;AAEA,eAAe5D,MAAM","ignoreList":[]}
1
+ {"version":3,"names":["clsx","AutosaveMonitor","LocalAutosaveMonitor","UnsavedChangesWarning","EditorKeyboardShortcutsRegister","EditorSnackbars","store","editorStore","privateApis","editorPrivateApis","useSelect","useDispatch","blockEditorPrivateApis","blockEditorStore","useViewportMatch","PluginArea","__","sprintf","useCallback","useMemo","noticesStore","preferencesStore","commandsPrivateApis","coreCommandsPrivateApis","blockLibraryPrivateApis","addQueryArgs","BackButton","EditPostKeyboardShortcuts","InitPatternModal","BrowserURL","MetaBoxes","PostEditorMoreMenu","WelcomeGuide","editPostStore","unlock","useEditPostCommands","usePaddingAppender","useShouldIframe","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","getLayoutStyles","useCommands","useCommandContext","EditorInterface","FullscreenMode","Sidebar","BlockKeyboardShortcuts","DESIGN_POST_TYPES","useEditorStyles","hasThemeStyleSupport","editorSettings","isZoomedOutView","hasMetaBoxes","renderingMode","postType","select","__unstableGetEditorMode","getCurrentPostType","getRenderingMode","_postType","isFeatureActive","getEditorSettings","_editorSettings$style","_editorSettings$style2","_editorSettings$style3","presetStyles","styles","filter","style","__unstableType","defaultEditorStyles","hasThemeStyles","length","disableLayoutStyles","push","css","selector","hasBlockGapSupport","hasFallbackGapSupport","fallbackGapValue","baseStyles","includes","Layout","initialPost","isWideViewport","paddingAppenderRef","shouldIframe","createErrorNotice","mode","isFullscreenActive","sidebarIsOpened","hasActiveMetaboxes","hasBlockSelected","showIconLabels","isDistractionFree","showBlockBreadcrumbs","showMetaBoxes","hasHistory","isEditingTemplate","isWelcomeGuideVisible","get","getEditorMode","getBlockSelectionStart","onNavigateToPreviousEntityRecord","commandContext","document","body","classList","add","remove","className","onPluginAreaError","name","createSuccessNotice","onActionPerformed","actionId","items","location","href","trashed","post_type","type","ids","id","newItem","title","rendered","actions","label","onClick","postId","post","action","children","isActive","onError","extraPanels","forceIsDirty","contentRef","disableIframe","autoFocus"],"sources":["@wordpress/edit-post/src/components/layout/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAutosaveMonitor,\n\tLocalAutosaveMonitor,\n\tUnsavedChangesWarning,\n\tEditorKeyboardShortcutsRegister,\n\tEditorSnackbars,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { PluginArea } from '@wordpress/plugins';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useMemo } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { privateApis as commandsPrivateApis } from '@wordpress/commands';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport BackButton from '../back-button';\nimport EditPostKeyboardShortcuts from '../keyboard-shortcuts';\nimport InitPatternModal from '../init-pattern-modal';\nimport BrowserURL from '../browser-url';\nimport MetaBoxes from '../meta-boxes';\nimport PostEditorMoreMenu from '../more-menu';\nimport WelcomeGuide from '../welcome-guide';\nimport { store as editPostStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useEditPostCommands from '../../commands/use-commands';\nimport { usePaddingAppender } from './use-padding-appender';\nimport { useShouldIframe } from './use-should-iframe';\n\nconst { getLayoutStyles } = unlock( blockEditorPrivateApis );\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst { EditorInterface, FullscreenMode, Sidebar } =\n\tunlock( editorPrivateApis );\nconst { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );\nconst DESIGN_POST_TYPES = [\n\t'wp_template',\n\t'wp_template_part',\n\t'wp_block',\n\t'wp_navigation',\n];\n\nfunction useEditorStyles() {\n\tconst {\n\t\thasThemeStyleSupport,\n\t\teditorSettings,\n\t\tisZoomedOutView,\n\t\thasMetaBoxes,\n\t\trenderingMode,\n\t\tpostType,\n\t} = useSelect( ( select ) => {\n\t\tconst { __unstableGetEditorMode } = select( blockEditorStore );\n\t\tconst { getCurrentPostType, getRenderingMode } = select( editorStore );\n\t\tconst _postType = getCurrentPostType();\n\t\treturn {\n\t\t\thasThemeStyleSupport:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'themeStyles' ),\n\t\t\teditorSettings: select( editorStore ).getEditorSettings(),\n\t\t\tisZoomedOutView: __unstableGetEditorMode() === 'zoom-out',\n\t\t\thasMetaBoxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\trenderingMode: getRenderingMode(),\n\t\t\tpostType: _postType,\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\tconst baseStyles = hasThemeStyles\n\t\t\t? editorSettings.styles ?? []\n\t\t\t: defaultEditorStyles;\n\n\t\t// Add a constant padding for the typewritter effect. When typing at the\n\t\t// bottom, there needs to be room to scroll up.\n\t\tif (\n\t\t\t! isZoomedOutView &&\n\t\t\t! hasMetaBoxes &&\n\t\t\trenderingMode === 'post-only' &&\n\t\t\t! DESIGN_POST_TYPES.includes( postType )\n\t\t) {\n\t\t\tbaseStyles.push( {\n\t\t\t\tcss: 'body{padding-bottom: 40vh}',\n\t\t\t} );\n\t\t}\n\n\t\treturn baseStyles;\n\t}, [\n\t\teditorSettings.defaultEditorStyles,\n\t\teditorSettings.disableLayoutStyles,\n\t\teditorSettings.styles,\n\t\thasThemeStyleSupport,\n\t] );\n}\n\nfunction Layout( { initialPost } ) {\n\tuseCommands();\n\tuseEditPostCommands();\n\tconst isWideViewport = useViewportMatch( 'large' );\n\tconst paddingAppenderRef = usePaddingAppender();\n\tconst shouldIframe = useShouldIframe();\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst {\n\t\tmode,\n\t\tisFullscreenActive,\n\t\tsidebarIsOpened,\n\t\thasActiveMetaboxes,\n\t\thasBlockSelected,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\n\t\tshowBlockBreadcrumbs,\n\t\tshowMetaBoxes,\n\t\thasHistory,\n\t\tisEditingTemplate,\n\t\tisWelcomeGuideVisible,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst { isFeatureActive } = select( editPostStore );\n\n\t\treturn {\n\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\tisFullscreenActive:\n\t\t\t\tselect( editPostStore ).isFeatureActive( 'fullscreenMode' ),\n\t\t\thasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),\n\t\t\thasBlockSelected:\n\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\tshowMetaBoxes:\n\t\t\t\tselect( editorStore ).getRenderingMode() === 'post-only',\n\t\t\thasHistory: !! getEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t\tisEditingTemplate:\n\t\t\t\tselect( editorStore ).getCurrentPostType() === 'wp_template',\n\t\t\tisWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),\n\t\t};\n\t}, [] );\n\n\t// Set the right context for the command palette\n\tconst commandContext = hasBlockSelected\n\t\t? 'block-selection-edit'\n\t\t: 'entity-edit';\n\tuseCommandContext( commandContext );\n\n\tconst styles = useEditorStyles();\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 = clsx( 'edit-post-layout', 'is-mode-' + mode, {\n\t\t'is-sidebar-opened': sidebarIsOpened,\n\t\t'has-metaboxes': hasActiveMetaboxes,\n\t\t'is-distraction-free': isDistractionFree && isWideViewport,\n\t\t'has-block-breadcrumbs':\n\t\t\tshowBlockBreadcrumbs && ! isDistractionFree && isWideViewport,\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\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\n\tconst onActionPerformed = useCallback(\n\t\t( actionId, items ) => {\n\t\t\tswitch ( actionId ) {\n\t\t\t\tcase 'move-to-trash':\n\t\t\t\t\t{\n\t\t\t\t\t\tdocument.location.href = addQueryArgs( 'edit.php', {\n\t\t\t\t\t\t\ttrashed: 1,\n\t\t\t\t\t\t\tpost_type: items[ 0 ].type,\n\t\t\t\t\t\t\tids: items[ 0 ].id,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'duplicate-post':\n\t\t\t\t\t{\n\t\t\t\t\t\tconst newItem = items[ 0 ];\n\t\t\t\t\t\tconst title =\n\t\t\t\t\t\t\ttypeof newItem.title === 'string'\n\t\t\t\t\t\t\t\t? newItem.title\n\t\t\t\t\t\t\t\t: newItem.title?.rendered;\n\t\t\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Title of the created post e.g: \"Post 1\".\n\t\t\t\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\tid: 'duplicate-post-action',\n\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel: __( 'Edit' ),\n\t\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\t\tconst postId = newItem.id;\n\t\t\t\t\t\t\t\t\t\t\tdocument.location.href =\n\t\t\t\t\t\t\t\t\t\t\t\taddQueryArgs( 'post.php', {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpost: postId,\n\t\t\t\t\t\t\t\t\t\t\t\t\taction: 'edit',\n\t\t\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t[ createSuccessNotice ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<FullscreenMode isActive={ isFullscreenActive } />\n\t\t\t<BrowserURL hasHistory={ hasHistory } />\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<BlockKeyboardShortcuts />\n\t\t\t<WelcomeGuide />\n\t\t\t<InitPatternModal />\n\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t{ ! isDistractionFree && (\n\t\t\t\t<Sidebar\n\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\textraPanels={\n\t\t\t\t\t\t! isEditingTemplate && <MetaBoxes location=\"side\" />\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<PostEditorMoreMenu />\n\t\t\t<BackButton initialPost={ initialPost } />\n\t\t\t<EditorSnackbars />\n\t\t\t<EditorInterface\n\t\t\t\tclassName={ className }\n\t\t\t\tstyles={ styles }\n\t\t\t\tforceIsDirty={ hasActiveMetaboxes }\n\t\t\t\tcontentRef={ paddingAppenderRef }\n\t\t\t\tdisableIframe={ ! shouldIframe }\n\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\tautoFocus={ ! isWelcomeGuideVisible }\n\t\t\t>\n\t\t\t\t{ ! isDistractionFree && showMetaBoxes && (\n\t\t\t\t\t<div className=\"edit-post-layout__metaboxes\">\n\t\t\t\t\t\t<MetaBoxes location=\"normal\" />\n\t\t\t\t\t\t<MetaBoxes location=\"advanced\" />\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</EditorInterface>\n\t\t</>\n\t);\n}\n\nexport default Layout;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,eAAe,EACfC,oBAAoB,EACpBC,qBAAqB,EACrBC,+BAA+B,EAC/BC,eAAe,EACfC,KAAK,IAAIC,WAAW,EACpBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;AAC1B,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SACCH,WAAW,IAAII,sBAAsB,EACrCN,KAAK,IAAIO,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,WAAW,EAAEC,OAAO,QAAQ,oBAAoB;AACzD,SAASb,KAAK,IAAIc,YAAY,QAAQ,oBAAoB;AAC1D,SAASd,KAAK,IAAIe,gBAAgB,QAAQ,wBAAwB;AAClE,SAASb,WAAW,IAAIc,mBAAmB,QAAQ,qBAAqB;AACxE,SAASd,WAAW,IAAIe,uBAAuB,QAAQ,0BAA0B;AACjF,SAASf,WAAW,IAAIgB,uBAAuB,QAAQ,0BAA0B;AACjF,SAASC,YAAY,QAAQ,gBAAgB;;AAE7C;AACA;AACA;AACA,OAAOC,UAAU,MAAM,gBAAgB;AACvC,OAAOC,yBAAyB,MAAM,uBAAuB;AAC7D,OAAOC,gBAAgB,MAAM,uBAAuB;AACpD,OAAOC,UAAU,MAAM,gBAAgB;AACvC,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,kBAAkB,MA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fmE,SAAS,EAAGA,SAAW;MACvB5C,MAAM,EAAGA,MAAQ;MACjBuE,YAAY,EAAG9C,kBAAoB;MACnC+C,UAAU,EAAGrD,kBAAoB;MACjCsD,aAAa,EAAG,CAAErD;MAClB;MACA;MAAA;MACAsD,SAAS,EAAG,CAAEzC,qBAAuB;MAAAkC,QAAA,EAEnC,CAAEvC,iBAAiB,IAAIE,aAAa,iBACrC3D,KAAA;QAAKyE,SAAS,EAAC,6BAA6B;QAAAuB,QAAA,gBAC3ClG,IAAA,CAACT,SAAS;UAAC2F,QAAQ,EAAC;QAAQ,CAAE,CAAC,eAC/BlF,IAAA,CAACT,SAAS;UAAC2F,QAAQ,EAAC;QAAU,CAAE,CAAC;MAAA,CAC7B;IACL,CACe,CAAC;EAAA,CACjB,CAAC;AAEL;AAEA,eAAenC,MAAM","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement, Fragment } from "react";
2
1
  /**
3
2
  * External dependencies
4
3
  */
@@ -23,6 +22,9 @@ import styles from './style.scss';
23
22
  import headerToolbarStyles from '../header/header-toolbar/style.scss';
24
23
  import Header from '../header';
25
24
  import VisualEditor from '../visual-editor';
25
+ import { jsx as _jsx } from "react/jsx-runtime";
26
+ import { jsxs as _jsxs } from "react/jsx-runtime";
27
+ import { Fragment as _Fragment } from "react/jsx-runtime";
26
28
  class Layout extends Component {
27
29
  constructor() {
28
30
  super(...arguments);
@@ -76,7 +78,7 @@ class Layout extends Component {
76
78
  const {
77
79
  globalStyles
78
80
  } = this.props;
79
- return createElement(HTMLTextInput, {
81
+ return /*#__PURE__*/_jsx(HTMLTextInput, {
80
82
  parentHeight: this.state.rootViewHeight,
81
83
  style: globalStyles
82
84
  });
@@ -88,7 +90,7 @@ class Layout extends Component {
88
90
  if (!isReady) {
89
91
  return null;
90
92
  }
91
- return createElement(VisualEditor, {
93
+ return /*#__PURE__*/_jsx(VisualEditor, {
92
94
  setTitleRef: this.props.setTitleRef
93
95
  });
94
96
  }
@@ -113,24 +115,31 @@ class Layout extends Component {
113
115
  const editorStyles = [getStylesFromColorScheme(styles.background, styles.backgroundDark), globalStyles?.background && {
114
116
  backgroundColor: globalStyles.background
115
117
  }];
116
- return createElement(Tooltip.Slot, null, createElement(SafeAreaView, {
117
- style: containerStyles,
118
- onLayout: this.onRootViewLayout
119
- }, createElement(AutosaveMonitor, {
120
- disableIntervalChecks: true
121
- }), createElement(OfflineStatus, null), createElement(View, {
122
- style: editorStyles
123
- }, isHtmlView ? this.renderHTML() : this.renderVisual(), !isHtmlView && Platform.OS === 'android' && createElement(FloatingToolbar, null), createElement(NoticeList, null)), createElement(View, {
124
- style: {
125
- flex: 0,
126
- flexBasis: marginBottom,
127
- height: marginBottom
128
- }
129
- }), !isHtmlView && createElement(KeyboardAvoidingView, {
130
- parentHeight: this.state.rootViewHeight,
131
- style: toolbarKeyboardAvoidingViewStyle,
132
- withAnimatedHeight: true
133
- }, Platform.OS === 'ios' && createElement(Fragment, null, createElement(AutocompletionItemsSlot, null), createElement(FloatingToolbar, null)), createElement(Header, null), createElement(BottomSheetSettings, null)), Platform.OS === 'android' && createElement(AutocompletionItemsSlot, null)));
118
+ return /*#__PURE__*/_jsx(Tooltip.Slot, {
119
+ children: /*#__PURE__*/_jsxs(SafeAreaView, {
120
+ style: containerStyles,
121
+ onLayout: this.onRootViewLayout,
122
+ children: [/*#__PURE__*/_jsx(AutosaveMonitor, {
123
+ disableIntervalChecks: true
124
+ }), /*#__PURE__*/_jsx(OfflineStatus, {}), /*#__PURE__*/_jsxs(View, {
125
+ style: editorStyles,
126
+ children: [isHtmlView ? this.renderHTML() : this.renderVisual(), !isHtmlView && Platform.OS === 'android' && /*#__PURE__*/_jsx(FloatingToolbar, {}), /*#__PURE__*/_jsx(NoticeList, {})]
127
+ }), /*#__PURE__*/_jsx(View, {
128
+ style: {
129
+ flex: 0,
130
+ flexBasis: marginBottom,
131
+ height: marginBottom
132
+ }
133
+ }), !isHtmlView && /*#__PURE__*/_jsxs(KeyboardAvoidingView, {
134
+ parentHeight: this.state.rootViewHeight,
135
+ style: toolbarKeyboardAvoidingViewStyle,
136
+ withAnimatedHeight: true,
137
+ children: [Platform.OS === 'ios' && /*#__PURE__*/_jsxs(_Fragment, {
138
+ children: [/*#__PURE__*/_jsx(AutocompletionItemsSlot, {}), /*#__PURE__*/_jsx(FloatingToolbar, {})]
139
+ }), /*#__PURE__*/_jsx(Header, {}), /*#__PURE__*/_jsx(BottomSheetSettings, {})]
140
+ }), Platform.OS === 'android' && /*#__PURE__*/_jsx(AutocompletionItemsSlot, {})]
141
+ })
142
+ });
134
143
  }
135
144
  }
136
145
  export default compose([withSelect(select => {
@@ -1 +1 @@
1
- {"version":3,"names":["Platform","SafeAreaView","View","SafeArea","Component","withSelect","BottomSheetSettings","FloatingToolbar","store","blockEditorStore","compose","withPreferredColorScheme","HTMLTextInput","KeyboardAvoidingView","NoticeList","Tooltip","__unstableAutocompletionItemsSlot","AutocompletionItemsSlot","AutosaveMonitor","OfflineStatus","editorStore","sendNativeEditorDidLayout","styles","headerToolbarStyles","Header","VisualEditor","Layout","constructor","arguments","onSafeAreaInsetsUpdate","bind","onRootViewLayout","state","rootViewHeight","safeAreaInsets","top","bottom","right","left","getSafeAreaInsetsForRootView","then","componentDidMount","_isMounted","safeAreaSubscription","addEventListener","componentWillUnmount","remove","result","setState","event","setHeightState","height","nativeEvent","layout","renderHTML","globalStyles","props","createElement","parentHeight","style","renderVisual","isReady","setTitleRef","render","getStylesFromColorScheme","mode","isHtmlView","marginBottom","OS","containerStyles","container","containerDark","toolbarKeyboardAvoidingViewStyle","toolbarKeyboardAvoidingView","backgroundColor","editorStyles","background","backgroundDark","Slot","onLayout","disableIntervalChecks","flex","flexBasis","withAnimatedHeight","Fragment","select","__unstableIsEditorReady","isEditorReady","getEditorMode","getSettings","__experimentalGlobalStylesBaseStyles","color"],"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 {\n\tAutosaveMonitor,\n\tOfflineStatus,\n\tstore as editorStore,\n} 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';\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<OfflineStatus />\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, getEditorMode } =\n\t\t\tselect( editorStore );\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":";AAAA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,IAAI,QAAQ,cAAc;AAC3D,OAAOC,QAAQ,MAAM,wBAAwB;;AAE7C;AACA;AACA;AACA,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,SACCC,mBAAmB,EACnBC,eAAe,EACfC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,OAAO,EAAEC,wBAAwB,QAAQ,oBAAoB;AACtE,SACCC,aAAa,EACbC,oBAAoB,EACpBC,UAAU,EACVC,OAAO,EACPC,iCAAiC,IAAIC,uBAAuB,QACtD,uBAAuB;AAC9B,SACCC,eAAe,EACfC,aAAa,EACbX,KAAK,IAAIY,WAAW,QACd,mBAAmB;AAC1B,SAASC,yBAAyB,QAAQ,gCAAgC;;AAE1E;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACjC,OAAOC,mBAAmB,MAAM,qCAAqC;AACrE,OAAOC,MAAM,MAAM,WAAW;AAC9B,OAAOC,YAAY,MAAM,kBAAkB;AAE3C,MAAMC,MAAM,SAAStB,SAAS,CAAC;EAC9BuB,WAAWA,CAAA,EAAG;IACb,KAAK,CAAE,GAAGC,SAAU,CAAC;IAErB,IAAI,CAACC,sBAAsB,GAAG,IAAI,CAACA,sBAAsB,CAACC,IAAI,CAAE,IAAK,CAAC;IACtE,IAAI,CAACC,gBAAgB,GAAG,IAAI,CAACA,gBAAgB,CAACD,IAAI,CAAE,IAAK,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ACvBL,UAAU,CAAIgF,MAAM,IAAM;EACzB,MAAM;IAAEC,uBAAuB,EAAEC,aAAa;IAAEC;EAAc,CAAC,GAC9DH,MAAM,CAAEjE,WAAY,CAAC;EACtB,MAAM;IAAEqE;EAAY,CAAC,GAAGJ,MAAM,CAAE5E,gBAAiB,CAAC;EAClD,MAAM8C,YAAY,GACjBkC,WAAW,CAAC,CAAC,EAAEC,oCAAoC,EAAEC,KAAK;EAE3D,OAAO;IACN9B,OAAO,EAAE0B,aAAa,CAAC,CAAC;IACxBtB,IAAI,EAAEuB,aAAa,CAAC,CAAC;IACrBjC;EACD,CAAC;AACF,CAAE,CAAC,EACH5C,wBAAwB,CACvB,CAAC,CAAEe,MAAO,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Platform","SafeAreaView","View","SafeArea","Component","withSelect","BottomSheetSettings","FloatingToolbar","store","blockEditorStore","compose","withPreferredColorScheme","HTMLTextInput","KeyboardAvoidingView","NoticeList","Tooltip","__unstableAutocompletionItemsSlot","AutocompletionItemsSlot","AutosaveMonitor","OfflineStatus","editorStore","sendNativeEditorDidLayout","styles","headerToolbarStyles","Header","VisualEditor","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Layout","constructor","arguments","onSafeAreaInsetsUpdate","bind","onRootViewLayout","state","rootViewHeight","safeAreaInsets","top","bottom","right","left","getSafeAreaInsetsForRootView","then","componentDidMount","_isMounted","safeAreaSubscription","addEventListener","componentWillUnmount","remove","result","setState","event","setHeightState","height","nativeEvent","layout","renderHTML","globalStyles","props","parentHeight","style","renderVisual","isReady","setTitleRef","render","getStylesFromColorScheme","mode","isHtmlView","marginBottom","OS","containerStyles","container","containerDark","toolbarKeyboardAvoidingViewStyle","toolbarKeyboardAvoidingView","backgroundColor","editorStyles","background","backgroundDark","Slot","children","onLayout","disableIntervalChecks","flex","flexBasis","withAnimatedHeight","select","__unstableIsEditorReady","isEditorReady","getEditorMode","getSettings","__experimentalGlobalStylesBaseStyles","color"],"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 {\n\tAutosaveMonitor,\n\tOfflineStatus,\n\tstore as editorStore,\n} 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';\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<OfflineStatus />\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, getEditorMode } =\n\t\t\tselect( editorStore );\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":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,IAAI,QAAQ,cAAc;AAC3D,OAAOC,QAAQ,MAAM,wBAAwB;;AAE7C;AACA;AACA;AACA,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,SACCC,mBAAmB,EACnBC,eAAe,EACfC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,OAAO,EAAEC,wBAAwB,QAAQ,oBAAoB;AACtE,SACCC,aAAa,EACbC,oBAAoB,EACpBC,UAAU,EACVC,OAAO,EACPC,iCAAiC,IAAIC,uBAAuB,QACtD,uBAAuB;AAC9B,SACCC,eAAe,EACfC,aAAa,EACbX,KAAK,IAAIY,WAAW,QACd,mBAAmB;AAC1B,SAASC,yBAAyB,QAAQ,gCAAgC;;AAE1E;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACjC,OAAOC,mBAAmB,MAAM,qCAAqC;AACrE,OAAOC,MAAM,MAAM,WAAW;AAC9B,OAAOC,YAAY,MAAM,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAE5C,MAAMC,MAAM,SAAS5B,SAAS,CAAC;EAC9B6B,WAAWA,CAAA,EAAG;IACb,KAAK,CAAE,GA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