@wordpress/editor 13.35.0 → 14.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (947) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +333 -39
  3. package/build/bindings/index.js +1 -3
  4. package/build/bindings/index.js.map +1 -1
  5. package/build/bindings/pattern-overrides.js +1 -1
  6. package/build/bindings/pattern-overrides.js.map +1 -1
  7. package/build/bindings/post-meta.js +38 -2
  8. package/build/bindings/post-meta.js.map +1 -1
  9. package/build/components/autocompleters/user.js +12 -8
  10. package/build/components/autocompleters/user.js.map +1 -1
  11. package/build/components/block-manager/category.js +19 -17
  12. package/build/components/block-manager/category.js.map +1 -1
  13. package/build/components/block-manager/checklist.js +15 -14
  14. package/build/components/block-manager/checklist.js.map +1 -1
  15. package/build/components/block-manager/index.js +37 -33
  16. package/build/components/block-manager/index.js.map +1 -1
  17. package/build/components/block-removal-warnings/index.js +2 -2
  18. package/build/components/block-removal-warnings/index.js.map +1 -1
  19. package/build/components/block-settings-menu/content-only-settings-menu.js +59 -36
  20. package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  21. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +16 -13
  22. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  23. package/build/components/blog-title/index.js +116 -0
  24. package/build/components/blog-title/index.js.map +1 -0
  25. package/build/components/collapsible-block-toolbar/index.js +21 -18
  26. package/build/components/collapsible-block-toolbar/index.js.map +1 -1
  27. package/build/components/commands/index.js +109 -3
  28. package/build/components/commands/index.js.map +1 -1
  29. package/build/components/create-template-part-modal/index.js +167 -0
  30. package/build/components/create-template-part-modal/index.js.map +1 -0
  31. package/build/components/create-template-part-modal/utils.js +64 -0
  32. package/build/components/create-template-part-modal/utils.js.map +1 -0
  33. package/build/components/deprecated.js +2 -2
  34. package/build/components/deprecated.js.map +1 -1
  35. package/build/components/document-bar/index.js +94 -70
  36. package/build/components/document-bar/index.js.map +1 -1
  37. package/build/components/document-outline/index.js +124 -121
  38. package/build/components/document-outline/index.js.map +1 -1
  39. package/build/components/document-outline/item.js +18 -14
  40. package/build/components/document-outline/item.js.map +1 -1
  41. package/build/components/document-tools/index.js +56 -53
  42. package/build/components/document-tools/index.js.map +1 -1
  43. package/build/components/editor/index.js +83 -0
  44. package/build/components/editor/index.js.map +1 -0
  45. package/build/components/editor-help/add-blocks.native.js +14 -11
  46. package/build/components/editor-help/add-blocks.native.js.map +1 -1
  47. package/build/components/editor-help/customize-blocks.native.js +14 -11
  48. package/build/components/editor-help/customize-blocks.native.js.map +1 -1
  49. package/build/components/editor-help/help-detail-navigation-screen.native.js +32 -22
  50. package/build/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  51. package/build/components/editor-help/help-get-support-button.native.js +8 -6
  52. package/build/components/editor-help/help-get-support-button.native.js.map +1 -1
  53. package/build/components/editor-help/help-section-title.native.js +8 -6
  54. package/build/components/editor-help/help-section-title.native.js.map +1 -1
  55. package/build/components/editor-help/help-topic-row.native.js +7 -6
  56. package/build/components/editor-help/help-topic-row.native.js.map +1 -1
  57. package/build/components/editor-help/icon-move-blocks.native.js +7 -6
  58. package/build/components/editor-help/icon-move-blocks.native.js.map +1 -1
  59. package/build/components/editor-help/index.native.js +94 -76
  60. package/build/components/editor-help/index.native.js.map +1 -1
  61. package/build/components/editor-help/intro-to-blocks.native.js +41 -37
  62. package/build/components/editor-help/intro-to-blocks.native.js.map +1 -1
  63. package/build/components/editor-help/move-blocks.native.js +25 -21
  64. package/build/components/editor-help/move-blocks.native.js.map +1 -1
  65. package/build/components/editor-help/remove-blocks.native.js +12 -9
  66. package/build/components/editor-help/remove-blocks.native.js.map +1 -1
  67. package/build/components/editor-help/view-sections.native.js +24 -19
  68. package/build/components/editor-help/view-sections.native.js.map +1 -1
  69. package/build/components/editor-history/redo.js +2 -2
  70. package/build/components/editor-history/redo.js.map +1 -1
  71. package/build/components/editor-history/undo.js +2 -2
  72. package/build/components/editor-history/undo.js.map +1 -1
  73. package/build/components/editor-interface/content-slot-fill.js +23 -0
  74. package/build/components/editor-interface/content-slot-fill.js.map +1 -0
  75. package/build/components/editor-interface/index.js +176 -0
  76. package/build/components/editor-interface/index.js.map +1 -0
  77. package/build/components/editor-notices/index.js +22 -9
  78. package/build/components/editor-notices/index.js.map +1 -1
  79. package/build/components/editor-snackbars/index.js +2 -2
  80. package/build/components/editor-snackbars/index.js.map +1 -1
  81. package/build/components/entities-saved-states/entity-record-item.js +37 -10
  82. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  83. package/build/components/entities-saved-states/entity-type-list.js +25 -22
  84. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  85. package/build/components/entities-saved-states/index.js +53 -46
  86. package/build/components/entities-saved-states/index.js.map +1 -1
  87. package/build/components/error-boundary/index.js +27 -14
  88. package/build/components/error-boundary/index.js.map +1 -1
  89. package/build/components/error-boundary/index.native.js +45 -35
  90. package/build/components/error-boundary/index.native.js.map +1 -1
  91. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +3 -4
  92. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  93. package/build/components/global-styles-provider/index.js +81 -16
  94. package/build/components/global-styles-provider/index.js.map +1 -1
  95. package/build/components/header/back-button.js +37 -0
  96. package/build/components/header/back-button.js.map +1 -0
  97. package/build/components/header/index.js +85 -60
  98. package/build/components/header/index.js.map +1 -1
  99. package/build/components/inserter-sidebar/index.js +45 -19
  100. package/build/components/inserter-sidebar/index.js.map +1 -1
  101. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
  102. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  103. package/build/components/keyboard-shortcut-help-modal/index.js +53 -48
  104. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  105. package/build/components/keyboard-shortcut-help-modal/shortcut.js +30 -26
  106. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  107. package/build/components/list-view-sidebar/index.js +59 -47
  108. package/build/components/list-view-sidebar/index.js.map +1 -1
  109. package/build/components/list-view-sidebar/list-view-outline.js +21 -4
  110. package/build/components/list-view-sidebar/list-view-outline.js.map +1 -1
  111. package/build/components/local-autosave-monitor/index.js +15 -2
  112. package/build/components/local-autosave-monitor/index.js.map +1 -1
  113. package/build/components/media-categories/index.js +1 -1
  114. package/build/components/media-categories/index.js.map +1 -1
  115. package/build/components/mode-switcher/index.js +10 -10
  116. package/build/components/mode-switcher/index.js.map +1 -1
  117. package/build/components/more-menu/copy-content-menu-item.js +5 -4
  118. package/build/components/more-menu/copy-content-menu-item.js.map +1 -1
  119. package/build/components/more-menu/index.js +89 -76
  120. package/build/components/more-menu/index.js.map +1 -1
  121. package/build/components/more-menu/tools-more-menu-group.js +2 -2
  122. package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
  123. package/build/components/more-menu/view-more-menu-group.js +2 -2
  124. package/build/components/more-menu/view-more-menu-group.js.map +1 -1
  125. package/build/components/offline-status/index.native.js +12 -11
  126. package/build/components/offline-status/index.native.js.map +1 -1
  127. package/build/components/page-attributes/order.js +87 -14
  128. package/build/components/page-attributes/order.js.map +1 -1
  129. package/build/components/page-attributes/panel.js +10 -19
  130. package/build/components/page-attributes/panel.js.map +1 -1
  131. package/build/components/page-attributes/parent.js +86 -3
  132. package/build/components/page-attributes/parent.js.map +1 -1
  133. package/build/components/pattern-duplicate-modal/index.js +59 -0
  134. package/build/components/pattern-duplicate-modal/index.js.map +1 -0
  135. package/build/components/pattern-overrides-panel/index.js +2 -2
  136. package/build/components/pattern-overrides-panel/index.js.map +1 -1
  137. package/build/components/pattern-rename-modal/index.js +58 -0
  138. package/build/components/pattern-rename-modal/index.js.map +1 -0
  139. package/build/components/plugin-document-setting-panel/index.js +17 -12
  140. package/build/components/plugin-document-setting-panel/index.js.map +1 -1
  141. package/build/components/plugin-post-publish-panel/index.js +10 -7
  142. package/build/components/plugin-post-publish-panel/index.js.map +1 -1
  143. package/build/components/plugin-post-status-info/index.js +7 -4
  144. package/build/components/plugin-post-status-info/index.js.map +1 -1
  145. package/build/components/plugin-pre-publish-panel/index.js +10 -7
  146. package/build/components/plugin-pre-publish-panel/index.js.map +1 -1
  147. package/build/components/plugin-sidebar/index.js +3 -4
  148. package/build/components/plugin-sidebar/index.js.map +1 -1
  149. package/build/components/plugin-sidebar-more-menu-item/index.js +3 -5
  150. package/build/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
  151. package/build/components/post-actions/actions.js +379 -309
  152. package/build/components/post-actions/actions.js.map +1 -1
  153. package/build/components/post-actions/export-pattern-action.js +64 -0
  154. package/build/components/post-actions/export-pattern-action.js.map +1 -0
  155. package/build/components/post-actions/export-pattern-action.native.js +11 -0
  156. package/build/components/post-actions/export-pattern-action.native.js.map +1 -0
  157. package/build/components/post-actions/index.js +66 -50
  158. package/build/components/post-actions/index.js.map +1 -1
  159. package/build/components/post-author/check.js +6 -6
  160. package/build/components/post-author/check.js.map +1 -1
  161. package/build/components/post-author/combobox.js +4 -3
  162. package/build/components/post-author/combobox.js.map +1 -1
  163. package/build/components/post-author/hook.js +2 -1
  164. package/build/components/post-author/hook.js.map +1 -1
  165. package/build/components/post-author/index.js +3 -3
  166. package/build/components/post-author/index.js.map +1 -1
  167. package/build/components/post-author/panel.js +72 -4
  168. package/build/components/post-author/panel.js.map +1 -1
  169. package/build/components/post-author/select.js +4 -3
  170. package/build/components/post-author/select.js.map +1 -1
  171. package/build/components/post-card-panel/index.js +54 -19
  172. package/build/components/post-card-panel/index.js.map +1 -1
  173. package/build/components/post-comments/index.js +38 -22
  174. package/build/components/post-comments/index.js.map +1 -1
  175. package/build/components/post-content-information/index.js +8 -5
  176. package/build/components/post-content-information/index.js.map +1 -1
  177. package/build/components/post-discussion/panel.js +54 -38
  178. package/build/components/post-discussion/panel.js.map +1 -1
  179. package/build/components/post-excerpt/check.js +6 -6
  180. package/build/components/post-excerpt/check.js.map +1 -1
  181. package/build/components/post-excerpt/index.js +18 -17
  182. package/build/components/post-excerpt/index.js.map +1 -1
  183. package/build/components/post-excerpt/panel.js +59 -42
  184. package/build/components/post-excerpt/panel.js.map +1 -1
  185. package/build/components/post-excerpt/plugin.js +7 -4
  186. package/build/components/post-excerpt/plugin.js.map +1 -1
  187. package/build/components/post-featured-image/check.js +17 -7
  188. package/build/components/post-featured-image/check.js.map +1 -1
  189. package/build/components/post-featured-image/index.js +77 -49
  190. package/build/components/post-featured-image/index.js.map +1 -1
  191. package/build/components/post-featured-image/panel.js +22 -7
  192. package/build/components/post-featured-image/panel.js.map +1 -1
  193. package/build/components/post-format/check.js +14 -4
  194. package/build/components/post-format/check.js.map +1 -1
  195. package/build/components/post-format/index.js +37 -20
  196. package/build/components/post-format/index.js.map +1 -1
  197. package/build/components/post-format/panel.js +73 -7
  198. package/build/components/post-format/panel.js.map +1 -1
  199. package/build/components/post-last-edited-panel/index.js +7 -4
  200. package/build/components/post-last-edited-panel/index.js.map +1 -1
  201. package/build/components/post-last-revision/check.js +13 -5
  202. package/build/components/post-last-revision/check.js.map +1 -1
  203. package/build/components/post-last-revision/index.js +49 -17
  204. package/build/components/post-last-revision/index.js.map +1 -1
  205. package/build/components/post-last-revision/panel.js +12 -5
  206. package/build/components/post-last-revision/panel.js.map +1 -1
  207. package/build/components/post-locked-modal/index.js +57 -35
  208. package/build/components/post-locked-modal/index.js.map +1 -1
  209. package/build/components/post-panel-row/index.js +11 -8
  210. package/build/components/post-panel-row/index.js.map +1 -1
  211. package/build/components/post-panel-section/index.js +5 -4
  212. package/build/components/post-panel-section/index.js.map +1 -1
  213. package/build/components/post-pending-status/check.js +10 -0
  214. package/build/components/post-pending-status/check.js.map +1 -1
  215. package/build/components/post-pending-status/index.js +14 -7
  216. package/build/components/post-pending-status/index.js.map +1 -1
  217. package/build/components/post-pingbacks/index.js +13 -5
  218. package/build/components/post-pingbacks/index.js.map +1 -1
  219. package/build/components/post-preview-button/index.js +46 -21
  220. package/build/components/post-preview-button/index.js.map +1 -1
  221. package/build/components/post-publish-button/index.js +21 -11
  222. package/build/components/post-publish-button/index.js.map +1 -1
  223. package/build/components/post-publish-button/post-publish-button-or-toggle.js +2 -2
  224. package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  225. package/build/components/post-publish-panel/index.js +47 -33
  226. package/build/components/post-publish-panel/index.js.map +1 -1
  227. package/build/components/post-publish-panel/maybe-category-panel.js +12 -9
  228. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  229. package/build/components/post-publish-panel/maybe-post-format-panel.js +21 -15
  230. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  231. package/build/components/post-publish-panel/maybe-tags-panel.js +13 -10
  232. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  233. package/build/components/post-publish-panel/maybe-upload-media.js +29 -24
  234. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  235. package/build/components/post-publish-panel/postpublish.js +55 -38
  236. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  237. package/build/components/post-publish-panel/prepublish.js +41 -26
  238. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  239. package/build/components/post-saved-state/index.js +8 -8
  240. package/build/components/post-saved-state/index.js.map +1 -1
  241. package/build/components/post-schedule/check.js +8 -0
  242. package/build/components/post-schedule/check.js.map +1 -1
  243. package/build/components/post-schedule/index.js +30 -5
  244. package/build/components/post-schedule/index.js.map +1 -1
  245. package/build/components/post-schedule/label.js +16 -0
  246. package/build/components/post-schedule/label.js.map +1 -1
  247. package/build/components/post-schedule/panel.js +43 -30
  248. package/build/components/post-schedule/panel.js.map +1 -1
  249. package/build/components/post-slug/check.js +5 -4
  250. package/build/components/post-slug/check.js.map +1 -1
  251. package/build/components/post-slug/index.js +5 -3
  252. package/build/components/post-slug/index.js.map +1 -1
  253. package/build/components/post-slug/panel.js +7 -4
  254. package/build/components/post-slug/panel.js.map +1 -1
  255. package/build/components/post-status/index.js +118 -119
  256. package/build/components/post-status/index.js.map +1 -1
  257. package/build/components/post-sticky/index.js +16 -8
  258. package/build/components/post-sticky/index.js.map +1 -1
  259. package/build/components/post-sticky/panel.js +6 -2
  260. package/build/components/post-sticky/panel.js.map +1 -1
  261. package/build/components/post-switch-to-draft-button/index.js +25 -21
  262. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  263. package/build/components/post-sync-status/index.js +8 -6
  264. package/build/components/post-sync-status/index.js.map +1 -1
  265. package/build/components/post-taxonomies/flat-term-selector.js +21 -20
  266. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  267. package/build/components/post-taxonomies/hierarchical-term-selector.js +71 -61
  268. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  269. package/build/components/post-taxonomies/index.js +6 -6
  270. package/build/components/post-taxonomies/index.js.map +1 -1
  271. package/build/components/post-taxonomies/most-used-terms.js +19 -15
  272. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  273. package/build/components/post-taxonomies/panel.js +15 -11
  274. package/build/components/post-taxonomies/panel.js.map +1 -1
  275. package/build/components/post-template/block-theme.js +42 -32
  276. package/build/components/post-template/block-theme.js.map +1 -1
  277. package/build/components/post-template/classic-theme.js +73 -50
  278. package/build/components/post-template/classic-theme.js.map +1 -1
  279. package/build/components/post-template/create-new-template-modal.js +33 -27
  280. package/build/components/post-template/create-new-template-modal.js.map +1 -1
  281. package/build/components/post-template/create-new-template.js +14 -11
  282. package/build/components/post-template/create-new-template.js.map +1 -1
  283. package/build/components/post-template/panel.js +16 -10
  284. package/build/components/post-template/panel.js.map +1 -1
  285. package/build/components/post-template/reset-default-template.js +5 -4
  286. package/build/components/post-template/reset-default-template.js.map +1 -1
  287. package/build/components/post-template/swap-template-button.js +20 -15
  288. package/build/components/post-template/swap-template-button.js.map +1 -1
  289. package/build/components/post-text-editor/index.js +27 -20
  290. package/build/components/post-text-editor/index.js.map +1 -1
  291. package/build/components/post-title/index.js +29 -17
  292. package/build/components/post-title/index.js.map +1 -1
  293. package/build/components/post-title/index.native.js +81 -57
  294. package/build/components/post-title/index.native.js.map +1 -1
  295. package/build/components/post-title/post-title-raw.js +10 -3
  296. package/build/components/post-title/post-title-raw.js.map +1 -1
  297. package/build/components/post-title/use-post-title-focus.js +7 -0
  298. package/build/components/post-title/use-post-title-focus.js.map +1 -1
  299. package/build/components/post-title/use-post-title.js +5 -0
  300. package/build/components/post-title/use-post-title.js.map +1 -1
  301. package/build/components/post-transform-panel/index.js +11 -11
  302. package/build/components/post-transform-panel/index.js.map +1 -1
  303. package/build/components/post-trash/index.js +19 -15
  304. package/build/components/post-trash/index.js.map +1 -1
  305. package/build/components/post-url/check.js +8 -0
  306. package/build/components/post-url/check.js.map +1 -1
  307. package/build/components/post-url/index.js +98 -73
  308. package/build/components/post-url/index.js.map +1 -1
  309. package/build/components/post-url/label.js +11 -0
  310. package/build/components/post-url/label.js.map +1 -1
  311. package/build/components/post-url/panel.js +56 -26
  312. package/build/components/post-url/panel.js.map +1 -1
  313. package/build/components/post-view-link/index.js +2 -2
  314. package/build/components/post-view-link/index.js.map +1 -1
  315. package/build/components/post-visibility/check.js +9 -0
  316. package/build/components/post-visibility/check.js.map +1 -1
  317. package/build/components/post-visibility/index.js +83 -68
  318. package/build/components/post-visibility/index.js.map +1 -1
  319. package/build/components/post-visibility/label.js +11 -0
  320. package/build/components/post-visibility/label.js.map +1 -1
  321. package/build/components/posts-per-page/index.js +109 -0
  322. package/build/components/posts-per-page/index.js.map +1 -0
  323. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +7 -5
  324. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  325. package/build/components/preferences-modal/index.js +124 -102
  326. package/build/components/preferences-modal/index.js.map +1 -1
  327. package/build/components/preview-dropdown/index.js +47 -31
  328. package/build/components/preview-dropdown/index.js.map +1 -1
  329. package/build/components/provider/disable-non-page-content-blocks.js +5 -3
  330. package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
  331. package/build/components/provider/index.js +94 -20
  332. package/build/components/provider/index.js.map +1 -1
  333. package/build/components/provider/index.native.js +55 -19
  334. package/build/components/provider/index.native.js.map +1 -1
  335. package/build/components/provider/use-block-editor-settings.js +7 -6
  336. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  337. package/build/components/provider/with-registry-provider.js +31 -24
  338. package/build/components/provider/with-registry-provider.js.map +1 -1
  339. package/build/components/resizable-editor/index.js +96 -0
  340. package/build/components/resizable-editor/index.js.map +1 -0
  341. package/build/components/resizable-editor/resize-handle.js +59 -0
  342. package/build/components/resizable-editor/resize-handle.js.map +1 -0
  343. package/build/components/save-publish-panels/index.js +35 -26
  344. package/build/components/save-publish-panels/index.js.map +1 -1
  345. package/build/components/sidebar/header.js +17 -14
  346. package/build/components/sidebar/header.js.map +1 -1
  347. package/build/components/sidebar/index.js +36 -32
  348. package/build/components/sidebar/index.js.map +1 -1
  349. package/build/components/sidebar/post-summary.js +39 -33
  350. package/build/components/sidebar/post-summary.js.map +1 -1
  351. package/build/components/site-discussion/index.js +133 -0
  352. package/build/components/site-discussion/index.js.map +1 -0
  353. package/build/components/start-page-options/index.js +13 -11
  354. package/build/components/start-page-options/index.js.map +1 -1
  355. package/build/components/start-template-options/index.js +29 -23
  356. package/build/components/start-template-options/index.js.map +1 -1
  357. package/build/components/table-of-contents/index.js +4 -4
  358. package/build/components/table-of-contents/index.js.map +1 -1
  359. package/build/components/table-of-contents/panel.js +53 -35
  360. package/build/components/table-of-contents/panel.js.map +1 -1
  361. package/build/components/template-areas/index.js +36 -22
  362. package/build/components/template-areas/index.js.map +1 -1
  363. package/build/components/template-content-panel/index.js +7 -6
  364. package/build/components/template-content-panel/index.js.map +1 -1
  365. package/build/components/template-validation-notice/index.js +25 -21
  366. package/build/components/template-validation-notice/index.js.map +1 -1
  367. package/build/components/text-editor/index.js +73 -0
  368. package/build/components/text-editor/index.js.map +1 -0
  369. package/build/components/time-to-read/index.js +8 -8
  370. package/build/components/time-to-read/index.js.map +1 -1
  371. package/build/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +6 -6
  372. package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -0
  373. package/build/components/{editor-canvas → visual-editor}/index.js +115 -74
  374. package/build/components/visual-editor/index.js.map +1 -0
  375. package/build/components/word-count/index.js +5 -4
  376. package/build/components/word-count/index.js.map +1 -1
  377. package/build/hooks/custom-sources-backwards-compatibility.js +3 -4
  378. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  379. package/build/hooks/index.js +1 -0
  380. package/build/hooks/index.js.map +1 -1
  381. package/build/hooks/media-upload.js +10 -0
  382. package/build/hooks/media-upload.js.map +1 -0
  383. package/build/hooks/pattern-overrides.js +15 -11
  384. package/build/hooks/pattern-overrides.js.map +1 -1
  385. package/build/private-apis.js +12 -28
  386. package/build/private-apis.js.map +1 -1
  387. package/build/private-apis.native.js +2 -26
  388. package/build/private-apis.native.js.map +1 -1
  389. package/build/store/constants.js +4 -1
  390. package/build/store/constants.js.map +1 -1
  391. package/build/store/private-actions.js +10 -14
  392. package/build/store/private-actions.js.map +1 -1
  393. package/build/store/private-selectors.js +39 -1
  394. package/build/store/private-selectors.js.map +1 -1
  395. package/build/store/selectors.js +1 -1
  396. package/build/store/selectors.js.map +1 -1
  397. package/build/utils/set-nested-value.js +44 -0
  398. package/build/utils/set-nested-value.js.map +1 -0
  399. package/build-module/bindings/index.js +1 -3
  400. package/build-module/bindings/index.js.map +1 -1
  401. package/build-module/bindings/pattern-overrides.js +1 -1
  402. package/build-module/bindings/pattern-overrides.js.map +1 -1
  403. package/build-module/bindings/post-meta.js +38 -2
  404. package/build-module/bindings/post-meta.js.map +1 -1
  405. package/build-module/components/autocompleters/user.js +14 -9
  406. package/build-module/components/autocompleters/user.js.map +1 -1
  407. package/build-module/components/block-manager/category.js +20 -17
  408. package/build-module/components/block-manager/category.js.map +1 -1
  409. package/build-module/components/block-manager/checklist.js +16 -14
  410. package/build-module/components/block-manager/checklist.js.map +1 -1
  411. package/build-module/components/block-manager/index.js +38 -33
  412. package/build-module/components/block-manager/index.js.map +1 -1
  413. package/build-module/components/block-removal-warnings/index.js +2 -2
  414. package/build-module/components/block-removal-warnings/index.js.map +1 -1
  415. package/build-module/components/block-settings-menu/content-only-settings-menu.js +61 -36
  416. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
  417. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +16 -13
  418. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  419. package/build-module/components/blog-title/index.js +110 -0
  420. package/build-module/components/blog-title/index.js.map +1 -0
  421. package/build-module/components/collapsible-block-toolbar/index.js +23 -18
  422. package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
  423. package/build-module/components/commands/index.js +111 -5
  424. package/build-module/components/commands/index.js.map +1 -1
  425. package/build-module/components/create-template-part-modal/index.js +160 -0
  426. package/build-module/components/create-template-part-modal/index.js.map +1 -0
  427. package/build-module/components/create-template-part-modal/utils.js +54 -0
  428. package/build-module/components/create-template-part-modal/utils.js.map +1 -0
  429. package/build-module/components/deprecated.js +2 -2
  430. package/build-module/components/deprecated.js.map +1 -1
  431. package/build-module/components/document-bar/index.js +93 -68
  432. package/build-module/components/document-bar/index.js.map +1 -1
  433. package/build-module/components/document-outline/index.js +125 -120
  434. package/build-module/components/document-outline/index.js.map +1 -1
  435. package/build-module/components/document-outline/item.js +19 -14
  436. package/build-module/components/document-outline/item.js.map +1 -1
  437. package/build-module/components/document-tools/index.js +58 -53
  438. package/build-module/components/document-tools/index.js.map +1 -1
  439. package/build-module/components/editor/index.js +76 -0
  440. package/build-module/components/editor/index.js.map +1 -0
  441. package/build-module/components/editor-help/add-blocks.native.js +16 -11
  442. package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
  443. package/build-module/components/editor-help/customize-blocks.native.js +16 -11
  444. package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
  445. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +33 -22
  446. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  447. package/build-module/components/editor-help/help-get-support-button.native.js +8 -6
  448. package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -1
  449. package/build-module/components/editor-help/help-section-title.native.js +8 -6
  450. package/build-module/components/editor-help/help-section-title.native.js.map +1 -1
  451. package/build-module/components/editor-help/help-topic-row.native.js +7 -6
  452. package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
  453. package/build-module/components/editor-help/icon-move-blocks.native.js +7 -6
  454. package/build-module/components/editor-help/icon-move-blocks.native.js.map +1 -1
  455. package/build-module/components/editor-help/index.native.js +96 -76
  456. package/build-module/components/editor-help/index.native.js.map +1 -1
  457. package/build-module/components/editor-help/intro-to-blocks.native.js +43 -37
  458. package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
  459. package/build-module/components/editor-help/move-blocks.native.js +27 -21
  460. package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
  461. package/build-module/components/editor-help/remove-blocks.native.js +14 -9
  462. package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
  463. package/build-module/components/editor-help/view-sections.native.js +25 -19
  464. package/build-module/components/editor-help/view-sections.native.js.map +1 -1
  465. package/build-module/components/editor-history/redo.js +2 -2
  466. package/build-module/components/editor-history/redo.js.map +1 -1
  467. package/build-module/components/editor-history/undo.js +2 -2
  468. package/build-module/components/editor-history/undo.js.map +1 -1
  469. package/build-module/components/editor-interface/content-slot-fill.js +16 -0
  470. package/build-module/components/editor-interface/content-slot-fill.js.map +1 -0
  471. package/build-module/components/editor-interface/index.js +170 -0
  472. package/build-module/components/editor-interface/index.js.map +1 -0
  473. package/build-module/components/editor-notices/index.js +25 -9
  474. package/build-module/components/editor-notices/index.js.map +1 -1
  475. package/build-module/components/editor-snackbars/index.js +2 -2
  476. package/build-module/components/editor-snackbars/index.js.map +1 -1
  477. package/build-module/components/entities-saved-states/entity-record-item.js +40 -11
  478. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  479. package/build-module/components/entities-saved-states/entity-type-list.js +26 -22
  480. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  481. package/build-module/components/entities-saved-states/index.js +54 -46
  482. package/build-module/components/entities-saved-states/index.js.map +1 -1
  483. package/build-module/components/error-boundary/index.js +27 -14
  484. package/build-module/components/error-boundary/index.js.map +1 -1
  485. package/build-module/components/error-boundary/index.native.js +46 -35
  486. package/build-module/components/error-boundary/index.native.js.map +1 -1
  487. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +2 -2
  488. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  489. package/build-module/components/global-styles-provider/index.js +82 -17
  490. package/build-module/components/global-styles-provider/index.js.map +1 -1
  491. package/build-module/components/header/back-button.js +31 -0
  492. package/build-module/components/header/back-button.js.map +1 -0
  493. package/build-module/components/header/index.js +86 -60
  494. package/build-module/components/header/index.js.map +1 -1
  495. package/build-module/components/inserter-sidebar/index.js +47 -21
  496. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  497. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
  498. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  499. package/build-module/components/keyboard-shortcut-help-modal/index.js +54 -48
  500. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  501. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +32 -26
  502. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  503. package/build-module/components/list-view-sidebar/index.js +60 -47
  504. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  505. package/build-module/components/list-view-sidebar/list-view-outline.js +23 -4
  506. package/build-module/components/list-view-sidebar/list-view-outline.js.map +1 -1
  507. package/build-module/components/local-autosave-monitor/index.js +15 -2
  508. package/build-module/components/local-autosave-monitor/index.js.map +1 -1
  509. package/build-module/components/media-categories/index.js +1 -1
  510. package/build-module/components/media-categories/index.js.map +1 -1
  511. package/build-module/components/mode-switcher/index.js +9 -8
  512. package/build-module/components/mode-switcher/index.js.map +1 -1
  513. package/build-module/components/more-menu/copy-content-menu-item.js +5 -4
  514. package/build-module/components/more-menu/copy-content-menu-item.js.map +1 -1
  515. package/build-module/components/more-menu/index.js +91 -76
  516. package/build-module/components/more-menu/index.js.map +1 -1
  517. package/build-module/components/more-menu/tools-more-menu-group.js +2 -2
  518. package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -1
  519. package/build-module/components/more-menu/view-more-menu-group.js +2 -2
  520. package/build-module/components/more-menu/view-more-menu-group.js.map +1 -1
  521. package/build-module/components/offline-status/index.native.js +12 -9
  522. package/build-module/components/offline-status/index.native.js.map +1 -1
  523. package/build-module/components/page-attributes/order.js +90 -17
  524. package/build-module/components/page-attributes/order.js.map +1 -1
  525. package/build-module/components/page-attributes/panel.js +13 -21
  526. package/build-module/components/page-attributes/panel.js.map +1 -1
  527. package/build-module/components/page-attributes/parent.js +88 -5
  528. package/build-module/components/page-attributes/parent.js.map +1 -1
  529. package/build-module/components/pattern-duplicate-modal/index.js +51 -0
  530. package/build-module/components/pattern-duplicate-modal/index.js.map +1 -0
  531. package/build-module/components/pattern-overrides-panel/index.js +2 -2
  532. package/build-module/components/pattern-overrides-panel/index.js.map +1 -1
  533. package/build-module/components/pattern-rename-modal/index.js +50 -0
  534. package/build-module/components/pattern-rename-modal/index.js.map +1 -0
  535. package/build-module/components/plugin-document-setting-panel/index.js +19 -12
  536. package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
  537. package/build-module/components/plugin-post-publish-panel/index.js +10 -7
  538. package/build-module/components/plugin-post-publish-panel/index.js.map +1 -1
  539. package/build-module/components/plugin-post-status-info/index.js +7 -4
  540. package/build-module/components/plugin-post-status-info/index.js.map +1 -1
  541. package/build-module/components/plugin-pre-publish-panel/index.js +10 -7
  542. package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -1
  543. package/build-module/components/plugin-sidebar/index.js +2 -2
  544. package/build-module/components/plugin-sidebar/index.js.map +1 -1
  545. package/build-module/components/plugin-sidebar-more-menu-item/index.js +2 -3
  546. package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
  547. package/build-module/components/post-actions/actions.js +380 -309
  548. package/build-module/components/post-actions/actions.js.map +1 -1
  549. package/build-module/components/post-actions/export-pattern-action.js +58 -0
  550. package/build-module/components/post-actions/export-pattern-action.js.map +1 -0
  551. package/build-module/components/post-actions/export-pattern-action.native.js +5 -0
  552. package/build-module/components/post-actions/export-pattern-action.native.js.map +1 -0
  553. package/build-module/components/post-actions/index.js +68 -50
  554. package/build-module/components/post-actions/index.js.map +1 -1
  555. package/build-module/components/post-author/check.js +5 -4
  556. package/build-module/components/post-author/check.js.map +1 -1
  557. package/build-module/components/post-author/combobox.js +4 -3
  558. package/build-module/components/post-author/combobox.js.map +1 -1
  559. package/build-module/components/post-author/hook.js +2 -1
  560. package/build-module/components/post-author/hook.js.map +1 -1
  561. package/build-module/components/post-author/index.js +3 -3
  562. package/build-module/components/post-author/index.js.map +1 -1
  563. package/build-module/components/post-author/panel.js +72 -4
  564. package/build-module/components/post-author/panel.js.map +1 -1
  565. package/build-module/components/post-author/select.js +4 -3
  566. package/build-module/components/post-author/select.js.map +1 -1
  567. package/build-module/components/post-card-panel/index.js +54 -20
  568. package/build-module/components/post-card-panel/index.js.map +1 -1
  569. package/build-module/components/post-comments/index.js +40 -22
  570. package/build-module/components/post-comments/index.js.map +1 -1
  571. package/build-module/components/post-content-information/index.js +8 -5
  572. package/build-module/components/post-content-information/index.js.map +1 -1
  573. package/build-module/components/post-discussion/panel.js +56 -39
  574. package/build-module/components/post-discussion/panel.js.map +1 -1
  575. package/build-module/components/post-excerpt/check.js +5 -4
  576. package/build-module/components/post-excerpt/check.js.map +1 -1
  577. package/build-module/components/post-excerpt/index.js +17 -15
  578. package/build-module/components/post-excerpt/index.js.map +1 -1
  579. package/build-module/components/post-excerpt/panel.js +60 -40
  580. package/build-module/components/post-excerpt/panel.js.map +1 -1
  581. package/build-module/components/post-excerpt/plugin.js +7 -4
  582. package/build-module/components/post-excerpt/plugin.js.map +1 -1
  583. package/build-module/components/post-featured-image/check.js +18 -6
  584. package/build-module/components/post-featured-image/check.js.map +1 -1
  585. package/build-module/components/post-featured-image/index.js +78 -49
  586. package/build-module/components/post-featured-image/index.js.map +1 -1
  587. package/build-module/components/post-featured-image/panel.js +22 -7
  588. package/build-module/components/post-featured-image/panel.js.map +1 -1
  589. package/build-module/components/post-format/check.js +14 -4
  590. package/build-module/components/post-format/check.js.map +1 -1
  591. package/build-module/components/post-format/index.js +39 -21
  592. package/build-module/components/post-format/index.js.map +1 -1
  593. package/build-module/components/post-format/panel.js +75 -7
  594. package/build-module/components/post-format/panel.js.map +1 -1
  595. package/build-module/components/post-last-edited-panel/index.js +7 -4
  596. package/build-module/components/post-last-edited-panel/index.js.map +1 -1
  597. package/build-module/components/post-last-revision/check.js +14 -4
  598. package/build-module/components/post-last-revision/check.js.map +1 -1
  599. package/build-module/components/post-last-revision/index.js +48 -17
  600. package/build-module/components/post-last-revision/index.js.map +1 -1
  601. package/build-module/components/post-last-revision/panel.js +13 -4
  602. package/build-module/components/post-last-revision/panel.js.map +1 -1
  603. package/build-module/components/post-locked-modal/index.js +60 -34
  604. package/build-module/components/post-locked-modal/index.js.map +1 -1
  605. package/build-module/components/post-panel-row/index.js +12 -8
  606. package/build-module/components/post-panel-row/index.js.map +1 -1
  607. package/build-module/components/post-panel-section/index.js +5 -4
  608. package/build-module/components/post-panel-section/index.js.map +1 -1
  609. package/build-module/components/post-pending-status/check.js +11 -0
  610. package/build-module/components/post-pending-status/check.js.map +1 -1
  611. package/build-module/components/post-pending-status/index.js +15 -7
  612. package/build-module/components/post-pending-status/index.js.map +1 -1
  613. package/build-module/components/post-pingbacks/index.js +13 -5
  614. package/build-module/components/post-pingbacks/index.js.map +1 -1
  615. package/build-module/components/post-preview-button/index.js +48 -21
  616. package/build-module/components/post-preview-button/index.js.map +1 -1
  617. package/build-module/components/post-publish-button/index.js +22 -11
  618. package/build-module/components/post-publish-button/index.js.map +1 -1
  619. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +2 -2
  620. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  621. package/build-module/components/post-publish-panel/index.js +49 -33
  622. package/build-module/components/post-publish-panel/index.js.map +1 -1
  623. package/build-module/components/post-publish-panel/maybe-category-panel.js +13 -9
  624. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  625. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +22 -15
  626. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  627. package/build-module/components/post-publish-panel/maybe-tags-panel.js +14 -10
  628. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  629. package/build-module/components/post-publish-panel/maybe-upload-media.js +30 -24
  630. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  631. package/build-module/components/post-publish-panel/postpublish.js +57 -38
  632. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  633. package/build-module/components/post-publish-panel/prepublish.js +43 -26
  634. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  635. package/build-module/components/post-saved-state/index.js +8 -6
  636. package/build-module/components/post-saved-state/index.js.map +1 -1
  637. package/build-module/components/post-schedule/check.js +9 -0
  638. package/build-module/components/post-schedule/check.js.map +1 -1
  639. package/build-module/components/post-schedule/index.js +30 -6
  640. package/build-module/components/post-schedule/index.js.map +1 -1
  641. package/build-module/components/post-schedule/label.js +17 -0
  642. package/build-module/components/post-schedule/label.js.map +1 -1
  643. package/build-module/components/post-schedule/panel.js +43 -30
  644. package/build-module/components/post-schedule/panel.js.map +1 -1
  645. package/build-module/components/post-slug/check.js +5 -4
  646. package/build-module/components/post-slug/check.js.map +1 -1
  647. package/build-module/components/post-slug/index.js +5 -3
  648. package/build-module/components/post-slug/index.js.map +1 -1
  649. package/build-module/components/post-slug/panel.js +7 -4
  650. package/build-module/components/post-slug/panel.js.map +1 -1
  651. package/build-module/components/post-status/index.js +121 -120
  652. package/build-module/components/post-status/index.js.map +1 -1
  653. package/build-module/components/post-sticky/index.js +17 -9
  654. package/build-module/components/post-sticky/index.js.map +1 -1
  655. package/build-module/components/post-sticky/panel.js +6 -2
  656. package/build-module/components/post-sticky/panel.js.map +1 -1
  657. package/build-module/components/post-switch-to-draft-button/index.js +27 -21
  658. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  659. package/build-module/components/post-sync-status/index.js +8 -6
  660. package/build-module/components/post-sync-status/index.js.map +1 -1
  661. package/build-module/components/post-taxonomies/flat-term-selector.js +22 -18
  662. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  663. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +71 -59
  664. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  665. package/build-module/components/post-taxonomies/index.js +6 -6
  666. package/build-module/components/post-taxonomies/index.js.map +1 -1
  667. package/build-module/components/post-taxonomies/most-used-terms.js +20 -15
  668. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  669. package/build-module/components/post-taxonomies/panel.js +15 -11
  670. package/build-module/components/post-taxonomies/panel.js.map +1 -1
  671. package/build-module/components/post-template/block-theme.js +44 -32
  672. package/build-module/components/post-template/block-theme.js.map +1 -1
  673. package/build-module/components/post-template/classic-theme.js +74 -50
  674. package/build-module/components/post-template/classic-theme.js.map +1 -1
  675. package/build-module/components/post-template/create-new-template-modal.js +34 -27
  676. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  677. package/build-module/components/post-template/create-new-template.js +16 -11
  678. package/build-module/components/post-template/create-new-template.js.map +1 -1
  679. package/build-module/components/post-template/panel.js +17 -9
  680. package/build-module/components/post-template/panel.js.map +1 -1
  681. package/build-module/components/post-template/reset-default-template.js +5 -4
  682. package/build-module/components/post-template/reset-default-template.js.map +1 -1
  683. package/build-module/components/post-template/swap-template-button.js +22 -15
  684. package/build-module/components/post-template/swap-template-button.js.map +1 -1
  685. package/build-module/components/post-text-editor/index.js +30 -19
  686. package/build-module/components/post-text-editor/index.js.map +1 -1
  687. package/build-module/components/post-title/index.js +29 -18
  688. package/build-module/components/post-title/index.js.map +1 -1
  689. package/build-module/components/post-title/index.native.js +81 -57
  690. package/build-module/components/post-title/index.native.js.map +1 -1
  691. package/build-module/components/post-title/post-title-raw.js +11 -2
  692. package/build-module/components/post-title/post-title-raw.js.map +1 -1
  693. package/build-module/components/post-title/use-post-title-focus.js +8 -0
  694. package/build-module/components/post-title/use-post-title-focus.js.map +1 -1
  695. package/build-module/components/post-title/use-post-title.js +6 -0
  696. package/build-module/components/post-title/use-post-title.js.map +1 -1
  697. package/build-module/components/post-transform-panel/index.js +12 -12
  698. package/build-module/components/post-transform-panel/index.js.map +1 -1
  699. package/build-module/components/post-trash/index.js +21 -15
  700. package/build-module/components/post-trash/index.js.map +1 -1
  701. package/build-module/components/post-url/check.js +9 -0
  702. package/build-module/components/post-url/check.js.map +1 -1
  703. package/build-module/components/post-url/index.js +100 -72
  704. package/build-module/components/post-url/index.js.map +1 -1
  705. package/build-module/components/post-url/label.js +12 -0
  706. package/build-module/components/post-url/label.js.map +1 -1
  707. package/build-module/components/post-url/panel.js +59 -25
  708. package/build-module/components/post-url/panel.js.map +1 -1
  709. package/build-module/components/post-view-link/index.js +2 -2
  710. package/build-module/components/post-view-link/index.js.map +1 -1
  711. package/build-module/components/post-visibility/check.js +10 -0
  712. package/build-module/components/post-visibility/check.js.map +1 -1
  713. package/build-module/components/post-visibility/index.js +85 -67
  714. package/build-module/components/post-visibility/index.js.map +1 -1
  715. package/build-module/components/post-visibility/label.js +12 -0
  716. package/build-module/components/post-visibility/label.js.map +1 -1
  717. package/build-module/components/posts-per-page/index.js +103 -0
  718. package/build-module/components/posts-per-page/index.js.map +1 -0
  719. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js +7 -5
  720. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  721. package/build-module/components/preferences-modal/index.js +126 -102
  722. package/build-module/components/preferences-modal/index.js.map +1 -1
  723. package/build-module/components/preview-dropdown/index.js +49 -31
  724. package/build-module/components/preview-dropdown/index.js.map +1 -1
  725. package/build-module/components/provider/disable-non-page-content-blocks.js +5 -3
  726. package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
  727. package/build-module/components/provider/index.js +96 -20
  728. package/build-module/components/provider/index.js.map +1 -1
  729. package/build-module/components/provider/index.native.js +58 -20
  730. package/build-module/components/provider/index.native.js.map +1 -1
  731. package/build-module/components/provider/use-block-editor-settings.js +7 -6
  732. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  733. package/build-module/components/provider/with-registry-provider.js +33 -26
  734. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  735. package/build-module/components/resizable-editor/index.js +89 -0
  736. package/build-module/components/resizable-editor/index.js.map +1 -0
  737. package/build-module/components/resizable-editor/resize-handle.js +54 -0
  738. package/build-module/components/resizable-editor/resize-handle.js.map +1 -0
  739. package/build-module/components/save-publish-panels/index.js +37 -26
  740. package/build-module/components/save-publish-panels/index.js.map +1 -1
  741. package/build-module/components/sidebar/header.js +18 -14
  742. package/build-module/components/sidebar/header.js.map +1 -1
  743. package/build-module/components/sidebar/index.js +36 -31
  744. package/build-module/components/sidebar/index.js.map +1 -1
  745. package/build-module/components/sidebar/post-summary.js +34 -25
  746. package/build-module/components/sidebar/post-summary.js.map +1 -1
  747. package/build-module/components/site-discussion/index.js +127 -0
  748. package/build-module/components/site-discussion/index.js.map +1 -0
  749. package/build-module/components/start-page-options/index.js +13 -11
  750. package/build-module/components/start-page-options/index.js.map +1 -1
  751. package/build-module/components/start-template-options/index.js +30 -23
  752. package/build-module/components/start-template-options/index.js.map +1 -1
  753. package/build-module/components/table-of-contents/index.js +4 -4
  754. package/build-module/components/table-of-contents/index.js.map +1 -1
  755. package/build-module/components/table-of-contents/panel.js +55 -35
  756. package/build-module/components/table-of-contents/panel.js.map +1 -1
  757. package/build-module/components/template-areas/index.js +37 -22
  758. package/build-module/components/template-areas/index.js.map +1 -1
  759. package/build-module/components/template-content-panel/index.js +7 -6
  760. package/build-module/components/template-content-panel/index.js.map +1 -1
  761. package/build-module/components/template-validation-notice/index.js +27 -21
  762. package/build-module/components/template-validation-notice/index.js.map +1 -1
  763. package/build-module/components/text-editor/index.js +66 -0
  764. package/build-module/components/text-editor/index.js.map +1 -0
  765. package/build-module/components/time-to-read/index.js +7 -6
  766. package/build-module/components/time-to-read/index.js.map +1 -1
  767. package/build-module/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +5 -4
  768. package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -0
  769. package/build-module/components/{editor-canvas → visual-editor}/index.js +118 -75
  770. package/build-module/components/visual-editor/index.js.map +1 -0
  771. package/build-module/components/word-count/index.js +5 -4
  772. package/build-module/components/word-count/index.js.map +1 -1
  773. package/build-module/hooks/custom-sources-backwards-compatibility.js +2 -2
  774. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  775. package/build-module/hooks/index.js +1 -0
  776. package/build-module/hooks/index.js.map +1 -1
  777. package/build-module/hooks/media-upload.js +7 -0
  778. package/build-module/hooks/media-upload.js.map +1 -0
  779. package/build-module/hooks/pattern-overrides.js +17 -11
  780. package/build-module/hooks/pattern-overrides.js.map +1 -1
  781. package/build-module/private-apis.js +12 -28
  782. package/build-module/private-apis.js.map +1 -1
  783. package/build-module/private-apis.native.js +2 -26
  784. package/build-module/private-apis.native.js.map +1 -1
  785. package/build-module/store/constants.js +3 -0
  786. package/build-module/store/constants.js.map +1 -1
  787. package/build-module/store/private-actions.js +10 -14
  788. package/build-module/store/private-actions.js.map +1 -1
  789. package/build-module/store/private-selectors.js +38 -1
  790. package/build-module/store/private-selectors.js.map +1 -1
  791. package/build-module/store/selectors.js +1 -1
  792. package/build-module/store/selectors.js.map +1 -1
  793. package/build-module/utils/set-nested-value.js +38 -0
  794. package/build-module/utils/set-nested-value.js.map +1 -0
  795. package/build-style/style-rtl.css +344 -129
  796. package/build-style/style.css +344 -129
  797. package/package.json +40 -36
  798. package/src/bindings/index.js +1 -4
  799. package/src/bindings/pattern-overrides.js +1 -1
  800. package/src/bindings/post-meta.js +46 -6
  801. package/src/components/block-settings-menu/content-only-settings-menu.js +26 -12
  802. package/src/components/blog-title/index.js +124 -0
  803. package/src/components/blog-title/style.scss +4 -0
  804. package/src/components/collapsible-block-toolbar/style.scss +3 -1
  805. package/src/components/commands/index.js +113 -3
  806. package/src/components/create-template-part-modal/index.js +205 -0
  807. package/src/components/create-template-part-modal/style.scss +69 -0
  808. package/src/components/create-template-part-modal/test/utils.js +60 -0
  809. package/src/components/create-template-part-modal/utils.js +67 -0
  810. package/src/components/document-bar/index.js +32 -21
  811. package/src/components/document-tools/index.js +2 -7
  812. package/src/components/editor/index.js +93 -0
  813. package/src/components/editor-help/help-get-support-button.native.js +1 -1
  814. package/src/components/editor-interface/content-slot-fill.js +15 -0
  815. package/src/components/editor-interface/index.js +230 -0
  816. package/src/components/editor-interface/style.scss +3 -0
  817. package/src/components/editor-notices/index.js +10 -0
  818. package/src/components/entities-saved-states/entity-record-item.js +45 -16
  819. package/src/components/entities-saved-states/style.scss +11 -5
  820. package/src/components/error-boundary/index.js +10 -0
  821. package/src/components/error-boundary/index.native.js +1 -1
  822. package/src/components/global-styles-provider/index.js +100 -8
  823. package/src/components/header/back-button.js +32 -0
  824. package/src/components/header/index.js +26 -18
  825. package/src/components/header/style.scss +6 -1
  826. package/src/components/inserter-sidebar/index.js +65 -32
  827. package/src/components/inserter-sidebar/style.scss +0 -13
  828. package/src/components/local-autosave-monitor/index.js +12 -0
  829. package/src/components/media-categories/index.js +1 -3
  830. package/src/components/page-attributes/order.js +79 -3
  831. package/src/components/page-attributes/panel.js +10 -26
  832. package/src/components/page-attributes/parent.js +98 -2
  833. package/src/components/page-attributes/style.scss +19 -0
  834. package/src/components/pattern-duplicate-modal/index.js +50 -0
  835. package/src/components/pattern-rename-modal/index.js +44 -0
  836. package/src/components/post-actions/actions.js +308 -261
  837. package/src/components/post-actions/export-pattern-action.js +74 -0
  838. package/src/components/post-actions/export-pattern-action.native.js +4 -0
  839. package/src/components/post-actions/index.js +16 -5
  840. package/src/components/post-author/combobox.js +1 -0
  841. package/src/components/post-author/hook.js +1 -1
  842. package/src/components/post-author/panel.js +63 -2
  843. package/src/components/post-author/select.js +1 -0
  844. package/src/components/post-author/style.scss +6 -0
  845. package/src/components/post-card-panel/index.js +69 -22
  846. package/src/components/post-card-panel/style.scss +23 -1
  847. package/src/components/post-comments/index.js +5 -0
  848. package/src/components/post-discussion/panel.js +9 -2
  849. package/src/components/post-discussion/style.scss +1 -3
  850. package/src/components/post-excerpt/panel.js +45 -48
  851. package/src/components/post-excerpt/style.scss +0 -17
  852. package/src/components/post-featured-image/check.js +9 -0
  853. package/src/components/post-featured-image/index.js +15 -0
  854. package/src/components/post-featured-image/panel.js +9 -0
  855. package/src/components/post-format/check.js +8 -0
  856. package/src/components/post-format/index.js +15 -4
  857. package/src/components/post-format/panel.js +71 -6
  858. package/src/components/post-format/style.scss +10 -4
  859. package/src/components/post-last-revision/check.js +8 -0
  860. package/src/components/post-last-revision/index.js +31 -3
  861. package/src/components/post-last-revision/panel.js +5 -0
  862. package/src/components/post-last-revision/style.scss +4 -0
  863. package/src/components/post-locked-modal/index.js +6 -0
  864. package/src/components/post-panel-row/style.scss +16 -0
  865. package/src/components/post-pending-status/check.js +10 -0
  866. package/src/components/post-pending-status/index.js +5 -0
  867. package/src/components/post-pingbacks/index.js +6 -0
  868. package/src/components/post-preview-button/index.js +16 -0
  869. package/src/components/post-preview-button/test/index.js +10 -2
  870. package/src/components/post-publish-button/index.js +17 -4
  871. package/src/components/post-publish-panel/index.js +2 -0
  872. package/src/components/post-publish-panel/maybe-tags-panel.js +1 -1
  873. package/src/components/post-publish-panel/style.scss +28 -36
  874. package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +3 -3
  875. package/src/components/post-schedule/check.js +8 -0
  876. package/src/components/post-schedule/index.js +30 -3
  877. package/src/components/post-schedule/label.js +15 -0
  878. package/src/components/post-schedule/panel.js +9 -1
  879. package/src/components/post-schedule/style.scss +0 -11
  880. package/src/components/post-status/index.js +30 -52
  881. package/src/components/post-status/style.scss +4 -34
  882. package/src/components/post-sticky/index.js +12 -7
  883. package/src/components/post-sticky/style.scss +3 -0
  884. package/src/components/post-sync-status/index.js +2 -8
  885. package/src/components/post-template/block-theme.js +1 -0
  886. package/src/components/post-template/classic-theme.js +15 -0
  887. package/src/components/post-template/panel.js +5 -0
  888. package/src/components/post-template/style.scss +0 -8
  889. package/src/components/post-text-editor/index.js +5 -0
  890. package/src/components/post-title/index.js +8 -1
  891. package/src/components/post-title/index.native.js +70 -35
  892. package/src/components/post-title/post-title-raw.js +8 -0
  893. package/src/components/post-title/use-post-title-focus.js +7 -0
  894. package/src/components/post-title/use-post-title.js +5 -0
  895. package/src/components/post-transform-panel/index.js +2 -10
  896. package/src/components/post-url/check.js +8 -0
  897. package/src/components/post-url/index.js +41 -24
  898. package/src/components/post-url/label.js +10 -0
  899. package/src/components/post-url/panel.js +18 -5
  900. package/src/components/post-url/style.scss +0 -9
  901. package/src/components/post-visibility/check.js +9 -0
  902. package/src/components/post-visibility/index.js +7 -0
  903. package/src/components/post-visibility/label.js +10 -0
  904. package/src/components/posts-per-page/index.js +101 -0
  905. package/src/components/posts-per-page/style.scss +4 -0
  906. package/src/components/provider/disable-non-page-content-blocks.js +9 -4
  907. package/src/components/provider/index.js +68 -0
  908. package/src/components/provider/index.native.js +43 -2
  909. package/src/components/provider/use-block-editor-settings.js +4 -6
  910. package/src/components/provider/with-registry-provider.js +32 -31
  911. package/src/components/resizable-editor/index.js +90 -0
  912. package/src/components/resizable-editor/resize-handle.js +62 -0
  913. package/src/components/resizable-editor/style.scss +53 -0
  914. package/src/components/save-publish-panels/index.js +10 -2
  915. package/src/components/save-publish-panels/style.scss +0 -8
  916. package/src/components/sidebar/index.js +0 -4
  917. package/src/components/sidebar/post-summary.js +16 -21
  918. package/src/components/sidebar/style.scss +1 -1
  919. package/src/components/site-discussion/index.js +138 -0
  920. package/src/components/site-discussion/style.scss +19 -0
  921. package/src/components/start-template-options/style.scss +0 -8
  922. package/src/components/template-areas/index.js +15 -6
  923. package/src/components/text-editor/index.js +57 -0
  924. package/src/components/text-editor/style.scss +71 -0
  925. package/src/components/{editor-canvas → visual-editor}/index.js +177 -108
  926. package/src/components/visual-editor/style.scss +37 -0
  927. package/src/hooks/index.js +1 -0
  928. package/src/hooks/media-upload.js +11 -0
  929. package/src/private-apis.js +12 -28
  930. package/src/private-apis.native.js +2 -26
  931. package/src/store/constants.js +7 -0
  932. package/src/store/private-actions.js +22 -50
  933. package/src/store/private-selectors.js +45 -0
  934. package/src/store/selectors.js +1 -1
  935. package/src/style.scss +10 -0
  936. package/src/utils/set-nested-value.js +39 -0
  937. package/build/components/editor-canvas/edit-template-blocks-notification.js.map +0 -1
  938. package/build/components/editor-canvas/index.js.map +0 -1
  939. package/build/components/post-trash/panel.js +0 -18
  940. package/build/components/post-trash/panel.js.map +0 -1
  941. package/build-module/components/editor-canvas/edit-template-blocks-notification.js.map +0 -1
  942. package/build-module/components/editor-canvas/index.js.map +0 -1
  943. package/build-module/components/post-trash/panel.js +0 -10
  944. package/build-module/components/post-trash/panel.js.map +0 -1
  945. package/src/components/post-trash/panel.js +0 -13
  946. package/src/components/provider/README.md +0 -37
  947. /package/src/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +0 -0
@@ -1,4 +1,3 @@
1
- import { createElement, Fragment } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -17,6 +16,9 @@ import PostPublishButton from '../post-publish-button';
17
16
  import PostPublishPanelPrepublish from './prepublish';
18
17
  import PostPublishPanelPostpublish from './postpublish';
19
18
  import { store as editorStore } from '../../store';
19
+ import { jsx as _jsx } from "react/jsx-runtime";
20
+ import { Fragment as _Fragment } from "react/jsx-runtime";
21
+ import { jsxs as _jsxs } from "react/jsx-runtime";
20
22
  export class PostPublishPanel extends Component {
21
23
  constructor() {
22
24
  super(...arguments);
@@ -63,39 +65,53 @@ export class PostPublishPanel extends Component {
63
65
  const isPublishedOrScheduled = isPublished || isScheduled && isBeingScheduled;
64
66
  const isPrePublish = !isPublishedOrScheduled && !isSaving;
65
67
  const isPostPublish = isPublishedOrScheduled && !isSaving;
66
- return createElement("div", {
68
+ return /*#__PURE__*/_jsxs("div", {
67
69
  className: "editor-post-publish-panel",
68
- ...propsForPanel
69
- }, createElement("div", {
70
- className: "editor-post-publish-panel__header"
71
- }, isPostPublish ? createElement(Button, {
72
- onClick: onClose,
73
- icon: closeSmall,
74
- label: __('Close panel')
75
- }) : createElement(Fragment, null, createElement("div", {
76
- className: "editor-post-publish-panel__header-publish-button"
77
- }, createElement(PostPublishButton, {
78
- focusOnMount: true,
79
- onSubmit: this.onSubmit,
80
- forceIsDirty: forceIsDirty
81
- })), createElement("div", {
82
- className: "editor-post-publish-panel__header-cancel-button"
83
- }, createElement(Button, {
84
- disabled: isSavingNonPostEntityChanges,
85
- onClick: onClose,
86
- variant: "secondary"
87
- }, __('Cancel'))))), createElement("div", {
88
- className: "editor-post-publish-panel__content"
89
- }, isPrePublish && createElement(PostPublishPanelPrepublish, null, PrePublishExtension && createElement(PrePublishExtension, null)), isPostPublish && createElement(PostPublishPanelPostpublish, {
90
- focusOnMount: true
91
- }, PostPublishExtension && createElement(PostPublishExtension, null)), isSaving && createElement(Spinner, null)), createElement("div", {
92
- className: "editor-post-publish-panel__footer"
93
- }, createElement(CheckboxControl, {
94
- __nextHasNoMarginBottom: true,
95
- label: __('Always show pre-publish checks.'),
96
- checked: isPublishSidebarEnabled,
97
- onChange: onTogglePublishSidebar
98
- })));
70
+ ...propsForPanel,
71
+ children: [/*#__PURE__*/_jsx("div", {
72
+ className: "editor-post-publish-panel__header",
73
+ children: isPostPublish ? /*#__PURE__*/_jsx(Button, {
74
+ onClick: onClose,
75
+ icon: closeSmall,
76
+ label: __('Close panel')
77
+ }) : /*#__PURE__*/_jsxs(_Fragment, {
78
+ children: [/*#__PURE__*/_jsx("div", {
79
+ className: "editor-post-publish-panel__header-publish-button",
80
+ children: /*#__PURE__*/_jsx(PostPublishButton, {
81
+ focusOnMount: true,
82
+ onSubmit: this.onSubmit,
83
+ forceIsDirty: forceIsDirty
84
+ })
85
+ }), /*#__PURE__*/_jsx("div", {
86
+ className: "editor-post-publish-panel__header-cancel-button",
87
+ children: /*#__PURE__*/_jsx(Button, {
88
+ __experimentalIsFocusable: true,
89
+ disabled: isSavingNonPostEntityChanges,
90
+ onClick: onClose,
91
+ variant: "secondary",
92
+ size: "compact",
93
+ children: __('Cancel')
94
+ })
95
+ })]
96
+ })
97
+ }), /*#__PURE__*/_jsxs("div", {
98
+ className: "editor-post-publish-panel__content",
99
+ children: [isPrePublish && /*#__PURE__*/_jsx(PostPublishPanelPrepublish, {
100
+ children: PrePublishExtension && /*#__PURE__*/_jsx(PrePublishExtension, {})
101
+ }), isPostPublish && /*#__PURE__*/_jsx(PostPublishPanelPostpublish, {
102
+ focusOnMount: true,
103
+ children: PostPublishExtension && /*#__PURE__*/_jsx(PostPublishExtension, {})
104
+ }), isSaving && /*#__PURE__*/_jsx(Spinner, {})]
105
+ }), /*#__PURE__*/_jsx("div", {
106
+ className: "editor-post-publish-panel__footer",
107
+ children: /*#__PURE__*/_jsx(CheckboxControl, {
108
+ __nextHasNoMarginBottom: true,
109
+ label: __('Always show pre-publish checks.'),
110
+ checked: isPublishSidebarEnabled,
111
+ onChange: onTogglePublishSidebar
112
+ })
113
+ })]
114
+ });
99
115
  }
100
116
  }
101
117
  export default compose([withSelect(select => {
@@ -1 +1 @@
1
- {"version":3,"names":["__","Component","Button","Spinner","CheckboxControl","withFocusReturn","withConstrainedTabbing","withSelect","withDispatch","compose","closeSmall","store","coreStore","PostPublishButton","PostPublishPanelPrepublish","PostPublishPanelPostpublish","editorStore","PostPublishPanel","constructor","arguments","onSubmit","bind","componentDidUpdate","prevProps","isPublished","props","isSaving","isDirty","onClose","hasPublishAction","isPostTypeViewable","render","forceIsDirty","isBeingScheduled","isPublishSidebarEnabled","isScheduled","isSavingNonPostEntityChanges","onTogglePublishSidebar","PostPublishExtension","PrePublishExtension","additionalProps","propsForPanel","isPublishedOrScheduled","isPrePublish","isPostPublish","createElement","className","onClick","icon","label","Fragment","focusOnMount","disabled","variant","__nextHasNoMarginBottom","checked","onChange","select","_getCurrentPost$_link","getPostType","getCurrentPost","getEditedPostAttribute","isCurrentPostPublished","isCurrentPostScheduled","isEditedPostBeingScheduled","isEditedPostDirty","isAutosavingPost","isSavingPost","postType","_links","viewable","dispatch","disablePublishSidebar","enablePublishSidebar"],"sources":["@wordpress/editor/src/components/post-publish-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component } from '@wordpress/element';\nimport {\n\tButton,\n\tSpinner,\n\tCheckboxControl,\n\twithFocusReturn,\n\twithConstrainedTabbing,\n} from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { closeSmall } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostPublishButton from '../post-publish-button';\nimport PostPublishPanelPrepublish from './prepublish';\nimport PostPublishPanelPostpublish from './postpublish';\nimport { store as editorStore } from '../../store';\n\nexport class PostPublishPanel extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.onSubmit = this.onSubmit.bind( this );\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\t// Automatically collapse the publish sidebar when a post\n\t\t// is published and the user makes an edit.\n\t\tif (\n\t\t\tprevProps.isPublished &&\n\t\t\t! this.props.isSaving &&\n\t\t\tthis.props.isDirty\n\t\t) {\n\t\t\tthis.props.onClose();\n\t\t}\n\t}\n\n\tonSubmit() {\n\t\tconst { onClose, hasPublishAction, isPostTypeViewable } = this.props;\n\t\tif ( ! hasPublishAction || ! isPostTypeViewable ) {\n\t\t\tonClose();\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tforceIsDirty,\n\t\t\tisBeingScheduled,\n\t\t\tisPublished,\n\t\t\tisPublishSidebarEnabled,\n\t\t\tisScheduled,\n\t\t\tisSaving,\n\t\t\tisSavingNonPostEntityChanges,\n\t\t\tonClose,\n\t\t\tonTogglePublishSidebar,\n\t\t\tPostPublishExtension,\n\t\t\tPrePublishExtension,\n\t\t\t...additionalProps\n\t\t} = this.props;\n\t\tconst {\n\t\t\thasPublishAction,\n\t\t\tisDirty,\n\t\t\tisPostTypeViewable,\n\t\t\t...propsForPanel\n\t\t} = additionalProps;\n\t\tconst isPublishedOrScheduled =\n\t\t\tisPublished || ( isScheduled && isBeingScheduled );\n\t\tconst isPrePublish = ! isPublishedOrScheduled && ! isSaving;\n\t\tconst isPostPublish = isPublishedOrScheduled && ! isSaving;\n\t\treturn (\n\t\t\t<div className=\"editor-post-publish-panel\" { ...propsForPanel }>\n\t\t\t\t<div className=\"editor-post-publish-panel__header\">\n\t\t\t\t\t{ isPostPublish ? (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\tlabel={ __( 'Close panel' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"editor-post-publish-panel__header-publish-button\">\n\t\t\t\t\t\t\t\t<PostPublishButton\n\t\t\t\t\t\t\t\t\tfocusOnMount\n\t\t\t\t\t\t\t\t\tonSubmit={ this.onSubmit }\n\t\t\t\t\t\t\t\t\tforceIsDirty={ forceIsDirty }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"editor-post-publish-panel__header-cancel-button\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tdisabled={ isSavingNonPostEntityChanges }\n\t\t\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t\t<div className=\"editor-post-publish-panel__content\">\n\t\t\t\t\t{ isPrePublish && (\n\t\t\t\t\t\t<PostPublishPanelPrepublish>\n\t\t\t\t\t\t\t{ PrePublishExtension && <PrePublishExtension /> }\n\t\t\t\t\t\t</PostPublishPanelPrepublish>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isPostPublish && (\n\t\t\t\t\t\t<PostPublishPanelPostpublish focusOnMount>\n\t\t\t\t\t\t\t{ PostPublishExtension && <PostPublishExtension /> }\n\t\t\t\t\t\t</PostPublishPanelPostpublish>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isSaving && <Spinner /> }\n\t\t\t\t</div>\n\t\t\t\t<div className=\"editor-post-publish-panel__footer\">\n\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Always show pre-publish checks.' ) }\n\t\t\t\t\t\tchecked={ isPublishSidebarEnabled }\n\t\t\t\t\t\tonChange={ onTogglePublishSidebar }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { getPostType } = select( coreStore );\n\t\tconst {\n\t\t\tgetCurrentPost,\n\t\t\tgetEditedPostAttribute,\n\t\t\tisCurrentPostPublished,\n\t\t\tisCurrentPostScheduled,\n\t\t\tisEditedPostBeingScheduled,\n\t\t\tisEditedPostDirty,\n\t\t\tisAutosavingPost,\n\t\t\tisSavingPost,\n\t\t\tisSavingNonPostEntityChanges,\n\t\t} = select( editorStore );\n\t\tconst { isPublishSidebarEnabled } = select( editorStore );\n\t\tconst postType = getPostType( getEditedPostAttribute( 'type' ) );\n\n\t\treturn {\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tisPostTypeViewable: postType?.viewable,\n\t\t\tisBeingScheduled: isEditedPostBeingScheduled(),\n\t\t\tisDirty: isEditedPostDirty(),\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tisPublishSidebarEnabled: isPublishSidebarEnabled(),\n\t\t\tisSaving: isSavingPost() && ! isAutosavingPost(),\n\t\t\tisSavingNonPostEntityChanges: isSavingNonPostEntityChanges(),\n\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { isPublishSidebarEnabled } ) => {\n\t\tconst { disablePublishSidebar, enablePublishSidebar } =\n\t\t\tdispatch( editorStore );\n\t\treturn {\n\t\t\tonTogglePublishSidebar: () => {\n\t\t\t\tif ( isPublishSidebarEnabled ) {\n\t\t\t\t\tdisablePublishSidebar();\n\t\t\t\t} else {\n\t\t\t\t\tenablePublishSidebar();\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t} ),\n\twithFocusReturn,\n\twithConstrainedTabbing,\n] )( PostPublishPanel );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SACCC,MAAM,EACNC,OAAO,EACPC,eAAe,EACfC,eAAe,EACfC,sBAAsB,QAChB,uBAAuB;AAC9B,SAASC,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAC1D,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,OAAOC,iBAAiB,MAAM,wBAAwB;AACtD,OAAOC,0BAA0B,MAAM,cAAc;AACrD,OAAOC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AAqB,CAAC,CAAC;MACxB,CAAC,MAAM;QACNC,oBAAoB,CAAC,CAAC;MACvB;IACD;EACD,CAAC;AACF,CAAE,CAAC,EACHpE,eAAe,EACfC,sBAAsB,CACrB,CAAC,CAAEW,gBAAiB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__","Component","Button","Spinner","CheckboxControl","withFocusReturn","withConstrainedTabbing","withSelect","withDispatch","compose","closeSmall","store","coreStore","PostPublishButton","PostPublishPanelPrepublish","PostPublishPanelPostpublish","editorStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","PostPublishPanel","constructor","arguments","onSubmit","bind","componentDidUpdate","prevProps","isPublished","props","isSaving","isDirty","onClose","hasPublishAction","isPostTypeViewable","render","forceIsDirty","isBeingScheduled","isPublishSidebarEnabled","isScheduled","isSavingNonPostEntityChanges","onTogglePublishSidebar","PostPublishExtension","PrePublishExtension","additionalProps","propsForPanel","isPublishedOrScheduled","isPrePublish","isPostPublish","className","children","onClick","icon","label","focusOnMount","__experimentalIsFocusable","disabled","variant","size","__nextHasNoMarginBottom","checked","onChange","select","_getCurrentPost$_link","getPostType","getCurrentPost","getEditedPostAttribute","isCurrentPostPublished","isCurrentPostScheduled","isEditedPostBeingScheduled","isEditedPostDirty","isAutosavingPost","isSavingPost","postType","_links","viewable","dispatch","disablePublishSidebar","enablePublishSidebar"],"sources":["@wordpress/editor/src/components/post-publish-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component } from '@wordpress/element';\nimport {\n\tButton,\n\tSpinner,\n\tCheckboxControl,\n\twithFocusReturn,\n\twithConstrainedTabbing,\n} from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { closeSmall } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostPublishButton from '../post-publish-button';\nimport PostPublishPanelPrepublish from './prepublish';\nimport PostPublishPanelPostpublish from './postpublish';\nimport { store as editorStore } from '../../store';\n\nexport class PostPublishPanel extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.onSubmit = this.onSubmit.bind( this );\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\t// Automatically collapse the publish sidebar when a post\n\t\t// is published and the user makes an edit.\n\t\tif (\n\t\t\tprevProps.isPublished &&\n\t\t\t! this.props.isSaving &&\n\t\t\tthis.props.isDirty\n\t\t) {\n\t\t\tthis.props.onClose();\n\t\t}\n\t}\n\n\tonSubmit() {\n\t\tconst { onClose, hasPublishAction, isPostTypeViewable } = this.props;\n\t\tif ( ! hasPublishAction || ! isPostTypeViewable ) {\n\t\t\tonClose();\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tforceIsDirty,\n\t\t\tisBeingScheduled,\n\t\t\tisPublished,\n\t\t\tisPublishSidebarEnabled,\n\t\t\tisScheduled,\n\t\t\tisSaving,\n\t\t\tisSavingNonPostEntityChanges,\n\t\t\tonClose,\n\t\t\tonTogglePublishSidebar,\n\t\t\tPostPublishExtension,\n\t\t\tPrePublishExtension,\n\t\t\t...additionalProps\n\t\t} = this.props;\n\t\tconst {\n\t\t\thasPublishAction,\n\t\t\tisDirty,\n\t\t\tisPostTypeViewable,\n\t\t\t...propsForPanel\n\t\t} = additionalProps;\n\t\tconst isPublishedOrScheduled =\n\t\t\tisPublished || ( isScheduled && isBeingScheduled );\n\t\tconst isPrePublish = ! isPublishedOrScheduled && ! isSaving;\n\t\tconst isPostPublish = isPublishedOrScheduled && ! isSaving;\n\t\treturn (\n\t\t\t<div className=\"editor-post-publish-panel\" { ...propsForPanel }>\n\t\t\t\t<div className=\"editor-post-publish-panel__header\">\n\t\t\t\t\t{ isPostPublish ? (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\tlabel={ __( 'Close panel' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"editor-post-publish-panel__header-publish-button\">\n\t\t\t\t\t\t\t\t<PostPublishButton\n\t\t\t\t\t\t\t\t\tfocusOnMount\n\t\t\t\t\t\t\t\t\tonSubmit={ this.onSubmit }\n\t\t\t\t\t\t\t\t\tforceIsDirty={ forceIsDirty }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"editor-post-publish-panel__header-cancel-button\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__experimentalIsFocusable\n\t\t\t\t\t\t\t\t\tdisabled={ isSavingNonPostEntityChanges }\n\t\t\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t\t<div className=\"editor-post-publish-panel__content\">\n\t\t\t\t\t{ isPrePublish && (\n\t\t\t\t\t\t<PostPublishPanelPrepublish>\n\t\t\t\t\t\t\t{ PrePublishExtension && <PrePublishExtension /> }\n\t\t\t\t\t\t</PostPublishPanelPrepublish>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isPostPublish && (\n\t\t\t\t\t\t<PostPublishPanelPostpublish focusOnMount>\n\t\t\t\t\t\t\t{ PostPublishExtension && <PostPublishExtension /> }\n\t\t\t\t\t\t</PostPublishPanelPostpublish>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isSaving && <Spinner /> }\n\t\t\t\t</div>\n\t\t\t\t<div className=\"editor-post-publish-panel__footer\">\n\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Always show pre-publish checks.' ) }\n\t\t\t\t\t\tchecked={ isPublishSidebarEnabled }\n\t\t\t\t\t\tonChange={ onTogglePublishSidebar }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { getPostType } = select( coreStore );\n\t\tconst {\n\t\t\tgetCurrentPost,\n\t\t\tgetEditedPostAttribute,\n\t\t\tisCurrentPostPublished,\n\t\t\tisCurrentPostScheduled,\n\t\t\tisEditedPostBeingScheduled,\n\t\t\tisEditedPostDirty,\n\t\t\tisAutosavingPost,\n\t\t\tisSavingPost,\n\t\t\tisSavingNonPostEntityChanges,\n\t\t} = select( editorStore );\n\t\tconst { isPublishSidebarEnabled } = select( editorStore );\n\t\tconst postType = getPostType( getEditedPostAttribute( 'type' ) );\n\n\t\treturn {\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tisPostTypeViewable: postType?.viewable,\n\t\t\tisBeingScheduled: isEditedPostBeingScheduled(),\n\t\t\tisDirty: isEditedPostDirty(),\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tisPublishSidebarEnabled: isPublishSidebarEnabled(),\n\t\t\tisSaving: isSavingPost() && ! isAutosavingPost(),\n\t\t\tisSavingNonPostEntityChanges: isSavingNonPostEntityChanges(),\n\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { isPublishSidebarEnabled } ) => {\n\t\tconst { disablePublishSidebar, enablePublishSidebar } =\n\t\t\tdispatch( editorStore );\n\t\treturn {\n\t\t\tonTogglePublishSidebar: () => {\n\t\t\t\tif ( isPublishSidebarEnabled ) {\n\t\t\t\t\tdisablePublishSidebar();\n\t\t\t\t} else {\n\t\t\t\t\tenablePublishSidebar();\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t} 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MAAM2D,QAAQ,GAAGT,WAAW,CAAEE,sBAAsB,CAAE,MAAO,CAAE,CAAC;EAEhE,OAAO;IACNjC,gBAAgB,GAAA8B,qBAAA,GACfE,cAAc,CAAC,CAAC,CAACS,MAAM,GAAI,mBAAmB,CAAE,cAAAX,qBAAA,cAAAA,qBAAA,GAAI,KAAK;IAC1D7B,kBAAkB,EAAEuC,QAAQ,EAAEE,QAAQ;IACtCtC,gBAAgB,EAAEgC,0BAA0B,CAAC,CAAC;IAC9CtC,OAAO,EAAEuC,iBAAiB,CAAC,CAAC;IAC5B1C,WAAW,EAAEuC,sBAAsB,CAAC,CAAC;IACrC7B,uBAAuB,EAAEA,uBAAuB,CAAC,CAAC;IAClDR,QAAQ,EAAE0C,YAAY,CAAC,CAAC,IAAI,CAAED,gBAAgB,CAAC,CAAC;IAChD/B,4BAA4B,EAAEA,4BAA4B,CAAC,CAAC;IAC5DD,WAAW,EAAE6B,sBAAsB,CAAC;EACrC,CAAC;AACF,CAAE,CAAC,EACH9D,YAAY,CAAE,CAAEsE,QAAQ,EAAE;EAAEtC;AAAwB,CAAC,KAAM;EAC1D,MAAM;IAAEuC,qBAAqB;IAAEC;EAAqB,CAAC,GACpDF,QAAQ,CAAE9D,WAAY,CAAC;EACxB,OAAO;IACN2B,sBAAsB,EAAEA,CAAA,KAAM;MAC7B,IAAKH,uBAAuB,EAAG;QAC9BuC,qBAAqB,CAAC,CAAC;MACxB,CAAC,MAAM;QACNC,oBAAoB,CAAC,CAAC;MACvB;IACD;EACD,CAAC;AACF,CAAE,CAAC,EACH3E,eAAe,EACfC,sBAAsB,CACrB,CAAC,CAAEiB,gBAAiB,CAAC","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -13,6 +12,8 @@ import { useState, useEffect } from '@wordpress/element';
13
12
  */
14
13
  import HierarchicalTermSelector from '../post-taxonomies/hierarchical-term-selector';
15
14
  import { store as editorStore } from '../../store';
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ import { jsxs as _jsxs } from "react/jsx-runtime";
16
17
  function MaybeCategoryPanel() {
17
18
  const hasNoCategory = useSelect(select => {
18
19
  const postType = select(editorStore).getCurrentPostType();
@@ -43,16 +44,19 @@ function MaybeCategoryPanel() {
43
44
  if (!shouldShowPanel) {
44
45
  return null;
45
46
  }
46
- const panelBodyTitle = [__('Suggestion:'), createElement("span", {
47
+ const panelBodyTitle = [__('Suggestion:'), /*#__PURE__*/_jsx("span", {
47
48
  className: "editor-post-publish-panel__link",
48
- key: "label"
49
- }, __('Assign a category'))];
50
- return createElement(PanelBody, {
49
+ children: __('Assign a category')
50
+ }, "label")];
51
+ return /*#__PURE__*/_jsxs(PanelBody, {
51
52
  initialOpen: false,
52
- title: panelBodyTitle
53
- }, createElement("p", null, __('Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.')), createElement(HierarchicalTermSelector, {
54
- slug: "category"
55
- }));
53
+ title: panelBodyTitle,
54
+ children: [/*#__PURE__*/_jsx("p", {
55
+ children: __('Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.')
56
+ }), /*#__PURE__*/_jsx(HierarchicalTermSelector, {
57
+ slug: "category"
58
+ })]
59
+ });
56
60
  }
57
61
  export default MaybeCategoryPanel;
58
62
  //# sourceMappingURL=maybe-category-panel.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__","useSelect","PanelBody","store","coreStore","useState","useEffect","HierarchicalTermSelector","editorStore","MaybeCategoryPanel","hasNoCategory","select","postType","getCurrentPostType","canUser","getEntityRecord","getTaxonomy","categoriesTaxonomy","defaultCategoryId","default_category","undefined","defaultCategory","postTypeSupportsCategories","types","some","type","categories","getEditedPostAttribute","rest_base","length","id","shouldShowPanel","setShouldShowPanel","panelBodyTitle","createElement","className","key","initialOpen","title","slug"],"sources":["@wordpress/editor/src/components/post-publish-panel/maybe-category-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useState, useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport HierarchicalTermSelector from '../post-taxonomies/hierarchical-term-selector';\nimport { store as editorStore } from '../../store';\n\nfunction MaybeCategoryPanel() {\n\tconst hasNoCategory = useSelect( ( select ) => {\n\t\tconst postType = select( editorStore ).getCurrentPostType();\n\t\tconst { canUser, getEntityRecord, getTaxonomy } = select( coreStore );\n\t\tconst categoriesTaxonomy = getTaxonomy( 'category' );\n\t\tconst defaultCategoryId = canUser( 'read', 'settings' )\n\t\t\t? getEntityRecord( 'root', 'site' )?.default_category\n\t\t\t: undefined;\n\t\tconst defaultCategory = defaultCategoryId\n\t\t\t? getEntityRecord( 'taxonomy', 'category', defaultCategoryId )\n\t\t\t: undefined;\n\t\tconst postTypeSupportsCategories =\n\t\t\tcategoriesTaxonomy &&\n\t\t\tcategoriesTaxonomy.types.some( ( type ) => type === postType );\n\t\tconst categories =\n\t\t\tcategoriesTaxonomy &&\n\t\t\tselect( editorStore ).getEditedPostAttribute(\n\t\t\t\tcategoriesTaxonomy.rest_base\n\t\t\t);\n\n\t\t// This boolean should return true if everything is loaded\n\t\t// ( categoriesTaxonomy, defaultCategory )\n\t\t// and the post has not been assigned a category different than \"uncategorized\".\n\t\treturn (\n\t\t\t!! categoriesTaxonomy &&\n\t\t\t!! defaultCategory &&\n\t\t\tpostTypeSupportsCategories &&\n\t\t\t( categories?.length === 0 ||\n\t\t\t\t( categories?.length === 1 &&\n\t\t\t\t\tdefaultCategory?.id === categories[ 0 ] ) )\n\t\t);\n\t}, [] );\n\tconst [ shouldShowPanel, setShouldShowPanel ] = useState( false );\n\tuseEffect( () => {\n\t\t// We use state to avoid hiding the panel if the user edits the categories\n\t\t// and adds one within the panel itself (while visible).\n\t\tif ( hasNoCategory ) {\n\t\t\tsetShouldShowPanel( true );\n\t\t}\n\t}, [ hasNoCategory ] );\n\n\tif ( ! shouldShowPanel ) {\n\t\treturn null;\n\t}\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'Assign a category' ) }\n\t\t</span>,\n\t];\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<HierarchicalTermSelector slug=\"category\" />\n\t\t</PanelBody>\n\t);\n}\n\nexport default MaybeCategoryPanel;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,SAAS,QAAQ,uBAAuB;AACjD,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;;AAExD;AACA;AACA;AACA,OAAOC,wBAAwB,MAAM,+CAA+C;AACpF,SAASJ,KAAK,IAAIK,WAAW,QAAQ,aAAa;AAElD,SAASC,kBAAkBA,CAAA,EAAG;EAC7B,MAAMC,aAAa,GAAGT,SAAS,CAAIU,MAAM,IAAM;IAC9C,MAAMC,QAAQ,GAAGD,MAAM,CAAEH,WAAY,CAAC,CAACK,kBAAkB,CAAC,CAAC;IAC3D,MAAM;MAAEC,OAAO;MAAEC,eAAe;MAAEC;IAAY,CAAC,GAAGL,MAAM,CAAEP,SAAU,CAAC;IACrE,MAAMa,kBAAkB,GAAGD,WAAW,CAAE,UAAW,CAAC;IACpD,MAAME,iBAAiB,GAAGJ,OAAO,CAAE,MAAM,EAAE,UAAW,CAAC,GACpDC,eAAe,CAAE,MAAM,EAAE,MAAO,CAAC,EAAEI,gBAAgB,GACnDC,SAAS;IACZ,MAAMC,eAAe,GAAGH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jC,CAAC;AAEd;AAEA,eAAe9B,kBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["__","useSelect","PanelBody","store","coreStore","useState","useEffect","HierarchicalTermSelector","editorStore","jsx","_jsx","jsxs","_jsxs","MaybeCategoryPanel","hasNoCategory","select","postType","getCurrentPostType","canUser","getEntityRecord","getTaxonomy","categoriesTaxonomy","defaultCategoryId","default_category","undefined","defaultCategory","postTypeSupportsCategories","types","some","type","categories","getEditedPostAttribute","rest_base","length","id","shouldShowPanel","setShouldShowPanel","panelBodyTitle","className","children","initialOpen","title","slug"],"sources":["@wordpress/editor/src/components/post-publish-panel/maybe-category-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useState, useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport HierarchicalTermSelector from '../post-taxonomies/hierarchical-term-selector';\nimport { store as editorStore } from '../../store';\n\nfunction MaybeCategoryPanel() {\n\tconst hasNoCategory = useSelect( ( select ) => {\n\t\tconst postType = select( editorStore ).getCurrentPostType();\n\t\tconst { canUser, getEntityRecord, getTaxonomy } = select( coreStore );\n\t\tconst categoriesTaxonomy = getTaxonomy( 'category' );\n\t\tconst defaultCategoryId = canUser( 'read', 'settings' )\n\t\t\t? getEntityRecord( 'root', 'site' )?.default_category\n\t\t\t: undefined;\n\t\tconst defaultCategory = defaultCategoryId\n\t\t\t? getEntityRecord( 'taxonomy', 'category', defaultCategoryId )\n\t\t\t: undefined;\n\t\tconst postTypeSupportsCategories =\n\t\t\tcategoriesTaxonomy &&\n\t\t\tcategoriesTaxonomy.types.some( ( type ) => type === postType );\n\t\tconst categories =\n\t\t\tcategoriesTaxonomy &&\n\t\t\tselect( editorStore ).getEditedPostAttribute(\n\t\t\t\tcategoriesTaxonomy.rest_base\n\t\t\t);\n\n\t\t// This boolean should return true if everything is loaded\n\t\t// ( categoriesTaxonomy, defaultCategory )\n\t\t// and the post has not been assigned a category different than \"uncategorized\".\n\t\treturn (\n\t\t\t!! categoriesTaxonomy &&\n\t\t\t!! defaultCategory &&\n\t\t\tpostTypeSupportsCategories &&\n\t\t\t( categories?.length === 0 ||\n\t\t\t\t( categories?.length === 1 &&\n\t\t\t\t\tdefaultCategory?.id === categories[ 0 ] ) )\n\t\t);\n\t}, [] );\n\tconst [ shouldShowPanel, setShouldShowPanel ] = useState( false );\n\tuseEffect( () => {\n\t\t// We use state to avoid hiding the panel if the user edits the categories\n\t\t// and adds one within the panel itself (while visible).\n\t\tif ( hasNoCategory ) {\n\t\t\tsetShouldShowPanel( true );\n\t\t}\n\t}, [ hasNoCategory ] );\n\n\tif ( ! shouldShowPanel ) {\n\t\treturn null;\n\t}\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'Assign a category' ) }\n\t\t</span>,\n\t];\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<HierarchicalTermSelector slug=\"category\" />\n\t\t</PanelBody>\n\t);\n}\n\nexport default MaybeCategoryPanel;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,SAAS,QAAQ,uBAAuB;AACjD,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;;AAExD;AACA;AACA;AACA,OAAOC,wBAAwB,MAAM,+CAA+C;AACpF,SAASJ,KAAK,IAAIK,WAAW,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,I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,EAAG;MACpBsB,kBAAkB,CAAE,IAAK,CAAC;IAC3B;EACD,CAAC,EAAE,CAAEtB,aAAa,CAAG,CAAC;EAEtB,IAAK,CAAEqB,eAAe,EAAG;IACxB,OAAO,IAAI;EACZ;EAEA,MAAME,cAAc,GAAG,CACtBrC,EAAE,CAAE,aAAc,CAAC,eACnBU,IAAA;IAAM4B,SAAS,EAAC,iCAAiC;IAAAC,QAAA,EAC9CvC,EAAE,CAAE,mBAAoB;EAAC,GAD0B,OAEhD,CAAC,CACP;EAED,oBACCY,KAAA,CAACV,SAAS;IAACsC,WAAW,EAAG,KAAO;IAACC,KAAK,EAAGJ,cAAgB;IAAAE,QAAA,gBACxD7B,IAAA;MAAA6B,QAAA,EACGvC,EAAE,CACH,oHACD;IAAC,CACC,CAAC,eACJU,IAAA,CAACH,wBAAwB;MAACmC,IAAI,EAAC;IAAU,CAAE,CAAC;EAAA,CAClC,CAAC;AAEd;AAEA,eAAe7B,kBAAkB","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -12,6 +11,8 @@ import { store as coreStore } from '@wordpress/core-data';
12
11
  */
13
12
  import { POST_FORMATS } from '../post-format';
14
13
  import { store as editorStore } from '../../store';
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ import { jsxs as _jsxs } from "react/jsx-runtime";
15
16
  const getSuggestion = (supportedFormats, suggestedPostFormat) => {
16
17
  const formats = POST_FORMATS.filter(format => supportedFormats?.includes(format.id));
17
18
  return formats.find(format => format.id === suggestedPostFormat);
@@ -20,10 +21,11 @@ const PostFormatSuggestion = ({
20
21
  suggestedPostFormat,
21
22
  suggestionText,
22
23
  onUpdatePostFormat
23
- }) => createElement(Button, {
24
+ }) => /*#__PURE__*/_jsx(Button, {
24
25
  variant: "link",
25
- onClick: () => onUpdatePostFormat(suggestedPostFormat)
26
- }, suggestionText);
26
+ onClick: () => onUpdatePostFormat(suggestedPostFormat),
27
+ children: suggestionText
28
+ });
27
29
  export default function PostFormatPanel() {
28
30
  const {
29
31
  currentPostFormat,
@@ -46,21 +48,26 @@ export default function PostFormatPanel() {
46
48
  const onUpdatePostFormat = format => editPost({
47
49
  format
48
50
  });
49
- const panelBodyTitle = [__('Suggestion:'), createElement("span", {
51
+ const panelBodyTitle = [__('Suggestion:'), /*#__PURE__*/_jsx("span", {
50
52
  className: "editor-post-publish-panel__link",
51
- key: "label"
52
- }, __('Use a post format'))];
53
+ children: __('Use a post format')
54
+ }, "label")];
53
55
  if (!suggestion || suggestion.id === currentPostFormat) {
54
56
  return null;
55
57
  }
56
- return createElement(PanelBody, {
58
+ return /*#__PURE__*/_jsxs(PanelBody, {
57
59
  initialOpen: false,
58
- title: panelBodyTitle
59
- }, createElement("p", null, __('Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.')), createElement("p", null, createElement(PostFormatSuggestion, {
60
- onUpdatePostFormat: onUpdatePostFormat,
61
- suggestedPostFormat: suggestion.id,
62
- suggestionText: sprintf( /* translators: %s: post format */
63
- __('Apply the "%1$s" format.'), suggestion.caption)
64
- })));
60
+ title: panelBodyTitle,
61
+ children: [/*#__PURE__*/_jsx("p", {
62
+ children: __('Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.')
63
+ }), /*#__PURE__*/_jsx("p", {
64
+ children: /*#__PURE__*/_jsx(PostFormatSuggestion, {
65
+ onUpdatePostFormat: onUpdatePostFormat,
66
+ suggestedPostFormat: suggestion.id,
67
+ suggestionText: sprintf( /* translators: %s: post format */
68
+ __('Apply the "%1$s" format.'), suggestion.caption)
69
+ })
70
+ })]
71
+ });
65
72
  }
66
73
  //# sourceMappingURL=maybe-post-format-panel.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Button","PanelBody","useDispatch","useSelect","__","sprintf","store","coreStore","POST_FORMATS","editorStore","getSuggestion","supportedFormats","suggestedPostFormat","formats","filter","format","includes","id","find","PostFormatSuggestion","suggestionText","onUpdatePostFormat","createElement","variant","onClick","PostFormatPanel","currentPostFormat","suggestion","select","_select$getThemeSuppo","getEditedPostAttribute","getSuggestedPostFormat","getThemeSupports","editPost","panelBodyTitle","className","key","initialOpen","title","caption"],"sources":["@wordpress/editor/src/components/post-publish-panel/maybe-post-format-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button, PanelBody } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { POST_FORMATS } from '../post-format';\nimport { store as editorStore } from '../../store';\n\nconst getSuggestion = ( supportedFormats, suggestedPostFormat ) => {\n\tconst formats = POST_FORMATS.filter( ( format ) =>\n\t\tsupportedFormats?.includes( format.id )\n\t);\n\treturn formats.find( ( format ) => format.id === suggestedPostFormat );\n};\n\nconst PostFormatSuggestion = ( {\n\tsuggestedPostFormat,\n\tsuggestionText,\n\tonUpdatePostFormat,\n} ) => (\n\t<Button\n\t\tvariant=\"link\"\n\t\tonClick={ () => onUpdatePostFormat( suggestedPostFormat ) }\n\t>\n\t\t{ suggestionText }\n\t</Button>\n);\n\nexport default function PostFormatPanel() {\n\tconst { currentPostFormat, suggestion } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, getSuggestedPostFormat } =\n\t\t\tselect( editorStore );\n\t\tconst supportedFormats =\n\t\t\tselect( coreStore ).getThemeSupports().formats ?? [];\n\t\treturn {\n\t\t\tcurrentPostFormat: getEditedPostAttribute( 'format' ),\n\t\t\tsuggestion: getSuggestion(\n\t\t\t\tsupportedFormats,\n\t\t\t\tgetSuggestedPostFormat()\n\t\t\t),\n\t\t};\n\t}, [] );\n\n\tconst { editPost } = useDispatch( editorStore );\n\n\tconst onUpdatePostFormat = ( format ) => editPost( { format } );\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'Use a post format' ) }\n\t\t</span>,\n\t];\n\n\tif ( ! suggestion || suggestion.id === currentPostFormat ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<PostFormatSuggestion\n\t\t\t\t\tonUpdatePostFormat={ onUpdatePostFormat }\n\t\t\t\t\tsuggestedPostFormat={ suggestion.id }\n\t\t\t\t\tsuggestionText={ sprintf(\n\t\t\t\t\t\t/* translators: %s: post format */\n\t\t\t\t\t\t__( 'Apply the \"%1$s\" format.' ),\n\t\t\t\t\t\tsuggestion.caption\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</p>\n\t\t</PanelBody>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,MAAM,EAAEC,SAAS,QAAQ,uBAAuB;AACzD,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASF,KAAK,IAAIG,WAAW,QAAQ,aAAa;AAElD,MAAMC,aAAa,GAAGA,CAAEC,gBAAgB,EAAEC,mBAAmB,KAAM;EAClE,MAAMC,OAAO,GAAGL,YAAY,CAACM,MAAM,CAAIC,MAAM,IAC5CJ,gBAAgB,EAAEK,QAAQ,CAAED,MAAM,CAACE,EAAG,CACvC,CAAC;EACD,OAAOJ,OAAO,CAACK,IAAI,CAAIH,MAAM,IAAMA,MAAM,CAACE,EAAE,KAAKL,mBAAoB,CAAC;AACvE,CAAC;AAED,MAAMO,oBAAoB,GAAGA,CAAE;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Z,aAAA,YACGlB,EAAE,CACH,+IACD,CACE,CAAC,EACJkB,aAAA,YACCA,aAAA,CAACH,oBAAoB;IACpBE,kBAAkB,EAAGA,kBAAoB;IACzCT,mBAAmB,EAAGe,UAAU,CAACV,EAAI;IACrCG,cAAc,EAAGf,OAAO,EACvB;IACAD,EAAE,CAAE,0BAA2B,CAAC,EAChCuB,UAAU,CAACY,OACZ;EAAG,CACH,CACC,CACO,CAAC;AAEd","ignoreList":[]}
1
+ {"version":3,"names":["Button","PanelBody","useDispatch","useSelect","__","sprintf","store","coreStore","POST_FORMATS","editorStore","jsx","_jsx","jsxs","_jsxs","getSuggestion","supportedFormats","suggestedPostFormat","formats","filter","format","includes","id","find","PostFormatSuggestion","suggestionText","onUpdatePostFormat","variant","onClick","children","PostFormatPanel","currentPostFormat","suggestion","select","_select$getThemeSuppo","getEditedPostAttribute","getSuggestedPostFormat","getThemeSupports","editPost","panelBodyTitle","className","initialOpen","title","caption"],"sources":["@wordpress/editor/src/components/post-publish-panel/maybe-post-format-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button, PanelBody } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { POST_FORMATS } from '../post-format';\nimport { store as editorStore } from '../../store';\n\nconst getSuggestion = ( supportedFormats, suggestedPostFormat ) => {\n\tconst formats = POST_FORMATS.filter( ( format ) =>\n\t\tsupportedFormats?.includes( format.id )\n\t);\n\treturn formats.find( ( format ) => format.id === suggestedPostFormat );\n};\n\nconst PostFormatSuggestion = ( {\n\tsuggestedPostFormat,\n\tsuggestionText,\n\tonUpdatePostFormat,\n} ) => (\n\t<Button\n\t\tvariant=\"link\"\n\t\tonClick={ () => onUpdatePostFormat( suggestedPostFormat ) }\n\t>\n\t\t{ suggestionText }\n\t</Button>\n);\n\nexport default function PostFormatPanel() {\n\tconst { currentPostFormat, suggestion } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, getSuggestedPostFormat } =\n\t\t\tselect( editorStore );\n\t\tconst supportedFormats =\n\t\t\tselect( coreStore ).getThemeSupports().formats ?? [];\n\t\treturn {\n\t\t\tcurrentPostFormat: getEditedPostAttribute( 'format' ),\n\t\t\tsuggestion: getSuggestion(\n\t\t\t\tsupportedFormats,\n\t\t\t\tgetSuggestedPostFormat()\n\t\t\t),\n\t\t};\n\t}, [] );\n\n\tconst { editPost } = useDispatch( editorStore );\n\n\tconst onUpdatePostFormat = ( format ) => editPost( { format } );\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'Use a post format' ) }\n\t\t</span>,\n\t];\n\n\tif ( ! suggestion || suggestion.id === currentPostFormat ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<PostFormatSuggestion\n\t\t\t\t\tonUpdatePostFormat={ onUpdatePostFormat }\n\t\t\t\t\tsuggestedPostFormat={ suggestion.id }\n\t\t\t\t\tsuggestionText={ sprintf(\n\t\t\t\t\t\t/* translators: %s: post format */\n\t\t\t\t\t\t__( 'Apply the \"%1$s\" format.' ),\n\t\t\t\t\t\tsuggestion.caption\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</p>\n\t\t</PanelBody>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,EAAEC,SAAS,QAAQ,uBAAuB;AACzD,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,KAA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CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,MAAM;IAAEE;EAAS,CAAC,GAAGnC,WAAW,CAAEO,WAAY,CAAC;EAE/C,MAAMgB,kBAAkB,GAAKN,MAAM,IAAMkB,QAAQ,CAAE;IAAElB;EAAO,CAAE,CAAC;EAE/D,MAAMmB,cAAc,GAAG,CACtBlC,EAAE,CAAE,aAAc,CAAC,eACnBO,IAAA;IAAM4B,SAAS,EAAC,iCAAiC;IAAAX,QAAA,EAC9CxB,EAAE,CAAE,mBAAoB;EAAC,GAD0B,OAEhD,CAAC,CACP;EAED,IAAK,CAAE2B,UAAU,IAAIA,UAAU,CAACV,EAAE,KAAKS,iBAAiB,EAAG;IAC1D,OAAO,IAAI;EACZ;EAEA,oBACCjB,KAAA,CAACZ,SAAS;IAACuC,WAAW,EAAG,KAAO;IAACC,KAAK,EAAGH,cAAgB;IAAAV,QAAA,gBACxDjB,IAAA;MAAAiB,QAAA,EACGxB,EAAE,CACH,+IACD;IAAC,CACC,CAAC,eACJO,IAAA;MAAAiB,QAAA,eACCjB,IAAA,CAACY,oBAAoB;QACpBE,kBAAkB,EAAGA,kBAAoB;QACzCT,mBAAmB,EAAGe,UAAU,CAACV,EAAI;QACrCG,cAAc,EAAGnB,OAAO,EACvB;QACAD,EAAE,CAAE,0BAA2B,CAAC,EAChC2B,UAAU,CAACW,OACZ;MAAG,CACH;IAAC,CACA,CAAC;EAAA,CACM,CAAC;AAEd","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -13,17 +12,22 @@ import { store as coreStore } from '@wordpress/core-data';
13
12
  */
14
13
  import FlatTermSelector from '../post-taxonomies/flat-term-selector';
15
14
  import { store as editorStore } from '../../store';
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ import { jsxs as _jsxs } from "react/jsx-runtime";
16
17
  const TagsPanel = () => {
17
- const panelBodyTitle = [__('Suggestion:'), createElement("span", {
18
+ const panelBodyTitle = [__('Suggestion:'), /*#__PURE__*/_jsx("span", {
18
19
  className: "editor-post-publish-panel__link",
19
- key: "label"
20
- }, __('Add tags'))];
21
- return createElement(PanelBody, {
20
+ children: __('Add tags')
21
+ }, "label")];
22
+ return /*#__PURE__*/_jsxs(PanelBody, {
22
23
  initialOpen: false,
23
- title: panelBodyTitle
24
- }, createElement("p", null, __('Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.')), createElement(FlatTermSelector, {
25
- slug: 'post_tag'
26
- }));
24
+ title: panelBodyTitle,
25
+ children: [/*#__PURE__*/_jsx("p", {
26
+ children: __('Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.')
27
+ }), /*#__PURE__*/_jsx(FlatTermSelector, {
28
+ slug: "post_tag"
29
+ })]
30
+ });
27
31
  };
28
32
  const MaybeTagsPanel = () => {
29
33
  const {
@@ -56,7 +60,7 @@ const MaybeTagsPanel = () => {
56
60
  * more than one tag.
57
61
  */
58
62
  if (!hadTagsWhenOpeningThePanel) {
59
- return createElement(TagsPanel, null);
63
+ return /*#__PURE__*/_jsx(TagsPanel, {});
60
64
  }
61
65
  return null;
62
66
  };
@@ -1 +1 @@
1
- {"version":3,"names":["__","useState","useSelect","PanelBody","store","coreStore","FlatTermSelector","editorStore","TagsPanel","panelBodyTitle","createElement","className","key","initialOpen","title","slug","MaybeTagsPanel","hasTags","isPostTypeSupported","select","postType","getCurrentPostType","tagsTaxonomy","getTaxonomy","_isPostTypeSupported","types","includes","areTagsFetched","undefined","tags","getEditedPostAttribute","rest_base","length","hadTagsWhenOpeningThePanel"],"sources":["@wordpress/editor/src/components/post-publish-panel/maybe-tags-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport FlatTermSelector from '../post-taxonomies/flat-term-selector';\nimport { store as editorStore } from '../../store';\n\nconst TagsPanel = () => {\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'Add tags' ) }\n\t\t</span>,\n\t];\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<FlatTermSelector slug={ 'post_tag' } />\n\t\t</PanelBody>\n\t);\n};\n\nconst MaybeTagsPanel = () => {\n\tconst { hasTags, isPostTypeSupported } = useSelect( ( select ) => {\n\t\tconst postType = select( editorStore ).getCurrentPostType();\n\t\tconst tagsTaxonomy = select( coreStore ).getTaxonomy( 'post_tag' );\n\t\tconst _isPostTypeSupported = tagsTaxonomy?.types?.includes( postType );\n\t\tconst areTagsFetched = tagsTaxonomy !== undefined;\n\t\tconst tags =\n\t\t\ttagsTaxonomy &&\n\t\t\tselect( editorStore ).getEditedPostAttribute(\n\t\t\t\ttagsTaxonomy.rest_base\n\t\t\t);\n\t\treturn {\n\t\t\thasTags: !! tags?.length,\n\t\t\tisPostTypeSupported: areTagsFetched && _isPostTypeSupported,\n\t\t};\n\t}, [] );\n\tconst [ hadTagsWhenOpeningThePanel ] = useState( hasTags );\n\n\tif ( ! isPostTypeSupported ) {\n\t\treturn null;\n\t}\n\n\t/*\n\t * We only want to show the tag panel if the post didn't have\n\t * any tags when the user hit the Publish button.\n\t *\n\t * We can't use the prop.hasTags because it'll change to true\n\t * if the user adds a new tag within the pre-publish panel.\n\t * This would force a re-render and a new prop.hasTags check,\n\t * hiding this panel and keeping the user from adding\n\t * more than one tag.\n\t */\n\tif ( ! hadTagsWhenOpeningThePanel ) {\n\t\treturn <TagsPanel />;\n\t}\n\n\treturn null;\n};\n\nexport default MaybeTagsPan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AACS,SACd,CAAC;IACF,OAAO;MACNd,OAAO,EAAE,CAAC,CAAEY,IAAI,EAAEG,MAAM;MACxBd,mBAAmB,EAAES,cAAc,IAAIH;IACxC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,MAAM,CAAES,0BAA0B,CAAE,GAAGhC,QAAQ,CAAEgB,OAAQ,CAAC;EAE1D,IAAK,CAAEC,mBAAmB,EAAG;IAC5B,OAAO,IAAI;EACZ;;EAEA;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACC,IAAK,CAAEe,0BAA0B,EAAG;IACnC,OAAOvB,aAAA,CAACF,SAAS,MAAE,CAAC;EACrB;EAEA,OAAO,IAAI;AACZ,CAAC;AAED,eAAeQ,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["__","useState","useSelect","PanelBody","store","coreStore","FlatTermSelector","editorStore","jsx","_jsx","jsxs","_jsxs","TagsPanel","panelBodyTitle","className","children","initialOpen","title","slug","MaybeTagsPanel","hasTags","isPostTypeSupported","select","postType","getCurrentPostType","tagsTaxonomy","getTaxonomy","_isPostTypeSupported","types","includes","areTagsFetched","undefined","tags","getEditedPostAttribute","rest_base","length","hadTagsWhenOpeningThePanel"],"sources":["@wordpress/editor/src/components/post-publish-panel/maybe-tags-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport FlatTermSelector from '../post-taxonomies/flat-term-selector';\nimport { store as editorStore } from '../../store';\n\nconst TagsPanel = () => {\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'Add tags' ) }\n\t\t</span>,\n\t];\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<FlatTermSelector slug=\"post_tag\" />\n\t\t</PanelBody>\n\t);\n};\n\nconst MaybeTagsPanel = () => {\n\tconst { hasTags, isPostTypeSupported } = useSelect( ( select ) => {\n\t\tconst postType = select( editorStore ).getCurrentPostType();\n\t\tconst tagsTaxonomy = select( coreStore ).getTaxonomy( 'post_tag' );\n\t\tconst _isPostTypeSupported = tagsTaxonomy?.types?.includes( postType );\n\t\tconst areTagsFetched = tagsTaxonomy !== undefined;\n\t\tconst tags =\n\t\t\ttagsTaxonomy &&\n\t\t\tselect( editorStore ).getEditedPostAttribute(\n\t\t\t\ttagsTaxonomy.rest_base\n\t\t\t);\n\t\treturn {\n\t\t\thasTags: !! tags?.length,\n\t\t\tisPostTypeSupported: areTagsFetched && _isPostTypeSupported,\n\t\t};\n\t}, [] );\n\tconst [ hadTagsWhenOpeningThePanel ] = useState( hasTags );\n\n\tif ( ! isPostTypeSupported ) {\n\t\treturn null;\n\t}\n\n\t/*\n\t * We only want to show the tag panel if the post didn't have\n\t * any tags when the user hit the Publish button.\n\t *\n\t * We can't use the prop.hasTags because it'll change to true\n\t * if the user adds a new tag within the pre-publish panel.\n\t * This would force a re-render and a new prop.hasTags check,\n\t * hiding this panel and keeping the user from adding\n\t * more than one tag.\n\t */\n\tif ( ! hadTagsWhenOpeningThePanel ) {\n\t\treturn <TagsPanel />;\n\t}\n\n\treturn null;\n};\n\nexport default MaybeTagsPanel;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,SAAS,QAAQ,uBAAuB;AACjD,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,OAA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EACF,CAAC,EAAE,EAAG,CAAC;EACP,MAAM,CAAES,0BAA0B,CAAE,GAAGnC,QAAQ,CAAEmB,OAAQ,CAAC;EAE1D,IAAK,CAAEC,mBAAmB,EAAG;IAC5B,OAAO,IAAI;EACZ;;EAEA;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACC,IAAK,CAAEe,0BAA0B,EAAG;IACnC,oBAAO3B,IAAA,CAACG,SAAS,IAAE,CAAC;EACrB;EAEA,OAAO,IAAI;AACZ,CAAC;AAED,eAAeO,cAAc","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -13,6 +12,8 @@ import { isBlobURL } from '@wordpress/blob';
13
12
  * Internal dependencies
14
13
  */
15
14
  import { store as editorStore } from '../../store';
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ import { jsxs as _jsxs } from "react/jsx-runtime";
16
17
  function flattenBlocks(blocks) {
17
18
  const result = [];
18
19
  blocks.forEach(block => {
@@ -25,7 +26,7 @@ function Image(block) {
25
26
  const {
26
27
  selectBlock
27
28
  } = useDispatch(blockEditorStore);
28
- return createElement(motion.img, {
29
+ return /*#__PURE__*/_jsx(motion.img, {
29
30
  tabIndex: 0,
30
31
  role: "button",
31
32
  "aria-label": __('Select image block.'),
@@ -38,7 +39,6 @@ function Image(block) {
38
39
  event.preventDefault();
39
40
  }
40
41
  },
41
- key: block.clientId,
42
42
  alt: block.attributes.alt,
43
43
  src: block.attributes.url,
44
44
  animate: {
@@ -58,7 +58,7 @@ function Image(block) {
58
58
  whileHover: {
59
59
  scale: 1.08
60
60
  }
61
- });
61
+ }, block.clientId);
62
62
  }
63
63
  export default function PostFormatPanel() {
64
64
  const [isUploading, setIsUploading] = useState(false);
@@ -76,10 +76,10 @@ export default function PostFormatPanel() {
76
76
  if (!mediaUpload || !externalImages.length) {
77
77
  return null;
78
78
  }
79
- const panelBodyTitle = [__('Suggestion:'), createElement("span", {
79
+ const panelBodyTitle = [__('Suggestion:'), /*#__PURE__*/_jsx("span", {
80
80
  className: "editor-post-publish-panel__link",
81
- key: "label"
82
- }, __('External media'))];
81
+ children: __('External media')
82
+ }, "label")];
83
83
  function uploadImages() {
84
84
  setIsUploading(true);
85
85
  Promise.all(externalImages.map(image => window.fetch(image.attributes.url.includes('?') ? image.attributes.url : image.attributes.url + '?').then(response => response.blob()).then(blob => new Promise((resolve, reject) => {
@@ -103,23 +103,29 @@ export default function PostFormatPanel() {
103
103
  setIsUploading(false);
104
104
  });
105
105
  }
106
- return createElement(PanelBody, {
106
+ return /*#__PURE__*/_jsxs(PanelBody, {
107
107
  initialOpen: true,
108
- title: panelBodyTitle
109
- }, createElement("p", null, __('Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.')), createElement("div", {
110
- style: {
111
- display: 'inline-flex',
112
- flexWrap: 'wrap',
113
- gap: '8px'
114
- }
115
- }, createElement(AnimatePresence, null, externalImages.map(image => {
116
- return createElement(Image, {
117
- key: image.clientId,
118
- ...image
119
- });
120
- })), isUploading ? createElement(Spinner, null) : createElement(Button, {
121
- variant: "primary",
122
- onClick: uploadImages
123
- }, __('Upload'))));
108
+ title: panelBodyTitle,
109
+ children: [/*#__PURE__*/_jsx("p", {
110
+ children: __('Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.')
111
+ }), /*#__PURE__*/_jsxs("div", {
112
+ style: {
113
+ display: 'inline-flex',
114
+ flexWrap: 'wrap',
115
+ gap: '8px'
116
+ },
117
+ children: [/*#__PURE__*/_jsx(AnimatePresence, {
118
+ children: externalImages.map(image => {
119
+ return /*#__PURE__*/_jsx(Image, {
120
+ ...image
121
+ }, image.clientId);
122
+ })
123
+ }), isUploading ? /*#__PURE__*/_jsx(Spinner, {}) : /*#__PURE__*/_jsx(Button, {
124
+ variant: "primary",
125
+ onClick: uploadImages,
126
+ children: __('Upload')
127
+ })]
128
+ })]
129
+ });
124
130
  }
125
131
  //# sourceMappingURL=maybe-upload-media.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["PanelBody","Button","Spinner","__unstableMotion","motion","__unstableAnimatePresence","AnimatePresence","useSelect","useDispatch","__","store","blockEditorStore","useState","isBlobURL","editorStore","flattenBlocks","blocks","result","forEach","block","push","innerBlocks","Image","selectBlock","createElement","img","tabIndex","role","onClick","clientId","onKeyDown","event","key","preventDefault","alt","attributes","src","url","animate","opacity","exit","scale","style","width","height","objectFit","borderRadius","cursor","whileHover","PostFormatPanel","isUploading","setIsUploading","editorBlocks","mediaUpload","select","getEditorBlocks","getSettings","externalImages","filter","name","id","updateBlockAttributes","length","panelBodyTitle","className","uploadImages","Promise","all","map","image","window","fetch","includes","then","response","blob","resolve","reject","filesList","onFileChange","media","onError","finally","initialOpen","title","display","flexWrap","gap","variant"],"sources":["@wordpress/editor/src/components/post-publish-panel/maybe-upload-media.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPanelBody,\n\tButton,\n\tSpinner,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useState } from '@wordpress/element';\nimport { isBlobURL } from '@wordpress/blob';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction flattenBlocks( blocks ) {\n\tconst result = [];\n\n\tblocks.forEach( ( block ) => {\n\t\tresult.push( block );\n\t\tresult.push( ...flattenBlocks( block.innerBlocks ) );\n\t} );\n\n\treturn result;\n}\n\nfunction Image( block ) {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\treturn (\n\t\t<motion.img\n\t\t\ttabIndex={ 0 }\n\t\t\trole=\"button\"\n\t\t\taria-label={ __( 'Select image block.' ) }\n\t\t\tonClick={ () => {\n\t\t\t\tselectBlock( block.clientId );\n\t\t\t} }\n\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\tif ( event.key === 'Enter' || event.key === ' ' ) {\n\t\t\t\t\tselectBlock( block.clientId );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t} }\n\t\t\tkey={ block.clientId }\n\t\t\talt={ block.attributes.alt }\n\t\t\tsrc={ block.attributes.url }\n\t\t\tanimate={ { opacity: 1 } }\n\t\t\texit={ { opacity: 0, scale: 0 } }\n\t\t\tstyle={ {\n\t\t\t\twidth: '36px',\n\t\t\t\theight: '36px',\n\t\t\t\tobjectFit: 'cover',\n\t\t\t\tborderRadius: '2px',\n\t\t\t\tcursor: 'pointer',\n\t\t\t} }\n\t\t\twhileHover={ { scale: 1.08 } }\n\t\t/>\n\t);\n}\n\nexport default function PostFormatPanel() {\n\tconst [ isUploading, setIsUploading ] = useState( false );\n\tconst { editorBlocks, mediaUpload } = useSelect(\n\t\t( select ) => ( {\n\t\t\teditorBlocks: select( editorStore ).getEditorBlocks(),\n\t\t\tmediaUpload: select( blockEditorStore ).getSettings().mediaUpload,\n\t\t} ),\n\t\t[]\n\t);\n\tconst externalImages = flattenBlocks( editorBlocks ).filter(\n\t\t( block ) =>\n\t\t\tblock.name === 'core/image' &&\n\t\t\tblock.attributes.url &&\n\t\t\t! block.attributes.id\n\t);\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\n\tif ( ! mediaUpload || ! externalImages.length ) {\n\t\treturn null;\n\t}\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'External media' ) }\n\t\t</span>,\n\t];\n\n\tfunction uploadImages() {\n\t\tsetIsUploading( true );\n\t\tPromise.all(\n\t\t\texternalImages.map( ( image ) =>\n\t\t\t\twindow\n\t\t\t\t\t.fetch(\n\t\t\t\t\t\timage.attributes.url.includes( '?' )\n\t\t\t\t\t\t\t? image.attributes.url\n\t\t\t\t\t\t\t: image.attributes.url + '?'\n\t\t\t\t\t)\n\t\t\t\t\t.then( ( response ) => response.blob() )\n\t\t\t\t\t.then(\n\t\t\t\t\t\t( blob ) =>\n\t\t\t\t\t\t\tnew Promise( ( resolve, reject ) => {\n\t\t\t\t\t\t\t\tmediaUpload( {\n\t\t\t\t\t\t\t\t\tfilesList: [ blob ],\n\t\t\t\t\t\t\t\t\tonFileChange: ( [ media ] ) => {\n\t\t\t\t\t\t\t\t\t\tif ( isBlobURL( media.url ) ) {\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tupdateBlockAttributes( image.clientId, {\n\t\t\t\t\t\t\t\t\t\t\tid: media.id,\n\t\t\t\t\t\t\t\t\t\t\turl: media.url,\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tonError() {\n\t\t\t\t\t\t\t\t\t\treject();\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)\n\t\t\t)\n\t\t).finally( () => {\n\t\t\tsetIsUploading( false );\n\t\t} );\n\t}\n\n\treturn (\n\t\t<PanelBody initialOpen title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<div\n\t\t\t\tstyle={ {\n\t\t\t\t\tdisplay: 'inline-flex',\n\t\t\t\t\tflexWrap: 'wrap',\n\t\t\t\t\tgap: '8px',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<AnimatePresence>\n\t\t\t\t\t{ externalImages.map( ( image ) => {\n\t\t\t\t\t\treturn <Image key={ image.clientId } { ...image } />;\n\t\t\t\t\t} ) }\n\t\t\t\t</AnimatePresence>\n\t\t\t\t{ isUploading ? (\n\t\t\t\t\t<Spinner />\n\t\t\t\t) : (\n\t\t\t\t\t<Button variant=\"primary\" onClick={ uploadImages }>\n\t\t\t\t\t\t{ __( 'Upload' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</PanelBody>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,SAAS,EACTC,MAAM,EACNC,OAAO,EACPC,gBAAgB,IAAIC,MAAM,EAC1BC,yBAAyB,IAAIC,eAAe,QACtC,uBAAuB;AAC9B,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;AACnE,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SAASH,KAAK,IAAII,WAAW,QAAQ,aAAa;AAElD,SAASC,aAAaA,CAAEC,MAAM,EAAG;EAChC,MAAMC,MAAM,GAAG,EAAE;EAEjBD,MAAM,CAACE,OAAO,CAAIC,KAAK,IAAM;IAC5BF,MAAM,CAACG,IAAI,CAAED,KAAM,CAAC;IACpBF,MAAM,CAACG,IAAI,CAAE,GAAGL,aAAa,CAAEI,KAAK,CAACE,WAAY,CAAE,CAAC;EACrD,CAAE,CAAC;EAEH,OAAOJ,MAAM;AACd;AAEA,SAASK,KAAKA,CAAEH,KAAK,EAAG;EACvB,MAAM;IAAEI;EAAY,CAAC,GAAGf,WAAW,CAAEG,gBAAiB,CAAC;EACvD,OACCa,aAAA,CAACpB,MAAM,CAACqB,GAAG;IACVC,QAAQ,EAAG,CAAG;IACdC,IAAI,EAAC,QAAQ;IACb,cAAalB,EAAE,CAAE,qBAAsB,CAAG;IAC1CmB,OAAO,EAAGA,CAAA,KAAM;MACfL,WAAW,CAAEJ,KAAK,CAACU,QAAS,CAAC;IAC9B,CAAG;IACHC,SAAS,EAAKC,KA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AAA,EAAG;UACTJ,MAAM,CAAC,CAAC;QACT;MACD,CAAE,CAAC;IACJ,CAAE,CACJ,CACF,CACD,CAAC,CAACK,OAAO,CAAE,MAAM;MAChB/B,cAAc,CAAE,KAAM,CAAC;IACxB,CAAE,CAAC;EACJ;EAEA,OACC3B,aAAA,CAACxB,SAAS;IAACmF,WAAW;IAACC,KAAK,EAAGrB;EAAgB,GAC9CvC,aAAA,YACGf,EAAE,CACH,8IACD,CACE,CAAC,EACJe,aAAA;IACCkB,KAAK,EAAG;MACP2C,OAAO,EAAE,aAAa;MACtBC,QAAQ,EAAE,MAAM;MAChBC,GAAG,EAAE;IACN;EAAG,GAEH/D,aAAA,CAAClB,eAAe,QACbmD,cAAc,CAACW,GAAG,CAAIC,KAAK,IAAM;IAClC,OAAO7C,aAAA,CAACF,KAAK;MAACU,GAAG,EAAGqC,KAAK,CAACxC,QAAU;MAAA,GAAMwC;IAAK,CAAI,CAAC;EACrD,CAAE,CACc,CAAC,EAChBnB,WAAW,GACZ1B,aAAA,CAACtB,OAAO,MAAE,CAAC,GAEXsB,aAAA,CAACvB,MAAM;IAACuF,OAAO,EAAC,SAAS;IAAC5D,OAAO,EAAGqC;EAAc,GAC/CxD,EAAE,CAAE,QAAS,CACR,CAEL,CACK,CAAC;AAEd","ignoreList":[]}
1
+ {"version":3,"names":["PanelBody","Button","Spinner","__unstableMotion","motion","__unstableAnimatePresence","AnimatePresence","useSelect","useDispatch","__","store","blockEditorStore","useState","isBlobURL","editorStore","jsx","_jsx","jsxs","_jsxs","flattenBlocks","blocks","result","forEach","block","push","innerBlocks","Image","selectBlock","img","tabIndex","role","onClick","clientId","onKeyDown","event","key","preventDefault","alt","attributes","src","url","animate","opacity","exit","scale","style","width","height","objectFit","borderRadius","cursor","whileHover","PostFormatPanel","isUploading","setIsUploading","editorBlocks","mediaUpload","select","getEditorBlocks","getSettings","externalImages","filter","name","id","updateBlockAttributes","length","panelBodyTitle","className","children","uploadImages","Promise","all","map","image","window","fetch","includes","then","response","blob","resolve","reject","filesList","onFileChange","media","onError","finally","initialOpen","title","display","flexWrap","gap","variant"],"sources":["@wordpress/editor/src/components/post-publish-panel/maybe-upload-media.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPanelBody,\n\tButton,\n\tSpinner,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useState } from '@wordpress/element';\nimport { isBlobURL } from '@wordpress/blob';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction flattenBlocks( blocks ) {\n\tconst result = [];\n\n\tblocks.forEach( ( block ) => {\n\t\tresult.push( block );\n\t\tresult.push( ...flattenBlocks( block.innerBlocks ) );\n\t} );\n\n\treturn result;\n}\n\nfunction Image( block ) {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\treturn (\n\t\t<motion.img\n\t\t\ttabIndex={ 0 }\n\t\t\trole=\"button\"\n\t\t\taria-label={ __( 'Select image block.' ) }\n\t\t\tonClick={ () => {\n\t\t\t\tselectBlock( block.clientId );\n\t\t\t} }\n\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\tif ( event.key === 'Enter' || event.key === ' ' ) {\n\t\t\t\t\tselectBlock( block.clientId );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t} }\n\t\t\tkey={ block.clientId }\n\t\t\talt={ block.attributes.alt }\n\t\t\tsrc={ block.attributes.url }\n\t\t\tanimate={ { opacity: 1 } }\n\t\t\texit={ { opacity: 0, scale: 0 } }\n\t\t\tstyle={ {\n\t\t\t\twidth: '36px',\n\t\t\t\theight: '36px',\n\t\t\t\tobjectFit: 'cover',\n\t\t\t\tborderRadius: '2px',\n\t\t\t\tcursor: 'pointer',\n\t\t\t} }\n\t\t\twhileHover={ { scale: 1.08 } }\n\t\t/>\n\t);\n}\n\nexport default function PostFormatPanel() {\n\tconst [ isUploading, setIsUploading ] = useState( false );\n\tconst { editorBlocks, mediaUpload } = useSelect(\n\t\t( select ) => ( {\n\t\t\teditorBlocks: select( editorStore ).getEditorBlocks(),\n\t\t\tmediaUpload: select( blockEditorStore ).getSettings().mediaUpload,\n\t\t} ),\n\t\t[]\n\t);\n\tconst externalImages = flattenBlocks( editorBlocks ).filter(\n\t\t( block ) =>\n\t\t\tblock.name === 'core/image' &&\n\t\t\tblock.attributes.url &&\n\t\t\t! block.attributes.id\n\t);\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\n\tif ( ! mediaUpload || ! externalImages.length ) {\n\t\treturn null;\n\t}\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'External media' ) }\n\t\t</span>,\n\t];\n\n\tfunction uploadImages() {\n\t\tsetIsUploading( true );\n\t\tPromise.all(\n\t\t\texternalImages.map( ( image ) =>\n\t\t\t\twindow\n\t\t\t\t\t.fetch(\n\t\t\t\t\t\timage.attributes.url.includes( '?' )\n\t\t\t\t\t\t\t? image.attributes.url\n\t\t\t\t\t\t\t: image.attributes.url + '?'\n\t\t\t\t\t)\n\t\t\t\t\t.then( ( response ) => response.blob() )\n\t\t\t\t\t.then(\n\t\t\t\t\t\t( blob ) =>\n\t\t\t\t\t\t\tnew Promise( ( resolve, reject ) => {\n\t\t\t\t\t\t\t\tmediaUpload( {\n\t\t\t\t\t\t\t\t\tfilesList: [ blob ],\n\t\t\t\t\t\t\t\t\tonFileChange: ( [ media ] ) => {\n\t\t\t\t\t\t\t\t\t\tif ( isBlobURL( media.url ) ) {\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tupdateBlockAttributes( image.clientId, {\n\t\t\t\t\t\t\t\t\t\t\tid: media.id,\n\t\t\t\t\t\t\t\t\t\t\turl: media.url,\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tonError() {\n\t\t\t\t\t\t\t\t\t\treject();\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)\n\t\t\t)\n\t\t).finally( () => {\n\t\t\tsetIsUploading( false );\n\t\t} );\n\t}\n\n\treturn (\n\t\t<PanelBody initialOpen title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<div\n\t\t\t\tstyle={ {\n\t\t\t\t\tdisplay: 'inline-flex',\n\t\t\t\t\tflexWrap: 'wrap',\n\t\t\t\t\tgap: '8px',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<AnimatePresence>\n\t\t\t\t\t{ externalImages.map( ( image ) => {\n\t\t\t\t\t\treturn <Image key={ image.clientId } { ...image } />;\n\t\t\t\t\t} ) }\n\t\t\t\t</AnimatePresence>\n\t\t\t\t{ isUploading ? (\n\t\t\t\t\t<Spinner />\n\t\t\t\t) : (\n\t\t\t\t\t<Button variant=\"primary\" onClick={ uploadImages }>\n\t\t\t\t\t\t{ __( 'Upload' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</PanelBody>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,SAAS,EACTC,MAAM,EACNC,OAAO,EACPC,gBAAgB,IAAIC,MAAM,EAC1BC,yBAAyB,IAAIC,eAAe,QACtC,uBAAuB;AAC9B,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,KAAK,IAAIC,gBAAgB,Q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