@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 +1 @@
1
- {"version":3,"names":["_components","require","_data","_i18n","_coreData","_postFormat","_store","getSuggestion","supportedFormats","suggestedPostFormat","formats","POST_FORMATS","filter","format","includes","id","find","PostFormatSuggestion","suggestionText","onUpdatePostFormat","_react","createElement","Button","variant","onClick","PostFormatPanel","currentPostFormat","suggestion","useSelect","select","_select$getThemeSuppo","getEditedPostAttribute","getSuggestedPostFormat","editorStore","coreStore","getThemeSupports","editPost","useDispatch","panelBodyTitle","__","className","key","PanelBody","initialOpen","title","sprintf","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":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAZA;AACA;AACA;;AAMA;AACA;AACA;;AAIA,MAAMM,aAAa,GAAGA,CAAEC,gBAAgB,EAAEC,mBAAmB,KAAM;EAClE,MAAMC,OAAO,GAAGC,wBAAY,CAACC,MAAM,CAAIC,MAAM,IAC5CL,gBAAgB,EAAEM,QAAQ,CAAED,MAAM,CAACE,EAAG,CACvC,CAAC;EACD,OAAOL,OAAO,CAACM,IAAI,CAAIH,MAAM,IAAMA,MAAM,CAACE,EAAE,KAAKN,mBAAoB,CAAC;AACvE,CAAC;AAED,MAAMQ,oBAAoB,GAAGA,CAAE;EAC9BR,mBAAmB;EACnBS,cAAc;EACdC;AACD,CAAC,KACA,IAAAC,MAAA,CAAAC,aAAA,EAACrB,WAAA,CAAAsB,MAAM;EACNC,OAAO,EAAC,MAAM;EACdC,OAAO,EAAGA,CAAA,KAAML,kBAAkB,CAAEV,mBAAoB;AA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AA,CAAAC,aAAA,aACC,IAAAD,MAAA,CAAAC,aAAA,EAACJ,oBAAoB;IACpBE,kBAAkB,EAAGA,kBAAoB;IACzCV,mBAAmB,EAAGkB,UAAU,CAACZ,EAAI;IACrCG,cAAc,EAAG,IAAA2B,aAAO,GACvB;IACA,IAAAN,QAAE,EAAE,0BAA2B,CAAC,EAChCZ,UAAU,CAACmB,OACZ;EAAG,CACH,CACC,CACO,CAAC;AAEd","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_data","_i18n","_coreData","_postFormat","_store","_jsxRuntime","getSuggestion","supportedFormats","suggestedPostFormat","formats","POST_FORMATS","filter","format","includes","id","find","PostFormatSuggestion","suggestionText","onUpdatePostFormat","jsx","Button","variant","onClick","children","PostFormatPanel","currentPostFormat","suggestion","useSelect","select","_select$getThemeSuppo","getEditedPostAttribute","getSuggestedPostFormat","editorStore","coreStore","getThemeSupports","editPost","useDispatch","panelBodyTitle","__","className","jsxs","PanelBody","initialOpen","title","sprintf","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":";;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAKA,IAAAI,WA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M;IAAEI;EAAS,CAAC,GAAG,IAAAC,iBAAW,EAAEJ,YAAY,CAAC;EAE/C,MAAMd,kBAAkB,GAAKN,MAAM,IAAMuB,QAAQ,CAAE;IAAEvB;EAAO,CAAE,CAAC;EAE/D,MAAMyB,cAAc,GAAG,CACtB,IAAAC,QAAE,EAAE,aAAc,CAAC,eACnB,IAAAjC,WAAA,CAAAc,GAAA;IAAMoB,SAAS,EAAC,iCAAiC;IAAAhB,QAAA,EAC9C,IAAAe,QAAE,EAAE,mBAAoB;EAAC,GAD0B,OAEhD,CAAC,CACP;EAED,IAAK,CAAEZ,UAAU,IAAIA,UAAU,CAACZ,EAAE,KAAKW,iBAAiB,EAAG;IAC1D,OAAO,IAAI;EACZ;EAEA,oBACC,IAAApB,WAAA,CAAAmC,IAAA,EAAC1C,WAAA,CAAA2C,SAAS;IAACC,WAAW,EAAG,KAAO;IAACC,KAAK,EAAGN,cAAgB;IAAAd,QAAA,gBACxD,IAAAlB,WAAA,CAAAc,GAAA;MAAAI,QAAA,EACG,IAAAe,QAAE,EACH,+IACD;IAAC,CACC,CAAC,eACJ,IAAAjC,WAAA,CAAAc,GAAA;MAAAI,QAAA,eACC,IAAAlB,WAAA,CAAAc,GAAA,EAACH,oBAAoB;QACpBE,kBAAkB,EAAGA,kBAAoB;QACzCV,mBAAmB,EAAGkB,UAAU,CAACZ,EAAI;QACrCG,cAAc,EAAG,IAAA2B,aAAO,GACvB;QACA,IAAAN,QAAE,EAAE,0BAA2B,CAAC,EAChCZ,UAAU,CAACmB,OACZ;MAAG,CACH;IAAC,CACA,CAAC;EAAA,CACM,CAAC;AAEd","ignoreList":[]}
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _react = require("react");
9
8
  var _i18n = require("@wordpress/i18n");
10
9
  var _element = require("@wordpress/element");
11
10
  var _data = require("@wordpress/data");
@@ -13,6 +12,7 @@ var _components = require("@wordpress/components");
13
12
  var _coreData = require("@wordpress/core-data");
14
13
  var _flatTermSelector = _interopRequireDefault(require("../post-taxonomies/flat-term-selector"));
15
14
  var _store = require("../../store");
15
+ var _jsxRuntime = require("react/jsx-runtime");
16
16
  /**
17
17
  * WordPress dependencies
18
18
  */
@@ -22,16 +22,19 @@ var _store = require("../../store");
22
22
  */
23
23
 
24
24
  const TagsPanel = () => {
25
- const panelBodyTitle = [(0, _i18n.__)('Suggestion:'), (0, _react.createElement)("span", {
25
+ const panelBodyTitle = [(0, _i18n.__)('Suggestion:'), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
26
26
  className: "editor-post-publish-panel__link",
27
- key: "label"
28
- }, (0, _i18n.__)('Add tags'))];
29
- return (0, _react.createElement)(_components.PanelBody, {
27
+ children: (0, _i18n.__)('Add tags')
28
+ }, "label")];
29
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.PanelBody, {
30
30
  initialOpen: false,
31
- title: panelBodyTitle
32
- }, (0, _react.createElement)("p", null, (0, _i18n.__)('Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.')), (0, _react.createElement)(_flatTermSelector.default, {
33
- slug: 'post_tag'
34
- }));
31
+ title: panelBodyTitle,
32
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
33
+ children: (0, _i18n.__)('Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.')
34
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_flatTermSelector.default, {
35
+ slug: "post_tag"
36
+ })]
37
+ });
35
38
  };
36
39
  const MaybeTagsPanel = () => {
37
40
  const {
@@ -64,7 +67,7 @@ const MaybeTagsPanel = () => {
64
67
  * more than one tag.
65
68
  */
66
69
  if (!hadTagsWhenOpeningThePanel) {
67
- return (0, _react.createElement)(TagsPanel, null);
70
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(TagsPanel, {});
68
71
  }
69
72
  return null;
70
73
  };
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_element","_data","_components","_coreData","_flatTermSelector","_interopRequireDefault","_store","TagsPanel","panelBodyTitle","__","_react","createElement","className","key","PanelBody","initialOpen","title","default","slug","MaybeTagsPanel","hasTags","isPostTypeSupported","useSelect","select","postType","editorStore","getCurrentPostType","tagsTaxonomy","coreStore","getTaxonomy","_isPostTypeSupported","types","includes","areTagsFetched","undefined","tags","getEditedPostAttribute","rest_base","length","hadTagsWhenOpeningThePanel","useState","_default","exports"],"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":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AAKA,IAAAK,iBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAbA;AACA;AACA;;AAOA;AACA;AACA;;AAIA,MAAMQ,SAAS,GAAGA,CAAA,KAAM;EACvB,MAAMC,cAAc,GAAG,CACtB,IAAAC,QAAE,EAAE,aAAc,CAAC,EACnB,IAAAC,MAAA,CAAAC,aAAA;IAAMC,SAAS,EAAC,iCAAiC;IAACC,GAAG,EAAC;EAAO,GAC1D,IAAAJ,QAAE,EAAE,UAAW,CACZ,CAAC,CACP;EAED,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAY,SAAS;IAACC,WAAW,EAAG,KAAO;IAACC,KAAK,EAAGR;EAAgB,GACxD,IAAAE,MAAA,CAAAC,aAAA,aACG,IAAAF,QAAE,EACH,wHACD,CACE,CAAC,EACJ,IAAAC,MAAA,CAAAC,aAAA,EAACP,iBAAA,CAAAa,OAAgB;IAACC,IAAI,EAAG;EAAY,CAAE,CAC7B,CAAC;AAEd,CAAC;AAED,MAAMC,cAAc,GAAGA,CAAA,KAAM;EAC5B,MAAM;IAAEC,OAAO;IAAEC;EAAoB,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACjE,MAAMC,QAAQ,GAAGD,MAAM,CAAEE,YAAY,CAAC,CAACC,kBAAkB,CAAC,CAAC;IAC3D,MAAMC,YAAY,GAAGJ,MAAM,CAAEK,eAAU,CAAC,CAACC,WAAW,CAAE,UAAW,CAAC;IAClE,MAAMC,oBAAoB,GAAGH,YAAY,EAAEI,KAAK,EAAEC,QAAQ,CAAER,QAAS,CAAC;IACtE,MAAMS,cAAc,GAAGN,YAAY,KAAKO,SAAS;IACjD,MAAMC,IAAI,GACTR,YAAY,IACZJ,MAAM,CAAEE,YAAY,CAAC,CAACW,sBAAsB,CAC3CT,YAAY,CAACU,SACd,CAAC;IACF,OAAO;MACNjB,OAAO,EAAE,CAAC,CAAEe,IAAI,EAAEG,MAAM;MACxBjB,mBAAmB,EAAEY,cAAc,IAAIH;IACxC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,MAAM,CAAES,0BAA0B,CAAE,GAAG,IAAAC,iBAAQ,EAAEpB,OAAQ,CAAC;EAE1D,IAAK,CAAEC,mBAAmB,EAAG;IAC5B,OAAO,IAAI;EACZ;;EAEA;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACC,IAAK,CAAEkB,0BAA0B,EAAG;IACnC,OAAO,IAAA7B,MAAA,CAAAC,aAAA,EAACJ,SAAS,MAAE,CAAC;EACrB;EAEA,OAAO,IAAI;AACZ,CAAC;AAAC,IAAAkC,QAAA,GAAAC,OAAA,CAAAzB,OAAA,GAEaE,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_element","_data","_components","_coreData","_flatTermSelector","_interopRequireDefault","_store","_jsxRuntime","TagsPanel","panelBodyTitle","__","jsx","className","children","jsxs","PanelBody","initialOpen","title","default","slug","MaybeTagsPanel","hasTags","isPostTypeSupported","useSelect","select","postType","editorStore","getCurrentPostType","tagsTaxonomy","coreStore","getTaxonomy","_isPostTypeSupported","types","includes","areTagsFetched","undefined","tags","getEditedPostAttribute","rest_base","length","hadTagsWhenOpeningThePanel","useState","_default","exports"],"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":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AAKA,IAAAK,iBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAAmD,IAAAQ,WAAA,GAAAR,OAAA;AAbnD;AACA;AACA;;AAOA;AACA;AACA;;AAIA,MAAMS,SAAS,GAAGA,CAAA,KAAM;EACvB,MAAMC,cAAc,GAAG,CACtB,IAAAC,QAAE,EAAE,aAAc,CAAC,eACnB,IAAAH,WAAA,CAAAI,GAAA;IAAMC,SAAS,EAAC,iCAAiC;IAAAC,QAAA,EAC9C,IAAAH,QAAE,EAAE,UAAW;EAAC,GADmC,OAEhD,CAAC,CACP;EAED,oBACC,IAAAH,WAAA,CAAAO,IAAA,EAACZ,WAAA,CAAAa,SAAS;IAACC,WAAW,EAAG,KAAO;IAACC,KAAK,EAAGR,cAAgB;IAAAI,QAAA,gBACxD,IAAAN,WAAA,CAAAI,GAAA;MA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reList":[]}
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = PostFormatPanel;
7
- var _react = require("react");
8
7
  var _components = require("@wordpress/components");
9
8
  var _data = require("@wordpress/data");
10
9
  var _i18n = require("@wordpress/i18n");
@@ -12,6 +11,7 @@ var _blockEditor = require("@wordpress/block-editor");
12
11
  var _element = require("@wordpress/element");
13
12
  var _blob = require("@wordpress/blob");
14
13
  var _store = require("../../store");
14
+ var _jsxRuntime = require("react/jsx-runtime");
15
15
  /**
16
16
  * WordPress dependencies
17
17
  */
@@ -32,7 +32,7 @@ function Image(block) {
32
32
  const {
33
33
  selectBlock
34
34
  } = (0, _data.useDispatch)(_blockEditor.store);
35
- return (0, _react.createElement)(_components.__unstableMotion.img, {
35
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__unstableMotion.img, {
36
36
  tabIndex: 0,
37
37
  role: "button",
38
38
  "aria-label": (0, _i18n.__)('Select image block.'),
@@ -45,7 +45,6 @@ function Image(block) {
45
45
  event.preventDefault();
46
46
  }
47
47
  },
48
- key: block.clientId,
49
48
  alt: block.attributes.alt,
50
49
  src: block.attributes.url,
51
50
  animate: {
@@ -65,7 +64,7 @@ function Image(block) {
65
64
  whileHover: {
66
65
  scale: 1.08
67
66
  }
68
- });
67
+ }, block.clientId);
69
68
  }
70
69
  function PostFormatPanel() {
71
70
  const [isUploading, setIsUploading] = (0, _element.useState)(false);
@@ -83,10 +82,10 @@ function PostFormatPanel() {
83
82
  if (!mediaUpload || !externalImages.length) {
84
83
  return null;
85
84
  }
86
- const panelBodyTitle = [(0, _i18n.__)('Suggestion:'), (0, _react.createElement)("span", {
85
+ const panelBodyTitle = [(0, _i18n.__)('Suggestion:'), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
87
86
  className: "editor-post-publish-panel__link",
88
- key: "label"
89
- }, (0, _i18n.__)('External media'))];
87
+ children: (0, _i18n.__)('External media')
88
+ }, "label")];
90
89
  function uploadImages() {
91
90
  setIsUploading(true);
92
91
  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) => {
@@ -110,23 +109,29 @@ function PostFormatPanel() {
110
109
  setIsUploading(false);
111
110
  });
112
111
  }
113
- return (0, _react.createElement)(_components.PanelBody, {
112
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.PanelBody, {
114
113
  initialOpen: true,
115
- title: panelBodyTitle
116
- }, (0, _react.createElement)("p", null, (0, _i18n.__)('Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.')), (0, _react.createElement)("div", {
117
- style: {
118
- display: 'inline-flex',
119
- flexWrap: 'wrap',
120
- gap: '8px'
121
- }
122
- }, (0, _react.createElement)(_components.__unstableAnimatePresence, null, externalImages.map(image => {
123
- return (0, _react.createElement)(Image, {
124
- key: image.clientId,
125
- ...image
126
- });
127
- })), isUploading ? (0, _react.createElement)(_components.Spinner, null) : (0, _react.createElement)(_components.Button, {
128
- variant: "primary",
129
- onClick: uploadImages
130
- }, (0, _i18n.__)('Upload'))));
114
+ title: panelBodyTitle,
115
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
116
+ children: (0, _i18n.__)('Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.')
117
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
118
+ style: {
119
+ display: 'inline-flex',
120
+ flexWrap: 'wrap',
121
+ gap: '8px'
122
+ },
123
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__unstableAnimatePresence, {
124
+ children: externalImages.map(image => {
125
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(Image, {
126
+ ...image
127
+ }, image.clientId);
128
+ })
129
+ }), isUploading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Spinner, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
130
+ variant: "primary",
131
+ onClick: uploadImages,
132
+ children: (0, _i18n.__)('Upload')
133
+ })]
134
+ })]
135
+ });
131
136
  }
132
137
  //# sourceMappingURL=maybe-upload-media.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_data","_i18n","_blockEditor","_element","_blob","_store","flattenBlocks","blocks","result","forEach","block","push","innerBlocks","Image","selectBlock","useDispatch","blockEditorStore","_react","createElement","__unstableMotion","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","useState","editorBlocks","mediaUpload","useSelect","select","editorStore","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","isBlobURL","onError","finally","PanelBody","initialOpen","title","display","flexWrap","gap","__unstableAnimatePresence","Spinner","Button","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":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAOA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAKA,IAAAM,MAAA,GAAAN,OAAA;AAnBA;AACA;AACA;;AAcA;AACA;AACA;;AAGA,SAASO,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,GAAG,IAAAC,iBAAW,EAAEC,kBAAiB,CAAC;EACvD,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACpB,WAAA,CAAAqB,gBAAM,CAACC,GAAG;IACVC,QAAQ,EAAG,CAAG;IACdC,IAAI,EAAC,QAAQ;IACb,cAAa,IAAAC,QAAE,EAAE,qBAAsB,CAAG;IAC1CC,OAAO,EAAGA,CAAA,KAAM;MACfV,WAAW,CAAEJ,KAAK,CAACe,QAAS,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G,EAAE8C,KAAK,CAAC9C;UACZ,CAAE,CAAC;UACH0C,OAAO,CAAC,CAAC;QACV,CAAC;QACDM,OAAOA,CAAA,EAAG;UACTL,MAAM,CAAC,CAAC;QACT;MACD,CAAE,CAAC;IACJ,CAAE,CACJ,CACF,CACD,CAAC,CAACM,OAAO,CAAE,MAAM;MAChBnC,cAAc,CAAE,KAAM,CAAC;IACxB,CAAE,CAAC;EACJ;EAEA,OACC,IAAA9B,MAAA,CAAAC,aAAA,EAACpB,WAAA,CAAAqF,SAAS;IAACC,WAAW;IAACC,KAAK,EAAGvB;EAAgB,GAC9C,IAAA7C,MAAA,CAAAC,aAAA,aACG,IAAAK,QAAE,EACH,8IACD,CACE,CAAC,EACJ,IAAAN,MAAA,CAAAC,aAAA;IACCoB,KAAK,EAAG;MACPgD,OAAO,EAAE,aAAa;MACtBC,QAAQ,EAAE,MAAM;MAChBC,GAAG,EAAE;IACN;EAAG,GAEH,IAAAvE,MAAA,CAAAC,aAAA,EAACpB,WAAA,CAAA2F,yBAAe,QACbjC,cAAc,CAACW,GAAG,CAAIC,KAAK,IAAM;IAClC,OAAO,IAAAnD,MAAA,CAAAC,aAAA,EAACL,KAAK;MAACe,GAAG,EAAGwC,KAAK,CAAC3C,QAAU;MAAA,GAAM2C;IAAK,CAAI,CAAC;EACrD,CAAE,CACc,CAAC,EAChBtB,WAAW,GACZ,IAAA7B,MAAA,CAAAC,aAAA,EAACpB,WAAA,CAAA4F,OAAO,MAAE,CAAC,GAEX,IAAAzE,MAAA,CAAAC,aAAA,EAACpB,WAAA,CAAA6F,MAAM;IAACC,OAAO,EAAC,SAAS;IAACpE,OAAO,EAAGwC;EAAc,GAC/C,IAAAzC,QAAE,EAAE,QAAS,CACR,CAEL,CACK,CAAC;AAEd","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_data","_i18n","_blockEditor","_element","_blob","_store","_jsxRuntime","flattenBlocks","blocks","result","forEach","block","push","innerBlocks","Image","selectBlock","useDispatch","blockEditorStore","jsx","__unstableMotion","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","useState","editorBlocks","mediaUpload","useSelect","select","editorStore","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","isBlobURL","onError","finally","jsxs","PanelBody","initialOpen","title","display","flexWrap","gap","__unstableAnimatePresence","Spinner","Button","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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AAM,CAAC;IACxB,CAAE,CAAC;EACJ;EAEA,oBACC,IAAAzC,WAAA,CAAA8E,IAAA,EAACtF,WAAA,CAAAuF,SAAS;IAACC,WAAW;IAACC,KAAK,EAAGzB,cAAgB;IAAAE,QAAA,gBAC9C,IAAA1D,WAAA,CAAAY,GAAA;MAAA8C,QAAA,EACG,IAAAzC,QAAE,EACH,8IACD;IAAC,CACC,CAAC,eACJ,IAAAjB,WAAA,CAAA8E,IAAA;MACC9C,KAAK,EAAG;QACPkD,OAAO,EAAE,aAAa;QACtBC,QAAQ,EAAE,MAAM;QAChBC,GAAG,EAAE;MACN,CAAG;MAAA1B,QAAA,gBAEH,IAAA1D,WAAA,CAAAY,GAAA,EAACpB,WAAA,CAAA6F,yBAAe;QAAA3B,QAAA,EACbR,cAAc,CAACY,GAAG,CAAIC,KAAK,IAAM;UAClC,oBAAO,IAAA/D,WAAA,CAAAY,GAAA,EAACJ,KAAK;YAAA,GAA6BuD;UAAK,GAA3BA,KAAK,CAAC5C,QAAyB,CAAC;QACrD,CAAE;MAAC,CACa,CAAC,EAChBqB,WAAW,gBACZ,IAAAxC,WAAA,CAAAY,GAAA,EAACpB,WAAA,CAAA8F,OAAO,IAAE,CAAC,gBAEX,IAAAtF,WAAA,CAAAY,GAAA,EAACpB,WAAA,CAAA+F,MAAM;QAACC,OAAO,EAAC,SAAS;QAACtE,OAAO,EAAGyC,YAAc;QAAAD,QAAA,EAC/C,IAAAzC,QAAE,EAAE,QAAS;MAAC,CACT,CACR;IAAA,CACG,CAAC;EAAA,CACI,CAAC;AAEd","ignoreList":[]}
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _react = require("react");
9
8
  var _components = require("@wordpress/components");
10
9
  var _i18n = require("@wordpress/i18n");
11
10
  var _element = require("@wordpress/element");
@@ -16,6 +15,7 @@ var _compose = require("@wordpress/compose");
16
15
  var _coreData = require("@wordpress/core-data");
17
16
  var _label = _interopRequireDefault(require("../post-schedule/label"));
18
17
  var _store = require("../../store");
18
+ var _jsxRuntime = require("react/jsx-runtime");
19
19
  /**
20
20
  * WordPress dependencies
21
21
  */
@@ -53,10 +53,11 @@ function CopyButton({
53
53
  children
54
54
  }) {
55
55
  const ref = (0, _compose.useCopyToClipboard)(text, onCopy);
56
- return (0, _react.createElement)(_components.Button, {
56
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
57
57
  variant: "secondary",
58
- ref: ref
59
- }, children);
58
+ ref: ref,
59
+ children: children
60
+ });
60
61
  }
61
62
  class PostPublishPanelPostpublish extends _element.Component {
62
63
  constructor() {
@@ -104,40 +105,56 @@ class PostPublishPanelPostpublish extends _element.Component {
104
105
  const addLink = (0, _url.addQueryArgs)('post-new.php', {
105
106
  post_type: post.type
106
107
  });
107
- const postPublishNonLinkHeader = isScheduled ? (0, _react.createElement)(_react.Fragment, null, (0, _i18n.__)('is now scheduled. It will go live on'), ' ', (0, _react.createElement)(_label.default, null), ".") : (0, _i18n.__)('is now live.');
108
- return (0, _react.createElement)("div", {
109
- className: "post-publish-panel__postpublish"
110
- }, (0, _react.createElement)(_components.PanelBody, {
111
- className: "post-publish-panel__postpublish-header"
112
- }, (0, _react.createElement)("a", {
113
- ref: this.postLink,
114
- href: link
115
- }, (0, _htmlEntities.decodeEntities)(post.title) || (0, _i18n.__)('(no title)')), ' ', postPublishNonLinkHeader), (0, _react.createElement)(_components.PanelBody, null, (0, _react.createElement)("p", {
116
- className: "post-publish-panel__postpublish-subheader"
117
- }, (0, _react.createElement)("strong", null, (0, _i18n.__)('What’s next?'))), (0, _react.createElement)("div", {
118
- className: "post-publish-panel__postpublish-post-address-container"
119
- }, (0, _react.createElement)(_components.TextControl, {
120
- __nextHasNoMarginBottom: true,
121
- className: "post-publish-panel__postpublish-post-address",
122
- readOnly: true,
123
- label: (0, _i18n.sprintf)( /* translators: %s: post type singular name */
124
- (0, _i18n.__)('%s address'), postLabel),
125
- value: (0, _url.safeDecodeURIComponent)(link),
126
- onFocus: this.onSelectInput
127
- }), (0, _react.createElement)("div", {
128
- className: "post-publish-panel__postpublish-post-address__copy-button-wrap"
129
- }, (0, _react.createElement)(CopyButton, {
130
- text: link,
131
- onCopy: this.onCopy
132
- }, this.state.showCopyConfirmation ? (0, _i18n.__)('Copied!') : (0, _i18n.__)('Copy')))), (0, _react.createElement)("div", {
133
- className: "post-publish-panel__postpublish-buttons"
134
- }, !isScheduled && (0, _react.createElement)(_components.Button, {
135
- variant: "primary",
136
- href: link
137
- }, viewPostLabel), (0, _react.createElement)(_components.Button, {
138
- variant: isScheduled ? 'primary' : 'secondary',
139
- href: addLink
140
- }, addNewPostLabel))), children);
108
+ const postPublishNonLinkHeader = isScheduled ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
109
+ children: [(0, _i18n.__)('is now scheduled. It will go live on'), ' ', /*#__PURE__*/(0, _jsxRuntime.jsx)(_label.default, {}), "."]
110
+ }) : (0, _i18n.__)('is now live.');
111
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
112
+ className: "post-publish-panel__postpublish",
113
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.PanelBody, {
114
+ className: "post-publish-panel__postpublish-header",
115
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
116
+ ref: this.postLink,
117
+ href: link,
118
+ children: (0, _htmlEntities.decodeEntities)(post.title) || (0, _i18n.__)('(no title)')
119
+ }), ' ', postPublishNonLinkHeader]
120
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.PanelBody, {
121
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
122
+ className: "post-publish-panel__postpublish-subheader",
123
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
124
+ children: (0, _i18n.__)('What’s next?')
125
+ })
126
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
127
+ className: "post-publish-panel__postpublish-post-address-container",
128
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.TextControl, {
129
+ __nextHasNoMarginBottom: true,
130
+ className: "post-publish-panel__postpublish-post-address",
131
+ readOnly: true,
132
+ label: (0, _i18n.sprintf)( /* translators: %s: post type singular name */
133
+ (0, _i18n.__)('%s address'), postLabel),
134
+ value: (0, _url.safeDecodeURIComponent)(link),
135
+ onFocus: this.onSelectInput
136
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
137
+ className: "post-publish-panel__postpublish-post-address__copy-button-wrap",
138
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(CopyButton, {
139
+ text: link,
140
+ onCopy: this.onCopy,
141
+ children: this.state.showCopyConfirmation ? (0, _i18n.__)('Copied!') : (0, _i18n.__)('Copy')
142
+ })
143
+ })]
144
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
145
+ className: "post-publish-panel__postpublish-buttons",
146
+ children: [!isScheduled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
147
+ variant: "primary",
148
+ href: link,
149
+ children: viewPostLabel
150
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
151
+ variant: isScheduled ? 'primary' : 'secondary',
152
+ href: addLink,
153
+ children: addNewPostLabel
154
+ })]
155
+ })]
156
+ }), children]
157
+ });
141
158
  }
142
159
  }
143
160
  var _default = exports.default = (0, _data.withSelect)(select => {
@@ -1 +1 @@
1
- {"version":3,"names":["_components","require","_i18n","_element","_data","_url","_htmlEntities","_compose","_coreData","_label","_interopRequireDefault","_store","POSTNAME","PAGENAME","getFuturePostUrl","post","slug","permalink_template","includes","replace","CopyButton","text","onCopy","children","ref","useCopyToClipboard","_react","createElement","Button","variant","PostPublishPanelPostpublish","Component","constructor","arguments","state","showCopyConfirmation","bind","onSelectInput","postLink","createRef","componentDidMount","props","focusOnMount","current","focus","componentWillUnmount","clearTimeout","dismissCopyConfirmation","setState","setTimeout","event","target","select","render","isScheduled","postType","postLabel","labels","singular_name","viewPostLabel","view_item","addNewPostLabel","add_new_item","link","status","addLink","addQueryArgs","post_type","type","postPublishNonLinkHeader","Fragment","__","default","className","PanelBody","href","decodeEntities","title","TextControl","__nextHasNoMarginBottom","readOnly","label","sprintf","value","safeDecodeURIComponent","onFocus","_default","exports","withSelect","getEditedPostAttribute","getCurrentPost","isCurrentPostScheduled","editorStore","getPostType","coreStore"],"sources":["@wordpress/editor/src/components/post-publish-panel/postpublish.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelBody, Button, TextControl } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Component, createRef } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport { addQueryArgs, safeDecodeURIComponent } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostScheduleLabel from '../post-schedule/label';\nimport { store as editorStore } from '../../store';\n\nconst POSTNAME = '%postname%';\nconst PAGENAME = '%pagename%';\n\n/**\n * Returns URL for a future post.\n *\n * @param {Object} post Post object.\n *\n * @return {string} PostPublish URL.\n */\n\nconst getFuturePostUrl = ( post ) => {\n\tconst { slug } = post;\n\n\tif ( post.permalink_template.includes( POSTNAME ) ) {\n\t\treturn post.permalink_template.replace( POSTNAME, slug );\n\t}\n\n\tif ( post.permalink_template.includes( PAGENAME ) ) {\n\t\treturn post.permalink_template.replace( PAGENAME, slug );\n\t}\n\n\treturn post.permalink_template;\n};\n\nfunction CopyButton( { text, onCopy, children } ) {\n\tconst ref = useCopyToClipboard( text, onCopy );\n\treturn (\n\t\t<Button variant=\"secondary\" ref={ ref }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\nclass PostPublishPanelPostpublish extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\tshowCopyConfirmation: false,\n\t\t};\n\t\tthis.onCopy = this.onCopy.bind( this );\n\t\tthis.onSelectInput = this.onSelectInput.bind( this );\n\t\tthis.postLink = createRef();\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( this.props.focusOnMount ) {\n\t\t\tthis.postLink.current.focus();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tclearTimeout( this.dismissCopyConfirmation );\n\t}\n\n\tonCopy() {\n\t\tthis.setState( {\n\t\t\tshowCopyConfirmation: true,\n\t\t} );\n\n\t\tclearTimeout( this.dismissCopyConfirmation );\n\t\tthis.dismissCopyConfirmation = setTimeout( () => {\n\t\t\tthis.setState( {\n\t\t\t\tshowCopyConfirmation: false,\n\t\t\t} );\n\t\t}, 4000 );\n\t}\n\n\tonSelectInput( event ) {\n\t\tevent.target.select();\n\t}\n\n\trender() {\n\t\tconst { children, isScheduled, post, postType } = this.props;\n\t\tconst postLabel = postType?.labels?.singular_name;\n\t\tconst viewPostLabel = postType?.labels?.view_item;\n\t\tconst addNewPostLabel = postType?.labels?.add_new_item;\n\t\tconst link =\n\t\t\tpost.status === 'future' ? getFuturePostUrl( post ) : post.link;\n\t\tconst addLink = addQueryArgs( 'post-new.php', {\n\t\t\tpost_type: post.type,\n\t\t} );\n\n\t\tconst postPublishNonLinkHeader = isScheduled ? (\n\t\t\t<>\n\t\t\t\t{ __( 'is now scheduled. It will go live on' ) }{ ' ' }\n\t\t\t\t<PostScheduleLabel />.\n\t\t\t</>\n\t\t) : (\n\t\t\t__( 'is now live.' )\n\t\t);\n\n\t\treturn (\n\t\t\t<div className=\"post-publish-panel__postpublish\">\n\t\t\t\t<PanelBody className=\"post-publish-panel__postpublish-header\">\n\t\t\t\t\t<a ref={ this.postLink } href={ link }>\n\t\t\t\t\t\t{ decodeEntities( post.title ) || __( '(no title)' ) }\n\t\t\t\t\t</a>{ ' ' }\n\t\t\t\t\t{ postPublishNonLinkHeader }\n\t\t\t\t</PanelBody>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<p className=\"post-publish-panel__postpublish-subheader\">\n\t\t\t\t\t\t<strong>{ __( 'What’s next?' ) }</strong>\n\t\t\t\t\t</p>\n\t\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address-container\">\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tclassName=\"post-publish-panel__postpublish-post-address\"\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: post type singular name */\n\t\t\t\t\t\t\t\t__( '%s address' ),\n\t\t\t\t\t\t\t\tpostLabel\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tvalue={ safeDecodeURIComponent( link ) }\n\t\t\t\t\t\t\tonFocus={ this.onSelectInput }\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address__copy-button-wrap\">\n\t\t\t\t\t\t\t<CopyButton text={ link } onCopy={ this.onCopy }>\n\t\t\t\t\t\t\t\t{ this.state.showCopyConfirmation\n\t\t\t\t\t\t\t\t\t? __( 'Copied!' )\n\t\t\t\t\t\t\t\t\t: __( 'Copy' ) }\n\t\t\t\t\t\t\t</CopyButton>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"post-publish-panel__postpublish-buttons\">\n\t\t\t\t\t\t{ ! isScheduled && (\n\t\t\t\t\t\t\t<Button variant=\"primary\" href={ link }>\n\t\t\t\t\t\t\t\t{ viewPostLabel }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant={ isScheduled ? 'primary' : 'secondary' }\n\t\t\t\t\t\t\thref={ addLink }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ addNewPostLabel }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</PanelBody>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getEditedPostAttribute, getCurrentPost, isCurrentPostScheduled } =\n\t\tselect( editorStore );\n\tconst { getPostType } = select( coreStore );\n\n\treturn {\n\t\tpost: getCurrentPost(),\n\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\tisScheduled: isCurrentPostScheduled(),\n\t};\n} )( PostPublishPanelPostpublish );\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AAKA,IAAAQ,MAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AAhBA;AACA;AACA;;AAUA;AACA;AACA;;AAIA,MAAMW,QAAQ,GAAG,YAAY;AAC7B,MAAMC,QAAQ,GAAG,YAAY;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,gBAAgB,GAAKC,IAAI,IAAM;EACpC,MAAM;IAAEC;EAAK,CAAC,GAAGD,IAAI;EAErB,IAAKA,IAAI,CAACE,kBAAkB,CAACC,QAAQ,CAAEN,QAAS,CAAC,EAAG;IACnD,OAAOG,IAAI,CAACE,kBAAkB,CAACE,OAAO,CAAEP,QAAQ,EAAEI,IAAK,CAAC;EACzD;EAEA,IAAKD,IAAI,CAACE,kBAAkB,CAACC,QAAQ,CAAEL,QAAS,CAAC,EAAG;IACnD,OAAOE,IAAI,CAACE,kBAAkB,CAACE,OAAO,CAAEN,QAAQ,EAAEG,IAAK,CAAC;EACzD;EAEA,OAAOD,IAAI,CAACE,kBAAkB;AAC/B,CAAC;AAED,SAASG,UAAUA,CAAE;EAA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AI,EAAGV;IAAS,GAEdJ,eACK,CACJ,CACK,CAAC,EACVtC,QACE,CAAC;EAER;AACD;AAAC,IAAA+D,QAAA,GAAAC,OAAA,CAAAf,OAAA,GAEc,IAAAgB,gBAAU,EAAIpC,MAAM,IAAM;EACxC,MAAM;IAAEqC,sBAAsB;IAAEC,cAAc;IAAEC;EAAuB,CAAC,GACvEvC,MAAM,CAAEwC,YAAY,CAAC;EACtB,MAAM;IAAEC;EAAY,CAAC,GAAGzC,MAAM,CAAE0C,eAAU,CAAC;EAE3C,OAAO;IACN/E,IAAI,EAAE2E,cAAc,CAAC,CAAC;IACtBnC,QAAQ,EAAEsC,WAAW,CAAEJ,sBAAsB,CAAE,MAAO,CAAE,CAAC;IACzDnC,WAAW,EAAEqC,sBAAsB,CAAC;EACrC,CAAC;AACF,CAAE,CAAC,CAAE7D,2BAA4B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","_i18n","_element","_data","_url","_htmlEntities","_compose","_coreData","_label","_interopRequireDefault","_store","_jsxRuntime","POSTNAME","PAGENAME","getFuturePostUrl","post","slug","permalink_template","includes","replace","CopyButton","text","onCopy","children","ref","useCopyToClipboard","jsx","Button","variant","PostPublishPanelPostpublish","Component","constructor","arguments","state","showCopyConfirmation","bind","onSelectInput","postLink","createRef","componentDidMount","props","focusOnMount","current","focus","componentWillUnmount","clearTimeout","dismissCopyConfirmation","setState","setTimeout","event","target","select","render","isScheduled","postType","postLabel","labels","singular_name","viewPostLabel","view_item","addNewPostLabel","add_new_item","link","status","addLink","addQueryArgs","post_type","type","postPublishNonLinkHeader","jsxs","Fragment","__","default","className","PanelBody","href","decodeEntities","title","TextControl","__nextHasNoMarginBottom","readOnly","label","sprintf","value","safeDecodeURIComponent","onFocus","_default","exports","withSelect","getEditedPostAttribute","getCurrentPost","isCurrentPostScheduled","editorStore","getPostType","coreStore"],"sources":["@wordpress/editor/src/components/post-publish-panel/postpublish.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelBody, Button, TextControl } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Component, createRef } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport { addQueryArgs, safeDecodeURIComponent } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostScheduleLabel from '../post-schedule/label';\nimport { store as editorStore } from '../../store';\n\nconst POSTNAME = '%postname%';\nconst PAGENAME = '%pagename%';\n\n/**\n * Returns URL for a future post.\n *\n * @param {Object} post Post object.\n *\n * @return {string} PostPublish URL.\n */\n\nconst getFuturePostUrl = ( post ) => {\n\tconst { slug } = post;\n\n\tif ( post.permalink_template.includes( POSTNAME ) ) {\n\t\treturn post.permalink_template.replace( POSTNAME, slug );\n\t}\n\n\tif ( post.permalink_template.includes( PAGENAME ) ) {\n\t\treturn post.permalink_template.replace( PAGENAME, slug );\n\t}\n\n\treturn post.permalink_template;\n};\n\nfunction CopyButton( { text, onCopy, children } ) {\n\tconst ref = useCopyToClipboard( text, onCopy );\n\treturn (\n\t\t<Button variant=\"secondary\" ref={ ref }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\nclass PostPublishPanelPostpublish extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\tshowCopyConfirmation: false,\n\t\t};\n\t\tthis.onCopy = this.onCopy.bind( this );\n\t\tthis.onSelectInput = this.onSelectInput.bind( this );\n\t\tthis.postLink = createRef();\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( this.props.focusOnMount ) {\n\t\t\tthis.postLink.current.focus();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tclearTimeout( this.dismissCopyConfirmation );\n\t}\n\n\tonCopy() {\n\t\tthis.setState( {\n\t\t\tshowCopyConfirmation: true,\n\t\t} );\n\n\t\tclearTimeout( this.dismissCopyConfirmation );\n\t\tthis.dismissCopyConfirmation = setTimeout( () => {\n\t\t\tthis.setState( {\n\t\t\t\tshowCopyConfirmation: false,\n\t\t\t} );\n\t\t}, 4000 );\n\t}\n\n\tonSelectInput( event ) {\n\t\tevent.target.select();\n\t}\n\n\trender() {\n\t\tconst { children, isScheduled, post, postType } = this.props;\n\t\tconst postLabel = postType?.labels?.singular_name;\n\t\tconst viewPostLabel = postType?.labels?.view_item;\n\t\tconst addNewPostLabel = postType?.labels?.add_new_item;\n\t\tconst link =\n\t\t\tpost.status === 'future' ? getFuturePostUrl( post ) : post.link;\n\t\tconst addLink = addQueryArgs( 'post-new.php', {\n\t\t\tpost_type: post.type,\n\t\t} );\n\n\t\tconst postPublishNonLinkHeader = isScheduled ? (\n\t\t\t<>\n\t\t\t\t{ __( 'is now scheduled. It will go live on' ) }{ ' ' }\n\t\t\t\t<PostScheduleLabel />.\n\t\t\t</>\n\t\t) : (\n\t\t\t__( 'is now live.' )\n\t\t);\n\n\t\treturn (\n\t\t\t<div className=\"post-publish-panel__postpublish\">\n\t\t\t\t<PanelBody className=\"post-publish-panel__postpublish-header\">\n\t\t\t\t\t<a ref={ this.postLink } href={ link }>\n\t\t\t\t\t\t{ decodeEntities( post.title ) || __( '(no title)' ) }\n\t\t\t\t\t</a>{ ' ' }\n\t\t\t\t\t{ postPublishNonLinkHeader }\n\t\t\t\t</PanelBody>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<p className=\"post-publish-panel__postpublish-subheader\">\n\t\t\t\t\t\t<strong>{ __( 'What’s next?' ) }</strong>\n\t\t\t\t\t</p>\n\t\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address-container\">\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tclassName=\"post-publish-panel__postpublish-post-address\"\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: post type singular name */\n\t\t\t\t\t\t\t\t__( '%s address' ),\n\t\t\t\t\t\t\t\tpostLabel\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tvalue={ safeDecodeURIComponent( link ) }\n\t\t\t\t\t\t\tonFocus={ this.onSelectInput }\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address__copy-button-wrap\">\n\t\t\t\t\t\t\t<CopyButton text={ link } onCopy={ this.onCopy }>\n\t\t\t\t\t\t\t\t{ this.state.showCopyConfirmation\n\t\t\t\t\t\t\t\t\t? __( 'Copied!' )\n\t\t\t\t\t\t\t\t\t: __( 'Copy' ) }\n\t\t\t\t\t\t\t</CopyButton>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"post-publish-panel__postpublish-buttons\">\n\t\t\t\t\t\t{ ! isScheduled && (\n\t\t\t\t\t\t\t<Button variant=\"primary\" href={ link }>\n\t\t\t\t\t\t\t\t{ viewPostLabel }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant={ isScheduled ? 'primary' : 'secondary' }\n\t\t\t\t\t\t\thref={ addLink }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ addNewPostLabel }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</PanelBody>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getEditedPostAttribute, getCurrentPost, isCurrentPostScheduled } =\n\t\tselect( editorStore );\n\tconst { getPostType } = select( coreStore );\n\n\treturn {\n\t\tpost: getCurrentPost(),\n\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\tisScheduled: isCurrentPostScheduled(),\n\t};\n} )( PostPublishPanelPostpublish );\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA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X,OAAS;YAAAzC,QAAA,EAEdqC;UAAe,CACV,CAAC;QAAA,CACL,CAAC;MAAA,CACI,CAAC,EACVrC,QAAQ;IAAA,CACN,CAAC;EAER;AACD;AAAC,IAAA+D,QAAA,GAAAC,OAAA,CAAAf,OAAA,GAEc,IAAAgB,gBAAU,EAAIrC,MAAM,IAAM;EACxC,MAAM;IAAEsC,sBAAsB;IAAEC,cAAc;IAAEC;EAAuB,CAAC,GACvExC,MAAM,CAAEyC,YAAY,CAAC;EACtB,MAAM;IAAEC;EAAY,CAAC,GAAG1C,MAAM,CAAE2C,eAAU,CAAC;EAE3C,OAAO;IACN/E,IAAI,EAAE2E,cAAc,CAAC,CAAC;IACtBpC,QAAQ,EAAEuC,WAAW,CAAEJ,sBAAsB,CAAE,MAAO,CAAE,CAAC;IACzDpC,WAAW,EAAEsC,sBAAsB,CAAC;EACrC,CAAC;AACF,CAAE,CAAC,CAAE9D,2BAA4B,CAAC","ignoreList":[]}
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _react = require("react");
9
8
  var _i18n = require("@wordpress/i18n");
10
9
  var _components = require("@wordpress/components");
11
10
  var _data = require("@wordpress/data");
@@ -22,6 +21,7 @@ var _maybePostFormatPanel = _interopRequireDefault(require("./maybe-post-format-
22
21
  var _store = require("../../store");
23
22
  var _maybeCategoryPanel = _interopRequireDefault(require("./maybe-category-panel"));
24
23
  var _maybeUploadMedia = _interopRequireDefault(require("./maybe-upload-media"));
24
+ var _jsxRuntime = require("react/jsx-runtime");
25
25
  /**
26
26
  * WordPress dependencies
27
27
  */
@@ -60,13 +60,13 @@ function PostPublishPanelPrepublish({
60
60
  siteHome: siteData.home && (0, _url.filterURLForDisplay)(siteData.home)
61
61
  };
62
62
  }, []);
63
- let siteIcon = (0, _react.createElement)(_components.Icon, {
63
+ let siteIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
64
64
  className: "components-site-icon",
65
65
  size: "36px",
66
66
  icon: _icons.wordpress
67
67
  });
68
68
  if (siteIconUrl) {
69
- siteIcon = (0, _react.createElement)("img", {
69
+ siteIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
70
70
  alt: (0, _i18n.__)('Site Icon'),
71
71
  className: "components-site-icon",
72
72
  src: siteIconUrl
@@ -86,29 +86,44 @@ function PostPublishPanelPrepublish({
86
86
  prePublishTitle = (0, _i18n.__)('Are you ready to publish?');
87
87
  prePublishBodyText = (0, _i18n.__)('Double-check your settings before publishing.');
88
88
  }
89
- return (0, _react.createElement)("div", {
90
- className: "editor-post-publish-panel__prepublish"
91
- }, (0, _react.createElement)("div", null, (0, _react.createElement)("strong", null, prePublishTitle)), (0, _react.createElement)("p", null, prePublishBodyText), (0, _react.createElement)("div", {
92
- className: "components-site-card"
93
- }, siteIcon, (0, _react.createElement)("div", {
94
- className: "components-site-info"
95
- }, (0, _react.createElement)("span", {
96
- className: "components-site-name"
97
- }, (0, _htmlEntities.decodeEntities)(siteTitle) || (0, _i18n.__)('(Untitled)')), (0, _react.createElement)("span", {
98
- className: "components-site-home"
99
- }, siteHome))), (0, _react.createElement)(_maybeUploadMedia.default, null), hasPublishAction && (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_components.PanelBody, {
100
- initialOpen: false,
101
- title: [(0, _i18n.__)('Visibility:'), (0, _react.createElement)("span", {
102
- className: "editor-post-publish-panel__link",
103
- key: "label"
104
- }, (0, _react.createElement)(_label.default, null))]
105
- }, (0, _react.createElement)(_postVisibility.default, null)), (0, _react.createElement)(_components.PanelBody, {
106
- initialOpen: false,
107
- title: [(0, _i18n.__)('Publish:'), (0, _react.createElement)("span", {
108
- className: "editor-post-publish-panel__link",
109
- key: "label"
110
- }, (0, _react.createElement)(_label2.default, null))]
111
- }, (0, _react.createElement)(_postSchedule.default, null))), (0, _react.createElement)(_maybePostFormatPanel.default, null), (0, _react.createElement)(_maybeTagsPanel.default, null), (0, _react.createElement)(_maybeCategoryPanel.default, null), children);
89
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
90
+ className: "editor-post-publish-panel__prepublish",
91
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
92
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
93
+ children: prePublishTitle
94
+ })
95
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
96
+ children: prePublishBodyText
97
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
98
+ className: "components-site-card",
99
+ children: [siteIcon, /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
100
+ className: "components-site-info",
101
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
102
+ className: "components-site-name",
103
+ children: (0, _htmlEntities.decodeEntities)(siteTitle) || (0, _i18n.__)('(Untitled)')
104
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
105
+ className: "components-site-home",
106
+ children: siteHome
107
+ })]
108
+ })]
109
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_maybeUploadMedia.default, {}), hasPublishAction && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
110
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.PanelBody, {
111
+ initialOpen: false,
112
+ title: [(0, _i18n.__)('Visibility:'), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
113
+ className: "editor-post-publish-panel__link",
114
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_label.default, {})
115
+ }, "label")],
116
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_postVisibility.default, {})
117
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.PanelBody, {
118
+ initialOpen: false,
119
+ title: [(0, _i18n.__)('Publish:'), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
120
+ className: "editor-post-publish-panel__link",
121
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_label2.default, {})
122
+ }, "label")],
123
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_postSchedule.default, {})
124
+ })]
125
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_maybePostFormatPanel.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_maybeTagsPanel.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_maybeCategoryPanel.default, {}), children]
126
+ });
112
127
  }
113
128
  var _default = exports.default = PostPublishPanelPrepublish;
114
129
  //# sourceMappingURL=prepublish.js.map