@wordpress/editor 13.34.0 → 14.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (972) hide show
  1. package/CHANGELOG.md +17 -4
  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 +71 -2
  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 +140 -0
  20. package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -0
  21. package/build/components/block-settings-menu/content-only-settings-menu.native.js +11 -0
  22. package/build/components/block-settings-menu/content-only-settings-menu.native.js.map +1 -0
  23. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +16 -13
  24. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  25. package/build/components/blog-title/index.js +116 -0
  26. package/build/components/blog-title/index.js.map +1 -0
  27. package/build/components/collapsible-block-toolbar/index.js +22 -19
  28. package/build/components/collapsible-block-toolbar/index.js.map +1 -1
  29. package/build/components/commands/index.js +109 -3
  30. package/build/components/commands/index.js.map +1 -1
  31. package/build/components/create-template-part-modal/index.js +167 -0
  32. package/build/components/create-template-part-modal/index.js.map +1 -0
  33. package/build/components/create-template-part-modal/utils.js +64 -0
  34. package/build/components/create-template-part-modal/utils.js.map +1 -0
  35. package/build/components/deprecated.js +2 -2
  36. package/build/components/deprecated.js.map +1 -1
  37. package/build/components/document-bar/index.js +96 -72
  38. package/build/components/document-bar/index.js.map +1 -1
  39. package/build/components/document-outline/index.js +124 -121
  40. package/build/components/document-outline/index.js.map +1 -1
  41. package/build/components/document-outline/item.js +20 -16
  42. package/build/components/document-outline/item.js.map +1 -1
  43. package/build/components/document-tools/index.js +69 -69
  44. package/build/components/document-tools/index.js.map +1 -1
  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 +178 -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 +4 -5
  92. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  93. package/build/components/global-styles-provider/index.js +195 -0
  94. package/build/components/global-styles-provider/index.js.map +1 -0
  95. package/build/components/header/back-button.js +34 -0
  96. package/build/components/header/back-button.js.map +1 -0
  97. package/build/components/header/index.js +176 -0
  98. package/build/components/header/index.js.map +1 -0
  99. package/build/components/inserter-sidebar/index.js +83 -32
  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 +54 -49
  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/mode-switcher/index.js +10 -10
  114. package/build/components/mode-switcher/index.js.map +1 -1
  115. package/build/components/more-menu/copy-content-menu-item.js +5 -4
  116. package/build/components/more-menu/copy-content-menu-item.js.map +1 -1
  117. package/build/components/more-menu/index.js +89 -76
  118. package/build/components/more-menu/index.js.map +1 -1
  119. package/build/components/more-menu/tools-more-menu-group.js +2 -2
  120. package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
  121. package/build/components/more-menu/view-more-menu-group.js +2 -2
  122. package/build/components/more-menu/view-more-menu-group.js.map +1 -1
  123. package/build/components/offline-status/index.native.js +12 -11
  124. package/build/components/offline-status/index.native.js.map +1 -1
  125. package/build/components/page-attributes/order.js +87 -14
  126. package/build/components/page-attributes/order.js.map +1 -1
  127. package/build/components/page-attributes/panel.js +10 -19
  128. package/build/components/page-attributes/panel.js.map +1 -1
  129. package/build/components/page-attributes/parent.js +86 -3
  130. package/build/components/page-attributes/parent.js.map +1 -1
  131. package/build/components/pattern-duplicate-modal/index.js +59 -0
  132. package/build/components/pattern-duplicate-modal/index.js.map +1 -0
  133. package/build/components/pattern-overrides-panel/index.js +2 -2
  134. package/build/components/pattern-overrides-panel/index.js.map +1 -1
  135. package/build/components/pattern-rename-modal/index.js +58 -0
  136. package/build/components/pattern-rename-modal/index.js.map +1 -0
  137. package/build/components/plugin-document-setting-panel/index.js +17 -12
  138. package/build/components/plugin-document-setting-panel/index.js.map +1 -1
  139. package/build/components/plugin-post-publish-panel/index.js +10 -7
  140. package/build/components/plugin-post-publish-panel/index.js.map +1 -1
  141. package/build/components/plugin-post-status-info/index.js +7 -4
  142. package/build/components/plugin-post-status-info/index.js.map +1 -1
  143. package/build/components/plugin-pre-publish-panel/index.js +10 -7
  144. package/build/components/plugin-pre-publish-panel/index.js.map +1 -1
  145. package/build/components/plugin-sidebar/index.js +3 -4
  146. package/build/components/plugin-sidebar/index.js.map +1 -1
  147. package/build/components/plugin-sidebar-more-menu-item/index.js +3 -5
  148. package/build/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
  149. package/build/components/post-actions/actions.js +454 -327
  150. package/build/components/post-actions/actions.js.map +1 -1
  151. package/build/components/post-actions/export-pattern-action.js +64 -0
  152. package/build/components/post-actions/export-pattern-action.js.map +1 -0
  153. package/build/components/post-actions/export-pattern-action.native.js +11 -0
  154. package/build/components/post-actions/export-pattern-action.native.js.map +1 -0
  155. package/build/components/post-actions/index.js +71 -62
  156. package/build/components/post-actions/index.js.map +1 -1
  157. package/build/components/post-author/check.js +6 -6
  158. package/build/components/post-author/check.js.map +1 -1
  159. package/build/components/post-author/combobox.js +4 -3
  160. package/build/components/post-author/combobox.js.map +1 -1
  161. package/build/components/post-author/hook.js +2 -1
  162. package/build/components/post-author/hook.js.map +1 -1
  163. package/build/components/post-author/index.js +3 -3
  164. package/build/components/post-author/index.js.map +1 -1
  165. package/build/components/post-author/panel.js +72 -4
  166. package/build/components/post-author/panel.js.map +1 -1
  167. package/build/components/post-author/select.js +4 -3
  168. package/build/components/post-author/select.js.map +1 -1
  169. package/build/components/post-card-panel/index.js +46 -35
  170. package/build/components/post-card-panel/index.js.map +1 -1
  171. package/build/components/post-comments/index.js +44 -8
  172. package/build/components/post-comments/index.js.map +1 -1
  173. package/build/components/post-content-information/index.js +8 -5
  174. package/build/components/post-content-information/index.js.map +1 -1
  175. package/build/components/post-discussion/panel.js +122 -24
  176. package/build/components/post-discussion/panel.js.map +1 -1
  177. package/build/components/post-excerpt/check.js +6 -6
  178. package/build/components/post-excerpt/check.js.map +1 -1
  179. package/build/components/post-excerpt/index.js +18 -17
  180. package/build/components/post-excerpt/index.js.map +1 -1
  181. package/build/components/post-excerpt/panel.js +59 -42
  182. package/build/components/post-excerpt/panel.js.map +1 -1
  183. package/build/components/post-excerpt/plugin.js +7 -4
  184. package/build/components/post-excerpt/plugin.js.map +1 -1
  185. package/build/components/post-featured-image/check.js +17 -7
  186. package/build/components/post-featured-image/check.js.map +1 -1
  187. package/build/components/post-featured-image/index.js +77 -49
  188. package/build/components/post-featured-image/index.js.map +1 -1
  189. package/build/components/post-featured-image/panel.js +22 -7
  190. package/build/components/post-featured-image/panel.js.map +1 -1
  191. package/build/components/post-format/check.js +14 -4
  192. package/build/components/post-format/check.js.map +1 -1
  193. package/build/components/post-format/index.js +37 -20
  194. package/build/components/post-format/index.js.map +1 -1
  195. package/build/components/post-format/panel.js +93 -0
  196. package/build/components/post-format/panel.js.map +1 -0
  197. package/build/components/post-last-edited-panel/index.js +7 -4
  198. package/build/components/post-last-edited-panel/index.js.map +1 -1
  199. package/build/components/post-last-revision/check.js +13 -5
  200. package/build/components/post-last-revision/check.js.map +1 -1
  201. package/build/components/post-last-revision/index.js +19 -13
  202. package/build/components/post-last-revision/index.js.map +1 -1
  203. package/build/components/post-last-revision/panel.js +12 -5
  204. package/build/components/post-last-revision/panel.js.map +1 -1
  205. package/build/components/post-locked-modal/index.js +57 -35
  206. package/build/components/post-locked-modal/index.js.map +1 -1
  207. package/build/components/post-panel-row/index.js +13 -10
  208. package/build/components/post-panel-row/index.js.map +1 -1
  209. package/build/components/post-panel-section/index.js +29 -0
  210. package/build/components/post-panel-section/index.js.map +1 -0
  211. package/build/components/post-pending-status/check.js +10 -0
  212. package/build/components/post-pending-status/check.js.map +1 -1
  213. package/build/components/post-pending-status/index.js +14 -7
  214. package/build/components/post-pending-status/index.js.map +1 -1
  215. package/build/components/post-pingbacks/index.js +15 -4
  216. package/build/components/post-pingbacks/index.js.map +1 -1
  217. package/build/components/post-preview-button/index.js +45 -21
  218. package/build/components/post-preview-button/index.js.map +1 -1
  219. package/build/components/post-publish-button/index.js +21 -11
  220. package/build/components/post-publish-button/index.js.map +1 -1
  221. package/build/components/post-publish-button/post-publish-button-or-toggle.js +2 -2
  222. package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  223. package/build/components/post-publish-panel/index.js +46 -33
  224. package/build/components/post-publish-panel/index.js.map +1 -1
  225. package/build/components/post-publish-panel/maybe-category-panel.js +12 -9
  226. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  227. package/build/components/post-publish-panel/maybe-post-format-panel.js +21 -15
  228. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  229. package/build/components/post-publish-panel/maybe-tags-panel.js +13 -10
  230. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  231. package/build/components/post-publish-panel/maybe-upload-media.js +29 -24
  232. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  233. package/build/components/post-publish-panel/postpublish.js +55 -38
  234. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  235. package/build/components/post-publish-panel/prepublish.js +41 -26
  236. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  237. package/build/components/post-saved-state/index.js +10 -10
  238. package/build/components/post-saved-state/index.js.map +1 -1
  239. package/build/components/post-schedule/check.js +8 -0
  240. package/build/components/post-schedule/check.js.map +1 -1
  241. package/build/components/post-schedule/index.js +30 -5
  242. package/build/components/post-schedule/index.js.map +1 -1
  243. package/build/components/post-schedule/label.js +16 -0
  244. package/build/components/post-schedule/label.js.map +1 -1
  245. package/build/components/post-schedule/panel.js +43 -30
  246. package/build/components/post-schedule/panel.js.map +1 -1
  247. package/build/components/post-slug/check.js +5 -4
  248. package/build/components/post-slug/check.js.map +1 -1
  249. package/build/components/post-slug/index.js +5 -3
  250. package/build/components/post-slug/index.js.map +1 -1
  251. package/build/components/post-slug/panel.js +30 -0
  252. package/build/components/post-slug/panel.js.map +1 -0
  253. package/build/components/post-status/index.js +118 -119
  254. package/build/components/post-status/index.js.map +1 -1
  255. package/build/components/post-sticky/index.js +16 -8
  256. package/build/components/post-sticky/index.js.map +1 -1
  257. package/build/components/post-sticky/panel.js +25 -0
  258. package/build/components/post-sticky/panel.js.map +1 -0
  259. package/build/components/post-switch-to-draft-button/index.js +25 -21
  260. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  261. package/build/components/post-sync-status/index.js +8 -6
  262. package/build/components/post-sync-status/index.js.map +1 -1
  263. package/build/components/post-taxonomies/flat-term-selector.js +21 -20
  264. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  265. package/build/components/post-taxonomies/hierarchical-term-selector.js +71 -61
  266. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  267. package/build/components/post-taxonomies/index.js +6 -6
  268. package/build/components/post-taxonomies/index.js.map +1 -1
  269. package/build/components/post-taxonomies/most-used-terms.js +19 -15
  270. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  271. package/build/components/post-taxonomies/panel.js +15 -11
  272. package/build/components/post-taxonomies/panel.js.map +1 -1
  273. package/build/components/post-template/block-theme.js +42 -32
  274. package/build/components/post-template/block-theme.js.map +1 -1
  275. package/build/components/post-template/classic-theme.js +73 -50
  276. package/build/components/post-template/classic-theme.js.map +1 -1
  277. package/build/components/post-template/create-new-template-modal.js +33 -27
  278. package/build/components/post-template/create-new-template-modal.js.map +1 -1
  279. package/build/components/post-template/create-new-template.js +14 -11
  280. package/build/components/post-template/create-new-template.js.map +1 -1
  281. package/build/components/post-template/panel.js +16 -10
  282. package/build/components/post-template/panel.js.map +1 -1
  283. package/build/components/post-template/reset-default-template.js +5 -4
  284. package/build/components/post-template/reset-default-template.js.map +1 -1
  285. package/build/components/post-template/swap-template-button.js +20 -15
  286. package/build/components/post-template/swap-template-button.js.map +1 -1
  287. package/build/components/post-text-editor/index.js +27 -20
  288. package/build/components/post-text-editor/index.js.map +1 -1
  289. package/build/components/post-title/index.js +31 -19
  290. package/build/components/post-title/index.js.map +1 -1
  291. package/build/components/post-title/index.native.js +81 -57
  292. package/build/components/post-title/index.native.js.map +1 -1
  293. package/build/components/post-title/post-title-raw.js +12 -5
  294. package/build/components/post-title/post-title-raw.js.map +1 -1
  295. package/build/components/post-title/use-post-title-focus.js +7 -0
  296. package/build/components/post-title/use-post-title-focus.js.map +1 -1
  297. package/build/components/post-title/use-post-title.js +5 -0
  298. package/build/components/post-title/use-post-title.js.map +1 -1
  299. package/build/components/post-transform-panel/hooks.js +90 -0
  300. package/build/components/post-transform-panel/hooks.js.map +1 -0
  301. package/build/components/post-transform-panel/index.js +101 -0
  302. package/build/components/post-transform-panel/index.js.map +1 -0
  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-type-support-check/index.js +1 -1
  306. package/build/components/post-type-support-check/index.js.map +1 -1
  307. package/build/components/post-url/check.js +8 -0
  308. package/build/components/post-url/check.js.map +1 -1
  309. package/build/components/post-url/index.js +98 -73
  310. package/build/components/post-url/index.js.map +1 -1
  311. package/build/components/post-url/label.js +11 -0
  312. package/build/components/post-url/label.js.map +1 -1
  313. package/build/components/post-url/panel.js +33 -25
  314. package/build/components/post-url/panel.js.map +1 -1
  315. package/build/components/post-view-link/index.js +2 -2
  316. package/build/components/post-view-link/index.js.map +1 -1
  317. package/build/components/post-visibility/check.js +9 -0
  318. package/build/components/post-visibility/check.js.map +1 -1
  319. package/build/components/post-visibility/index.js +83 -68
  320. package/build/components/post-visibility/index.js.map +1 -1
  321. package/build/components/post-visibility/label.js +11 -0
  322. package/build/components/post-visibility/label.js.map +1 -1
  323. package/build/components/posts-per-page/index.js +109 -0
  324. package/build/components/posts-per-page/index.js.map +1 -0
  325. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +7 -5
  326. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  327. package/build/components/preferences-modal/index.js +124 -102
  328. package/build/components/preferences-modal/index.js.map +1 -1
  329. package/build/components/preview-dropdown/index.js +47 -31
  330. package/build/components/preview-dropdown/index.js.map +1 -1
  331. package/build/components/provider/index.js +96 -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 +23 -4
  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/constants.js +11 -0
  346. package/build/components/sidebar/constants.js.map +1 -0
  347. package/build/components/sidebar/header.js +56 -0
  348. package/build/components/sidebar/header.js.map +1 -0
  349. package/build/components/sidebar/index.js +161 -0
  350. package/build/components/sidebar/index.js.map +1 -0
  351. package/build/components/sidebar/post-summary.js +89 -0
  352. package/build/components/sidebar/post-summary.js.map +1 -0
  353. package/build/components/site-discussion/index.js +133 -0
  354. package/build/components/site-discussion/index.js.map +1 -0
  355. package/build/components/start-page-options/index.js +18 -18
  356. package/build/components/start-page-options/index.js.map +1 -1
  357. package/build/components/start-template-options/index.js +198 -0
  358. package/build/components/start-template-options/index.js.map +1 -0
  359. package/build/components/table-of-contents/index.js +4 -4
  360. package/build/components/table-of-contents/index.js.map +1 -1
  361. package/build/components/table-of-contents/panel.js +53 -35
  362. package/build/components/table-of-contents/panel.js.map +1 -1
  363. package/build/components/template-areas/index.js +36 -22
  364. package/build/components/template-areas/index.js.map +1 -1
  365. package/build/components/template-content-panel/index.js +39 -0
  366. package/build/components/template-content-panel/index.js.map +1 -0
  367. package/build/components/template-validation-notice/index.js +25 -21
  368. package/build/components/template-validation-notice/index.js.map +1 -1
  369. package/build/components/text-editor/index.js +73 -0
  370. package/build/components/text-editor/index.js.map +1 -0
  371. package/build/components/time-to-read/index.js +8 -8
  372. package/build/components/time-to-read/index.js.map +1 -1
  373. package/build/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +6 -6
  374. package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -0
  375. package/build/components/{editor-canvas → visual-editor}/index.js +130 -78
  376. package/build/components/visual-editor/index.js.map +1 -0
  377. package/build/components/word-count/index.js +5 -4
  378. package/build/components/word-count/index.js.map +1 -1
  379. package/build/hooks/custom-sources-backwards-compatibility.js +3 -4
  380. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  381. package/build/hooks/index.js +1 -0
  382. package/build/hooks/index.js.map +1 -1
  383. package/build/hooks/media-upload.js +10 -0
  384. package/build/hooks/media-upload.js.map +1 -0
  385. package/build/hooks/pattern-overrides.js +25 -16
  386. package/build/hooks/pattern-overrides.js.map +1 -1
  387. package/build/private-apis.js +15 -38
  388. package/build/private-apis.js.map +1 -1
  389. package/build/private-apis.native.js +48 -0
  390. package/build/private-apis.native.js.map +1 -0
  391. package/build/store/constants.js +4 -1
  392. package/build/store/constants.js.map +1 -1
  393. package/build/store/private-actions.js +10 -14
  394. package/build/store/private-actions.js.map +1 -1
  395. package/build/store/private-selectors.js +45 -2
  396. package/build/store/private-selectors.js.map +1 -1
  397. package/build/store/reducer.js +15 -0
  398. package/build/store/reducer.js.map +1 -1
  399. package/build/store/selectors.js +1 -1
  400. package/build/store/selectors.js.map +1 -1
  401. package/build/utils/set-nested-value.js +44 -0
  402. package/build/utils/set-nested-value.js.map +1 -0
  403. package/build-module/bindings/index.js +1 -3
  404. package/build-module/bindings/index.js.map +1 -1
  405. package/build-module/bindings/pattern-overrides.js +70 -2
  406. package/build-module/bindings/pattern-overrides.js.map +1 -1
  407. package/build-module/bindings/post-meta.js +38 -2
  408. package/build-module/bindings/post-meta.js.map +1 -1
  409. package/build-module/components/autocompleters/user.js +14 -9
  410. package/build-module/components/autocompleters/user.js.map +1 -1
  411. package/build-module/components/block-manager/category.js +20 -17
  412. package/build-module/components/block-manager/category.js.map +1 -1
  413. package/build-module/components/block-manager/checklist.js +16 -14
  414. package/build-module/components/block-manager/checklist.js.map +1 -1
  415. package/build-module/components/block-manager/index.js +38 -33
  416. package/build-module/components/block-manager/index.js.map +1 -1
  417. package/build-module/components/block-removal-warnings/index.js +2 -2
  418. package/build-module/components/block-removal-warnings/index.js.map +1 -1
  419. package/build-module/components/block-settings-menu/content-only-settings-menu.js +135 -0
  420. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -0
  421. package/build-module/components/block-settings-menu/content-only-settings-menu.native.js +5 -0
  422. package/build-module/components/block-settings-menu/content-only-settings-menu.native.js.map +1 -0
  423. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +16 -13
  424. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  425. package/build-module/components/blog-title/index.js +110 -0
  426. package/build-module/components/blog-title/index.js.map +1 -0
  427. package/build-module/components/collapsible-block-toolbar/index.js +24 -19
  428. package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
  429. package/build-module/components/commands/index.js +111 -5
  430. package/build-module/components/commands/index.js.map +1 -1
  431. package/build-module/components/create-template-part-modal/index.js +160 -0
  432. package/build-module/components/create-template-part-modal/index.js.map +1 -0
  433. package/build-module/components/create-template-part-modal/utils.js +54 -0
  434. package/build-module/components/create-template-part-modal/utils.js.map +1 -0
  435. package/build-module/components/deprecated.js +2 -2
  436. package/build-module/components/deprecated.js.map +1 -1
  437. package/build-module/components/document-bar/index.js +95 -70
  438. package/build-module/components/document-bar/index.js.map +1 -1
  439. package/build-module/components/document-outline/index.js +125 -120
  440. package/build-module/components/document-outline/index.js.map +1 -1
  441. package/build-module/components/document-outline/item.js +21 -16
  442. package/build-module/components/document-outline/item.js.map +1 -1
  443. package/build-module/components/document-tools/index.js +72 -70
  444. package/build-module/components/document-tools/index.js.map +1 -1
  445. package/build-module/components/editor-help/add-blocks.native.js +16 -11
  446. package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
  447. package/build-module/components/editor-help/customize-blocks.native.js +16 -11
  448. package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
  449. package/build-module/components/editor-help/help-detail-navigation-screen.native.js +33 -22
  450. package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
  451. package/build-module/components/editor-help/help-get-support-button.native.js +8 -6
  452. package/build-module/components/editor-help/help-get-support-button.native.js.map +1 -1
  453. package/build-module/components/editor-help/help-section-title.native.js +8 -6
  454. package/build-module/components/editor-help/help-section-title.native.js.map +1 -1
  455. package/build-module/components/editor-help/help-topic-row.native.js +7 -6
  456. package/build-module/components/editor-help/help-topic-row.native.js.map +1 -1
  457. package/build-module/components/editor-help/icon-move-blocks.native.js +7 -6
  458. package/build-module/components/editor-help/icon-move-blocks.native.js.map +1 -1
  459. package/build-module/components/editor-help/index.native.js +96 -76
  460. package/build-module/components/editor-help/index.native.js.map +1 -1
  461. package/build-module/components/editor-help/intro-to-blocks.native.js +43 -37
  462. package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
  463. package/build-module/components/editor-help/move-blocks.native.js +27 -21
  464. package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
  465. package/build-module/components/editor-help/remove-blocks.native.js +14 -9
  466. package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
  467. package/build-module/components/editor-help/view-sections.native.js +25 -19
  468. package/build-module/components/editor-help/view-sections.native.js.map +1 -1
  469. package/build-module/components/editor-history/redo.js +2 -2
  470. package/build-module/components/editor-history/redo.js.map +1 -1
  471. package/build-module/components/editor-history/undo.js +2 -2
  472. package/build-module/components/editor-history/undo.js.map +1 -1
  473. package/build-module/components/editor-interface/content-slot-fill.js +16 -0
  474. package/build-module/components/editor-interface/content-slot-fill.js.map +1 -0
  475. package/build-module/components/editor-interface/index.js +172 -0
  476. package/build-module/components/editor-interface/index.js.map +1 -0
  477. package/build-module/components/editor-notices/index.js +25 -9
  478. package/build-module/components/editor-notices/index.js.map +1 -1
  479. package/build-module/components/editor-snackbars/index.js +2 -2
  480. package/build-module/components/editor-snackbars/index.js.map +1 -1
  481. package/build-module/components/entities-saved-states/entity-record-item.js +40 -11
  482. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  483. package/build-module/components/entities-saved-states/entity-type-list.js +26 -22
  484. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  485. package/build-module/components/entities-saved-states/index.js +54 -46
  486. package/build-module/components/entities-saved-states/index.js.map +1 -1
  487. package/build-module/components/error-boundary/index.js +27 -14
  488. package/build-module/components/error-boundary/index.js.map +1 -1
  489. package/build-module/components/error-boundary/index.native.js +46 -35
  490. package/build-module/components/error-boundary/index.native.js.map +1 -1
  491. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +3 -3
  492. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  493. package/build-module/components/global-styles-provider/index.js +185 -0
  494. package/build-module/components/global-styles-provider/index.js.map +1 -0
  495. package/build-module/components/header/back-button.js +28 -0
  496. package/build-module/components/header/back-button.js.map +1 -0
  497. package/build-module/components/header/index.js +169 -0
  498. package/build-module/components/header/index.js.map +1 -0
  499. package/build-module/components/inserter-sidebar/index.js +85 -34
  500. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  501. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -2
  502. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  503. package/build-module/components/keyboard-shortcut-help-modal/index.js +55 -49
  504. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  505. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +32 -26
  506. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  507. package/build-module/components/list-view-sidebar/index.js +60 -47
  508. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  509. package/build-module/components/list-view-sidebar/list-view-outline.js +23 -4
  510. package/build-module/components/list-view-sidebar/list-view-outline.js.map +1 -1
  511. package/build-module/components/local-autosave-monitor/index.js +15 -2
  512. package/build-module/components/local-autosave-monitor/index.js.map +1 -1
  513. package/build-module/components/mode-switcher/index.js +9 -8
  514. package/build-module/components/mode-switcher/index.js.map +1 -1
  515. package/build-module/components/more-menu/copy-content-menu-item.js +5 -4
  516. package/build-module/components/more-menu/copy-content-menu-item.js.map +1 -1
  517. package/build-module/components/more-menu/index.js +91 -76
  518. package/build-module/components/more-menu/index.js.map +1 -1
  519. package/build-module/components/more-menu/tools-more-menu-group.js +2 -2
  520. package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -1
  521. package/build-module/components/more-menu/view-more-menu-group.js +2 -2
  522. package/build-module/components/more-menu/view-more-menu-group.js.map +1 -1
  523. package/build-module/components/offline-status/index.native.js +12 -9
  524. package/build-module/components/offline-status/index.native.js.map +1 -1
  525. package/build-module/components/page-attributes/order.js +90 -17
  526. package/build-module/components/page-attributes/order.js.map +1 -1
  527. package/build-module/components/page-attributes/panel.js +13 -21
  528. package/build-module/components/page-attributes/panel.js.map +1 -1
  529. package/build-module/components/page-attributes/parent.js +88 -5
  530. package/build-module/components/page-attributes/parent.js.map +1 -1
  531. package/build-module/components/pattern-duplicate-modal/index.js +51 -0
  532. package/build-module/components/pattern-duplicate-modal/index.js.map +1 -0
  533. package/build-module/components/pattern-overrides-panel/index.js +2 -2
  534. package/build-module/components/pattern-overrides-panel/index.js.map +1 -1
  535. package/build-module/components/pattern-rename-modal/index.js +50 -0
  536. package/build-module/components/pattern-rename-modal/index.js.map +1 -0
  537. package/build-module/components/plugin-document-setting-panel/index.js +19 -12
  538. package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
  539. package/build-module/components/plugin-post-publish-panel/index.js +10 -7
  540. package/build-module/components/plugin-post-publish-panel/index.js.map +1 -1
  541. package/build-module/components/plugin-post-status-info/index.js +7 -4
  542. package/build-module/components/plugin-post-status-info/index.js.map +1 -1
  543. package/build-module/components/plugin-pre-publish-panel/index.js +10 -7
  544. package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -1
  545. package/build-module/components/plugin-sidebar/index.js +2 -2
  546. package/build-module/components/plugin-sidebar/index.js.map +1 -1
  547. package/build-module/components/plugin-sidebar-more-menu-item/index.js +2 -3
  548. package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
  549. package/build-module/components/post-actions/actions.js +458 -329
  550. package/build-module/components/post-actions/actions.js.map +1 -1
  551. package/build-module/components/post-actions/export-pattern-action.js +58 -0
  552. package/build-module/components/post-actions/export-pattern-action.js.map +1 -0
  553. package/build-module/components/post-actions/export-pattern-action.native.js +5 -0
  554. package/build-module/components/post-actions/export-pattern-action.native.js.map +1 -0
  555. package/build-module/components/post-actions/index.js +73 -62
  556. package/build-module/components/post-actions/index.js.map +1 -1
  557. package/build-module/components/post-author/check.js +5 -4
  558. package/build-module/components/post-author/check.js.map +1 -1
  559. package/build-module/components/post-author/combobox.js +4 -3
  560. package/build-module/components/post-author/combobox.js.map +1 -1
  561. package/build-module/components/post-author/hook.js +2 -1
  562. package/build-module/components/post-author/hook.js.map +1 -1
  563. package/build-module/components/post-author/index.js +3 -3
  564. package/build-module/components/post-author/index.js.map +1 -1
  565. package/build-module/components/post-author/panel.js +72 -4
  566. package/build-module/components/post-author/panel.js.map +1 -1
  567. package/build-module/components/post-author/select.js +4 -3
  568. package/build-module/components/post-author/select.js.map +1 -1
  569. package/build-module/components/post-card-panel/index.js +49 -38
  570. package/build-module/components/post-card-panel/index.js.map +1 -1
  571. package/build-module/components/post-comments/index.js +47 -9
  572. package/build-module/components/post-comments/index.js.map +1 -1
  573. package/build-module/components/post-content-information/index.js +8 -5
  574. package/build-module/components/post-content-information/index.js.map +1 -1
  575. package/build-module/components/post-discussion/panel.js +125 -26
  576. package/build-module/components/post-discussion/panel.js.map +1 -1
  577. package/build-module/components/post-excerpt/check.js +5 -4
  578. package/build-module/components/post-excerpt/check.js.map +1 -1
  579. package/build-module/components/post-excerpt/index.js +17 -15
  580. package/build-module/components/post-excerpt/index.js.map +1 -1
  581. package/build-module/components/post-excerpt/panel.js +60 -40
  582. package/build-module/components/post-excerpt/panel.js.map +1 -1
  583. package/build-module/components/post-excerpt/plugin.js +7 -4
  584. package/build-module/components/post-excerpt/plugin.js.map +1 -1
  585. package/build-module/components/post-featured-image/check.js +18 -6
  586. package/build-module/components/post-featured-image/check.js.map +1 -1
  587. package/build-module/components/post-featured-image/index.js +78 -49
  588. package/build-module/components/post-featured-image/index.js.map +1 -1
  589. package/build-module/components/post-featured-image/panel.js +22 -7
  590. package/build-module/components/post-featured-image/panel.js.map +1 -1
  591. package/build-module/components/post-format/check.js +14 -4
  592. package/build-module/components/post-format/check.js.map +1 -1
  593. package/build-module/components/post-format/index.js +39 -21
  594. package/build-module/components/post-format/index.js.map +1 -1
  595. package/build-module/components/post-format/panel.js +86 -0
  596. package/build-module/components/post-format/panel.js.map +1 -0
  597. package/build-module/components/post-last-edited-panel/index.js +7 -4
  598. package/build-module/components/post-last-edited-panel/index.js.map +1 -1
  599. package/build-module/components/post-last-revision/check.js +14 -4
  600. package/build-module/components/post-last-revision/check.js.map +1 -1
  601. package/build-module/components/post-last-revision/index.js +21 -13
  602. package/build-module/components/post-last-revision/index.js.map +1 -1
  603. package/build-module/components/post-last-revision/panel.js +13 -4
  604. package/build-module/components/post-last-revision/panel.js.map +1 -1
  605. package/build-module/components/post-locked-modal/index.js +60 -34
  606. package/build-module/components/post-locked-modal/index.js.map +1 -1
  607. package/build-module/components/post-panel-row/index.js +14 -10
  608. package/build-module/components/post-panel-row/index.js.map +1 -1
  609. package/build-module/components/post-panel-section/index.js +21 -0
  610. package/build-module/components/post-panel-section/index.js.map +1 -0
  611. package/build-module/components/post-pending-status/check.js +11 -0
  612. package/build-module/components/post-pending-status/check.js.map +1 -1
  613. package/build-module/components/post-pending-status/index.js +15 -7
  614. package/build-module/components/post-pending-status/index.js.map +1 -1
  615. package/build-module/components/post-pingbacks/index.js +16 -5
  616. package/build-module/components/post-pingbacks/index.js.map +1 -1
  617. package/build-module/components/post-preview-button/index.js +47 -21
  618. package/build-module/components/post-preview-button/index.js.map +1 -1
  619. package/build-module/components/post-publish-button/index.js +22 -11
  620. package/build-module/components/post-publish-button/index.js.map +1 -1
  621. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +2 -2
  622. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  623. package/build-module/components/post-publish-panel/index.js +48 -33
  624. package/build-module/components/post-publish-panel/index.js.map +1 -1
  625. package/build-module/components/post-publish-panel/maybe-category-panel.js +13 -9
  626. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  627. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +22 -15
  628. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  629. package/build-module/components/post-publish-panel/maybe-tags-panel.js +14 -10
  630. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  631. package/build-module/components/post-publish-panel/maybe-upload-media.js +30 -24
  632. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  633. package/build-module/components/post-publish-panel/postpublish.js +57 -38
  634. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  635. package/build-module/components/post-publish-panel/prepublish.js +43 -26
  636. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  637. package/build-module/components/post-saved-state/index.js +10 -8
  638. package/build-module/components/post-saved-state/index.js.map +1 -1
  639. package/build-module/components/post-schedule/check.js +9 -0
  640. package/build-module/components/post-schedule/check.js.map +1 -1
  641. package/build-module/components/post-schedule/index.js +30 -6
  642. package/build-module/components/post-schedule/index.js.map +1 -1
  643. package/build-module/components/post-schedule/label.js +17 -0
  644. package/build-module/components/post-schedule/label.js.map +1 -1
  645. package/build-module/components/post-schedule/panel.js +43 -30
  646. package/build-module/components/post-schedule/panel.js.map +1 -1
  647. package/build-module/components/post-slug/check.js +5 -4
  648. package/build-module/components/post-slug/check.js.map +1 -1
  649. package/build-module/components/post-slug/index.js +5 -3
  650. package/build-module/components/post-slug/index.js.map +1 -1
  651. package/build-module/components/post-slug/panel.js +21 -0
  652. package/build-module/components/post-slug/panel.js.map +1 -0
  653. package/build-module/components/post-status/index.js +121 -120
  654. package/build-module/components/post-status/index.js.map +1 -1
  655. package/build-module/components/post-sticky/index.js +17 -9
  656. package/build-module/components/post-sticky/index.js.map +1 -1
  657. package/build-module/components/post-sticky/panel.js +16 -0
  658. package/build-module/components/post-sticky/panel.js.map +1 -0
  659. package/build-module/components/post-switch-to-draft-button/index.js +27 -21
  660. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  661. package/build-module/components/post-sync-status/index.js +8 -6
  662. package/build-module/components/post-sync-status/index.js.map +1 -1
  663. package/build-module/components/post-taxonomies/flat-term-selector.js +22 -18
  664. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  665. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +71 -59
  666. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  667. package/build-module/components/post-taxonomies/index.js +6 -6
  668. package/build-module/components/post-taxonomies/index.js.map +1 -1
  669. package/build-module/components/post-taxonomies/most-used-terms.js +20 -15
  670. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  671. package/build-module/components/post-taxonomies/panel.js +15 -11
  672. package/build-module/components/post-taxonomies/panel.js.map +1 -1
  673. package/build-module/components/post-template/block-theme.js +44 -32
  674. package/build-module/components/post-template/block-theme.js.map +1 -1
  675. package/build-module/components/post-template/classic-theme.js +74 -50
  676. package/build-module/components/post-template/classic-theme.js.map +1 -1
  677. package/build-module/components/post-template/create-new-template-modal.js +34 -27
  678. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  679. package/build-module/components/post-template/create-new-template.js +16 -11
  680. package/build-module/components/post-template/create-new-template.js.map +1 -1
  681. package/build-module/components/post-template/panel.js +17 -9
  682. package/build-module/components/post-template/panel.js.map +1 -1
  683. package/build-module/components/post-template/reset-default-template.js +5 -4
  684. package/build-module/components/post-template/reset-default-template.js.map +1 -1
  685. package/build-module/components/post-template/swap-template-button.js +22 -15
  686. package/build-module/components/post-template/swap-template-button.js.map +1 -1
  687. package/build-module/components/post-text-editor/index.js +30 -19
  688. package/build-module/components/post-text-editor/index.js.map +1 -1
  689. package/build-module/components/post-title/index.js +31 -20
  690. package/build-module/components/post-title/index.js.map +1 -1
  691. package/build-module/components/post-title/index.native.js +81 -57
  692. package/build-module/components/post-title/index.native.js.map +1 -1
  693. package/build-module/components/post-title/post-title-raw.js +13 -4
  694. package/build-module/components/post-title/post-title-raw.js.map +1 -1
  695. package/build-module/components/post-title/use-post-title-focus.js +8 -0
  696. package/build-module/components/post-title/use-post-title-focus.js.map +1 -1
  697. package/build-module/components/post-title/use-post-title.js +6 -0
  698. package/build-module/components/post-title/use-post-title.js.map +1 -1
  699. package/build-module/components/post-transform-panel/hooks.js +83 -0
  700. package/build-module/components/post-transform-panel/hooks.js.map +1 -0
  701. package/build-module/components/post-transform-panel/index.js +94 -0
  702. package/build-module/components/post-transform-panel/index.js.map +1 -0
  703. package/build-module/components/post-trash/index.js +21 -15
  704. package/build-module/components/post-trash/index.js.map +1 -1
  705. package/build-module/components/post-type-support-check/index.js +1 -1
  706. package/build-module/components/post-type-support-check/index.js.map +1 -1
  707. package/build-module/components/post-url/check.js +9 -0
  708. package/build-module/components/post-url/check.js.map +1 -1
  709. package/build-module/components/post-url/index.js +100 -72
  710. package/build-module/components/post-url/index.js.map +1 -1
  711. package/build-module/components/post-url/label.js +12 -0
  712. package/build-module/components/post-url/label.js.map +1 -1
  713. package/build-module/components/post-url/panel.js +35 -24
  714. package/build-module/components/post-url/panel.js.map +1 -1
  715. package/build-module/components/post-view-link/index.js +2 -2
  716. package/build-module/components/post-view-link/index.js.map +1 -1
  717. package/build-module/components/post-visibility/check.js +10 -0
  718. package/build-module/components/post-visibility/check.js.map +1 -1
  719. package/build-module/components/post-visibility/index.js +85 -67
  720. package/build-module/components/post-visibility/index.js.map +1 -1
  721. package/build-module/components/post-visibility/label.js +12 -0
  722. package/build-module/components/post-visibility/label.js.map +1 -1
  723. package/build-module/components/posts-per-page/index.js +103 -0
  724. package/build-module/components/posts-per-page/index.js.map +1 -0
  725. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js +7 -5
  726. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  727. package/build-module/components/preferences-modal/index.js +126 -102
  728. package/build-module/components/preferences-modal/index.js.map +1 -1
  729. package/build-module/components/preview-dropdown/index.js +49 -31
  730. package/build-module/components/preview-dropdown/index.js.map +1 -1
  731. package/build-module/components/provider/index.js +98 -20
  732. package/build-module/components/provider/index.js.map +1 -1
  733. package/build-module/components/provider/index.native.js +58 -20
  734. package/build-module/components/provider/index.native.js.map +1 -1
  735. package/build-module/components/provider/use-block-editor-settings.js +23 -4
  736. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  737. package/build-module/components/provider/with-registry-provider.js +33 -26
  738. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  739. package/build-module/components/resizable-editor/index.js +89 -0
  740. package/build-module/components/resizable-editor/index.js.map +1 -0
  741. package/build-module/components/resizable-editor/resize-handle.js +54 -0
  742. package/build-module/components/resizable-editor/resize-handle.js.map +1 -0
  743. package/build-module/components/save-publish-panels/index.js +37 -26
  744. package/build-module/components/save-publish-panels/index.js.map +1 -1
  745. package/build-module/components/sidebar/constants.js +5 -0
  746. package/build-module/components/sidebar/constants.js.map +1 -0
  747. package/build-module/components/sidebar/header.js +50 -0
  748. package/build-module/components/sidebar/header.js.map +1 -0
  749. package/build-module/components/sidebar/index.js +154 -0
  750. package/build-module/components/sidebar/index.js.map +1 -0
  751. package/build-module/components/sidebar/post-summary.js +85 -0
  752. package/build-module/components/sidebar/post-summary.js.map +1 -0
  753. package/build-module/components/site-discussion/index.js +127 -0
  754. package/build-module/components/site-discussion/index.js.map +1 -0
  755. package/build-module/components/start-page-options/index.js +18 -18
  756. package/build-module/components/start-page-options/index.js.map +1 -1
  757. package/build-module/components/start-template-options/index.js +192 -0
  758. package/build-module/components/start-template-options/index.js.map +1 -0
  759. package/build-module/components/table-of-contents/index.js +4 -4
  760. package/build-module/components/table-of-contents/index.js.map +1 -1
  761. package/build-module/components/table-of-contents/panel.js +55 -35
  762. package/build-module/components/table-of-contents/panel.js.map +1 -1
  763. package/build-module/components/template-areas/index.js +37 -22
  764. package/build-module/components/template-areas/index.js.map +1 -1
  765. package/build-module/components/template-content-panel/index.js +32 -0
  766. package/build-module/components/template-content-panel/index.js.map +1 -0
  767. package/build-module/components/template-validation-notice/index.js +27 -21
  768. package/build-module/components/template-validation-notice/index.js.map +1 -1
  769. package/build-module/components/text-editor/index.js +66 -0
  770. package/build-module/components/text-editor/index.js.map +1 -0
  771. package/build-module/components/time-to-read/index.js +7 -6
  772. package/build-module/components/time-to-read/index.js.map +1 -1
  773. package/build-module/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +5 -4
  774. package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -0
  775. package/build-module/components/{editor-canvas → visual-editor}/index.js +133 -79
  776. package/build-module/components/visual-editor/index.js.map +1 -0
  777. package/build-module/components/word-count/index.js +5 -4
  778. package/build-module/components/word-count/index.js.map +1 -1
  779. package/build-module/hooks/custom-sources-backwards-compatibility.js +2 -2
  780. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  781. package/build-module/hooks/index.js +1 -0
  782. package/build-module/hooks/index.js.map +1 -1
  783. package/build-module/hooks/media-upload.js +7 -0
  784. package/build-module/hooks/media-upload.js.map +1 -0
  785. package/build-module/hooks/pattern-overrides.js +27 -16
  786. package/build-module/hooks/pattern-overrides.js.map +1 -1
  787. package/build-module/private-apis.js +15 -38
  788. package/build-module/private-apis.js.map +1 -1
  789. package/build-module/private-apis.native.js +38 -0
  790. package/build-module/private-apis.native.js.map +1 -0
  791. package/build-module/store/constants.js +3 -0
  792. package/build-module/store/constants.js.map +1 -1
  793. package/build-module/store/private-actions.js +10 -14
  794. package/build-module/store/private-actions.js.map +1 -1
  795. package/build-module/store/private-selectors.js +41 -1
  796. package/build-module/store/private-selectors.js.map +1 -1
  797. package/build-module/store/reducer.js +14 -0
  798. package/build-module/store/reducer.js.map +1 -1
  799. package/build-module/store/selectors.js +1 -1
  800. package/build-module/store/selectors.js.map +1 -1
  801. package/build-module/utils/set-nested-value.js +38 -0
  802. package/build-module/utils/set-nested-value.js.map +1 -0
  803. package/build-style/style-rtl.css +623 -85
  804. package/build-style/style.css +623 -85
  805. package/package.json +43 -37
  806. package/src/bindings/index.js +1 -4
  807. package/src/bindings/pattern-overrides.js +84 -2
  808. package/src/bindings/post-meta.js +46 -6
  809. package/src/components/autocompleters/style.scss +1 -2
  810. package/src/components/block-settings-menu/content-only-settings-menu.js +175 -0
  811. package/src/components/block-settings-menu/content-only-settings-menu.native.js +4 -0
  812. package/src/components/block-settings-menu/style.scss +4 -0
  813. package/src/components/blog-title/index.js +124 -0
  814. package/src/components/blog-title/style.scss +4 -0
  815. package/src/components/collapsible-block-toolbar/index.js +2 -2
  816. package/src/components/commands/index.js +113 -3
  817. package/src/components/create-template-part-modal/index.js +205 -0
  818. package/src/components/create-template-part-modal/style.scss +69 -0
  819. package/src/components/create-template-part-modal/test/utils.js +60 -0
  820. package/src/components/create-template-part-modal/utils.js +67 -0
  821. package/src/components/document-bar/index.js +34 -23
  822. package/src/components/document-outline/item.js +2 -2
  823. package/src/components/document-tools/index.js +21 -28
  824. package/src/components/editor-help/help-get-support-button.native.js +1 -1
  825. package/src/components/editor-interface/content-slot-fill.js +15 -0
  826. package/src/components/editor-interface/index.js +230 -0
  827. package/src/components/editor-notices/index.js +10 -0
  828. package/src/components/entities-saved-states/entity-record-item.js +45 -16
  829. package/src/components/entities-saved-states/style.scss +13 -0
  830. package/src/components/error-boundary/index.js +10 -0
  831. package/src/components/error-boundary/index.native.js +1 -1
  832. package/src/components/global-keyboard-shortcuts/register-shortcuts.js +1 -1
  833. package/src/components/global-styles-provider/index.js +254 -0
  834. package/src/components/header/back-button.js +27 -0
  835. package/src/components/header/index.js +169 -0
  836. package/src/components/header/style.scss +236 -0
  837. package/src/components/inserter-sidebar/index.js +92 -36
  838. package/src/components/inserter-sidebar/style.scss +1 -7
  839. package/src/components/keyboard-shortcut-help-modal/index.js +2 -2
  840. package/src/components/list-view-sidebar/style.scss +1 -0
  841. package/src/components/local-autosave-monitor/index.js +12 -0
  842. package/src/components/page-attributes/order.js +79 -3
  843. package/src/components/page-attributes/panel.js +10 -26
  844. package/src/components/page-attributes/parent.js +98 -2
  845. package/src/components/page-attributes/style.scss +19 -0
  846. package/src/components/page-attributes/test/order.js +5 -1
  847. package/src/components/pattern-duplicate-modal/index.js +50 -0
  848. package/src/components/pattern-rename-modal/index.js +44 -0
  849. package/src/components/post-actions/actions.js +522 -371
  850. package/src/components/post-actions/export-pattern-action.js +74 -0
  851. package/src/components/post-actions/export-pattern-action.native.js +4 -0
  852. package/src/components/post-actions/index.js +20 -42
  853. package/src/components/post-author/combobox.js +1 -0
  854. package/src/components/post-author/hook.js +1 -1
  855. package/src/components/post-author/panel.js +63 -2
  856. package/src/components/post-author/select.js +1 -0
  857. package/src/components/post-author/style.scss +6 -0
  858. package/src/components/post-card-panel/index.js +56 -55
  859. package/src/components/post-card-panel/style.scss +23 -1
  860. package/src/components/post-comments/index.js +52 -9
  861. package/src/components/post-discussion/panel.js +115 -31
  862. package/src/components/post-discussion/style.scss +24 -0
  863. package/src/components/post-excerpt/panel.js +45 -48
  864. package/src/components/post-excerpt/style.scss +0 -17
  865. package/src/components/post-featured-image/check.js +9 -0
  866. package/src/components/post-featured-image/index.js +15 -0
  867. package/src/components/post-featured-image/panel.js +9 -0
  868. package/src/components/post-format/check.js +8 -0
  869. package/src/components/post-format/index.js +15 -4
  870. package/src/components/post-format/panel.js +87 -0
  871. package/src/components/post-format/style.scss +12 -0
  872. package/src/components/post-last-revision/check.js +8 -0
  873. package/src/components/post-last-revision/index.js +7 -2
  874. package/src/components/post-last-revision/panel.js +5 -0
  875. package/src/components/post-last-revision/test/check.js +5 -1
  876. package/src/components/post-locked-modal/index.js +6 -0
  877. package/src/components/post-panel-row/index.js +2 -2
  878. package/src/components/post-panel-row/style.scss +15 -0
  879. package/src/components/post-panel-section/index.js +19 -0
  880. package/src/components/post-panel-section/style.scss +3 -0
  881. package/src/components/post-pending-status/check.js +10 -0
  882. package/src/components/post-pending-status/index.js +5 -0
  883. package/src/components/post-pingbacks/index.js +17 -2
  884. package/src/components/post-preview-button/index.js +15 -0
  885. package/src/components/post-publish-button/index.js +17 -4
  886. package/src/components/post-publish-panel/index.js +1 -0
  887. package/src/components/post-publish-panel/maybe-tags-panel.js +1 -1
  888. package/src/components/post-publish-panel/style.scss +5 -0
  889. package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +3 -3
  890. package/src/components/post-saved-state/index.js +2 -2
  891. package/src/components/post-schedule/check.js +8 -0
  892. package/src/components/post-schedule/index.js +30 -3
  893. package/src/components/post-schedule/label.js +15 -0
  894. package/src/components/post-schedule/panel.js +9 -1
  895. package/src/components/post-schedule/style.scss +0 -11
  896. package/src/components/post-slug/panel.js +22 -0
  897. package/src/components/post-slug/style.scss +5 -0
  898. package/src/components/post-slug/test/index.js +5 -1
  899. package/src/components/post-status/index.js +30 -52
  900. package/src/components/post-status/style.scss +4 -34
  901. package/src/components/post-sticky/index.js +12 -7
  902. package/src/components/post-sticky/panel.js +18 -0
  903. package/src/components/post-sticky/style.scss +3 -0
  904. package/src/components/post-template/block-theme.js +1 -0
  905. package/src/components/post-template/classic-theme.js +15 -0
  906. package/src/components/post-template/panel.js +5 -0
  907. package/src/components/post-template/style.scss +0 -8
  908. package/src/components/post-text-editor/index.js +5 -0
  909. package/src/components/post-title/index.js +10 -3
  910. package/src/components/post-title/index.native.js +70 -35
  911. package/src/components/post-title/post-title-raw.js +10 -2
  912. package/src/components/post-title/use-post-title-focus.js +7 -0
  913. package/src/components/post-title/use-post-title.js +5 -0
  914. package/src/components/post-transform-panel/hooks.js +114 -0
  915. package/src/components/post-transform-panel/index.js +91 -0
  916. package/src/components/post-type-support-check/index.js +1 -1
  917. package/src/components/post-type-support-check/test/index.js +2 -2
  918. package/src/components/post-url/check.js +8 -0
  919. package/src/components/post-url/index.js +41 -24
  920. package/src/components/post-url/label.js +10 -0
  921. package/src/components/post-url/panel.js +6 -1
  922. package/src/components/post-url/style.scss +0 -9
  923. package/src/components/post-visibility/check.js +9 -0
  924. package/src/components/post-visibility/index.js +7 -0
  925. package/src/components/post-visibility/label.js +10 -0
  926. package/src/components/posts-per-page/index.js +101 -0
  927. package/src/components/posts-per-page/style.scss +4 -0
  928. package/src/components/preferences-modal/index.js +3 -3
  929. package/src/components/provider/index.js +72 -0
  930. package/src/components/provider/index.native.js +43 -2
  931. package/src/components/provider/use-block-editor-settings.js +19 -6
  932. package/src/components/provider/with-registry-provider.js +32 -31
  933. package/src/components/resizable-editor/index.js +90 -0
  934. package/src/components/resizable-editor/resize-handle.js +62 -0
  935. package/src/components/resizable-editor/style.scss +53 -0
  936. package/src/components/save-publish-panels/index.js +10 -2
  937. package/src/components/sidebar/constants.js +4 -0
  938. package/src/components/sidebar/header.js +49 -0
  939. package/src/components/sidebar/index.js +196 -0
  940. package/src/components/sidebar/post-summary.js +97 -0
  941. package/src/components/sidebar/style.scss +18 -0
  942. package/src/components/site-discussion/index.js +138 -0
  943. package/src/components/site-discussion/style.scss +19 -0
  944. package/src/components/start-page-options/index.js +6 -4
  945. package/src/components/start-template-options/index.js +219 -0
  946. package/src/components/start-template-options/style.scss +47 -0
  947. package/src/components/template-areas/index.js +15 -6
  948. package/src/components/template-areas/style.scss +0 -1
  949. package/src/components/template-content-panel/index.js +36 -0
  950. package/src/components/text-editor/index.js +57 -0
  951. package/src/components/text-editor/style.scss +71 -0
  952. package/src/components/{editor-canvas → visual-editor}/index.js +191 -110
  953. package/src/components/visual-editor/style.scss +37 -0
  954. package/src/hooks/index.js +1 -0
  955. package/src/hooks/media-upload.js +11 -0
  956. package/src/hooks/pattern-overrides.js +12 -6
  957. package/src/private-apis.js +18 -38
  958. package/src/private-apis.native.js +37 -0
  959. package/src/store/constants.js +7 -0
  960. package/src/store/private-actions.js +22 -50
  961. package/src/store/private-selectors.js +48 -0
  962. package/src/store/reducer.js +12 -0
  963. package/src/store/selectors.js +1 -1
  964. package/src/style.scss +16 -0
  965. package/src/utils/set-nested-value.js +39 -0
  966. package/build/components/editor-canvas/edit-template-blocks-notification.js.map +0 -1
  967. package/build/components/editor-canvas/index.js.map +0 -1
  968. package/build-module/components/editor-canvas/edit-template-blocks-notification.js.map +0 -1
  969. package/build-module/components/editor-canvas/index.js.map +0 -1
  970. package/src/components/post-slug/test/check.js +0 -17
  971. package/src/components/provider/README.md +0 -37
  972. /package/src/components/{editor-canvas → visual-editor}/edit-template-blocks-notification.js +0 -0
@@ -1,4 +1,3 @@
1
- import { createElement, Fragment } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -11,6 +10,9 @@ import { useState } from '@wordpress/element';
11
10
  * Internal dependencies
12
11
  */
13
12
  import { store as editorStore } from '../../store';
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { Fragment as _Fragment } from "react/jsx-runtime";
15
+ import { jsxs as _jsxs } from "react/jsx-runtime";
14
16
  export default function PostTrash() {
15
17
  const {
16
18
  isNew,
@@ -35,19 +37,23 @@ export default function PostTrash() {
35
37
  setShowConfirmDialog(false);
36
38
  trashPost();
37
39
  };
38
- return createElement(Fragment, null, createElement(Button, {
39
- __next40pxDefaultSize: true,
40
- className: "editor-post-trash",
41
- isDestructive: true,
42
- variant: "secondary",
43
- isBusy: isDeleting,
44
- "aria-disabled": isDeleting,
45
- onClick: isDeleting ? undefined : () => setShowConfirmDialog(true)
46
- }, __('Move to trash')), createElement(ConfirmDialog, {
47
- isOpen: showConfirmDialog,
48
- onConfirm: handleConfirm,
49
- onCancel: () => setShowConfirmDialog(false),
50
- confirmButtonText: __('Move to trash')
51
- }, __('Are you sure you want to move this post to the trash?')));
40
+ return /*#__PURE__*/_jsxs(_Fragment, {
41
+ children: [/*#__PURE__*/_jsx(Button, {
42
+ __next40pxDefaultSize: true,
43
+ className: "editor-post-trash",
44
+ isDestructive: true,
45
+ variant: "secondary",
46
+ isBusy: isDeleting,
47
+ "aria-disabled": isDeleting,
48
+ onClick: isDeleting ? undefined : () => setShowConfirmDialog(true),
49
+ children: __('Move to trash')
50
+ }), /*#__PURE__*/_jsx(ConfirmDialog, {
51
+ isOpen: showConfirmDialog,
52
+ onConfirm: handleConfirm,
53
+ onCancel: () => setShowConfirmDialog(false),
54
+ confirmButtonText: __('Move to trash'),
55
+ children: __('Are you sure you want to move this post to the trash?')
56
+ })]
57
+ });
52
58
  }
53
59
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__","Button","__experimentalConfirmDialog","ConfirmDialog","useSelect","useDispatch","useState","store","editorStore","PostTrash","isNew","isDeleting","postId","select","isEditedPostNew","isDeletingPost","getCurrentPostId","trashPost","showConfirmDialog","setShowConfirmDialog","handleConfirm","createElement","Fragment","__next40pxDefaultSize","className","isDestructive","variant","isBusy","onClick","undefined","isOpen","onConfirm","onCancel","confirmButtonText"],"sources":["@wordpress/editor/src/components/post-trash/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tButton,\n\t__experimentalConfirmDialog as ConfirmDialog,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function PostTrash() {\n\tconst { isNew, isDeleting, postId } = useSelect( ( select ) => {\n\t\tconst store = select( editorStore );\n\t\treturn {\n\t\t\tisNew: store.isEditedPostNew(),\n\t\t\tisDeleting: store.isDeletingPost(),\n\t\t\tpostId: store.getCurrentPostId(),\n\t\t};\n\t}, [] );\n\tconst { trashPost } = useDispatch( editorStore );\n\tconst [ showConfirmDialog, setShowConfirmDialog ] = useState( false );\n\n\tif ( isNew || ! postId ) {\n\t\treturn null;\n\t}\n\n\tconst handleConfirm = () => {\n\t\tsetShowConfirmDialog( false );\n\t\ttrashPost();\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tclassName=\"editor-post-trash\"\n\t\t\t\tisDestructive\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tisBusy={ isDeleting }\n\t\t\t\taria-disabled={ isDeleting }\n\t\t\t\tonClick={\n\t\t\t\t\tisDeleting ? undefined : () => setShowConfirmDialog( true )\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{ __( 'Move to trash' ) }\n\t\t\t</Button>\n\t\t\t<ConfirmDialog\n\t\t\t\tisOpen={ showConfirmDialog }\n\t\t\t\tonConfirm={ handleConfirm }\n\t\t\t\tonCancel={ () => setShowConfirmDialog( false ) }\n\t\t\t\tconfirmButtonText={ __( 'Move to trash' ) }\n\t\t\t>\n\t\t\t\t{ __(\n\t\t\t\t\t'Are you sure you want to move this post to the trash?'\n\t\t\t\t) }\n\t\t\t</ConfirmDialog>\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SACCC,MAAM,EACNC,2BAA2B,IAAIC,aAAa,QACtC,uBAAuB;AAC9B,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,QAAQ,QAAQ,oBAAoB;;AAE7C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,WAAW,QAAQ,aAAa;AAElD,eAAe,SAASC,SAASA,CAAA,EAAG;EACnC,MAAM;IAAEC,KAAK;IAAEC,UAAU;IAAEC;EAAO,CAAC,GAAGR,SAAS,CAAIS,MAAM,IAAM;IAC9D,MAAMN,KAAK,GAAGM,MAAM,CAAEL,WAAY,CAAC;IACnC,OAAO;MACNE,KAAK,EAAEH,KAAK,CAACO,eAAe,CAAC,CAAC;MAC9BH,UAAU,EAAEJ,KAAK,CAACQ,cAAc,CAAC,CAAC;MAClCH,MAAM,EAAEL,KAAK,CAACS,gBAAgB,CAAC;IAChC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,MAAM;IAAEC;EAAU,CAAC,GAAGZ,WAAW,CAAEG,WAAY,CAAC;EAChD,MAAM,CAAEU,iBAAiB,EAAEC,oBAAoB,CAAE,GAAGb,QAAQ,CAAE,KAAM,CAAC;EAErE,IAAKI,KAAK,IAAI,CAAEE,MAAM,EAAG;IACxB,OAAO,IAAI;EACZ;EAEA,MAAMQ,aAAa,GAAGA,CAAA,KAAM;IAC3BD,oBAAoB,CAAE,KAAM,CAAC;IAC7BF,SAAS,CAAC,CAAC;EACZ,CAAC;EAED,OACCI,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACpB,MAAM;IACNsB,qBAAqB;IACrBC,SAAS,EAAC,mBAAmB;IAC7BC,aAAa;IACbC,OAAO,EAAC,WAAW;IACnBC,MAAM,EAAGhB,UAAY;IACrB,iBAAgBA,UAAY;IAC5BiB,OAAO,EACNjB,UAAU,GAAGkB,SAAS,GAAG,MAAMV,oBAAoB,CAAE,IAAK;EAC1D,GAECnB,EAAE,CAAE,eAAgB,CACf,CAAC,EACTqB,aAAA,CAAClB,aAAa;IACb2B,MAAM,EAAGZ,iBAAmB;IAC5Ba,SAAS,EAAGX,aAAe;IAC3BY,QAAQ,EAAGA,CAAA,KAAMb,oBAAoB,CAAE,KAAM,CAAG;IAChDc,iBAAiB,EAAGjC,EAAE,CAAE,eAAgB;EAAG,GAEzCA,EAAE,CACH,uDACD,CACc,CACd,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["__","Button","__experimentalConfirmDialog","ConfirmDialog","useSelect","useDispatch","useState","store","editorStore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","PostTrash","isNew","isDeleting","postId","select","isEditedPostNew","isDeletingPost","getCurrentPostId","trashPost","showConfirmDialog","setShowConfirmDialog","handleConfirm","children","__next40pxDefaultSize","className","isDestructive","variant","isBusy","onClick","undefined","isOpen","onConfirm","onCancel","confirmButtonText"],"sources":["@wordpress/editor/src/components/post-trash/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tButton,\n\t__experimentalConfirmDialog as ConfirmDialog,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function PostTrash() {\n\tconst { isNew, isDeleting, postId } = useSelect( ( select ) => {\n\t\tconst store = select( editorStore );\n\t\treturn {\n\t\t\tisNew: store.isEditedPostNew(),\n\t\t\tisDeleting: store.isDeletingPost(),\n\t\t\tpostId: store.getCurrentPostId(),\n\t\t};\n\t}, [] );\n\tconst { trashPost } = useDispatch( editorStore );\n\tconst [ showConfirmDialog, setShowConfirmDialog ] = useState( false );\n\n\tif ( isNew || ! postId ) {\n\t\treturn null;\n\t}\n\n\tconst handleConfirm = () => {\n\t\tsetShowConfirmDialog( false );\n\t\ttrashPost();\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tclassName=\"editor-post-trash\"\n\t\t\t\tisDestructive\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tisBusy={ isDeleting }\n\t\t\t\taria-disabled={ isDeleting }\n\t\t\t\tonClick={\n\t\t\t\t\tisDeleting ? undefined : () => setShowConfirmDialog( true )\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{ __( 'Move to trash' ) }\n\t\t\t</Button>\n\t\t\t<ConfirmDialog\n\t\t\t\tisOpen={ showConfirmDialog }\n\t\t\t\tonConfirm={ handleConfirm }\n\t\t\t\tonCancel={ () => setShowConfirmDialog( false ) }\n\t\t\t\tconfirmButtonText={ __( 'Move to trash' ) }\n\t\t\t>\n\t\t\t\t{ __(\n\t\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ACN2B,qBAAqB;MACrBC,SAAS,EAAC,mBAAmB;MAC7BC,aAAa;MACbC,OAAO,EAAC,WAAW;MACnBC,MAAM,EAAGf,UAAY;MACrB,iBAAgBA,UAAY;MAC5BgB,OAAO,EACNhB,UAAU,GAAGiB,SAAS,GAAG,MAAMT,oBAAoB,CAAE,IAAK,CAC1D;MAAAE,QAAA,EAEC3B,EAAE,CAAE,eAAgB;IAAC,CAChB,CAAC,eACTU,IAAA,CAACP,aAAa;MACbgC,MAAM,EAAGX,iBAAmB;MAC5BY,SAAS,EAAGV,aAAe;MAC3BW,QAAQ,EAAGA,CAAA,KAAMZ,oBAAoB,CAAE,KAAM,CAAG;MAChDa,iBAAiB,EAAGtC,EAAE,CAAE,eAAgB,CAAG;MAAA2B,QAAA,EAEzC3B,EAAE,CACH,uDACD;IAAC,CACa,CAAC;EAAA,CACf,CAAC;AAEL","ignoreList":[]}
@@ -34,7 +34,7 @@ function PostTypeSupportCheck({
34
34
  } = select(coreStore);
35
35
  return getPostType(getEditedPostAttribute('type'));
36
36
  }, []);
37
- let isSupported = true;
37
+ let isSupported = !!postType;
38
38
  if (postType) {
39
39
  isSupported = (Array.isArray(supportKeys) ? supportKeys : [supportKeys]).some(key => !!postType.supports[key]);
40
40
  }
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","store","coreStore","editorStore","PostTypeSupportCheck","children","supportKeys","postType","select","getEditedPostAttribute","getPostType","isSupported","Array","isArray","some","key","supports"],"sources":["@wordpress/editor/src/components/post-type-support-check/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * A component which renders its own children only if the current editor post\n * type supports one of the given `supportKeys` prop.\n *\n * @param {Object} props Props.\n * @param {Element} props.children Children to be rendered if post\n * type supports.\n * @param {(string|string[])} props.supportKeys String or string array of keys\n * to test.\n *\n * @return {Component} The component to be rendered.\n */\nfunction PostTypeSupportCheck( { children, supportKeys } ) {\n\tconst postType = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\treturn getPostType( getEditedPostAttribute( 'type' ) );\n\t}, [] );\n\tlet isSupported = true;\n\tif ( postType ) {\n\t\tisSupported = (\n\t\t\tArray.isArray( supportKeys ) ? supportKeys : [ supportKeys ]\n\t\t).some( ( key ) => !! postType.supports[ key ] );\n\t}\n\n\tif ( ! isSupported ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default PostTypeSupportCheck;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,SAASD,KAAK,IAAIE,WAAW,QAAQ,aAAa;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,oBAAoBA,CAAE;EAAEC,QAAQ;EAAEC;AAAY,CAAC,EAAG;EAC1D,MAAMC,QAAQ,GAAGP,SAAS,CAAIQ,MAAM,IAAM;IACzC,MAAM;MAAEC;IAAuB,CAAC,GAAGD,MAAM,CAAEL,WAAY,CAAC;IACxD,MAAM;MAAEO;IAAY,CAAC,GAAGF,MAAM,CAAEN,SAAU,CAAC;IAC3C,OAAOQ,WAAW,CAAED,sBAAsB,CAAE,MAAO,CAAE,CAAC;EACvD,CAAC,EAAE,EAAG,CAAC;EACP,IAAIE,WAAW,GAAG,IAAI;EACtB,IAAKJ,QAAQ,EAAG;IACfI,WAAW,GAAG,CACbC,KAAK,CAACC,OAAO,CAAEP,WAAY,CAAC,GAAGA,WAAW,GAAG,CAAEA,WAAW,CAAE,EAC3DQ,IAAI,CAAIC,GAAG,IAAM,CAAC,CAAER,QAAQ,CAACS,QAAQ,CAAED,GAAG,CAAG,CAAC;EACjD;EAEA,IAAK,CAAEJ,WAAW,EAAG;IACpB,OAAO,IAAI;EACZ;EAEA,OAAON,QAAQ;AAChB;AAEA,eAAeD,oBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["useSelect","store","coreStore","editorStore","PostTypeSupportCheck","children","supportKeys","postType","select","getEditedPostAttribute","getPostType","isSupported","Array","isArray","some","key","supports"],"sources":["@wordpress/editor/src/components/post-type-support-check/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * A component which renders its own children only if the current editor post\n * type supports one of the given `supportKeys` prop.\n *\n * @param {Object} props Props.\n * @param {Element} props.children Children to be rendered if post\n * type supports.\n * @param {(string|string[])} props.supportKeys String or string array of keys\n * to test.\n *\n * @return {Component} The component to be rendered.\n */\nfunction PostTypeSupportCheck( { children, supportKeys } ) {\n\tconst postType = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\treturn getPostType( getEditedPostAttribute( 'type' ) );\n\t}, [] );\n\tlet isSupported = !! postType;\n\tif ( postType ) {\n\t\tisSupported = (\n\t\t\tArray.isArray( supportKeys ) ? supportKeys : [ supportKeys ]\n\t\t).some( ( key ) => !! postType.supports[ key ] );\n\t}\n\n\tif ( ! isSupported ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default PostTypeSupportCheck;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,SAASD,KAAK,IAAIE,WAAW,QAAQ,aAAa;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,oBAAoBA,CAAE;EAAEC,QAAQ;EAAEC;AAAY,CAAC,EAAG;EAC1D,MAAMC,QAAQ,GAAGP,SAAS,CAAIQ,MAAM,IAAM;IACzC,MAAM;MAAEC;IAAuB,CAAC,GAAGD,MAAM,CAAEL,WAAY,CAAC;IACxD,MAAM;MAAEO;IAAY,CAAC,GAAGF,MAAM,CAAEN,SAAU,CAAC;IAC3C,OAAOQ,WAAW,CAAED,sBAAsB,CAAE,MAAO,CAAE,CAAC;EACvD,CAAC,EAAE,EAAG,CAAC;EACP,IAAIE,WAAW,GAAG,CAAC,CAAEJ,QAAQ;EAC7B,IAAKA,QAAQ,EAAG;IACfI,WAAW,GAAG,CACbC,KAAK,CAACC,OAAO,CAAEP,WAAY,CAAC,GAAGA,WAAW,GAAG,CAAEA,WAAW,CAAE,EAC3DQ,IAAI,CAAIC,GAAG,IAAM,CAAC,CAAER,QAAQ,CAACS,QAAQ,CAAED,GAAG,CAAG,CAAC;EACjD;EAEA,IAAK,CAAEJ,WAAW,EAAG;IACpB,OAAO,IAAI;EACZ;EAEA,OAAON,QAAQ;AAChB;AAEA,eAAeD,oBAAoB","ignoreList":[]}
@@ -8,6 +8,15 @@ import { store as coreStore } from '@wordpress/core-data';
8
8
  * Internal dependencies
9
9
  */
10
10
  import { store as editorStore } from '../../store';
11
+
12
+ /**
13
+ * Check if the post URL is valid and visible.
14
+ *
15
+ * @param {Object} props The component props.
16
+ * @param {Element} props.children The child components.
17
+ *
18
+ * @return {Component|null} The child components if the post URL is valid and visible, otherwise null.
19
+ */
11
20
  export default function PostURLCheck({
12
21
  children
13
22
  }) {
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","store","coreStore","editorStore","PostURLCheck","children","isVisible","select","postTypeSlug","getCurrentPostType","postType","getPostType","viewable","post","getCurrentPost","link","permalinkParts","getPermalinkParts"],"sources":["@wordpress/editor/src/components/post-url/check.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function PostURLCheck( { children } ) {\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\tif ( ! postType?.viewable ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\tif ( ! post.link ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst permalinkParts = select( editorStore ).getPermalinkParts();\n\t\tif ( ! permalinkParts ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}, [] );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,SAASD,KAAK,IAAIE,WAAW,QAAQ,aAAa;AAElD,eAAe,SAASC,YAAYA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACpD,MAAMC,SAAS,GAAGN,SAAS,CAAIO,MAAM,IAAM;IAC1C,MAAMC,YAAY,GAAGD,MAAM,CAAEJ,WAAY,CAAC,CAACM,kBAAkB,CAAC,CAAC;IAC/D,MAAMC,QAAQ,GAAGH,MAAM,CAAEL,SAAU,CAAC,CAACS,WAAW,CAAEH,YAAa,CAAC;IAChE,IAAK,CAAEE,QAAQ,EAAEE,QAAQ,EAAG;MAC3B,OAAO,KAAK;IACb;IAEA,MAAMC,IAAI,GAAGN,MAAM,CAAEJ,WAAY,CAAC,CAACW,cAAc,CAAC,CAAC;IACnD,IAAK,CAAED,IAAI,CAACE,IAAI,EAAG;MAClB,OAAO,KAAK;IACb;IAEA,MAAMC,cAAc,GAAGT,MAAM,CAAEJ,WAAY,CAAC,CAACc,iBAAiB,CAAC,CAAC;IAChE,IAAK,CAAED,cAAc,EAAG;MACvB,OAAO,KAAK;IACb;IAEA,OAAO,IAAI;EACZ,CAAC,EAAE,EAAG,CAAC;EAEP,IAAK,CAAEV,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,OAAOD,QAAQ;AAChB","ignoreList":[]}
1
+ {"version":3,"names":["useSelect","store","coreStore","editorStore","PostURLCheck","children","isVisible","select","postTypeSlug","getCurrentPostType","postType","getPostType","viewable","post","getCurrentPost","link","permalinkParts","getPermalinkParts"],"sources":["@wordpress/editor/src/components/post-url/check.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Check if the post URL is valid and visible.\n *\n * @param {Object} props The component props.\n * @param {Element} props.children The child components.\n *\n * @return {Component|null} The child components if the post URL is valid and visible, otherwise null.\n */\nexport default function PostURLCheck( { children } ) {\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\tif ( ! postType?.viewable ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\tif ( ! post.link ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst permalinkParts = select( editorStore ).getPermalinkParts();\n\t\tif ( ! permalinkParts ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}, [] );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,SAASD,KAAK,IAAIE,WAAW,QAAQ,aAAa;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,YAAYA,CAAE;EAAEC;AAAS,CAAC,EAAG;EACpD,MAAMC,SAAS,GAAGN,SAAS,CAAIO,MAAM,IAAM;IAC1C,MAAMC,YAAY,GAAGD,MAAM,CAAEJ,WAAY,CAAC,CAACM,kBAAkB,CAAC,CAAC;IAC/D,MAAMC,QAAQ,GAAGH,MAAM,CAAEL,SAAU,CAAC,CAACS,WAAW,CAAEH,YAAa,CAAC;IAChE,IAAK,CAAEE,QAAQ,EAAEE,QAAQ,EAAG;MAC3B,OAAO,KAAK;IACb;IAEA,MAAMC,IAAI,GAAGN,MAAM,CAAEJ,WAAY,CAAC,CAACW,cAAc,CAAC,CAAC;IACnD,IAAK,CAAED,IAAI,CAACE,IAAI,EAAG;MAClB,OAAO,KAAK;IACb;IAEA,MAAMC,cAAc,GAAGT,MAAM,CAAEJ,WAAY,CAAC,CAACc,iBAAiB,CAAC,CAAC;IAChE,IAAK,CAAED,cAAc,EAAG;MACvB,OAAO,KAAK;IACb;IAEA,OAAO,IAAI;EACZ,CAAC,EAAE,EAAG,CAAC;EAEP,IAAK,CAAEV,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,OAAOD,QAAQ;AAChB","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -16,8 +15,22 @@ import { useCopyToClipboard } from '@wordpress/compose';
16
15
  /**
17
16
  * Internal dependencies
18
17
  */
19
- import { usePostURLLabel } from './label';
20
18
  import { store as editorStore } from '../../store';
19
+
20
+ /**
21
+ * Renders the `PostURL` component.
22
+ *
23
+ * @example
24
+ * ```jsx
25
+ * <PostURL />
26
+ * ```
27
+ *
28
+ * @param {Function} onClose Callback function to be executed when the popover is closed.
29
+ *
30
+ * @return {Component} The rendered PostURL component.
31
+ */
32
+ import { jsx as _jsx } from "react/jsx-runtime";
33
+ import { jsxs as _jsxs } from "react/jsx-runtime";
21
34
  export default function PostURL({
22
35
  onClose
23
36
  }) {
@@ -26,7 +39,8 @@ export default function PostURL({
26
39
  postSlug,
27
40
  postLink,
28
41
  permalinkPrefix,
29
- permalinkSuffix
42
+ permalinkSuffix,
43
+ permalink
30
44
  } = useSelect(select => {
31
45
  var _post$_links$wpActio;
32
46
  const post = select(editorStore).getCurrentPost();
@@ -40,7 +54,8 @@ export default function PostURL({
40
54
  viewPostLabel: postType?.labels.view_item,
41
55
  postLink: post.link,
42
56
  permalinkPrefix: permalinkParts?.prefix,
43
- permalinkSuffix: permalinkParts?.suffix
57
+ permalinkSuffix: permalinkParts?.suffix,
58
+ permalink: safeDecodeURIComponent(select(editorStore).getPermalink())
44
59
  };
45
60
  }, []);
46
61
  const {
@@ -50,78 +65,91 @@ export default function PostURL({
50
65
  createNotice
51
66
  } = useDispatch(noticesStore);
52
67
  const [forceEmptyField, setForceEmptyField] = useState(false);
53
- const postUrlLabel = usePostURLLabel();
54
- const copyButtonRef = useCopyToClipboard(postUrlLabel, () => {
68
+ const copyButtonRef = useCopyToClipboard(permalink, () => {
55
69
  createNotice('info', __('Copied URL to clipboard.'), {
56
70
  isDismissible: true,
57
71
  type: 'snackbar'
58
72
  });
59
73
  });
60
- return createElement("div", {
61
- className: "editor-post-url"
62
- }, createElement(InspectorPopoverHeader, {
63
- title: __('Link'),
64
- onClose: onClose
65
- }), createElement(VStack, {
66
- spacing: 3
67
- }, isEditable && createElement("div", null, __('Customize the last part of the URL. '), createElement(ExternalLink, {
68
- href: __('https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink')
69
- }, __('Learn more.'))), createElement("div", null, isEditable && createElement(InputControl, {
70
- __next40pxDefaultSize: true,
71
- prefix: createElement(InputControlPrefixWrapper, null, "/"),
72
- suffix: createElement(Button, {
73
- icon: copySmall,
74
- ref: copyButtonRef,
75
- label: __('Copy')
76
- }),
77
- label: __('Link'),
78
- hideLabelFromVision: true,
79
- value: forceEmptyField ? '' : postSlug,
80
- autoComplete: "off",
81
- spellCheck: "false",
82
- type: "text",
83
- className: "editor-post-url__input",
84
- onChange: newValue => {
85
- editPost({
86
- slug: newValue
87
- });
88
- // When we delete the field the permalink gets
89
- // reverted to the original value.
90
- // The forceEmptyField logic allows the user to have
91
- // the field temporarily empty while typing.
92
- if (!newValue) {
93
- if (!forceEmptyField) {
94
- setForceEmptyField(true);
95
- }
96
- return;
97
- }
98
- if (forceEmptyField) {
99
- setForceEmptyField(false);
100
- }
101
- },
102
- onBlur: event => {
103
- editPost({
104
- slug: cleanForSlug(event.target.value)
105
- });
106
- if (forceEmptyField) {
107
- setForceEmptyField(false);
108
- }
109
- },
110
- help: createElement(ExternalLink, {
111
- className: "editor-post-url__link",
112
- href: postLink,
113
- target: "_blank"
114
- }, createElement("span", {
115
- className: "editor-post-url__link-prefix"
116
- }, permalinkPrefix), createElement("span", {
117
- className: "editor-post-url__link-slug"
118
- }, postSlug), createElement("span", {
119
- className: "editor-post-url__link-suffix"
120
- }, permalinkSuffix))
121
- }), !isEditable && createElement(ExternalLink, {
122
- className: "editor-post-url__link",
123
- href: postLink,
124
- target: "_blank"
125
- }, postLink))));
74
+ return /*#__PURE__*/_jsxs("div", {
75
+ className: "editor-post-url",
76
+ children: [/*#__PURE__*/_jsx(InspectorPopoverHeader, {
77
+ title: __('Link'),
78
+ onClose: onClose
79
+ }), /*#__PURE__*/_jsxs(VStack, {
80
+ spacing: 3,
81
+ children: [isEditable && /*#__PURE__*/_jsxs("div", {
82
+ children: [__('Customize the last part of the URL. '), /*#__PURE__*/_jsx(ExternalLink, {
83
+ href: __('https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink'),
84
+ children: __('Learn more.')
85
+ })]
86
+ }), /*#__PURE__*/_jsxs("div", {
87
+ children: [isEditable && /*#__PURE__*/_jsx(InputControl, {
88
+ __next40pxDefaultSize: true,
89
+ prefix: /*#__PURE__*/_jsx(InputControlPrefixWrapper, {
90
+ children: "/"
91
+ }),
92
+ suffix: /*#__PURE__*/_jsx(Button, {
93
+ icon: copySmall,
94
+ ref: copyButtonRef,
95
+ label: __('Copy')
96
+ }),
97
+ label: __('Link'),
98
+ hideLabelFromVision: true,
99
+ value: forceEmptyField ? '' : postSlug,
100
+ autoComplete: "off",
101
+ spellCheck: "false",
102
+ type: "text",
103
+ className: "editor-post-url__input",
104
+ onChange: newValue => {
105
+ editPost({
106
+ slug: newValue
107
+ });
108
+ // When we delete the field the permalink gets
109
+ // reverted to the original value.
110
+ // The forceEmptyField logic allows the user to have
111
+ // the field temporarily empty while typing.
112
+ if (!newValue) {
113
+ if (!forceEmptyField) {
114
+ setForceEmptyField(true);
115
+ }
116
+ return;
117
+ }
118
+ if (forceEmptyField) {
119
+ setForceEmptyField(false);
120
+ }
121
+ },
122
+ onBlur: event => {
123
+ editPost({
124
+ slug: cleanForSlug(event.target.value)
125
+ });
126
+ if (forceEmptyField) {
127
+ setForceEmptyField(false);
128
+ }
129
+ },
130
+ help: /*#__PURE__*/_jsxs(ExternalLink, {
131
+ className: "editor-post-url__link",
132
+ href: postLink,
133
+ target: "_blank",
134
+ children: [/*#__PURE__*/_jsx("span", {
135
+ className: "editor-post-url__link-prefix",
136
+ children: permalinkPrefix
137
+ }), /*#__PURE__*/_jsx("span", {
138
+ className: "editor-post-url__link-slug",
139
+ children: postSlug
140
+ }), /*#__PURE__*/_jsx("span", {
141
+ className: "editor-post-url__link-suffix",
142
+ children: permalinkSuffix
143
+ })]
144
+ })
145
+ }), !isEditable && /*#__PURE__*/_jsx(ExternalLink, {
146
+ className: "editor-post-url__link",
147
+ href: postLink,
148
+ target: "_blank",
149
+ children: postLink
150
+ })]
151
+ })]
152
+ })]
153
+ });
126
154
  }
127
155
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","useDispatch","safeDecodeURIComponent","cleanForSlug","useState","__experimentalInspectorPopoverHeader","InspectorPopoverHeader","__","ExternalLink","Button","__experimentalInputControl","InputControl","__experimentalInputControlPrefixWrapper","InputControlPrefixWrapper","__experimentalVStack","VStack","store","noticesStore","copySmall","coreStore","useCopyToClipboard","usePostURLLabel","editorStore","PostURL","onClose","isEditable","postSlug","postLink","permalinkPrefix","permalinkSuffix","select","_post$_links$wpActio","post","getCurrentPost","postTypeSlug","getCurrentPostType","postType","getPostType","permalinkParts","getPermalinkParts","hasPublishAction","_links","isPermalinkEditable","getEditedPostSlug","viewPostLabel","labels","view_item","link","prefix","suffix","editPost","createNotice","forceEmptyField","setForceEmptyField","postUrlLabel","copyButtonRef","isDismissible","type","createElement","className","title","spacing","href","__next40pxDefaultSize","icon","ref","label","hideLabelFromVision","value","autoComplete","spellCheck","onChange","newValue","slug","onBlur","event","target","help"],"sources":["@wordpress/editor/src/components/post-url/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { safeDecodeURIComponent, cleanForSlug } from '@wordpress/url';\nimport { useState } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tExternalLink,\n\tButton,\n\t__experimentalInputControl as InputControl,\n\t__experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { copySmall } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useCopyToClipboard } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { usePostURLLabel } from './label';\nimport { store as editorStore } from '../../store';\n\nexport default function PostURL( { onClose } ) {\n\tconst { isEditable, postSlug, postLink, permalinkPrefix, permalinkSuffix } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst post = select( editorStore ).getCurrentPost();\n\t\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\t\tconst permalinkParts = select( editorStore ).getPermalinkParts();\n\t\t\tconst hasPublishAction =\n\t\t\t\tpost?._links?.[ 'wp:action-publish' ] ?? false;\n\n\t\t\treturn {\n\t\t\t\tisEditable:\n\t\t\t\t\tselect( editorStore ).isPermalinkEditable() &&\n\t\t\t\t\thasPublishAction,\n\t\t\t\tpostSlug: safeDecodeURIComponent(\n\t\t\t\t\tselect( editorStore ).getEditedPostSlug()\n\t\t\t\t),\n\t\t\t\tviewPostLabel: postType?.labels.view_item,\n\t\t\t\tpostLink: post.link,\n\t\t\t\tpermalinkPrefix: permalinkParts?.prefix,\n\t\t\t\tpermalinkSuffix: permalinkParts?.suffix,\n\t\t\t};\n\t\t}, [] );\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst [ forceEmptyField, setForceEmptyField ] = useState( false );\n\tconst postUrlLabel = usePostURLLabel();\n\tconst copyButtonRef = useCopyToClipboard( postUrlLabel, () => {\n\t\tcreateNotice( 'info', __( 'Copied URL to clipboard.' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t} );\n\treturn (\n\t\t<div className=\"editor-post-url\">\n\t\t\t<InspectorPopoverHeader\n\t\t\t\ttitle={ __( 'Link' ) }\n\t\t\t\tonClose={ onClose }\n\t\t\t/>\n\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t{ isEditable && (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t{ __( 'Customize the last part of the URL. ' ) }\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Learn more.' ) }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t\t<div>\n\t\t\t\t\t{ isEditable && (\n\t\t\t\t\t\t<InputControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tprefix={\n\t\t\t\t\t\t\t\t<InputControlPrefixWrapper>\n\t\t\t\t\t\t\t\t\t/\n\t\t\t\t\t\t\t\t</InputControlPrefixWrapper>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsuffix={\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ticon={ copySmall }\n\t\t\t\t\t\t\t\t\tref={ copyButtonRef }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Copy' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlabel={ __( 'Link' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\tvalue={ forceEmptyField ? '' : postSlug }\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tclassName=\"editor-post-url__input\"\n\t\t\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\t\teditPost( { slug: newValue } );\n\t\t\t\t\t\t\t\t// When we delete the field the permalink gets\n\t\t\t\t\t\t\t\t// reverted to the original value.\n\t\t\t\t\t\t\t\t// The forceEmptyField logic allows the user to have\n\t\t\t\t\t\t\t\t// the field temporarily empty while typing.\n\t\t\t\t\t\t\t\tif ( ! newValue ) {\n\t\t\t\t\t\t\t\t\tif ( ! forceEmptyField ) {\n\t\t\t\t\t\t\t\t\t\tsetForceEmptyField( true );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( forceEmptyField ) {\n\t\t\t\t\t\t\t\t\tsetForceEmptyField( false );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonBlur={ ( event ) => {\n\t\t\t\t\t\t\t\teditPost( {\n\t\t\t\t\t\t\t\t\tslug: cleanForSlug( event.target.value ),\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\tif ( forceEmptyField ) {\n\t\t\t\t\t\t\t\t\tsetForceEmptyField( false );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\tclassName=\"editor-post-url__link\"\n\t\t\t\t\t\t\t\t\thref={ postLink }\n\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span className=\"editor-post-url__link-prefix\">\n\t\t\t\t\t\t\t\t\t\t{ permalinkPrefix }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<span className=\"editor-post-url__link-slug\">\n\t\t\t\t\t\t\t\t\t\t{ postSlug }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<span className=\"editor-post-url__link-suffix\">\n\t\t\t\t\t\t\t\t\t\t{ permalinkSuffix }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! isEditable && (\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\tclassName=\"editor-post-url__link\"\n\t\t\t\t\t\t\thref={ postLink }\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ postLink }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</VStack>\n\t\t</div>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,sBAAsB,EAAEC,YAAY,QAAQ,gBAAgB;AACrE,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,oCAAoC,IAAIC,sBAAsB,QAAQ,yBAAyB;AACxG,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,YA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AuB;IACjCG,IAAI,EAAGnC,QAAU;IACjBiD,MAAM,EAAC;EAAQ,GAEbjD,QACW,CAEX,CACE,CACJ,CAAC;AAER","ignoreList":[]}
1
+ {"version":3,"names":["useSelect","useDispatch","safeDecodeURIComponent","cleanForSlug","useState","__experimentalInspectorPopoverHeader","InspectorPopoverHeader","__","ExternalLink","Button","__experimentalInputControl","InputControl","__experimentalInputControlPrefixWrapper","InputControlPrefixWrapper","__experimentalVStack","VStack","store","noticesStore","copySmall","coreStore","useCopyToClipboard","editorStore","jsx","_jsx","jsxs","_jsxs","PostURL","onClose","isEditable","postSlug","postLink","permalinkPrefix","permalinkSuffix","permalink","select","_post$_links$wpActio","post","getCurrentPost","postTypeSlug","getCurrentPostType","postType","getPostType","permalinkParts","getPermalinkParts","hasPublishAction","_links","isPermalinkEditable","getEditedPostSlug","viewPostLabel","labels","view_item","link","prefix","suffix","getPermalink","editPost","createNotice","forceEmptyField","setForceEmptyField","copyButtonRef","isDismissible","type","className","children","title","spacing","href","__next40pxDefaultSize","icon","ref","label","hideLabelFromVision","value","autoComplete","spellCheck","onChange","newValue","slug","onBlur","event","target","help"],"sources":["@wordpress/editor/src/components/post-url/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { safeDecodeURIComponent, cleanForSlug } from '@wordpress/url';\nimport { useState } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tExternalLink,\n\tButton,\n\t__experimentalInputControl as InputControl,\n\t__experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { copySmall } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useCopyToClipboard } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the `PostURL` component.\n *\n * @example\n * ```jsx\n * <PostURL />\n * ```\n *\n * @param {Function} onClose Callback function to be executed when the popover is closed.\n *\n * @return {Component} The rendered PostURL component.\n */\nexport default function PostURL( { onClose } ) {\n\tconst {\n\t\tisEditable,\n\t\tpostSlug,\n\t\tpostLink,\n\t\tpermalinkPrefix,\n\t\tpermalinkSuffix,\n\t\tpermalink,\n\t} = useSelect( ( select ) => {\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\tconst permalinkParts = select( editorStore ).getPermalinkParts();\n\t\tconst hasPublishAction = post?._links?.[ 'wp:action-publish' ] ?? false;\n\n\t\treturn {\n\t\t\tisEditable:\n\t\t\t\tselect( editorStore ).isPermalinkEditable() && hasPublishAction,\n\t\t\tpostSlug: safeDecodeURIComponent(\n\t\t\t\tselect( editorStore ).getEditedPostSlug()\n\t\t\t),\n\t\t\tviewPostLabel: postType?.labels.view_item,\n\t\t\tpostLink: post.link,\n\t\t\tpermalinkPrefix: permalinkParts?.prefix,\n\t\t\tpermalinkSuffix: permalinkParts?.suffix,\n\t\t\tpermalink: safeDecodeURIComponent(\n\t\t\t\tselect( editorStore ).getPermalink()\n\t\t\t),\n\t\t};\n\t}, [] );\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst [ forceEmptyField, setForceEmptyField ] = useState( false );\n\tconst copyButtonRef = useCopyToClipboard( permalink, () => {\n\t\tcreateNotice( 'info', __( 'Copied URL to clipboard.' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t} );\n\treturn (\n\t\t<div className=\"editor-post-url\">\n\t\t\t<InspectorPopoverHeader\n\t\t\t\ttitle={ __( 'Link' ) }\n\t\t\t\tonClose={ onClose }\n\t\t\t/>\n\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t{ isEditable && (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t{ __( 'Customize the last part of the URL. ' ) }\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Learn more.' ) }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t\t<div>\n\t\t\t\t\t{ isEditable && (\n\t\t\t\t\t\t<InputControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tprefix={\n\t\t\t\t\t\t\t\t<InputControlPrefixWrapper>\n\t\t\t\t\t\t\t\t\t/\n\t\t\t\t\t\t\t\t</InputControlPrefixWrapper>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsuffix={\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ticon={ copySmall }\n\t\t\t\t\t\t\t\t\tref={ copyButtonRef }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Copy' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlabel={ __( 'Link' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\tvalue={ forceEmptyField ? '' : postSlug }\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tclassName=\"editor-post-url__input\"\n\t\t\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\t\teditPost( { slug: newValue } );\n\t\t\t\t\t\t\t\t// When we delete the field the permalink gets\n\t\t\t\t\t\t\t\t// reverted to the original value.\n\t\t\t\t\t\t\t\t// The forceEmptyField logic allows the user to have\n\t\t\t\t\t\t\t\t// the field temporarily empty while typing.\n\t\t\t\t\t\t\t\tif ( ! newValue ) {\n\t\t\t\t\t\t\t\t\tif ( ! forceEmptyField ) {\n\t\t\t\t\t\t\t\t\t\tsetForceEmptyField( true );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( forceEmptyField ) {\n\t\t\t\t\t\t\t\t\tsetForceEmptyField( false );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonBlur={ ( event ) => {\n\t\t\t\t\t\t\t\teditPost( {\n\t\t\t\t\t\t\t\t\tslug: cleanForSlug( event.target.value ),\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\tif ( forceEmptyField ) {\n\t\t\t\t\t\t\t\t\tsetForceEmptyField( false );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\tclassName=\"editor-post-url__link\"\n\t\t\t\t\t\t\t\t\thref={ postLink }\n\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span className=\"editor-post-url__link-prefix\">\n\t\t\t\t\t\t\t\t\t\t{ permalinkPrefix }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<span className=\"editor-post-url__link-slug\">\n\t\t\t\t\t\t\t\t\t\t{ postSlug }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<span className=\"editor-post-url__link-suffix\">\n\t\t\t\t\t\t\t\t\t\t{ permalinkSuffix }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! isEditable && (\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\tclassName=\"editor-post-url__link\"\n\t\t\t\t\t\t\thref={ postLink }\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ postLink }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</VStack>\n\t\t</div>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,sBAAsB,EAAEC,YAAY,QAAQ,gBAAgB;AACrE,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,oCAAoC,IAAIC,sBAAsB,QAAQ,yBAAyB;AACxG,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,YAAY,EACZC,MAAM,EACNC,0BAA0B,IAAIC,YAAY,EAC1CC,uCAAuC,IAAIC,yBAAyB,EACpEC,oBAAoB,IAAIC,MAAM,QACxB,uBAAuB;AAC9B,SAASC,KAAK,IAAIC,YAAY,QAAQ,oBAAoB;AAC1D,SAASC,SAAS,QAAQ,kBAAkB;AAC5C,SAASF,KAAK,IAAIG,SAAS,QAAQ,sBAAsB;AACzD,SAASC,kBAAkB,QAAQ,oBAAoB;;AAEvD;AACA;AACA;AACA,SAASJ,KAAK,IAAIK,WAAW,QAAQ,aAAa;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAYA,eAAe,SAASC,OAAOA,CAAE;EAAEC;AAAQ,CAAC,EAAG;EAC9C,MAAM;IACLC,UAAU;IACVC,QAAQ;IACRC,QAAQ;IACRC,eAAe;IACfC,eAAe;IACfC;EACD,CAAC,GAAGjC,SAAS,CAAIkC,MAAM,IAAM;IAAA,IAAAC,oBAAA;IAC5B,MAAMC,IAAI,GAAGF,MAAM,CAAEb,WAAY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EA,QAAQ,EAAG;cACjB,IAAK,CAAEnB,eAAe,EAAG;gBACxBC,kBAAkB,CAAE,IAAK,CAAC;cAC3B;cACA;YACD;YACA,IAAKD,eAAe,EAAG;cACtBC,kBAAkB,CAAE,KAAM,CAAC;YAC5B;UACD,CAAG;UACHoB,MAAM,EAAKC,KAAK,IAAM;YACrBxB,QAAQ,CAAE;cACTsB,IAAI,EAAE1E,YAAY,CAAE4E,KAAK,CAACC,MAAM,CAACR,KAAM;YACxC,CAAE,CAAC;YACH,IAAKf,eAAe,EAAG;cACtBC,kBAAkB,CAAE,KAAM,CAAC;YAC5B;UACD,CAAG;UACHuB,IAAI,eACHxD,KAAA,CAACjB,YAAY;YACZsD,SAAS,EAAC,uBAAuB;YACjCI,IAAI,EAAGpC,QAAU;YACjBkD,MAAM,EAAC,QAAQ;YAAAjB,QAAA,gBAEfxC,IAAA;cAAMuC,SAAS,EAAC,8BAA8B;cAAAC,QAAA,EAC3ChC;YAAe,CACZ,CAAC,eACPR,IAAA;cAAMuC,SAAS,EAAC,4BAA4B;cAAAC,QAAA,EACzClC;YAAQ,CACL,CAAC,eACPN,IAAA;cAAMuC,SAAS,EAAC,8BAA8B;cAAAC,QAAA,EAC3C/B;YAAe,CACZ,CAAC;UAAA,CACM;QACd,CACD,CACD,EACC,CAAEJ,UAAU,iBACbL,IAAA,CAACf,YAAY;UACZsD,SAAS,EAAC,uBAAuB;UACjCI,IAAI,EAAGpC,QAAU;UACjBkD,MAAM,EAAC,QAAQ;UAAAjB,QAAA,EAEbjC;QAAQ,CACG,CACd;MAAA,CACG,CAAC;IAAA,CACC,CAAC;EAAA,CACL,CAAC;AAER","ignoreList":[]}
@@ -8,9 +8,21 @@ import { filterURLForDisplay, safeDecodeURIComponent } from '@wordpress/url';
8
8
  * Internal dependencies
9
9
  */
10
10
  import { store as editorStore } from '../../store';
11
+
12
+ /**
13
+ * Represents a label component for a post URL.
14
+ *
15
+ * @return {Component} The PostURLLabel component.
16
+ */
11
17
  export default function PostURLLabel() {
12
18
  return usePostURLLabel();
13
19
  }
20
+
21
+ /**
22
+ * Custom hook to get the label for the post URL.
23
+ *
24
+ * @return {string} The filtered and decoded post URL label.
25
+ */
14
26
  export function usePostURLLabel() {
15
27
  const postLink = useSelect(select => select(editorStore).getPermalink(), []);
16
28
  return filterURLForDisplay(safeDecodeURIComponent(postLink));
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","filterURLForDisplay","safeDecodeURIComponent","store","editorStore","PostURLLabel","usePostURLLabel","postLink","select","getPermalink"],"sources":["@wordpress/editor/src/components/post-url/label.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { filterURLForDisplay, safeDecodeURIComponent } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function PostURLLabel() {\n\treturn usePostURLLabel();\n}\n\nexport function usePostURLLabel() {\n\tconst postLink = useSelect(\n\t\t( select ) => select( editorStore ).getPermalink(),\n\t\t[]\n\t);\n\treturn filterURLForDisplay( safeDecodeURIComponent( postLink ) );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,mBAAmB,EAAEC,sBAAsB,QAAQ,gBAAgB;;AAE5E;AACA;AACA;AACA,SAASC,KAAK,IAAIC,WAAW,QAAQ,aAAa;AAElD,eAAe,SAASC,YAAYA,CAAA,EAAG;EACtC,OAAOC,eAAe,CAAC,CAAC;AACzB;AAEA,OAAO,SAASA,eAAeA,CAAA,EAAG;EACjC,MAAMC,QAAQ,GAAGP,SAAS,CACvBQ,MAAM,IAAMA,MAAM,CAAEJ,WAAY,CAAC,CAACK,YAAY,CAAC,CAAC,EAClD,EACD,CAAC;EACD,OAAOR,mBAAmB,CAAEC,sBAAsB,CAAEK,QAAS,CAAE,CAAC;AACjE","ignoreList":[]}
1
+ {"version":3,"names":["useSelect","filterURLForDisplay","safeDecodeURIComponent","store","editorStore","PostURLLabel","usePostURLLabel","postLink","select","getPermalink"],"sources":["@wordpress/editor/src/components/post-url/label.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { filterURLForDisplay, safeDecodeURIComponent } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Represents a label component for a post URL.\n *\n * @return {Component} The PostURLLabel component.\n */\nexport default function PostURLLabel() {\n\treturn usePostURLLabel();\n}\n\n/**\n * Custom hook to get the label for the post URL.\n *\n * @return {string} The filtered and decoded post URL label.\n */\nexport function usePostURLLabel() {\n\tconst postLink = useSelect(\n\t\t( select ) => select( editorStore ).getPermalink(),\n\t\t[]\n\t);\n\treturn filterURLForDisplay( safeDecodeURIComponent( postLink ) );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,mBAAmB,EAAEC,sBAAsB,QAAQ,gBAAgB;;AAE5E;AACA;AACA;AACA,SAASC,KAAK,IAAIC,WAAW,QAAQ,aAAa;;AAElD;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,YAAYA,CAAA,EAAG;EACtC,OAAOC,eAAe,CAAC,CAAC;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,eAAeA,CAAA,EAAG;EACjC,MAAMC,QAAQ,GAAGP,SAAS,CACvBQ,MAAM,IAAMA,MAAM,CAAEJ,WAAY,CAAC,CAACK,YAAY,CAAC,CAAC,EAClD,EACD,CAAC;EACD,OAAOR,mBAAmB,CAAEC,sBAAsB,CAAEK,QAAS,CAAE,CAAC;AACjE","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -15,6 +14,14 @@ import PostURLCheck from './check';
15
14
  import PostURL from './index';
16
15
  import PostPanelRow from '../post-panel-row';
17
16
  import { store as editorStore } from '../../store';
17
+
18
+ /**
19
+ * Renders the `PostURLPanel` component.
20
+ *
21
+ * @return {JSX.Element} The rendered PostURLPanel component.
22
+ */
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
+ import { jsxs as _jsxs } from "react/jsx-runtime";
18
25
  export default function PostURLPanel() {
19
26
  // Use internal state instead of a ref to make sure that the component
20
27
  // re-renders when the popover's anchor updates.
@@ -28,27 +35,30 @@ export default function PostURLPanel() {
28
35
  offset: 36,
29
36
  shift: true
30
37
  }), [popoverAnchor]);
31
- return createElement(PostURLCheck, null, createElement(PostPanelRow, {
32
- label: __('Link'),
33
- ref: setPopoverAnchor
34
- }, createElement(Dropdown, {
35
- popoverProps: popoverProps,
36
- className: "editor-post-url__panel-dropdown",
37
- contentClassName: "editor-post-url__panel-dialog",
38
- focusOnMount: true,
39
- renderToggle: ({
40
- isOpen,
41
- onToggle
42
- }) => createElement(PostURLToggle, {
43
- isOpen: isOpen,
44
- onClick: onToggle
45
- }),
46
- renderContent: ({
47
- onClose
48
- }) => createElement(PostURL, {
49
- onClose: onClose
38
+ return /*#__PURE__*/_jsx(PostURLCheck, {
39
+ children: /*#__PURE__*/_jsx(PostPanelRow, {
40
+ label: __('Link'),
41
+ ref: setPopoverAnchor,
42
+ children: /*#__PURE__*/_jsx(Dropdown, {
43
+ popoverProps: popoverProps,
44
+ className: "editor-post-url__panel-dropdown",
45
+ contentClassName: "editor-post-url__panel-dialog",
46
+ focusOnMount: true,
47
+ renderToggle: ({
48
+ isOpen,
49
+ onToggle
50
+ }) => /*#__PURE__*/_jsx(PostURLToggle, {
51
+ isOpen: isOpen,
52
+ onClick: onToggle
53
+ }),
54
+ renderContent: ({
55
+ onClose
56
+ }) => /*#__PURE__*/_jsx(PostURL, {
57
+ onClose: onClose
58
+ })
59
+ })
50
60
  })
51
- })));
61
+ });
52
62
  }
53
63
  function PostURLToggle({
54
64
  isOpen,
@@ -56,7 +66,7 @@ function PostURLToggle({
56
66
  }) {
57
67
  const slug = useSelect(select => select(editorStore).getEditedPostSlug(), []);
58
68
  const decodedSlug = safeDecodeURIComponent(slug);
59
- return createElement(Button, {
69
+ return /*#__PURE__*/_jsxs(Button, {
60
70
  size: "compact",
61
71
  className: "editor-post-url__panel-toggle",
62
72
  variant: "tertiary",
@@ -64,7 +74,8 @@ function PostURLToggle({
64
74
  // translators: %s: Current post link.
65
75
  ,
66
76
  "aria-label": sprintf(__('Change link: %s'), decodedSlug),
67
- onClick: onClick
68
- }, decodedSlug);
77
+ onClick: onClick,
78
+ children: ["/", decodedSlug]
79
+ });
69
80
  }
70
81
  //# sourceMappingURL=panel.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","useState","useSelect","Dropdown","Button","__","sprintf","safeDecodeURIComponent","PostURLCheck","PostURL","PostPanelRow","store","editorStore","PostURLPanel","popoverAnchor","setPopoverAnchor","popoverProps","anchor","placement","offset","shift","createElement","label","ref","className","contentClassName","focusOnMount","renderToggle","isOpen","onToggle","PostURLToggle","onClick","renderContent","onClose","slug","select","getEditedPostSlug","decodedSlug","size","variant"],"sources":["@wordpress/editor/src/components/post-url/panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo, useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { Dropdown, Button } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { safeDecodeURIComponent } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport PostURLCheck from './check';\nimport PostURL from './index';\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\n\nexport default function PostURLPanel() {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\treturn (\n\t\t<PostURLCheck>\n\t\t\t<PostPanelRow label={ __( 'Link' ) } ref={ setPopoverAnchor }>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tclassName=\"editor-post-url__panel-dropdown\"\n\t\t\t\t\tcontentClassName=\"editor-post-url__panel-dialog\"\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<PostURLToggle isOpen={ isOpen } onClick={ onToggle } />\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<PostURL onClose={ onClose } />\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PostPanelRow>\n\t\t</PostURLCheck>\n\t);\n}\n\nfunction PostURLToggle( { isOpen, onClick } ) {\n\tconst slug = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostSlug(),\n\t\t[]\n\t);\n\tconst decodedSlug = safeDecodeURIComponent( slug );\n\treturn (\n\t\t<Button\n\t\t\tsize=\"compact\"\n\t\t\tclassName=\"editor-post-url__panel-toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\t// translators: %s: Current post link.\n\t\t\taria-label={ sprintf( __( 'Change link: %s' ), decodedSlug ) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ decodedSlug }\n\t\t</Button>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,OAAO,EAAEC,QAAQ,QAAQ,oBAAoB;AACtD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,QAAQ,EAAEC,MAAM,QAAQ,uBAAuB;AACxD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,sBAAsB,QAAQ,gBAAgB;;AAEvD;AACA;AACA;AACA,OAAOC,YAA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E2B,IAAK,CAAC;EAClD,OACCb,aAAA,CAACjB,MAAM;IACNkC,IAAI,EAAC,SAAS;IACdd,SAAS,EAAC,+BAA+B;IACzCe,OAAO,EAAC,UAAU;IAClB,iBAAgBX;IAChB;IAAA;IACA,cAAatB,OAAO,CAAED,EAAE,CAAE,iBAAkB,CAAC,EAAEgC,WAAY,CAAG;IAC9DN,OAAO,EAAGA;EAAS,GAEjBM,WACK,CAAC;AAEX","ignoreList":[]}
1
+ {"version":3,"names":["useMemo","useState","useSelect","Dropdown","Button","__","sprintf","safeDecodeURIComponent","PostURLCheck","PostURL","PostPanelRow","store","editorStore","jsx","_jsx","jsxs","_jsxs","PostURLPanel","popoverAnchor","setPopoverAnchor","popoverProps","anchor","placement","offset","shift","children","label","ref","className","contentClassName","focusOnMount","renderToggle","isOpen","onToggle","PostURLToggle","onClick","renderContent","onClose","slug","select","getEditedPostSlug","decodedSlug","size","variant"],"sources":["@wordpress/editor/src/components/post-url/panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo, useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { Dropdown, Button } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { safeDecodeURIComponent } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport PostURLCheck from './check';\nimport PostURL from './index';\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the `PostURLPanel` component.\n *\n * @return {JSX.Element} The rendered PostURLPanel component.\n */\nexport default function PostURLPanel() {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\treturn (\n\t\t<PostURLCheck>\n\t\t\t<PostPanelRow label={ __( 'Link' ) } ref={ setPopoverAnchor }>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tclassName=\"editor-post-url__panel-dropdown\"\n\t\t\t\t\tcontentClassName=\"editor-post-url__panel-dialog\"\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<PostURLToggle isOpen={ isOpen } onClick={ onToggle } />\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<PostURL onClose={ onClose } />\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PostPanelRow>\n\t\t</PostURLCheck>\n\t);\n}\n\nfunction PostURLToggle( { isOpen, onClick } ) {\n\tconst slug = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostSlug(),\n\t\t[]\n\t);\n\tconst decodedSlug = safeDecodeURIComponent( slug );\n\treturn (\n\t\t<Button\n\t\t\tsize=\"compact\"\n\t\t\tclassName=\"editor-post-url__panel-toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\t// translators: %s: Current post link.\n\t\t\taria-label={ sprintf( __( 'Change link: %s' ), decodedSlug ) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t/{ decodedSlug }\n\t\t</Button>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,EAAEC,QAAQ,QAAQ,oBAAoB;AACtD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,QAAQ,EAAEC,MAAM,QAAQ,uBAAuB;AACxD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,sBAAsB,QAAQ,gBAAgB;;AAEvD;AACA;AACA;AACA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AMG,IAAI,GAAGpC,SAAS,CACnBqC,MAAM,IAAMA,MAAM,CAAE3B,WAAY,CAAC,CAAC4B,iBAAiB,CAAC,CAAC,EACvD,EACD,CAAC;EACD,MAAMC,WAAW,GAAGlC,sBAAsB,CAAE+B,IAAK,CAAC;EAClD,oBACCtB,KAAA,CAACZ,MAAM;IACNsC,IAAI,EAAC,SAAS;IACdd,SAAS,EAAC,+BAA+B;IACzCe,OAAO,EAAC,UAAU;IAClB,iBAAgBX;IAChB;IAAA;IACA,cAAa1B,OAAO,CAAED,EAAE,CAAE,iBAAkB,CAAC,EAAEoC,WAAY,CAAG;IAC9DN,OAAO,EAAGA,OAAS;IAAAV,QAAA,GACnB,GACC,EAAEgB,WAAW;EAAA,CACP,CAAC;AAEX","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -13,6 +12,7 @@ import { store as preferencesStore } from '@wordpress/preferences';
13
12
  * Internal dependencies
14
13
  */
15
14
  import { store as editorStore } from '../../store';
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
16
  export default function PostViewLink() {
17
17
  const {
18
18
  hasLoaded,
@@ -40,7 +40,7 @@ export default function PostViewLink() {
40
40
  if (!isPublished || !permalink || !hasLoaded) {
41
41
  return null;
42
42
  }
43
- return createElement(Button, {
43
+ return /*#__PURE__*/_jsx(Button, {
44
44
  icon: external,
45
45
  label: label || __('View post'),
46
46
  href: permalink,
@@ -1 +1 @@
1
- {"version":3,"names":["__","Button","external","store","coreStore","useSelect","preferencesStore","editorStore","PostViewLink","hasLoaded","permalink","isPublished","label","showIconLabels","select","postTypeSlug","getCurrentPostType","postType","getPostType","get","getPermalink","isCurrentPostPublished","labels","view_item","createElement","icon","href","target","showTooltip","size"],"sources":["@wordpress/editor/src/components/post-view-link/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { external } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function PostViewLink() {\n\tconst { hasLoaded, permalink, isPublished, label, showIconLabels } =\n\t\tuseSelect( ( select ) => {\n\t\t\t// Grab post type to retrieve the view_item label.\n\t\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\t\tconst { get } = select( preferencesStore );\n\n\t\t\treturn {\n\t\t\t\tpermalink: select( editorStore ).getPermalink(),\n\t\t\t\tisPublished: select( editorStore ).isCurrentPostPublished(),\n\t\t\t\tlabel: postType?.labels.view_item,\n\t\t\t\thasLoaded: !! postType,\n\t\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\t};\n\t\t}, [] );\n\n\t// Only render the view button if the post is published and has a permalink.\n\tif ( ! isPublished || ! permalink || ! hasLoaded ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Button\n\t\t\ticon={ external }\n\t\t\tlabel={ label || __( 'View post' ) }\n\t\t\thref={ permalink }\n\t\t\ttarget=\"_blank\"\n\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\tsize=\"compact\"\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,QAAQ,QAAQ,kBAAkB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASF,KAAK,IAAIG,gBAAgB,QAAQ,wBAAwB;;AAElE;AACA;AACA;AACA,SAASH,KAAK,IAAII,WAAW,QAAQ,aAAa;AAElD,eAAe,SAASC,YAAYA,CAAA,EAAG;EACtC,MAAM;IAAEC,SAAS;IAAEC,SAAS;IAAEC,WAAW;IAAEC,KAAK;IAAEC;EAAe,CAAC,GACjER,SAAS,CAAIS,MAAM,IAAM;IACxB;IACA,MAAMC,YAAY,GAAGD,MAAM,CAAEP,WAAY,CAAC,CAACS,kBAAkB,CAAC,CAAC;IAC/D,MAAMC,QAAQ,GAAGH,MAAM,CAAEV,SAAU,CAAC,CAACc,WAAW,CAAEH,YAAa,CAAC;IAChE,MAAM;MAAEI;IAAI,CAAC,GAAGL,MAAM,CAAER,gBAAiB,CAAC;IAE1C,OAAO;MACNI,SAAS,EAAEI,MAAM,CAAEP,WAAY,CAAC,CAACa,YAAY,CAAC,CAAC;MAC/CT,WAAW,EAAEG,MAAM,CAAEP,WAAY,CAAC,CAACc,sBAAsB,CAAC,CAAC;MAC3DT,KAAK,EAAEK,QAAQ,EAAEK,MAAM,CAACC,SAAS;MACjCd,SAAS,EAAE,CAAC,CAAEQ,QAAQ;MACtBJ,cAAc,EAAEM,GAAG,CAAE,MAAM,EAAE,gBAAiB;IAC/C,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;;EAER;EACA,IAAK,CAAER,WAAW,IAAI,CAAED,SAAS,IAAI,CAAED,SAAS,EAAG;IAClD,OAAO,IAAI;EACZ;EAEA,OACCe,aAAA,CAACvB,MAAM;IACNwB,IAAI,EAAGvB,QAAU;IACjBU,KAAK,EAAGA,KAAK,IAAIZ,EAAE,CAAE,WAAY,CAAG;IACpC0B,IAAI,EAAGhB,SAAW;IAClBiB,MAAM,EAAC,QAAQ;IACfC,WAAW,EAAG,CAAEf,cAAgB;IAChCgB,IAAI,EAAC;EAAS,CACd,CAAC;AAEJ","ignoreList":[]}
1
+ {"version":3,"names":["__","Button","external","store","coreStore","useSelect","preferencesStore","editorStore","jsx","_jsx","PostViewLink","hasLoaded","permalink","isPublished","label","showIconLabels","select","postTypeSlug","getCurrentPostType","postType","getPostType","get","getPermalink","isCurrentPostPublished","labels","view_item","icon","href","target","showTooltip","size"],"sources":["@wordpress/editor/src/components/post-view-link/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { external } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function PostViewLink() {\n\tconst { hasLoaded, permalink, isPublished, label, showIconLabels } =\n\t\tuseSelect( ( select ) => {\n\t\t\t// Grab post type to retrieve the view_item label.\n\t\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\t\tconst { get } = select( preferencesStore );\n\n\t\t\treturn {\n\t\t\t\tpermalink: select( editorStore ).getPermalink(),\n\t\t\t\tisPublished: select( editorStore ).isCurrentPostPublished(),\n\t\t\t\tlabel: postType?.labels.view_item,\n\t\t\t\thasLoaded: !! postType,\n\t\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\t};\n\t\t}, [] );\n\n\t// Only render the view button if the post is published and has a permalink.\n\tif ( ! isPublished || ! permalink || ! hasLoaded ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Button\n\t\t\ticon={ external }\n\t\t\tlabel={ label || __( 'View post' ) }\n\t\t\thref={ permalink }\n\t\t\ttarget=\"_blank\"\n\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\tsize=\"compact\"\n\t\t/>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,QAAQ,QAAQ,kBAAkB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASF,KAAK,IAAIG,gBAAgB,QAAQ,wBAAwB;;AAElE;AACA;AACA;AACA,SAASH,KA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ore } from '../../store';
10
+
11
+ /**
12
+ * Determines if the current post can be edited (published)
13
+ * and passes this information to the provided render function.
14
+ *
15
+ * @param {Object} props The component props.
16
+ * @param {Function} props.render Function to render the component.
17
+ * Receives an object with a `canEdit` property.
18
+ * @return {JSX.Element} The rendered component.
19
+ */
10
20
  export default function PostVisibilityCheck({
11
21
  render
12
22
  }) {