@wordpress/edit-post 7.35.0 → 8.0.1

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 (204) 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 +59 -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 +93 -155
  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 +24 -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 +51 -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 +98 -158
  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 +26 -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 +41 -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/init-pattern-modal/index.js +1 -4
  129. package/src/components/layout/index.js +88 -202
  130. package/src/components/layout/style.scss +9 -17
  131. package/src/components/layout/use-should-iframe.js +40 -0
  132. package/src/components/{header/more-menu → more-menu}/index.js +2 -2
  133. package/src/components/preferences-modal/enable-custom-fields.js +1 -0
  134. package/src/index.js +11 -6
  135. package/src/store/selectors.js +8 -5
  136. package/src/style.scss +2 -5
  137. package/src/test/__snapshots__/editor.native.js.snap +72 -0
  138. package/src/test/editor.native.js +77 -0
  139. package/build/components/header/fullscreen-mode-close/index.js.map +0 -1
  140. package/build/components/header/index.js +0 -69
  141. package/build/components/header/index.js.map +0 -1
  142. package/build/components/header/main-dashboard-button/index.js +0 -33
  143. package/build/components/header/main-dashboard-button/index.js.map +0 -1
  144. package/build/components/header/more-menu/index.js +0 -43
  145. package/build/components/header/more-menu/index.js.map +0 -1
  146. package/build/components/header/more-menu/manage-patterns-menu-item.js.map +0 -1
  147. package/build/components/header/more-menu/welcome-guide-menu-item.js.map +0 -1
  148. package/build/components/text-editor/index.js +0 -61
  149. package/build/components/text-editor/index.js.map +0 -1
  150. package/build/components/visual-editor/block-inspector-button.js +0 -55
  151. package/build/components/visual-editor/block-inspector-button.js.map +0 -1
  152. package/build/components/visual-editor/index.js +0 -98
  153. package/build/components/visual-editor/index.js.map +0 -1
  154. package/build/components/visual-editor/use-padding-appender.js.map +0 -1
  155. package/build/hooks/commands/use-common-commands.js +0 -119
  156. package/build/hooks/commands/use-common-commands.js.map +0 -1
  157. package/build/hooks/components/index.js +0 -11
  158. package/build/hooks/components/index.js.map +0 -1
  159. package/build/hooks/index.js +0 -5
  160. package/build/hooks/index.js.map +0 -1
  161. package/build/hooks/validate-multiple-use/index.js +0 -134
  162. package/build/hooks/validate-multiple-use/index.js.map +0 -1
  163. package/build-module/components/header/fullscreen-mode-close/index.js.map +0 -1
  164. package/build-module/components/header/index.js +0 -61
  165. package/build-module/components/header/index.js.map +0 -1
  166. package/build-module/components/header/main-dashboard-button/index.js +0 -26
  167. package/build-module/components/header/main-dashboard-button/index.js.map +0 -1
  168. package/build-module/components/header/more-menu/index.js +0 -35
  169. package/build-module/components/header/more-menu/index.js.map +0 -1
  170. package/build-module/components/header/more-menu/manage-patterns-menu-item.js.map +0 -1
  171. package/build-module/components/header/more-menu/welcome-guide-menu-item.js.map +0 -1
  172. package/build-module/components/text-editor/index.js +0 -54
  173. package/build-module/components/text-editor/index.js.map +0 -1
  174. package/build-module/components/visual-editor/block-inspector-button.js +0 -47
  175. package/build-module/components/visual-editor/block-inspector-button.js.map +0 -1
  176. package/build-module/components/visual-editor/index.js +0 -90
  177. package/build-module/components/visual-editor/index.js.map +0 -1
  178. package/build-module/components/visual-editor/use-padding-appender.js.map +0 -1
  179. package/build-module/hooks/commands/use-common-commands.js +0 -112
  180. package/build-module/hooks/commands/use-common-commands.js.map +0 -1
  181. package/build-module/hooks/components/index.js +0 -8
  182. package/build-module/hooks/components/index.js.map +0 -1
  183. package/build-module/hooks/index.js +0 -6
  184. package/build-module/hooks/index.js.map +0 -1
  185. package/build-module/hooks/validate-multiple-use/index.js +0 -132
  186. package/build-module/hooks/validate-multiple-use/index.js.map +0 -1
  187. package/src/components/header/index.js +0 -53
  188. package/src/components/header/main-dashboard-button/index.js +0 -28
  189. package/src/components/header/style.scss +0 -14
  190. package/src/components/text-editor/index.js +0 -63
  191. package/src/components/text-editor/style.scss +0 -71
  192. package/src/components/visual-editor/block-inspector-button.js +0 -59
  193. package/src/components/visual-editor/index.js +0 -108
  194. package/src/components/visual-editor/style.scss +0 -53
  195. package/src/hooks/commands/use-common-commands.js +0 -126
  196. package/src/hooks/components/index.js +0 -13
  197. package/src/hooks/index.js +0 -5
  198. package/src/hooks/validate-multiple-use/index.js +0 -163
  199. /package/build/components/{visual-editor → layout}/use-padding-appender.js +0 -0
  200. /package/build-module/components/{visual-editor → layout}/use-padding-appender.js +0 -0
  201. /package/src/components/{header/fullscreen-mode-close/test/__snapshots__/index.js.snap → back-button/test/__snapshots__/fullscreen-mode-close.js.snap} +0 -0
  202. /package/src/components/{visual-editor → layout}/use-padding-appender.js +0 -0
  203. /package/src/components/{header/more-menu → more-menu}/manage-patterns-menu-item.js +0 -0
  204. /package/src/components/{header/more-menu → more-menu}/welcome-guide-menu-item.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_i18n","_components","_element","_editor","_blockEditor","_lockUnlock","ReusableBlocksRenameHint","unlock","blockEditorPrivateApis","InitPatternModal","editPost","useDispatch","editorStore","isModalOpen","setIsModalOpen","useState","syncType","setSyncType","undefined","title","setTitle","postType","isNewPost","useSelect","select","getEditedPostAttribute","isCleanNewPost","useEffect","_react","createElement","Fragment","Modal","__","onRequestClose","overlayClassName","onSubmit","event","preventDefault","meta","wp_pattern_sync_status","__experimentalVStack","spacing","TextControl","label","value","onChange","placeholder","className","__nextHasNoMarginBottom","__next40pxDefaultSize","ToggleControl","_x","help","checked","__experimentalHStack","justify","Button","variant","type","disabled","__experimentalIsFocusable"],"sources":["@wordpress/edit-post/src/components/init-pattern-modal/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tModal,\n\tButton,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tToggleControl,\n\tTextControl,\n} from '@wordpress/components';\nimport { useEffect, useState } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\n\nimport { unlock } from '../../lock-unlock';\n\nconst { ReusableBlocksRenameHint } = unlock( blockEditorPrivateApis );\n\nexport default function InitPatternModal() {\n\tconst { editPost } = useDispatch( editorStore );\n\tconst [ isModalOpen, setIsModalOpen ] = useState( false );\n\tconst [ syncType, setSyncType ] = useState( undefined );\n\tconst [ title, setTitle ] = useState( '' );\n\n\tconst { postType, isNewPost } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, isCleanNewPost } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tpostType: getEditedPostAttribute( 'type' ),\n\t\t\tisNewPost: isCleanNewPost(),\n\t\t};\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tif ( isNewPost && postType === 'wp_block' ) {\n\t\t\tsetIsModalOpen( true );\n\t\t}\n\t\t// We only want the modal to open when the page is first loaded.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [] );\n\n\tif ( postType !== 'wp_block' || ! isNewPost ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ isModalOpen && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ __( 'Create pattern' ) }\n\t\t\t\t\tonRequestClose={ () => {\n\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t} }\n\t\t\t\t\toverlayClassName=\"reusable-blocks-menu-items__convert-modal\"\n\t\t\t\t>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t\t\teditPost( {\n\t\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\t\t\twp_pattern_sync_status: syncType,\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\t\t<VStack spacing=\"5\">\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\t\t\t\tvalue={ title }\n\t\t\t\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\t\t\t\tplaceholder={ __( 'My pattern' ) }\n\t\t\t\t\t\t\t\tclassName=\"patterns-create-modal__name-input\"\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<ReusableBlocksRenameHint />\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t\t\t'Synced',\n\t\t\t\t\t\t\t\t\t'Option that makes an individual pattern synchronized'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t'Sync this pattern across multiple locations.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tchecked={ ! syncType }\n\t\t\t\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\t\t\t\tsetSyncType(\n\t\t\t\t\t\t\t\t\t\t! syncType ? 'unsynced' : undefined\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\t<HStack justify=\"right\">\n\t\t\t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Aa,CAAG;IAClCe,SAAS,EAAC,mCAAmC;IAC7CC,uBAAuB;IACvBC,qBAAqB;EAAA,CACrB,CAAC,EACF,IAAArB,MAAA,CAAAC,aAAA,EAACvB,wBAAwB,MAAE,CAAC,EAC5B,IAAAsB,MAAA,CAAAC,aAAA,EAAC5B,WAAA,CAAAiD,aAAa;IACbP,KAAK,EAAG,IAAAQ,QAAE,EACT,QAAQ,EACR,sDACD,CAAG;IACHC,IAAI,EAAG,IAAApB,QAAE,EACR,8CACD,CAAG;IACHqB,OAAO,EAAG,CAAErC,QAAU;IACtB6B,QAAQ,EAAGA,CAAA,KAAM;MAChB5B,WAAW,CACV,CAAED,QAAQ,GAAG,UAAU,GAAGE,SAC3B,CAAC;IACF;EAAG,CACH,CAAC,EACF,IAAAU,MAAA,CAAAC,aAAA,EAAC5B,WAAA,CAAAqD,oBAAM;IAACC,OAAO,EAAC;EAAO,GACtB,IAAA3B,MAAA,CAAAC,aAAA,EAAC5B,WAAA,CAAAuD,MAAM;IACNC,OAAO,EAAC,SAAS;IACjBC,IAAI,EAAC,QAAQ;IACbC,QAAQ,EAAG,CAAExC,KAAO;IACpByC,yBAAyB;EAAA,GAEvB,IAAA5B,QAAE,EAAE,QAAS,CACR,CACD,CACD,CACH,CACA,CAEP,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_i18n","_components","_element","_editor","_blockEditor","_lockUnlock","_jsxRuntime","ReusableBlocksRenameHint","unlock","blockEditorPrivateApis","InitPatternModal","editPost","useDispatch","editorStore","isModalOpen","setIsModalOpen","useState","syncType","setSyncType","undefined","title","setTitle","postType","isNewPost","useSelect","select","getEditedPostAttribute","isCleanNewPost","useEffect","jsx","Fragment","children","Modal","__","onRequestClose","overlayClassName","onSubmit","event","preventDefault","meta","wp_pattern_sync_status","jsxs","__experimentalVStack","spacing","TextControl","label","value","onChange","placeholder","className","__nextHasNoMarginBottom","__next40pxDefaultSize","ToggleControl","_x","help","checked","__experimentalHStack","justify","Button","variant","type","disabled","__experimentalIsFocusable"],"sources":["@wordpress/edit-post/src/components/init-pattern-modal/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tModal,\n\tButton,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tToggleControl,\n\tTextControl,\n} from '@wordpress/components';\nimport { useEffect, useState } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\n\nimport { unlock } from '../../lock-unlock';\n\nconst { ReusableBlocksRenameHint } = unlock( blockEditorPrivateApis );\n\nexport default function InitPatternModal() {\n\tconst { editPost } = useDispatch( editorStore );\n\tconst [ isModalOpen, setIsModalOpen ] = useState( false );\n\tconst [ syncType, setSyncType ] = useState( undefined );\n\tconst [ title, setTitle ] = useState( '' );\n\n\tconst { postType, isNewPost } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, isCleanNewPost } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tpostType: getEditedPostAttribute( 'type' ),\n\t\t\tisNewPost: isCleanNewPost(),\n\t\t};\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tif ( isNewPost && postType === 'wp_block' ) {\n\t\t\tsetIsModalOpen( true );\n\t\t}\n\t\t// We only want the modal to open when the page is first loaded.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [] );\n\n\tif ( postType !== 'wp_block' || ! isNewPost ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ isModalOpen && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ __( 'Create pattern' ) }\n\t\t\t\t\tonRequestClose={ () => {\n\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t} }\n\t\t\t\t\toverlayClassName=\"reusable-blocks-menu-items__convert-modal\"\n\t\t\t\t>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t\t\teditPost( {\n\t\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\t\t\twp_pattern_sync_status: syncType,\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\t\t<VStack spacing=\"5\">\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\t\t\t\tvalue={ title }\n\t\t\t\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\t\t\t\tplaceholder={ __( 'My pattern' ) }\n\t\t\t\t\t\t\t\tclassName=\"patterns-create-modal__name-input\"\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<ReusableBlocksRenameHint />\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\tlabel={ _x( 'Synced', 'pattern (singular)' ) }\n\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t'Sync this pattern across multiple locations.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tchecked={ ! syncType }\n\t\t\t\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\t\t\t\tsetSyncType(\n\t\t\t\t\t\t\t\t\t\t! syncType ? 'unsynced' : undefined\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\t<HStack justify=\"right\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\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E,EAAE,YAAa,CAAG;YAClCgB,SAAS,EAAC,mCAAmC;YAC7CC,uBAAuB;YACvBC,qBAAqB;UAAA,CACrB,CAAC,eACF,IAAA7C,WAAA,CAAAuB,GAAA,EAACtB,wBAAwB,IAAE,CAAC,eAC5B,IAAAD,WAAA,CAAAuB,GAAA,EAAC5B,WAAA,CAAAmD,aAAa;YACbP,KAAK,EAAG,IAAAQ,QAAE,EAAE,QAAQ,EAAE,oBAAqB,CAAG;YAC9CC,IAAI,EAAG,IAAArB,QAAE,EACR,8CACD,CAAG;YACHsB,OAAO,EAAG,CAAEtC,QAAU;YACtB8B,QAAQ,EAAGA,CAAA,KAAM;cAChB7B,WAAW,CACV,CAAED,QAAQ,GAAG,UAAU,GAAGE,SAC3B,CAAC;YACF;UAAG,CACH,CAAC,eACF,IAAAb,WAAA,CAAAuB,GAAA,EAAC5B,WAAA,CAAAuD,oBAAM;YAACC,OAAO,EAAC,OAAO;YAAA1B,QAAA,eACtB,IAAAzB,WAAA,CAAAuB,GAAA,EAAC5B,WAAA,CAAAyD,MAAM;cACNC,OAAO,EAAC,SAAS;cACjBC,IAAI,EAAC,QAAQ;cACbC,QAAQ,EAAG,CAAEzC,KAAO;cACpB0C,yBAAyB;cAAA/B,QAAA,EAEvB,IAAAE,QAAE,EAAE,QAAS;YAAC,CACT;UAAC,CACF,CAAC;QAAA,CACF;MAAC,CACJ;IAAC,CACD;EACP,CACA,CAAC;AAEL","ignoreList":[]}
@@ -5,34 +5,32 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _react = require("react");
9
8
  var _clsx = _interopRequireDefault(require("clsx"));
10
9
  var _editor = require("@wordpress/editor");
11
10
  var _data = require("@wordpress/data");
12
11
  var _blockEditor = require("@wordpress/block-editor");
13
- var _components = require("@wordpress/components");
14
- var _compose = require("@wordpress/compose");
15
12
  var _plugins = require("@wordpress/plugins");
16
13
  var _i18n = require("@wordpress/i18n");
17
14
  var _element = require("@wordpress/element");
18
- var _keyboardShortcuts = require("@wordpress/keyboard-shortcuts");
19
15
  var _notices = require("@wordpress/notices");
20
16
  var _preferences = require("@wordpress/preferences");
21
17
  var _commands = require("@wordpress/commands");
22
18
  var _coreCommands = require("@wordpress/core-commands");
23
19
  var _blockLibrary = require("@wordpress/block-library");
24
20
  var _url = require("@wordpress/url");
25
- var _textEditor = _interopRequireDefault(require("../text-editor"));
26
- var _visualEditor = _interopRequireDefault(require("../visual-editor"));
27
- var _keyboardShortcuts2 = _interopRequireDefault(require("../keyboard-shortcuts"));
21
+ var _backButton = _interopRequireDefault(require("../back-button"));
22
+ var _keyboardShortcuts = _interopRequireDefault(require("../keyboard-shortcuts"));
28
23
  var _initPatternModal = _interopRequireDefault(require("../init-pattern-modal"));
29
24
  var _browserUrl = _interopRequireDefault(require("../browser-url"));
30
- var _header = _interopRequireDefault(require("../header"));
31
25
  var _metaBoxes = _interopRequireDefault(require("../meta-boxes"));
26
+ var _moreMenu = _interopRequireDefault(require("../more-menu"));
32
27
  var _welcomeGuide = _interopRequireDefault(require("../welcome-guide"));
33
28
  var _store = require("../../store");
34
29
  var _lockUnlock = require("../../lock-unlock");
35
- var _useCommonCommands = _interopRequireDefault(require("../../hooks/commands/use-common-commands"));
30
+ var _useCommands = _interopRequireDefault(require("../../commands/use-commands"));
31
+ var _usePaddingAppender = require("./use-padding-appender");
32
+ var _useShouldIframe = require("./use-should-iframe");
33
+ var _jsxRuntime = require("react/jsx-runtime");
36
34
  /**
37
35
  * External dependencies
38
36
  */
@@ -55,42 +53,44 @@ const {
55
53
  useCommandContext
56
54
  } = (0, _lockUnlock.unlock)(_commands.privateApis);
57
55
  const {
58
- InserterSidebar,
59
- ListViewSidebar,
60
- ComplementaryArea,
56
+ EditorInterface,
61
57
  FullscreenMode,
62
- SavePublishPanels,
63
- InterfaceSkeleton,
64
- interfaceStore,
65
58
  Sidebar
66
59
  } = (0, _lockUnlock.unlock)(_editor.privateApis);
67
60
  const {
68
61
  BlockKeyboardShortcuts
69
62
  } = (0, _lockUnlock.unlock)(_blockLibrary.privateApis);
70
- const interfaceLabels = {
71
- /* translators: accessibility text for the editor top bar landmark region. */
72
- header: (0, _i18n.__)('Editor top bar'),
73
- /* translators: accessibility text for the editor content landmark region. */
74
- body: (0, _i18n.__)('Editor content'),
75
- /* translators: accessibility text for the editor settings landmark region. */
76
- sidebar: (0, _i18n.__)('Editor settings'),
77
- /* translators: accessibility text for the editor publish landmark region. */
78
- actions: (0, _i18n.__)('Editor publish'),
79
- /* translators: accessibility text for the editor footer landmark region. */
80
- footer: (0, _i18n.__)('Editor footer')
81
- };
63
+ const DESIGN_POST_TYPES = ['wp_template', 'wp_template_part', 'wp_block', 'wp_navigation'];
82
64
  function useEditorStyles() {
83
65
  const {
84
66
  hasThemeStyleSupport,
85
- editorSettings
86
- } = (0, _data.useSelect)(select => ({
87
- hasThemeStyleSupport: select(_store.store).isFeatureActive('themeStyles'),
88
- editorSettings: select(_editor.store).getEditorSettings()
89
- }), []);
67
+ editorSettings,
68
+ isZoomedOutView,
69
+ hasMetaBoxes,
70
+ renderingMode,
71
+ postType
72
+ } = (0, _data.useSelect)(select => {
73
+ const {
74
+ __unstableGetEditorMode
75
+ } = select(_blockEditor.store);
76
+ const {
77
+ getCurrentPostType,
78
+ getRenderingMode
79
+ } = select(_editor.store);
80
+ const _postType = getCurrentPostType();
81
+ return {
82
+ hasThemeStyleSupport: select(_store.store).isFeatureActive('themeStyles'),
83
+ editorSettings: select(_editor.store).getEditorSettings(),
84
+ isZoomedOutView: __unstableGetEditorMode() === 'zoom-out',
85
+ hasMetaBoxes: select(_store.store).hasMetaBoxes(),
86
+ renderingMode: getRenderingMode(),
87
+ postType: _postType
88
+ };
89
+ }, []);
90
90
 
91
91
  // Compute the default styles.
92
92
  return (0, _element.useMemo)(() => {
93
- var _editorSettings$style, _editorSettings$style2;
93
+ var _editorSettings$style, _editorSettings$style2, _editorSettings$style3;
94
94
  const presetStyles = (_editorSettings$style = editorSettings.styles?.filter(style => style.__unstableType && style.__unstableType !== 'theme')) !== null && _editorSettings$style !== void 0 ? _editorSettings$style : [];
95
95
  const defaultEditorStyles = [...editorSettings.defaultEditorStyles, ...presetStyles];
96
96
 
@@ -110,92 +110,68 @@ function useEditorStyles() {
110
110
  })
111
111
  });
112
112
  }
113
- return hasThemeStyles ? editorSettings.styles : defaultEditorStyles;
114
- }, [editorSettings.defaultEditorStyles, editorSettings.disableLayoutStyles, editorSettings.styles, hasThemeStyleSupport]);
113
+ const baseStyles = hasThemeStyles ? (_editorSettings$style3 = editorSettings.styles) !== null && _editorSettings$style3 !== void 0 ? _editorSettings$style3 : [] : defaultEditorStyles;
114
+
115
+ // Add a constant padding for the typewriter effect. When typing at the
116
+ // bottom, there needs to be room to scroll up.
117
+ if (!isZoomedOutView && !hasMetaBoxes && renderingMode === 'post-only' && !DESIGN_POST_TYPES.includes(postType)) {
118
+ return [...baseStyles, {
119
+ css: 'body{padding-bottom: 40vh}'
120
+ }];
121
+ }
122
+ return baseStyles;
123
+ }, [editorSettings.defaultEditorStyles, editorSettings.disableLayoutStyles, editorSettings.styles, hasThemeStyleSupport, postType]);
115
124
  }
116
125
  function Layout({
117
126
  initialPost
118
127
  }) {
119
128
  useCommands();
120
- (0, _useCommonCommands.default)();
121
- const isMobileViewport = (0, _compose.useViewportMatch)('medium', '<');
122
- const isWideViewport = (0, _compose.useViewportMatch)('large');
123
- const isLargeViewport = (0, _compose.useViewportMatch)('medium');
124
- const {
125
- closeGeneralSidebar
126
- } = (0, _data.useDispatch)(_store.store);
129
+ (0, _useCommands.default)();
130
+ const paddingAppenderRef = (0, _usePaddingAppender.usePaddingAppender)();
131
+ const shouldIframe = (0, _useShouldIframe.useShouldIframe)();
127
132
  const {
128
133
  createErrorNotice
129
134
  } = (0, _data.useDispatch)(_notices.store);
130
135
  const {
131
136
  mode,
132
137
  isFullscreenActive,
133
- isRichEditingEnabled,
134
- sidebarIsOpened,
135
138
  hasActiveMetaboxes,
136
- previousShortcut,
137
- nextShortcut,
138
139
  hasBlockSelected,
139
- isInserterOpened,
140
- isListViewOpened,
141
140
  showIconLabels,
142
141
  isDistractionFree,
143
- showBlockBreadcrumbs,
144
142
  showMetaBoxes,
145
- documentLabel,
146
143
  hasHistory,
147
- hasBlockBreadcrumbs,
148
- blockEditorMode,
149
- isEditingTemplate
144
+ isEditingTemplate,
145
+ isWelcomeGuideVisible
150
146
  } = (0, _data.useSelect)(select => {
151
147
  const {
152
148
  get
153
149
  } = select(_preferences.store);
154
150
  const {
155
- getEditorSettings,
156
- getPostTypeLabel
151
+ getEditorSettings
157
152
  } = select(_editor.store);
158
- const editorSettings = getEditorSettings();
159
- const postTypeLabel = getPostTypeLabel();
153
+ const {
154
+ isFeatureActive
155
+ } = select(_store.store);
160
156
  return {
161
- showMetaBoxes: select(_editor.store).getRenderingMode() === 'post-only',
162
- sidebarIsOpened: !!(select(interfaceStore).getActiveComplementaryArea('core') || select(_editor.store).isPublishSidebarOpened()),
163
- isFullscreenActive: select(_store.store).isFeatureActive('fullscreenMode'),
164
- isInserterOpened: select(_editor.store).isInserterOpened(),
165
- isListViewOpened: select(_editor.store).isListViewOpened(),
166
157
  mode: select(_editor.store).getEditorMode(),
167
- isRichEditingEnabled: editorSettings.richEditingEnabled,
158
+ isFullscreenActive: select(_store.store).isFeatureActive('fullscreenMode'),
168
159
  hasActiveMetaboxes: select(_store.store).hasMetaBoxes(),
169
- previousShortcut: select(_keyboardShortcuts.store).getAllShortcutKeyCombinations('core/editor/previous-region'),
170
- nextShortcut: select(_keyboardShortcuts.store).getAllShortcutKeyCombinations('core/editor/next-region'),
160
+ hasBlockSelected: !!select(_blockEditor.store).getBlockSelectionStart(),
171
161
  showIconLabels: get('core', 'showIconLabels'),
172
162
  isDistractionFree: get('core', 'distractionFree'),
173
- showBlockBreadcrumbs: get('core', 'showBlockBreadcrumbs'),
174
- // translators: Default label for the Document in the Block Breadcrumb.
175
- documentLabel: postTypeLabel || (0, _i18n._x)('Document', 'noun'),
176
- hasBlockSelected: !!select(_blockEditor.store).getBlockSelectionStart(),
163
+ showMetaBoxes: select(_editor.store).getRenderingMode() === 'post-only',
177
164
  hasHistory: !!getEditorSettings().onNavigateToPreviousEntityRecord,
178
- hasBlockBreadcrumbs: get('core', 'showBlockBreadcrumbs'),
179
- blockEditorMode: select(_blockEditor.store).__unstableGetEditorMode(),
180
- isEditingTemplate: select(_editor.store).getCurrentPostType() === 'wp_template'
165
+ isEditingTemplate: select(_editor.store).getCurrentPostType() === 'wp_template',
166
+ isWelcomeGuideVisible: isFeatureActive('welcomeGuide')
181
167
  };
182
168
  }, []);
183
169
 
184
170
  // Set the right context for the command palette
185
- const commandContext = hasBlockSelected ? 'block-selection-edit' : 'post-editor-edit';
171
+ const commandContext = hasBlockSelected ? 'block-selection-edit' : 'entity-edit';
186
172
  useCommandContext(commandContext);
187
173
  const styles = useEditorStyles();
188
174
 
189
- // Local state for save panel.
190
- // Note 'truthy' callback implies an open panel.
191
- const [entitiesSavedStatesCallback, setEntitiesSavedStatesCallback] = (0, _element.useState)(false);
192
- const closeEntitiesSavedStates = (0, _element.useCallback)(arg => {
193
- if (typeof entitiesSavedStatesCallback === 'function') {
194
- entitiesSavedStatesCallback(arg);
195
- }
196
- setEntitiesSavedStatesCallback(false);
197
- }, [entitiesSavedStatesCallback]);
198
-
199
175
  // We need to add the show-icon-labels class to the body element so it is applied to modals.
200
176
  if (showIconLabels) {
201
177
  document.body.classList.add('show-icon-labels');
@@ -203,25 +179,8 @@ function Layout({
203
179
  document.body.classList.remove('show-icon-labels');
204
180
  }
205
181
  const className = (0, _clsx.default)('edit-post-layout', 'is-mode-' + mode, {
206
- 'is-sidebar-opened': sidebarIsOpened,
207
- 'has-metaboxes': hasActiveMetaboxes,
208
- 'is-distraction-free': isDistractionFree && isWideViewport,
209
- 'is-entity-save-view-open': !!entitiesSavedStatesCallback,
210
- 'has-block-breadcrumbs': hasBlockBreadcrumbs && !isDistractionFree && isWideViewport
182
+ 'has-metaboxes': hasActiveMetaboxes
211
183
  });
212
- const secondarySidebarLabel = isListViewOpened ? (0, _i18n.__)('Document Overview') : (0, _i18n.__)('Block Library');
213
- const secondarySidebar = () => {
214
- if (mode === 'visual' && isInserterOpened) {
215
- return (0, _react.createElement)(InserterSidebar, {
216
- closeGeneralSidebar: closeGeneralSidebar,
217
- isRightSidebarOpen: sidebarIsOpened
218
- });
219
- }
220
- if (mode === 'visual' && isListViewOpened) {
221
- return (0, _react.createElement)(ListViewSidebar, null);
222
- }
223
- return null;
224
- };
225
184
  function onPluginAreaError(name) {
226
185
  createErrorNotice((0, _i18n.sprintf)( /* translators: %s: plugin name */
227
186
  (0, _i18n.__)('The "%s" plugin has encountered an error and cannot be rendered.'), name));
@@ -264,61 +223,40 @@ function Layout({
264
223
  break;
265
224
  }
266
225
  }, [createSuccessNotice]);
267
- return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(FullscreenMode, {
268
- isActive: isFullscreenActive
269
- }), (0, _react.createElement)(_browserUrl.default, {
270
- hasHistory: hasHistory
271
- }), (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)(BlockKeyboardShortcuts, null), (0, _react.createElement)(InterfaceSkeleton, {
272
- isDistractionFree: isDistractionFree && isWideViewport,
273
- className: className,
274
- labels: {
275
- ...interfaceLabels,
276
- secondarySidebar: secondarySidebarLabel
277
- },
278
- header: (0, _react.createElement)(_header.default, {
279
- setEntitiesSavedStatesCallback: setEntitiesSavedStatesCallback,
226
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
227
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(FullscreenMode, {
228
+ isActive: isFullscreenActive
229
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_browserUrl.default, {
230
+ hasHistory: hasHistory
231
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.UnsavedChangesWarning, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.AutosaveMonitor, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.LocalAutosaveMonitor, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_keyboardShortcuts.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.EditorKeyboardShortcutsRegister, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(BlockKeyboardShortcuts, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_welcomeGuide.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_initPatternModal.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_plugins.PluginArea, {
232
+ onError: onPluginAreaError
233
+ }), !isDistractionFree && /*#__PURE__*/(0, _jsxRuntime.jsx)(Sidebar, {
234
+ onActionPerformed: onActionPerformed,
235
+ extraPanels: !isEditingTemplate && /*#__PURE__*/(0, _jsxRuntime.jsx)(_metaBoxes.default, {
236
+ location: "side"
237
+ })
238
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_moreMenu.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_backButton.default, {
280
239
  initialPost: initialPost
281
- }),
282
- editorNotices: (0, _react.createElement)(_editor.EditorNotices, null),
283
- secondarySidebar: secondarySidebar(),
284
- sidebar: !isDistractionFree && (0, _react.createElement)(ComplementaryArea.Slot, {
285
- scope: "core"
286
- }),
287
- notices: (0, _react.createElement)(_editor.EditorSnackbars, null),
288
- content: (0, _react.createElement)(_react.Fragment, null, !isDistractionFree && (0, _react.createElement)(_editor.EditorNotices, null), (mode === 'text' || !isRichEditingEnabled) && (0, _react.createElement)(_textEditor.default, null), !isLargeViewport && (0, _react.createElement)(_blockEditor.BlockToolbar, {
289
- hideDragHandle: true
290
- }), isRichEditingEnabled && mode === 'visual' && (0, _react.createElement)(_visualEditor.default, {
291
- styles: styles
292
- }), !isDistractionFree && showMetaBoxes && (0, _react.createElement)("div", {
293
- className: "edit-post-layout__metaboxes"
294
- }, (0, _react.createElement)(_metaBoxes.default, {
295
- location: "normal"
296
- }), (0, _react.createElement)(_metaBoxes.default, {
297
- location: "advanced"
298
- })), isMobileViewport && sidebarIsOpened && (0, _react.createElement)(_components.ScrollLock, null)),
299
- footer: !isDistractionFree && !isMobileViewport && showBlockBreadcrumbs && isRichEditingEnabled && blockEditorMode !== 'zoom-out' && mode === 'visual' && (0, _react.createElement)("div", {
300
- className: "edit-post-layout__footer"
301
- }, (0, _react.createElement)(_blockEditor.BlockBreadcrumb, {
302
- rootLabelText: documentLabel
303
- })),
304
- actions: (0, _react.createElement)(SavePublishPanels, {
305
- closeEntitiesSavedStates: closeEntitiesSavedStates,
306
- isEntitiesSavedStatesOpen: entitiesSavedStatesCallback,
307
- setEntitiesSavedStatesCallback: setEntitiesSavedStatesCallback,
308
- forceIsDirtyPublishPanel: hasActiveMetaboxes
309
- }),
310
- shortcuts: {
311
- previous: previousShortcut,
312
- next: nextShortcut
313
- }
314
- }), (0, _react.createElement)(_welcomeGuide.default, null), (0, _react.createElement)(_initPatternModal.default, null), (0, _react.createElement)(_plugins.PluginArea, {
315
- onError: onPluginAreaError
316
- }), !isDistractionFree && (0, _react.createElement)(Sidebar, {
317
- onActionPerformed: onActionPerformed,
318
- extraPanels: !isEditingTemplate && (0, _react.createElement)(_metaBoxes.default, {
319
- location: "side"
320
- })
321
- }));
240
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.EditorSnackbars, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(EditorInterface, {
241
+ className: className,
242
+ styles: styles,
243
+ forceIsDirty: hasActiveMetaboxes,
244
+ contentRef: paddingAppenderRef,
245
+ disableIframe: !shouldIframe
246
+ // We should auto-focus the canvas (title) on load.
247
+ // eslint-disable-next-line jsx-a11y/no-autofocus
248
+ ,
249
+ autoFocus: !isWelcomeGuideVisible,
250
+ children: !isDistractionFree && showMetaBoxes && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
251
+ className: "edit-post-layout__metaboxes",
252
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_metaBoxes.default, {
253
+ location: "normal"
254
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_metaBoxes.default, {
255
+ location: "advanced"
256
+ })]
257
+ })
258
+ })]
259
+ });
322
260
  }
323
261
  var _default = exports.default = Layout;
324
262
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_editor","_data","_blockEditor","_components","_compose","_plugins","_i18n","_element","_keyboardShortcuts","_notices","_preferences","_commands","_coreCommands","_blockLibrary","_url","_textEditor","_visualEditor","_keyboardShortcuts2","_initPatternModal","_browserUrl","_header","_metaBoxes","_welcomeGuide","_store","_lockUnlock","_useCommonCommands","getLayoutStyles","unlock","blockEditorPrivateApis","useCommands","coreCommandsPrivateApis","useCommandContext","commandsPrivateApis","InserterSidebar","ListViewSidebar","ComplementaryArea","FullscreenMode","SavePublishPanels","InterfaceSkeleton","interfaceStore","Sidebar","editorPrivateApis","BlockKeyboardShortcuts","blockLibraryPrivateApis","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","initialPost","useCommonCommands","isMobileViewport","useViewportMatch","isWideViewport","isLargeViewport","closeGeneralSidebar","useDispatch","createErrorNotice","noticesStore","mode","isFullscreenActive","isRichEditingEnabled","sidebarIsOpened","hasActiveMetaboxes","previousShortcut","nextShortcut","hasBlockSelected","isInserterOpened","isListViewOpened","showIconLabels","isDistractionFree","showBlockBreadcrumbs","showMetaBoxes","documentLabel","hasHistory","hasBlockBreadcrumbs","blockEditorMode","isEditingTemplate","get","preferencesStore","getPostTypeLabel","postTypeLabel","getRenderingMode","getActiveComplementaryArea","isPublishSidebarOpened","getEditorMode","richEditingEnabled","hasMetaBoxes","keyboardShortcutsStore","getAllShortcutKeyCombinations","_x","blockEditorStore","getBlockSelectionStart","onNavigateToPreviousEntityRecord","__unstableGetEditorMode","getCurrentPostType","commandContext","entitiesSavedStatesCallback","setEntitiesSavedStatesCallback","useState","closeEntitiesSavedStates","useCallback","arg","document","classList","add","remove","className","clsx","secondarySidebarLabel","secondarySidebar","_react","createElement","isRightSidebarOpen","onPluginAreaError","name","sprintf","createSuccessNotice","onActionPerformed","actionId","items","location","href","addQueryArgs","trashed","post_type","type","ids","id","newItem","title","rendered","label","onClick","postId","post","action","Fragment","isActive","default","UnsavedChangesWarning","AutosaveMonitor","LocalAutosaveMonitor","EditorKeyboardShortcutsRegister","EditorKeyboardShortcuts","labels","editorNotices","EditorNotices","Slot","scope","notices","EditorSnackbars","content","BlockToolbar","hideDragHandle","ScrollLock","BlockBreadcrumb","rootLabelText","isEntitiesSavedStatesOpen","forceIsDirtyPublishPanel","shortcuts","previous","next","PluginArea","onError","extraPanels","_default","exports"],"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\t) }\n\t\t</>\n\t);\n}\n\nexport default Layout;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AAWA,IAAAE,KAAA,GAA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AAoB,IACpBe,eAAe,KAAK,UAAU,IAC9BjB,IAAI,KAAK,QAAQ,IAChB,IAAAoD,MAAA,CAAAC,aAAA;MAAKL,SAAS,EAAC;IAA0B,GACxC,IAAAI,MAAA,CAAAC,aAAA,EAAC5I,YAAA,CAAAwL,eAAe;MAACC,aAAa,EAAGpF;IAAe,CAAE,CAC9C,CAEN;IACDtD,OAAO,EACN,IAAA4F,MAAA,CAAAC,aAAA,EAACzG,iBAAiB;MACjB6F,wBAAwB,EAAGA,wBAA0B;MACrD0D,yBAAyB,EACxB7D,2BACA;MACDC,8BAA8B,EAC7BA,8BACA;MACD6D,wBAAwB,EAAGhG;IAAoB,CAC/C,CACD;IACDiG,SAAS,EAAG;MACXC,QAAQ,EAAEjG,gBAAgB;MAC1BkG,IAAI,EAAEjG;IACP;EAAG,CACH,CAAC,EACF,IAAA8C,MAAA,CAAAC,aAAA,EAACxH,aAAA,CAAAmJ,OAAY,MAAE,CAAC,EAChB,IAAA5B,MAAA,CAAAC,aAAA,EAAC5H,iBAAA,CAAAuJ,OAAgB,MAAE,CAAC,EACpB,IAAA5B,MAAA,CAAAC,aAAA,EAACzI,QAAA,CAAA4L,UAAU;IAACC,OAAO,EAAGlD;EAAmB,CAAE,CAAC,EAC1C,CAAE5C,iBAAiB,IACpB,IAAAyC,MAAA,CAAAC,aAAA,EAACtG,OAAO;IACP4G,iBAAiB,EAAGA,iBAAmB;IACvC+C,WAAW,EACV,CAAExF,iBAAiB,IAAI,IAAAkC,MAAA,CAAAC,aAAA,EAACzH,UAAA,CAAAoJ,OAAS;MAAClB,QAAQ,EAAC;IAAM,CAAE;EACnD,CACD,CAED,CAAC;AAEL;AAAC,IAAA6C,QAAA,GAAAC,OAAA,CAAA5B,OAAA,GAEc3F,MAAM","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_editor","_data","_blockEditor","_plugins","_i18n","_element","_notices","_preferences","_commands","_coreCommands","_blockLibrary","_url","_backButton","_keyboardShortcuts","_initPatternModal","_browserUrl","_metaBoxes","_moreMenu","_welcomeGuide","_store","_lockUnlock","_useCommands","_usePaddingAppender","_useShouldIframe","_jsxRuntime","getLayoutStyles","unlock","blockEditorPrivateApis","useCommands","coreCommandsPrivateApis","useCommandContext","commandsPrivateApis","EditorInterface","FullscreenMode","Sidebar","editorPrivateApis","BlockKeyboardShortcuts","blockLibraryPrivateApis","DESIGN_POST_TYPES","useEditorStyles","hasThemeStyleSupport","editorSettings","isZoomedOutView","hasMetaBoxes","renderingMode","postType","useSelect","select","__unstableGetEditorMode","blockEditorStore","getCurrentPostType","getRenderingMode","editorStore","_postType","editPostStore","isFeatureActive","getEditorSettings","useMemo","_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","useEditPostCommands","paddingAppenderRef","usePaddingAppender","shouldIframe","useShouldIframe","createErrorNotice","useDispatch","noticesStore","mode","isFullscreenActive","hasActiveMetaboxes","hasBlockSelected","showIconLabels","isDistractionFree","showMetaBoxes","hasHistory","isEditingTemplate","isWelcomeGuideVisible","get","preferencesStore","getEditorMode","getBlockSelectionStart","onNavigateToPreviousEntityRecord","commandContext","document","body","classList","add","remove","className","clsx","onPluginAreaError","name","sprintf","__","createSuccessNotice","onActionPerformed","useCallback","actionId","items","location","href","addQueryArgs","trashed","post_type","type","ids","id","newItem","title","rendered","actions","label","onClick","postId","post","action","jsxs","Fragment","children","jsx","isActive","default","UnsavedChangesWarning","AutosaveMonitor","LocalAutosaveMonitor","EditorKeyboardShortcutsRegister","PluginArea","onError","extraPanels","EditorSnackbars","forceIsDirty","contentRef","disableIframe","autoFocus","_default","exports"],"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 { 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 typewriter 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\treturn [\n\t\t\t\t...baseStyles,\n\t\t\t\t{\n\t\t\t\t\tcss: 'body{padding-bottom: 40vh}',\n\t\t\t\t},\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\tpostType,\n\t] );\n}\n\nfunction Layout( { initialPost } ) {\n\tuseCommands();\n\tuseEditPostCommands();\n\tconst paddingAppenderRef = usePaddingAppender();\n\tconst shouldIframe = useShouldIframe();\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst {\n\t\tmode,\n\t\tisFullscreenActive,\n\t\thasActiveMetaboxes,\n\t\thasBlockSelected,\n\t\tshowIconLabels,\n\t\tisDistractionFree,\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\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'has-metaboxes': hasActiveMetaboxes,\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":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AASA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAIA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,SAAA,GAAAT,OAAA;AACA,IAAAU,aAAA,GAAAV,OAAA;AACA,IAAAW,aAAA,GAA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,QAAQ,EAAC;QAAU,CAAE,CAAC;MAAA,CAC7B;IACL,CACe,CAAC;EAAA,CACjB,CAAC;AAEL;AAAC,IAAAmC,QAAA,GAAAC,OAAA,CAAAd,OAAA,GAEchE,MAAM","ignoreList":[]}
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _react = require("react");
9
8
  var _reactNative = require("react-native");
10
9
  var _reactNativeSafeArea = _interopRequireDefault(require("react-native-safe-area"));
11
10
  var _element = require("@wordpress/element");
@@ -19,6 +18,7 @@ var _style = _interopRequireDefault(require("./style.scss"));
19
18
  var _style2 = _interopRequireDefault(require("../header/header-toolbar/style.scss"));
20
19
  var _header = _interopRequireDefault(require("../header"));
21
20
  var _visualEditor = _interopRequireDefault(require("../visual-editor"));
21
+ var _jsxRuntime = require("react/jsx-runtime");
22
22
  /**
23
23
  * External dependencies
24
24
  */
@@ -84,7 +84,7 @@ class Layout extends _element.Component {
84
84
  const {
85
85
  globalStyles
86
86
  } = this.props;
87
- return (0, _react.createElement)(_components.HTMLTextInput, {
87
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.HTMLTextInput, {
88
88
  parentHeight: this.state.rootViewHeight,
89
89
  style: globalStyles
90
90
  });
@@ -96,7 +96,7 @@ class Layout extends _element.Component {
96
96
  if (!isReady) {
97
97
  return null;
98
98
  }
99
- return (0, _react.createElement)(_visualEditor.default, {
99
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_visualEditor.default, {
100
100
  setTitleRef: this.props.setTitleRef
101
101
  });
102
102
  }
@@ -121,24 +121,31 @@ class Layout extends _element.Component {
121
121
  const editorStyles = [getStylesFromColorScheme(_style.default.background, _style.default.backgroundDark), globalStyles?.background && {
122
122
  backgroundColor: globalStyles.background
123
123
  }];
124
- return (0, _react.createElement)(_components.Tooltip.Slot, null, (0, _react.createElement)(_reactNative.SafeAreaView, {
125
- style: containerStyles,
126
- onLayout: this.onRootViewLayout
127
- }, (0, _react.createElement)(_editor.AutosaveMonitor, {
128
- disableIntervalChecks: true
129
- }), (0, _react.createElement)(_editor.OfflineStatus, null), (0, _react.createElement)(_reactNative.View, {
130
- style: editorStyles
131
- }, 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
- style: {
133
- flex: 0,
134
- flexBasis: marginBottom,
135
- height: marginBottom
136
- }
137
- }), !isHtmlView && (0, _react.createElement)(_components.KeyboardAvoidingView, {
138
- parentHeight: this.state.rootViewHeight,
139
- style: toolbarKeyboardAvoidingViewStyle,
140
- withAnimatedHeight: true
141
- }, _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)));
124
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Tooltip.Slot, {
125
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.SafeAreaView, {
126
+ style: containerStyles,
127
+ onLayout: this.onRootViewLayout,
128
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.AutosaveMonitor, {
129
+ disableIntervalChecks: true
130
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.OfflineStatus, {}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
131
+ style: editorStyles,
132
+ children: [isHtmlView ? this.renderHTML() : this.renderVisual(), !isHtmlView && _reactNative.Platform.OS === 'android' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.FloatingToolbar, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.NoticeList, {})]
133
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
134
+ style: {
135
+ flex: 0,
136
+ flexBasis: marginBottom,
137
+ height: marginBottom
138
+ }
139
+ }), !isHtmlView && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.KeyboardAvoidingView, {
140
+ parentHeight: this.state.rootViewHeight,
141
+ style: toolbarKeyboardAvoidingViewStyle,
142
+ withAnimatedHeight: true,
143
+ children: [_reactNative.Platform.OS === 'ios' && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
144
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__unstableAutocompletionItemsSlot, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.FloatingToolbar, {})]
145
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_header.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.BottomSheetSettings, {})]
146
+ }), _reactNative.Platform.OS === 'android' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__unstableAutocompletionItemsSlot, {})]
147
+ })
148
+ });
142
149
  }
143
150
  }
144
151
  var _default = exports.default = (0, _compose.compose)([(0, _data.withSelect)(select => {