@wordpress/editor 14.15.1 → 14.17.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 (215) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +20 -20
  3. package/build/bindings/pattern-overrides.js +1 -1
  4. package/build/bindings/pattern-overrides.js.map +1 -1
  5. package/build/components/collab-sidebar/index.js +1 -4
  6. package/build/components/collab-sidebar/index.js.map +1 -1
  7. package/build/components/document-outline/check.js +3 -3
  8. package/build/components/document-outline/check.js.map +1 -1
  9. package/build/components/document-outline/index.js +2 -2
  10. package/build/components/document-outline/index.js.map +1 -1
  11. package/build/components/header/index.js +14 -8
  12. package/build/components/header/index.js.map +1 -1
  13. package/build/components/page-attributes/check.js +3 -3
  14. package/build/components/page-attributes/check.js.map +1 -1
  15. package/build/components/post-excerpt/index.js +1 -1
  16. package/build/components/post-excerpt/index.js.map +1 -1
  17. package/build/components/post-pending-status/check.js +3 -3
  18. package/build/components/post-pending-status/check.js.map +1 -1
  19. package/build/components/post-preview-button/index.js +7 -1
  20. package/build/components/post-preview-button/index.js.map +1 -1
  21. package/build/components/post-publish-button/index.js +2 -2
  22. package/build/components/post-publish-button/index.js.map +1 -1
  23. package/build/components/post-publish-button/post-publish-button-or-toggle.js +1 -1
  24. package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  25. package/build/components/post-schedule/check.js +3 -3
  26. package/build/components/post-schedule/check.js.map +1 -1
  27. package/build/components/post-schedule/index.js +1 -1
  28. package/build/components/post-schedule/index.js.map +1 -1
  29. package/build/components/post-sticky/check.js +3 -3
  30. package/build/components/post-sticky/check.js.map +1 -1
  31. package/build/components/post-taxonomies/check.js +1 -1
  32. package/build/components/post-taxonomies/check.js.map +1 -1
  33. package/build/components/post-template/swap-template-button.js +1 -1
  34. package/build/components/post-template/swap-template-button.js.map +1 -1
  35. package/build/components/post-trash/check.js +3 -3
  36. package/build/components/post-trash/check.js.map +1 -1
  37. package/build/components/post-type-support-check/index.js +6 -6
  38. package/build/components/post-type-support-check/index.js.map +1 -1
  39. package/build/components/post-url/check.js +3 -3
  40. package/build/components/post-url/check.js.map +1 -1
  41. package/build/components/preferences-modal/index.js +1 -1
  42. package/build/components/preferences-modal/index.js.map +1 -1
  43. package/build/components/provider/index.js +25 -17
  44. package/build/components/provider/index.js.map +1 -1
  45. package/build/components/sidebar/post-summary.js +1 -1
  46. package/build/components/sidebar/post-summary.js.map +1 -1
  47. package/build/components/start-page-options/index.js +15 -6
  48. package/build/components/start-page-options/index.js.map +1 -1
  49. package/build/components/theme-support-check/index.js +4 -4
  50. package/build/components/theme-support-check/index.js.map +1 -1
  51. package/build/components/visual-editor/edit-template-blocks-notification.js +1 -1
  52. package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  53. package/build/components/visual-editor/index.js +2 -2
  54. package/build/components/visual-editor/index.js.map +1 -1
  55. package/build/dataviews/fields/content-preview/content-preview-view.js +101 -0
  56. package/build/dataviews/fields/content-preview/content-preview-view.js.map +1 -0
  57. package/build/dataviews/fields/content-preview/index.js +26 -0
  58. package/build/dataviews/fields/content-preview/index.js.map +1 -0
  59. package/build/dataviews/store/private-actions.js +3 -1
  60. package/build/dataviews/store/private-actions.js.map +1 -1
  61. package/build/store/private-actions.js +1 -1
  62. package/build/store/private-actions.js.map +1 -1
  63. package/build/store/private-selectors.js +7 -1
  64. package/build/store/private-selectors.js.map +1 -1
  65. package/build/store/selectors.js +4 -4
  66. package/build/store/selectors.js.map +1 -1
  67. package/build-module/bindings/pattern-overrides.js +1 -1
  68. package/build-module/bindings/pattern-overrides.js.map +1 -1
  69. package/build-module/components/collab-sidebar/index.js +1 -4
  70. package/build-module/components/collab-sidebar/index.js.map +1 -1
  71. package/build-module/components/document-outline/check.js +3 -3
  72. package/build-module/components/document-outline/check.js.map +1 -1
  73. package/build-module/components/document-outline/index.js +2 -2
  74. package/build-module/components/document-outline/index.js.map +1 -1
  75. package/build-module/components/header/index.js +14 -8
  76. package/build-module/components/header/index.js.map +1 -1
  77. package/build-module/components/page-attributes/check.js +3 -3
  78. package/build-module/components/page-attributes/check.js.map +1 -1
  79. package/build-module/components/post-excerpt/index.js +1 -1
  80. package/build-module/components/post-excerpt/index.js.map +1 -1
  81. package/build-module/components/post-pending-status/check.js +3 -3
  82. package/build-module/components/post-pending-status/check.js.map +1 -1
  83. package/build-module/components/post-preview-button/index.js +7 -1
  84. package/build-module/components/post-preview-button/index.js.map +1 -1
  85. package/build-module/components/post-publish-button/index.js +2 -2
  86. package/build-module/components/post-publish-button/index.js.map +1 -1
  87. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +1 -1
  88. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  89. package/build-module/components/post-schedule/check.js +3 -3
  90. package/build-module/components/post-schedule/check.js.map +1 -1
  91. package/build-module/components/post-schedule/index.js +1 -1
  92. package/build-module/components/post-schedule/index.js.map +1 -1
  93. package/build-module/components/post-sticky/check.js +3 -3
  94. package/build-module/components/post-sticky/check.js.map +1 -1
  95. package/build-module/components/post-taxonomies/check.js +1 -1
  96. package/build-module/components/post-taxonomies/check.js.map +1 -1
  97. package/build-module/components/post-template/swap-template-button.js +1 -1
  98. package/build-module/components/post-template/swap-template-button.js.map +1 -1
  99. package/build-module/components/post-trash/check.js +3 -3
  100. package/build-module/components/post-trash/check.js.map +1 -1
  101. package/build-module/components/post-type-support-check/index.js +6 -6
  102. package/build-module/components/post-type-support-check/index.js.map +1 -1
  103. package/build-module/components/post-url/check.js +3 -3
  104. package/build-module/components/post-url/check.js.map +1 -1
  105. package/build-module/components/preferences-modal/index.js +1 -1
  106. package/build-module/components/preferences-modal/index.js.map +1 -1
  107. package/build-module/components/provider/index.js +25 -17
  108. package/build-module/components/provider/index.js.map +1 -1
  109. package/build-module/components/sidebar/post-summary.js +1 -1
  110. package/build-module/components/sidebar/post-summary.js.map +1 -1
  111. package/build-module/components/start-page-options/index.js +15 -6
  112. package/build-module/components/start-page-options/index.js.map +1 -1
  113. package/build-module/components/theme-support-check/index.js +4 -4
  114. package/build-module/components/theme-support-check/index.js.map +1 -1
  115. package/build-module/components/visual-editor/edit-template-blocks-notification.js +1 -1
  116. package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  117. package/build-module/components/visual-editor/index.js +2 -2
  118. package/build-module/components/visual-editor/index.js.map +1 -1
  119. package/build-module/dataviews/fields/content-preview/content-preview-view.js +95 -0
  120. package/build-module/dataviews/fields/content-preview/content-preview-view.js.map +1 -0
  121. package/build-module/dataviews/fields/content-preview/index.js +19 -0
  122. package/build-module/dataviews/fields/content-preview/index.js.map +1 -0
  123. package/build-module/dataviews/store/private-actions.js +2 -1
  124. package/build-module/dataviews/store/private-actions.js.map +1 -1
  125. package/build-module/store/private-actions.js +1 -1
  126. package/build-module/store/private-actions.js.map +1 -1
  127. package/build-module/store/private-selectors.js +7 -1
  128. package/build-module/store/private-selectors.js.map +1 -1
  129. package/build-module/store/selectors.js +4 -4
  130. package/build-module/store/selectors.js.map +1 -1
  131. package/build-style/style-rtl.css +35 -31
  132. package/build-style/style.css +35 -31
  133. package/build-types/components/autocompleters/user.d.ts +5 -1
  134. package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
  135. package/build-types/components/document-outline/check.d.ts +5 -5
  136. package/build-types/components/document-outline/check.d.ts.map +1 -1
  137. package/build-types/components/header/index.d.ts.map +1 -1
  138. package/build-types/components/page-attributes/check.d.ts +5 -5
  139. package/build-types/components/page-attributes/check.d.ts.map +1 -1
  140. package/build-types/components/post-author/hook.d.ts +1 -1
  141. package/build-types/components/post-pending-status/check.d.ts +5 -5
  142. package/build-types/components/post-pending-status/check.d.ts.map +1 -1
  143. package/build-types/components/post-preview-button/index.d.ts.map +1 -1
  144. package/build-types/components/post-schedule/check.d.ts +5 -5
  145. package/build-types/components/post-schedule/check.d.ts.map +1 -1
  146. package/build-types/components/post-sticky/check.d.ts +5 -5
  147. package/build-types/components/post-sticky/check.d.ts.map +1 -1
  148. package/build-types/components/post-taxonomies/check.d.ts +2 -2
  149. package/build-types/components/post-taxonomies/check.d.ts.map +1 -1
  150. package/build-types/components/post-taxonomies/index.d.ts +1 -1
  151. package/build-types/components/post-taxonomies/index.d.ts.map +1 -1
  152. package/build-types/components/post-template/hooks.d.ts +1 -1
  153. package/build-types/components/post-template/hooks.d.ts.map +1 -1
  154. package/build-types/components/post-trash/check.d.ts +5 -5
  155. package/build-types/components/post-trash/check.d.ts.map +1 -1
  156. package/build-types/components/post-type-support-check/index.d.ts +8 -8
  157. package/build-types/components/post-type-support-check/index.d.ts.map +1 -1
  158. package/build-types/components/post-url/check.d.ts +5 -5
  159. package/build-types/components/post-url/check.d.ts.map +1 -1
  160. package/build-types/components/provider/index.d.ts +9 -9
  161. package/build-types/components/provider/index.d.ts.map +1 -1
  162. package/build-types/components/start-page-options/index.d.ts.map +1 -1
  163. package/build-types/components/theme-support-check/index.d.ts +6 -6
  164. package/build-types/components/theme-support-check/index.d.ts.map +1 -1
  165. package/build-types/components/visual-editor/edit-template-blocks-notification.d.ts +1 -1
  166. package/build-types/dataviews/fields/content-preview/content-preview-view.d.ts +5 -0
  167. package/build-types/dataviews/fields/content-preview/content-preview-view.d.ts.map +1 -0
  168. package/build-types/dataviews/fields/content-preview/index.d.ts +8 -0
  169. package/build-types/dataviews/fields/content-preview/index.d.ts.map +1 -0
  170. package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
  171. package/build-types/store/private-selectors.d.ts.map +1 -1
  172. package/build-types/store/selectors.d.ts +5 -5
  173. package/build-types/store/selectors.d.ts.map +1 -1
  174. package/package.json +37 -37
  175. package/src/bindings/pattern-overrides.js +1 -1
  176. package/src/components/autocompleters/style.scss +1 -1
  177. package/src/components/collab-sidebar/index.js +1 -4
  178. package/src/components/document-bar/style.scss +4 -2
  179. package/src/components/document-outline/check.js +3 -3
  180. package/src/components/document-outline/index.js +2 -2
  181. package/src/components/document-tools/style.scss +3 -2
  182. package/src/components/header/index.js +26 -23
  183. package/src/components/page-attributes/check.js +3 -3
  184. package/src/components/post-excerpt/index.js +1 -1
  185. package/src/components/post-featured-image/style.scss +4 -2
  186. package/src/components/post-pending-status/check.js +3 -3
  187. package/src/components/post-preview-button/index.js +5 -1
  188. package/src/components/post-publish-button/index.js +2 -2
  189. package/src/components/post-publish-button/post-publish-button-or-toggle.js +1 -1
  190. package/src/components/post-publish-panel/style.scss +5 -3
  191. package/src/components/post-schedule/check.js +3 -3
  192. package/src/components/post-schedule/index.js +1 -1
  193. package/src/components/post-sticky/check.js +3 -3
  194. package/src/components/post-taxonomies/check.js +1 -1
  195. package/src/components/post-template/swap-template-button.js +1 -1
  196. package/src/components/post-text-editor/style.scss +4 -2
  197. package/src/components/post-trash/check.js +3 -3
  198. package/src/components/post-type-support-check/index.js +6 -6
  199. package/src/components/post-url/check.js +3 -3
  200. package/src/components/preferences-modal/index.js +1 -1
  201. package/src/components/provider/index.js +32 -20
  202. package/src/components/sidebar/post-summary.js +1 -1
  203. package/src/components/start-page-options/index.js +20 -12
  204. package/src/components/theme-support-check/index.js +4 -4
  205. package/src/components/visual-editor/edit-template-blocks-notification.js +1 -1
  206. package/src/components/visual-editor/index.js +2 -2
  207. package/src/dataviews/fields/content-preview/content-preview-view.tsx +108 -0
  208. package/src/dataviews/fields/content-preview/index.tsx +21 -0
  209. package/src/dataviews/fields/content-preview/style.scss +21 -0
  210. package/src/dataviews/store/private-actions.ts +4 -0
  211. package/src/store/private-actions.js +1 -1
  212. package/src/store/private-selectors.js +15 -8
  213. package/src/store/selectors.js +4 -4
  214. package/src/style.scss +1 -0
  215. package/tsconfig.tsbuildinfo +1 -1
@@ -19,10 +19,10 @@ var _constants = require("../../store/constants");
19
19
  /**
20
20
  * Wrapper component that renders its children only if the post can be trashed.
21
21
  *
22
- * @param {Object} props The component props.
23
- * @param {React.ReactElement} props.children The child components.
22
+ * @param {Object} props The component props.
23
+ * @param {React.ReactNode} props.children The child components.
24
24
  *
25
- * @return {React.ReactElement | null} The rendered child components or null if the post can't be trashed.
25
+ * @return {React.ReactNode} The rendered child components or null if the post can't be trashed.
26
26
  */
27
27
  function PostTrashCheck({
28
28
  children
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_coreData","_store","_constants","PostTrashCheck","children","canTrashPost","useSelect","select","isEditedPostNew","getCurrentPostId","getCurrentPostType","editorStore","canUser","coreStore","postType","postId","isNew","canUserDelete","kind","name","id","GLOBAL_POST_TYPES","includes"],"sources":["@wordpress/editor/src/components/post-trash/check.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { GLOBAL_POST_TYPES } from '../../store/constants';\n\n/**\n * Wrapper component that renders its children only if the post can be trashed.\n *\n * @param {Object} props The component props.\n * @param {React.ReactElement} props.children The child components.\n *\n * @return {React.ReactElement | null} The rendered child components or null if the post can't be trashed.\n */\nexport default function PostTrashCheck( { children } ) {\n\tconst { canTrashPost } = useSelect( ( select ) => {\n\t\tconst { isEditedPostNew, getCurrentPostId, getCurrentPostType } =\n\t\t\tselect( editorStore );\n\t\tconst { canUser } = select( coreStore );\n\t\tconst postType = getCurrentPostType();\n\t\tconst postId = getCurrentPostId();\n\t\tconst isNew = isEditedPostNew();\n\t\tconst canUserDelete = !! postId\n\t\t\t? canUser( 'delete', {\n\t\t\t\t\tkind: 'postType',\n\t\t\t\t\tname: postType,\n\t\t\t\t\tid: postId,\n\t\t\t } )\n\t\t\t: false;\n\n\t\treturn {\n\t\t\tcanTrashPost:\n\t\t\t\t( ! isNew || postId ) &&\n\t\t\t\tcanUserDelete &&\n\t\t\t\t! GLOBAL_POST_TYPES.includes( postType ),\n\t\t};\n\t}, [] );\n\tif ( ! canTrashPost ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAIA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASI,cAAcA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACtD,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACjD,MAAM;MAAEC,eAAe;MAAEC,gBAAgB;MAAEC;IAAmB,CAAC,GAC9DH,MAAM,CAAEI,YAAY,CAAC;IACtB,MAAM;MAAEC;IAAQ,CAAC,GAAGL,MAAM,CAAEM,eAAU,CAAC;IACvC,MAAMC,QAAQ,GAAGJ,kBAAkB,CAAC,CAAC;IACrC,MAAMK,MAAM,GAAGN,gBAAgB,CAAC,CAAC;IACjC,MAAMO,KAAK,GAAGR,eAAe,CAAC,CAAC;IAC/B,MAAMS,aAAa,GAAG,CAAC,CAAEF,MAAM,GAC5BH,OAAO,CAAE,QAAQ,EAAE;MACnBM,IAAI,EAAE,UAAU;MAChBC,IAAI,EAAEL,QAAQ;MACdM,EAAE,EAAEL;IACJ,CAAE,CAAC,GACH,KAAK;IAER,OAAO;MACNV,YAAY,EACX,CAAE,CAAEW,KAAK,IAAID,MAAM,KACnBE,aAAa,IACb,CAAEI,4BAAiB,CAACC,QAAQ,CAAER,QAAS;IACzC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,IAAK,CAAET,YAAY,EAAG;IACrB,OAAO,IAAI;EACZ;EAEA,OAAOD,QAAQ;AAChB","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_coreData","_store","_constants","PostTrashCheck","children","canTrashPost","useSelect","select","isEditedPostNew","getCurrentPostId","getCurrentPostType","editorStore","canUser","coreStore","postType","postId","isNew","canUserDelete","kind","name","id","GLOBAL_POST_TYPES","includes"],"sources":["@wordpress/editor/src/components/post-trash/check.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { GLOBAL_POST_TYPES } from '../../store/constants';\n\n/**\n * Wrapper component that renders its children only if the post can be trashed.\n *\n * @param {Object} props The component props.\n * @param {React.ReactNode} props.children The child components.\n *\n * @return {React.ReactNode} The rendered child components or null if the post can't be trashed.\n */\nexport default function PostTrashCheck( { children } ) {\n\tconst { canTrashPost } = useSelect( ( select ) => {\n\t\tconst { isEditedPostNew, getCurrentPostId, getCurrentPostType } =\n\t\t\tselect( editorStore );\n\t\tconst { canUser } = select( coreStore );\n\t\tconst postType = getCurrentPostType();\n\t\tconst postId = getCurrentPostId();\n\t\tconst isNew = isEditedPostNew();\n\t\tconst canUserDelete = !! postId\n\t\t\t? canUser( 'delete', {\n\t\t\t\t\tkind: 'postType',\n\t\t\t\t\tname: postType,\n\t\t\t\t\tid: postId,\n\t\t\t } )\n\t\t\t: false;\n\n\t\treturn {\n\t\t\tcanTrashPost:\n\t\t\t\t( ! isNew || postId ) &&\n\t\t\t\tcanUserDelete &&\n\t\t\t\t! GLOBAL_POST_TYPES.includes( postType ),\n\t\t};\n\t}, [] );\n\tif ( ! canTrashPost ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAIA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASI,cAAcA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACtD,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACjD,MAAM;MAAEC,eAAe;MAAEC,gBAAgB;MAAEC;IAAmB,CAAC,GAC9DH,MAAM,CAAEI,YAAY,CAAC;IACtB,MAAM;MAAEC;IAAQ,CAAC,GAAGL,MAAM,CAAEM,eAAU,CAAC;IACvC,MAAMC,QAAQ,GAAGJ,kBAAkB,CAAC,CAAC;IACrC,MAAMK,MAAM,GAAGN,gBAAgB,CAAC,CAAC;IACjC,MAAMO,KAAK,GAAGR,eAAe,CAAC,CAAC;IAC/B,MAAMS,aAAa,GAAG,CAAC,CAAEF,MAAM,GAC5BH,OAAO,CAAE,QAAQ,EAAE;MACnBM,IAAI,EAAE,UAAU;MAChBC,IAAI,EAAEL,QAAQ;MACdM,EAAE,EAAEL;IACJ,CAAE,CAAC,GACH,KAAK;IAER,OAAO;MACNV,YAAY,EACX,CAAE,CAAEW,KAAK,IAAID,MAAM,KACnBE,aAAa,IACb,CAAEI,4BAAiB,CAACC,QAAQ,CAAER,QAAS;IACzC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,IAAK,CAAET,YAAY,EAAG;IACrB,OAAO,IAAI;EACZ;EAEA,OAAOD,QAAQ;AAChB","ignoreList":[]}
@@ -20,13 +20,13 @@ var _store = require("../../store");
20
20
  * A component which renders its own children only if the current editor post
21
21
  * type supports one of the given `supportKeys` prop.
22
22
  *
23
- * @param {Object} props Props.
24
- * @param {React.ReactElement} props.children Children to be rendered if post
25
- * type supports.
26
- * @param {(string|string[])} props.supportKeys String or string array of keys
27
- * to test.
23
+ * @param {Object} props Props.
24
+ * @param {React.ReactNode} props.children Children to be rendered if post
25
+ * type supports.
26
+ * @param {(string|string[])} props.supportKeys String or string array of keys
27
+ * to test.
28
28
  *
29
- * @return {React.ReactElement} The component to be rendered.
29
+ * @return {React.ReactNode} The component to be rendered.
30
30
  */
31
31
  function PostTypeSupportCheck({
32
32
  children,
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_coreData","_store","PostTypeSupportCheck","children","supportKeys","postType","useSelect","select","getEditedPostAttribute","editorStore","getPostType","coreStore","isSupported","Array","isArray","some","key","supports","_default","exports","default"],"sources":["@wordpress/editor/src/components/post-type-support-check/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * A component which renders its own children only if the current editor post\n * type supports one of the given `supportKeys` prop.\n *\n * @param {Object} props Props.\n * @param {React.ReactElement} props.children Children to be rendered if post\n * type supports.\n * @param {(string|string[])} props.supportKeys String or string array of keys\n * to test.\n *\n * @return {React.ReactElement} The component to be rendered.\n */\nfunction PostTypeSupportCheck( { children, supportKeys } ) {\n\tconst postType = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\treturn getPostType( getEditedPostAttribute( 'type' ) );\n\t}, [] );\n\tlet isSupported = !! postType;\n\tif ( postType ) {\n\t\tisSupported = (\n\t\t\tArray.isArray( supportKeys ) ? supportKeys : [ supportKeys ]\n\t\t).some( ( key ) => !! postType.supports[ key ] );\n\t}\n\n\tif ( ! isSupported ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default PostTypeSupportCheck;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASG,oBAAoBA,CAAE;EAAEC,QAAQ;EAAEC;AAAY,CAAC,EAAG;EAC1D,MAAMC,QAAQ,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACzC,MAAM;MAAEC;IAAuB,CAAC,GAAGD,MAAM,CAAEE,YAAY,CAAC;IACxD,MAAM;MAAEC;IAAY,CAAC,GAAGH,MAAM,CAAEI,eAAU,CAAC;IAC3C,OAAOD,WAAW,CAAEF,sBAAsB,CAAE,MAAO,CAAE,CAAC;EACvD,CAAC,EAAE,EAAG,CAAC;EACP,IAAII,WAAW,GAAG,CAAC,CAAEP,QAAQ;EAC7B,IAAKA,QAAQ,EAAG;IACfO,WAAW,GAAG,CACbC,KAAK,CAACC,OAAO,CAAEV,WAAY,CAAC,GAAGA,WAAW,GAAG,CAAEA,WAAW,CAAE,EAC3DW,IAAI,CAAIC,GAAG,IAAM,CAAC,CAAEX,QAAQ,CAACY,QAAQ,CAAED,GAAG,CAAG,CAAC;EACjD;EAEA,IAAK,CAAEJ,WAAW,EAAG;IACpB,OAAO,IAAI;EACZ;EAEA,OAAOT,QAAQ;AAChB;AAAC,IAAAe,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEclB,oBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_coreData","_store","PostTypeSupportCheck","children","supportKeys","postType","useSelect","select","getEditedPostAttribute","editorStore","getPostType","coreStore","isSupported","Array","isArray","some","key","supports","_default","exports","default"],"sources":["@wordpress/editor/src/components/post-type-support-check/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * A component which renders its own children only if the current editor post\n * type supports one of the given `supportKeys` prop.\n *\n * @param {Object} props Props.\n * @param {React.ReactNode} props.children Children to be rendered if post\n * type supports.\n * @param {(string|string[])} props.supportKeys String or string array of keys\n * to test.\n *\n * @return {React.ReactNode} The component to be rendered.\n */\nfunction PostTypeSupportCheck( { children, supportKeys } ) {\n\tconst postType = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\treturn getPostType( getEditedPostAttribute( 'type' ) );\n\t}, [] );\n\tlet isSupported = !! postType;\n\tif ( postType ) {\n\t\tisSupported = (\n\t\t\tArray.isArray( supportKeys ) ? supportKeys : [ supportKeys ]\n\t\t).some( ( key ) => !! postType.supports[ key ] );\n\t}\n\n\tif ( ! isSupported ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default PostTypeSupportCheck;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASG,oBAAoBA,CAAE;EAAEC,QAAQ;EAAEC;AAAY,CAAC,EAAG;EAC1D,MAAMC,QAAQ,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACzC,MAAM;MAAEC;IAAuB,CAAC,GAAGD,MAAM,CAAEE,YAAY,CAAC;IACxD,MAAM;MAAEC;IAAY,CAAC,GAAGH,MAAM,CAAEI,eAAU,CAAC;IAC3C,OAAOD,WAAW,CAAEF,sBAAsB,CAAE,MAAO,CAAE,CAAC;EACvD,CAAC,EAAE,EAAG,CAAC;EACP,IAAII,WAAW,GAAG,CAAC,CAAEP,QAAQ;EAC7B,IAAKA,QAAQ,EAAG;IACfO,WAAW,GAAG,CACbC,KAAK,CAACC,OAAO,CAAEV,WAAY,CAAC,GAAGA,WAAW,GAAG,CAAEA,WAAW,CAAE,EAC3DW,IAAI,CAAIC,GAAG,IAAM,CAAC,CAAEX,QAAQ,CAACY,QAAQ,CAAED,GAAG,CAAG,CAAC;EACjD;EAEA,IAAK,CAAEJ,WAAW,EAAG;IACpB,OAAO,IAAI;EACZ;EAEA,OAAOT,QAAQ;AAChB;AAAC,IAAAe,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEclB,oBAAoB","ignoreList":[]}
@@ -18,10 +18,10 @@ var _store = require("../../store");
18
18
  /**
19
19
  * Check if the post URL is valid and visible.
20
20
  *
21
- * @param {Object} props The component props.
22
- * @param {React.ReactElement} props.children The child components.
21
+ * @param {Object} props The component props.
22
+ * @param {React.ReactNode} props.children The child components.
23
23
  *
24
- * @return {React.ReactElement} The child components if the post URL is valid and visible, otherwise null.
24
+ * @return {React.ReactNode} The child components if the post URL is valid and visible, otherwise null.
25
25
  */
26
26
  function PostURLCheck({
27
27
  children
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_coreData","_store","PostURLCheck","children","isVisible","useSelect","select","postTypeSlug","editorStore","getCurrentPostType","postType","coreStore","getPostType","viewable","post","getCurrentPost","link","permalinkParts","getPermalinkParts"],"sources":["@wordpress/editor/src/components/post-url/check.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Check if the post URL is valid and visible.\n *\n * @param {Object} props The component props.\n * @param {React.ReactElement} props.children The child components.\n *\n * @return {React.ReactElement} The child components if the post URL is valid and visible, otherwise null.\n */\nexport default function PostURLCheck( { children } ) {\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\tif ( ! postType?.viewable ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\tif ( ! post.link ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst permalinkParts = select( editorStore ).getPermalinkParts();\n\t\tif ( ! permalinkParts ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}, [] );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASG,YAAYA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACpD,MAAMC,SAAS,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAC1C,MAAMC,YAAY,GAAGD,MAAM,CAAEE,YAAY,CAAC,CAACC,kBAAkB,CAAC,CAAC;IAC/D,MAAMC,QAAQ,GAAGJ,MAAM,CAAEK,eAAU,CAAC,CAACC,WAAW,CAAEL,YAAa,CAAC;IAChE,IAAK,CAAEG,QAAQ,EAAEG,QAAQ,EAAG;MAC3B,OAAO,KAAK;IACb;IAEA,MAAMC,IAAI,GAAGR,MAAM,CAAEE,YAAY,CAAC,CAACO,cAAc,CAAC,CAAC;IACnD,IAAK,CAAED,IAAI,CAACE,IAAI,EAAG;MAClB,OAAO,KAAK;IACb;IAEA,MAAMC,cAAc,GAAGX,MAAM,CAAEE,YAAY,CAAC,CAACU,iBAAiB,CAAC,CAAC;IAChE,IAAK,CAAED,cAAc,EAAG;MACvB,OAAO,KAAK;IACb;IAEA,OAAO,IAAI;EACZ,CAAC,EAAE,EAAG,CAAC;EAEP,IAAK,CAAEb,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,OAAOD,QAAQ;AAChB","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_coreData","_store","PostURLCheck","children","isVisible","useSelect","select","postTypeSlug","editorStore","getCurrentPostType","postType","coreStore","getPostType","viewable","post","getCurrentPost","link","permalinkParts","getPermalinkParts"],"sources":["@wordpress/editor/src/components/post-url/check.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Check if the post URL is valid and visible.\n *\n * @param {Object} props The component props.\n * @param {React.ReactNode} props.children The child components.\n *\n * @return {React.ReactNode} The child components if the post URL is valid and visible, otherwise null.\n */\nexport default function PostURLCheck( { children } ) {\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\tif ( ! postType?.viewable ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\tif ( ! post.link ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst permalinkParts = select( editorStore ).getPermalinkParts();\n\t\tif ( ! permalinkParts ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}, [] );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASG,YAAYA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACpD,MAAMC,SAAS,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAC1C,MAAMC,YAAY,GAAGD,MAAM,CAAEE,YAAY,CAAC,CAACC,kBAAkB,CAAC,CAAC;IAC/D,MAAMC,QAAQ,GAAGJ,MAAM,CAAEK,eAAU,CAAC,CAACC,WAAW,CAAEL,YAAa,CAAC;IAChE,IAAK,CAAEG,QAAQ,EAAEG,QAAQ,EAAG;MAC3B,OAAO,KAAK;IACb;IAEA,MAAMC,IAAI,GAAGR,MAAM,CAAEE,YAAY,CAAC,CAACO,cAAc,CAAC,CAAC;IACnD,IAAK,CAAED,IAAI,CAACE,IAAI,EAAG;MAClB,OAAO,KAAK;IACb;IAEA,MAAMC,cAAc,GAAGX,MAAM,CAAEE,YAAY,CAAC,CAACU,iBAAiB,CAAC,CAAC;IAChE,IAAK,CAAED,cAAc,EAAG;MACvB,OAAO,KAAK;IACb;IAEA,OAAO,IAAI;EACZ,CAAC,EAAE,EAAG,CAAC;EAEP,IAAK,CAAEb,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,OAAOD,QAAQ;AAChB","ignoreList":[]}
@@ -186,7 +186,7 @@ function PreferencesModalContents({
186
186
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(PreferenceToggleControl, {
187
187
  scope: "core",
188
188
  featureName: "keepCaretInsideBlock",
189
- help: (0, _i18n.__)('Keeps the text cursor within the block boundaries, aiding users with screen readers by preventing unintentional cursor movement outside the block.'),
189
+ help: (0, _i18n.__)('Keeps the text cursor within blocks while navigating with arrow keys, preventing it from moving to other blocks and enhancing accessibility for keyboard users.'),
190
190
  label: (0, _i18n.__)('Contain text cursor inside block')
191
191
  })
192
192
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(PreferencesModalSection, {
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_compose","_data","_element","_preferences","_interface","_enablePanel","_interopRequireDefault","_enablePluginDocumentSettingPanel","_enablePublishSidebar","_blockVisibility","_postTaxonomies","_check","_check2","_check3","_postTypeSupportCheck","_store","_lockUnlock","_jsxRuntime","PreferencesModal","PreferencesModalTabs","PreferencesModalSection","PreferenceToggleControl","unlock","preferencesPrivateApis","EditorPreferencesModal","extraSections","isActive","useSelect","select","interfaceStore","isModalActive","closeModal","useDispatch","jsx","children","PreferencesModalContents","isLargeViewport","useViewportMatch","showBlockBreadcrumbsOption","getEditorSettings","editorStore","get","preferencesStore","isRichEditingEnabled","richEditingEnabled","isDistractionFreeEnabled","setIsListViewOpened","setIsInserterOpened","set","setPreference","sections","useMemo","name","tabLabel","__","content","jsxs","Fragment","title","scope","featureName","help","label","description","default","Slot","taxonomyWrapper","taxonomy","labels","menu_name","panelName","slug","supportKeys","general","onToggle","appearance","window","__experimentalMediaProcessing","filter","Boolean"],"sources":["@wordpress/editor/src/components/preferences-modal/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\n\nimport { __ } from '@wordpress/i18n';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport {\n\tstore as preferencesStore,\n\tprivateApis as preferencesPrivateApis,\n} from '@wordpress/preferences';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport EnablePanelOption from './enable-panel';\nimport EnablePluginDocumentSettingPanelOption from './enable-plugin-document-setting-panel';\nimport EnablePublishSidebarOption from './enable-publish-sidebar';\nimport BlockVisibility from './block-visibility';\nimport PostTaxonomies from '../post-taxonomies';\nimport PostFeaturedImageCheck from '../post-featured-image/check';\nimport PostExcerptCheck from '../post-excerpt/check';\nimport PageAttributesCheck from '../page-attributes/check';\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tPreferencesModal,\n\tPreferencesModalTabs,\n\tPreferencesModalSection,\n\tPreferenceToggleControl,\n} = unlock( preferencesPrivateApis );\n\nexport default function EditorPreferencesModal( { extraSections = {} } ) {\n\tconst isActive = useSelect( ( select ) => {\n\t\treturn select( interfaceStore ).isModalActive( 'editor/preferences' );\n\t}, [] );\n\tconst { closeModal } = useDispatch( interfaceStore );\n\n\tif ( ! isActive ) {\n\t\treturn null;\n\t}\n\n\t// Please wrap all contents inside PreferencesModalContents to prevent all\n\t// hooks from executing when the modal is not open.\n\treturn (\n\t\t<PreferencesModal closeModal={ closeModal }>\n\t\t\t<PreferencesModalContents extraSections={ extraSections } />\n\t\t</PreferencesModal>\n\t);\n}\n\nfunction PreferencesModalContents( { extraSections = {} } ) {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst showBlockBreadcrumbsOption = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditorSettings } = select( editorStore );\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst isRichEditingEnabled = getEditorSettings().richEditingEnabled;\n\t\t\tconst isDistractionFreeEnabled = get( 'core', 'distractionFree' );\n\t\t\treturn (\n\t\t\t\t! isDistractionFreeEnabled &&\n\t\t\t\tisLargeViewport &&\n\t\t\t\tisRichEditingEnabled\n\t\t\t);\n\t\t},\n\t\t[ isLargeViewport ]\n\t);\n\tconst { setIsListViewOpened, setIsInserterOpened } =\n\t\tuseDispatch( editorStore );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\n\tconst sections = useMemo(\n\t\t() =>\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\tname: 'general',\n\t\t\t\t\ttabLabel: __( 'General' ),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'Interface' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"showListViewByDefault\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Opens the List View sidebar by default.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Always open List View' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{ showBlockBreadcrumbsOption && (\n\t\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\t\tfeatureName=\"showBlockBreadcrumbs\"\n\t\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t\t'Display the block hierarchy trail at the bottom of the editor.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Show block breadcrumbs' ) }\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\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"allowRightClickOverrides\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Allows contextual List View menus via right-click, overriding browser defaults.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t'Allow right-click contextual menus'\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\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"enableChoosePatternModal\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Shows starter patterns when creating a new page.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Show starter patterns' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'Document settings' ) }\n\t\t\t\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t\t\t\t'Select what settings are shown in the document panel.'\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\t<EnablePluginDocumentSettingPanelOption.Slot />\n\t\t\t\t\t\t\t\t<PostTaxonomies\n\t\t\t\t\t\t\t\t\ttaxonomyWrapper={ ( content, taxonomy ) => (\n\t\t\t\t\t\t\t\t\t\t<EnablePanelOption\n\t\t\t\t\t\t\t\t\t\t\tlabel={ taxonomy.labels.menu_name }\n\t\t\t\t\t\t\t\t\t\t\tpanelName={ `taxonomy-panel-${ taxonomy.slug }` }\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\t<PostFeaturedImageCheck>\n\t\t\t\t\t\t\t\t\t<EnablePanelOption\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Featured image' ) }\n\t\t\t\t\t\t\t\t\t\tpanelName=\"featured-image\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</PostFeaturedImageCheck>\n\t\t\t\t\t\t\t\t<PostExcerptCheck>\n\t\t\t\t\t\t\t\t\t<EnablePanelOption\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Excerpt' ) }\n\t\t\t\t\t\t\t\t\t\tpanelName=\"post-excerpt\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</PostExcerptCheck>\n\t\t\t\t\t\t\t\t<PostTypeSupportCheck\n\t\t\t\t\t\t\t\t\tsupportKeys={ [ 'comments', 'trackbacks' ] }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<EnablePanelOption\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Discussion' ) }\n\t\t\t\t\t\t\t\t\t\tpanelName=\"discussion-panel\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</PostTypeSupportCheck>\n\t\t\t\t\t\t\t\t<PageAttributesCheck>\n\t\t\t\t\t\t\t\t\t<EnablePanelOption\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Page attributes' ) }\n\t\t\t\t\t\t\t\t\t\tpanelName=\"page-attributes\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</PageAttributesCheck>\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\t\ttitle={ __( 'Publishing' ) }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<EnablePublishSidebarOption\n\t\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t\t'Review settings, such as visibility and tags.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t\t'Enable pre-publish checks'\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</PreferencesModalSection>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ extraSections?.general }\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'appearance',\n\t\t\t\t\ttabLabel: __( 'Appearance' ),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\ttitle={ __( 'Appearance' ) }\n\t\t\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t\t\t'Customize the editor interface to suit your needs.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tfeatureName=\"fixedToolbar\"\n\t\t\t\t\t\t\t\tonToggle={ () =>\n\t\t\t\t\t\t\t\t\tsetPreference(\n\t\t\t\t\t\t\t\t\t\t'core',\n\t\t\t\t\t\t\t\t\t\t'distractionFree',\n\t\t\t\t\t\t\t\t\t\tfalse\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\thelp={ __(\n\t\t\t\t\t\t\t\t\t'Access all block and document tools in a single place.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tfeatureName=\"distractionFree\"\n\t\t\t\t\t\t\t\tonToggle={ () => {\n\t\t\t\t\t\t\t\t\tsetPreference(\n\t\t\t\t\t\t\t\t\t\t'core',\n\t\t\t\t\t\t\t\t\t\t'fixedToolbar',\n\t\t\t\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tsetIsInserterOpened( false );\n\t\t\t\t\t\t\t\t\tsetIsListViewOpened( false );\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'Reduce visual distractions by hiding the toolbar and other elements to focus on writing.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tlabel={ __( 'Distraction free' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tfeatureName=\"focusMode\"\n\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t'Highlights the current block and fades other content.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tlabel={ __( 'Spotlight mode' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ extraSections?.appearance }\n\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'accessibility',\n\t\t\t\t\ttabLabel: __( 'Accessibility' ),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'Navigation' ) }\n\t\t\t\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t\t\t\t'Optimize the editing experience for enhanced control.'\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\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"keepCaretInsideBlock\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Keeps the text cursor within the block boundaries, aiding users with screen readers by preventing unintentional cursor movement outside the block.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t'Contain text cursor inside block'\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</PreferencesModalSection>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'Interface' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"showIconLabels\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Show button text labels' ) }\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Show text instead of icons on buttons across the interface.'\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</PreferencesModalSection>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'blocks',\n\t\t\t\t\ttabLabel: __( 'Blocks' ),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PreferencesModalSection title={ __( 'Inserter' ) }>\n\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"mostUsedBlocks\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Adds a category with the most frequently used blocks in the inserter.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Show most used blocks' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'Manage block visibility' ) }\n\t\t\t\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t\t\t\t\"Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later.\"\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\t<BlockVisibility />\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\twindow.__experimentalMediaProcessing && {\n\t\t\t\t\tname: 'media',\n\t\t\t\t\ttabLabel: __( 'Media' ),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'General' ) }\n\t\t\t\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t\t\t\t'Customize options related to the media upload flow.'\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\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core/media\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"optimizeOnUpload\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Compress media items before uploading to the server.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Pre-upload compression' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core/media\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"requireApproval\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Require approval step when optimizing existing media.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Approval step' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t].filter( Boolean ),\n\t\t[\n\t\t\tshowBlockBreadcrumbsOption,\n\t\t\textraSections,\n\t\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AAtC,WAAA,CAAAgB,GAAA,EAAAhB,WAAA,CAAAwC,QAAA;MAAAvB,QAAA,eACC,IAAAjB,WAAA,CAAAuC,IAAA,EAACpC,uBAAuB;QACvBsC,KAAK,EAAG,IAAAJ,QAAE,EAAE,SAAU,CAAG;QACzBS,WAAW,EAAG,IAAAT,QAAE,EACf,qDACD,CAAG;QAAApB,QAAA,gBAEH,IAAAjB,WAAA,CAAAgB,GAAA,EAACZ,uBAAuB;UACvBsC,KAAK,EAAC,YAAY;UAClBC,WAAW,EAAC,kBAAkB;UAC9BC,IAAI,EAAG,IAAAP,QAAE,EACR,sDACD,CAAG;UACHQ,KAAK,EAAG,IAAAR,QAAE,EAAE,wBAAyB;QAAG,CACxC,CAAC,eACF,IAAArC,WAAA,CAAAgB,GAAA,EAACZ,uBAAuB;UACvBsC,KAAK,EAAC,YAAY;UAClBC,WAAW,EAAC,iBAAiB;UAC7BC,IAAI,EAAG,IAAAP,QAAE,EACR,uDACD,CAAG;UACHQ,KAAK,EAAG,IAAAR,QAAE,EAAE,eAAgB;QAAG,CAC/B,CAAC;MAAA,CACsB;IAAC,CACzB;EAEJ,CAAC,CACD,CAACwB,MAAM,CAAEC,OAAQ,CAAC,EACpB,CACCzC,0BAA0B,EAC1Bb,aAAa,EACbsB,mBAAmB,EACnBD,mBAAmB,EACnBG,aAAa,EACbb,eAAe,CAEjB,CAAC;EAED,oBAAO,IAAAnB,WAAA,CAAAgB,GAAA,EAACd,oBAAoB;IAAC+B,QAAQ,EAAGA;EAAU,CAAE,CAAC;AACtD","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_compose","_data","_element","_preferences","_interface","_enablePanel","_interopRequireDefault","_enablePluginDocumentSettingPanel","_enablePublishSidebar","_blockVisibility","_postTaxonomies","_check","_check2","_check3","_postTypeSupportCheck","_store","_lockUnlock","_jsxRuntime","PreferencesModal","PreferencesModalTabs","PreferencesModalSection","PreferenceToggleControl","unlock","preferencesPrivateApis","EditorPreferencesModal","extraSections","isActive","useSelect","select","interfaceStore","isModalActive","closeModal","useDispatch","jsx","children","PreferencesModalContents","isLargeViewport","useViewportMatch","showBlockBreadcrumbsOption","getEditorSettings","editorStore","get","preferencesStore","isRichEditingEnabled","richEditingEnabled","isDistractionFreeEnabled","setIsListViewOpened","setIsInserterOpened","set","setPreference","sections","useMemo","name","tabLabel","__","content","jsxs","Fragment","title","scope","featureName","help","label","description","default","Slot","taxonomyWrapper","taxonomy","labels","menu_name","panelName","slug","supportKeys","general","onToggle","appearance","window","__experimentalMediaProcessing","filter","Boolean"],"sources":["@wordpress/editor/src/components/preferences-modal/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\n\nimport { __ } from '@wordpress/i18n';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport {\n\tstore as preferencesStore,\n\tprivateApis as preferencesPrivateApis,\n} from '@wordpress/preferences';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport EnablePanelOption from './enable-panel';\nimport EnablePluginDocumentSettingPanelOption from './enable-plugin-document-setting-panel';\nimport EnablePublishSidebarOption from './enable-publish-sidebar';\nimport BlockVisibility from './block-visibility';\nimport PostTaxonomies from '../post-taxonomies';\nimport PostFeaturedImageCheck from '../post-featured-image/check';\nimport PostExcerptCheck from '../post-excerpt/check';\nimport PageAttributesCheck from '../page-attributes/check';\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tPreferencesModal,\n\tPreferencesModalTabs,\n\tPreferencesModalSection,\n\tPreferenceToggleControl,\n} = unlock( preferencesPrivateApis );\n\nexport default function EditorPreferencesModal( { extraSections = {} } ) {\n\tconst isActive = useSelect( ( select ) => {\n\t\treturn select( interfaceStore ).isModalActive( 'editor/preferences' );\n\t}, [] );\n\tconst { closeModal } = useDispatch( interfaceStore );\n\n\tif ( ! isActive ) {\n\t\treturn null;\n\t}\n\n\t// Please wrap all contents inside PreferencesModalContents to prevent all\n\t// hooks from executing when the modal is not open.\n\treturn (\n\t\t<PreferencesModal closeModal={ closeModal }>\n\t\t\t<PreferencesModalContents extraSections={ extraSections } />\n\t\t</PreferencesModal>\n\t);\n}\n\nfunction PreferencesModalContents( { extraSections = {} } ) {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst showBlockBreadcrumbsOption = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditorSettings } = select( editorStore );\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst isRichEditingEnabled = getEditorSettings().richEditingEnabled;\n\t\t\tconst isDistractionFreeEnabled = get( 'core', 'distractionFree' );\n\t\t\treturn (\n\t\t\t\t! isDistractionFreeEnabled &&\n\t\t\t\tisLargeViewport &&\n\t\t\t\tisRichEditingEnabled\n\t\t\t);\n\t\t},\n\t\t[ isLargeViewport ]\n\t);\n\tconst { setIsListViewOpened, setIsInserterOpened } =\n\t\tuseDispatch( editorStore );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\n\tconst sections = useMemo(\n\t\t() =>\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\tname: 'general',\n\t\t\t\t\ttabLabel: __( 'General' ),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'Interface' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"showListViewByDefault\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Opens the List View sidebar by default.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Always open List View' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{ showBlockBreadcrumbsOption && (\n\t\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\t\tfeatureName=\"showBlockBreadcrumbs\"\n\t\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t\t'Display the block hierarchy trail at the bottom of the editor.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Show block breadcrumbs' ) }\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\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"allowRightClickOverrides\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Allows contextual List View menus via right-click, overriding browser defaults.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t'Allow right-click contextual menus'\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\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"enableChoosePatternModal\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Shows starter patterns when creating a new page.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Show starter patterns' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'Document settings' ) }\n\t\t\t\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t\t\t\t'Select what settings are shown in the document panel.'\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\t<EnablePluginDocumentSettingPanelOption.Slot />\n\t\t\t\t\t\t\t\t<PostTaxonomies\n\t\t\t\t\t\t\t\t\ttaxonomyWrapper={ ( content, taxonomy ) => (\n\t\t\t\t\t\t\t\t\t\t<EnablePanelOption\n\t\t\t\t\t\t\t\t\t\t\tlabel={ taxonomy.labels.menu_name }\n\t\t\t\t\t\t\t\t\t\t\tpanelName={ `taxonomy-panel-${ taxonomy.slug }` }\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\t<PostFeaturedImageCheck>\n\t\t\t\t\t\t\t\t\t<EnablePanelOption\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Featured image' ) }\n\t\t\t\t\t\t\t\t\t\tpanelName=\"featured-image\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</PostFeaturedImageCheck>\n\t\t\t\t\t\t\t\t<PostExcerptCheck>\n\t\t\t\t\t\t\t\t\t<EnablePanelOption\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Excerpt' ) }\n\t\t\t\t\t\t\t\t\t\tpanelName=\"post-excerpt\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</PostExcerptCheck>\n\t\t\t\t\t\t\t\t<PostTypeSupportCheck\n\t\t\t\t\t\t\t\t\tsupportKeys={ [ 'comments', 'trackbacks' ] }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<EnablePanelOption\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Discussion' ) }\n\t\t\t\t\t\t\t\t\t\tpanelName=\"discussion-panel\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</PostTypeSupportCheck>\n\t\t\t\t\t\t\t\t<PageAttributesCheck>\n\t\t\t\t\t\t\t\t\t<EnablePanelOption\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Page attributes' ) }\n\t\t\t\t\t\t\t\t\t\tpanelName=\"page-attributes\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</PageAttributesCheck>\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\t\ttitle={ __( 'Publishing' ) }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<EnablePublishSidebarOption\n\t\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t\t'Review settings, such as visibility and tags.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t\t'Enable pre-publish checks'\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</PreferencesModalSection>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ extraSections?.general }\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'appearance',\n\t\t\t\t\ttabLabel: __( 'Appearance' ),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\ttitle={ __( 'Appearance' ) }\n\t\t\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t\t\t'Customize the editor interface to suit your needs.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tfeatureName=\"fixedToolbar\"\n\t\t\t\t\t\t\t\tonToggle={ () =>\n\t\t\t\t\t\t\t\t\tsetPreference(\n\t\t\t\t\t\t\t\t\t\t'core',\n\t\t\t\t\t\t\t\t\t\t'distractionFree',\n\t\t\t\t\t\t\t\t\t\tfalse\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\thelp={ __(\n\t\t\t\t\t\t\t\t\t'Access all block and document tools in a single place.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tfeatureName=\"distractionFree\"\n\t\t\t\t\t\t\t\tonToggle={ () => {\n\t\t\t\t\t\t\t\t\tsetPreference(\n\t\t\t\t\t\t\t\t\t\t'core',\n\t\t\t\t\t\t\t\t\t\t'fixedToolbar',\n\t\t\t\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tsetIsInserterOpened( false );\n\t\t\t\t\t\t\t\t\tsetIsListViewOpened( false );\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'Reduce visual distractions by hiding the toolbar and other elements to focus on writing.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tlabel={ __( 'Distraction free' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tfeatureName=\"focusMode\"\n\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t'Highlights the current block and fades other content.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tlabel={ __( 'Spotlight mode' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ extraSections?.appearance }\n\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'accessibility',\n\t\t\t\t\ttabLabel: __( 'Accessibility' ),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'Navigation' ) }\n\t\t\t\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t\t\t\t'Optimize the editing experience for enhanced control.'\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\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"keepCaretInsideBlock\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Keeps the text cursor within blocks while navigating with arrow keys, preventing it from moving to other blocks and enhancing accessibility for keyboard users.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t'Contain text cursor inside block'\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</PreferencesModalSection>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'Interface' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"showIconLabels\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Show button text labels' ) }\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Show text instead of icons on buttons across the interface.'\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</PreferencesModalSection>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'blocks',\n\t\t\t\t\ttabLabel: __( 'Blocks' ),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PreferencesModalSection title={ __( 'Inserter' ) }>\n\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"mostUsedBlocks\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Adds a category with the most frequently used blocks in the inserter.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Show most used blocks' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'Manage block visibility' ) }\n\t\t\t\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t\t\t\t\"Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later.\"\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\t<BlockVisibility />\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\twindow.__experimentalMediaProcessing && {\n\t\t\t\t\tname: 'media',\n\t\t\t\t\ttabLabel: __( 'Media' ),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'General' ) }\n\t\t\t\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t\t\t\t'Customize options related to the media upload flow.'\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\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core/media\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"optimizeOnUpload\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Compress media items before uploading to the server.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Pre-upload compression' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core/media\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"requireApproval\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Require approval step when optimizing existing media.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Approval step' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t].filter( Boolean ),\n\t\t[\n\t\t\tshowBlockBreadcrumbsOption,\n\t\t\textraSections,\n\t\t\tsetIsInserterOpened,\n\t\t\tsetIsListViewOpened,\n\t\t\tsetPreference,\n\t\t\tisLargeViewport,\n\t\t]\n\t);\n\n\treturn <PreferencesModalTabs sections={ sections } />;\n}\n"],"mappings":";;;;;;;;AAIA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAIA,IAAAK,UAAA,GAAAL,OAAA;AAKA,IAAAM,YAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,iCAAA,GAAAD,sBAAA,CAAAP,OAAA;AACA,IAAAS,qBAAA,GAAAF,sBAAA,CAAAP,OAAA;AACA,IAAAU,gBAAA,GAAAH,sBAAA,CAAAP,OAAA;AACA,IAAAW,eAAA,GAAAJ,sBAAA,CAAAP,OAAA;AACA,IAAAY,MAAA,GAAAL,sBAAA,CAAAP,OAAA;AACA,IAAAa,OAAA,GAAAN,sBAAA,CAAAP,OAAA;AACA,IAAAc,OAAA,GAAAP,sBAAA,CAAAP,OAA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,CACD,CAACwB,MAAM,CAAEC,OAAQ,CAAC,EACpB,CACCzC,0BAA0B,EAC1Bb,aAAa,EACbsB,mBAAmB,EACnBD,mBAAmB,EACnBG,aAAa,EACbb,eAAe,CAEjB,CAAC;EAED,oBAAO,IAAAnB,WAAA,CAAAgB,GAAA,EAACd,oBAAoB;IAAC+B,QAAQ,EAAGA;EAAU,CAAE,CAAC;AACtD","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -56,6 +57,11 @@ const noop = () => {};
56
57
  */
57
58
  const NON_CONTEXTUAL_POST_TYPES = ['wp_block', 'wp_navigation', 'wp_template_part'];
58
59
 
60
+ /**
61
+ * These are rendering modes that the editor supports.
62
+ */
63
+ const RENDERING_MODES = ['post-only', 'template-locked'];
64
+
59
65
  /**
60
66
  * Depending on the post, template and template mode,
61
67
  * returns the appropriate blocks and change handlers for the block editor provider.
@@ -155,8 +161,7 @@ const ExperimentalEditorProvider = exports.ExperimentalEditorProvider = (0, _wit
155
161
  isReady,
156
162
  mode,
157
163
  defaultMode,
158
- postTypeEntities,
159
- hasLoadedPostObject
164
+ postTypeEntities
160
165
  } = (0, _data.useSelect)(select => {
161
166
  const {
162
167
  getEditorSettings,
@@ -165,16 +170,19 @@ const ExperimentalEditorProvider = exports.ExperimentalEditorProvider = (0, _wit
165
170
  __unstableIsEditorReady
166
171
  } = select(_store.store);
167
172
  const {
168
- getEntitiesConfig
173
+ getEntitiesConfig,
174
+ getPostType,
175
+ hasFinishedResolution
169
176
  } = select(_coreData.store);
170
- const postTypeObject = select(_coreData.store).getPostType(post.type);
171
- const _hasLoadedPostObject = select(_coreData.store).hasFinishedResolution('getPostType', [post.type]);
177
+ const postTypeSupports = getPostType(post.type)?.supports;
178
+ const hasLoadedPostObject = hasFinishedResolution('getPostType', [post.type]);
179
+ const _defaultMode = Array.isArray(postTypeSupports?.editor) ? postTypeSupports.editor.find(features => 'default-mode' in features)?.['default-mode'] : undefined;
180
+ const hasDefaultMode = RENDERING_MODES.includes(_defaultMode);
172
181
  return {
173
- hasLoadedPostObject: _hasLoadedPostObject,
174
182
  editorSettings: getEditorSettings(),
175
- isReady: __unstableIsEditorReady(),
183
+ isReady: __unstableIsEditorReady() && hasLoadedPostObject,
176
184
  mode: getRenderingMode(),
177
- defaultMode: hasTemplate && postTypeObject?.default_rendering_mode ? postTypeObject?.default_rendering_mode : 'post-only',
185
+ defaultMode: hasTemplate && hasDefaultMode ? _defaultMode : 'post-only',
178
186
  selection: getEditorSelection(),
179
187
  postTypeEntities: post.type === 'wp_template' ? getEntitiesConfig('postType') : null
180
188
  };
@@ -270,7 +278,7 @@ const ExperimentalEditorProvider = exports.ExperimentalEditorProvider = (0, _wit
270
278
 
271
279
  // Register the editor commands.
272
280
  (0, _commands.default)();
273
- if (!isReady || !mode || !hasLoadedPostObject) {
281
+ if (!isReady || !mode) {
274
282
  return null;
275
283
  }
276
284
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_coreData.EntityProvider, {
@@ -306,14 +314,14 @@ const ExperimentalEditorProvider = exports.ExperimentalEditorProvider = (0, _wit
306
314
  *
307
315
  * All modification and changes are performed to the `@wordpress/core-data` store.
308
316
  *
309
- * @param {Object} props The component props.
310
- * @param {Object} [props.post] The post object to edit. This is required.
311
- * @param {Object} [props.__unstableTemplate] The template object wrapper the edited post.
312
- * This is optional and can only be used when the post type supports templates (like posts and pages).
313
- * @param {Object} [props.settings] The settings object to use for the editor.
314
- * This is optional and can be used to override the default settings.
315
- * @param {Element} [props.children] Children elements for which the BlockEditorProvider context should apply.
316
- * This is optional.
317
+ * @param {Object} props The component props.
318
+ * @param {Object} [props.post] The post object to edit. This is required.
319
+ * @param {Object} [props.__unstableTemplate] The template object wrapper the edited post.
320
+ * This is optional and can only be used when the post type supports templates (like posts and pages).
321
+ * @param {Object} [props.settings] The settings object to use for the editor.
322
+ * This is optional and can be used to override the default settings.
323
+ * @param {React.ReactNode} [props.children] Children elements for which the BlockEditorProvider context should apply.
324
+ * This is optional.
317
325
  *
318
326
  * @example
319
327
  * ```jsx
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_data","_i18n","_coreData","_blockEditor","_notices","_patterns","_blocks","_withRegistryProvider","_interopRequireDefault","_store","_useBlockEditorSettings","_lockUnlock","_disableNonPageContentBlocks","_navigationBlockEditingMode","_useHideBlocksFromInserter","_commands","_blockRemovalWarnings","_startPageOptions","_keyboardShortcutHelpModal","_contentOnlySettingsMenu","_startTemplateOptions","_globalKeyboardShortcuts","_patternRenameModal","_patternDuplicateModal","_templatePartMenuItems","_jsxRuntime","ExperimentalBlockEditorProvider","unlock","blockEditorPrivateApis","PatternsMenuItems","editPatternsPrivateApis","noop","NON_CONTEXTUAL_POST_TYPES","useBlockEditorProps","post","template","mode","rootLevelPost","postBlocks","onInput","onChange","useEntityBlockEditor","type","id","templateBlocks","onInputTemplate","onChangeTemplate","maybeNavigationBlocks","useMemo","createBlock","ref","templateLock","blocks","disableRootLevelChanges","ExperimentalEditorProvider","exports","withRegistryProvider","settings","recovery","initialEdits","children","BlockEditorProviderComponent","__unstableTemplate","hasTemplate","editorSettings","selection","isReady","defaultMode","postTypeEntities","hasLoadedPostObject","useSelect","select","getEditorSettings","getEditorSelection","getRenderingMode","__unstableIsEditorReady","editorStore","getEntitiesConfig","coreStore","postTypeObject","getPostType","_hasLoadedPostObject","hasFinishedResolution","default_rendering_mode","shouldRenderTemplate","defaultBlockContext","postContext","slug","postType","split","postTypeNames","map","entity","name","match","join","includes","postId","templateSlug","undefined","blockEditorSettings","useBlockEditorSettings","updatePostLock","setupEditor","updateEditorSettings","setCurrentTemplateId","setEditedPost","setRenderingMode","useDispatch","createWarningNotice","noticesStore","useLayoutEffect","postLock","autosave","__","actions","label","url","editLink","useEffect","useHideBlocksFromInserter","useCommands","jsx","EntityProvider","kind","BlockContextProvider","value","jsxs","useSubRegistry","isPreviewMode","Fragment","default","EditorProvider","props","BlockEditorProvider","_default"],"sources":["@wordpress/editor/src/components/provider/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect, useLayoutEffect, useMemo } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tEntityProvider,\n\tuseEntityBlockEditor,\n\tstore as coreStore,\n} from '@wordpress/core-data';\nimport {\n\tBlockEditorProvider,\n\tBlockContextProvider,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { privateApis as editPatternsPrivateApis } from '@wordpress/patterns';\nimport { createBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport withRegistryProvider from './with-registry-provider';\nimport { store as editorStore } from '../../store';\nimport useBlockEditorSettings from './use-block-editor-settings';\nimport { unlock } from '../../lock-unlock';\nimport DisableNonPageContentBlocks from './disable-non-page-content-blocks';\nimport NavigationBlockEditingMode from './navigation-block-editing-mode';\nimport { useHideBlocksFromInserter } from './use-hide-blocks-from-inserter';\nimport useCommands from '../commands';\nimport BlockRemovalWarnings from '../block-removal-warnings';\nimport StartPageOptions from '../start-page-options';\nimport KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';\nimport ContentOnlySettingsMenu from '../block-settings-menu/content-only-settings-menu';\nimport StartTemplateOptions from '../start-template-options';\nimport EditorKeyboardShortcuts from '../global-keyboard-shortcuts';\nimport PatternRenameModal from '../pattern-rename-modal';\nimport PatternDuplicateModal from '../pattern-duplicate-modal';\nimport TemplatePartMenuItems from '../template-part-menu-items';\n\nconst { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );\nconst { PatternsMenuItems } = unlock( editPatternsPrivateApis );\n\nconst noop = () => {};\n\n/**\n * These are global entities that are only there to split blocks into logical units\n * They don't provide a \"context\" for the current post/page being rendered.\n * So we should not use their ids as post context. This is important to allow post blocks\n * (post content, post title) to be used within them without issues.\n */\nconst NON_CONTEXTUAL_POST_TYPES = [\n\t'wp_block',\n\t'wp_navigation',\n\t'wp_template_part',\n];\n\n/**\n * Depending on the post, template and template mode,\n * returns the appropriate blocks and change handlers for the block editor provider.\n *\n * @param {Array} post Block list.\n * @param {boolean} template Whether the page content has focus (and the surrounding template is inert). If `true` return page content blocks. Default `false`.\n * @param {string} mode Rendering mode.\n *\n * @example\n * ```jsx\n * const [ blocks, onInput, onChange ] = useBlockEditorProps( post, template, mode );\n * ```\n *\n * @return {Array} Block editor props.\n */\nfunction useBlockEditorProps( post, template, mode ) {\n\tconst rootLevelPost = mode === 'template-locked' ? 'template' : 'post';\n\tconst [ postBlocks, onInput, onChange ] = useEntityBlockEditor(\n\t\t'postType',\n\t\tpost.type,\n\t\t{ id: post.id }\n\t);\n\tconst [ templateBlocks, onInputTemplate, onChangeTemplate ] =\n\t\tuseEntityBlockEditor( 'postType', template?.type, {\n\t\t\tid: template?.id,\n\t\t} );\n\tconst maybeNavigationBlocks = useMemo( () => {\n\t\tif ( post.type === 'wp_navigation' ) {\n\t\t\treturn [\n\t\t\t\tcreateBlock( 'core/navigation', {\n\t\t\t\t\tref: post.id,\n\t\t\t\t\t// As the parent editor is locked with `templateLock`, the template locking\n\t\t\t\t\t// must be explicitly \"unset\" on the block itself to allow the user to modify\n\t\t\t\t\t// the block's content.\n\t\t\t\t\ttemplateLock: false,\n\t\t\t\t} ),\n\t\t\t];\n\t\t}\n\t}, [ post.type, post.id ] );\n\n\t// It is important that we don't create a new instance of blocks on every change\n\t// We should only create a new instance if the blocks them selves change, not a dependency of them.\n\tconst blocks = useMemo( () => {\n\t\tif ( maybeNavigationBlocks ) {\n\t\t\treturn maybeNavigationBlocks;\n\t\t}\n\n\t\tif ( rootLevelPost === 'template' ) {\n\t\t\treturn templateBlocks;\n\t\t}\n\n\t\treturn postBlocks;\n\t}, [ maybeNavigationBlocks, rootLevelPost, templateBlocks, postBlocks ] );\n\n\t// Handle fallback to postBlocks outside of the above useMemo, to ensure\n\t// that constructed block templates that call `createBlock` are not generated\n\t// too frequently. This ensures that clientIds are stable.\n\tconst disableRootLevelChanges =\n\t\t( !! template && mode === 'template-locked' ) ||\n\t\tpost.type === 'wp_navigation';\n\tif ( disableRootLevelChanges ) {\n\t\treturn [ blocks, noop, noop ];\n\t}\n\n\treturn [\n\t\tblocks,\n\t\trootLevelPost === 'post' ? onInput : onInputTemplate,\n\t\trootLevelPost === 'post' ? onChange : onChangeTemplate,\n\t];\n}\n\n/**\n * This component provides the editor context and manages the state of the block editor.\n *\n * @param {Object} props The component props.\n * @param {Object} props.post The post object.\n * @param {Object} props.settings The editor settings.\n * @param {boolean} props.recovery Indicates if the editor is in recovery mode.\n * @param {Array} props.initialEdits The initial edits for the editor.\n * @param {Object} props.children The child components.\n * @param {Object} [props.BlockEditorProviderComponent] The block editor provider component to use. Defaults to ExperimentalBlockEditorProvider.\n * @param {Object} [props.__unstableTemplate] The template object.\n *\n * @example\n * ```jsx\n * <ExperimentalEditorProvider\n * post={ post }\n * settings={ settings }\n * recovery={ recovery }\n * initialEdits={ initialEdits }\n * __unstableTemplate={ template }\n * >\n * { children }\n * </ExperimentalEditorProvider>\n *\n * @return {Object} The rendered ExperimentalEditorProvider component.\n */\nexport const ExperimentalEditorProvider = withRegistryProvider(\n\t( {\n\t\tpost,\n\t\tsettings,\n\t\trecovery,\n\t\tinitialEdits,\n\t\tchildren,\n\t\tBlockEditorProviderComponent = ExperimentalBlockEditorProvider,\n\t\t__unstableTemplate: template,\n\t} ) => {\n\t\tconst hasTemplate = !! template;\n\t\tconst {\n\t\t\teditorSettings,\n\t\t\tselection,\n\t\t\tisReady,\n\t\t\tmode,\n\t\t\tdefaultMode,\n\t\t\tpostTypeEntities,\n\t\t\thasLoadedPostObject,\n\t\t} = useSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\tgetEditorSettings,\n\t\t\t\t\tgetEditorSelection,\n\t\t\t\t\tgetRenderingMode,\n\t\t\t\t\t__unstableIsEditorReady,\n\t\t\t\t} = select( editorStore );\n\t\t\t\tconst { getEntitiesConfig } = select( coreStore );\n\n\t\t\t\tconst postTypeObject = select( coreStore ).getPostType(\n\t\t\t\t\tpost.type\n\t\t\t\t);\n\n\t\t\t\tconst _hasLoadedPostObject = select(\n\t\t\t\t\tcoreStore\n\t\t\t\t).hasFinishedResolution( 'getPostType', [ post.type ] );\n\n\t\t\t\treturn {\n\t\t\t\t\thasLoadedPostObject: _hasLoadedPostObject,\n\t\t\t\t\teditorSettings: getEditorSettings(),\n\t\t\t\t\tisReady: __unstableIsEditorReady(),\n\t\t\t\t\tmode: getRenderingMode(),\n\t\t\t\t\tdefaultMode:\n\t\t\t\t\t\thasTemplate && postTypeObject?.default_rendering_mode\n\t\t\t\t\t\t\t? postTypeObject?.default_rendering_mode\n\t\t\t\t\t\t\t: 'post-only',\n\t\t\t\t\tselection: getEditorSelection(),\n\t\t\t\t\tpostTypeEntities:\n\t\t\t\t\t\tpost.type === 'wp_template'\n\t\t\t\t\t\t\t? getEntitiesConfig( 'postType' )\n\t\t\t\t\t\t\t: null,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ post.type, hasTemplate ]\n\t\t);\n\n\t\tconst shouldRenderTemplate = !! template && mode !== 'post-only';\n\t\tconst rootLevelPost = shouldRenderTemplate ? template : post;\n\t\tconst defaultBlockContext = useMemo( () => {\n\t\t\tconst postContext = {};\n\t\t\t// If it is a template, try to inherit the post type from the name.\n\t\t\tif ( post.type === 'wp_template' ) {\n\t\t\t\tif ( post.slug === 'page' ) {\n\t\t\t\t\tpostContext.postType = 'page';\n\t\t\t\t} else if ( post.slug === 'single' ) {\n\t\t\t\t\tpostContext.postType = 'post';\n\t\t\t\t} else if ( post.slug.split( '-' )[ 0 ] === 'single' ) {\n\t\t\t\t\t// If the slug is single-{postType}, infer the post type from the name.\n\t\t\t\t\tconst postTypeNames =\n\t\t\t\t\t\tpostTypeEntities?.map( ( entity ) => entity.name ) ||\n\t\t\t\t\t\t[];\n\t\t\t\t\tconst match = post.slug.match(\n\t\t\t\t\t\t`^single-(${ postTypeNames.join( '|' ) })(?:-.+)?$`\n\t\t\t\t\t);\n\t\t\t\t\tif ( match ) {\n\t\t\t\t\t\tpostContext.postType = match[ 1 ];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (\n\t\t\t\t! NON_CONTEXTUAL_POST_TYPES.includes( rootLevelPost.type ) ||\n\t\t\t\tshouldRenderTemplate\n\t\t\t) {\n\t\t\t\tpostContext.postId = post.id;\n\t\t\t\tpostContext.postType = post.type;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...postContext,\n\t\t\t\ttemplateSlug:\n\t\t\t\t\trootLevelPost.type === 'wp_template'\n\t\t\t\t\t\t? rootLevelPost.slug\n\t\t\t\t\t\t: undefined,\n\t\t\t};\n\t\t}, [\n\t\t\tshouldRenderTemplate,\n\t\t\tpost.id,\n\t\t\tpost.type,\n\t\t\tpost.slug,\n\t\t\trootLevelPost.type,\n\t\t\trootLevelPost.slug,\n\t\t\tpostTypeEntities,\n\t\t] );\n\t\tconst { id, type } = rootLevelPost;\n\t\tconst blockEditorSettings = useBlockEditorSettings(\n\t\t\teditorSettings,\n\t\t\ttype,\n\t\t\tid,\n\t\t\tmode\n\t\t);\n\t\tconst [ blocks, onInput, onChange ] = useBlockEditorProps(\n\t\t\tpost,\n\t\t\ttemplate,\n\t\t\tmode\n\t\t);\n\n\t\tconst {\n\t\t\tupdatePostLock,\n\t\t\tsetupEditor,\n\t\t\tupdateEditorSettings,\n\t\t\tsetCurrentTemplateId,\n\t\t\tsetEditedPost,\n\t\t\tsetRenderingMode,\n\t\t} = unlock( useDispatch( editorStore ) );\n\t\tconst { createWarningNotice } = useDispatch( noticesStore );\n\n\t\t// Ideally this should be synced on each change and not just something you do once.\n\t\tuseLayoutEffect( () => {\n\t\t\t// Assume that we don't need to initialize in the case of an error recovery.\n\t\t\tif ( recovery ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdatePostLock( settings.postLock );\n\t\t\tsetupEditor( post, initialEdits, settings.template );\n\t\t\tif ( settings.autosave ) {\n\t\t\t\tcreateWarningNotice(\n\t\t\t\t\t__(\n\t\t\t\t\t\t'There is an autosave of this post that is more recent than the version below.'\n\t\t\t\t\t),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'autosave-exists',\n\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'View the autosave' ),\n\t\t\t\t\t\t\t\turl: settings.autosave.editLink,\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);\n\t\t\t}\n\n\t\t\t// The dependencies of the hook are omitted deliberately\n\t\t\t// We only want to run setupEditor (with initialEdits) only once per post.\n\t\t\t// A better solution in the future would be to split this effect into multiple ones.\n\t\t}, [] );\n\n\t\t// Synchronizes the active post with the state\n\t\tuseEffect( () => {\n\t\t\tsetEditedPost( post.type, post.id );\n\t\t}, [ post.type, post.id, setEditedPost ] );\n\n\t\t// Synchronize the editor settings as they change.\n\t\tuseEffect( () => {\n\t\t\tupdateEditorSettings( settings );\n\t\t}, [ settings, updateEditorSettings ] );\n\n\t\t// Synchronizes the active template with the state.\n\t\tuseEffect( () => {\n\t\t\tsetCurrentTemplateId( template?.id );\n\t\t}, [ template?.id, setCurrentTemplateId ] );\n\n\t\t// Sets the right rendering mode when loading the editor.\n\t\tuseEffect( () => {\n\t\t\tsetRenderingMode( defaultMode );\n\t\t}, [ defaultMode, setRenderingMode ] );\n\n\t\tuseHideBlocksFromInserter( post.type, mode );\n\n\t\t// Register the editor commands.\n\t\tuseCommands();\n\n\t\tif ( ! isReady || ! mode || ! hasLoadedPostObject ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<EntityProvider kind=\"root\" type=\"site\">\n\t\t\t\t<EntityProvider\n\t\t\t\t\tkind=\"postType\"\n\t\t\t\t\ttype={ post.type }\n\t\t\t\t\tid={ post.id }\n\t\t\t\t>\n\t\t\t\t\t<BlockContextProvider value={ defaultBlockContext }>\n\t\t\t\t\t\t<BlockEditorProviderComponent\n\t\t\t\t\t\t\tvalue={ blocks }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tonInput={ onInput }\n\t\t\t\t\t\t\tselection={ selection }\n\t\t\t\t\t\t\tsettings={ blockEditorSettings }\n\t\t\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t\t{ ! settings.isPreviewMode && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<PatternsMenuItems />\n\t\t\t\t\t\t\t\t\t<TemplatePartMenuItems />\n\t\t\t\t\t\t\t\t\t<ContentOnlySettingsMenu />\n\t\t\t\t\t\t\t\t\t{ mode === 'template-locked' && (\n\t\t\t\t\t\t\t\t\t\t<DisableNonPageContentBlocks />\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ type === 'wp_navigation' && (\n\t\t\t\t\t\t\t\t\t\t<NavigationBlockEditingMode />\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t<EditorKeyboardShortcuts />\n\t\t\t\t\t\t\t\t\t<KeyboardShortcutHelpModal />\n\t\t\t\t\t\t\t\t\t<BlockRemovalWarnings />\n\t\t\t\t\t\t\t\t\t<StartPageOptions />\n\t\t\t\t\t\t\t\t\t<StartTemplateOptions />\n\t\t\t\t\t\t\t\t\t<PatternRenameModal />\n\t\t\t\t\t\t\t\t\t<PatternDuplicateModal />\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</BlockEditorProviderComponent>\n\t\t\t\t\t</BlockContextProvider>\n\t\t\t\t</EntityProvider>\n\t\t\t</EntityProvider>\n\t\t);\n\t}\n);\n\n/**\n * This component establishes a new post editing context, and serves as the entry point for a new post editor (or post with template editor).\n *\n * It supports a large number of post types, including post, page, templates,\n * custom post types, patterns, template parts.\n *\n * All modification and changes are performed to the `@wordpress/core-data` store.\n *\n * @param {Object} props The component props.\n * @param {Object} [props.post] The post object to edit. This is required.\n * @param {Object} [props.__unstableTemplate] The template object wrapper the edited post.\n * This is optional and can only be used when the post type supports templates (like posts and pages).\n * @param {Object} [props.settings] The settings object to use for the editor.\n * This is optional and can be used to override the default settings.\n * @param {Element} [props.children] Children elements for which the BlockEditorProvider context should apply.\n * This is optional.\n *\n * @example\n * ```jsx\n * <EditorProvider\n * post={ post }\n * settings={ settings }\n * __unstableTemplate={ template }\n * >\n * { children }\n * </EditorProvider>\n * ```\n *\n * @return {React.ReactNode} The rendered EditorProvider component.\n */\nexport function EditorProvider( props ) {\n\treturn (\n\t\t<ExperimentalEditorProvider\n\t\t\t{ ...props }\n\t\t\tBlockEditorProviderComponent={ BlockEditorProvider }\n\t\t>\n\t\t\t{ props.children }\n\t\t</ExperimentalEditorProvider>\n\t);\n}\n\nexport default EditorProvider;\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAJ,OAAA;AAKA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAKA,IAAAQ,qBAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,uBAAA,GAAAF,sBAAA,CAAAT,OAAA;AACA,IAAAY,WAAA,GAAAZ,OAAA;AACA,IAAAa,4BAAA,GAAAJ,sBAAA,CAAAT,OAAA;AACA,IAAAc,2BAAA,GAAAL,sBAAA,CAAAT,OAAA;AACA,IAAAe,0BAAA,GAAAf,OAAA;AACA,IAAAgB,SAAA,GAAAP,sBAAA,CAAAT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AAC,eACxB,IAAA1G,WAAA,CAAAiG,GAAA,EAACzG,iBAAA,CAAAkH,OAAgB,IAAE,CAAC,eACpB,IAAA1G,WAAA,CAAAiG,GAAA,EAACtG,qBAAA,CAAA+G,OAAoB,IAAE,CAAC,eACxB,IAAA1G,WAAA,CAAAiG,GAAA,EAACpG,mBAAA,CAAA6G,OAAkB,IAAE,CAAC,eACtB,IAAA1G,WAAA,CAAAiG,GAAA,EAACnG,sBAAA,CAAA4G,OAAqB,IAAE,CAAC;UAAA,CACxB,CACF;QAAA,CAC4B;MAAC,CACV;IAAC,CACR;EAAC,CACF,CAAC;AAEnB,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,cAAcA,CAAEC,KAAK,EAAG;EACvC,oBACC,IAAA5G,WAAA,CAAAiG,GAAA,EAACpE,0BAA0B;IAAA,GACrB+E,KAAK;IACVxE,4BAA4B,EAAGyE,gCAAqB;IAAA1E,QAAA,EAElDyE,KAAK,CAACzE;EAAQ,CACW,CAAC;AAE/B;AAAC,IAAA2E,QAAA,GAAAhF,OAAA,CAAA4E,OAAA,GAEcC,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_data","_i18n","_coreData","_blockEditor","_notices","_patterns","_blocks","_withRegistryProvider","_interopRequireDefault","_store","_useBlockEditorSettings","_lockUnlock","_disableNonPageContentBlocks","_navigationBlockEditingMode","_useHideBlocksFromInserter","_commands","_blockRemovalWarnings","_startPageOptions","_keyboardShortcutHelpModal","_contentOnlySettingsMenu","_startTemplateOptions","_globalKeyboardShortcuts","_patternRenameModal","_patternDuplicateModal","_templatePartMenuItems","_jsxRuntime","ExperimentalBlockEditorProvider","unlock","blockEditorPrivateApis","PatternsMenuItems","editPatternsPrivateApis","noop","NON_CONTEXTUAL_POST_TYPES","RENDERING_MODES","useBlockEditorProps","post","template","mode","rootLevelPost","postBlocks","onInput","onChange","useEntityBlockEditor","type","id","templateBlocks","onInputTemplate","onChangeTemplate","maybeNavigationBlocks","useMemo","createBlock","ref","templateLock","blocks","disableRootLevelChanges","ExperimentalEditorProvider","exports","withRegistryProvider","settings","recovery","initialEdits","children","BlockEditorProviderComponent","__unstableTemplate","hasTemplate","editorSettings","selection","isReady","defaultMode","postTypeEntities","useSelect","select","getEditorSettings","getEditorSelection","getRenderingMode","__unstableIsEditorReady","editorStore","getEntitiesConfig","getPostType","hasFinishedResolution","coreStore","postTypeSupports","supports","hasLoadedPostObject","_defaultMode","Array","isArray","editor","find","features","undefined","hasDefaultMode","includes","shouldRenderTemplate","defaultBlockContext","postContext","slug","postType","split","postTypeNames","map","entity","name","match","join","postId","templateSlug","blockEditorSettings","useBlockEditorSettings","updatePostLock","setupEditor","updateEditorSettings","setCurrentTemplateId","setEditedPost","setRenderingMode","useDispatch","createWarningNotice","noticesStore","useLayoutEffect","postLock","autosave","__","actions","label","url","editLink","useEffect","useHideBlocksFromInserter","useCommands","jsx","EntityProvider","kind","BlockContextProvider","value","jsxs","useSubRegistry","isPreviewMode","Fragment","default","EditorProvider","props","BlockEditorProvider","_default"],"sources":["@wordpress/editor/src/components/provider/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect, useLayoutEffect, useMemo } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tEntityProvider,\n\tuseEntityBlockEditor,\n\tstore as coreStore,\n} from '@wordpress/core-data';\nimport {\n\tBlockEditorProvider,\n\tBlockContextProvider,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { privateApis as editPatternsPrivateApis } from '@wordpress/patterns';\nimport { createBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport withRegistryProvider from './with-registry-provider';\nimport { store as editorStore } from '../../store';\nimport useBlockEditorSettings from './use-block-editor-settings';\nimport { unlock } from '../../lock-unlock';\nimport DisableNonPageContentBlocks from './disable-non-page-content-blocks';\nimport NavigationBlockEditingMode from './navigation-block-editing-mode';\nimport { useHideBlocksFromInserter } from './use-hide-blocks-from-inserter';\nimport useCommands from '../commands';\nimport BlockRemovalWarnings from '../block-removal-warnings';\nimport StartPageOptions from '../start-page-options';\nimport KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';\nimport ContentOnlySettingsMenu from '../block-settings-menu/content-only-settings-menu';\nimport StartTemplateOptions from '../start-template-options';\nimport EditorKeyboardShortcuts from '../global-keyboard-shortcuts';\nimport PatternRenameModal from '../pattern-rename-modal';\nimport PatternDuplicateModal from '../pattern-duplicate-modal';\nimport TemplatePartMenuItems from '../template-part-menu-items';\n\nconst { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );\nconst { PatternsMenuItems } = unlock( editPatternsPrivateApis );\n\nconst noop = () => {};\n\n/**\n * These are global entities that are only there to split blocks into logical units\n * They don't provide a \"context\" for the current post/page being rendered.\n * So we should not use their ids as post context. This is important to allow post blocks\n * (post content, post title) to be used within them without issues.\n */\nconst NON_CONTEXTUAL_POST_TYPES = [\n\t'wp_block',\n\t'wp_navigation',\n\t'wp_template_part',\n];\n\n/**\n * These are rendering modes that the editor supports.\n */\nconst RENDERING_MODES = [ 'post-only', 'template-locked' ];\n\n/**\n * Depending on the post, template and template mode,\n * returns the appropriate blocks and change handlers for the block editor provider.\n *\n * @param {Array} post Block list.\n * @param {boolean} template Whether the page content has focus (and the surrounding template is inert). If `true` return page content blocks. Default `false`.\n * @param {string} mode Rendering mode.\n *\n * @example\n * ```jsx\n * const [ blocks, onInput, onChange ] = useBlockEditorProps( post, template, mode );\n * ```\n *\n * @return {Array} Block editor props.\n */\nfunction useBlockEditorProps( post, template, mode ) {\n\tconst rootLevelPost = mode === 'template-locked' ? 'template' : 'post';\n\tconst [ postBlocks, onInput, onChange ] = useEntityBlockEditor(\n\t\t'postType',\n\t\tpost.type,\n\t\t{ id: post.id }\n\t);\n\tconst [ templateBlocks, onInputTemplate, onChangeTemplate ] =\n\t\tuseEntityBlockEditor( 'postType', template?.type, {\n\t\t\tid: template?.id,\n\t\t} );\n\tconst maybeNavigationBlocks = useMemo( () => {\n\t\tif ( post.type === 'wp_navigation' ) {\n\t\t\treturn [\n\t\t\t\tcreateBlock( 'core/navigation', {\n\t\t\t\t\tref: post.id,\n\t\t\t\t\t// As the parent editor is locked with `templateLock`, the template locking\n\t\t\t\t\t// must be explicitly \"unset\" on the block itself to allow the user to modify\n\t\t\t\t\t// the block's content.\n\t\t\t\t\ttemplateLock: false,\n\t\t\t\t} ),\n\t\t\t];\n\t\t}\n\t}, [ post.type, post.id ] );\n\n\t// It is important that we don't create a new instance of blocks on every change\n\t// We should only create a new instance if the blocks them selves change, not a dependency of them.\n\tconst blocks = useMemo( () => {\n\t\tif ( maybeNavigationBlocks ) {\n\t\t\treturn maybeNavigationBlocks;\n\t\t}\n\n\t\tif ( rootLevelPost === 'template' ) {\n\t\t\treturn templateBlocks;\n\t\t}\n\n\t\treturn postBlocks;\n\t}, [ maybeNavigationBlocks, rootLevelPost, templateBlocks, postBlocks ] );\n\n\t// Handle fallback to postBlocks outside of the above useMemo, to ensure\n\t// that constructed block templates that call `createBlock` are not generated\n\t// too frequently. This ensures that clientIds are stable.\n\tconst disableRootLevelChanges =\n\t\t( !! template && mode === 'template-locked' ) ||\n\t\tpost.type === 'wp_navigation';\n\tif ( disableRootLevelChanges ) {\n\t\treturn [ blocks, noop, noop ];\n\t}\n\n\treturn [\n\t\tblocks,\n\t\trootLevelPost === 'post' ? onInput : onInputTemplate,\n\t\trootLevelPost === 'post' ? onChange : onChangeTemplate,\n\t];\n}\n\n/**\n * This component provides the editor context and manages the state of the block editor.\n *\n * @param {Object} props The component props.\n * @param {Object} props.post The post object.\n * @param {Object} props.settings The editor settings.\n * @param {boolean} props.recovery Indicates if the editor is in recovery mode.\n * @param {Array} props.initialEdits The initial edits for the editor.\n * @param {Object} props.children The child components.\n * @param {Object} [props.BlockEditorProviderComponent] The block editor provider component to use. Defaults to ExperimentalBlockEditorProvider.\n * @param {Object} [props.__unstableTemplate] The template object.\n *\n * @example\n * ```jsx\n * <ExperimentalEditorProvider\n * post={ post }\n * settings={ settings }\n * recovery={ recovery }\n * initialEdits={ initialEdits }\n * __unstableTemplate={ template }\n * >\n * { children }\n * </ExperimentalEditorProvider>\n *\n * @return {Object} The rendered ExperimentalEditorProvider component.\n */\nexport const ExperimentalEditorProvider = withRegistryProvider(\n\t( {\n\t\tpost,\n\t\tsettings,\n\t\trecovery,\n\t\tinitialEdits,\n\t\tchildren,\n\t\tBlockEditorProviderComponent = ExperimentalBlockEditorProvider,\n\t\t__unstableTemplate: template,\n\t} ) => {\n\t\tconst hasTemplate = !! template;\n\t\tconst {\n\t\t\teditorSettings,\n\t\t\tselection,\n\t\t\tisReady,\n\t\t\tmode,\n\t\t\tdefaultMode,\n\t\t\tpostTypeEntities,\n\t\t} = useSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\tgetEditorSettings,\n\t\t\t\t\tgetEditorSelection,\n\t\t\t\t\tgetRenderingMode,\n\t\t\t\t\t__unstableIsEditorReady,\n\t\t\t\t} = select( editorStore );\n\t\t\t\tconst {\n\t\t\t\t\tgetEntitiesConfig,\n\t\t\t\t\tgetPostType,\n\t\t\t\t\thasFinishedResolution,\n\t\t\t\t} = select( coreStore );\n\n\t\t\t\tconst postTypeSupports = getPostType( post.type )?.supports;\n\t\t\t\tconst hasLoadedPostObject = hasFinishedResolution(\n\t\t\t\t\t'getPostType',\n\t\t\t\t\t[ post.type ]\n\t\t\t\t);\n\n\t\t\t\tconst _defaultMode = Array.isArray( postTypeSupports?.editor )\n\t\t\t\t\t? postTypeSupports.editor.find(\n\t\t\t\t\t\t\t( features ) => 'default-mode' in features\n\t\t\t\t\t )?.[ 'default-mode' ]\n\t\t\t\t\t: undefined;\n\t\t\t\tconst hasDefaultMode = RENDERING_MODES.includes( _defaultMode );\n\n\t\t\t\treturn {\n\t\t\t\t\teditorSettings: getEditorSettings(),\n\t\t\t\t\tisReady: __unstableIsEditorReady() && hasLoadedPostObject,\n\t\t\t\t\tmode: getRenderingMode(),\n\t\t\t\t\tdefaultMode:\n\t\t\t\t\t\thasTemplate && hasDefaultMode\n\t\t\t\t\t\t\t? _defaultMode\n\t\t\t\t\t\t\t: 'post-only',\n\t\t\t\t\tselection: getEditorSelection(),\n\t\t\t\t\tpostTypeEntities:\n\t\t\t\t\t\tpost.type === 'wp_template'\n\t\t\t\t\t\t\t? getEntitiesConfig( 'postType' )\n\t\t\t\t\t\t\t: null,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ post.type, hasTemplate ]\n\t\t);\n\n\t\tconst shouldRenderTemplate = !! template && mode !== 'post-only';\n\t\tconst rootLevelPost = shouldRenderTemplate ? template : post;\n\t\tconst defaultBlockContext = useMemo( () => {\n\t\t\tconst postContext = {};\n\t\t\t// If it is a template, try to inherit the post type from the name.\n\t\t\tif ( post.type === 'wp_template' ) {\n\t\t\t\tif ( post.slug === 'page' ) {\n\t\t\t\t\tpostContext.postType = 'page';\n\t\t\t\t} else if ( post.slug === 'single' ) {\n\t\t\t\t\tpostContext.postType = 'post';\n\t\t\t\t} else if ( post.slug.split( '-' )[ 0 ] === 'single' ) {\n\t\t\t\t\t// If the slug is single-{postType}, infer the post type from the name.\n\t\t\t\t\tconst postTypeNames =\n\t\t\t\t\t\tpostTypeEntities?.map( ( entity ) => entity.name ) ||\n\t\t\t\t\t\t[];\n\t\t\t\t\tconst match = post.slug.match(\n\t\t\t\t\t\t`^single-(${ postTypeNames.join( '|' ) })(?:-.+)?$`\n\t\t\t\t\t);\n\t\t\t\t\tif ( match ) {\n\t\t\t\t\t\tpostContext.postType = match[ 1 ];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (\n\t\t\t\t! NON_CONTEXTUAL_POST_TYPES.includes( rootLevelPost.type ) ||\n\t\t\t\tshouldRenderTemplate\n\t\t\t) {\n\t\t\t\tpostContext.postId = post.id;\n\t\t\t\tpostContext.postType = post.type;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...postContext,\n\t\t\t\ttemplateSlug:\n\t\t\t\t\trootLevelPost.type === 'wp_template'\n\t\t\t\t\t\t? rootLevelPost.slug\n\t\t\t\t\t\t: undefined,\n\t\t\t};\n\t\t}, [\n\t\t\tshouldRenderTemplate,\n\t\t\tpost.id,\n\t\t\tpost.type,\n\t\t\tpost.slug,\n\t\t\trootLevelPost.type,\n\t\t\trootLevelPost.slug,\n\t\t\tpostTypeEntities,\n\t\t] );\n\t\tconst { id, type } = rootLevelPost;\n\t\tconst blockEditorSettings = useBlockEditorSettings(\n\t\t\teditorSettings,\n\t\t\ttype,\n\t\t\tid,\n\t\t\tmode\n\t\t);\n\t\tconst [ blocks, onInput, onChange ] = useBlockEditorProps(\n\t\t\tpost,\n\t\t\ttemplate,\n\t\t\tmode\n\t\t);\n\n\t\tconst {\n\t\t\tupdatePostLock,\n\t\t\tsetupEditor,\n\t\t\tupdateEditorSettings,\n\t\t\tsetCurrentTemplateId,\n\t\t\tsetEditedPost,\n\t\t\tsetRenderingMode,\n\t\t} = unlock( useDispatch( editorStore ) );\n\t\tconst { createWarningNotice } = useDispatch( noticesStore );\n\n\t\t// Ideally this should be synced on each change and not just something you do once.\n\t\tuseLayoutEffect( () => {\n\t\t\t// Assume that we don't need to initialize in the case of an error recovery.\n\t\t\tif ( recovery ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdatePostLock( settings.postLock );\n\t\t\tsetupEditor( post, initialEdits, settings.template );\n\t\t\tif ( settings.autosave ) {\n\t\t\t\tcreateWarningNotice(\n\t\t\t\t\t__(\n\t\t\t\t\t\t'There is an autosave of this post that is more recent than the version below.'\n\t\t\t\t\t),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'autosave-exists',\n\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'View the autosave' ),\n\t\t\t\t\t\t\t\turl: settings.autosave.editLink,\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);\n\t\t\t}\n\n\t\t\t// The dependencies of the hook are omitted deliberately\n\t\t\t// We only want to run setupEditor (with initialEdits) only once per post.\n\t\t\t// A better solution in the future would be to split this effect into multiple ones.\n\t\t}, [] );\n\n\t\t// Synchronizes the active post with the state\n\t\tuseEffect( () => {\n\t\t\tsetEditedPost( post.type, post.id );\n\t\t}, [ post.type, post.id, setEditedPost ] );\n\n\t\t// Synchronize the editor settings as they change.\n\t\tuseEffect( () => {\n\t\t\tupdateEditorSettings( settings );\n\t\t}, [ settings, updateEditorSettings ] );\n\n\t\t// Synchronizes the active template with the state.\n\t\tuseEffect( () => {\n\t\t\tsetCurrentTemplateId( template?.id );\n\t\t}, [ template?.id, setCurrentTemplateId ] );\n\n\t\t// Sets the right rendering mode when loading the editor.\n\t\tuseEffect( () => {\n\t\t\tsetRenderingMode( defaultMode );\n\t\t}, [ defaultMode, setRenderingMode ] );\n\n\t\tuseHideBlocksFromInserter( post.type, mode );\n\n\t\t// Register the editor commands.\n\t\tuseCommands();\n\n\t\tif ( ! isReady || ! mode ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<EntityProvider kind=\"root\" type=\"site\">\n\t\t\t\t<EntityProvider\n\t\t\t\t\tkind=\"postType\"\n\t\t\t\t\ttype={ post.type }\n\t\t\t\t\tid={ post.id }\n\t\t\t\t>\n\t\t\t\t\t<BlockContextProvider value={ defaultBlockContext }>\n\t\t\t\t\t\t<BlockEditorProviderComponent\n\t\t\t\t\t\t\tvalue={ blocks }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tonInput={ onInput }\n\t\t\t\t\t\t\tselection={ selection }\n\t\t\t\t\t\t\tsettings={ blockEditorSettings }\n\t\t\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t\t{ ! settings.isPreviewMode && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<PatternsMenuItems />\n\t\t\t\t\t\t\t\t\t<TemplatePartMenuItems />\n\t\t\t\t\t\t\t\t\t<ContentOnlySettingsMenu />\n\t\t\t\t\t\t\t\t\t{ mode === 'template-locked' && (\n\t\t\t\t\t\t\t\t\t\t<DisableNonPageContentBlocks />\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ type === 'wp_navigation' && (\n\t\t\t\t\t\t\t\t\t\t<NavigationBlockEditingMode />\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t<EditorKeyboardShortcuts />\n\t\t\t\t\t\t\t\t\t<KeyboardShortcutHelpModal />\n\t\t\t\t\t\t\t\t\t<BlockRemovalWarnings />\n\t\t\t\t\t\t\t\t\t<StartPageOptions />\n\t\t\t\t\t\t\t\t\t<StartTemplateOptions />\n\t\t\t\t\t\t\t\t\t<PatternRenameModal />\n\t\t\t\t\t\t\t\t\t<PatternDuplicateModal />\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</BlockEditorProviderComponent>\n\t\t\t\t\t</BlockContextProvider>\n\t\t\t\t</EntityProvider>\n\t\t\t</EntityProvider>\n\t\t);\n\t}\n);\n\n/**\n * This component establishes a new post editing context, and serves as the entry point for a new post editor (or post with template editor).\n *\n * It supports a large number of post types, including post, page, templates,\n * custom post types, patterns, template parts.\n *\n * All modification and changes are performed to the `@wordpress/core-data` store.\n *\n * @param {Object} props The component props.\n * @param {Object} [props.post] The post object to edit. This is required.\n * @param {Object} [props.__unstableTemplate] The template object wrapper the edited post.\n * This is optional and can only be used when the post type supports templates (like posts and pages).\n * @param {Object} [props.settings] The settings object to use for the editor.\n * This is optional and can be used to override the default settings.\n * @param {React.ReactNode} [props.children] Children elements for which the BlockEditorProvider context should apply.\n * This is optional.\n *\n * @example\n * ```jsx\n * <EditorProvider\n * post={ post }\n * settings={ settings }\n * __unstableTemplate={ template }\n * >\n * { children }\n * </EditorProvider>\n * ```\n *\n * @return {React.ReactNode} The rendered EditorProvider component.\n */\nexport function EditorProvider( props ) {\n\treturn (\n\t\t<ExperimentalEditorProvider\n\t\t\t{ ...props }\n\t\t\tBlockEditorProviderComponent={ BlockEditorProvider }\n\t\t>\n\t\t\t{ props.children }\n\t\t</ExperimentalEditorProvider>\n\t);\n}\n\nexport default EditorProvider;\n"],"mappings":";;;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAJ,OAAA;AAKA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAKA,IAAAQ,qBAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,uBAAA,GAAAF,sBAAA,CAAAT,OAAA;AACA,IAAAY,WAAA,GAAAZ,OAAA;AACA,IAAAa,4BAAA,GAAAJ,sBAAA,CAAAT,OAAA;AACA,IAAAc,2BAAA,GAAAL,sBAAA,CAAAT,OAAA;AACA,IAAAe,0BAAA,GAAAf,OAAA;AACA,IAAAgB,SAAA,GAAAP,sBAAA,CAAAT,OAAA;AACA,IAAAiB,qBAAA,GAAAR,sBAAA,CAAAT,OAAA;AACA,IAAAkB,iBAAA,GAAAT,sBAAA,CAAAT,OAAA;AACA,IAAAmB,0BAAA,GAAAV,sBAAA,CAAAT,OAAA;AACA,IAAAoB,wBAAA,GAAAX,sBAAA,CAAAT,OAAA;AACA,IAAAqB,qBAAA,GAAAZ,sBAAA,CAAAT,OAAA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oB,IAAE,CAAC,eACxB,IAAAjH,WAAA,CAAAwG,GAAA,EAAChH,iBAAA,CAAAyH,OAAgB,IAAE,CAAC,eACpB,IAAAjH,WAAA,CAAAwG,GAAA,EAAC7G,qBAAA,CAAAsH,OAAoB,IAAE,CAAC,eACxB,IAAAjH,WAAA,CAAAwG,GAAA,EAAC3G,mBAAA,CAAAoH,OAAkB,IAAE,CAAC,eACtB,IAAAjH,WAAA,CAAAwG,GAAA,EAAC1G,sBAAA,CAAAmH,OAAqB,IAAE,CAAC;UAAA,CACxB,CACF;QAAA,CAC4B;MAAC,CACV;IAAC,CACR;EAAC,CACF,CAAC;AAEnB,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,cAAcA,CAAEC,KAAK,EAAG;EACvC,oBACC,IAAAnH,WAAA,CAAAwG,GAAA,EAAC1E,0BAA0B;IAAA,GACrBqF,KAAK;IACV9E,4BAA4B,EAAG+E,gCAAqB;IAAAhF,QAAA,EAElD+E,KAAK,CAAC/E;EAAQ,CACW,CAAC;AAE/B;AAAC,IAAAiF,QAAA,GAAAtF,OAAA,CAAAkF,OAAA,GAEcC,cAAc","ignoreList":[]}
@@ -49,7 +49,7 @@ function PostSummary({
49
49
  postType,
50
50
  postId
51
51
  } = (0, _data.useSelect)(select => {
52
- // We use isEditorPanelRemoved to hide the panel if it was programatically removed. We do
52
+ // We use isEditorPanelRemoved to hide the panel if it was programmatically removed. We do
53
53
  // not use isEditorPanelEnabled since this panel should not be disabled through the UI.
54
54
  const {
55
55
  isEditorPanelRemoved,
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_data","_pluginPostStatusInfo","_interopRequireDefault","_panel","_postCardPanel","_postContentInformation","_panel2","_panel3","_panel4","_panel5","_panel6","_postLastEditedPanel","_postPanelSection","_panel7","_postStatus","_postSyncStatus","_panel8","_panel9","_blogTitle","_postsPerPage","_siteDiscussion","_store","_postLastRevision","_postTrash","_jsxRuntime","PANEL_NAME","PostSummary","onActionPerformed","isRemovedPostStatusPanel","postType","postId","useSelect","select","isEditorPanelRemoved","getCurrentPostType","getCurrentPostId","editorStore","jsx","default","className","children","Slot","fills","Fragment","jsxs","__experimentalVStack","spacing","withPanelBody","PrivatePostExcerptPanel","PrivatePostLastRevision"],"sources":["@wordpress/editor/src/components/sidebar/post-summary.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PluginPostStatusInfo from '../plugin-post-status-info';\nimport PostAuthorPanel from '../post-author/panel';\nimport PostCardPanel from '../post-card-panel';\nimport PostContentInformation from '../post-content-information';\nimport PageAttributesPanel from '../page-attributes/panel';\nimport PostDiscussionPanel from '../post-discussion/panel';\nimport { PrivatePostExcerptPanel as PostExcerptPanel } from '../post-excerpt/panel';\nimport PostFeaturedImagePanel from '../post-featured-image/panel';\nimport PostFormatPanel from '../post-format/panel';\nimport PostLastEditedPanel from '../post-last-edited-panel';\nimport PostPanelSection from '../post-panel-section';\nimport PostSchedulePanel from '../post-schedule/panel';\nimport PostStatusPanel from '../post-status';\nimport PostSyncStatus from '../post-sync-status';\nimport PostTemplatePanel from '../post-template/panel';\nimport PostURLPanel from '../post-url/panel';\nimport BlogTitle from '../blog-title';\nimport PostsPerPage from '../posts-per-page';\nimport SiteDiscussion from '../site-discussion';\nimport { store as editorStore } from '../../store';\nimport { PrivatePostLastRevision } from '../post-last-revision';\nimport PostTrash from '../post-trash';\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'post-status';\n\nexport default function PostSummary( { onActionPerformed } ) {\n\tconst { isRemovedPostStatusPanel, postType, postId } = useSelect(\n\t\t( select ) => {\n\t\t\t// We use isEditorPanelRemoved to hide the panel if it was programatically removed. We do\n\t\t\t// not use isEditorPanelEnabled since this panel should not be disabled through the UI.\n\t\t\tconst {\n\t\t\t\tisEditorPanelRemoved,\n\t\t\t\tgetCurrentPostType,\n\t\t\t\tgetCurrentPostId,\n\t\t\t} = select( editorStore );\n\t\t\treturn {\n\t\t\t\tisRemovedPostStatusPanel: isEditorPanelRemoved( PANEL_NAME ),\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t\tpostId: getCurrentPostId(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\treturn (\n\t\t<PostPanelSection className=\"editor-post-summary\">\n\t\t\t<PluginPostStatusInfo.Slot>\n\t\t\t\t{ ( fills ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t\t\t<PostCardPanel\n\t\t\t\t\t\t\t\tpostType={ postType }\n\t\t\t\t\t\t\t\tpostId={ postId }\n\t\t\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PostFeaturedImagePanel withPanelBody={ false } />\n\t\t\t\t\t\t\t<PostExcerptPanel />\n\t\t\t\t\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t\t\t\t\t<PostContentInformation />\n\t\t\t\t\t\t\t\t<PostLastEditedPanel />\n\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t{ ! isRemovedPostStatusPanel && (\n\t\t\t\t\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t\t\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t\t\t\t\t\t\t<PostStatusPanel />\n\t\t\t\t\t\t\t\t\t\t<PostSchedulePanel />\n\t\t\t\t\t\t\t\t\t\t<PostURLPanel />\n\t\t\t\t\t\t\t\t\t\t<PostAuthorPanel />\n\t\t\t\t\t\t\t\t\t\t<PostTemplatePanel />\n\t\t\t\t\t\t\t\t\t\t<PostDiscussionPanel />\n\t\t\t\t\t\t\t\t\t\t<PrivatePostLastRevision />\n\t\t\t\t\t\t\t\t\t\t<PageAttributesPanel />\n\t\t\t\t\t\t\t\t\t\t<PostSyncStatus />\n\t\t\t\t\t\t\t\t\t\t<BlogTitle />\n\t\t\t\t\t\t\t\t\t\t<PostsPerPage />\n\t\t\t\t\t\t\t\t\t\t<SiteDiscussion />\n\t\t\t\t\t\t\t\t\t\t<PostFormatPanel />\n\t\t\t\t\t\t\t\t\t\t{ fills }\n\t\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t\t\t<PostTrash\n\t\t\t\t\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</PluginPostStatusInfo.Slot>\n\t\t</PostPanelSection>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAKA,IAAAE,qBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,MAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,cAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,uBAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,OAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,OAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AACA,IAAAU,OAAA,GAAAP,sBAAA,CAAAH,OAAA;AACA,IAAAW,OAAA,GAAAR,sBAAA,CAAAH,OAAA;AACA,IAAAY,oBAAA,GAAAT,sBAAA,CAAAH,OAAA;AACA,IAAAa,iBAAA,GAAAV,sBAAA,CAAAH,OAAA;AACA,IAAAc,OAAA,GAAAX,sBAAA,CAAAH,OAAA;AACA,IAAAe,WAAA,GAAAZ,sBAAA,CAAAH,OAAA;AACA,IAAAgB,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IAAAd,WAAA,CAAAa,GAAA,EAACrB,OAAA,CAAAsB,OAAiB,IAAE,CAAC,eACrB,IAAAd,WAAA,CAAAa,GAAA,EAAC9B,OAAA,CAAA+B,OAAmB,IAAE,CAAC,eACvB,IAAAd,WAAA,CAAAa,GAAA,EAACf,iBAAA,CAAA2B,uBAAuB,IAAE,CAAC,eAC3B,IAAAzB,WAAA,CAAAa,GAAA,EAAC/B,OAAA,CAAAgC,OAAmB,IAAE,CAAC,eACvB,IAAAd,WAAA,CAAAa,GAAA,EAACtB,eAAA,CAAAuB,OAAc,IAAE,CAAC,eAClB,IAAAd,WAAA,CAAAa,GAAA,EAACnB,UAAA,CAAAoB,OAAS,IAAE,CAAC,eACb,IAAAd,WAAA,CAAAa,GAAA,EAAClB,aAAA,CAAAmB,OAAY,IAAE,CAAC,eAChB,IAAAd,WAAA,CAAAa,GAAA,EAACjB,eAAA,CAAAkB,OAAc,IAAE,CAAC,eAClB,IAAAd,WAAA,CAAAa,GAAA,EAAC3B,OAAA,CAAA4B,OAAe,IAAE,CAAC,EACjBI,KAAK;YAAA,CACA,CAAC,eACT,IAAAlB,WAAA,CAAAa,GAAA,EAACd,UAAA,CAAAe,OAAS;cACTX,iBAAiB,EAAGA;YAAmB,CACvC,CAAC;UAAA,CACK,CACR;QAAA,CACM;MAAC,CACR;IACF,CACyB;EAAC,CACX,CAAC;AAErB","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_data","_pluginPostStatusInfo","_interopRequireDefault","_panel","_postCardPanel","_postContentInformation","_panel2","_panel3","_panel4","_panel5","_panel6","_postLastEditedPanel","_postPanelSection","_panel7","_postStatus","_postSyncStatus","_panel8","_panel9","_blogTitle","_postsPerPage","_siteDiscussion","_store","_postLastRevision","_postTrash","_jsxRuntime","PANEL_NAME","PostSummary","onActionPerformed","isRemovedPostStatusPanel","postType","postId","useSelect","select","isEditorPanelRemoved","getCurrentPostType","getCurrentPostId","editorStore","jsx","default","className","children","Slot","fills","Fragment","jsxs","__experimentalVStack","spacing","withPanelBody","PrivatePostExcerptPanel","PrivatePostLastRevision"],"sources":["@wordpress/editor/src/components/sidebar/post-summary.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PluginPostStatusInfo from '../plugin-post-status-info';\nimport PostAuthorPanel from '../post-author/panel';\nimport PostCardPanel from '../post-card-panel';\nimport PostContentInformation from '../post-content-information';\nimport PageAttributesPanel from '../page-attributes/panel';\nimport PostDiscussionPanel from '../post-discussion/panel';\nimport { PrivatePostExcerptPanel as PostExcerptPanel } from '../post-excerpt/panel';\nimport PostFeaturedImagePanel from '../post-featured-image/panel';\nimport PostFormatPanel from '../post-format/panel';\nimport PostLastEditedPanel from '../post-last-edited-panel';\nimport PostPanelSection from '../post-panel-section';\nimport PostSchedulePanel from '../post-schedule/panel';\nimport PostStatusPanel from '../post-status';\nimport PostSyncStatus from '../post-sync-status';\nimport PostTemplatePanel from '../post-template/panel';\nimport PostURLPanel from '../post-url/panel';\nimport BlogTitle from '../blog-title';\nimport PostsPerPage from '../posts-per-page';\nimport SiteDiscussion from '../site-discussion';\nimport { store as editorStore } from '../../store';\nimport { PrivatePostLastRevision } from '../post-last-revision';\nimport PostTrash from '../post-trash';\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'post-status';\n\nexport default function PostSummary( { onActionPerformed } ) {\n\tconst { isRemovedPostStatusPanel, postType, postId } = useSelect(\n\t\t( select ) => {\n\t\t\t// We use isEditorPanelRemoved to hide the panel if it was programmatically removed. We do\n\t\t\t// not use isEditorPanelEnabled since this panel should not be disabled through the UI.\n\t\t\tconst {\n\t\t\t\tisEditorPanelRemoved,\n\t\t\t\tgetCurrentPostType,\n\t\t\t\tgetCurrentPostId,\n\t\t\t} = select( editorStore );\n\t\t\treturn {\n\t\t\t\tisRemovedPostStatusPanel: isEditorPanelRemoved( PANEL_NAME ),\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t\tpostId: getCurrentPostId(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\treturn (\n\t\t<PostPanelSection className=\"editor-post-summary\">\n\t\t\t<PluginPostStatusInfo.Slot>\n\t\t\t\t{ ( fills ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t\t\t<PostCardPanel\n\t\t\t\t\t\t\t\tpostType={ postType }\n\t\t\t\t\t\t\t\tpostId={ postId }\n\t\t\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PostFeaturedImagePanel withPanelBody={ false } />\n\t\t\t\t\t\t\t<PostExcerptPanel />\n\t\t\t\t\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t\t\t\t\t<PostContentInformation />\n\t\t\t\t\t\t\t\t<PostLastEditedPanel />\n\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t{ ! isRemovedPostStatusPanel && (\n\t\t\t\t\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t\t\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t\t\t\t\t\t\t<PostStatusPanel />\n\t\t\t\t\t\t\t\t\t\t<PostSchedulePanel />\n\t\t\t\t\t\t\t\t\t\t<PostURLPanel />\n\t\t\t\t\t\t\t\t\t\t<PostAuthorPanel />\n\t\t\t\t\t\t\t\t\t\t<PostTemplatePanel />\n\t\t\t\t\t\t\t\t\t\t<PostDiscussionPanel />\n\t\t\t\t\t\t\t\t\t\t<PrivatePostLastRevision />\n\t\t\t\t\t\t\t\t\t\t<PageAttributesPanel />\n\t\t\t\t\t\t\t\t\t\t<PostSyncStatus />\n\t\t\t\t\t\t\t\t\t\t<BlogTitle />\n\t\t\t\t\t\t\t\t\t\t<PostsPerPage />\n\t\t\t\t\t\t\t\t\t\t<SiteDiscussion />\n\t\t\t\t\t\t\t\t\t\t<PostFormatPanel />\n\t\t\t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AzB,WAAA,CAAAa,GAAA,EAAC/B,OAAA,CAAAgC,OAAmB,IAAE,CAAC,eACvB,IAAAd,WAAA,CAAAa,GAAA,EAACtB,eAAA,CAAAuB,OAAc,IAAE,CAAC,eAClB,IAAAd,WAAA,CAAAa,GAAA,EAACnB,UAAA,CAAAoB,OAAS,IAAE,CAAC,eACb,IAAAd,WAAA,CAAAa,GAAA,EAAClB,aAAA,CAAAmB,OAAY,IAAE,CAAC,eAChB,IAAAd,WAAA,CAAAa,GAAA,EAACjB,eAAA,CAAAkB,OAAc,IAAE,CAAC,eAClB,IAAAd,WAAA,CAAAa,GAAA,EAAC3B,OAAA,CAAA4B,OAAe,IAAE,CAAC,EACjBI,KAAK;YAAA,CACA,CAAC,eACT,IAAAlB,WAAA,CAAAa,GAAA,EAACd,UAAA,CAAAe,OAAS;cACTX,iBAAiB,EAAGA;YAAmB,CACvC,CAAC;UAAA,CACK,CACR;QAAA,CACM;MAAC,CACR;IACF,CACyB;EAAC,CACX,CAAC;AAErB","ignoreList":[]}
@@ -20,11 +20,9 @@ var _store = require("../../store");
20
20
  function StartPageOptions() {
21
21
  const {
22
22
  postId,
23
- shouldEnable
23
+ enabled
24
24
  } = (0, _data.useSelect)(select => {
25
25
  const {
26
- isEditedPostDirty,
27
- isEditedPostEmpty,
28
26
  getCurrentPostId,
29
27
  getCurrentPostType
30
28
  } = select(_store.store);
@@ -32,20 +30,31 @@ function StartPageOptions() {
32
30
  const choosePatternModalEnabled = select(_preferences.store).get('core', 'enableChoosePatternModal');
33
31
  return {
34
32
  postId: getCurrentPostId(),
35
- shouldEnable: choosePatternModalEnabled && !preferencesModalActive && !isEditedPostDirty() && isEditedPostEmpty() && 'page' === getCurrentPostType()
33
+ enabled: choosePatternModalEnabled && !preferencesModalActive && 'page' === getCurrentPostType()
36
34
  };
37
35
  }, []);
36
+ const {
37
+ isEditedPostDirty,
38
+ isEditedPostEmpty
39
+ } = (0, _data.useSelect)(_store.store);
38
40
  const {
39
41
  setIsInserterOpened
40
42
  } = (0, _data.useDispatch)(_store.store);
41
43
  (0, _element.useEffect)(() => {
42
- if (shouldEnable) {
44
+ if (!enabled) {
45
+ return;
46
+ }
47
+ const isFreshPage = !isEditedPostDirty() && isEditedPostEmpty();
48
+ if (isFreshPage) {
43
49
  setIsInserterOpened({
44
50
  tab: 'patterns',
45
51
  category: 'core/starter-content'
46
52
  });
47
53
  }
48
- }, [postId, shouldEnable, setIsInserterOpened]);
54
+
55
+ // Note: The `postId` ensures the effect re-runs when pages are switched without remounting the component.
56
+ // Examples: changing pages in the List View, creating a new page via Command Palette.
57
+ }, [postId, enabled, setIsInserterOpened, isEditedPostDirty, isEditedPostEmpty]);
49
58
  return null;
50
59
  }
51
60
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_data","_preferences","_interface","_store","StartPageOptions","postId","shouldEnable","useSelect","select","isEditedPostDirty","isEditedPostEmpty","getCurrentPostId","getCurrentPostType","editorStore","preferencesModalActive","interfaceStore","isModalActive","choosePatternModalEnabled","preferencesStore","get","setIsInserterOpened","useDispatch","useEffect","tab","category"],"sources":["@wordpress/editor/src/components/start-page-options/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function StartPageOptions() {\n\tconst { postId, shouldEnable } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tisEditedPostDirty,\n\t\t\tisEditedPostEmpty,\n\t\t\tgetCurrentPostId,\n\t\t\tgetCurrentPostType,\n\t\t} = select( editorStore );\n\t\tconst preferencesModalActive =\n\t\t\tselect( interfaceStore ).isModalActive( 'editor/preferences' );\n\t\tconst choosePatternModalEnabled = select( preferencesStore ).get(\n\t\t\t'core',\n\t\t\t'enableChoosePatternModal'\n\t\t);\n\t\treturn {\n\t\t\tpostId: getCurrentPostId(),\n\t\t\tshouldEnable:\n\t\t\t\tchoosePatternModalEnabled &&\n\t\t\t\t! preferencesModalActive &&\n\t\t\t\t! isEditedPostDirty() &&\n\t\t\t\tisEditedPostEmpty() &&\n\t\t\t\t'page' === getCurrentPostType(),\n\t\t};\n\t}, [] );\n\tconst { setIsInserterOpened } = useDispatch( editorStore );\n\n\tuseEffect( () => {\n\t\tif ( shouldEnable ) {\n\t\t\tsetIsInserterOpened( {\n\t\t\t\ttab: 'patterns',\n\t\t\t\tcategory: 'core/starter-content',\n\t\t\t} );\n\t\t}\n\t}, [ postId, shouldEnable, setIsInserterOpened ] );\n\n\treturn null;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AAXA;AACA;AACA;;AAMA;AACA;AACA;;AAGe,SAASK,gBAAgBA,CAAA,EAAG;EAC1C,MAAM;IAAEC,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACzD,MAAM;MACLC,iBAAiB;MACjBC,iBAAiB;MACjBC,gBAAgB;MAChBC;IACD,CAAC,GAAGJ,MAAM,CAAEK,YAAY,CAAC;IACzB,MAAMC,sBAAsB,GAC3BN,MAAM,CAAEO,gBAAe,CAAC,CAACC,aAAa,CAAE,oBAAqB,CAAC;IAC/D,MAAMC,yBAAyB,GAAGT,MAAM,CAAEU,kBAAiB,CAAC,CAACC,GAAG,CAC/D,MAAM,EACN,0BACD,CAAC;IACD,OAAO;MACNd,MAAM,EAAEM,gBAAgB,CAAC,CAAC;MAC1BL,YAAY,EACXW,yBAAyB,IACzB,CAAEH,sBAAsB,IACxB,CAAEL,iBAAiB,CAAC,CAAC,IACrBC,iBAAiB,CAAC,CAAC,IACnB,MAAM,KAAKE,kBAAkB,CAAC;IAChC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,MAAM;IAAEQ;EAAoB,CAAC,GAAG,IAAAC,iBAAW,EAAER,YAAY,CAAC;EAE1D,IAAAS,kBAAS,EAAE,MAAM;IAChB,IAAKhB,YAAY,EAAG;MACnBc,mBAAmB,CAAE;QACpBG,GAAG,EAAE,UAAU;QACfC,QAAQ,EAAE;MACX,CAAE,CAAC;IACJ;EACD,CAAC,EAAE,CAAEnB,MAAM,EAAEC,YAAY,EAAEc,mBAAmB,CAAG,CAAC;EAElD,OAAO,IAAI;AACZ","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_data","_preferences","_interface","_store","StartPageOptions","postId","enabled","useSelect","select","getCurrentPostId","getCurrentPostType","editorStore","preferencesModalActive","interfaceStore","isModalActive","choosePatternModalEnabled","preferencesStore","get","isEditedPostDirty","isEditedPostEmpty","setIsInserterOpened","useDispatch","useEffect","isFreshPage","tab","category"],"sources":["@wordpress/editor/src/components/start-page-options/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function StartPageOptions() {\n\tconst { postId, enabled } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostId, getCurrentPostType } = select( editorStore );\n\t\tconst preferencesModalActive =\n\t\t\tselect( interfaceStore ).isModalActive( 'editor/preferences' );\n\t\tconst choosePatternModalEnabled = select( preferencesStore ).get(\n\t\t\t'core',\n\t\t\t'enableChoosePatternModal'\n\t\t);\n\t\treturn {\n\t\t\tpostId: getCurrentPostId(),\n\t\t\tenabled:\n\t\t\t\tchoosePatternModalEnabled &&\n\t\t\t\t! preferencesModalActive &&\n\t\t\t\t'page' === getCurrentPostType(),\n\t\t};\n\t}, [] );\n\tconst { isEditedPostDirty, isEditedPostEmpty } = useSelect( editorStore );\n\tconst { setIsInserterOpened } = useDispatch( editorStore );\n\n\tuseEffect( () => {\n\t\tif ( ! enabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isFreshPage = ! isEditedPostDirty() && isEditedPostEmpty();\n\t\tif ( isFreshPage ) {\n\t\t\tsetIsInserterOpened( {\n\t\t\t\ttab: 'patterns',\n\t\t\t\tcategory: 'core/starter-content',\n\t\t\t} );\n\t\t}\n\n\t\t// Note: The `postId` ensures the effect re-runs when pages are switched without remounting the component.\n\t\t// Examples: changing pages in the List View, creating a new page via Command Palette.\n\t}, [\n\t\tpostId,\n\t\tenabled,\n\t\tsetIsInserterOpened,\n\t\tisEditedPostDirty,\n\t\tisEditedPostEmpty,\n\t] );\n\n\treturn null;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AAXA;AACA;AACA;;AAMA;AACA;AACA;;AAGe,SAASK,gBAAgBA,CAAA,EAAG;EAC1C,MAAM;IAAEC,MAAM;IAAEC;EAAQ,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACpD,MAAM;MAAEC,gBAAgB;MAAEC;IAAmB,CAAC,GAAGF,MAAM,CAAEG,YAAY,CAAC;IACtE,MAAMC,sBAAsB,GAC3BJ,MAAM,CAAEK,gBAAe,CAAC,CAACC,aAAa,CAAE,oBAAqB,CAAC;IAC/D,MAAMC,yBAAyB,GAAGP,MAAM,CAAEQ,kBAAiB,CAAC,CAACC,GAAG,CAC/D,MAAM,EACN,0BACD,CAAC;IACD,OAAO;MACNZ,MAAM,EAAEI,gBAAgB,CAAC,CAAC;MAC1BH,OAAO,EACNS,yBAAyB,IACzB,CAAEH,sBAAsB,IACxB,MAAM,KAAKF,kBAAkB,CAAC;IAChC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,MAAM;IAAEQ,iBAAiB;IAAEC;EAAkB,CAAC,GAAG,IAAAZ,eAAS,EAAEI,YAAY,CAAC;EACzE,MAAM;IAAES;EAAoB,CAAC,GAAG,IAAAC,iBAAW,EAAEV,YAAY,CAAC;EAE1D,IAAAW,kBAAS,EAAE,MAAM;IAChB,IAAK,CAAEhB,OAAO,EAAG;MAChB;IACD;IAEA,MAAMiB,WAAW,GAAG,CAAEL,iBAAiB,CAAC,CAAC,IAAIC,iBAAiB,CAAC,CAAC;IAChE,IAAKI,WAAW,EAAG;MAClBH,mBAAmB,CAAE;QACpBI,GAAG,EAAE,UAAU;QACfC,QAAQ,EAAE;MACX,CAAE,CAAC;IACJ;;IAEA;IACA;EACD,CAAC,EAAE,CACFpB,MAAM,EACNC,OAAO,EACPc,mBAAmB,EACnBF,iBAAiB,EACjBC,iBAAiB,CAChB,CAAC;EAEH,OAAO,IAAI;AACZ","ignoreList":[]}
@@ -19,11 +19,11 @@ var _store = require("../../store");
19
19
  /**
20
20
  * Checks if the current theme supports specific features and renders the children if supported.
21
21
  *
22
- * @param {Object} props The component props.
23
- * @param {React.ReactElement} props.children The children to render if the theme supports the specified features.
24
- * @param {string|string[]} props.supportKeys The key(s) of the theme support(s) to check.
22
+ * @param {Object} props The component props.
23
+ * @param {React.ReactNode} props.children The children to render if the theme supports the specified features.
24
+ * @param {string|string[]} props.supportKeys The key(s) of the theme support(s) to check.
25
25
  *
26
- * @return {React.ReactElement} The rendered children if the theme supports the specified features, otherwise null.
26
+ * @return {React.ReactNode} The rendered children if the theme supports the specified features, otherwise null.
27
27
  */
28
28
  function ThemeSupportCheck({
29
29
  children,