@wordpress/edit-post 7.34.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 (252) hide show
  1. package/CHANGELOG.md +15 -2
  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} +18 -16
  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 +134 -156
  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/{visual-editor → layout}/use-padding-appender.js +6 -1
  19. package/build/components/layout/use-padding-appender.js.map +1 -0
  20. package/build/components/layout/use-should-iframe.js +46 -0
  21. package/build/components/layout/use-should-iframe.js.map +1 -0
  22. package/build/components/meta-boxes/index.js +10 -9
  23. package/build/components/meta-boxes/index.js.map +1 -1
  24. package/build/components/meta-boxes/meta-boxes-area/index.js +13 -13
  25. package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  26. package/build/components/more-menu/index.js +49 -0
  27. package/build/components/more-menu/index.js.map +1 -0
  28. package/build/components/{header/more-menu → more-menu}/manage-patterns-menu-item.js +6 -5
  29. package/build/components/more-menu/manage-patterns-menu-item.js.map +1 -0
  30. package/build/components/{header/more-menu → more-menu}/welcome-guide-menu-item.js +2 -2
  31. package/build/components/more-menu/welcome-guide-menu-item.js.map +1 -0
  32. package/build/components/preferences-modal/enable-custom-fields.js +23 -18
  33. package/build/components/preferences-modal/enable-custom-fields.js.map +1 -1
  34. package/build/components/preferences-modal/index.js +4 -4
  35. package/build/components/preferences-modal/index.js.map +1 -1
  36. package/build/components/preferences-modal/meta-boxes-section.js +13 -13
  37. package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
  38. package/build/components/visual-editor/header.native.js +11 -10
  39. package/build/components/visual-editor/header.native.js.map +1 -1
  40. package/build/components/visual-editor/index.native.js +3 -3
  41. package/build/components/visual-editor/index.native.js.map +1 -1
  42. package/build/components/welcome-guide/default.js +50 -33
  43. package/build/components/welcome-guide/default.js.map +1 -1
  44. package/build/components/welcome-guide/image.js +13 -12
  45. package/build/components/welcome-guide/image.js.map +1 -1
  46. package/build/components/welcome-guide/index.js +2 -2
  47. package/build/components/welcome-guide/index.js.map +1 -1
  48. package/build/components/welcome-guide/template.js +12 -8
  49. package/build/components/welcome-guide/template.js.map +1 -1
  50. package/build/deprecated.js +9 -9
  51. package/build/deprecated.js.map +1 -1
  52. package/build/editor.js +16 -11
  53. package/build/editor.js.map +1 -1
  54. package/build/editor.native.js +18 -12
  55. package/build/editor.native.js.map +1 -1
  56. package/build/index.js +12 -13
  57. package/build/index.js.map +1 -1
  58. package/build/index.native.js +2 -2
  59. package/build/index.native.js.map +1 -1
  60. package/build/store/selectors.js +1 -1
  61. package/build/store/selectors.js.map +1 -1
  62. package/build-module/commands/use-commands.js +49 -0
  63. package/build-module/commands/use-commands.js.map +1 -0
  64. package/build-module/components/{header/fullscreen-mode-close/index.js → back-button/fullscreen-mode-close.js} +18 -16
  65. package/build-module/components/back-button/fullscreen-mode-close.js.map +1 -0
  66. package/build-module/components/back-button/index.js +49 -0
  67. package/build-module/components/back-button/index.js.map +1 -0
  68. package/build-module/components/header/header-toolbar/index.native.js +64 -62
  69. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  70. package/build-module/components/header/index.native.js +2 -2
  71. package/build-module/components/header/index.native.js.map +1 -1
  72. package/build-module/components/init-pattern-modal/index.js +52 -43
  73. package/build-module/components/init-pattern-modal/index.js.map +1 -1
  74. package/build-module/components/layout/index.js +139 -159
  75. package/build-module/components/layout/index.js.map +1 -1
  76. package/build-module/components/layout/index.native.js +30 -21
  77. package/build-module/components/layout/index.native.js.map +1 -1
  78. package/build-module/components/{visual-editor → layout}/use-padding-appender.js +6 -1
  79. package/build-module/components/layout/use-padding-appender.js.map +1 -0
  80. package/build-module/components/layout/use-should-iframe.js +39 -0
  81. package/build-module/components/layout/use-should-iframe.js.map +1 -0
  82. package/build-module/components/meta-boxes/index.js +12 -9
  83. package/build-module/components/meta-boxes/index.js.map +1 -1
  84. package/build-module/components/meta-boxes/meta-boxes-area/index.js +13 -11
  85. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  86. package/build-module/components/more-menu/index.js +43 -0
  87. package/build-module/components/more-menu/index.js.map +1 -0
  88. package/build-module/components/{header/more-menu → more-menu}/manage-patterns-menu-item.js +6 -5
  89. package/build-module/components/more-menu/manage-patterns-menu-item.js.map +1 -0
  90. package/build-module/components/{header/more-menu → more-menu}/welcome-guide-menu-item.js +2 -2
  91. package/build-module/components/more-menu/welcome-guide-menu-item.js.map +1 -0
  92. package/build-module/components/preferences-modal/enable-custom-fields.js +25 -18
  93. package/build-module/components/preferences-modal/enable-custom-fields.js.map +1 -1
  94. package/build-module/components/preferences-modal/index.js +4 -4
  95. package/build-module/components/preferences-modal/index.js.map +1 -1
  96. package/build-module/components/preferences-modal/meta-boxes-section.js +14 -13
  97. package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
  98. package/build-module/components/visual-editor/header.native.js +11 -10
  99. package/build-module/components/visual-editor/header.native.js.map +1 -1
  100. package/build-module/components/visual-editor/index.native.js +3 -3
  101. package/build-module/components/visual-editor/index.native.js.map +1 -1
  102. package/build-module/components/welcome-guide/default.js +52 -33
  103. package/build-module/components/welcome-guide/default.js.map +1 -1
  104. package/build-module/components/welcome-guide/image.js +14 -12
  105. package/build-module/components/welcome-guide/image.js.map +1 -1
  106. package/build-module/components/welcome-guide/index.js +2 -2
  107. package/build-module/components/welcome-guide/index.js.map +1 -1
  108. package/build-module/components/welcome-guide/template.js +14 -8
  109. package/build-module/components/welcome-guide/template.js.map +1 -1
  110. package/build-module/deprecated.js +9 -9
  111. package/build-module/deprecated.js.map +1 -1
  112. package/build-module/editor.js +17 -11
  113. package/build-module/editor.js.map +1 -1
  114. package/build-module/editor.native.js +18 -12
  115. package/build-module/editor.native.js.map +1 -1
  116. package/build-module/index.js +10 -7
  117. package/build-module/index.js.map +1 -1
  118. package/build-module/index.native.js +2 -2
  119. package/build-module/index.native.js.map +1 -1
  120. package/build-module/store/selectors.js +1 -1
  121. package/build-module/store/selectors.js.map +1 -1
  122. package/build-style/style-rtl.css +31 -392
  123. package/build-style/style.css +31 -392
  124. package/package.json +33 -33
  125. package/src/commands/use-commands.js +48 -0
  126. package/src/components/{header/fullscreen-mode-close/index.js → back-button/fullscreen-mode-close.js} +3 -3
  127. package/src/components/back-button/index.js +34 -0
  128. package/src/components/{header/fullscreen-mode-close → back-button}/style.scss +16 -2
  129. package/src/components/{header/fullscreen-mode-close/test/index.js → back-button/test/fullscreen-mode-close.js} +1 -1
  130. package/src/components/layout/index.js +151 -207
  131. package/src/components/layout/style.scss +9 -17
  132. package/src/components/{visual-editor → layout}/use-padding-appender.js +7 -1
  133. package/src/components/layout/use-should-iframe.js +40 -0
  134. package/src/components/meta-boxes/meta-boxes-area/index.js +4 -8
  135. package/src/components/{header/more-menu → more-menu}/index.js +2 -2
  136. package/src/components/{header/more-menu → more-menu}/manage-patterns-menu-item.js +1 -1
  137. package/src/index.js +11 -6
  138. package/src/store/selectors.js +8 -5
  139. package/src/style.scss +3 -10
  140. package/src/test/__snapshots__/editor.native.js.snap +72 -0
  141. package/src/test/editor.native.js +77 -0
  142. package/build/components/header/fullscreen-mode-close/index.js.map +0 -1
  143. package/build/components/header/index.js +0 -158
  144. package/build/components/header/index.js.map +0 -1
  145. package/build/components/header/main-dashboard-button/index.js +0 -33
  146. package/build/components/header/main-dashboard-button/index.js.map +0 -1
  147. package/build/components/header/more-menu/index.js +0 -43
  148. package/build/components/header/more-menu/index.js.map +0 -1
  149. package/build/components/header/more-menu/manage-patterns-menu-item.js.map +0 -1
  150. package/build/components/header/more-menu/welcome-guide-menu-item.js.map +0 -1
  151. package/build/components/sidebar/post-format/index.js +0 -21
  152. package/build/components/sidebar/post-format/index.js.map +0 -1
  153. package/build/components/sidebar/post-pending-status/index.js +0 -26
  154. package/build/components/sidebar/post-pending-status/index.js.map +0 -1
  155. package/build/components/sidebar/post-slug/index.js +0 -21
  156. package/build/components/sidebar/post-slug/index.js.map +0 -1
  157. package/build/components/sidebar/post-status/index.js +0 -92
  158. package/build/components/sidebar/post-status/index.js.map +0 -1
  159. package/build/components/sidebar/post-sticky/index.js +0 -26
  160. package/build/components/sidebar/post-sticky/index.js.map +0 -1
  161. package/build/components/sidebar/post-trash/index.js +0 -16
  162. package/build/components/sidebar/post-trash/index.js.map +0 -1
  163. package/build/components/sidebar/post-visibility/index.js +0 -78
  164. package/build/components/sidebar/post-visibility/index.js.map +0 -1
  165. package/build/components/sidebar/settings-header/index.js +0 -53
  166. package/build/components/sidebar/settings-header/index.js.map +0 -1
  167. package/build/components/sidebar/settings-sidebar/index.js +0 -193
  168. package/build/components/sidebar/settings-sidebar/index.js.map +0 -1
  169. package/build/components/text-editor/index.js +0 -61
  170. package/build/components/text-editor/index.js.map +0 -1
  171. package/build/components/visual-editor/block-inspector-button.js +0 -55
  172. package/build/components/visual-editor/block-inspector-button.js.map +0 -1
  173. package/build/components/visual-editor/index.js +0 -92
  174. package/build/components/visual-editor/index.js.map +0 -1
  175. package/build/components/visual-editor/use-padding-appender.js.map +0 -1
  176. package/build/hooks/commands/use-common-commands.js +0 -119
  177. package/build/hooks/commands/use-common-commands.js.map +0 -1
  178. package/build/hooks/components/index.js +0 -11
  179. package/build/hooks/components/index.js.map +0 -1
  180. package/build/hooks/index.js +0 -5
  181. package/build/hooks/index.js.map +0 -1
  182. package/build/hooks/validate-multiple-use/index.js +0 -134
  183. package/build/hooks/validate-multiple-use/index.js.map +0 -1
  184. package/build-module/components/header/fullscreen-mode-close/index.js.map +0 -1
  185. package/build-module/components/header/index.js +0 -150
  186. package/build-module/components/header/index.js.map +0 -1
  187. package/build-module/components/header/main-dashboard-button/index.js +0 -26
  188. package/build-module/components/header/main-dashboard-button/index.js.map +0 -1
  189. package/build-module/components/header/more-menu/index.js +0 -35
  190. package/build-module/components/header/more-menu/index.js.map +0 -1
  191. package/build-module/components/header/more-menu/manage-patterns-menu-item.js.map +0 -1
  192. package/build-module/components/header/more-menu/welcome-guide-menu-item.js.map +0 -1
  193. package/build-module/components/sidebar/post-format/index.js +0 -13
  194. package/build-module/components/sidebar/post-format/index.js.map +0 -1
  195. package/build-module/components/sidebar/post-pending-status/index.js +0 -18
  196. package/build-module/components/sidebar/post-pending-status/index.js.map +0 -1
  197. package/build-module/components/sidebar/post-slug/index.js +0 -13
  198. package/build-module/components/sidebar/post-slug/index.js.map +0 -1
  199. package/build-module/components/sidebar/post-status/index.js +0 -84
  200. package/build-module/components/sidebar/post-status/index.js.map +0 -1
  201. package/build-module/components/sidebar/post-sticky/index.js +0 -18
  202. package/build-module/components/sidebar/post-sticky/index.js.map +0 -1
  203. package/build-module/components/sidebar/post-trash/index.js +0 -9
  204. package/build-module/components/sidebar/post-trash/index.js.map +0 -1
  205. package/build-module/components/sidebar/post-visibility/index.js +0 -70
  206. package/build-module/components/sidebar/post-visibility/index.js.map +0 -1
  207. package/build-module/components/sidebar/settings-header/index.js +0 -46
  208. package/build-module/components/sidebar/settings-header/index.js.map +0 -1
  209. package/build-module/components/sidebar/settings-sidebar/index.js +0 -185
  210. package/build-module/components/sidebar/settings-sidebar/index.js.map +0 -1
  211. package/build-module/components/text-editor/index.js +0 -54
  212. package/build-module/components/text-editor/index.js.map +0 -1
  213. package/build-module/components/visual-editor/block-inspector-button.js +0 -47
  214. package/build-module/components/visual-editor/block-inspector-button.js.map +0 -1
  215. package/build-module/components/visual-editor/index.js +0 -84
  216. package/build-module/components/visual-editor/index.js.map +0 -1
  217. package/build-module/components/visual-editor/use-padding-appender.js.map +0 -1
  218. package/build-module/hooks/commands/use-common-commands.js +0 -112
  219. package/build-module/hooks/commands/use-common-commands.js.map +0 -1
  220. package/build-module/hooks/components/index.js +0 -8
  221. package/build-module/hooks/components/index.js.map +0 -1
  222. package/build-module/hooks/index.js +0 -6
  223. package/build-module/hooks/index.js.map +0 -1
  224. package/build-module/hooks/validate-multiple-use/index.js +0 -132
  225. package/build-module/hooks/validate-multiple-use/index.js.map +0 -1
  226. package/src/components/header/index.js +0 -156
  227. package/src/components/header/main-dashboard-button/index.js +0 -28
  228. package/src/components/header/style.scss +0 -251
  229. package/src/components/sidebar/post-format/index.js +0 -20
  230. package/src/components/sidebar/post-format/style.scss +0 -5
  231. package/src/components/sidebar/post-pending-status/index.js +0 -27
  232. package/src/components/sidebar/post-slug/index.js +0 -17
  233. package/src/components/sidebar/post-slug/style.scss +0 -5
  234. package/src/components/sidebar/post-status/index.js +0 -128
  235. package/src/components/sidebar/post-sticky/index.js +0 -27
  236. package/src/components/sidebar/post-trash/index.js +0 -12
  237. package/src/components/sidebar/post-visibility/index.js +0 -88
  238. package/src/components/sidebar/post-visibility/style.scss +0 -5
  239. package/src/components/sidebar/settings-header/index.js +0 -49
  240. package/src/components/sidebar/settings-sidebar/index.js +0 -247
  241. package/src/components/sidebar/style.scss +0 -18
  242. package/src/components/text-editor/index.js +0 -63
  243. package/src/components/text-editor/style.scss +0 -71
  244. package/src/components/visual-editor/block-inspector-button.js +0 -59
  245. package/src/components/visual-editor/index.js +0 -101
  246. package/src/components/visual-editor/style.scss +0 -53
  247. package/src/hooks/commands/use-common-commands.js +0 -126
  248. package/src/hooks/components/index.js +0 -13
  249. package/src/hooks/index.js +0 -5
  250. package/src/hooks/validate-multiple-use/index.js +0 -163
  251. /package/src/components/{header/fullscreen-mode-close/test/__snapshots__/index.js.snap → back-button/test/__snapshots__/fullscreen-mode-close.js.snap} +0 -0
  252. /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
  * WordPress dependencies
4
3
  */
@@ -11,25 +10,32 @@ import { __ } from '@wordpress/i18n';
11
10
  */
12
11
  import WelcomeGuideImage from './image';
13
12
  import { store as editPostStore } from '../../store';
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { Fragment as _Fragment } from "react/jsx-runtime";
15
+ import { jsxs as _jsxs } from "react/jsx-runtime";
14
16
  export default function WelcomeGuideTemplate() {
15
17
  const {
16
18
  toggleFeature
17
19
  } = useDispatch(editPostStore);
18
- return createElement(Guide, {
20
+ return /*#__PURE__*/_jsx(Guide, {
19
21
  className: "edit-template-welcome-guide",
20
22
  contentLabel: __('Welcome to the template editor'),
21
23
  finishButtonText: __('Get started'),
22
24
  onFinish: () => toggleFeature('welcomeGuideTemplate'),
23
25
  pages: [{
24
- image: createElement(WelcomeGuideImage, {
26
+ image: /*#__PURE__*/_jsx(WelcomeGuideImage, {
25
27
  nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-template-editor.svg",
26
28
  animatedSrc: "https://s.w.org/images/block-editor/welcome-template-editor.gif"
27
29
  }),
28
- content: createElement(Fragment, null, createElement("h1", {
29
- className: "edit-post-welcome-guide__heading"
30
- }, __('Welcome to the template editor')), createElement("p", {
31
- className: "edit-post-welcome-guide__text"
32
- }, __('Templates help define the layout of the site. You can customize all aspects of your posts and pages using blocks and patterns in this editor.')))
30
+ content: /*#__PURE__*/_jsxs(_Fragment, {
31
+ children: [/*#__PURE__*/_jsx("h1", {
32
+ className: "edit-post-welcome-guide__heading",
33
+ children: __('Welcome to the template editor')
34
+ }), /*#__PURE__*/_jsx("p", {
35
+ className: "edit-post-welcome-guide__text",
36
+ children: __('Templates help define the layout of the site. You can customize all aspects of your posts and pages using blocks and patterns in this editor.')
37
+ })]
38
+ })
33
39
  }]
34
40
  });
35
41
  }
@@ -1 +1 @@
1
- {"version":3,"names":["useDispatch","Guide","__","WelcomeGuideImage","store","editPostStore","WelcomeGuideTemplate","toggleFeature","createElement","className","contentLabel","finishButtonText","onFinish","pages","image","nonAnimatedSrc","animatedSrc","content","Fragment"],"sources":["@wordpress/edit-post/src/components/welcome-guide/template.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport WelcomeGuideImage from './image';\nimport { store as editPostStore } from '../../store';\n\nexport default function WelcomeGuideTemplate() {\n\tconst { toggleFeature } = useDispatch( editPostStore );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-template-welcome-guide\"\n\t\t\tcontentLabel={ __( 'Welcome to the template editor' ) }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () => toggleFeature( 'welcomeGuideTemplate' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-template-editor.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-template-editor.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-post-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Welcome to the template editor' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-post-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Templates help define the layout of the site. You can customize all aspects of your posts and pages using blocks and patterns in this editor.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t] }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,iBAAiB,MAAM,SAAS;AACvC,SAASC,KAAK,IAAIC,aAAa,QAAQ,aAAa;AAEpD,eAAe,SAASC,oBAAoBA,CAAA,EAAG;EAC9C,MAAM;IAAEC;EAAc,CAAC,GAAGP,WAAW,CAAEK,aAAc,CAAC;EAEtD,OACCG,aAAA,CAACP,KAAK;IACLQ,SAAS,EAAC,6BAA6B;IACvCC,YAAY,EAAGR,EAAE,CAAE,gCAAiC,CAAG;IACvDS,gBAAgB,EAAGT,EAAE,CAAE,aAAc,CAAG;IACxCU,QAAQ,EAAGA,CAAA,KAAML,aAAa,CAAE,sBAAuB,CAAG;IAC1DM,KAAK,EAAG,CACP;MACCC,KAAK,EACJN,aAAA,CAACL,iBAAiB;QACjBY,cAAc,EAAC,iEAAiE;QAChFC,WAAW,EAAC;MAAiE,CAC7E,CACD;MACDC,OAAO,EACNT,aAAA,CAAAU,QAAA,QACCV,aAAA;QAAIC,SAAS,EAAC;MAAkC,GAC7CP,EAAE,CAAE,gCAAiC,CACpC,CAAC,EACLM,aAAA;QAAGC,SAAS,EAAC;MAA+B,GACzCP,EAAE,CACH,+IACD,CACE,CACF;IAEJ,CAAC;EACC,CACH,CAAC;AAEJ","ignoreList":[]}
1
+ {"version":3,"names":["useDispatch","Guide","__","WelcomeGuideImage","store","editPostStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","WelcomeGuideTemplate","toggleFeature","className","contentLabel","finishButtonText","onFinish","pages","image","nonAnimatedSrc","animatedSrc","content","children"],"sources":["@wordpress/edit-post/src/components/welcome-guide/template.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport WelcomeGuideImage from './image';\nimport { store as editPostStore } from '../../store';\n\nexport default function WelcomeGuideTemplate() {\n\tconst { toggleFeature } = useDispatch( editPostStore );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-template-welcome-guide\"\n\t\t\tcontentLabel={ __( 'Welcome to the template editor' ) }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () => toggleFeature( 'welcomeGuideTemplate' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-template-editor.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-template-editor.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-post-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Welcome to the template editor' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-post-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Templates help define the layout of the site. You can customize all aspects of your posts and pages using blocks and patterns in this editor.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t] }\n\t\t/>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,iBAAiB,MAAM,SAAS;AACvC,SAASC,KAAK,IAAIC,aAAa,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAErD,eAAe,SAASC,oBAAoBA,CAAA,EAAG;EAC9C,MAAM;IAAEC;EAAc,CAAC,GAAGb,WAAW,CAAEK,aAAc,CAAC;EAEtD,oBACCE,IAAA,CAACN,KAAK;IACLa,SAAS,EAAC,6BAA6B;IACvCC,YAAY,EAAGb,EAAE,CAAE,gCAAiC,CAAG;IACvDc,gBAAgB,EAAGd,EAAE,CAAE,aAAc,CAAG;IACxCe,QAAQ,EAAGA,CAAA,KAAMJ,aAAa,CAAE,sBAAuB,CAAG;IAC1DK,KAAK,EAAG,CACP;MACCC,KAAK,eACJZ,IAAA,CAACJ,iBAAiB;QACjBiB,cAAc,EAAC,iEAAiE;QAChFC,WAAW,EAAC;MAAiE,CAC7E,CACD;MACDC,OAAO,eACNX,KAAA,CAAAF,SAAA;QAAAc,QAAA,gBACChB,IAAA;UAAIO,SAAS,EAAC,kCAAkC;UAAAS,QAAA,EAC7CrB,EAAE,CAAE,gCAAiC;QAAC,CACrC,CAAC,eACLK,IAAA;UAAGO,SAAS,EAAC,+BAA+B;UAAAS,QAAA,EACzCrB,EAAE,CACH,+IACD;QAAC,CACC,CAAC;MAAA,CACH;IAEJ,CAAC;EACC,CACH,CAAC;AAEJ","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -9,6 +8,7 @@ import deprecated from '@wordpress/deprecated';
9
8
  * Internal dependencies
10
9
  */
11
10
  import { unlock } from './lock-unlock';
11
+ import { jsx as _jsx } from "react/jsx-runtime";
12
12
  const {
13
13
  PluginPostExcerpt
14
14
  } = unlock(editorPrivateApis);
@@ -25,7 +25,7 @@ const deprecateSlot = name => {
25
25
  */
26
26
  export function PluginBlockSettingsMenuItem(props) {
27
27
  deprecateSlot('PluginBlockSettingsMenuItem');
28
- return createElement(EditorPluginBlockSettingsMenuItem, {
28
+ return /*#__PURE__*/_jsx(EditorPluginBlockSettingsMenuItem, {
29
29
  ...props
30
30
  });
31
31
  }
@@ -35,7 +35,7 @@ export function PluginBlockSettingsMenuItem(props) {
35
35
  */
36
36
  export function PluginDocumentSettingPanel(props) {
37
37
  deprecateSlot('PluginDocumentSettingPanel');
38
- return createElement(EditorPluginDocumentSettingPanel, {
38
+ return /*#__PURE__*/_jsx(EditorPluginDocumentSettingPanel, {
39
39
  ...props
40
40
  });
41
41
  }
@@ -45,7 +45,7 @@ export function PluginDocumentSettingPanel(props) {
45
45
  */
46
46
  export function PluginMoreMenuItem(props) {
47
47
  deprecateSlot('PluginMoreMenuItem');
48
- return createElement(EditorPluginMoreMenuItem, {
48
+ return /*#__PURE__*/_jsx(EditorPluginMoreMenuItem, {
49
49
  ...props
50
50
  });
51
51
  }
@@ -55,7 +55,7 @@ export function PluginMoreMenuItem(props) {
55
55
  */
56
56
  export function PluginPrePublishPanel(props) {
57
57
  deprecateSlot('PluginPrePublishPanel');
58
- return createElement(EditorPluginPrePublishPanel, {
58
+ return /*#__PURE__*/_jsx(EditorPluginPrePublishPanel, {
59
59
  ...props
60
60
  });
61
61
  }
@@ -65,7 +65,7 @@ export function PluginPrePublishPanel(props) {
65
65
  */
66
66
  export function PluginPostPublishPanel(props) {
67
67
  deprecateSlot('PluginPostPublishPanel');
68
- return createElement(EditorPluginPostPublishPanel, {
68
+ return /*#__PURE__*/_jsx(EditorPluginPostPublishPanel, {
69
69
  ...props
70
70
  });
71
71
  }
@@ -75,7 +75,7 @@ export function PluginPostPublishPanel(props) {
75
75
  */
76
76
  export function PluginPostStatusInfo(props) {
77
77
  deprecateSlot('PluginPostStatusInfo');
78
- return createElement(EditorPluginPostStatusInfo, {
78
+ return /*#__PURE__*/_jsx(EditorPluginPostStatusInfo, {
79
79
  ...props
80
80
  });
81
81
  }
@@ -85,7 +85,7 @@ export function PluginPostStatusInfo(props) {
85
85
  */
86
86
  export function PluginSidebar(props) {
87
87
  deprecateSlot('PluginSidebar');
88
- return createElement(EditorPluginSidebar, {
88
+ return /*#__PURE__*/_jsx(EditorPluginSidebar, {
89
89
  ...props
90
90
  });
91
91
  }
@@ -95,7 +95,7 @@ export function PluginSidebar(props) {
95
95
  */
96
96
  export function PluginSidebarMoreMenuItem(props) {
97
97
  deprecateSlot('PluginSidebarMoreMenuItem');
98
- return createElement(EditorPluginSidebarMoreMenuItem, {
98
+ return /*#__PURE__*/_jsx(EditorPluginSidebarMoreMenuItem, {
99
99
  ...props
100
100
  });
101
101
  }
@@ -1 +1 @@
1
- {"version":3,"names":["privateApis","editorPrivateApis","PluginBlockSettingsMenuItem","EditorPluginBlockSettingsMenuItem","PluginDocumentSettingPanel","EditorPluginDocumentSettingPanel","PluginMoreMenuItem","EditorPluginMoreMenuItem","PluginPrePublishPanel","EditorPluginPrePublishPanel","PluginPostPublishPanel","EditorPluginPostPublishPanel","PluginPostStatusInfo","EditorPluginPostStatusInfo","PluginSidebar","EditorPluginSidebar","PluginSidebarMoreMenuItem","EditorPluginSidebarMoreMenuItem","deprecated","unlock","PluginPostExcerpt","deprecateSlot","name","since","alternative","props","createElement","__experimentalPluginPostExcerpt","hint","link"],"sources":["@wordpress/edit-post/src/deprecated.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as editorPrivateApis,\n\tPluginBlockSettingsMenuItem as EditorPluginBlockSettingsMenuItem,\n\tPluginDocumentSettingPanel as EditorPluginDocumentSettingPanel,\n\tPluginMoreMenuItem as EditorPluginMoreMenuItem,\n\tPluginPrePublishPanel as EditorPluginPrePublishPanel,\n\tPluginPostPublishPanel as EditorPluginPostPublishPanel,\n\tPluginPostStatusInfo as EditorPluginPostStatusInfo,\n\tPluginSidebar as EditorPluginSidebar,\n\tPluginSidebarMoreMenuItem as EditorPluginSidebarMoreMenuItem,\n} from '@wordpress/editor';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from './lock-unlock';\nconst { PluginPostExcerpt } = unlock( editorPrivateApis );\n\nconst deprecateSlot = ( name ) => {\n\tdeprecated( `wp.editPost.${ name }`, {\n\t\tsince: '6.6',\n\t\talternative: `wp.editor.${ name }`,\n\t} );\n};\n\n/* eslint-disable jsdoc/require-param */\n/**\n * @see PluginBlockSettingsMenuItem in @wordpress/editor package.\n */\nexport function PluginBlockSettingsMenuItem( props ) {\n\tdeprecateSlot( 'PluginBlockSettingsMenuItem' );\n\treturn <EditorPluginBlockSettingsMenuItem { ...props } />;\n}\n\n/**\n * @see PluginDocumentSettingPanel in @wordpress/editor package.\n */\nexport function PluginDocumentSettingPanel( props ) {\n\tdeprecateSlot( 'PluginDocumentSettingPanel' );\n\treturn <EditorPluginDocumentSettingPanel { ...props } />;\n}\n\n/**\n * @see PluginMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginMoreMenuItem( props ) {\n\tdeprecateSlot( 'PluginMoreMenuItem' );\n\treturn <EditorPluginMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPrePublishPanel in @wordpress/editor package.\n */\nexport function PluginPrePublishPanel( props ) {\n\tdeprecateSlot( 'PluginPrePublishPanel' );\n\treturn <EditorPluginPrePublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostPublishPanel in @wordpress/editor package.\n */\nexport function PluginPostPublishPanel( props ) {\n\tdeprecateSlot( 'PluginPostPublishPanel' );\n\treturn <EditorPluginPostPublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostStatusInfo in @wordpress/editor package.\n */\nexport function PluginPostStatusInfo( props ) {\n\tdeprecateSlot( 'PluginPostStatusInfo' );\n\treturn <EditorPluginPostStatusInfo { ...props } />;\n}\n\n/**\n * @see PluginSidebar in @wordpress/editor package.\n */\nexport function PluginSidebar( props ) {\n\tdeprecateSlot( 'PluginSidebar' );\n\treturn <EditorPluginSidebar { ...props } />;\n}\n\n/**\n * @see PluginSidebarMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginSidebarMoreMenuItem( props ) {\n\tdeprecateSlot( 'PluginSidebarMoreMenuItem' );\n\treturn <EditorPluginSidebarMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPostExcerpt in @wordpress/editor package.\n */\nexport function __experimentalPluginPostExcerpt() {\n\tdeprecated( 'wp.editPost.__experimentalPluginPostExcerpt', {\n\t\tsince: '6.6',\n\t\thint: 'Core and custom panels can be access programmatically using their panel name.',\n\t\tlink: 'https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically',\n\t} );\n\treturn PluginPostExcerpt;\n}\n\n/* eslint-enable jsdoc/require-param */\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,WAAW,IAAIC,iBAAiB,EAChCC,2BAA2B,IAAIC,iCAAiC,EAChEC,0BAA0B,IAAIC,gCAAgC,EAC9DC,kBAAkB,IAAIC,wBAAwB,EAC9CC,qBAAqB,IAAIC,2BAA2B,EACpDC,sBAAsB,IAAIC,4BAA4B,EACtDC,oBAAoB,IAAIC,0BAA0B,EAClDC,aAAa,IAAIC,mBAAmB,EACpCC,yBAAyB,IAAIC,+BAA+B,QACtD,mBAAmB;AAC1B,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA,SAASC,MAAM,QAAQ,eAAe;AACtC,MAAM;EAAEC;AAAkB,CAAC,GAAGD,MAAM,CAAElB,iBAAkB,CAAC;AAEzD,MAAMoB,aAAa,GAAKC,IAAI,IAAM;EACjCJ,UAAU,CAAG,eAAeI,IAAM,EAAC,EAAE;IACpCC,KAAK,EAAE,KAAK;IACZC,WAAW,EAAG,aAAaF,IAAM;EAClC,CAAE,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,SAASpB,2BAA2BA,CAAEuB,KAAK,EAAG;EACpDJ,aAAa,CAAE,6BAA8B,CAAC;EAC9C,OAAOK,aAAA,CAACvB,i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,CAAC;AACxD;;AAEA;AACA;AACA;AACA,OAAO,SAASE,+BAA+BA,CAAA,EAAG;EACjDT,UAAU,CAAE,6CAA6C,EAAE;IAC1DK,KAAK,EAAE,KAAK;IACZK,IAAI,EAAE,+EAA+E;IACrFC,IAAI,EAAE;EACP,CAAE,CAAC;EACH,OAAOT,iBAAiB;AACzB;;AAEA","ignoreList":[]}
1
+ {"version":3,"names":["privateApis","editorPrivateApis","PluginBlockSettingsMenuItem","EditorPluginBlockSettingsMenuItem","PluginDocumentSettingPanel","EditorPluginDocumentSettingPanel","PluginMoreMenuItem","EditorPluginMoreMenuItem","PluginPrePublishPanel","EditorPluginPrePublishPanel","PluginPostPublishPanel","EditorPluginPostPublishPanel","PluginPostStatusInfo","EditorPluginPostStatusInfo","PluginSidebar","EditorPluginSidebar","PluginSidebarMoreMenuItem","EditorPluginSidebarMoreMenuItem","deprecated","unlock","jsx","_jsx","PluginPostExcerpt","deprecateSlot","name","since","alternative","props","__experimentalPluginPostExcerpt","hint","link"],"sources":["@wordpress/edit-post/src/deprecated.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as editorPrivateApis,\n\tPluginBlockSettingsMenuItem as EditorPluginBlockSettingsMenuItem,\n\tPluginDocumentSettingPanel as EditorPluginDocumentSettingPanel,\n\tPluginMoreMenuItem as EditorPluginMoreMenuItem,\n\tPluginPrePublishPanel as EditorPluginPrePublishPanel,\n\tPluginPostPublishPanel as EditorPluginPostPublishPanel,\n\tPluginPostStatusInfo as EditorPluginPostStatusInfo,\n\tPluginSidebar as EditorPluginSidebar,\n\tPluginSidebarMoreMenuItem as EditorPluginSidebarMoreMenuItem,\n} from '@wordpress/editor';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from './lock-unlock';\nconst { PluginPostExcerpt } = unlock( editorPrivateApis );\n\nconst deprecateSlot = ( name ) => {\n\tdeprecated( `wp.editPost.${ name }`, {\n\t\tsince: '6.6',\n\t\talternative: `wp.editor.${ name }`,\n\t} );\n};\n\n/* eslint-disable jsdoc/require-param */\n/**\n * @see PluginBlockSettingsMenuItem in @wordpress/editor package.\n */\nexport function PluginBlockSettingsMenuItem( props ) {\n\tdeprecateSlot( 'PluginBlockSettingsMenuItem' );\n\treturn <EditorPluginBlockSettingsMenuItem { ...props } />;\n}\n\n/**\n * @see PluginDocumentSettingPanel in @wordpress/editor package.\n */\nexport function PluginDocumentSettingPanel( props ) {\n\tdeprecateSlot( 'PluginDocumentSettingPanel' );\n\treturn <EditorPluginDocumentSettingPanel { ...props } />;\n}\n\n/**\n * @see PluginMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginMoreMenuItem( props ) {\n\tdeprecateSlot( 'PluginMoreMenuItem' );\n\treturn <EditorPluginMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPrePublishPanel in @wordpress/editor package.\n */\nexport function PluginPrePublishPanel( props ) {\n\tdeprecateSlot( 'PluginPrePublishPanel' );\n\treturn <EditorPluginPrePublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostPublishPanel in @wordpress/editor package.\n */\nexport function PluginPostPublishPanel( props ) {\n\tdeprecateSlot( 'PluginPostPublishPanel' );\n\treturn <EditorPluginPostPublishPanel { ...props } />;\n}\n\n/**\n * @see PluginPostStatusInfo in @wordpress/editor package.\n */\nexport function PluginPostStatusInfo( props ) {\n\tdeprecateSlot( 'PluginPostStatusInfo' );\n\treturn <EditorPluginPostStatusInfo { ...props } />;\n}\n\n/**\n * @see PluginSidebar in @wordpress/editor package.\n */\nexport function PluginSidebar( props ) {\n\tdeprecateSlot( 'PluginSidebar' );\n\treturn <EditorPluginSidebar { ...props } />;\n}\n\n/**\n * @see PluginSidebarMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginSidebarMoreMenuItem( props ) {\n\tdeprecateSlot( 'PluginSidebarMoreMenuItem' );\n\treturn <EditorPluginSidebarMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginPostExcerpt in @wordpress/editor package.\n */\nexport function __experimentalPluginPostExcerpt() {\n\tdeprecated( 'wp.editPost.__experimentalPluginPostExcerpt', {\n\t\tsince: '6.6',\n\t\thint: 'Core and custom panels can be access programmatically using their panel name.',\n\t\tlink: 'https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically',\n\t} );\n\treturn PluginPostExcerpt;\n}\n\n/* eslint-enable jsdoc/require-param */\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,WAAW,IAAIC,iBAAiB,EAChCC,2BAA2B,IAAIC,iCAAiC,EAChEC,0BAA0B,IAAIC,gCAAgC,EAC9DC,kBAAkB,IAAIC,wBAAwB,EAC9CC,qBAAqB,IAAIC,2BAA2B,EACpDC,sBAAsB,IAAIC,4BAA4B,EACtDC,oBAAoB,IAAIC,0BAA0B,EAClDC,aAAa,IAAIC,mBAAmB,EACpCC,yBAAyB,IAAIC,+BAA+B,QACtD,mBAAmB;AAC1B,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA,SAASC,MAAM,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AACvC,MAAM;EAAEC;AAAkB,CAAC,GAAGH,MAAM,CAAElB,iBAAkB,CAAC;AAEzD,MAAMsB,aAAa,GAAKC,IAAI,IAAM;EACjCN,UAAU,CAAG,eAAeM,IAAM,EAAC,EAAE;IACpCC,KAAK,EAAE,KAAK;IACZC,WAAW,EAAG,aAAaF,IAAM;EAClC,CAAE,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,SAAStB,2BAA2BA,CAAEyB,KAAK,EAAG;EACpDJ,aAAa,CAAE,6BAA8B,CAAC;EAC9C,oBAAOF,IAAA,CAAClB,iCAAiC;IAAA,GAAMwB;EAAK,CAAI,CAAC;AAC1D;;AAEA;AACA;AACA;AACA,OAAO,SAASvB,0BAA0BA,CAAEuB,KAAK,EAAG;EACnDJ,aAAa,CAAE,4BAA6B,CAAC;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IAAI,EAAE,+EAA+E;IACrFC,IAAI,EAAE;EACP,CAAE,CAAC;EACH,OAAOR,iBAAiB;AACzB;;AAEA","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -17,6 +16,8 @@ import EditorInitialization from './components/editor-initialization';
17
16
  import { store as editPostStore } from './store';
18
17
  import { unlock } from './lock-unlock';
19
18
  import useNavigateToEntityRecord from './hooks/use-navigate-to-entity-record';
19
+ import { jsx as _jsx } from "react/jsx-runtime";
20
+ import { jsxs as _jsxs } from "react/jsx-runtime";
20
21
  const {
21
22
  ExperimentalEditorProvider
22
23
  } = unlock(editorPrivateApis);
@@ -72,16 +73,21 @@ function Editor({
72
73
  if (!post) {
73
74
  return null;
74
75
  }
75
- return createElement(SlotFillProvider, null, createElement(ExperimentalEditorProvider, {
76
- settings: editorSettings,
77
- post: post,
78
- initialEdits: initialEdits,
79
- useSubRegistry: false,
80
- __unstableTemplate: template,
81
- ...props
82
- }, createElement(ErrorBoundary, null, createElement(CommandMenu, null), createElement(EditorInitialization, null), createElement(Layout, {
83
- initialPost: initialPost
84
- })), createElement(PostLockedModal, null)));
76
+ return /*#__PURE__*/_jsx(SlotFillProvider, {
77
+ children: /*#__PURE__*/_jsxs(ExperimentalEditorProvider, {
78
+ settings: editorSettings,
79
+ post: post,
80
+ initialEdits: initialEdits,
81
+ useSubRegistry: false,
82
+ __unstableTemplate: template,
83
+ ...props,
84
+ children: [/*#__PURE__*/_jsxs(ErrorBoundary, {
85
+ children: [/*#__PURE__*/_jsx(CommandMenu, {}), /*#__PURE__*/_jsx(EditorInitialization, {}), /*#__PURE__*/_jsx(Layout, {
86
+ initialPost: initialPost
87
+ })]
88
+ }), /*#__PURE__*/_jsx(PostLockedModal, {})]
89
+ })
90
+ });
85
91
  }
86
92
  export default Editor;
87
93
  //# sourceMappingURL=editor.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","ErrorBoundary","PostLockedModal","store","editorStore","privateApis","editorPrivateApis","useMemo","SlotFillProvider","coreStore","CommandMenu","Layout","EditorInitialization","editPostStore","unlock","useNavigateToEntityRecord","ExperimentalEditorProvider","Editor","postId","initialPostId","postType","initialPostType","settings","initialEdits","props","currentPost","onNavigateToEntityRecord","onNavigateToPreviousEntityRecord","post","template","select","_getPostType$viewable","getEditedPostTemplate","getEntityRecord","getPostType","canUser","getEditorSettings","postObject","supportsTemplateMode","isViewable","viewable","canViewTemplate","editorSettings","defaultRenderingMode","initialPost","type","id","createElement","useSubRegistry","__unstableTemplate"],"sources":["@wordpress/edit-post/src/editor.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tErrorBoundary,\n\tPostLockedModal,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useMemo } from '@wordpress/element';\nimport { SlotFillProvider } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { CommandMenu } from '@wordpress/commands';\n\n/**\n * Internal dependencies\n */\nimport Layout from './components/layout';\nimport EditorInitialization from './components/editor-initialization';\nimport { store as editPostStore } from './store';\nimport { unlock } from './lock-unlock';\nimport useNavigateToEntityRecord from './hooks/use-navigate-to-entity-record';\n\nconst { ExperimentalEditorProvider } = unlock( editorPrivateApis );\n\nfunction Editor( {\n\tpostId: initialPostId,\n\tpostType: initialPostType,\n\tsettings,\n\tinitialEdits,\n\t...props\n} ) {\n\tconst {\n\t\tcurrentPost,\n\t\tonNavigateToEntityRecord,\n\t\tonNavigateToPreviousEntityRecord,\n\t} = useNavigateToEntityRecord(\n\t\tinitialPostId,\n\t\tinitialPostType,\n\t\t'post-only'\n\t);\n\n\tconst { post, template } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedPostTemplate } = select( editPostStore );\n\t\t\tconst { getEntityRecord, getPostType, canUser } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst { getEditorSettings } = select( editorStore );\n\n\t\t\tconst postObject = getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tcurrentPost.postType,\n\t\t\t\tcurrentPost.postId\n\t\t\t);\n\n\t\t\tconst supportsTemplateMode =\n\t\t\t\tgetEditorSettings().supportsTemplateMode;\n\t\t\tconst isViewable =\n\t\t\t\tgetPostType( currentPost.postType )?.viewable ?? false;\n\t\t\tconst canViewTemplate = canUser( 'read', 'templates' );\n\t\t\treturn {\n\t\t\t\ttemplate:\n\t\t\t\t\tsupportsTemplateMode &&\n\t\t\t\t\tisViewable &&\n\t\t\t\t\tcanViewTemplate &&\n\t\t\t\t\tcurrentPost.postType !== 'wp_template'\n\t\t\t\t\t\t? getEditedPostTemplate()\n\t\t\t\t\t\t: null,\n\t\t\t\tpost: postObject,\n\t\t\t};\n\t\t},\n\t\t[ currentPost.postType, currentPost.postId ]\n\t);\n\n\tconst editorSettings = useMemo(\n\t\t() => ( {\n\t\t\t...settings,\n\t\t\tonNavigateToEntityRecord,\n\t\t\tonNavigateToPreviousEntityRecord,\n\t\t\tdefaultRenderingMode: 'post-only',\n\t\t} ),\n\t\t[ settings, onNavigateToEntityRecord, onNavigateToPreviousEntityRecord ]\n\t);\n\n\tconst initialPost = useMemo( () => {\n\t\treturn {\n\t\t\ttype: initialPostType,\n\t\t\tid: initialPostId,\n\t\t};\n\t}, [ initialPostType, initialPostId ] );\n\n\tif ( ! post ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<ExperimentalEditorProvider\n\t\t\t\tsettings={ editorSettings }\n\t\t\t\tpost={ post }\n\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t__unstableTemplate={ template }\n\t\t\t\t{ ...props }\n\t\t\t>\n\t\t\t\t<ErrorBoundary>\n\t\t\t\t\t<CommandMenu />\n\t\t\t\t\t<EditorInitialization />\n\t\t\t\t\t<Layout initialPost={ initialPost } />\n\t\t\t\t</ErrorBoundary>\n\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AO;IACxBC,kBAAkB,EAAGpB,QAAU;IAAA,GAC1BL;EAAK,GAEVuB,aAAA,CAAC9C,aAAa,QACb8C,aAAA,CAACrC,WAAW,MAAE,CAAC,EACfqC,aAAA,CAACnC,oBAAoB,MAAE,CAAC,EACxBmC,aAAA,CAACpC,MAAM;IAACiC,WAAW,EAAGA;EAAa,CAAE,CACvB,CAAC,EAChBG,aAAA,CAAC7C,eAAe,MAAE,CACS,CACX,CAAC;AAErB;AAEA,eAAee,MAAM","ignoreList":[]}
1
+ {"version":3,"names":["useSelect","ErrorBoundary","PostLockedModal","store","editorStore","privateApis","editorPrivateApis","useMemo","SlotFillProvider","coreStore","CommandMenu","Layout","EditorInitialization","editPostStore","unlock","useNavigateToEntityRecord","jsx","_jsx","jsxs","_jsxs","ExperimentalEditorProvider","Editor","postId","initialPostId","postType","initialPostType","settings","initialEdits","props","currentPost","onNavigateToEntityRecord","onNavigateToPreviousEntityRecord","post","template","select","_getPostType$viewable","getEditedPostTemplate","getEntityRecord","getPostType","canUser","getEditorSettings","postObject","supportsTemplateMode","isViewable","viewable","canViewTemplate","editorSettings","defaultRenderingMode","initialPost","type","id","children","useSubRegistry","__unstableTemplate"],"sources":["@wordpress/edit-post/src/editor.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tErrorBoundary,\n\tPostLockedModal,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { useMemo } from '@wordpress/element';\nimport { SlotFillProvider } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { CommandMenu } from '@wordpress/commands';\n\n/**\n * Internal dependencies\n */\nimport Layout from './components/layout';\nimport EditorInitialization from './components/editor-initialization';\nimport { store as editPostStore } from './store';\nimport { unlock } from './lock-unlock';\nimport useNavigateToEntityRecord from './hooks/use-navigate-to-entity-record';\n\nconst { ExperimentalEditorProvider } = unlock( editorPrivateApis );\n\nfunction Editor( {\n\tpostId: initialPostId,\n\tpostType: initialPostType,\n\tsettings,\n\tinitialEdits,\n\t...props\n} ) {\n\tconst {\n\t\tcurrentPost,\n\t\tonNavigateToEntityRecord,\n\t\tonNavigateToPreviousEntityRecord,\n\t} = useNavigateToEntityRecord(\n\t\tinitialPostId,\n\t\tinitialPostType,\n\t\t'post-only'\n\t);\n\n\tconst { post, template } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedPostTemplate } = select( editPostStore );\n\t\t\tconst { getEntityRecord, getPostType, canUser } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst { getEditorSettings } = select( editorStore );\n\n\t\t\tconst postObject = getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tcurrentPost.postType,\n\t\t\t\tcurrentPost.postId\n\t\t\t);\n\n\t\t\tconst supportsTemplateMode =\n\t\t\t\tgetEditorSettings().supportsTemplateMode;\n\t\t\tconst isViewable =\n\t\t\t\tgetPostType( currentPost.postType )?.viewable ?? false;\n\t\t\tconst canViewTemplate = canUser( 'read', 'templates' );\n\t\t\treturn {\n\t\t\t\ttemplate:\n\t\t\t\t\tsupportsTemplateMode &&\n\t\t\t\t\tisViewable &&\n\t\t\t\t\tcanViewTemplate &&\n\t\t\t\t\tcurrentPost.postType !== 'wp_template'\n\t\t\t\t\t\t? getEditedPostTemplate()\n\t\t\t\t\t\t: null,\n\t\t\t\tpost: postObject,\n\t\t\t};\n\t\t},\n\t\t[ currentPost.postType, currentPost.postId ]\n\t);\n\n\tconst editorSettings = useMemo(\n\t\t() => ( {\n\t\t\t...settings,\n\t\t\tonNavigateToEntityRecord,\n\t\t\tonNavigateToPreviousEntityRecord,\n\t\t\tdefaultRenderingMode: 'post-only',\n\t\t} ),\n\t\t[ settings, onNavigateToEntityRecord, onNavigateToPreviousEntityRecord ]\n\t);\n\n\tconst initialPost = useMemo( () => {\n\t\treturn {\n\t\t\ttype: initialPostType,\n\t\t\tid: initialPostId,\n\t\t};\n\t}, [ initialPostType, initialPostId ] );\n\n\tif ( ! post ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<ExperimentalEditorProvider\n\t\t\t\tsettings={ editorSettings }\n\t\t\t\tpost={ post }\n\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t__unstableTemplate={ template }\n\t\t\t\t{ ...props }\n\t\t\t>\n\t\t\t\t<ErrorBoundary>\n\t\t\t\t\t<CommandMenu />\n\t\t\t\t\t<EditorInitialization />\n\t\t\t\t\t<Layout initialPost={ initialPost } />\n\t\t\t\t</ErrorBoundary>\n\t\t\t\t<PostLockedModal />\n\t\t\t</ExperimentalEditorProvider>\n\t\t</SlotFillProvider>\n\t);\n}\n\nexport default Editor;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SACCC,aAAa,EACbC,eAAe,EACfC,KAAK,IAAIC,WAAW,EACpBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;AAC1B,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,gBAAgB,QAAQ,uBAAuB;AACxD,SAASL,KAAK,IAAIM,SAAS,QAAQ,sBAAsB;AACzD,SAASC,WAAW,QAAQ,qBAAqB;;AAEjD;AACA;AACA;AACA,OAAOC,MAAM,MAAM,qBAAqB;AACxC,OAAOC,oBAAoB,MAAM,oCAAoC;AACrE,SAAST,KAAK,IAAIU,aAAa,QAAQ,SAAS;AAChD,SAASC,MAAM,QAAQ,eAAe;AACtC,OAAOC,yBAAyB,MAAM,uCAAuC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE9E,MAAM;EAAEC;AAA2B,CAAC,GAAGN,MAAM,CAAER,iBAAkB,CAAC;AAElE,SAASe,MAAMA,CAAE;EAChBC,MAAM,EAAEC,aAAa;EACrBC,QAAQ,EAAEC,eAAe;EACzBC,QAAQ;EACRC,YAAY;EACZ,GAAGC;AACJ,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EI,wBAAwB,EAAEC,gCAAgC,CACvE,CAAC;EAED,MAAMiB,WAAW,GAAGzC,OAAO,CAAE,MAAM;IAClC,OAAO;MACN0C,IAAI,EAAExB,eAAe;MACrByB,EAAE,EAAE3B;IACL,CAAC;EACF,CAAC,EAAE,CAAEE,eAAe,EAAEF,aAAa,CAAG,CAAC;EAEvC,IAAK,CAAES,IAAI,EAAG;IACb,OAAO,IAAI;EACZ;EAEA,oBACCf,IAAA,CAACT,gBAAgB;IAAA2C,QAAA,eAChBhC,KAAA,CAACC,0BAA0B;MAC1BM,QAAQ,EAAGoB,cAAgB;MAC3Bd,IAAI,EAAGA,IAAM;MACbL,YAAY,EAAGA,YAAc;MAC7ByB,cAAc,EAAG,KAAO;MACxBC,kBAAkB,EAAGpB,QAAU;MAAA,GAC1BL,KAAK;MAAAuB,QAAA,gBAEVhC,KAAA,CAAClB,aAAa;QAAAkD,QAAA,gBACblC,IAAA,CAACP,WAAW,IAAE,CAAC,eACfO,IAAA,CAACL,oBAAoB,IAAE,CAAC,eACxBK,IAAA,CAACN,MAAM;UAACqC,WAAW,EAAGA;QAAa,CAAE,CAAC;MAAA,CACxB,CAAC,eAChB/B,IAAA,CAACf,eAAe,IAAE,CAAC;IAAA,CACQ;EAAC,CACZ,CAAC;AAErB;AAEA,eAAemB,MAAM","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * External dependencies
4
3
  */
@@ -22,6 +21,7 @@ import { store as coreStore } from '@wordpress/core-data';
22
21
  * Internal dependencies
23
22
  */
24
23
  import Layout from './components/layout';
24
+ import { jsx as _jsx } from "react/jsx-runtime";
25
25
  class Editor extends Component {
26
26
  constructor(props) {
27
27
  super(...arguments);
@@ -113,19 +113,25 @@ class Editor extends Component {
113
113
  status: 'draft',
114
114
  meta: []
115
115
  };
116
- return createElement(GestureHandlerRootView, {
116
+ return /*#__PURE__*/_jsx(GestureHandlerRootView, {
117
117
  style: {
118
118
  flex: 1
119
- }
120
- }, createElement(SlotFillProvider, null, createElement(EditorProvider, {
121
- settings: editorSettings,
122
- post: normalizedPost,
123
- initialEdits: initialEdits,
124
- useSubRegistry: false,
125
- ...props
126
- }, createElement(ErrorBoundary, null, createElement(Layout, {
127
- setTitleRef: this.setTitleRef
128
- })))));
119
+ },
120
+ children: /*#__PURE__*/_jsx(SlotFillProvider, {
121
+ children: /*#__PURE__*/_jsx(EditorProvider, {
122
+ settings: editorSettings,
123
+ post: normalizedPost,
124
+ initialEdits: initialEdits,
125
+ useSubRegistry: false,
126
+ ...props,
127
+ children: /*#__PURE__*/_jsx(ErrorBoundary, {
128
+ children: /*#__PURE__*/_jsx(Layout, {
129
+ setTitleRef: this.setTitleRef
130
+ })
131
+ })
132
+ })
133
+ })
134
+ });
129
135
  }
130
136
  }
131
137
  export default compose([withSelect(select => {
@@ -1 +1 @@
1
- {"version":3,"names":["memize","I18nManager","GestureHandlerRootView","Component","EditorProvider","ErrorBoundary","store","editorStore","parse","serialize","withDispatch","withSelect","compose","subscribeSetFocusOnTitle","subscribeFeaturedImageIdNativeUpdated","SlotFillProvider","coreStore","Layout","Editor","constructor","props","arguments","galleryWithImageBlocks","window","wp","galleryBlockV2Enabled","initialHtmlModeEnabled","mode","switchEditorMode","getEditorSettings","maxSize","setTitleRef","bind","settings","isRTL","componentDidMount","editEntityRecord","postType","postId","subscriptionParentSetFocusOnTitle","postTitleRef","focus","focusTitleWhenAvailable","subscriptionParentFeaturedImageIdNativeUpdated","payload","featured_media","featuredImageId","undoIgnore","componentWillUnmount","remove","titleRef","render","initialEdits","post","initialHtml","editorSettings","normalizedPost","id","title","raw","initialTitle","content","type","status","meta","createElement","style","flex","useSubRegistry","select","getEditorMode","dispatch"],"sources":["@wordpress/edit-post/src/editor.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport memize from 'memize';\nimport { I18nManager } from 'react-native';\nimport { GestureHandlerRootView } from 'react-native-gesture-handler';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport {\n\tEditorProvider,\n\tErrorBoundary,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { parse, serialize } from '@wordpress/blocks';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport {\n\tsubscribeSetFocusOnTitle,\n\tsubscribeFeaturedImageIdNativeUpdated,\n} from '@wordpress/react-native-bridge';\nimport { SlotFillProvider } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport Layout from './components/layout';\n\nclass Editor extends Component {\n\tconstructor( props ) {\n\t\tsuper( ...arguments );\n\n\t\t// need to set this globally to avoid race with deprecations\n\t\t// defaulting to true to avoid issues with a not-yet-cached value\n\t\tconst { galleryWithImageBlocks = true } = props;\n\t\twindow.wp.galleryBlockV2Enabled = galleryWithImageBlocks;\n\n\t\tif ( props.initialHtmlModeEnabled && props.mode === 'visual' ) {\n\t\t\t// Enable html mode if the initial mode the parent wants it but we're not already in it.\n\t\t\tthis.props.switchEditorMode( 'text' );\n\t\t}\n\n\t\tthis.getEditorSettings = memize( this.getEditorSettings, {\n\t\t\tmaxSize: 1,\n\t\t} );\n\n\t\tthis.setTitleRef = this.setTitleRef.bind( this );\n\t}\n\n\tgetEditorSettings( settings ) {\n\t\tsettings = {\n\t\t\t...settings,\n\t\t\tisRTL: I18nManager.isRTL,\n\t\t};\n\n\t\treturn settings;\n\t}\n\n\tcomponentDidMount() {\n\t\tconst { editEntityRecord, postType, postId } = this.props;\n\n\t\tthis.subscriptionParentSetFocusOnTitle = subscribeSetFocusOnTitle(\n\t\t\t() => {\n\t\t\t\tif ( this.postTitleRef ) {\n\t\t\t\t\tthis.postTitleRef.focus();\n\t\t\t\t} else {\n\t\t\t\t\t// If the post title ref is not available, we postpone setting focus to when it's available.\n\t\t\t\t\tthis.focusTitleWhenAvailable = true;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\tthis.subscriptionParentFeaturedImageIdNativeUpdated =\n\t\t\tsubscribeFeaturedImageIdNativeUpdated( ( payload ) => {\n\t\t\t\teditEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId,\n\t\t\t\t\t{ featured_media: payload.featuredImageId },\n\t\t\t\t\t{\n\t\t\t\t\t\tundoIgnore: true,\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif ( this.subscriptionParentSetFocusOnTitle ) {\n\t\t\tthis.subscriptionParentSetFocusOnTitle.remove();\n\t\t}\n\n\t\tif ( this.subscribeFeaturedImageIdNativeUpdated ) {\n\t\t\tthis.subscribeFeaturedImageIdNativeUpdated.remove();\n\t\t}\n\t}\n\n\tsetTitleRef( titleRef ) {\n\t\tif ( this.focusTitleWhenAvailable && ! this.postTitleRef ) {\n\t\t\tthis.focusTitleWhenAvailable = false;\n\t\t\ttitleRef.focus();\n\t\t}\n\n\t\tthis.postTitleRef = titleRef;\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tsettings,\n\t\t\tinitialEdits,\n\t\t\tpost,\n\t\t\tpostId,\n\t\t\tpostType,\n\t\t\tfeaturedImageId,\n\t\t\tinitialHtml,\n\t\t\t...props\n\t\t} = this.props;\n\n\t\tconst editorSettings = this.getEditorSettings( settings );\n\n\t\tconst normalizedPost = post || {\n\t\t\tid: postId,\n\t\t\ttitle: {\n\t\t\t\traw: props.initialTitle || '',\n\t\t\t},\n\t\t\tfeatured_media: featuredImageId,\n\t\t\tcontent: {\n\t\t\t\t// Make sure the post content is in sync with gutenberg store\n\t\t\t\t// to avoid marking the post as modified when simply loaded\n\t\t\t\t// For now, let's assume: serialize( parse( html ) ) !== html.\n\t\t\t\traw: serialize( parse( initialHtml || '' ) ),\n\t\t\t},\n\t\t\ttype: postType,\n\t\t\tstatus: 'draft',\n\t\t\tmeta: [],\n\t\t};\n\n\t\treturn (\n\t\t\t<GestureHandlerRootView style={ { flex: 1 } }>\n\t\t\t\t<SlotFillProvider>\n\t\t\t\t\t<EditorProvider\n\t\t\t\t\t\tsettings={ editorSettings }\n\t\t\t\t\t\tpost={ normalizedPost }\n\t\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ErrorBoundary>\n\t\t\t\t\t\t\t<Layout setTitleRef={ this.setTitleRef } />\n\t\t\t\t\t\t</ErrorBoundary>\n\t\t\t\t\t</EditorProvider>\n\t\t\t\t</SlotFillProvider>\n\t\t\t</GestureHandlerRootView>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { getEditorMode } = select( editorStore );\n\n\t\treturn {\n\t\t\tmode: getEditorMode(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { switchEditorMode } = dispatch( editorStore );\n\t\tconst { editEntityRecord } = dispatch( coreStore );\n\t\treturn {\n\t\t\tswitchEditorMode,\n\t\t\teditEntityRecord,\n\t\t};\n\t} ),\n] )( Editor );\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,MAAM,MAAM,QAAQ;AAC3B,SAASC,WAAW,QAAQ,cAAc;AAC1C,SAASC,sBAAsB,QAAQ,8BAA8B;;AAErE;AACA;AACA;AACA,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SACCC,cAAc,EACdC,aAAa,EACbC,KAAK,IAAIC,WAAW,QACd,mBAAmB;AAC1B,SAASC,KAAK,EAAEC,SAAS,QAAQ,mBAAmB;AACpD,SAASC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAC1D,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SACCC,wBAAwB,EACxBC,qCAAqC,QAC/B,gCAAgC;AACvC,SAASC,gBAAgB,QAAQ,uBAAuB;AACxD,SAAST,KAAK,IAAIU,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,OAAOC,MAAM,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AE;MAAE;IAAG,GAC5CF,aAAA,CAAClD,gBAAgB,QAChBkD,aAAA,CAAC7D,cAAc;MACd6B,QAAQ,EAAGsB,cAAgB;MAC3BF,IAAI,EAAGG,cAAgB;MACvBJ,YAAY,EAAGA,YAAc;MAC7BgB,cAAc,EAAG,KAAO;MAAA,GACnBhD;IAAK,GAEV6C,aAAA,CAAC5D,aAAa,QACb4D,aAAA,CAAChD,MAAM;MAACc,WAAW,EAAG,IAAI,CAACA;IAAa,CAAE,CAC5B,CACA,CACC,CACK,CAAC;EAE3B;AACD;AAEA,eAAenB,OAAO,CAAE,CACvBD,UAAU,CAAI0D,MAAM,IAAM;EACzB,MAAM;IAAEC;EAAc,CAAC,GAAGD,MAAM,CAAE9D,WAAY,CAAC;EAE/C,OAAO;IACNoB,IAAI,EAAE2C,aAAa,CAAC;EACrB,CAAC;AACF,CAAE,CAAC,EACH5D,YAAY,CAAI6D,QAAQ,IAAM;EAC7B,MAAM;IAAE3C;EAAiB,CAAC,GAAG2C,QAAQ,CAAEhE,WAAY,CAAC;EACpD,MAAM;IAAE6B;EAAiB,CAAC,GAAGmC,QAAQ,CAAEvD,SAAU,CAAC;EAClD,OAAO;IACNY,gBAAgB;IAChBQ;EACD,CAAC;AACF,CAAE,CAAC,CACF,CAAC,CAAElB,MAAO,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["memize","I18nManager","GestureHandlerRootView","Component","EditorProvider","ErrorBoundary","store","editorStore","parse","serialize","withDispatch","withSelect","compose","subscribeSetFocusOnTitle","subscribeFeaturedImageIdNativeUpdated","SlotFillProvider","coreStore","Layout","jsx","_jsx","Editor","constructor","props","arguments","galleryWithImageBlocks","window","wp","galleryBlockV2Enabled","initialHtmlModeEnabled","mode","switchEditorMode","getEditorSettings","maxSize","setTitleRef","bind","settings","isRTL","componentDidMount","editEntityRecord","postType","postId","subscriptionParentSetFocusOnTitle","postTitleRef","focus","focusTitleWhenAvailable","subscriptionParentFeaturedImageIdNativeUpdated","payload","featured_media","featuredImageId","undoIgnore","componentWillUnmount","remove","titleRef","render","initialEdits","post","initialHtml","editorSettings","normalizedPost","id","title","raw","initialTitle","content","type","status","meta","style","flex","children","useSubRegistry","select","getEditorMode","dispatch"],"sources":["@wordpress/edit-post/src/editor.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport memize from 'memize';\nimport { I18nManager } from 'react-native';\nimport { GestureHandlerRootView } from 'react-native-gesture-handler';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport {\n\tEditorProvider,\n\tErrorBoundary,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { parse, serialize } from '@wordpress/blocks';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport {\n\tsubscribeSetFocusOnTitle,\n\tsubscribeFeaturedImageIdNativeUpdated,\n} from '@wordpress/react-native-bridge';\nimport { SlotFillProvider } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport Layout from './components/layout';\n\nclass Editor extends Component {\n\tconstructor( props ) {\n\t\tsuper( ...arguments );\n\n\t\t// need to set this globally to avoid race with deprecations\n\t\t// defaulting to true to avoid issues with a not-yet-cached value\n\t\tconst { galleryWithImageBlocks = true } = props;\n\t\twindow.wp.galleryBlockV2Enabled = galleryWithImageBlocks;\n\n\t\tif ( props.initialHtmlModeEnabled && props.mode === 'visual' ) {\n\t\t\t// Enable html mode if the initial mode the parent wants it but we're not already in it.\n\t\t\tthis.props.switchEditorMode( 'text' );\n\t\t}\n\n\t\tthis.getEditorSettings = memize( this.getEditorSettings, {\n\t\t\tmaxSize: 1,\n\t\t} );\n\n\t\tthis.setTitleRef = this.setTitleRef.bind( this );\n\t}\n\n\tgetEditorSettings( settings ) {\n\t\tsettings = {\n\t\t\t...settings,\n\t\t\tisRTL: I18nManager.isRTL,\n\t\t};\n\n\t\treturn settings;\n\t}\n\n\tcomponentDidMount() {\n\t\tconst { editEntityRecord, postType, postId } = this.props;\n\n\t\tthis.subscriptionParentSetFocusOnTitle = subscribeSetFocusOnTitle(\n\t\t\t() => {\n\t\t\t\tif ( this.postTitleRef ) {\n\t\t\t\t\tthis.postTitleRef.focus();\n\t\t\t\t} else {\n\t\t\t\t\t// If the post title ref is not available, we postpone setting focus to when it's available.\n\t\t\t\t\tthis.focusTitleWhenAvailable = true;\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\tthis.subscriptionParentFeaturedImageIdNativeUpdated =\n\t\t\tsubscribeFeaturedImageIdNativeUpdated( ( payload ) => {\n\t\t\t\teditEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId,\n\t\t\t\t\t{ featured_media: payload.featuredImageId },\n\t\t\t\t\t{\n\t\t\t\t\t\tundoIgnore: true,\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif ( this.subscriptionParentSetFocusOnTitle ) {\n\t\t\tthis.subscriptionParentSetFocusOnTitle.remove();\n\t\t}\n\n\t\tif ( this.subscribeFeaturedImageIdNativeUpdated ) {\n\t\t\tthis.subscribeFeaturedImageIdNativeUpdated.remove();\n\t\t}\n\t}\n\n\tsetTitleRef( titleRef ) {\n\t\tif ( this.focusTitleWhenAvailable && ! this.postTitleRef ) {\n\t\t\tthis.focusTitleWhenAvailable = false;\n\t\t\ttitleRef.focus();\n\t\t}\n\n\t\tthis.postTitleRef = titleRef;\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tsettings,\n\t\t\tinitialEdits,\n\t\t\tpost,\n\t\t\tpostId,\n\t\t\tpostType,\n\t\t\tfeaturedImageId,\n\t\t\tinitialHtml,\n\t\t\t...props\n\t\t} = this.props;\n\n\t\tconst editorSettings = this.getEditorSettings( settings );\n\n\t\tconst normalizedPost = post || {\n\t\t\tid: postId,\n\t\t\ttitle: {\n\t\t\t\traw: props.initialTitle || '',\n\t\t\t},\n\t\t\tfeatured_media: featuredImageId,\n\t\t\tcontent: {\n\t\t\t\t// Make sure the post content is in sync with gutenberg store\n\t\t\t\t// to avoid marking the post as modified when simply loaded\n\t\t\t\t// For now, let's assume: serialize( parse( html ) ) !== html.\n\t\t\t\traw: serialize( parse( initialHtml || '' ) ),\n\t\t\t},\n\t\t\ttype: postType,\n\t\t\tstatus: 'draft',\n\t\t\tmeta: [],\n\t\t};\n\n\t\treturn (\n\t\t\t<GestureHandlerRootView style={ { flex: 1 } }>\n\t\t\t\t<SlotFillProvider>\n\t\t\t\t\t<EditorProvider\n\t\t\t\t\t\tsettings={ editorSettings }\n\t\t\t\t\t\tpost={ normalizedPost }\n\t\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ErrorBoundary>\n\t\t\t\t\t\t\t<Layout setTitleRef={ this.setTitleRef } />\n\t\t\t\t\t\t</ErrorBoundary>\n\t\t\t\t\t</EditorProvider>\n\t\t\t\t</SlotFillProvider>\n\t\t\t</GestureHandlerRootView>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { getEditorMode } = select( editorStore );\n\n\t\treturn {\n\t\t\tmode: getEditorMode(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { switchEditorMode } = dispatch( editorStore );\n\t\tconst { editEntityRecord } = dispatch( coreStore );\n\t\treturn {\n\t\t\tswitchEditorMode,\n\t\t\teditEntityRecord,\n\t\t};\n\t} ),\n] )( Editor );\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,MAAM,MAAM,QAAQ;AAC3B,SAASC,WAAW,QAAQ,cAAc;AAC1C,SAASC,sBAAsB,QAAQ,8BAA8B;;AAErE;AACA;AACA;AACA,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SACCC,cAAc,EACdC,aAAa,EACbC,KAAK,IAAIC,WAAW,QACd,mBAAmB;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reList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -9,13 +8,17 @@ import { createRoot } from '@wordpress/element';
9
8
  import { dispatch, select } from '@wordpress/data';
10
9
  import { store as preferencesStore } from '@wordpress/preferences';
11
10
  import { registerLegacyWidgetBlock, registerWidgetGroupBlock } from '@wordpress/widgets';
12
- import { store as editorStore } from '@wordpress/editor';
11
+ import { store as editorStore, privateApis as editorPrivateApis } from '@wordpress/editor';
13
12
 
14
13
  /**
15
14
  * Internal dependencies
16
15
  */
17
- import './hooks';
18
16
  import Editor from './editor';
17
+ import { unlock } from './lock-unlock';
18
+ import { jsx as _jsx } from "react/jsx-runtime";
19
+ const {
20
+ BackButton: __experimentalMainDashboardButton
21
+ } = unlock(editorPrivateApis);
19
22
 
20
23
  /**
21
24
  * Initializes and returns an instance of Editor.
@@ -65,7 +68,7 @@ export function initializeEditor(id, postType, postId, settings, initialEdits) {
65
68
  registerWidgetGroupBlock({
66
69
  inserter: false
67
70
  });
68
- if (process.env.IS_GUTENBERG_PLUGIN) {
71
+ if (globalThis.IS_GUTENBERG_PLUGIN) {
69
72
  __experimentalRegisterExperimentalCoreBlocks({
70
73
  enableFSEBlocks: settings.__unstableEnableFullSiteEditingBlocks
71
74
  });
@@ -106,7 +109,7 @@ export function initializeEditor(id, postType, postId, settings, initialEdits) {
106
109
  // Prevent the default browser action for files dropped outside of dropzones.
107
110
  window.addEventListener('dragover', e => e.preventDefault(), false);
108
111
  window.addEventListener('drop', e => e.preventDefault(), false);
109
- root.render(createElement(Editor, {
112
+ root.render( /*#__PURE__*/_jsx(Editor, {
110
113
  settings: settings,
111
114
  postId: postId,
112
115
  postType: postType,
@@ -124,8 +127,8 @@ export function reinitializeEditor() {
124
127
  version: '6.3'
125
128
  });
126
129
  }
127
- export { default as __experimentalFullscreenModeClose } from './components/header/fullscreen-mode-close';
128
- export { default as __experimentalMainDashboardButton } from './components/header/main-dashboard-button';
130
+ export { default as __experimentalFullscreenModeClose } from './components/back-button/fullscreen-mode-close';
131
+ export { __experimentalMainDashboardButton };
129
132
  export { store } from './store';
130
133
  export * from './deprecated';
131
134
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["store","blocksStore","registerCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","deprecated","createRoot","dispatch","select","preferencesStore","registerLegacyWidgetBlock","registerWidgetGroupBlock","editorStore","Editor","initializeEditor","id","postType","postId","settings","initialEdits","isMediumOrBigger","window","matchMedia","matches","target","document","getElementById","root","setDefaults","fullscreenMode","themeStyles","welcomeGuide","welcomeGuideTemplate","allowRightClickOverrides","editorMode","fixedToolbar","hiddenBlockTypes","inactivePanels","openPanels","showBlockBreadcrumbs","showIconLabels","showListViewByDefault","isPublishSidebarEnabled","reapplyBlockTypeFilters","get","setIsListViewOpened","inserter","process","env","IS_GUTENBERG_PLUGIN","enableFSEBlocks","__unstableEnableFullSiteEditingBlocks","documentMode","compatMode","console","warn","isIphone","navigator","userAgent","indexOf","addEventListener","event","editorScrollContainer","getElementsByClassName","scrollY","scrollTop","scrollTo","e","preventDefault","render","createElement","reinitializeEditor","since","version","default","__experimentalFullscreenModeClose","__experimentalMainDashboardButton"],"sources":["@wordpress/edit-post/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot } from '@wordpress/element';\nimport { dispatch, select } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport Editor from './editor';\n\n/**\n * Initializes and returns an instance of Editor.\n *\n * @param {string} id Unique identifier for editor instance.\n * @param {string} postType Post type of the post to edit.\n * @param {Object} postId ID of the post to edit.\n * @param {?Object} settings Editor settings object.\n * @param {Object} initialEdits Programmatic edits to apply initially, to be\n * considered as non-user-initiated (bypass for\n * unsaved changes prompt).\n */\nexport function initializeEditor(\n\tid,\n\tpostType,\n\tpostId,\n\tsettings,\n\tinitialEdits\n) {\n\tconst isMediumOrBigger = window.matchMedia( '(min-width: 782px)' ).matches;\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-post', {\n\t\tfullscreenMode: true,\n\t\tthemeStyles: true,\n\t\twelcomeGuide: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\teditorMode: 'visual',\n\t\tfixedToolbar: false,\n\t\thiddenBlockTypes: [],\n\t\tinactivePanels: [],\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowIconLabels: false,\n\t\tshowListViewByDefault: false,\n\t\tisPublishSidebarEnabled: true,\n\t} );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\n\t// Check if the block list view should be open by default.\n\t// If `distractionFree` mode is enabled, the block list view should not be open.\n\t// This behavior is disabled for small viewports.\n\tif (\n\t\tisMediumOrBigger &&\n\t\tselect( preferencesStore ).get( 'core', 'showListViewByDefault' ) &&\n\t\t! select( preferencesStore ).get( 'core', 'distractionFree' )\n\t) {\n\t\tdispatch( editorStore ).setIsListViewOpened( true );\n\t}\n\n\tregisterCoreBlocks();\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( process.env.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: settings.__unstableEnableFullSiteEditingBlocks,\n\t\t} );\n\t}\n\n\t// Show a console log warning if the browser is not in Standards rendering mode.\n\tconst documentMode =\n\t\tdocument.compatMode === 'CSS1Compat' ? 'Standards' : 'Quirks';\n\tif ( documentMode !== 'Standards' ) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.warn(\n\t\t\t\"Your browser is using Quirks Mode. \\nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins.\"\n\t\t);\n\t}\n\n\t// This is a temporary fix for a couple of issues specific to Webkit on iOS.\n\t// Without this hack the browser scrolls the mobile toolbar off-screen.\n\t// Once supported in Safari we can replace this in favor of preventScroll.\n\t// For details see issue #18632 and PR #18686\n\t// Specifically, we scroll `interface-interface-skeleton__body` to enable a fixed top toolbar.\n\t// But Mobile Safari forces the `html` element to scroll upwards, hiding the toolbar.\n\n\tconst isIphone = window.navigator.userAgent.indexOf( 'iPhone' ) !== -1;\n\tif ( isIphone ) {\n\t\twindow.addEventListener( 'scroll', ( event ) => {\n\t\t\tconst editorScrollContainer = document.getElementsByClassName(\n\t\t\t\t'interface-interface-skeleton__body'\n\t\t\t)[ 0 ];\n\t\t\tif ( event.target === document ) {\n\t\t\t\t// Scroll element into view by scrolling the editor container by the same amount\n\t\t\t\t// that Mobile Safari tried to scroll the html element upwards.\n\t\t\t\tif ( window.scrollY > 100 ) {\n\t\t\t\t\teditorScrollContainer.scrollTop =\n\t\t\t\t\t\teditorScrollContainer.scrollTop + window.scrollY;\n\t\t\t\t}\n\t\t\t\t// Undo unwanted scroll on html element, but only in the visual editor.\n\t\t\t\tif (\n\t\t\t\t\tdocument.getElementsByClassName( 'is-mode-visual' )[ 0 ]\n\t\t\t\t) {\n\t\t\t\t\twindow.scrollTo( 0, 0 );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<Editor\n\t\t\tsettings={ settings }\n\t\t\tpostId={ postId }\n\t\t\tpostType={ postType }\n\t\t\tinitialEdits={ initialEdits }\n\t\t/>\n\t);\n\n\treturn root;\n}\n\n/**\n * Used to reinitialize the editor after an error. Now it's a deprecated noop function.\n */\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editPost.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as __experimentalFullscreenModeClose } from './components/header/fullscreen-mode-close';\nexport { default as __experimentalMainDashboardButton } from './components/header/main-dashboard-button';\n\nexport { store } from './store';\nexport * from './deprecated';\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SACCC,kBAAkB,EAClBC,4CAA4C,QACtC,0BAA0B;AACjC,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,QAAQ,EAAEC,MAAM,QAAQ,iBAAiB;AAClD,SAASP,KAAK,IAAIQ,gBAAgB,QAAQ,wBAAwB;AAClE,SACCC,yBAAyB,EACzBC,wBAAwB,QAClB,oBAAoB;AAC3B,SAASV,KAAK,IAAIW,WAAW,QAAQ,mBAAmB;;AAExD;AACA;AACA;AACA,OAAO,SAAS;AAChB,OAAOC,MAAM,MAAM,UAAU;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAC/BC,EAAE,EACFC,QAAQ,EACRC,MAAM,EACNC,QAAQ,EACRC,YAAY,EACX;EACD,MAAMC,gBAAgB,GAAGC,MAAM,CAACC,UAAU,CAAE,oBAAqB,CAAC,CAACC,OAAO;EAC1E,MAAMC,MAAM,GAAGC,QAAQ,CAACC,cAAc,CAAEX,EAAG,CAAC;EAC5C,MAAMY,IAAI,GAAG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EAAGA,QAAU;IACrBG,YAAY,EAAGA;EAAc,CAC7B,CACF,CAAC;EAED,OAAOQ,IAAI;AACZ;;AAEA;AACA;AACA;AACA,OAAO,SAAS4C,kBAAkBA,CAAA,EAAG;EACpClE,UAAU,CAAE,gCAAgC,EAAE;IAC7CmE,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ;AAEA,SAASC,OAAO,IAAIC,iCAAiC,QAAQ,2CAA2C;AACxG,SAASD,OAAO,IAAIE,iCAAiC,QAAQ,2CAA2C;AAExG,SAAS3E,KAAK,QAAQ,SAAS;AAC/B,cAAc,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["store","blocksStore","registerCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","deprecated","createRoot","dispatch","select","preferencesStore","registerLegacyWidgetBlock","registerWidgetGroupBlock","editorStore","privateApis","editorPrivateApis","Editor","unlock","jsx","_jsx","BackButton","__experimentalMainDashboardButton","initializeEditor","id","postType","postId","settings","initialEdits","isMediumOrBigger","window","matchMedia","matches","target","document","getElementById","root","setDefaults","fullscreenMode","themeStyles","welcomeGuide","welcomeGuideTemplate","allowRightClickOverrides","editorMode","fixedToolbar","hiddenBlockTypes","inactivePanels","openPanels","showBlockBreadcrumbs","showIconLabels","showListViewByDefault","isPublishSidebarEnabled","reapplyBlockTypeFilters","get","setIsListViewOpened","inserter","globalThis","IS_GUTENBERG_PLUGIN","enableFSEBlocks","__unstableEnableFullSiteEditingBlocks","documentMode","compatMode","console","warn","isIphone","navigator","userAgent","indexOf","addEventListener","event","editorScrollContainer","getElementsByClassName","scrollY","scrollTop","scrollTo","e","preventDefault","render","reinitializeEditor","since","version","default","__experimentalFullscreenModeClose"],"sources":["@wordpress/edit-post/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot } from '@wordpress/element';\nimport { dispatch, select } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport Editor from './editor';\nimport { unlock } from './lock-unlock';\n\nconst { BackButton: __experimentalMainDashboardButton } =\n\tunlock( editorPrivateApis );\n\n/**\n * Initializes and returns an instance of Editor.\n *\n * @param {string} id Unique identifier for editor instance.\n * @param {string} postType Post type of the post to edit.\n * @param {Object} postId ID of the post to edit.\n * @param {?Object} settings Editor settings object.\n * @param {Object} initialEdits Programmatic edits to apply initially, to be\n * considered as non-user-initiated (bypass for\n * unsaved changes prompt).\n */\nexport function initializeEditor(\n\tid,\n\tpostType,\n\tpostId,\n\tsettings,\n\tinitialEdits\n) {\n\tconst isMediumOrBigger = window.matchMedia( '(min-width: 782px)' ).matches;\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-post', {\n\t\tfullscreenMode: true,\n\t\tthemeStyles: true,\n\t\twelcomeGuide: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\teditorMode: 'visual',\n\t\tfixedToolbar: false,\n\t\thiddenBlockTypes: [],\n\t\tinactivePanels: [],\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowIconLabels: false,\n\t\tshowListViewByDefault: false,\n\t\tisPublishSidebarEnabled: true,\n\t} );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\n\t// Check if the block list view should be open by default.\n\t// If `distractionFree` mode is enabled, the block list view should not be open.\n\t// This behavior is disabled for small viewports.\n\tif (\n\t\tisMediumOrBigger &&\n\t\tselect( preferencesStore ).get( 'core', 'showListViewByDefault' ) &&\n\t\t! select( preferencesStore ).get( 'core', 'distractionFree' )\n\t) {\n\t\tdispatch( editorStore ).setIsListViewOpened( true );\n\t}\n\n\tregisterCoreBlocks();\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: settings.__unstableEnableFullSiteEditingBlocks,\n\t\t} );\n\t}\n\n\t// Show a console log warning if the browser is not in Standards rendering mode.\n\tconst documentMode =\n\t\tdocument.compatMode === 'CSS1Compat' ? 'Standards' : 'Quirks';\n\tif ( documentMode !== 'Standards' ) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.warn(\n\t\t\t\"Your browser is using Quirks Mode. \\nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins.\"\n\t\t);\n\t}\n\n\t// This is a temporary fix for a couple of issues specific to Webkit on iOS.\n\t// Without this hack the browser scrolls the mobile toolbar off-screen.\n\t// Once supported in Safari we can replace this in favor of preventScroll.\n\t// For details see issue #18632 and PR #18686\n\t// Specifically, we scroll `interface-interface-skeleton__body` to enable a fixed top toolbar.\n\t// But Mobile Safari forces the `html` element to scroll upwards, hiding the toolbar.\n\n\tconst isIphone = window.navigator.userAgent.indexOf( 'iPhone' ) !== -1;\n\tif ( isIphone ) {\n\t\twindow.addEventListener( 'scroll', ( event ) => {\n\t\t\tconst editorScrollContainer = document.getElementsByClassName(\n\t\t\t\t'interface-interface-skeleton__body'\n\t\t\t)[ 0 ];\n\t\t\tif ( event.target === document ) {\n\t\t\t\t// Scroll element into view by scrolling the editor container by the same amount\n\t\t\t\t// that Mobile Safari tried to scroll the html element upwards.\n\t\t\t\tif ( window.scrollY > 100 ) {\n\t\t\t\t\teditorScrollContainer.scrollTop =\n\t\t\t\t\t\teditorScrollContainer.scrollTop + window.scrollY;\n\t\t\t\t}\n\t\t\t\t// Undo unwanted scroll on html element, but only in the visual editor.\n\t\t\t\tif (\n\t\t\t\t\tdocument.getElementsByClassName( 'is-mode-visual' )[ 0 ]\n\t\t\t\t) {\n\t\t\t\t\twindow.scrollTo( 0, 0 );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<Editor\n\t\t\tsettings={ settings }\n\t\t\tpostId={ postId }\n\t\t\tpostType={ postType }\n\t\t\tinitialEdits={ initialEdits }\n\t\t/>\n\t);\n\n\treturn root;\n}\n\n/**\n * Used to reinitialize the editor after an error. Now it's a deprecated noop function.\n */\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editPost.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as __experimentalFullscreenModeClose } from './components/back-button/fullscreen-mode-close';\nexport { __experimentalMainDashboardButton };\nexport { store } from './store';\nexport * from './deprecated';\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SACCC,kBAAkB,EAClBC,4CAA4C,QACtC,0BAA0B;AACjC,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,QAAQ,EAAEC,MAAM,QAAQ,iBAAiB;AAClD,SAASP,KAAK,IAAIQ,gBAAgB,QAAQ,wBAAwB;AAClE,SACCC,yBAAyB,EACzBC,wBAAwB,QAClB,oBAAoB;AAC3B,SACCV,KAAK,IAAIW,WAAW,EACpBC,WAAW,IAAIC,iBAAiB,QAC1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ACA,IACCtC,QAAQ,CAACqC,sBAAsB,CAAE,gBAAiB,CAAC,CAAE,CAAC,CAAE,EACvD;UACDzC,MAAM,CAAC4C,QAAQ,CAAE,CAAC,EAAE,CAAE,CAAC;QACxB;MACD;IACD,CAAE,CAAC;EACJ;;EAEA;EACA5C,MAAM,CAACsC,gBAAgB,CAAE,UAAU,EAAIO,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EACzE9C,MAAM,CAACsC,gBAAgB,CAAE,MAAM,EAAIO,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EAErExC,IAAI,CAACyC,MAAM,eACVzD,IAAA,CAACH,MAAM;IACNU,QAAQ,EAAGA,QAAU;IACrBD,MAAM,EAAGA,MAAQ;IACjBD,QAAQ,EAAGA,QAAU;IACrBG,YAAY,EAAGA;EAAc,CAC7B,CACF,CAAC;EAED,OAAOQ,IAAI;AACZ;;AAEA;AACA;AACA;AACA,OAAO,SAAS0C,kBAAkBA,CAAA,EAAG;EACpCvE,UAAU,CAAE,gCAAgC,EAAE;IAC7CwE,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ;AAEA,SAASC,OAAO,IAAIC,iCAAiC,QAAQ,gDAAgD;AAC7G,SAAS5D,iCAAiC;AAC1C,SAASnB,KAAK,QAAQ,SAAS;AAC/B,cAAc,cAAc","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -21,6 +20,7 @@ import Editor from './editor';
21
20
  * @param {Object} postType Post type of the post to edit.
22
21
  * @param {Object} postId ID of the post to edit (unused right now)
23
22
  */
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
24
  export function initializeEditor(id, postType, postId) {
25
25
  dispatch(preferencesStore).setDefaults('core/edit-post', {
26
26
  editorMode: 'visual',
@@ -36,7 +36,7 @@ export function initializeEditor(id, postType, postId) {
36
36
  isPublishSidebarEnabled: true,
37
37
  fixedToolbar: false
38
38
  });
39
- return createElement(Editor, {
39
+ return /*#__PURE__*/_jsx(Editor, {
40
40
  postId: postId,
41
41
  postType: postType
42
42
  });
@@ -1 +1 @@
1
- {"version":3,"names":["dispatch","store","preferencesStore","Editor","initializeEditor","id","postType","postId","setDefaults","editorMode","fullscreenMode","inactivePanels","openPanels","welcomeGuide","hiddenBlockTypes","isPublishSidebarEnabled","fixedToolbar","createElement"],"sources":["@wordpress/edit-post/src/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport '@wordpress/core-data';\nimport '@wordpress/format-library';\nimport { dispatch } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nexport { store } from './store';\nimport Editor from './editor';\n\n/**\n * Initializes the Editor and returns a componentProvider\n * that can be registered with `AppRegistry.registerComponent`\n *\n * @param {string} id Unique identifier for editor instance.\n * @param {Object} postType Post type of the post to edit.\n * @param {Object} postId ID of the post to edit (unused right now)\n */\nexport function initializeEditor( id, postType, postId ) {\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-post', {\n\t\teditorMode: 'visual',\n\t\tfullscreenMode: true,\n\t\tinactivePanels: [],\n\t\topenPanels: [ 'post-status' ],\n\t\twelcomeGuide: true,\n\t} );\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\thiddenBlockTypes: [],\n\t\tinactivePanels: [],\n\t\topenPanels: [ 'post-status' ],\n\t\tisPublishSidebarEnabled: true,\n\t\tfixedToolbar: false,\n\t} );\n\n\treturn <Editor postId={ postId } postType={ postType } />;\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAO,sBAAsB;AAC7B,OAAO,2BAA2B;AAClC,SAASA,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,wBAAwB;;AAElE;AACA;AACA;AACA,SAASD,KAAK,QAAQ,SAAS;AAC/B,OAAOE,MAAM,MAAM,UAAU;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAAEC,EAAE,EAAEC,QAAQ,EAAEC,MAAM,EAAG;EACxDP,QAAQ,CAAEE,gBAAiB,CAAC,CAACM,WAAW,CAAE,gBAAgB,EAAE;IAC3DC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,IAAI;IACpBC,cAAc,EAAE,EAAE;IAClBC,UAAU,EAAE,CAAE,aAAa,CAAE;IAC7BC,YAAY,EAAE;EACf,CAAE,CAAC;EACHb,QAAQ,CAAEE,gBAAiB,CAAC,CAACM,WAAW,CAAE,MAAM,EAAE;IACjDM,gBAAgB,EAAE,EAAE;IACpBH,cAAc,EAAE,EAAE;IAClBC,UAAU,EAAE,CAAE,aAAa,CAAE;IAC7BG,uBAAuB,EAAE,IAAI;IAC7BC,YAAY,EAAE;EACf,CAAE,CAAC;EAEH,OAAOC,aAAA,CAACd,MAAM;IAACI,MAAM,EAAGA,MAAQ;IAACD,QAAQ,EAAGA;EAAU,CAAE,CAAC;AAC1D","ignoreList":[]}
1
+ {"version":3,"names":["dispatch","store","preferencesStore","Editor","jsx","_jsx","initializeEditor","id","postType","postId","setDefaults","editorMode","fullscreenMode","inactivePanels","openPanels","welcomeGuide","hiddenBlockTypes","isPublishSidebarEnabled","fixedToolbar"],"sources":["@wordpress/edit-post/src/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport '@wordpress/core-data';\nimport '@wordpress/format-library';\nimport { dispatch } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nexport { store } from './store';\nimport Editor from './editor';\n\n/**\n * Initializes the Editor and returns a componentProvider\n * that can be registered with `AppRegistry.registerComponent`\n *\n * @param {string} id Unique identifier for editor instance.\n * @param {Object} postType Post type of the post to edit.\n * @param {Object} postId ID of the post to edit (unused right now)\n */\nexport function initializeEditor( id, postType, postId ) {\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-post', {\n\t\teditorMode: 'visual',\n\t\tfullscreenMode: true,\n\t\tinactivePanels: [],\n\t\topenPanels: [ 'post-status' ],\n\t\twelcomeGuide: true,\n\t} );\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\thiddenBlockTypes: [],\n\t\tinactivePanels: [],\n\t\topenPanels: [ 'post-status' ],\n\t\tisPublishSidebarEnabled: true,\n\t\tfixedToolbar: false,\n\t} );\n\n\treturn <Editor postId={ postId } postType={ postType } />;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,sBAAsB;AAC7B,OAAO,2BAA2B;AAClC,SAASA,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,wBAAwB;;AAElE;AACA;AACA;AACA,SAASD,KAAK,QAAQ,SAAS;AAC/B,OAAOE,MAAM,MAAM,UAAU;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,SAAAC,GAAA,IAAAC,IAAA;AAQA,OAAO,SAASC,gBAAgBA,CAAEC,EAAE,EAAEC,QAAQ,EAAEC,MAAM,EAAG;EACxDT,QAAQ,CAAEE,gBAAiB,CAAC,CAACQ,WAAW,CAAE,gBAAgB,EAAE;IAC3DC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,IAAI;IACpBC,cAAc,EAAE,EAAE;IAClBC,UAAU,EAAE,CAAE,aAAa,CAAE;IAC7BC,YAAY,EAAE;EACf,CAAE,CAAC;EACHf,QAAQ,CAAEE,gBAAiB,CAAC,CAACQ,WAAW,CAAE,MAAM,EAAE;IACjDM,gBAAgB,EAAE,EAAE;IACpBH,cAAc,EAAE,EAAE;IAClBC,UAAU,EAAE,CAAE,aAAa,CAAE;IAC7BG,uBAAuB,EAAE,IAAI;IAC7BC,YAAY,EAAE;EACf,CAAE,CAAC;EAEH,oBAAOb,IAAA,CAACF,MAAM;IAACM,MAAM,EAAGA,MAAQ;IAACD,QAAQ,EAAGA;EAAU,CAAE,CAAC;AAC1D","ignoreList":[]}
@@ -526,6 +526,6 @@ export const getEditedPostTemplate = createRegistrySelector(select => () => {
526
526
  const defaultTemplateId = select(coreStore).getDefaultTemplateId({
527
527
  slug: slugToCheck
528
528
  });
529
- return select(coreStore).getEditedEntityRecord('postType', 'wp_template', defaultTemplateId);
529
+ return defaultTemplateId ? select(coreStore).getEditedEntityRecord('postType', 'wp_template', defaultTemplateId) : null;
530
530
  });
531
531
  //# sourceMappingURL=selectors.js.map