@wordpress/editor 13.33.0 → 13.35.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 (494) hide show
  1. package/CHANGELOG.md +12 -4
  2. package/README.md +132 -20
  3. package/build/bindings/pattern-overrides.js +70 -1
  4. package/build/bindings/pattern-overrides.js.map +1 -1
  5. package/build/components/autosave-monitor/index.js +15 -12
  6. package/build/components/autosave-monitor/index.js.map +1 -1
  7. package/build/components/block-settings-menu/content-only-settings-menu.js +126 -0
  8. package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -0
  9. package/build/components/block-settings-menu/content-only-settings-menu.native.js +11 -0
  10. package/build/components/block-settings-menu/content-only-settings-menu.native.js.map +1 -0
  11. package/build/components/character-count/index.js +5 -0
  12. package/build/components/character-count/index.js.map +1 -1
  13. package/build/components/collapsible-block-toolbar/index.js +73 -0
  14. package/build/components/collapsible-block-toolbar/index.js.map +1 -0
  15. package/build/components/document-bar/index.js +2 -2
  16. package/build/components/document-bar/index.js.map +1 -1
  17. package/build/components/document-outline/check.js +8 -0
  18. package/build/components/document-outline/check.js.map +1 -1
  19. package/build/components/document-outline/index.js +11 -0
  20. package/build/components/document-outline/index.js.map +1 -1
  21. package/build/components/document-outline/item.js +2 -2
  22. package/build/components/document-outline/item.js.map +1 -1
  23. package/build/components/document-tools/index.js +15 -25
  24. package/build/components/document-tools/index.js.map +1 -1
  25. package/build/components/editor-canvas/edit-template-blocks-notification.js +1 -1
  26. package/build/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
  27. package/build/components/editor-canvas/index.js +19 -8
  28. package/build/components/editor-canvas/index.js.map +1 -1
  29. package/build/components/editor-history/redo.js +11 -0
  30. package/build/components/editor-history/redo.js.map +1 -1
  31. package/build/components/editor-history/undo.js +11 -0
  32. package/build/components/editor-history/undo.js.map +1 -1
  33. package/build/components/editor-snackbars/index.js +6 -0
  34. package/build/components/editor-snackbars/index.js.map +1 -1
  35. package/build/components/global-keyboard-shortcuts/index.js +7 -0
  36. package/build/components/global-keyboard-shortcuts/index.js.map +1 -1
  37. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +35 -1
  38. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  39. package/build/components/global-styles-provider/index.js +130 -0
  40. package/build/components/global-styles-provider/index.js.map +1 -0
  41. package/build/components/header/index.js +147 -0
  42. package/build/components/header/index.js.map +1 -0
  43. package/build/components/inserter-sidebar/index.js +56 -34
  44. package/build/components/inserter-sidebar/index.js.map +1 -1
  45. package/build/components/keyboard-shortcut-help-modal/config.js +4 -0
  46. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  47. package/build/components/keyboard-shortcut-help-modal/index.js +2 -2
  48. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  49. package/build/components/list-view-sidebar/index.js +1 -1
  50. package/build/components/list-view-sidebar/index.js.map +1 -1
  51. package/build/components/more-menu/copy-content-menu-item.js +59 -0
  52. package/build/components/more-menu/copy-content-menu-item.js.map +1 -0
  53. package/build/components/more-menu/index.js +119 -0
  54. package/build/components/more-menu/index.js.map +1 -0
  55. package/build/components/more-menu/tools-more-menu-group.js +23 -0
  56. package/build/components/more-menu/tools-more-menu-group.js.map +1 -0
  57. package/build/components/more-menu/view-more-menu-group.js +24 -0
  58. package/build/components/more-menu/view-more-menu-group.js.map +1 -0
  59. package/build/components/page-attributes/check.js +8 -0
  60. package/build/components/page-attributes/check.js.map +1 -1
  61. package/build/components/page-attributes/order.js +7 -0
  62. package/build/components/page-attributes/order.js.map +1 -1
  63. package/build/components/page-attributes/panel.js +14 -8
  64. package/build/components/page-attributes/panel.js.map +1 -1
  65. package/build/components/page-attributes/parent.js +7 -0
  66. package/build/components/page-attributes/parent.js.map +1 -1
  67. package/build/components/plugin-post-publish-panel/index.js +1 -1
  68. package/build/components/plugin-post-publish-panel/index.js.map +1 -1
  69. package/build/components/plugin-pre-publish-panel/index.js +1 -1
  70. package/build/components/plugin-pre-publish-panel/index.js.map +1 -1
  71. package/build/components/plugin-sidebar/index.js +1 -1
  72. package/build/components/plugin-sidebar/index.js.map +1 -1
  73. package/build/components/post-actions/actions.js +219 -66
  74. package/build/components/post-actions/actions.js.map +1 -1
  75. package/build/components/post-actions/index.js +32 -16
  76. package/build/components/post-actions/index.js.map +1 -1
  77. package/build/components/post-author/check.js +9 -0
  78. package/build/components/post-author/check.js.map +1 -1
  79. package/build/components/post-author/index.js +6 -0
  80. package/build/components/post-author/index.js.map +1 -1
  81. package/build/components/post-author/panel.js +5 -0
  82. package/build/components/post-author/panel.js.map +1 -1
  83. package/build/components/post-card-panel/index.js +7 -66
  84. package/build/components/post-card-panel/index.js.map +1 -1
  85. package/build/components/post-comments/index.js +28 -8
  86. package/build/components/post-comments/index.js.map +1 -1
  87. package/build/components/post-content-information/index.js +72 -0
  88. package/build/components/post-content-information/index.js.map +1 -0
  89. package/build/components/post-discussion/panel.js +104 -20
  90. package/build/components/post-discussion/panel.js.map +1 -1
  91. package/build/components/post-excerpt/check.js +0 -19
  92. package/build/components/post-excerpt/check.js.map +1 -1
  93. package/build/components/post-excerpt/index.js +52 -12
  94. package/build/components/post-excerpt/index.js.map +1 -1
  95. package/build/components/post-excerpt/panel.js +118 -7
  96. package/build/components/post-excerpt/panel.js.map +1 -1
  97. package/build/components/post-excerpt/plugin.js +2 -2
  98. package/build/components/post-excerpt/plugin.js.map +1 -1
  99. package/build/components/post-featured-image/index.js +1 -1
  100. package/build/components/post-featured-image/index.js.map +1 -1
  101. package/build/components/post-format/panel.js +27 -0
  102. package/build/components/post-format/panel.js.map +1 -0
  103. package/build/components/post-last-edited-panel/index.js +33 -0
  104. package/build/components/post-last-edited-panel/index.js.map +1 -0
  105. package/build/components/post-panel-row/index.js +2 -2
  106. package/build/components/post-panel-row/index.js.map +1 -1
  107. package/build/components/post-panel-section/index.js +28 -0
  108. package/build/components/post-panel-section/index.js.map +1 -0
  109. package/build/components/post-pingbacks/index.js +5 -2
  110. package/build/components/post-pingbacks/index.js.map +1 -1
  111. package/build/components/post-publish-button/post-publish-button-or-toggle.js +100 -0
  112. package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -0
  113. package/build/components/post-saved-state/index.js +2 -2
  114. package/build/components/post-saved-state/index.js.map +1 -1
  115. package/build/components/post-schedule/panel.js +1 -1
  116. package/build/components/post-schedule/panel.js.map +1 -1
  117. package/build/components/post-slug/panel.js +27 -0
  118. package/build/components/post-slug/panel.js.map +1 -0
  119. package/build/components/post-status/index.js +13 -13
  120. package/build/components/post-status/index.js.map +1 -1
  121. package/build/components/post-sticky/panel.js +21 -0
  122. package/build/components/post-sticky/panel.js.map +1 -0
  123. package/build/components/post-template/block-theme.js +2 -2
  124. package/build/components/post-template/block-theme.js.map +1 -1
  125. package/build/components/post-template/classic-theme.js +0 -1
  126. package/build/components/post-template/classic-theme.js.map +1 -1
  127. package/build/components/post-template/swap-template-button.js +2 -5
  128. package/build/components/post-template/swap-template-button.js.map +1 -1
  129. package/build/components/post-title/index.js +2 -2
  130. package/build/components/post-title/index.js.map +1 -1
  131. package/build/components/post-title/post-title-raw.js +2 -2
  132. package/build/components/post-title/post-title-raw.js.map +1 -1
  133. package/build/components/post-transform-panel/hooks.js +90 -0
  134. package/build/components/post-transform-panel/hooks.js.map +1 -0
  135. package/build/components/post-transform-panel/index.js +101 -0
  136. package/build/components/post-transform-panel/index.js.map +1 -0
  137. package/build/components/post-trash/panel.js +18 -0
  138. package/build/components/post-trash/panel.js.map +1 -0
  139. package/build/components/post-type-support-check/index.js +1 -1
  140. package/build/components/post-type-support-check/index.js.map +1 -1
  141. package/build/components/post-url/index.js +2 -1
  142. package/build/components/post-url/index.js.map +1 -1
  143. package/build/components/post-url/panel.js +1 -1
  144. package/build/components/post-url/panel.js.map +1 -1
  145. package/build/components/preferences-modal/enable-publish-sidebar.js +34 -0
  146. package/build/components/preferences-modal/enable-publish-sidebar.js.map +1 -0
  147. package/build/components/preferences-modal/index.js +11 -5
  148. package/build/components/preferences-modal/index.js.map +1 -1
  149. package/build/components/preview-dropdown/index.js +3 -1
  150. package/build/components/preview-dropdown/index.js.map +1 -1
  151. package/build/components/provider/disable-non-page-content-blocks.js +23 -16
  152. package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
  153. package/build/components/provider/index.js +3 -1
  154. package/build/components/provider/index.js.map +1 -1
  155. package/build/components/provider/use-block-editor-settings.js +21 -3
  156. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  157. package/build/components/save-publish-panels/index.js +89 -0
  158. package/build/components/save-publish-panels/index.js.map +1 -0
  159. package/build/components/sidebar/constants.js +11 -0
  160. package/build/components/sidebar/constants.js.map +1 -0
  161. package/build/components/sidebar/header.js +53 -0
  162. package/build/components/sidebar/header.js.map +1 -0
  163. package/build/components/sidebar/index.js +157 -0
  164. package/build/components/sidebar/index.js.map +1 -0
  165. package/build/components/sidebar/post-summary.js +84 -0
  166. package/build/components/sidebar/post-summary.js.map +1 -0
  167. package/build/components/start-page-options/index.js +10 -8
  168. package/build/components/start-page-options/index.js.map +1 -1
  169. package/build/components/start-template-options/index.js +192 -0
  170. package/build/components/start-template-options/index.js.map +1 -0
  171. package/build/components/template-content-panel/index.js +38 -0
  172. package/build/components/template-content-panel/index.js.map +1 -0
  173. package/build/hooks/pattern-overrides.js +10 -5
  174. package/build/hooks/pattern-overrides.js.map +1 -1
  175. package/build/private-apis.js +19 -8
  176. package/build/private-apis.js.map +1 -1
  177. package/build/private-apis.native.js +72 -0
  178. package/build/private-apis.native.js.map +1 -0
  179. package/build/store/private-selectors.js +6 -1
  180. package/build/store/private-selectors.js.map +1 -1
  181. package/build/store/reducer.js +15 -0
  182. package/build/store/reducer.js.map +1 -1
  183. package/build/store/selectors.js +3 -1
  184. package/build/store/selectors.js.map +1 -1
  185. package/build-module/bindings/pattern-overrides.js +69 -1
  186. package/build-module/bindings/pattern-overrides.js.map +1 -1
  187. package/build-module/components/autosave-monitor/index.js +15 -13
  188. package/build-module/components/autosave-monitor/index.js.map +1 -1
  189. package/build-module/components/block-settings-menu/content-only-settings-menu.js +119 -0
  190. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -0
  191. package/build-module/components/block-settings-menu/content-only-settings-menu.native.js +5 -0
  192. package/build-module/components/block-settings-menu/content-only-settings-menu.native.js.map +1 -0
  193. package/build-module/components/character-count/index.js +6 -0
  194. package/build-module/components/character-count/index.js.map +1 -1
  195. package/build-module/components/collapsible-block-toolbar/index.js +65 -0
  196. package/build-module/components/collapsible-block-toolbar/index.js.map +1 -0
  197. package/build-module/components/document-bar/index.js +2 -2
  198. package/build-module/components/document-bar/index.js.map +1 -1
  199. package/build-module/components/document-outline/check.js +9 -0
  200. package/build-module/components/document-outline/check.js.map +1 -1
  201. package/build-module/components/document-outline/index.js +11 -0
  202. package/build-module/components/document-outline/index.js.map +1 -1
  203. package/build-module/components/document-outline/item.js +2 -2
  204. package/build-module/components/document-outline/item.js.map +1 -1
  205. package/build-module/components/document-tools/index.js +17 -27
  206. package/build-module/components/document-tools/index.js.map +1 -1
  207. package/build-module/components/editor-canvas/edit-template-blocks-notification.js +1 -1
  208. package/build-module/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
  209. package/build-module/components/editor-canvas/index.js +19 -8
  210. package/build-module/components/editor-canvas/index.js.map +1 -1
  211. package/build-module/components/editor-history/redo.js +11 -0
  212. package/build-module/components/editor-history/redo.js.map +1 -1
  213. package/build-module/components/editor-history/undo.js +11 -0
  214. package/build-module/components/editor-history/undo.js.map +1 -1
  215. package/build-module/components/editor-snackbars/index.js +6 -0
  216. package/build-module/components/editor-snackbars/index.js.map +1 -1
  217. package/build-module/components/global-keyboard-shortcuts/index.js +8 -0
  218. package/build-module/components/global-keyboard-shortcuts/index.js.map +1 -1
  219. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +36 -1
  220. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  221. package/build-module/components/global-styles-provider/index.js +120 -0
  222. package/build-module/components/global-styles-provider/index.js.map +1 -0
  223. package/build-module/components/header/index.js +139 -0
  224. package/build-module/components/header/index.js.map +1 -0
  225. package/build-module/components/inserter-sidebar/index.js +59 -37
  226. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  227. package/build-module/components/keyboard-shortcut-help-modal/config.js +4 -0
  228. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  229. package/build-module/components/keyboard-shortcut-help-modal/index.js +2 -2
  230. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  231. package/build-module/components/list-view-sidebar/index.js +1 -1
  232. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  233. package/build-module/components/more-menu/copy-content-menu-item.js +52 -0
  234. package/build-module/components/more-menu/copy-content-menu-item.js.map +1 -0
  235. package/build-module/components/more-menu/index.js +111 -0
  236. package/build-module/components/more-menu/index.js.map +1 -0
  237. package/build-module/components/more-menu/tools-more-menu-group.js +16 -0
  238. package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -0
  239. package/build-module/components/more-menu/view-more-menu-group.js +17 -0
  240. package/build-module/components/more-menu/view-more-menu-group.js.map +1 -0
  241. package/build-module/components/page-attributes/check.js +9 -0
  242. package/build-module/components/page-attributes/check.js.map +1 -1
  243. package/build-module/components/page-attributes/order.js +7 -0
  244. package/build-module/components/page-attributes/order.js.map +1 -1
  245. package/build-module/components/page-attributes/panel.js +13 -6
  246. package/build-module/components/page-attributes/panel.js.map +1 -1
  247. package/build-module/components/page-attributes/parent.js +7 -0
  248. package/build-module/components/page-attributes/parent.js.map +1 -1
  249. package/build-module/components/plugin-post-publish-panel/index.js +1 -1
  250. package/build-module/components/plugin-post-publish-panel/index.js.map +1 -1
  251. package/build-module/components/plugin-pre-publish-panel/index.js +1 -1
  252. package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -1
  253. package/build-module/components/plugin-sidebar/index.js +1 -1
  254. package/build-module/components/plugin-sidebar/index.js.map +1 -1
  255. package/build-module/components/post-actions/actions.js +223 -70
  256. package/build-module/components/post-actions/actions.js.map +1 -1
  257. package/build-module/components/post-actions/index.js +33 -17
  258. package/build-module/components/post-actions/index.js.map +1 -1
  259. package/build-module/components/post-author/check.js +10 -0
  260. package/build-module/components/post-author/check.js.map +1 -1
  261. package/build-module/components/post-author/index.js +6 -0
  262. package/build-module/components/post-author/index.js.map +1 -1
  263. package/build-module/components/post-author/panel.js +6 -0
  264. package/build-module/components/post-author/panel.js.map +1 -1
  265. package/build-module/components/post-card-panel/index.js +9 -67
  266. package/build-module/components/post-card-panel/index.js.map +1 -1
  267. package/build-module/components/post-comments/index.js +30 -10
  268. package/build-module/components/post-comments/index.js.map +1 -1
  269. package/build-module/components/post-content-information/index.js +66 -0
  270. package/build-module/components/post-content-information/index.js.map +1 -0
  271. package/build-module/components/post-discussion/panel.js +105 -21
  272. package/build-module/components/post-discussion/panel.js.map +1 -1
  273. package/build-module/components/post-excerpt/check.js +0 -19
  274. package/build-module/components/post-excerpt/check.js.map +1 -1
  275. package/build-module/components/post-excerpt/index.js +52 -11
  276. package/build-module/components/post-excerpt/index.js.map +1 -1
  277. package/build-module/components/post-excerpt/panel.js +118 -8
  278. package/build-module/components/post-excerpt/panel.js.map +1 -1
  279. package/build-module/components/post-excerpt/plugin.js +2 -2
  280. package/build-module/components/post-excerpt/plugin.js.map +1 -1
  281. package/build-module/components/post-featured-image/index.js +1 -1
  282. package/build-module/components/post-featured-image/index.js.map +1 -1
  283. package/build-module/components/post-format/panel.js +18 -0
  284. package/build-module/components/post-format/panel.js.map +1 -0
  285. package/build-module/components/post-last-edited-panel/index.js +26 -0
  286. package/build-module/components/post-last-edited-panel/index.js.map +1 -0
  287. package/build-module/components/post-panel-row/index.js +2 -2
  288. package/build-module/components/post-panel-row/index.js.map +1 -1
  289. package/build-module/components/post-panel-section/index.js +20 -0
  290. package/build-module/components/post-panel-section/index.js.map +1 -0
  291. package/build-module/components/post-pingbacks/index.js +6 -3
  292. package/build-module/components/post-pingbacks/index.js.map +1 -1
  293. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +91 -0
  294. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -0
  295. package/build-module/components/post-saved-state/index.js +2 -2
  296. package/build-module/components/post-saved-state/index.js.map +1 -1
  297. package/build-module/components/post-schedule/panel.js +1 -1
  298. package/build-module/components/post-schedule/panel.js.map +1 -1
  299. package/build-module/components/post-slug/panel.js +18 -0
  300. package/build-module/components/post-slug/panel.js.map +1 -0
  301. package/build-module/components/post-status/index.js +13 -13
  302. package/build-module/components/post-status/index.js.map +1 -1
  303. package/build-module/components/post-sticky/panel.js +12 -0
  304. package/build-module/components/post-sticky/panel.js.map +1 -0
  305. package/build-module/components/post-template/block-theme.js +2 -2
  306. package/build-module/components/post-template/block-theme.js.map +1 -1
  307. package/build-module/components/post-template/classic-theme.js +0 -1
  308. package/build-module/components/post-template/classic-theme.js.map +1 -1
  309. package/build-module/components/post-template/swap-template-button.js +3 -6
  310. package/build-module/components/post-template/swap-template-button.js.map +1 -1
  311. package/build-module/components/post-title/index.js +2 -2
  312. package/build-module/components/post-title/index.js.map +1 -1
  313. package/build-module/components/post-title/post-title-raw.js +2 -2
  314. package/build-module/components/post-title/post-title-raw.js.map +1 -1
  315. package/build-module/components/post-transform-panel/hooks.js +83 -0
  316. package/build-module/components/post-transform-panel/hooks.js.map +1 -0
  317. package/build-module/components/post-transform-panel/index.js +94 -0
  318. package/build-module/components/post-transform-panel/index.js.map +1 -0
  319. package/build-module/components/post-trash/panel.js +10 -0
  320. package/build-module/components/post-trash/panel.js.map +1 -0
  321. package/build-module/components/post-type-support-check/index.js +1 -1
  322. package/build-module/components/post-type-support-check/index.js.map +1 -1
  323. package/build-module/components/post-url/index.js +2 -1
  324. package/build-module/components/post-url/index.js.map +1 -1
  325. package/build-module/components/post-url/panel.js +1 -1
  326. package/build-module/components/post-url/panel.js.map +1 -1
  327. package/build-module/components/preferences-modal/enable-publish-sidebar.js +27 -0
  328. package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +1 -0
  329. package/build-module/components/preferences-modal/index.js +11 -5
  330. package/build-module/components/preferences-modal/index.js.map +1 -1
  331. package/build-module/components/preview-dropdown/index.js +3 -1
  332. package/build-module/components/preview-dropdown/index.js.map +1 -1
  333. package/build-module/components/provider/disable-non-page-content-blocks.js +24 -17
  334. package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
  335. package/build-module/components/provider/index.js +3 -1
  336. package/build-module/components/provider/index.js.map +1 -1
  337. package/build-module/components/provider/use-block-editor-settings.js +21 -3
  338. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  339. package/build-module/components/save-publish-panels/index.js +80 -0
  340. package/build-module/components/save-publish-panels/index.js.map +1 -0
  341. package/build-module/components/sidebar/constants.js +5 -0
  342. package/build-module/components/sidebar/constants.js.map +1 -0
  343. package/build-module/components/sidebar/header.js +46 -0
  344. package/build-module/components/sidebar/header.js.map +1 -0
  345. package/build-module/components/sidebar/index.js +149 -0
  346. package/build-module/components/sidebar/index.js.map +1 -0
  347. package/build-module/components/sidebar/post-summary.js +77 -0
  348. package/build-module/components/sidebar/post-summary.js.map +1 -0
  349. package/build-module/components/start-page-options/index.js +10 -8
  350. package/build-module/components/start-page-options/index.js.map +1 -1
  351. package/build-module/components/start-template-options/index.js +185 -0
  352. package/build-module/components/start-template-options/index.js.map +1 -0
  353. package/build-module/components/template-content-panel/index.js +31 -0
  354. package/build-module/components/template-content-panel/index.js.map +1 -0
  355. package/build-module/hooks/pattern-overrides.js +10 -5
  356. package/build-module/hooks/pattern-overrides.js.map +1 -1
  357. package/build-module/private-apis.js +19 -8
  358. package/build-module/private-apis.js.map +1 -1
  359. package/build-module/private-apis.native.js +62 -0
  360. package/build-module/private-apis.native.js.map +1 -0
  361. package/build-module/store/private-selectors.js +3 -0
  362. package/build-module/store/private-selectors.js.map +1 -1
  363. package/build-module/store/reducer.js +14 -0
  364. package/build-module/store/reducer.js.map +1 -1
  365. package/build-module/store/selectors.js +3 -1
  366. package/build-module/store/selectors.js.map +1 -1
  367. package/build-style/style-rtl.css +535 -48
  368. package/build-style/style.css +535 -48
  369. package/package.json +38 -36
  370. package/src/bindings/pattern-overrides.js +83 -1
  371. package/src/components/autocompleters/style.scss +1 -2
  372. package/src/components/autosave-monitor/index.js +15 -12
  373. package/src/components/block-settings-menu/content-only-settings-menu.js +175 -0
  374. package/src/components/block-settings-menu/content-only-settings-menu.native.js +4 -0
  375. package/src/components/block-settings-menu/style.scss +4 -0
  376. package/src/components/character-count/index.js +5 -0
  377. package/src/components/collapsible-block-toolbar/index.js +77 -0
  378. package/src/components/collapsible-block-toolbar/style.scss +80 -0
  379. package/src/components/document-bar/index.js +2 -2
  380. package/src/components/document-outline/check.js +8 -0
  381. package/src/components/document-outline/index.js +10 -0
  382. package/src/components/document-outline/item.js +2 -2
  383. package/src/components/document-tools/index.js +19 -26
  384. package/src/components/editor-canvas/edit-template-blocks-notification.js +1 -1
  385. package/src/components/editor-canvas/index.js +18 -6
  386. package/src/components/editor-history/redo.js +10 -0
  387. package/src/components/editor-history/undo.js +10 -0
  388. package/src/components/editor-snackbars/index.js +5 -0
  389. package/src/components/entities-saved-states/style.scss +7 -0
  390. package/src/components/global-keyboard-shortcuts/index.js +7 -0
  391. package/src/components/global-keyboard-shortcuts/register-shortcuts.js +42 -1
  392. package/src/components/global-styles-provider/index.js +162 -0
  393. package/src/components/header/index.js +154 -0
  394. package/src/components/header/style.scss +231 -0
  395. package/src/components/inserter-sidebar/index.js +52 -32
  396. package/src/components/inserter-sidebar/style.scss +10 -3
  397. package/src/components/keyboard-shortcut-help-modal/config.js +10 -1
  398. package/src/components/keyboard-shortcut-help-modal/index.js +2 -2
  399. package/src/components/list-view-sidebar/index.js +1 -1
  400. package/src/components/list-view-sidebar/style.scss +3 -2
  401. package/src/components/more-menu/copy-content-menu-item.js +51 -0
  402. package/src/components/more-menu/index.js +158 -0
  403. package/src/components/more-menu/tools-more-menu-group.js +11 -0
  404. package/src/components/more-menu/view-more-menu-group.js +13 -0
  405. package/src/components/page-attributes/check.js +8 -0
  406. package/src/components/page-attributes/order.js +6 -0
  407. package/src/components/page-attributes/panel.js +21 -17
  408. package/src/components/page-attributes/parent.js +6 -0
  409. package/src/components/page-attributes/test/order.js +5 -1
  410. package/src/components/plugin-post-publish-panel/index.js +1 -1
  411. package/src/components/plugin-pre-publish-panel/index.js +1 -1
  412. package/src/components/plugin-sidebar/index.js +1 -1
  413. package/src/components/post-actions/actions.js +373 -152
  414. package/src/components/post-actions/index.js +34 -33
  415. package/src/components/post-author/check.js +9 -0
  416. package/src/components/post-author/index.js +5 -0
  417. package/src/components/post-author/panel.js +5 -0
  418. package/src/components/post-card-panel/index.js +40 -141
  419. package/src/components/post-card-panel/style.scss +2 -6
  420. package/src/components/post-comments/index.js +47 -9
  421. package/src/components/post-content-information/index.js +83 -0
  422. package/src/components/post-content-information/style.scss +6 -0
  423. package/src/components/post-discussion/panel.js +108 -27
  424. package/src/components/post-discussion/style.scss +26 -0
  425. package/src/components/post-excerpt/check.js +0 -18
  426. package/src/components/post-excerpt/index.js +66 -15
  427. package/src/components/post-excerpt/panel.js +196 -19
  428. package/src/components/post-excerpt/plugin.js +2 -2
  429. package/src/components/post-excerpt/style.scss +24 -0
  430. package/src/components/post-featured-image/index.js +1 -1
  431. package/src/components/post-featured-image/style.scss +2 -8
  432. package/src/components/post-format/panel.js +22 -0
  433. package/src/components/post-format/style.scss +6 -0
  434. package/src/components/post-last-edited-panel/index.js +35 -0
  435. package/src/components/post-last-edited-panel/style.scss +6 -0
  436. package/src/components/post-last-revision/test/check.js +5 -1
  437. package/src/components/post-panel-row/index.js +2 -2
  438. package/src/components/post-panel-row/style.scss +3 -3
  439. package/src/components/post-panel-section/index.js +19 -0
  440. package/src/components/post-panel-section/style.scss +3 -0
  441. package/src/components/post-pingbacks/index.js +11 -2
  442. package/src/components/post-publish-button/post-publish-button-or-toggle.js +102 -0
  443. package/src/components/post-publish-button/test/post-publish-button-or-toggle.js +63 -0
  444. package/src/components/post-publish-panel/style.scss +48 -0
  445. package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +225 -75
  446. package/src/components/post-saved-state/index.js +2 -2
  447. package/src/components/post-schedule/panel.js +1 -1
  448. package/src/components/post-schedule/style.scss +2 -4
  449. package/src/components/post-slug/panel.js +22 -0
  450. package/src/components/post-slug/style.scss +5 -0
  451. package/src/components/post-slug/test/index.js +5 -1
  452. package/src/components/post-status/index.js +88 -80
  453. package/src/components/post-status/style.scss +0 -1
  454. package/src/components/post-sticky/panel.js +18 -0
  455. package/src/components/post-template/block-theme.js +2 -2
  456. package/src/components/post-template/classic-theme.js +0 -1
  457. package/src/components/post-template/swap-template-button.js +3 -6
  458. package/src/components/post-text-editor/style.scss +1 -1
  459. package/src/components/post-title/index.js +2 -2
  460. package/src/components/post-title/post-title-raw.js +2 -2
  461. package/src/components/post-title/style.scss +1 -1
  462. package/src/components/post-transform-panel/hooks.js +114 -0
  463. package/src/components/post-transform-panel/index.js +99 -0
  464. package/src/components/post-trash/panel.js +13 -0
  465. package/src/components/post-type-support-check/index.js +1 -1
  466. package/src/components/post-type-support-check/test/index.js +2 -2
  467. package/src/components/post-url/index.js +1 -0
  468. package/src/components/post-url/panel.js +1 -1
  469. package/src/components/preferences-modal/enable-publish-sidebar.js +28 -0
  470. package/src/components/preferences-modal/index.js +17 -3
  471. package/src/components/preview-dropdown/index.js +3 -1
  472. package/src/components/provider/disable-non-page-content-blocks.js +23 -21
  473. package/src/components/provider/index.js +4 -0
  474. package/src/components/provider/use-block-editor-settings.js +19 -4
  475. package/src/components/save-publish-panels/index.js +96 -0
  476. package/src/components/save-publish-panels/style.scss +36 -0
  477. package/src/components/sidebar/constants.js +4 -0
  478. package/src/components/sidebar/header.js +49 -0
  479. package/src/components/sidebar/index.js +200 -0
  480. package/src/components/sidebar/post-summary.js +104 -0
  481. package/src/components/sidebar/style.scss +18 -0
  482. package/src/components/start-page-options/index.js +12 -5
  483. package/src/components/start-template-options/index.js +219 -0
  484. package/src/components/start-template-options/style.scss +55 -0
  485. package/src/components/template-areas/style.scss +0 -1
  486. package/src/components/template-content-panel/index.js +36 -0
  487. package/src/hooks/pattern-overrides.js +12 -6
  488. package/src/private-apis.js +22 -8
  489. package/src/private-apis.native.js +61 -0
  490. package/src/store/private-selectors.js +3 -0
  491. package/src/store/reducer.js +12 -0
  492. package/src/store/selectors.js +3 -1
  493. package/src/style.scss +11 -0
  494. package/src/components/post-slug/test/check.js +0 -17
@@ -0,0 +1,80 @@
1
+ import { createElement, Fragment } from "react";
2
+ /**
3
+ * WordPress dependencies
4
+ */
5
+ import { useSelect, useDispatch } from '@wordpress/data';
6
+ import { Button, createSlotFill } from '@wordpress/components';
7
+ import { __ } from '@wordpress/i18n';
8
+ import { useCallback } from '@wordpress/element';
9
+
10
+ /**
11
+ * Internal dependencies
12
+ */
13
+ import EntitiesSavedStates from '../entities-saved-states';
14
+ import PostPublishPanel from '../post-publish-panel';
15
+ import PluginPrePublishPanel from '../plugin-pre-publish-panel';
16
+ import PluginPostPublishPanel from '../plugin-post-publish-panel';
17
+ import { store as editorStore } from '../../store';
18
+ const {
19
+ Fill,
20
+ Slot
21
+ } = createSlotFill('ActionsPanel');
22
+ export const ActionsPanelFill = Fill;
23
+ export default function SavePublishPanels({
24
+ setEntitiesSavedStatesCallback,
25
+ closeEntitiesSavedStates,
26
+ isEntitiesSavedStatesOpen,
27
+ forceIsDirtyPublishPanel
28
+ }) {
29
+ const {
30
+ closePublishSidebar,
31
+ togglePublishSidebar
32
+ } = useDispatch(editorStore);
33
+ const {
34
+ publishSidebarOpened,
35
+ hasNonPostEntityChanges
36
+ } = useSelect(select => ({
37
+ publishSidebarOpened: select(editorStore).isPublishSidebarOpened(),
38
+ hasNonPostEntityChanges: select(editorStore).hasNonPostEntityChanges()
39
+ }), []);
40
+ const openEntitiesSavedStates = useCallback(() => setEntitiesSavedStatesCallback(true), []);
41
+
42
+ // It is ok for these components to be unmounted when not in visual use.
43
+ // We don't want more than one present at a time, decide which to render.
44
+ let unmountableContent;
45
+ if (publishSidebarOpened) {
46
+ unmountableContent = createElement(PostPublishPanel, {
47
+ onClose: closePublishSidebar,
48
+ forceIsDirty: forceIsDirtyPublishPanel,
49
+ PrePublishExtension: PluginPrePublishPanel.Slot,
50
+ PostPublishExtension: PluginPostPublishPanel.Slot
51
+ });
52
+ } else if (hasNonPostEntityChanges) {
53
+ unmountableContent = createElement("div", {
54
+ className: "editor-layout__toggle-entities-saved-states-panel"
55
+ }, createElement(Button, {
56
+ variant: "secondary",
57
+ className: "editor-layout__toggle-entities-saved-states-panel-button",
58
+ onClick: openEntitiesSavedStates,
59
+ "aria-expanded": false
60
+ }, __('Open save panel')));
61
+ } else {
62
+ unmountableContent = createElement("div", {
63
+ className: "editor-layout__toggle-publish-panel"
64
+ }, createElement(Button, {
65
+ variant: "secondary",
66
+ className: "editor-layout__toggle-publish-panel-button",
67
+ onClick: togglePublishSidebar,
68
+ "aria-expanded": false
69
+ }, __('Open publish panel')));
70
+ }
71
+
72
+ // Since EntitiesSavedStates controls its own panel, we can keep it
73
+ // always mounted to retain its own component state (such as checkboxes).
74
+ return createElement(Fragment, null, isEntitiesSavedStatesOpen && createElement(EntitiesSavedStates, {
75
+ close: closeEntitiesSavedStates
76
+ }), createElement(Slot, {
77
+ bubblesVirtually: true
78
+ }), !isEntitiesSavedStatesOpen && unmountableContent);
79
+ }
80
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useSelect","useDispatch","Button","createSlotFill","__","useCallback","EntitiesSavedStates","PostPublishPanel","PluginPrePublishPanel","PluginPostPublishPanel","store","editorStore","Fill","Slot","ActionsPanelFill","SavePublishPanels","setEntitiesSavedStatesCallback","closeEntitiesSavedStates","isEntitiesSavedStatesOpen","forceIsDirtyPublishPanel","closePublishSidebar","togglePublishSidebar","publishSidebarOpened","hasNonPostEntityChanges","select","isPublishSidebarOpened","openEntitiesSavedStates","unmountableContent","createElement","onClose","forceIsDirty","PrePublishExtension","PostPublishExtension","className","variant","onClick","Fragment","close","bubblesVirtually"],"sources":["@wordpress/editor/src/components/save-publish-panels/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { Button, createSlotFill } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport EntitiesSavedStates from '../entities-saved-states';\nimport PostPublishPanel from '../post-publish-panel';\nimport PluginPrePublishPanel from '../plugin-pre-publish-panel';\nimport PluginPostPublishPanel from '../plugin-post-publish-panel';\nimport { store as editorStore } from '../../store';\n\nconst { Fill, Slot } = createSlotFill( 'ActionsPanel' );\n\nexport const ActionsPanelFill = Fill;\n\nexport default function SavePublishPanels( {\n\tsetEntitiesSavedStatesCallback,\n\tcloseEntitiesSavedStates,\n\tisEntitiesSavedStatesOpen,\n\tforceIsDirtyPublishPanel,\n} ) {\n\tconst { closePublishSidebar, togglePublishSidebar } =\n\t\tuseDispatch( editorStore );\n\tconst { publishSidebarOpened, hasNonPostEntityChanges } = useSelect(\n\t\t( select ) => ( {\n\t\t\tpublishSidebarOpened:\n\t\t\t\tselect( editorStore ).isPublishSidebarOpened(),\n\t\t\thasNonPostEntityChanges:\n\t\t\t\tselect( editorStore ).hasNonPostEntityChanges(),\n\t\t} ),\n\t\t[]\n\t);\n\n\tconst openEntitiesSavedStates = useCallback(\n\t\t() => setEntitiesSavedStatesCallback( true ),\n\t\t[]\n\t);\n\n\t// It is ok for these components to be unmounted when not in visual use.\n\t// We don't want more than one present at a time, decide which to render.\n\tlet unmountableContent;\n\tif ( publishSidebarOpened ) {\n\t\tunmountableContent = (\n\t\t\t<PostPublishPanel\n\t\t\t\tonClose={ closePublishSidebar }\n\t\t\t\tforceIsDirty={ forceIsDirtyPublishPanel }\n\t\t\t\tPrePublishExtension={ PluginPrePublishPanel.Slot }\n\t\t\t\tPostPublishExtension={ PluginPostPublishPanel.Slot }\n\t\t\t/>\n\t\t);\n\t} else if ( hasNonPostEntityChanges ) {\n\t\tunmountableContent = (\n\t\t\t<div className=\"editor-layout__toggle-entities-saved-states-panel\">\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tclassName=\"editor-layout__toggle-entities-saved-states-panel-button\"\n\t\t\t\t\tonClick={ openEntitiesSavedStates }\n\t\t\t\t\taria-expanded={ false }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Open save panel' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t);\n\t} else {\n\t\tunmountableContent = (\n\t\t\t<div className=\"editor-layout__toggle-publish-panel\">\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tclassName=\"editor-layout__toggle-publish-panel-button\"\n\t\t\t\t\tonClick={ togglePublishSidebar }\n\t\t\t\t\taria-expanded={ false }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Open publish panel' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Since EntitiesSavedStates controls its own panel, we can keep it\n\t// always mounted to retain its own component state (such as checkboxes).\n\treturn (\n\t\t<>\n\t\t\t{ isEntitiesSavedStatesOpen && (\n\t\t\t\t<EntitiesSavedStates close={ closeEntitiesSavedStates } />\n\t\t\t) }\n\t\t\t<Slot bubblesVirtually />\n\t\t\t{ ! isEntitiesSavedStatesOpen && unmountableContent }\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,MAAM,EAAEC,cAAc,QAAQ,uBAAuB;AAC9D,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,QAAQ,oBAAoB;;AAEhD;AACA;AACA;AACA,OAAOC,mBAAmB,MAAM,0BAA0B;AAC1D,OAAOC,gBAAgB,MAAM,uBAAuB;AACpD,OAAOC,qBAAqB,MAAM,6BAA6B;AAC/D,OAAOC,sBAAsB,MA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AAkB,CACjB,CACJ,CACL;EACF,CAAC,MAAM;IACNuB,kBAAkB,GACjBC,aAAA;MAAKK,SAAS,EAAC;IAAqC,GACnDL,aAAA,CAAC1B,MAAM;MACNgC,OAAO,EAAC,WAAW;MACnBD,SAAS,EAAC,4CAA4C;MACtDE,OAAO,EAAGd,oBAAsB;MAChC,iBAAgB;IAAO,GAErBjB,EAAE,CAAE,oBAAqB,CACpB,CACJ,CACL;EACF;;EAEA;EACA;EACA,OACCwB,aAAA,CAAAQ,QAAA,QACGlB,yBAAyB,IAC1BU,aAAA,CAACtB,mBAAmB;IAAC+B,KAAK,EAAGpB;EAA0B,CAAE,CACzD,EACDW,aAAA,CAACf,IAAI;IAACyB,gBAAgB;EAAA,CAAE,CAAC,EACvB,CAAEpB,yBAAyB,IAAIS,kBAChC,CAAC;AAEL","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ export const sidebars = {
2
+ document: 'edit-post/document',
3
+ block: 'edit-post/block'
4
+ };
5
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sidebars","document","block"],"sources":["@wordpress/editor/src/components/sidebar/constants.js"],"sourcesContent":["export const sidebars = {\n\tdocument: 'edit-post/document',\n\tblock: 'edit-post/block',\n};\n"],"mappings":"AAAA,OAAO,MAAMA,QAAQ,GAAG;EACvBC,QAAQ,EAAE,oBAAoB;EAC9BC,KAAK,EAAE;AACR,CAAC","ignoreList":[]}
@@ -0,0 +1,46 @@
1
+ import { createElement } from "react";
2
+ /**
3
+ * WordPress dependencies
4
+ */
5
+ import { privateApis as componentsPrivateApis } from '@wordpress/components';
6
+ import { __, _x } from '@wordpress/i18n';
7
+ import { useSelect } from '@wordpress/data';
8
+ import { forwardRef } from '@wordpress/element';
9
+
10
+ /**
11
+ * Internal dependencies
12
+ */
13
+ import { store as editorStore } from '../../store';
14
+ import { unlock } from '../../lock-unlock';
15
+ import { sidebars } from './constants';
16
+ const {
17
+ Tabs
18
+ } = unlock(componentsPrivateApis);
19
+ const SidebarHeader = (_, ref) => {
20
+ const {
21
+ documentLabel
22
+ } = useSelect(select => {
23
+ const {
24
+ getPostTypeLabel
25
+ } = select(editorStore);
26
+ return {
27
+ // translators: Default label for the Document sidebar tab, not selected.
28
+ documentLabel: getPostTypeLabel() || _x('Document', 'noun')
29
+ };
30
+ }, []);
31
+ return createElement(Tabs.TabList, {
32
+ ref: ref
33
+ }, createElement(Tabs.Tab, {
34
+ tabId: sidebars.document
35
+ // Used for focus management in the SettingsSidebar component.
36
+ ,
37
+ "data-tab-id": sidebars.document
38
+ }, documentLabel), createElement(Tabs.Tab, {
39
+ tabId: sidebars.block
40
+ // Used for focus management in the SettingsSidebar component.
41
+ ,
42
+ "data-tab-id": sidebars.block
43
+ }, __('Block')));
44
+ };
45
+ export default forwardRef(SidebarHeader);
46
+ //# sourceMappingURL=header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["privateApis","componentsPrivateApis","__","_x","useSelect","forwardRef","store","editorStore","unlock","sidebars","Tabs","SidebarHeader","_","ref","documentLabel","select","getPostTypeLabel","createElement","TabList","Tab","tabId","document","block"],"sources":["@wordpress/editor/src/components/sidebar/header.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { sidebars } from './constants';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nconst SidebarHeader = ( _, ref ) => {\n\tconst { documentLabel } = useSelect( ( select ) => {\n\t\tconst { getPostTypeLabel } = select( editorStore );\n\n\t\treturn {\n\t\t\t// translators: Default label for the Document sidebar tab, not selected.\n\t\t\tdocumentLabel: getPostTypeLabel() || _x( 'Document', 'noun' ),\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Tabs.TabList ref={ ref }>\n\t\t\t<Tabs.Tab\n\t\t\t\ttabId={ sidebars.document }\n\t\t\t\t// Used for focus management in the SettingsSidebar component.\n\t\t\t\tdata-tab-id={ sidebars.document }\n\t\t\t>\n\t\t\t\t{ documentLabel }\n\t\t\t</Tabs.Tab>\n\t\t\t<Tabs.Tab\n\t\t\t\ttabId={ sidebars.block }\n\t\t\t\t// Used for focus management in the SettingsSidebar component.\n\t\t\t\tdata-tab-id={ sidebars.block }\n\t\t\t>\n\t\t\t\t{ /* translators: Text label for the Block Settings Sidebar tab. */ }\n\t\t\t\t{ __( 'Block' ) }\n\t\t\t</Tabs.Tab>\n\t\t</Tabs.TabList>\n\t);\n};\n\nexport default forwardRef( SidebarHeader );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,qBAAqB,QAAQ,uBAAuB;AAC5E,SAASC,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,WAAW,QAAQ,aAAa;AAClD,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,QAAQ,QAAQ,aAAa;AAEtC,MAAM;EAAEC;AAAK,CAAC,GAAGF,MAAM,CAAEP,qBAAsB,CAAC;AAEhD,MAAMU,aAAa,GAAGA,CAAEC,CAAC,EAAEC,GAAG,KAAM;EACnC,MAAM;IAAEC;EAAc,CAAC,GAAGV,SAAS,CAAIW,MAAM,IAAM;IAClD,MAAM;MAAEC;IAAiB,CAAC,GAAGD,MAAM,CAAER,WAAY,CAAC;IAElD,OAAO;MACN;MACAO,aAAa,EAAEE,gBAAgB,CAAC,CAAC,IAAIb,EAAE,CAAE,UAAU,EAAE,MAAO;IAC7D,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,OACCc,aAAA,CAACP,IAAI,CAACQ,OAAO;IAACL,GAAG,EAAGA;EAAK,GACxBI,aAAA,CAACP,IAAI,CAACS,GAAG;IACRC,KAAK,EAAGX,QAAQ,CAACY;IACjB;IAAA;IACA,eAAcZ,QAAQ,CAACY;EAAU,GAE/BP,aACO,CAAC,EACXG,aAAA,CAACP,IAAI,CAACS,GAAG;IACRC,KAAK,EAAGX,QAAQ,CAACa;IACjB;IAAA;IACA,eAAcb,QAAQ,CAACa;EAAO,GAG5BpB,EAAE,CAAE,OAAQ,CACL,CACG,CAAC;AAEjB,CAAC;AAED,eAAeG,UAAU,CAAEM,aAAc,CAAC","ignoreList":[]}
@@ -0,0 +1,149 @@
1
+ import { createElement } from "react";
2
+ /**
3
+ * WordPress dependencies
4
+ */
5
+ import { BlockInspector, store as blockEditorStore } from '@wordpress/block-editor';
6
+ import { useSelect, useDispatch } from '@wordpress/data';
7
+ import { Platform, useCallback, useContext, useEffect, useRef } from '@wordpress/element';
8
+ import { isRTL, __ } from '@wordpress/i18n';
9
+ import { drawerLeft, drawerRight } from '@wordpress/icons';
10
+ import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
11
+ import { privateApis as componentsPrivateApis } from '@wordpress/components';
12
+ import { store as interfaceStore } from '@wordpress/interface';
13
+
14
+ /**
15
+ * Internal dependencies
16
+ */
17
+ import PageAttributesPanel from '../page-attributes/panel';
18
+ import PatternOverridesPanel from '../pattern-overrides-panel';
19
+ import PluginDocumentSettingPanel from '../plugin-document-setting-panel';
20
+ import PluginSidebar from '../plugin-sidebar';
21
+ import PostLastRevisionPanel from '../post-last-revision/panel';
22
+ import PostSummary from './post-summary';
23
+ import PostTaxonomiesPanel from '../post-taxonomies/panel';
24
+ import PostTransformPanel from '../post-transform-panel';
25
+ import SidebarHeader from './header';
26
+ import TemplateContentPanel from '../template-content-panel';
27
+ import useAutoSwitchEditorSidebars from '../provider/use-auto-switch-editor-sidebars';
28
+ import { sidebars } from './constants';
29
+ import { unlock } from '../../lock-unlock';
30
+ import { store as editorStore } from '../../store';
31
+ import { NAVIGATION_POST_TYPE, TEMPLATE_PART_POST_TYPE, TEMPLATE_POST_TYPE } from '../../store/constants';
32
+ const {
33
+ Tabs
34
+ } = unlock(componentsPrivateApis);
35
+ const SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select({
36
+ web: true,
37
+ native: false
38
+ });
39
+ const SidebarContent = ({
40
+ tabName,
41
+ keyboardShortcut,
42
+ renderingMode,
43
+ onActionPerformed,
44
+ extraPanels
45
+ }) => {
46
+ const tabListRef = useRef(null);
47
+ // Because `PluginSidebar` renders a `ComplementaryArea`, we
48
+ // need to forward the `Tabs` context so it can be passed through the
49
+ // underlying slot/fill.
50
+ const tabsContextValue = useContext(Tabs.Context);
51
+
52
+ // This effect addresses a race condition caused by tabbing from the last
53
+ // block in the editor into the settings sidebar. Without this effect, the
54
+ // selected tab and browser focus can become separated in an unexpected way
55
+ // (e.g the "block" tab is focused, but the "post" tab is selected).
56
+ useEffect(() => {
57
+ const tabsElements = Array.from(tabListRef.current?.querySelectorAll('[role="tab"]') || []);
58
+ const selectedTabElement = tabsElements.find(
59
+ // We are purposefully using a custom `data-tab-id` attribute here
60
+ // because we don't want rely on any assumptions about `Tabs`
61
+ // component internals.
62
+ element => element.getAttribute('data-tab-id') === tabName);
63
+ const activeElement = selectedTabElement?.ownerDocument.activeElement;
64
+ const tabsHasFocus = tabsElements.some(element => {
65
+ return activeElement && activeElement.id === element.id;
66
+ });
67
+ if (tabsHasFocus && selectedTabElement && selectedTabElement.id !== activeElement?.id) {
68
+ selectedTabElement?.focus();
69
+ }
70
+ }, [tabName]);
71
+ return createElement(PluginSidebar, {
72
+ identifier: tabName,
73
+ header: createElement(Tabs.Context.Provider, {
74
+ value: tabsContextValue
75
+ }, createElement(SidebarHeader, {
76
+ ref: tabListRef
77
+ })),
78
+ closeLabel: __('Close Settings')
79
+ // This classname is added so we can apply a corrective negative
80
+ // margin to the panel.
81
+ // see https://github.com/WordPress/gutenberg/pull/55360#pullrequestreview-1737671049
82
+ ,
83
+ className: "editor-sidebar__panel",
84
+ headerClassName: "editor-sidebar__panel-tabs"
85
+ /* translators: button label text should, if possible, be under 16 characters. */,
86
+ title: __('Settings'),
87
+ toggleShortcut: keyboardShortcut,
88
+ icon: isRTL() ? drawerLeft : drawerRight,
89
+ isActiveByDefault: SIDEBAR_ACTIVE_BY_DEFAULT
90
+ }, createElement(Tabs.Context.Provider, {
91
+ value: tabsContextValue
92
+ }, createElement(Tabs.TabPanel, {
93
+ tabId: sidebars.document,
94
+ focusable: false
95
+ }, createElement(PostSummary, {
96
+ onActionPerformed: onActionPerformed
97
+ }), createElement(PluginDocumentSettingPanel.Slot, null), renderingMode !== 'post-only' && createElement(TemplateContentPanel, null), createElement(PostTransformPanel, null), createElement(PostLastRevisionPanel, null), createElement(PostTaxonomiesPanel, null), createElement(PageAttributesPanel, null), createElement(PatternOverridesPanel, null), extraPanels), createElement(Tabs.TabPanel, {
98
+ tabId: sidebars.block,
99
+ focusable: false
100
+ }, createElement(BlockInspector, null))));
101
+ };
102
+ const Sidebar = ({
103
+ extraPanels,
104
+ onActionPerformed
105
+ }) => {
106
+ useAutoSwitchEditorSidebars();
107
+ const {
108
+ tabName,
109
+ keyboardShortcut,
110
+ showSummary,
111
+ renderingMode
112
+ } = useSelect(select => {
113
+ const shortcut = select(keyboardShortcutsStore).getShortcutRepresentation('core/editor/toggle-sidebar');
114
+ const sidebar = select(interfaceStore).getActiveComplementaryArea('core');
115
+ const _isEditorSidebarOpened = [sidebars.block, sidebars.document].includes(sidebar);
116
+ let _tabName = sidebar;
117
+ if (!_isEditorSidebarOpened) {
118
+ _tabName = !!select(blockEditorStore).getBlockSelectionStart() ? sidebars.block : sidebars.document;
119
+ }
120
+ return {
121
+ tabName: _tabName,
122
+ keyboardShortcut: shortcut,
123
+ showSummary: ![TEMPLATE_POST_TYPE, TEMPLATE_PART_POST_TYPE, NAVIGATION_POST_TYPE].includes(select(editorStore).getCurrentPostType()),
124
+ renderingMode: select(editorStore).getRenderingMode()
125
+ };
126
+ }, []);
127
+ const {
128
+ enableComplementaryArea
129
+ } = useDispatch(interfaceStore);
130
+ const onTabSelect = useCallback(newSelectedTabId => {
131
+ if (!!newSelectedTabId) {
132
+ enableComplementaryArea('core', newSelectedTabId);
133
+ }
134
+ }, [enableComplementaryArea]);
135
+ return createElement(Tabs, {
136
+ selectedTabId: tabName,
137
+ onSelect: onTabSelect,
138
+ selectOnMove: false
139
+ }, createElement(SidebarContent, {
140
+ tabName: tabName,
141
+ keyboardShortcut: keyboardShortcut,
142
+ showSummary: showSummary,
143
+ renderingMode: renderingMode,
144
+ onActionPerformed: onActionPerformed,
145
+ extraPanels: extraPanels
146
+ }));
147
+ };
148
+ export default Sidebar;
149
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BlockInspector","store","blockEditorStore","useSelect","useDispatch","Platform","useCallback","useContext","useEffect","useRef","isRTL","__","drawerLeft","drawerRight","keyboardShortcutsStore","privateApis","componentsPrivateApis","interfaceStore","PageAttributesPanel","PatternOverridesPanel","PluginDocumentSettingPanel","PluginSidebar","PostLastRevisionPanel","PostSummary","PostTaxonomiesPanel","PostTransformPanel","SidebarHeader","TemplateContentPanel","useAutoSwitchEditorSidebars","sidebars","unlock","editorStore","NAVIGATION_POST_TYPE","TEMPLATE_PART_POST_TYPE","TEMPLATE_POST_TYPE","Tabs","SIDEBAR_ACTIVE_BY_DEFAULT","select","web","native","SidebarContent","tabName","keyboardShortcut","renderingMode","onActionPerformed","extraPanels","tabListRef","tabsContextValue","Context","tabsElements","Array","from","current","querySelectorAll","selectedTabElement","find","element","getAttribute","activeElement","ownerDocument","tabsHasFocus","some","id","focus","createElement","identifier","header","Provider","value","ref","closeLabel","className","headerClassName","title","toggleShortcut","icon","isActiveByDefault","TabPanel","tabId","document","focusable","Slot","block","Sidebar","showSummary","shortcut","getShortcutRepresentation","sidebar","getActiveComplementaryArea","_isEditorSidebarOpened","includes","_tabName","getBlockSelectionStart","getCurrentPostType","getRenderingMode","enableComplementaryArea","onTabSelect","newSelectedTabId","selectedTabId","onSelect","selectOnMove"],"sources":["@wordpress/editor/src/components/sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBlockInspector,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tPlatform,\n\tuseCallback,\n\tuseContext,\n\tuseEffect,\n\tuseRef,\n} from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { drawerLeft, drawerRight } from '@wordpress/icons';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport PageAttributesPanel from '../page-attributes/panel';\nimport PatternOverridesPanel from '../pattern-overrides-panel';\nimport PluginDocumentSettingPanel from '../plugin-document-setting-panel';\nimport PluginSidebar from '../plugin-sidebar';\nimport PostLastRevisionPanel from '../post-last-revision/panel';\nimport PostSummary from './post-summary';\nimport PostTaxonomiesPanel from '../post-taxonomies/panel';\nimport PostTransformPanel from '../post-transform-panel';\nimport SidebarHeader from './header';\nimport TemplateContentPanel from '../template-content-panel';\nimport useAutoSwitchEditorSidebars from '../provider/use-auto-switch-editor-sidebars';\nimport { sidebars } from './constants';\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\nimport {\n\tNAVIGATION_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_POST_TYPE,\n} from '../../store/constants';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nconst SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select( {\n\tweb: true,\n\tnative: false,\n} );\n\nconst SidebarContent = ( {\n\ttabName,\n\tkeyboardShortcut,\n\trenderingMode,\n\tonActionPerformed,\n\textraPanels,\n} ) => {\n\tconst tabListRef = useRef( null );\n\t// Because `PluginSidebar` renders a `ComplementaryArea`, we\n\t// need to forward the `Tabs` context so it can be passed through the\n\t// underlying slot/fill.\n\tconst tabsContextValue = useContext( Tabs.Context );\n\n\t// This effect addresses a race condition caused by tabbing from the last\n\t// block in the editor into the settings sidebar. Without this effect, the\n\t// selected tab and browser focus can become separated in an unexpected way\n\t// (e.g the \"block\" tab is focused, but the \"post\" tab is selected).\n\tuseEffect( () => {\n\t\tconst tabsElements = Array.from(\n\t\t\ttabListRef.current?.querySelectorAll( '[role=\"tab\"]' ) || []\n\t\t);\n\t\tconst selectedTabElement = tabsElements.find(\n\t\t\t// We are purposefully using a custom `data-tab-id` attribute here\n\t\t\t// because we don't want rely on any assumptions about `Tabs`\n\t\t\t// component internals.\n\t\t\t( element ) => element.getAttribute( 'data-tab-id' ) === tabName\n\t\t);\n\t\tconst activeElement = selectedTabElement?.ownerDocument.activeElement;\n\t\tconst tabsHasFocus = tabsElements.some( ( element ) => {\n\t\t\treturn activeElement && activeElement.id === element.id;\n\t\t} );\n\t\tif (\n\t\t\ttabsHasFocus &&\n\t\t\tselectedTabElement &&\n\t\t\tselectedTabElement.id !== activeElement?.id\n\t\t) {\n\t\t\tselectedTabElement?.focus();\n\t\t}\n\t}, [ tabName ] );\n\n\treturn (\n\t\t<PluginSidebar\n\t\t\tidentifier={ tabName }\n\t\t\theader={\n\t\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t\t<SidebarHeader ref={ tabListRef } />\n\t\t\t\t</Tabs.Context.Provider>\n\t\t\t}\n\t\t\tcloseLabel={ __( 'Close Settings' ) }\n\t\t\t// This classname is added so we can apply a corrective negative\n\t\t\t// margin to the panel.\n\t\t\t// see https://github.com/WordPress/gutenberg/pull/55360#pullrequestreview-1737671049\n\t\t\tclassName=\"editor-sidebar__panel\"\n\t\t\theaderClassName=\"editor-sidebar__panel-tabs\"\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\ttitle={ __( 'Settings' ) }\n\t\t\ttoggleShortcut={ keyboardShortcut }\n\t\t\ticon={ isRTL() ? drawerLeft : drawerRight }\n\t\t\tisActiveByDefault={ SIDEBAR_ACTIVE_BY_DEFAULT }\n\t\t>\n\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t<Tabs.TabPanel tabId={ sidebars.document } focusable={ false }>\n\t\t\t\t\t<PostSummary onActionPerformed={ onActionPerformed } />\n\t\t\t\t\t<PluginDocumentSettingPanel.Slot />\n\t\t\t\t\t{ renderingMode !== 'post-only' && (\n\t\t\t\t\t\t<TemplateContentPanel />\n\t\t\t\t\t) }\n\t\t\t\t\t<PostTransformPanel />\n\t\t\t\t\t<PostLastRevisionPanel />\n\t\t\t\t\t<PostTaxonomiesPanel />\n\t\t\t\t\t<PageAttributesPanel />\n\t\t\t\t\t<PatternOverridesPanel />\n\t\t\t\t\t{ extraPanels }\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel tabId={ sidebars.block } focusable={ false }>\n\t\t\t\t\t<BlockInspector />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs.Context.Provider>\n\t\t</PluginSidebar>\n\t);\n};\n\nconst Sidebar = ( { extraPanels, onActionPerformed } ) => {\n\tuseAutoSwitchEditorSidebars();\n\tconst { tabName, keyboardShortcut, showSummary, renderingMode } = useSelect(\n\t\t( select ) => {\n\t\t\tconst shortcut = select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/editor/toggle-sidebar' );\n\n\t\t\tconst sidebar =\n\t\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' );\n\t\t\tconst _isEditorSidebarOpened = [\n\t\t\t\tsidebars.block,\n\t\t\t\tsidebars.document,\n\t\t\t].includes( sidebar );\n\t\t\tlet _tabName = sidebar;\n\t\t\tif ( ! _isEditorSidebarOpened ) {\n\t\t\t\t_tabName = !! select(\n\t\t\t\t\tblockEditorStore\n\t\t\t\t).getBlockSelectionStart()\n\t\t\t\t\t? sidebars.block\n\t\t\t\t\t: sidebars.document;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\ttabName: _tabName,\n\t\t\t\tkeyboardShortcut: shortcut,\n\t\t\t\tshowSummary: ! [\n\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\tTEMPLATE_PART_POST_TYPE,\n\t\t\t\t\tNAVIGATION_POST_TYPE,\n\t\t\t\t].includes( select( editorStore ).getCurrentPostType() ),\n\t\t\t\trenderingMode: select( editorStore ).getRenderingMode(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\tconst onTabSelect = useCallback(\n\t\t( newSelectedTabId ) => {\n\t\t\tif ( !! newSelectedTabId ) {\n\t\t\t\tenableComplementaryArea( 'core', newSelectedTabId );\n\t\t\t}\n\t\t},\n\t\t[ enableComplementaryArea ]\n\t);\n\n\treturn (\n\t\t<Tabs\n\t\t\tselectedTabId={ tabName }\n\t\t\tonSelect={ onTabSelect }\n\t\t\tselectOnMove={ false }\n\t\t>\n\t\t\t<SidebarContent\n\t\t\t\ttabName={ tabName }\n\t\t\t\tkeyboardShortcut={ keyboardShortcut }\n\t\t\t\tshowSummary={ showSummary }\n\t\t\t\trenderingMode={ renderingMode }\n\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\textraPanels={ extraPanels }\n\t\t\t/>\n\t\t</Tabs>\n\t);\n};\n\nexport default Sidebar;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,cAAc,EACdC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SACCC,QAAQ,EACRC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,MAAM,QACA,oBAAoB;AAC3B,SAASC,KAAK,EAAEC,EAAE,QAAQ,iBAAiB;AAC3C,SAASC,UAAU,EAAEC,WAAW,QAAQ,kBAAkB;AAC1D,SAASZ,KAAK,IAAIa,sBAAsB,QAAQ,+BAA+B;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"react";
2
+ /**
3
+ * WordPress dependencies
4
+ */
5
+ import { __experimentalVStack as VStack } from '@wordpress/components';
6
+ import { useSelect } from '@wordpress/data';
7
+
8
+ /**
9
+ * Internal dependencies
10
+ */
11
+ import PluginPostStatusInfo from '../plugin-post-status-info';
12
+ import PostActions from '../post-actions';
13
+ import PostAuthorPanel from '../post-author/panel';
14
+ import PostCardPanel from '../post-card-panel';
15
+ import PostContentInformation from '../post-content-information';
16
+ import PostDiscussionPanel from '../post-discussion/panel';
17
+ import { PrivatePostExcerptPanel as PostExcerptPanel } from '../post-excerpt/panel';
18
+ import PostFeaturedImagePanel from '../post-featured-image/panel';
19
+ import PostFormatPanel from '../post-format/panel';
20
+ import PostLastEditedPanel from '../post-last-edited-panel';
21
+ import PostPanelSection from '../post-panel-section';
22
+ import PostSchedulePanel from '../post-schedule/panel';
23
+ import PostStatusPanel from '../post-status';
24
+ import PostStickyPanel from '../post-sticky';
25
+ import PostSyncStatus from '../post-sync-status';
26
+ import PostTemplatePanel from '../post-template/panel';
27
+ import PostTrashPanel from '../post-trash/panel';
28
+ import PostURLPanel from '../post-url/panel';
29
+ import { store as editorStore } from '../../store';
30
+ import { NAVIGATION_POST_TYPE, PATTERN_POST_TYPE, TEMPLATE_PART_POST_TYPE, TEMPLATE_POST_TYPE } from '../../store/constants';
31
+ import TemplateAreas from '../template-areas';
32
+
33
+ /**
34
+ * Module Constants
35
+ */
36
+ const PANEL_NAME = 'post-status';
37
+ export default function PostSummary({
38
+ onActionPerformed
39
+ }) {
40
+ const {
41
+ isRemovedPostStatusPanel,
42
+ postType
43
+ } = useSelect(select => {
44
+ // We use isEditorPanelRemoved to hide the panel if it was programatically removed. We do
45
+ // not use isEditorPanelEnabled since this panel should not be disabled through the UI.
46
+ const {
47
+ isEditorPanelRemoved,
48
+ getCurrentPostType
49
+ } = select(editorStore);
50
+ return {
51
+ isRemovedPostStatusPanel: isEditorPanelRemoved(PANEL_NAME),
52
+ postType: getCurrentPostType()
53
+ };
54
+ }, []);
55
+ const isPattern = postType === PATTERN_POST_TYPE;
56
+ const isTemplate = postType === TEMPLATE_POST_TYPE;
57
+ const isTemplatePart = postType === TEMPLATE_PART_POST_TYPE;
58
+ const isNavigation = postType === NAVIGATION_POST_TYPE;
59
+ return createElement(PostPanelSection, {
60
+ className: "editor-post-summary"
61
+ }, createElement(PluginPostStatusInfo.Slot, null, fills => createElement(Fragment, null, createElement(VStack, {
62
+ spacing: 4
63
+ }, createElement(PostCardPanel, {
64
+ actions: createElement(PostActions, {
65
+ onActionPerformed: onActionPerformed
66
+ })
67
+ }), createElement(PostFeaturedImagePanel, {
68
+ withPanelBody: false
69
+ }), createElement(PostExcerptPanel, null), createElement(VStack, {
70
+ spacing: 1
71
+ }, createElement(PostContentInformation, null), createElement(PostLastEditedPanel, null)), !isRemovedPostStatusPanel && createElement(VStack, {
72
+ spacing: 2
73
+ }, createElement(VStack, {
74
+ spacing: 1
75
+ }, createElement(PostStatusPanel, null), createElement(PostSchedulePanel, null), createElement(PostTemplatePanel, null), createElement(PostURLPanel, null), createElement(PostDiscussionPanel, null), createElement(PostSyncStatus, null)), createElement(PostStickyPanel, null), createElement(PostFormatPanel, null), createElement(PostAuthorPanel, null), isTemplate && createElement(TemplateAreas, null), fills, !isPattern && !isTemplate && !isTemplatePart && !isNavigation && createElement(PostTrashPanel, null))))));
76
+ }
77
+ //# sourceMappingURL=post-summary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__experimentalVStack","VStack","useSelect","PluginPostStatusInfo","PostActions","PostAuthorPanel","PostCardPanel","PostContentInformation","PostDiscussionPanel","PrivatePostExcerptPanel","PostExcerptPanel","PostFeaturedImagePanel","PostFormatPanel","PostLastEditedPanel","PostPanelSection","PostSchedulePanel","PostStatusPanel","PostStickyPanel","PostSyncStatus","PostTemplatePanel","PostTrashPanel","PostURLPanel","store","editorStore","NAVIGATION_POST_TYPE","PATTERN_POST_TYPE","TEMPLATE_PART_POST_TYPE","TEMPLATE_POST_TYPE","TemplateAreas","PANEL_NAME","PostSummary","onActionPerformed","isRemovedPostStatusPanel","postType","select","isEditorPanelRemoved","getCurrentPostType","isPattern","isTemplate","isTemplatePart","isNavigation","createElement","className","Slot","fills","Fragment","spacing","actions","withPanelBody"],"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 PostActions from '../post-actions';\nimport PostAuthorPanel from '../post-author/panel';\nimport PostCardPanel from '../post-card-panel';\nimport PostContentInformation from '../post-content-information';\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 PostStickyPanel from '../post-sticky';\nimport PostSyncStatus from '../post-sync-status';\nimport PostTemplatePanel from '../post-template/panel';\nimport PostTrashPanel from '../post-trash/panel';\nimport PostURLPanel from '../post-url/panel';\nimport { store as editorStore } from '../../store';\nimport {\n\tNAVIGATION_POST_TYPE,\n\tPATTERN_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_POST_TYPE,\n} from '../../store/constants';\nimport TemplateAreas from '../template-areas';\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'post-status';\n\nexport default function PostSummary( { onActionPerformed } ) {\n\tconst { isRemovedPostStatusPanel, postType } = useSelect( ( select ) => {\n\t\t// We use isEditorPanelRemoved to hide the panel if it was programatically removed. We do\n\t\t// not use isEditorPanelEnabled since this panel should not be disabled through the UI.\n\t\tconst { isEditorPanelRemoved, getCurrentPostType } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tisRemovedPostStatusPanel: isEditorPanelRemoved( PANEL_NAME ),\n\t\t\tpostType: getCurrentPostType(),\n\t\t};\n\t}, [] );\n\tconst isPattern = postType === PATTERN_POST_TYPE;\n\tconst isTemplate = postType === TEMPLATE_POST_TYPE;\n\tconst isTemplatePart = postType === TEMPLATE_PART_POST_TYPE;\n\tconst isNavigation = postType === NAVIGATION_POST_TYPE;\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\tactions={\n\t\t\t\t\t\t\t\t\t<PostActions\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}\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={ 2 }>\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<PostTemplatePanel />\n\t\t\t\t\t\t\t\t\t\t<PostURLPanel />\n\t\t\t\t\t\t\t\t\t\t<PostDiscussionPanel />\n\t\t\t\t\t\t\t\t\t\t<PostSyncStatus />\n\t\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t\t\t<PostStickyPanel />\n\t\t\t\t\t\t\t\t\t<PostFormatPanel />\n\t\t\t\t\t\t\t\t\t<PostAuthorPanel />\n\t\t\t\t\t\t\t\t\t{ isTemplate && <TemplateAreas /> }\n\t\t\t\t\t\t\t\t\t{ fills }\n\t\t\t\t\t\t\t\t\t{ ! isPattern &&\n\t\t\t\t\t\t\t\t\t\t! isTemplate &&\n\t\t\t\t\t\t\t\t\t\t! isTemplatePart &&\n\t\t\t\t\t\t\t\t\t\t! isNavigation && <PostTrashPanel /> }\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":";AAAA;AACA;AACA;AACA,SAASA,oBAAoB,IAAIC,MAAM,QAAQ,uBAAuB;AACtE,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,OAAOC,oBAAoB,MAAM,4BAA4B;AAC7D,OAAOC,WAAW,MAAM,iBAAiB;AACzC,OAAOC,eAAe,MAAM,sBAAsB;AAClD,OAAOC,aAAa,MAAM,oBAAoB;AAC9C,OAAOC,sBAAsB,MAAM,6BAA6B;AAChE,OAAOC,mBAAmB,MAAM,0BAA0B;AAC1D,SAASC,uBAAuB,IAAIC,gBAAgB,QAAQ,uBAAuB;AACnF,OAAOC,sBAAsB,MAAM,8BAA8B;AACjE,OAAOC,eAAe,MAAM,sBAAsB;AAClD,OAAOC,mBAAmB,MAAM,2BAA2B;AAC3D,OAAOC,gBAAgB,MAAM,uBAAuB;AACpD,OAAOC,iBAAiB,MAAM,wBAAwB;AACtD,OAAOC,eAAe,MAAM,gBAAgB;AAC5C,OAAOC,eAAe,MAAM,gBAAgB;AAC5C,OAAOC,cAAc,MAAM,qBAAqB;AAChD,OAAOC,iBAAiB,MAAM,wBAAwB;AACtD,OAAOC,cAAc,MAAM,q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B,MAAE,CAAC,EACpB+B,aAAA,CAACxC,MAAM;IAAC6C,OAAO,EAAG;EAAG,GACpBL,aAAA,CAAClC,sBAAsB,MAAE,CAAC,EAC1BkC,aAAA,CAAC5B,mBAAmB,MAAE,CACf,CAAC,EACP,CAAEmB,wBAAwB,IAC3BS,aAAA,CAACxC,MAAM;IAAC6C,OAAO,EAAG;EAAG,GACpBL,aAAA,CAACxC,MAAM;IAAC6C,OAAO,EAAG;EAAG,GACpBL,aAAA,CAACzB,eAAe,MAAE,CAAC,EACnByB,aAAA,CAAC1B,iBAAiB,MAAE,CAAC,EACrB0B,aAAA,CAACtB,iBAAiB,MAAE,CAAC,EACrBsB,aAAA,CAACpB,YAAY,MAAE,CAAC,EAChBoB,aAAA,CAACjC,mBAAmB,MAAE,CAAC,EACvBiC,aAAA,CAACvB,cAAc,MAAE,CACV,CAAC,EACTuB,aAAA,CAACxB,eAAe,MAAE,CAAC,EACnBwB,aAAA,CAAC7B,eAAe,MAAE,CAAC,EACnB6B,aAAA,CAACpC,eAAe,MAAE,CAAC,EACjBiC,UAAU,IAAIG,aAAA,CAACb,aAAa,MAAE,CAAC,EAC/BgB,KAAK,EACL,CAAEP,SAAS,IACZ,CAAEC,UAAU,IACZ,CAAEC,cAAc,IAChB,CAAEC,YAAY,IAAIC,aAAA,CAACrB,cAAc,MAAE,CAC7B,CAEF,CACP,CAEuB,CACV,CAAC;AAErB","ignoreList":[]}
@@ -9,11 +9,13 @@ import { store as blockEditorStore, __experimentalBlockPatternsList as BlockPatt
9
9
  import { useSelect, useDispatch } from '@wordpress/data';
10
10
  import { useAsyncList } from '@wordpress/compose';
11
11
  import { store as coreStore } from '@wordpress/core-data';
12
+ import { __unstableSerializeAndClean } from '@wordpress/blocks';
12
13
 
13
14
  /**
14
15
  * Internal dependencies
15
16
  */
16
17
  import { store as editorStore } from '../../store';
18
+ import { TEMPLATE_POST_TYPE } from '../../store/constants';
17
19
  function useStartPatterns() {
18
20
  // A pattern is a start pattern if it includes 'core/post-content' in its blockTypes,
19
21
  // and it has no postTypes declared and the current post type is page or if
@@ -70,7 +72,10 @@ function PatternSelection({
70
72
  shownPatterns: shownBlockPatterns,
71
73
  onClickPattern: (_pattern, blocks) => {
72
74
  editEntityRecord('postType', postType, postId, {
73
- blocks
75
+ blocks,
76
+ content: ({
77
+ blocks: blocksForSerialization = []
78
+ }) => __unstableSerializeAndClean(blocksForSerialization)
74
79
  });
75
80
  onChoosePattern();
76
81
  }
@@ -106,15 +111,12 @@ export default function StartPageOptions() {
106
111
  isEditedPostDirty,
107
112
  isEditedPostEmpty,
108
113
  getCurrentPostType,
109
- getCurrentPostId,
110
- getEditorSettings
114
+ getCurrentPostId
111
115
  } = select(editorStore);
112
- const {
113
- __unstableIsPreviewMode: isPreviewMode
114
- } = getEditorSettings();
116
+ const _postType = getCurrentPostType();
115
117
  return {
116
- shouldEnableModal: !isPreviewMode && !isEditedPostDirty() && isEditedPostEmpty(),
117
- postType: getCurrentPostType(),
118
+ shouldEnableModal: !isEditedPostDirty() && isEditedPostEmpty() && TEMPLATE_POST_TYPE !== _postType,
119
+ postType: _postType,
118
120
  postId: getCurrentPostId()
119
121
  };
120
122
  }, []);
@@ -1 +1 @@
1
- {"version":3,"names":["Modal","__","useState","useMemo","useEffect","store","blockEditorStore","__experimentalBlockPatternsList","BlockPatternsList","useSelect","useDispatch","useAsyncList","coreStore","editorStore","useStartPatterns","blockPatternsWithPostContentBlockType","postType","select","getPatternsByBlockTypes","getBlocksByName","getCurrentPostType","getRenderingMode","rootClientId","filter","pattern","postTypes","Array","isArray","includes","PatternSelection","blockPatterns","onChoosePattern","shownBlockPatterns","editEntityRecord","postId","getCurrentPostId","createElement","shownPatterns","onClickPattern","_pattern","blocks","StartPageOptionsModal","onClose","startPatterns","hasStartPattern","length","title","isFullScreen","onRequestClose","className","StartPageOptions","isClosed","setIsClosed","shouldEnableModal","isEditedPostDirty","isEditedPostEmpty","getEditorSettings","__unstableIsPreviewMode","isPreviewMode"],"sources":["@wordpress/editor/src/components/start-page-options/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useMemo, useEffect } from '@wordpress/element';\nimport {\n\tstore as blockEditorStore,\n\t__experimentalBlockPatternsList as BlockPatternsList,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useAsyncList } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction useStartPatterns() {\n\t// A pattern is a start pattern if it includes 'core/post-content' in its blockTypes,\n\t// and it has no postTypes declared and the current post type is page or if\n\t// the current post type is part of the postTypes declared.\n\tconst { blockPatternsWithPostContentBlockType, postType } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getPatternsByBlockTypes, getBlocksByName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst { getCurrentPostType, getRenderingMode } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst rootClientId =\n\t\t\t\tgetRenderingMode() === 'post-only'\n\t\t\t\t\t? ''\n\t\t\t\t\t: getBlocksByName( 'core/post-content' )?.[ 0 ];\n\t\t\treturn {\n\t\t\t\tblockPatternsWithPostContentBlockType: getPatternsByBlockTypes(\n\t\t\t\t\t'core/post-content',\n\t\t\t\t\trootClientId\n\t\t\t\t),\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\treturn useMemo( () => {\n\t\t// filter patterns without postTypes declared if the current postType is page\n\t\t// or patterns that declare the current postType in its post type array.\n\t\treturn blockPatternsWithPostContentBlockType.filter( ( pattern ) => {\n\t\t\treturn (\n\t\t\t\t( postType === 'page' && ! pattern.postTypes ) ||\n\t\t\t\t( Array.isArray( pattern.postTypes ) &&\n\t\t\t\t\tpattern.postTypes.includes( postType ) )\n\t\t\t);\n\t\t} );\n\t}, [ postType, blockPatternsWithPostContentBlockType ] );\n}\n\nfunction PatternSelection( { blockPatterns, onChoosePattern } ) {\n\tconst shownBlockPatterns = useAsyncList( blockPatterns );\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst { postType, postId } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostType, getCurrentPostId } = select( editorStore );\n\n\t\treturn {\n\t\t\tpostType: getCurrentPostType(),\n\t\t\tpostId: getCurrentPostId(),\n\t\t};\n\t}, [] );\n\treturn (\n\t\t<BlockPatternsList\n\t\t\tblockPatterns={ blockPatterns }\n\t\t\tshownPatterns={ shownBlockPatterns }\n\t\t\tonClickPattern={ ( _pattern, blocks ) => {\n\t\t\t\teditEntityRecord( 'postType', postType, postId, { blocks } );\n\t\t\t\tonChoosePattern();\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction StartPageOptionsModal( { onClose } ) {\n\tconst startPatterns = useStartPatterns();\n\tconst hasStartPattern = startPatterns.length > 0;\n\n\tif ( ! hasStartPattern ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ __( 'Choose a pattern' ) }\n\t\t\tisFullScreen\n\t\t\tonRequestClose={ onClose }\n\t\t>\n\t\t\t<div className=\"editor-start-page-options__modal-content\">\n\t\t\t\t<PatternSelection\n\t\t\t\t\tblockPatterns={ startPatterns }\n\t\t\t\t\tonChoosePattern={ onClose }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</Modal>\n\t);\n}\n\nexport default function StartPageOptions() {\n\tconst [ isClosed, setIsClosed ] = useState( false );\n\tconst { shouldEnableModal, postType, postId } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tisEditedPostDirty,\n\t\t\tisEditedPostEmpty,\n\t\t\tgetCurrentPostType,\n\t\t\tgetCurrentPostId,\n\t\t\tgetEditorSettings,\n\t\t} = select( editorStore );\n\t\tconst { __unstableIsPreviewMode: isPreviewMode } = getEditorSettings();\n\n\t\treturn {\n\t\t\tshouldEnableModal:\n\t\t\t\t! isPreviewMode && ! isEditedPostDirty() && isEditedPostEmpty(),\n\t\t\tpostType: getCurrentPostType(),\n\t\t\tpostId: getCurrentPostId(),\n\t\t};\n\t}, [] );\n\n\tuseEffect( () => {\n\t\t// Should reset the modal state when navigating to a new page/post.\n\t\tsetIsClosed( false );\n\t}, [ postType, postId ] );\n\n\tif ( ! shouldEnableModal || isClosed ) {\n\t\treturn null;\n\t}\n\n\treturn <StartPageOptionsModal onClose={ () => setIsClosed( true ) } />;\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,QAAQ,uBAAuB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,EAAEC,OAAO,EAAEC,SAAS,QAAQ,oBAAoB;AACjE,SACCC,KAAK,IAAIC,gBAAgB,EACzBC,+BAA+B,IAAIC,iBAAiB,QAC9C,yBAAyB;AAChC,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASN,KAAK,IAAIO,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,SAASP,KAAK,IAAIQ,WAAW,QAAQ,aAAa;AAElD,SAASC,gBAAgBA,CAAA,EAAG;EAC3B;EACA;EACA;EACA,MAAM;IAAEC,qCAAqC;IAAEC;EAAS,CAAC,GAAGP,SAAS,CAClEQ,MAAM,IAAM;IACb,MAAM;MAAEC,uBAAuB;MAAEC;IAAgB,CAAC,GACjDF,MAAM,CAAEX,gBAAiB,CAAC;IAC3B,MAAM;MAAEc,kBAAkB;MAAEC;IAAiB,CAAC,GAC7CJ,MAAM,CAAEJ,WAAY,CAAC;IACtB,MAAMS,YAAY,GACjBD,gBAAgB,CAAC,CAAC,KAAK,WAAW,GAC/B,EAAE,GACFF,eAAe,CAAE,mBAAoB,CAAC,GAAI,CAAC,CAAE;IACjD,OAAO;MACNJ,qCAAqC,EAAEG,uBAAuB,CAC7D,mBAAmB,EACnBI,YACD,CAAC;MACDN,QAAQ,EAAE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AC;EAEzB,IAAK,CAAEmB,iBAAiB,IAAIF,QAAQ,EAAG;IACtC,OAAO,IAAI;EACZ;EAEA,OAAOf,aAAA,CAACK,qBAAqB;IAACC,OAAO,EAAGA,CAAA,KAAMU,WAAW,CAAE,IAAK;EAAG,CAAE,CAAC;AACvE","ignoreList":[]}
1
+ {"version":3,"names":["Modal","__","useState","useMemo","useEffect","store","blockEditorStore","__experimentalBlockPatternsList","BlockPatternsList","useSelect","useDispatch","useAsyncList","coreStore","__unstableSerializeAndClean","editorStore","TEMPLATE_POST_TYPE","useStartPatterns","blockPatternsWithPostContentBlockType","postType","select","getPatternsByBlockTypes","getBlocksByName","getCurrentPostType","getRenderingMode","rootClientId","filter","pattern","postTypes","Array","isArray","includes","PatternSelection","blockPatterns","onChoosePattern","shownBlockPatterns","editEntityRecord","postId","getCurrentPostId","createElement","shownPatterns","onClickPattern","_pattern","blocks","content","blocksForSerialization","StartPageOptionsModal","onClose","startPatterns","hasStartPattern","length","title","isFullScreen","onRequestClose","className","StartPageOptions","isClosed","setIsClosed","shouldEnableModal","isEditedPostDirty","isEditedPostEmpty","_postType"],"sources":["@wordpress/editor/src/components/start-page-options/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useMemo, useEffect } from '@wordpress/element';\nimport {\n\tstore as blockEditorStore,\n\t__experimentalBlockPatternsList as BlockPatternsList,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useAsyncList } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __unstableSerializeAndClean } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\n\nfunction useStartPatterns() {\n\t// A pattern is a start pattern if it includes 'core/post-content' in its blockTypes,\n\t// and it has no postTypes declared and the current post type is page or if\n\t// the current post type is part of the postTypes declared.\n\tconst { blockPatternsWithPostContentBlockType, postType } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getPatternsByBlockTypes, getBlocksByName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst { getCurrentPostType, getRenderingMode } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst rootClientId =\n\t\t\t\tgetRenderingMode() === 'post-only'\n\t\t\t\t\t? ''\n\t\t\t\t\t: getBlocksByName( 'core/post-content' )?.[ 0 ];\n\t\t\treturn {\n\t\t\t\tblockPatternsWithPostContentBlockType: getPatternsByBlockTypes(\n\t\t\t\t\t'core/post-content',\n\t\t\t\t\trootClientId\n\t\t\t\t),\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\treturn useMemo( () => {\n\t\t// filter patterns without postTypes declared if the current postType is page\n\t\t// or patterns that declare the current postType in its post type array.\n\t\treturn blockPatternsWithPostContentBlockType.filter( ( pattern ) => {\n\t\t\treturn (\n\t\t\t\t( postType === 'page' && ! pattern.postTypes ) ||\n\t\t\t\t( Array.isArray( pattern.postTypes ) &&\n\t\t\t\t\tpattern.postTypes.includes( postType ) )\n\t\t\t);\n\t\t} );\n\t}, [ postType, blockPatternsWithPostContentBlockType ] );\n}\n\nfunction PatternSelection( { blockPatterns, onChoosePattern } ) {\n\tconst shownBlockPatterns = useAsyncList( blockPatterns );\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst { postType, postId } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostType, getCurrentPostId } = select( editorStore );\n\n\t\treturn {\n\t\t\tpostType: getCurrentPostType(),\n\t\t\tpostId: getCurrentPostId(),\n\t\t};\n\t}, [] );\n\treturn (\n\t\t<BlockPatternsList\n\t\t\tblockPatterns={ blockPatterns }\n\t\t\tshownPatterns={ shownBlockPatterns }\n\t\t\tonClickPattern={ ( _pattern, blocks ) => {\n\t\t\t\teditEntityRecord( 'postType', postType, postId, {\n\t\t\t\t\tblocks,\n\t\t\t\t\tcontent: ( { blocks: blocksForSerialization = [] } ) =>\n\t\t\t\t\t\t__unstableSerializeAndClean( blocksForSerialization ),\n\t\t\t\t} );\n\t\t\t\tonChoosePattern();\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction StartPageOptionsModal( { onClose } ) {\n\tconst startPatterns = useStartPatterns();\n\tconst hasStartPattern = startPatterns.length > 0;\n\n\tif ( ! hasStartPattern ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ __( 'Choose a pattern' ) }\n\t\t\tisFullScreen\n\t\t\tonRequestClose={ onClose }\n\t\t>\n\t\t\t<div className=\"editor-start-page-options__modal-content\">\n\t\t\t\t<PatternSelection\n\t\t\t\t\tblockPatterns={ startPatterns }\n\t\t\t\t\tonChoosePattern={ onClose }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</Modal>\n\t);\n}\n\nexport default function StartPageOptions() {\n\tconst [ isClosed, setIsClosed ] = useState( false );\n\tconst { shouldEnableModal, postType, postId } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tisEditedPostDirty,\n\t\t\tisEditedPostEmpty,\n\t\t\tgetCurrentPostType,\n\t\t\tgetCurrentPostId,\n\t\t} = select( editorStore );\n\t\tconst _postType = getCurrentPostType();\n\n\t\treturn {\n\t\t\tshouldEnableModal:\n\t\t\t\t! isEditedPostDirty() &&\n\t\t\t\tisEditedPostEmpty() &&\n\t\t\t\tTEMPLATE_POST_TYPE !== _postType,\n\t\t\tpostType: _postType,\n\t\t\tpostId: getCurrentPostId(),\n\t\t};\n\t}, [] );\n\n\tuseEffect( () => {\n\t\t// Should reset the modal state when navigating to a new page/post.\n\t\tsetIsClosed( false );\n\t}, [ postType, postId ] );\n\n\tif ( ! shouldEnableModal || isClosed ) {\n\t\treturn null;\n\t}\n\n\treturn <StartPageOptionsModal onClose={ () => setIsClosed( true ) } />;\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,QAAQ,uBAAuB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