@wordpress/editor 14.34.0 → 14.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1189) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +1 -1
  3. package/build/bindings/api.js +2 -0
  4. package/build/bindings/api.js.map +1 -1
  5. package/build/bindings/pattern-overrides.js +3 -1
  6. package/build/bindings/pattern-overrides.js.map +1 -1
  7. package/build/bindings/post-data.js +50 -64
  8. package/build/bindings/post-data.js.map +3 -3
  9. package/build/bindings/post-meta.js +47 -39
  10. package/build/bindings/post-meta.js.map +2 -2
  11. package/build/bindings/term-data.js +3 -1
  12. package/build/bindings/term-data.js.map +1 -1
  13. package/build/components/autocompleters/index.js +2 -0
  14. package/build/components/autocompleters/index.js.map +1 -1
  15. package/build/components/autocompleters/user.js +3 -1
  16. package/build/components/autocompleters/user.js.map +1 -1
  17. package/build/components/autosave-monitor/index.js +4 -2
  18. package/build/components/autosave-monitor/index.js.map +1 -1
  19. package/build/components/block-removal-warnings/index.js +6 -4
  20. package/build/components/block-removal-warnings/index.js.map +1 -1
  21. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +6 -4
  22. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  23. package/build/components/block-visibility/index.js +5 -3
  24. package/build/components/block-visibility/index.js.map +1 -1
  25. package/build/components/blog-title/index.js +4 -2
  26. package/build/components/blog-title/index.js.map +1 -1
  27. package/build/components/character-count/index.js +2 -0
  28. package/build/components/character-count/index.js.map +1 -1
  29. package/build/components/collab-sidebar/add-comment.js +21 -17
  30. package/build/components/collab-sidebar/add-comment.js.map +2 -2
  31. package/build/components/collab-sidebar/comment-author-info.js +4 -2
  32. package/build/components/collab-sidebar/comment-author-info.js.map +2 -2
  33. package/build/components/collab-sidebar/comment-form.js +17 -6
  34. package/build/components/collab-sidebar/comment-form.js.map +2 -2
  35. package/build/components/collab-sidebar/comment-indicator-toolbar.js +14 -26
  36. package/build/components/collab-sidebar/comment-indicator-toolbar.js.map +3 -3
  37. package/build/components/collab-sidebar/comment-menu-item.js +40 -8
  38. package/build/components/collab-sidebar/comment-menu-item.js.map +3 -3
  39. package/build/components/collab-sidebar/comments.js +386 -325
  40. package/build/components/collab-sidebar/comments.js.map +3 -3
  41. package/build/components/collab-sidebar/constants.js +5 -3
  42. package/build/components/collab-sidebar/constants.js.map +1 -1
  43. package/build/components/collab-sidebar/hooks.js +8 -4
  44. package/build/components/collab-sidebar/hooks.js.map +2 -2
  45. package/build/components/collab-sidebar/index.js +53 -27
  46. package/build/components/collab-sidebar/index.js.map +3 -3
  47. package/build/components/collab-sidebar/utils.js +4 -2
  48. package/build/components/collab-sidebar/utils.js.map +2 -2
  49. package/build/components/collapsible-block-toolbar/index.js +4 -2
  50. package/build/components/collapsible-block-toolbar/index.js.map +1 -1
  51. package/build/components/commands/index.js +22 -8
  52. package/build/components/commands/index.js.map +2 -2
  53. package/build/components/deprecated.js +55 -53
  54. package/build/components/deprecated.js.map +1 -1
  55. package/build/components/document-bar/index.js +4 -2
  56. package/build/components/document-bar/index.js.map +1 -1
  57. package/build/components/document-outline/check.js +2 -0
  58. package/build/components/document-outline/check.js.map +1 -1
  59. package/build/components/document-outline/index.js +9 -7
  60. package/build/components/document-outline/index.js.map +1 -1
  61. package/build/components/document-outline/item.js +4 -2
  62. package/build/components/document-outline/item.js.map +1 -1
  63. package/build/components/document-tools/index.js +3 -1
  64. package/build/components/document-tools/index.js.map +1 -1
  65. package/build/components/editor/index.js +14 -4
  66. package/build/components/editor/index.js.map +3 -3
  67. package/build/components/editor-history/redo.js +3 -1
  68. package/build/components/editor-history/redo.js.map +1 -1
  69. package/build/components/editor-history/undo.js +3 -1
  70. package/build/components/editor-history/undo.js.map +1 -1
  71. package/build/components/editor-interface/index.js +4 -2
  72. package/build/components/editor-interface/index.js.map +1 -1
  73. package/build/components/editor-notices/index.js +3 -1
  74. package/build/components/editor-notices/index.js.map +1 -1
  75. package/build/components/editor-snackbars/index.js +4 -2
  76. package/build/components/editor-snackbars/index.js.map +1 -1
  77. package/build/components/entities-saved-states/entity-record-item.js +3 -1
  78. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  79. package/build/components/entities-saved-states/entity-type-list.js +3 -1
  80. package/build/components/entities-saved-states/entity-type-list.js.map +1 -1
  81. package/build/components/entities-saved-states/hooks/use-is-dirty.js +3 -1
  82. package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  83. package/build/components/entities-saved-states/index.js +3 -1
  84. package/build/components/entities-saved-states/index.js.map +2 -2
  85. package/build/components/error-boundary/index.js +5 -3
  86. package/build/components/error-boundary/index.js.map +1 -1
  87. package/build/components/global-keyboard-shortcuts/index.js +2 -0
  88. package/build/components/global-keyboard-shortcuts/index.js.map +1 -1
  89. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +3 -1
  90. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  91. package/build/components/global-styles/block-link.js +2 -0
  92. package/build/components/global-styles/block-link.js.map +1 -1
  93. package/build/components/global-styles/header.js +3 -1
  94. package/build/components/global-styles/header.js.map +1 -1
  95. package/build/components/global-styles/hooks.js +3 -1
  96. package/build/components/global-styles/hooks.js.map +2 -2
  97. package/build/components/global-styles/index.js +3 -1
  98. package/build/components/global-styles/index.js.map +1 -1
  99. package/build/components/global-styles/menu.js +3 -1
  100. package/build/components/global-styles/menu.js.map +1 -1
  101. package/build/components/global-styles-provider/index.js +3 -1
  102. package/build/components/global-styles-provider/index.js.map +1 -1
  103. package/build/components/global-styles-renderer/index.js +2 -0
  104. package/build/components/global-styles-renderer/index.js.map +1 -1
  105. package/build/components/global-styles-sidebar/default-sidebar.js +3 -1
  106. package/build/components/global-styles-sidebar/default-sidebar.js.map +1 -1
  107. package/build/components/global-styles-sidebar/index.js +3 -1
  108. package/build/components/global-styles-sidebar/index.js.map +1 -1
  109. package/build/components/global-styles-sidebar/welcome-guide-image.js +2 -0
  110. package/build/components/global-styles-sidebar/welcome-guide-image.js.map +1 -1
  111. package/build/components/global-styles-sidebar/welcome-guide.js +3 -1
  112. package/build/components/global-styles-sidebar/welcome-guide.js.map +1 -1
  113. package/build/components/header/back-button.js +8 -6
  114. package/build/components/header/back-button.js.map +1 -1
  115. package/build/components/header/index.js +5 -3
  116. package/build/components/header/index.js.map +1 -1
  117. package/build/components/index.js +4 -2
  118. package/build/components/index.js.map +2 -2
  119. package/build/components/inserter-sidebar/index.js +4 -2
  120. package/build/components/inserter-sidebar/index.js.map +1 -1
  121. package/build/components/keyboard-shortcut-help-modal/config.js +3 -1
  122. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  123. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +3 -1
  124. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  125. package/build/components/keyboard-shortcut-help-modal/index.js +7 -5
  126. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  127. package/build/components/keyboard-shortcut-help-modal/shortcut.js +3 -1
  128. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  129. package/build/components/list-view-sidebar/index.js +4 -2
  130. package/build/components/list-view-sidebar/index.js.map +1 -1
  131. package/build/components/list-view-sidebar/list-view-outline.js +3 -1
  132. package/build/components/list-view-sidebar/list-view-outline.js.map +1 -1
  133. package/build/components/local-autosave-monitor/index.js +6 -4
  134. package/build/components/local-autosave-monitor/index.js.map +1 -1
  135. package/build/components/media-categories/index.js +8 -6
  136. package/build/components/media-categories/index.js.map +1 -1
  137. package/build/components/mode-switcher/index.js +4 -2
  138. package/build/components/mode-switcher/index.js.map +1 -1
  139. package/build/components/more-menu/copy-content-menu-item.js +3 -1
  140. package/build/components/more-menu/copy-content-menu-item.js.map +1 -1
  141. package/build/components/more-menu/index.js +4 -2
  142. package/build/components/more-menu/index.js.map +2 -2
  143. package/build/components/more-menu/tools-more-menu-group.js +4 -2
  144. package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
  145. package/build/components/more-menu/view-more-menu-group.js +4 -2
  146. package/build/components/more-menu/view-more-menu-group.js.map +1 -1
  147. package/build/components/page-attributes/check.js +2 -0
  148. package/build/components/page-attributes/check.js.map +1 -1
  149. package/build/components/page-attributes/order.js +3 -1
  150. package/build/components/page-attributes/order.js.map +1 -1
  151. package/build/components/page-attributes/panel.js +4 -2
  152. package/build/components/page-attributes/panel.js.map +1 -1
  153. package/build/components/page-attributes/parent.js +4 -2
  154. package/build/components/page-attributes/parent.js.map +1 -1
  155. package/build/components/pattern-duplicate-modal/index.js +5 -3
  156. package/build/components/pattern-duplicate-modal/index.js.map +1 -1
  157. package/build/components/pattern-overrides-panel/index.js +4 -2
  158. package/build/components/pattern-overrides-panel/index.js.map +1 -1
  159. package/build/components/pattern-rename-modal/index.js +5 -3
  160. package/build/components/pattern-rename-modal/index.js.map +1 -1
  161. package/build/components/plugin-document-setting-panel/index.js +5 -3
  162. package/build/components/plugin-document-setting-panel/index.js.map +1 -1
  163. package/build/components/plugin-more-menu-item/index.js +3 -1
  164. package/build/components/plugin-more-menu-item/index.js.map +1 -1
  165. package/build/components/plugin-post-publish-panel/index.js +5 -3
  166. package/build/components/plugin-post-publish-panel/index.js.map +1 -1
  167. package/build/components/plugin-post-status-info/index.js +5 -3
  168. package/build/components/plugin-post-status-info/index.js.map +1 -1
  169. package/build/components/plugin-pre-publish-panel/index.js +5 -3
  170. package/build/components/plugin-pre-publish-panel/index.js.map +1 -1
  171. package/build/components/plugin-preview-menu-item/index.js +3 -1
  172. package/build/components/plugin-preview-menu-item/index.js.map +1 -1
  173. package/build/components/plugin-sidebar/index.js +3 -1
  174. package/build/components/plugin-sidebar/index.js.map +1 -1
  175. package/build/components/plugin-sidebar-more-menu-item/index.js +3 -1
  176. package/build/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
  177. package/build/components/post-actions/actions.js +3 -1
  178. package/build/components/post-actions/actions.js.map +1 -1
  179. package/build/components/post-actions/index.js +4 -2
  180. package/build/components/post-actions/index.js.map +1 -1
  181. package/build/components/post-actions/set-as-homepage.js +5 -3
  182. package/build/components/post-actions/set-as-homepage.js.map +1 -1
  183. package/build/components/post-actions/set-as-posts-page.js +5 -3
  184. package/build/components/post-actions/set-as-posts-page.js.map +1 -1
  185. package/build/components/post-author/check.js +3 -1
  186. package/build/components/post-author/check.js.map +1 -1
  187. package/build/components/post-author/combobox.js +3 -1
  188. package/build/components/post-author/combobox.js.map +1 -1
  189. package/build/components/post-author/constants.js +4 -2
  190. package/build/components/post-author/constants.js.map +1 -1
  191. package/build/components/post-author/hook.js +2 -0
  192. package/build/components/post-author/hook.js.map +1 -1
  193. package/build/components/post-author/index.js +4 -2
  194. package/build/components/post-author/index.js.map +1 -1
  195. package/build/components/post-author/panel.js +3 -1
  196. package/build/components/post-author/panel.js.map +1 -1
  197. package/build/components/post-author/select.js +3 -1
  198. package/build/components/post-author/select.js.map +1 -1
  199. package/build/components/post-card-panel/index.js +4 -2
  200. package/build/components/post-card-panel/index.js.map +1 -1
  201. package/build/components/post-comments/index.js +4 -2
  202. package/build/components/post-comments/index.js.map +1 -1
  203. package/build/components/post-content-information/index.js +4 -2
  204. package/build/components/post-content-information/index.js.map +1 -1
  205. package/build/components/post-discussion/panel.js +4 -2
  206. package/build/components/post-discussion/panel.js.map +1 -1
  207. package/build/components/post-excerpt/check.js +3 -1
  208. package/build/components/post-excerpt/check.js.map +1 -1
  209. package/build/components/post-excerpt/index.js +3 -1
  210. package/build/components/post-excerpt/index.js.map +1 -1
  211. package/build/components/post-excerpt/panel.js +4 -2
  212. package/build/components/post-excerpt/panel.js.map +1 -1
  213. package/build/components/post-excerpt/plugin.js +5 -3
  214. package/build/components/post-excerpt/plugin.js.map +1 -1
  215. package/build/components/post-featured-image/check.js +3 -1
  216. package/build/components/post-featured-image/check.js.map +1 -1
  217. package/build/components/post-featured-image/index.js +10 -8
  218. package/build/components/post-featured-image/index.js.map +1 -1
  219. package/build/components/post-featured-image/panel.js +4 -2
  220. package/build/components/post-featured-image/panel.js.map +1 -1
  221. package/build/components/post-fields/index.js +2 -0
  222. package/build/components/post-fields/index.js.map +1 -1
  223. package/build/components/post-format/check.js +3 -1
  224. package/build/components/post-format/check.js.map +1 -1
  225. package/build/components/post-format/index.js +4 -2
  226. package/build/components/post-format/index.js.map +1 -1
  227. package/build/components/post-format/panel.js +3 -1
  228. package/build/components/post-format/panel.js.map +1 -1
  229. package/build/components/post-last-edited-panel/index.js +3 -1
  230. package/build/components/post-last-edited-panel/index.js.map +1 -1
  231. package/build/components/post-last-revision/check.js +3 -1
  232. package/build/components/post-last-revision/check.js.map +1 -1
  233. package/build/components/post-last-revision/index.js +3 -1
  234. package/build/components/post-last-revision/index.js.map +1 -1
  235. package/build/components/post-last-revision/panel.js +3 -1
  236. package/build/components/post-last-revision/panel.js.map +1 -1
  237. package/build/components/post-locked-modal/index.js +3 -1
  238. package/build/components/post-locked-modal/index.js.map +1 -1
  239. package/build/components/post-panel-row/index.js +4 -2
  240. package/build/components/post-panel-row/index.js.map +1 -1
  241. package/build/components/post-panel-section/index.js +3 -1
  242. package/build/components/post-panel-section/index.js.map +1 -1
  243. package/build/components/post-pending-status/check.js +2 -0
  244. package/build/components/post-pending-status/check.js.map +1 -1
  245. package/build/components/post-pending-status/index.js +3 -1
  246. package/build/components/post-pending-status/index.js.map +1 -1
  247. package/build/components/post-pingbacks/index.js +3 -1
  248. package/build/components/post-pingbacks/index.js.map +1 -1
  249. package/build/components/post-preview-button/index.js +3 -1
  250. package/build/components/post-preview-button/index.js.map +1 -1
  251. package/build/components/post-publish-button/index.js +6 -4
  252. package/build/components/post-publish-button/index.js.map +1 -1
  253. package/build/components/post-publish-button/label.js +2 -0
  254. package/build/components/post-publish-button/label.js.map +1 -1
  255. package/build/components/post-publish-button/post-publish-button-or-toggle.js +5 -3
  256. package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  257. package/build/components/post-publish-panel/index.js +5 -3
  258. package/build/components/post-publish-panel/index.js.map +1 -1
  259. package/build/components/post-publish-panel/maybe-category-panel.js +3 -1
  260. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  261. package/build/components/post-publish-panel/maybe-post-format-panel.js +5 -3
  262. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  263. package/build/components/post-publish-panel/maybe-tags-panel.js +5 -3
  264. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  265. package/build/components/post-publish-panel/maybe-upload-media.js +3 -1
  266. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  267. package/build/components/post-publish-panel/media-util.js +2 -0
  268. package/build/components/post-publish-panel/media-util.js.map +1 -1
  269. package/build/components/post-publish-panel/postpublish.js +6 -4
  270. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  271. package/build/components/post-publish-panel/prepublish.js +3 -1
  272. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  273. package/build/components/post-saved-state/index.js +3 -1
  274. package/build/components/post-saved-state/index.js.map +1 -1
  275. package/build/components/post-schedule/check.js +2 -0
  276. package/build/components/post-schedule/check.js.map +1 -1
  277. package/build/components/post-schedule/index.js +4 -2
  278. package/build/components/post-schedule/index.js.map +1 -1
  279. package/build/components/post-schedule/label.js +2 -0
  280. package/build/components/post-schedule/label.js.map +1 -1
  281. package/build/components/post-schedule/panel.js +4 -2
  282. package/build/components/post-schedule/panel.js.map +1 -1
  283. package/build/components/post-status/index.js +6 -4
  284. package/build/components/post-status/index.js.map +1 -1
  285. package/build/components/post-sticky/check.js +2 -0
  286. package/build/components/post-sticky/check.js.map +1 -1
  287. package/build/components/post-sticky/index.js +3 -1
  288. package/build/components/post-sticky/index.js.map +1 -1
  289. package/build/components/post-sticky/panel.js +3 -1
  290. package/build/components/post-sticky/panel.js.map +1 -1
  291. package/build/components/post-switch-to-draft-button/index.js +3 -1
  292. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  293. package/build/components/post-sync-status/index.js +3 -1
  294. package/build/components/post-sync-status/index.js.map +1 -1
  295. package/build/components/post-taxonomies/check.js +2 -0
  296. package/build/components/post-taxonomies/check.js.map +1 -1
  297. package/build/components/post-taxonomies/flat-term-selector.js +9 -7
  298. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  299. package/build/components/post-taxonomies/hierarchical-term-selector.js +8 -6
  300. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  301. package/build/components/post-taxonomies/index.js +4 -2
  302. package/build/components/post-taxonomies/index.js.map +1 -1
  303. package/build/components/post-taxonomies/most-used-terms.js +5 -3
  304. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  305. package/build/components/post-taxonomies/panel.js +3 -1
  306. package/build/components/post-taxonomies/panel.js.map +1 -1
  307. package/build/components/post-template/block-theme.js +3 -1
  308. package/build/components/post-template/block-theme.js.map +1 -1
  309. package/build/components/post-template/classic-theme.js +3 -1
  310. package/build/components/post-template/classic-theme.js.map +1 -1
  311. package/build/components/post-template/create-new-template-modal.js +4 -2
  312. package/build/components/post-template/create-new-template-modal.js.map +1 -1
  313. package/build/components/post-template/create-new-template.js +3 -1
  314. package/build/components/post-template/create-new-template.js.map +1 -1
  315. package/build/components/post-template/hooks.js +2 -0
  316. package/build/components/post-template/hooks.js.map +1 -1
  317. package/build/components/post-template/panel.js +12 -7
  318. package/build/components/post-template/panel.js.map +2 -2
  319. package/build/components/post-template/reset-default-template.js +3 -1
  320. package/build/components/post-template/reset-default-template.js.map +1 -1
  321. package/build/components/post-template/swap-template-button.js +3 -1
  322. package/build/components/post-template/swap-template-button.js.map +1 -1
  323. package/build/components/post-text-editor/index.js +3 -1
  324. package/build/components/post-text-editor/index.js.map +1 -1
  325. package/build/components/post-title/constants.js +4 -2
  326. package/build/components/post-title/constants.js.map +1 -1
  327. package/build/components/post-title/index.js +25 -14
  328. package/build/components/post-title/index.js.map +2 -2
  329. package/build/components/post-title/post-title-raw.js +3 -1
  330. package/build/components/post-title/post-title-raw.js.map +1 -1
  331. package/build/components/post-title/use-post-title-focus.js +2 -0
  332. package/build/components/post-title/use-post-title-focus.js.map +1 -1
  333. package/build/components/post-title/use-post-title.js +2 -0
  334. package/build/components/post-title/use-post-title.js.map +1 -1
  335. package/build/components/post-transform-panel/hooks.js +3 -1
  336. package/build/components/post-transform-panel/hooks.js.map +1 -1
  337. package/build/components/post-transform-panel/index.js +3 -1
  338. package/build/components/post-transform-panel/index.js.map +1 -1
  339. package/build/components/post-trash/check.js +2 -0
  340. package/build/components/post-trash/check.js.map +1 -1
  341. package/build/components/post-trash/index.js +3 -1
  342. package/build/components/post-trash/index.js.map +1 -1
  343. package/build/components/post-type-support-check/index.js +2 -0
  344. package/build/components/post-type-support-check/index.js.map +1 -1
  345. package/build/components/post-url/check.js +2 -0
  346. package/build/components/post-url/check.js.map +1 -1
  347. package/build/components/post-url/index.js +3 -1
  348. package/build/components/post-url/index.js.map +1 -1
  349. package/build/components/post-url/label.js +2 -0
  350. package/build/components/post-url/label.js.map +1 -1
  351. package/build/components/post-url/panel.js +3 -1
  352. package/build/components/post-url/panel.js.map +1 -1
  353. package/build/components/post-view-link/index.js +3 -1
  354. package/build/components/post-view-link/index.js.map +1 -1
  355. package/build/components/post-visibility/check.js +2 -0
  356. package/build/components/post-visibility/check.js.map +1 -1
  357. package/build/components/post-visibility/index.js +3 -1
  358. package/build/components/post-visibility/index.js.map +1 -1
  359. package/build/components/post-visibility/label.js +2 -0
  360. package/build/components/post-visibility/label.js.map +1 -1
  361. package/build/components/post-visibility/utils.js +3 -1
  362. package/build/components/post-visibility/utils.js.map +1 -1
  363. package/build/components/posts-per-page/index.js +3 -1
  364. package/build/components/posts-per-page/index.js.map +1 -1
  365. package/build/components/preferences-modal/enable-panel.js +4 -2
  366. package/build/components/preferences-modal/enable-panel.js.map +1 -1
  367. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +5 -3
  368. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  369. package/build/components/preferences-modal/enable-publish-sidebar.js +4 -2
  370. package/build/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
  371. package/build/components/preferences-modal/index.js +5 -3
  372. package/build/components/preferences-modal/index.js.map +2 -2
  373. package/build/components/preview-dropdown/index.js +3 -1
  374. package/build/components/preview-dropdown/index.js.map +1 -1
  375. package/build/components/provider/disable-non-page-content-blocks.js +2 -0
  376. package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
  377. package/build/components/provider/index.js +8 -6
  378. package/build/components/provider/index.js.map +1 -1
  379. package/build/components/provider/navigation-block-editing-mode.js +2 -0
  380. package/build/components/provider/navigation-block-editing-mode.js.map +1 -1
  381. package/build/components/provider/use-auto-switch-editor-sidebars.js +2 -0
  382. package/build/components/provider/use-auto-switch-editor-sidebars.js.map +1 -1
  383. package/build/components/provider/use-block-editor-settings.js +5 -3
  384. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  385. package/build/components/provider/use-hide-blocks-from-inserter.js +3 -1
  386. package/build/components/provider/use-hide-blocks-from-inserter.js.map +1 -1
  387. package/build/components/provider/use-post-content-blocks.js +3 -1
  388. package/build/components/provider/use-post-content-blocks.js.map +1 -1
  389. package/build/components/provider/with-registry-provider.js +4 -2
  390. package/build/components/provider/with-registry-provider.js.map +1 -1
  391. package/build/components/resizable-editor/index.js +4 -2
  392. package/build/components/resizable-editor/index.js.map +1 -1
  393. package/build/components/resizable-editor/resize-handle.js +4 -2
  394. package/build/components/resizable-editor/resize-handle.js.map +1 -1
  395. package/build/components/save-publish-panels/index.js +5 -3
  396. package/build/components/save-publish-panels/index.js.map +1 -1
  397. package/build/components/sidebar/constants.js +3 -1
  398. package/build/components/sidebar/constants.js.map +1 -1
  399. package/build/components/sidebar/header.js +5 -3
  400. package/build/components/sidebar/header.js.map +1 -1
  401. package/build/components/sidebar/index.js +7 -5
  402. package/build/components/sidebar/index.js.map +1 -1
  403. package/build/components/sidebar/post-summary.js +4 -2
  404. package/build/components/sidebar/post-summary.js.map +1 -1
  405. package/build/components/site-discussion/index.js +4 -2
  406. package/build/components/site-discussion/index.js.map +1 -1
  407. package/build/components/start-page-options/index.js +7 -6
  408. package/build/components/start-page-options/index.js.map +2 -2
  409. package/build/components/start-template-options/index.js +3 -1
  410. package/build/components/start-template-options/index.js.map +1 -1
  411. package/build/components/style-book/categories.js +2 -0
  412. package/build/components/style-book/categories.js.map +1 -1
  413. package/build/components/style-book/color-examples.js +4 -2
  414. package/build/components/style-book/color-examples.js.map +1 -1
  415. package/build/components/style-book/constants.js +9 -7
  416. package/build/components/style-book/constants.js.map +1 -1
  417. package/build/components/style-book/duotone-examples.js +4 -2
  418. package/build/components/style-book/duotone-examples.js.map +1 -1
  419. package/build/components/style-book/examples.js +3 -1
  420. package/build/components/style-book/examples.js.map +1 -1
  421. package/build/components/style-book/index.js +13 -11
  422. package/build/components/style-book/index.js.map +1 -1
  423. package/build/components/style-book/types.js +2 -0
  424. package/build/components/style-book/types.js.map +1 -1
  425. package/build/components/styles-canvas/index.js +3 -1
  426. package/build/components/styles-canvas/index.js.map +1 -1
  427. package/build/components/styles-canvas/revisions.js +4 -2
  428. package/build/components/styles-canvas/revisions.js.map +1 -1
  429. package/build/components/styles-canvas/style-book.js +3 -1
  430. package/build/components/styles-canvas/style-book.js.map +1 -1
  431. package/build/components/table-of-contents/index.js +3 -1
  432. package/build/components/table-of-contents/index.js.map +1 -1
  433. package/build/components/table-of-contents/panel.js +3 -1
  434. package/build/components/table-of-contents/panel.js.map +1 -1
  435. package/build/components/template-content-panel/index.js +6 -4
  436. package/build/components/template-content-panel/index.js.map +1 -1
  437. package/build/components/template-part-content-panel/index.js +4 -2
  438. package/build/components/template-part-content-panel/index.js.map +1 -1
  439. package/build/components/template-part-menu-items/convert-to-regular.js +3 -1
  440. package/build/components/template-part-menu-items/convert-to-regular.js.map +1 -1
  441. package/build/components/template-part-menu-items/convert-to-template-part.js +3 -1
  442. package/build/components/template-part-menu-items/convert-to-template-part.js.map +1 -1
  443. package/build/components/template-part-menu-items/index.js +3 -1
  444. package/build/components/template-part-menu-items/index.js.map +1 -1
  445. package/build/components/template-validation-notice/index.js +3 -1
  446. package/build/components/template-validation-notice/index.js.map +1 -1
  447. package/build/components/text-editor/index.js +3 -1
  448. package/build/components/text-editor/index.js.map +1 -1
  449. package/build/components/theme-support-check/index.js +2 -0
  450. package/build/components/theme-support-check/index.js.map +1 -1
  451. package/build/components/time-to-read/index.js +4 -2
  452. package/build/components/time-to-read/index.js.map +1 -1
  453. package/build/components/unsaved-changes-warning/index.js +2 -0
  454. package/build/components/unsaved-changes-warning/index.js.map +1 -1
  455. package/build/components/visual-editor/edit-template-blocks-notification.js +3 -1
  456. package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  457. package/build/components/visual-editor/index.js +34 -13
  458. package/build/components/visual-editor/index.js.map +2 -2
  459. package/build/components/visual-editor/use-edit-content-only-section-exit.js +65 -0
  460. package/build/components/visual-editor/use-edit-content-only-section-exit.js.map +7 -0
  461. package/build/components/visual-editor/use-padding-appender.js +75 -0
  462. package/build/components/visual-editor/use-padding-appender.js.map +7 -0
  463. package/build/components/visual-editor/use-select-nearest-editable-block.js +3 -1
  464. package/build/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  465. package/build/components/visual-editor/use-zoom-out-mode-exit.js +2 -0
  466. package/build/components/visual-editor/use-zoom-out-mode-exit.js.map +1 -1
  467. package/build/components/word-count/index.js +3 -1
  468. package/build/components/word-count/index.js.map +1 -1
  469. package/build/components/zoom-out-toggle/index.js +4 -2
  470. package/build/components/zoom-out-toggle/index.js.map +1 -1
  471. package/build/dataviews/api.js +2 -0
  472. package/build/dataviews/api.js.map +1 -1
  473. package/build/dataviews/fields/content-preview/content-preview-view.js +5 -3
  474. package/build/dataviews/fields/content-preview/content-preview-view.js.map +3 -3
  475. package/build/dataviews/fields/content-preview/index.js +3 -1
  476. package/build/dataviews/fields/content-preview/index.js.map +1 -1
  477. package/build/dataviews/store/private-actions.js +3 -1
  478. package/build/dataviews/store/private-actions.js.map +1 -1
  479. package/build/dataviews/store/private-selectors.js +3 -1
  480. package/build/dataviews/store/private-selectors.js.map +1 -1
  481. package/build/dataviews/store/reducer.js +2 -0
  482. package/build/dataviews/store/reducer.js.map +1 -1
  483. package/build/hooks/custom-sources-backwards-compatibility.js +4 -2
  484. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  485. package/build/hooks/default-autocompleters.js +2 -0
  486. package/build/hooks/default-autocompleters.js.map +1 -1
  487. package/build/hooks/index.js +2 -0
  488. package/build/hooks/index.js.map +1 -1
  489. package/build/hooks/media-upload.js +3 -1
  490. package/build/hooks/media-upload.js.map +1 -1
  491. package/build/hooks/navigation-link-view-button.js +5 -3
  492. package/build/hooks/navigation-link-view-button.js.map +1 -1
  493. package/build/hooks/pattern-overrides.js +6 -6
  494. package/build/hooks/pattern-overrides.js.map +2 -2
  495. package/build/hooks/push-changes-to-global-styles/index.js +12 -10
  496. package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
  497. package/build/hooks/template-part-navigation-edit-button.js +7 -5
  498. package/build/hooks/template-part-navigation-edit-button.js.map +1 -1
  499. package/build/hooks/use-global-styles-output.js +2 -0
  500. package/build/hooks/use-global-styles-output.js.map +1 -1
  501. package/build/index.js +2 -0
  502. package/build/index.js.map +1 -1
  503. package/build/lock-unlock.js +3 -1
  504. package/build/lock-unlock.js.map +1 -1
  505. package/build/private-apis.js +4 -2
  506. package/build/private-apis.js.map +1 -1
  507. package/build/store/actions.js +54 -52
  508. package/build/store/actions.js.map +2 -2
  509. package/build/store/constants.js +15 -13
  510. package/build/store/constants.js.map +1 -1
  511. package/build/store/defaults.js +3 -1
  512. package/build/store/defaults.js.map +1 -1
  513. package/build/store/index.js +4 -2
  514. package/build/store/index.js.map +1 -1
  515. package/build/store/local-autosave.js +2 -0
  516. package/build/store/local-autosave.js.map +1 -1
  517. package/build/store/private-actions.js +17 -7
  518. package/build/store/private-actions.js.map +2 -2
  519. package/build/store/private-selectors.js +15 -8
  520. package/build/store/private-selectors.js.map +2 -2
  521. package/build/store/reducer.js +12 -0
  522. package/build/store/reducer.js.map +2 -2
  523. package/build/store/selectors.js +80 -78
  524. package/build/store/selectors.js.map +2 -2
  525. package/build/store/utils/is-template-revertable.js +2 -0
  526. package/build/store/utils/is-template-revertable.js.map +1 -1
  527. package/build/store/utils/notice-builder.js +2 -0
  528. package/build/store/utils/notice-builder.js.map +1 -1
  529. package/build/utils/get-item-title.js +2 -0
  530. package/build/utils/get-item-title.js.map +1 -1
  531. package/build/utils/get-template-info.js +4 -2
  532. package/build/utils/get-template-info.js.map +1 -1
  533. package/build/utils/get-template-part-icon.js +2 -0
  534. package/build/utils/get-template-part-icon.js.map +1 -1
  535. package/build/utils/index.js +2 -0
  536. package/build/utils/index.js.map +1 -1
  537. package/build/utils/media-sideload/index.js +3 -1
  538. package/build/utils/media-sideload/index.js.map +1 -1
  539. package/build/utils/media-upload/index.js +3 -1
  540. package/build/utils/media-upload/index.js.map +1 -1
  541. package/build/utils/pageTypeBadge.js +2 -0
  542. package/build/utils/pageTypeBadge.js.map +1 -1
  543. package/build/utils/search-templates.js +2 -0
  544. package/build/utils/search-templates.js.map +1 -1
  545. package/build/utils/set-nested-value.js +2 -0
  546. package/build/utils/set-nested-value.js.map +1 -1
  547. package/build/utils/terms.js +5 -3
  548. package/build/utils/terms.js.map +1 -1
  549. package/build/utils/url.js +2 -0
  550. package/build/utils/url.js.map +1 -1
  551. package/build-module/bindings/api.js +1 -0
  552. package/build-module/bindings/api.js.map +1 -1
  553. package/build-module/bindings/pattern-overrides.js +2 -1
  554. package/build-module/bindings/pattern-overrides.js.map +1 -1
  555. package/build-module/bindings/post-data.js +49 -64
  556. package/build-module/bindings/post-data.js.map +2 -2
  557. package/build-module/bindings/post-meta.js +46 -39
  558. package/build-module/bindings/post-meta.js.map +2 -2
  559. package/build-module/bindings/term-data.js +2 -1
  560. package/build-module/bindings/term-data.js.map +1 -1
  561. package/build-module/components/autocompleters/index.js +1 -0
  562. package/build-module/components/autocompleters/index.js.map +1 -1
  563. package/build-module/components/autocompleters/user.js +2 -1
  564. package/build-module/components/autocompleters/user.js.map +1 -1
  565. package/build-module/components/autosave-monitor/index.js +3 -2
  566. package/build-module/components/autosave-monitor/index.js.map +1 -1
  567. package/build-module/components/block-removal-warnings/index.js +5 -4
  568. package/build-module/components/block-removal-warnings/index.js.map +1 -1
  569. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +5 -4
  570. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  571. package/build-module/components/block-visibility/index.js +4 -3
  572. package/build-module/components/block-visibility/index.js.map +1 -1
  573. package/build-module/components/blog-title/index.js +3 -2
  574. package/build-module/components/blog-title/index.js.map +1 -1
  575. package/build-module/components/character-count/index.js +1 -0
  576. package/build-module/components/character-count/index.js.map +1 -1
  577. package/build-module/components/collab-sidebar/add-comment.js +21 -18
  578. package/build-module/components/collab-sidebar/add-comment.js.map +2 -2
  579. package/build-module/components/collab-sidebar/comment-author-info.js +3 -2
  580. package/build-module/components/collab-sidebar/comment-author-info.js.map +2 -2
  581. package/build-module/components/collab-sidebar/comment-form.js +16 -6
  582. package/build-module/components/collab-sidebar/comment-form.js.map +2 -2
  583. package/build-module/components/collab-sidebar/comment-indicator-toolbar.js +19 -28
  584. package/build-module/components/collab-sidebar/comment-indicator-toolbar.js.map +2 -2
  585. package/build-module/components/collab-sidebar/comment-menu-item.js +43 -9
  586. package/build-module/components/collab-sidebar/comment-menu-item.js.map +2 -2
  587. package/build-module/components/collab-sidebar/comments.js +387 -326
  588. package/build-module/components/collab-sidebar/comments.js.map +2 -2
  589. package/build-module/components/collab-sidebar/constants.js +4 -3
  590. package/build-module/components/collab-sidebar/constants.js.map +1 -1
  591. package/build-module/components/collab-sidebar/hooks.js +7 -4
  592. package/build-module/components/collab-sidebar/hooks.js.map +2 -2
  593. package/build-module/components/collab-sidebar/index.js +52 -27
  594. package/build-module/components/collab-sidebar/index.js.map +2 -2
  595. package/build-module/components/collab-sidebar/utils.js +3 -2
  596. package/build-module/components/collab-sidebar/utils.js.map +2 -2
  597. package/build-module/components/collapsible-block-toolbar/index.js +3 -2
  598. package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
  599. package/build-module/components/commands/index.js +21 -8
  600. package/build-module/components/commands/index.js.map +2 -2
  601. package/build-module/components/deprecated.js +54 -53
  602. package/build-module/components/deprecated.js.map +1 -1
  603. package/build-module/components/document-bar/index.js +3 -2
  604. package/build-module/components/document-bar/index.js.map +1 -1
  605. package/build-module/components/document-outline/check.js +1 -0
  606. package/build-module/components/document-outline/check.js.map +1 -1
  607. package/build-module/components/document-outline/index.js +8 -7
  608. package/build-module/components/document-outline/index.js.map +1 -1
  609. package/build-module/components/document-outline/item.js +3 -2
  610. package/build-module/components/document-outline/item.js.map +1 -1
  611. package/build-module/components/document-tools/index.js +2 -1
  612. package/build-module/components/document-tools/index.js.map +1 -1
  613. package/build-module/components/editor/index.js +13 -4
  614. package/build-module/components/editor/index.js.map +2 -2
  615. package/build-module/components/editor-history/redo.js +2 -1
  616. package/build-module/components/editor-history/redo.js.map +1 -1
  617. package/build-module/components/editor-history/undo.js +2 -1
  618. package/build-module/components/editor-history/undo.js.map +1 -1
  619. package/build-module/components/editor-interface/index.js +3 -2
  620. package/build-module/components/editor-interface/index.js.map +1 -1
  621. package/build-module/components/editor-notices/index.js +2 -1
  622. package/build-module/components/editor-notices/index.js.map +1 -1
  623. package/build-module/components/editor-snackbars/index.js +3 -2
  624. package/build-module/components/editor-snackbars/index.js.map +1 -1
  625. package/build-module/components/entities-saved-states/entity-record-item.js +2 -1
  626. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  627. package/build-module/components/entities-saved-states/entity-type-list.js +2 -1
  628. package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
  629. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +2 -1
  630. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  631. package/build-module/components/entities-saved-states/index.js +2 -1
  632. package/build-module/components/entities-saved-states/index.js.map +2 -2
  633. package/build-module/components/error-boundary/index.js +4 -3
  634. package/build-module/components/error-boundary/index.js.map +1 -1
  635. package/build-module/components/global-keyboard-shortcuts/index.js +1 -0
  636. package/build-module/components/global-keyboard-shortcuts/index.js.map +1 -1
  637. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +2 -1
  638. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  639. package/build-module/components/global-styles/block-link.js +1 -0
  640. package/build-module/components/global-styles/block-link.js.map +1 -1
  641. package/build-module/components/global-styles/header.js +2 -1
  642. package/build-module/components/global-styles/header.js.map +1 -1
  643. package/build-module/components/global-styles/hooks.js +2 -1
  644. package/build-module/components/global-styles/hooks.js.map +2 -2
  645. package/build-module/components/global-styles/index.js +3 -2
  646. package/build-module/components/global-styles/index.js.map +1 -1
  647. package/build-module/components/global-styles/menu.js +2 -1
  648. package/build-module/components/global-styles/menu.js.map +1 -1
  649. package/build-module/components/global-styles-provider/index.js +2 -1
  650. package/build-module/components/global-styles-provider/index.js.map +1 -1
  651. package/build-module/components/global-styles-renderer/index.js +1 -0
  652. package/build-module/components/global-styles-renderer/index.js.map +1 -1
  653. package/build-module/components/global-styles-sidebar/default-sidebar.js +2 -1
  654. package/build-module/components/global-styles-sidebar/default-sidebar.js.map +1 -1
  655. package/build-module/components/global-styles-sidebar/index.js +2 -1
  656. package/build-module/components/global-styles-sidebar/index.js.map +1 -1
  657. package/build-module/components/global-styles-sidebar/welcome-guide-image.js +1 -0
  658. package/build-module/components/global-styles-sidebar/welcome-guide-image.js.map +1 -1
  659. package/build-module/components/global-styles-sidebar/welcome-guide.js +2 -1
  660. package/build-module/components/global-styles-sidebar/welcome-guide.js.map +1 -1
  661. package/build-module/components/header/back-button.js +7 -6
  662. package/build-module/components/header/back-button.js.map +1 -1
  663. package/build-module/components/header/index.js +4 -3
  664. package/build-module/components/header/index.js.map +1 -1
  665. package/build-module/components/index.js +3 -2
  666. package/build-module/components/index.js.map +1 -1
  667. package/build-module/components/inserter-sidebar/index.js +3 -2
  668. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  669. package/build-module/components/keyboard-shortcut-help-modal/config.js +2 -1
  670. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  671. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -1
  672. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  673. package/build-module/components/keyboard-shortcut-help-modal/index.js +6 -5
  674. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  675. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +5 -4
  676. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  677. package/build-module/components/list-view-sidebar/index.js +3 -2
  678. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  679. package/build-module/components/list-view-sidebar/list-view-outline.js +2 -1
  680. package/build-module/components/list-view-sidebar/list-view-outline.js.map +1 -1
  681. package/build-module/components/local-autosave-monitor/index.js +5 -4
  682. package/build-module/components/local-autosave-monitor/index.js.map +1 -1
  683. package/build-module/components/media-categories/index.js +7 -6
  684. package/build-module/components/media-categories/index.js.map +1 -1
  685. package/build-module/components/mode-switcher/index.js +3 -2
  686. package/build-module/components/mode-switcher/index.js.map +1 -1
  687. package/build-module/components/more-menu/copy-content-menu-item.js +2 -1
  688. package/build-module/components/more-menu/copy-content-menu-item.js.map +1 -1
  689. package/build-module/components/more-menu/index.js +3 -2
  690. package/build-module/components/more-menu/index.js.map +2 -2
  691. package/build-module/components/more-menu/tools-more-menu-group.js +3 -2
  692. package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -1
  693. package/build-module/components/more-menu/view-more-menu-group.js +3 -2
  694. package/build-module/components/more-menu/view-more-menu-group.js.map +1 -1
  695. package/build-module/components/page-attributes/check.js +1 -0
  696. package/build-module/components/page-attributes/check.js.map +1 -1
  697. package/build-module/components/page-attributes/order.js +2 -1
  698. package/build-module/components/page-attributes/order.js.map +1 -1
  699. package/build-module/components/page-attributes/panel.js +3 -2
  700. package/build-module/components/page-attributes/panel.js.map +1 -1
  701. package/build-module/components/page-attributes/parent.js +3 -2
  702. package/build-module/components/page-attributes/parent.js.map +1 -1
  703. package/build-module/components/pattern-duplicate-modal/index.js +4 -3
  704. package/build-module/components/pattern-duplicate-modal/index.js.map +1 -1
  705. package/build-module/components/pattern-overrides-panel/index.js +3 -2
  706. package/build-module/components/pattern-overrides-panel/index.js.map +1 -1
  707. package/build-module/components/pattern-rename-modal/index.js +4 -3
  708. package/build-module/components/pattern-rename-modal/index.js.map +1 -1
  709. package/build-module/components/plugin-document-setting-panel/index.js +4 -3
  710. package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
  711. package/build-module/components/plugin-more-menu-item/index.js +2 -1
  712. package/build-module/components/plugin-more-menu-item/index.js.map +1 -1
  713. package/build-module/components/plugin-post-publish-panel/index.js +4 -3
  714. package/build-module/components/plugin-post-publish-panel/index.js.map +1 -1
  715. package/build-module/components/plugin-post-status-info/index.js +4 -3
  716. package/build-module/components/plugin-post-status-info/index.js.map +1 -1
  717. package/build-module/components/plugin-pre-publish-panel/index.js +4 -3
  718. package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -1
  719. package/build-module/components/plugin-preview-menu-item/index.js +2 -1
  720. package/build-module/components/plugin-preview-menu-item/index.js.map +1 -1
  721. package/build-module/components/plugin-sidebar/index.js +2 -1
  722. package/build-module/components/plugin-sidebar/index.js.map +1 -1
  723. package/build-module/components/plugin-sidebar-more-menu-item/index.js +2 -1
  724. package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
  725. package/build-module/components/post-actions/actions.js +2 -1
  726. package/build-module/components/post-actions/actions.js.map +1 -1
  727. package/build-module/components/post-actions/index.js +3 -2
  728. package/build-module/components/post-actions/index.js.map +1 -1
  729. package/build-module/components/post-actions/set-as-homepage.js +4 -3
  730. package/build-module/components/post-actions/set-as-homepage.js.map +1 -1
  731. package/build-module/components/post-actions/set-as-posts-page.js +4 -3
  732. package/build-module/components/post-actions/set-as-posts-page.js.map +1 -1
  733. package/build-module/components/post-author/check.js +2 -1
  734. package/build-module/components/post-author/check.js.map +1 -1
  735. package/build-module/components/post-author/combobox.js +2 -1
  736. package/build-module/components/post-author/combobox.js.map +1 -1
  737. package/build-module/components/post-author/constants.js +3 -2
  738. package/build-module/components/post-author/constants.js.map +1 -1
  739. package/build-module/components/post-author/hook.js +1 -0
  740. package/build-module/components/post-author/hook.js.map +1 -1
  741. package/build-module/components/post-author/index.js +3 -2
  742. package/build-module/components/post-author/index.js.map +1 -1
  743. package/build-module/components/post-author/panel.js +2 -1
  744. package/build-module/components/post-author/panel.js.map +1 -1
  745. package/build-module/components/post-author/select.js +2 -1
  746. package/build-module/components/post-author/select.js.map +1 -1
  747. package/build-module/components/post-card-panel/index.js +3 -2
  748. package/build-module/components/post-card-panel/index.js.map +1 -1
  749. package/build-module/components/post-comments/index.js +3 -2
  750. package/build-module/components/post-comments/index.js.map +1 -1
  751. package/build-module/components/post-content-information/index.js +3 -2
  752. package/build-module/components/post-content-information/index.js.map +1 -1
  753. package/build-module/components/post-discussion/panel.js +3 -2
  754. package/build-module/components/post-discussion/panel.js.map +1 -1
  755. package/build-module/components/post-excerpt/check.js +2 -1
  756. package/build-module/components/post-excerpt/check.js.map +1 -1
  757. package/build-module/components/post-excerpt/index.js +2 -1
  758. package/build-module/components/post-excerpt/index.js.map +1 -1
  759. package/build-module/components/post-excerpt/panel.js +3 -2
  760. package/build-module/components/post-excerpt/panel.js.map +1 -1
  761. package/build-module/components/post-excerpt/plugin.js +4 -3
  762. package/build-module/components/post-excerpt/plugin.js.map +1 -1
  763. package/build-module/components/post-featured-image/check.js +2 -1
  764. package/build-module/components/post-featured-image/check.js.map +1 -1
  765. package/build-module/components/post-featured-image/index.js +9 -8
  766. package/build-module/components/post-featured-image/index.js.map +1 -1
  767. package/build-module/components/post-featured-image/panel.js +3 -2
  768. package/build-module/components/post-featured-image/panel.js.map +1 -1
  769. package/build-module/components/post-fields/index.js +1 -0
  770. package/build-module/components/post-fields/index.js.map +1 -1
  771. package/build-module/components/post-format/check.js +2 -1
  772. package/build-module/components/post-format/check.js.map +1 -1
  773. package/build-module/components/post-format/index.js +3 -2
  774. package/build-module/components/post-format/index.js.map +1 -1
  775. package/build-module/components/post-format/panel.js +2 -1
  776. package/build-module/components/post-format/panel.js.map +1 -1
  777. package/build-module/components/post-last-edited-panel/index.js +2 -1
  778. package/build-module/components/post-last-edited-panel/index.js.map +1 -1
  779. package/build-module/components/post-last-revision/check.js +2 -1
  780. package/build-module/components/post-last-revision/check.js.map +1 -1
  781. package/build-module/components/post-last-revision/index.js +2 -1
  782. package/build-module/components/post-last-revision/index.js.map +1 -1
  783. package/build-module/components/post-last-revision/panel.js +2 -1
  784. package/build-module/components/post-last-revision/panel.js.map +1 -1
  785. package/build-module/components/post-locked-modal/index.js +2 -1
  786. package/build-module/components/post-locked-modal/index.js.map +1 -1
  787. package/build-module/components/post-panel-row/index.js +3 -2
  788. package/build-module/components/post-panel-row/index.js.map +1 -1
  789. package/build-module/components/post-panel-section/index.js +2 -1
  790. package/build-module/components/post-panel-section/index.js.map +1 -1
  791. package/build-module/components/post-pending-status/check.js +1 -0
  792. package/build-module/components/post-pending-status/check.js.map +1 -1
  793. package/build-module/components/post-pending-status/index.js +2 -1
  794. package/build-module/components/post-pending-status/index.js.map +1 -1
  795. package/build-module/components/post-pingbacks/index.js +2 -1
  796. package/build-module/components/post-pingbacks/index.js.map +1 -1
  797. package/build-module/components/post-preview-button/index.js +2 -1
  798. package/build-module/components/post-preview-button/index.js.map +1 -1
  799. package/build-module/components/post-publish-button/index.js +5 -4
  800. package/build-module/components/post-publish-button/index.js.map +1 -1
  801. package/build-module/components/post-publish-button/label.js +1 -0
  802. package/build-module/components/post-publish-button/label.js.map +1 -1
  803. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +4 -3
  804. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  805. package/build-module/components/post-publish-panel/index.js +4 -3
  806. package/build-module/components/post-publish-panel/index.js.map +1 -1
  807. package/build-module/components/post-publish-panel/maybe-category-panel.js +2 -1
  808. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  809. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +4 -3
  810. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  811. package/build-module/components/post-publish-panel/maybe-tags-panel.js +4 -3
  812. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  813. package/build-module/components/post-publish-panel/maybe-upload-media.js +2 -1
  814. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  815. package/build-module/components/post-publish-panel/media-util.js +1 -0
  816. package/build-module/components/post-publish-panel/media-util.js.map +1 -1
  817. package/build-module/components/post-publish-panel/postpublish.js +5 -4
  818. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  819. package/build-module/components/post-publish-panel/prepublish.js +2 -1
  820. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  821. package/build-module/components/post-saved-state/index.js +2 -1
  822. package/build-module/components/post-saved-state/index.js.map +1 -1
  823. package/build-module/components/post-schedule/check.js +1 -0
  824. package/build-module/components/post-schedule/check.js.map +1 -1
  825. package/build-module/components/post-schedule/index.js +3 -2
  826. package/build-module/components/post-schedule/index.js.map +1 -1
  827. package/build-module/components/post-schedule/label.js +1 -0
  828. package/build-module/components/post-schedule/label.js.map +1 -1
  829. package/build-module/components/post-schedule/panel.js +3 -2
  830. package/build-module/components/post-schedule/panel.js.map +1 -1
  831. package/build-module/components/post-status/index.js +5 -4
  832. package/build-module/components/post-status/index.js.map +1 -1
  833. package/build-module/components/post-sticky/check.js +1 -0
  834. package/build-module/components/post-sticky/check.js.map +1 -1
  835. package/build-module/components/post-sticky/index.js +2 -1
  836. package/build-module/components/post-sticky/index.js.map +1 -1
  837. package/build-module/components/post-sticky/panel.js +2 -1
  838. package/build-module/components/post-sticky/panel.js.map +1 -1
  839. package/build-module/components/post-switch-to-draft-button/index.js +2 -1
  840. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  841. package/build-module/components/post-sync-status/index.js +2 -1
  842. package/build-module/components/post-sync-status/index.js.map +1 -1
  843. package/build-module/components/post-taxonomies/check.js +1 -0
  844. package/build-module/components/post-taxonomies/check.js.map +1 -1
  845. package/build-module/components/post-taxonomies/flat-term-selector.js +8 -7
  846. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  847. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +7 -6
  848. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  849. package/build-module/components/post-taxonomies/index.js +3 -2
  850. package/build-module/components/post-taxonomies/index.js.map +1 -1
  851. package/build-module/components/post-taxonomies/most-used-terms.js +4 -3
  852. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  853. package/build-module/components/post-taxonomies/panel.js +2 -1
  854. package/build-module/components/post-taxonomies/panel.js.map +1 -1
  855. package/build-module/components/post-template/block-theme.js +2 -1
  856. package/build-module/components/post-template/block-theme.js.map +1 -1
  857. package/build-module/components/post-template/classic-theme.js +2 -1
  858. package/build-module/components/post-template/classic-theme.js.map +1 -1
  859. package/build-module/components/post-template/create-new-template-modal.js +3 -2
  860. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  861. package/build-module/components/post-template/create-new-template.js +2 -1
  862. package/build-module/components/post-template/create-new-template.js.map +1 -1
  863. package/build-module/components/post-template/hooks.js +1 -0
  864. package/build-module/components/post-template/hooks.js.map +1 -1
  865. package/build-module/components/post-template/panel.js +11 -7
  866. package/build-module/components/post-template/panel.js.map +2 -2
  867. package/build-module/components/post-template/reset-default-template.js +2 -1
  868. package/build-module/components/post-template/reset-default-template.js.map +1 -1
  869. package/build-module/components/post-template/swap-template-button.js +2 -1
  870. package/build-module/components/post-template/swap-template-button.js.map +1 -1
  871. package/build-module/components/post-text-editor/index.js +2 -1
  872. package/build-module/components/post-text-editor/index.js.map +1 -1
  873. package/build-module/components/post-title/constants.js +3 -2
  874. package/build-module/components/post-title/constants.js.map +1 -1
  875. package/build-module/components/post-title/index.js +21 -11
  876. package/build-module/components/post-title/index.js.map +2 -2
  877. package/build-module/components/post-title/post-title-raw.js +2 -1
  878. package/build-module/components/post-title/post-title-raw.js.map +1 -1
  879. package/build-module/components/post-title/use-post-title-focus.js +1 -0
  880. package/build-module/components/post-title/use-post-title-focus.js.map +1 -1
  881. package/build-module/components/post-title/use-post-title.js +1 -0
  882. package/build-module/components/post-title/use-post-title.js.map +1 -1
  883. package/build-module/components/post-transform-panel/hooks.js +2 -1
  884. package/build-module/components/post-transform-panel/hooks.js.map +1 -1
  885. package/build-module/components/post-transform-panel/index.js +2 -1
  886. package/build-module/components/post-transform-panel/index.js.map +1 -1
  887. package/build-module/components/post-trash/check.js +1 -0
  888. package/build-module/components/post-trash/check.js.map +1 -1
  889. package/build-module/components/post-trash/index.js +2 -1
  890. package/build-module/components/post-trash/index.js.map +1 -1
  891. package/build-module/components/post-type-support-check/index.js +1 -0
  892. package/build-module/components/post-type-support-check/index.js.map +1 -1
  893. package/build-module/components/post-url/check.js +1 -0
  894. package/build-module/components/post-url/check.js.map +1 -1
  895. package/build-module/components/post-url/index.js +2 -1
  896. package/build-module/components/post-url/index.js.map +1 -1
  897. package/build-module/components/post-url/label.js +1 -0
  898. package/build-module/components/post-url/label.js.map +1 -1
  899. package/build-module/components/post-url/panel.js +2 -1
  900. package/build-module/components/post-url/panel.js.map +1 -1
  901. package/build-module/components/post-view-link/index.js +2 -1
  902. package/build-module/components/post-view-link/index.js.map +1 -1
  903. package/build-module/components/post-visibility/check.js +1 -0
  904. package/build-module/components/post-visibility/check.js.map +1 -1
  905. package/build-module/components/post-visibility/index.js +2 -1
  906. package/build-module/components/post-visibility/index.js.map +1 -1
  907. package/build-module/components/post-visibility/label.js +1 -0
  908. package/build-module/components/post-visibility/label.js.map +1 -1
  909. package/build-module/components/post-visibility/utils.js +2 -1
  910. package/build-module/components/post-visibility/utils.js.map +1 -1
  911. package/build-module/components/posts-per-page/index.js +2 -1
  912. package/build-module/components/posts-per-page/index.js.map +1 -1
  913. package/build-module/components/preferences-modal/enable-panel.js +3 -2
  914. package/build-module/components/preferences-modal/enable-panel.js.map +1 -1
  915. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js +4 -3
  916. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  917. package/build-module/components/preferences-modal/enable-publish-sidebar.js +3 -2
  918. package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
  919. package/build-module/components/preferences-modal/index.js +4 -3
  920. package/build-module/components/preferences-modal/index.js.map +2 -2
  921. package/build-module/components/preview-dropdown/index.js +2 -1
  922. package/build-module/components/preview-dropdown/index.js.map +1 -1
  923. package/build-module/components/provider/disable-non-page-content-blocks.js +1 -0
  924. package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
  925. package/build-module/components/provider/index.js +7 -6
  926. package/build-module/components/provider/index.js.map +1 -1
  927. package/build-module/components/provider/navigation-block-editing-mode.js +1 -0
  928. package/build-module/components/provider/navigation-block-editing-mode.js.map +1 -1
  929. package/build-module/components/provider/use-auto-switch-editor-sidebars.js +1 -0
  930. package/build-module/components/provider/use-auto-switch-editor-sidebars.js.map +1 -1
  931. package/build-module/components/provider/use-block-editor-settings.js +4 -3
  932. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  933. package/build-module/components/provider/use-hide-blocks-from-inserter.js +2 -1
  934. package/build-module/components/provider/use-hide-blocks-from-inserter.js.map +1 -1
  935. package/build-module/components/provider/use-post-content-blocks.js +2 -1
  936. package/build-module/components/provider/use-post-content-blocks.js.map +1 -1
  937. package/build-module/components/provider/with-registry-provider.js +3 -2
  938. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  939. package/build-module/components/resizable-editor/index.js +3 -2
  940. package/build-module/components/resizable-editor/index.js.map +1 -1
  941. package/build-module/components/resizable-editor/resize-handle.js +3 -2
  942. package/build-module/components/resizable-editor/resize-handle.js.map +1 -1
  943. package/build-module/components/save-publish-panels/index.js +4 -3
  944. package/build-module/components/save-publish-panels/index.js.map +1 -1
  945. package/build-module/components/sidebar/constants.js +2 -1
  946. package/build-module/components/sidebar/constants.js.map +1 -1
  947. package/build-module/components/sidebar/header.js +4 -3
  948. package/build-module/components/sidebar/header.js.map +1 -1
  949. package/build-module/components/sidebar/index.js +6 -5
  950. package/build-module/components/sidebar/index.js.map +1 -1
  951. package/build-module/components/sidebar/post-summary.js +3 -2
  952. package/build-module/components/sidebar/post-summary.js.map +1 -1
  953. package/build-module/components/site-discussion/index.js +3 -2
  954. package/build-module/components/site-discussion/index.js.map +1 -1
  955. package/build-module/components/start-page-options/index.js +7 -7
  956. package/build-module/components/start-page-options/index.js.map +2 -2
  957. package/build-module/components/start-template-options/index.js +2 -1
  958. package/build-module/components/start-template-options/index.js.map +1 -1
  959. package/build-module/components/style-book/categories.js +1 -0
  960. package/build-module/components/style-book/categories.js.map +1 -1
  961. package/build-module/components/style-book/color-examples.js +3 -2
  962. package/build-module/components/style-book/color-examples.js.map +1 -1
  963. package/build-module/components/style-book/constants.js +8 -7
  964. package/build-module/components/style-book/constants.js.map +1 -1
  965. package/build-module/components/style-book/duotone-examples.js +3 -2
  966. package/build-module/components/style-book/duotone-examples.js.map +1 -1
  967. package/build-module/components/style-book/examples.js +2 -1
  968. package/build-module/components/style-book/examples.js.map +1 -1
  969. package/build-module/components/style-book/index.js +12 -11
  970. package/build-module/components/style-book/index.js.map +1 -1
  971. package/build-module/components/styles-canvas/index.js +2 -1
  972. package/build-module/components/styles-canvas/index.js.map +1 -1
  973. package/build-module/components/styles-canvas/revisions.js +3 -2
  974. package/build-module/components/styles-canvas/revisions.js.map +1 -1
  975. package/build-module/components/styles-canvas/style-book.js +2 -1
  976. package/build-module/components/styles-canvas/style-book.js.map +1 -1
  977. package/build-module/components/table-of-contents/index.js +2 -1
  978. package/build-module/components/table-of-contents/index.js.map +1 -1
  979. package/build-module/components/table-of-contents/panel.js +2 -1
  980. package/build-module/components/table-of-contents/panel.js.map +1 -1
  981. package/build-module/components/template-content-panel/index.js +5 -4
  982. package/build-module/components/template-content-panel/index.js.map +1 -1
  983. package/build-module/components/template-part-content-panel/index.js +3 -2
  984. package/build-module/components/template-part-content-panel/index.js.map +1 -1
  985. package/build-module/components/template-part-menu-items/convert-to-regular.js +2 -1
  986. package/build-module/components/template-part-menu-items/convert-to-regular.js.map +1 -1
  987. package/build-module/components/template-part-menu-items/convert-to-template-part.js +2 -1
  988. package/build-module/components/template-part-menu-items/convert-to-template-part.js.map +1 -1
  989. package/build-module/components/template-part-menu-items/index.js +2 -1
  990. package/build-module/components/template-part-menu-items/index.js.map +1 -1
  991. package/build-module/components/template-validation-notice/index.js +2 -1
  992. package/build-module/components/template-validation-notice/index.js.map +1 -1
  993. package/build-module/components/text-editor/index.js +2 -1
  994. package/build-module/components/text-editor/index.js.map +1 -1
  995. package/build-module/components/theme-support-check/index.js +1 -0
  996. package/build-module/components/theme-support-check/index.js.map +1 -1
  997. package/build-module/components/time-to-read/index.js +3 -2
  998. package/build-module/components/time-to-read/index.js.map +1 -1
  999. package/build-module/components/unsaved-changes-warning/index.js +1 -0
  1000. package/build-module/components/unsaved-changes-warning/index.js.map +1 -1
  1001. package/build-module/components/visual-editor/edit-template-blocks-notification.js +2 -1
  1002. package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  1003. package/build-module/components/visual-editor/index.js +33 -13
  1004. package/build-module/components/visual-editor/index.js.map +2 -2
  1005. package/build-module/components/visual-editor/use-edit-content-only-section-exit.js +40 -0
  1006. package/build-module/components/visual-editor/use-edit-content-only-section-exit.js.map +7 -0
  1007. package/build-module/components/visual-editor/use-padding-appender.js +50 -0
  1008. package/build-module/components/visual-editor/use-padding-appender.js.map +7 -0
  1009. package/build-module/components/visual-editor/use-select-nearest-editable-block.js +2 -1
  1010. package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  1011. package/build-module/components/visual-editor/use-zoom-out-mode-exit.js +1 -0
  1012. package/build-module/components/visual-editor/use-zoom-out-mode-exit.js.map +1 -1
  1013. package/build-module/components/word-count/index.js +2 -1
  1014. package/build-module/components/word-count/index.js.map +1 -1
  1015. package/build-module/components/zoom-out-toggle/index.js +3 -2
  1016. package/build-module/components/zoom-out-toggle/index.js.map +1 -1
  1017. package/build-module/dataviews/api.js +1 -0
  1018. package/build-module/dataviews/api.js.map +1 -1
  1019. package/build-module/dataviews/fields/content-preview/content-preview-view.js +5 -5
  1020. package/build-module/dataviews/fields/content-preview/content-preview-view.js.map +2 -2
  1021. package/build-module/dataviews/fields/content-preview/index.js +2 -1
  1022. package/build-module/dataviews/fields/content-preview/index.js.map +1 -1
  1023. package/build-module/dataviews/store/private-actions.js +2 -1
  1024. package/build-module/dataviews/store/private-actions.js.map +1 -1
  1025. package/build-module/dataviews/store/private-selectors.js +2 -1
  1026. package/build-module/dataviews/store/private-selectors.js.map +1 -1
  1027. package/build-module/dataviews/store/reducer.js +1 -0
  1028. package/build-module/dataviews/store/reducer.js.map +1 -1
  1029. package/build-module/hooks/custom-sources-backwards-compatibility.js +3 -2
  1030. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  1031. package/build-module/hooks/default-autocompleters.js +1 -0
  1032. package/build-module/hooks/default-autocompleters.js.map +1 -1
  1033. package/build-module/hooks/index.js +1 -0
  1034. package/build-module/hooks/index.js.map +1 -1
  1035. package/build-module/hooks/media-upload.js +2 -1
  1036. package/build-module/hooks/media-upload.js.map +1 -1
  1037. package/build-module/hooks/navigation-link-view-button.js +4 -3
  1038. package/build-module/hooks/navigation-link-view-button.js.map +1 -1
  1039. package/build-module/hooks/pattern-overrides.js +5 -6
  1040. package/build-module/hooks/pattern-overrides.js.map +2 -2
  1041. package/build-module/hooks/push-changes-to-global-styles/index.js +11 -10
  1042. package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
  1043. package/build-module/hooks/template-part-navigation-edit-button.js +6 -5
  1044. package/build-module/hooks/template-part-navigation-edit-button.js.map +1 -1
  1045. package/build-module/hooks/use-global-styles-output.js +1 -0
  1046. package/build-module/hooks/use-global-styles-output.js.map +1 -1
  1047. package/build-module/index.js +1 -0
  1048. package/build-module/index.js.map +1 -1
  1049. package/build-module/lock-unlock.js +2 -1
  1050. package/build-module/lock-unlock.js.map +1 -1
  1051. package/build-module/private-apis.js +3 -2
  1052. package/build-module/private-apis.js.map +1 -1
  1053. package/build-module/store/actions.js +53 -52
  1054. package/build-module/store/actions.js.map +2 -2
  1055. package/build-module/store/constants.js +14 -13
  1056. package/build-module/store/constants.js.map +1 -1
  1057. package/build-module/store/defaults.js +2 -1
  1058. package/build-module/store/defaults.js.map +1 -1
  1059. package/build-module/store/index.js +3 -2
  1060. package/build-module/store/index.js.map +1 -1
  1061. package/build-module/store/local-autosave.js +1 -0
  1062. package/build-module/store/local-autosave.js.map +1 -1
  1063. package/build-module/store/private-actions.js +15 -7
  1064. package/build-module/store/private-actions.js.map +2 -2
  1065. package/build-module/store/private-selectors.js +13 -8
  1066. package/build-module/store/private-selectors.js.map +2 -2
  1067. package/build-module/store/reducer.js +10 -0
  1068. package/build-module/store/reducer.js.map +2 -2
  1069. package/build-module/store/selectors.js +79 -78
  1070. package/build-module/store/selectors.js.map +2 -2
  1071. package/build-module/store/utils/is-template-revertable.js +1 -0
  1072. package/build-module/store/utils/is-template-revertable.js.map +1 -1
  1073. package/build-module/store/utils/notice-builder.js +1 -0
  1074. package/build-module/store/utils/notice-builder.js.map +1 -1
  1075. package/build-module/utils/get-item-title.js +1 -0
  1076. package/build-module/utils/get-item-title.js.map +1 -1
  1077. package/build-module/utils/get-template-info.js +3 -2
  1078. package/build-module/utils/get-template-info.js.map +1 -1
  1079. package/build-module/utils/get-template-part-icon.js +1 -0
  1080. package/build-module/utils/get-template-part-icon.js.map +1 -1
  1081. package/build-module/utils/index.js +1 -0
  1082. package/build-module/utils/index.js.map +1 -1
  1083. package/build-module/utils/media-sideload/index.js +2 -1
  1084. package/build-module/utils/media-sideload/index.js.map +1 -1
  1085. package/build-module/utils/media-upload/index.js +2 -1
  1086. package/build-module/utils/media-upload/index.js.map +1 -1
  1087. package/build-module/utils/pageTypeBadge.js +1 -0
  1088. package/build-module/utils/pageTypeBadge.js.map +1 -1
  1089. package/build-module/utils/search-templates.js +1 -0
  1090. package/build-module/utils/search-templates.js.map +1 -1
  1091. package/build-module/utils/set-nested-value.js +1 -0
  1092. package/build-module/utils/set-nested-value.js.map +1 -1
  1093. package/build-module/utils/terms.js +4 -3
  1094. package/build-module/utils/terms.js.map +1 -1
  1095. package/build-module/utils/url.js +1 -0
  1096. package/build-module/utils/url.js.map +1 -1
  1097. package/build-style/style-rtl.css +58 -82
  1098. package/build-style/style.css +58 -82
  1099. package/build-types/bindings/post-data.d.ts +18 -8
  1100. package/build-types/bindings/post-meta.d.ts +1 -7
  1101. package/build-types/components/collab-sidebar/add-comment.d.ts +3 -3
  1102. package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
  1103. package/build-types/components/collab-sidebar/comment-form.d.ts.map +1 -1
  1104. package/build-types/components/collab-sidebar/comment-indicator-toolbar.d.ts.map +1 -1
  1105. package/build-types/components/collab-sidebar/comment-menu-item.d.ts +3 -2
  1106. package/build-types/components/collab-sidebar/comment-menu-item.d.ts.map +1 -1
  1107. package/build-types/components/collab-sidebar/comments.d.ts +3 -3
  1108. package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
  1109. package/build-types/components/collab-sidebar/hooks.d.ts.map +1 -1
  1110. package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
  1111. package/build-types/components/collab-sidebar/utils.d.ts.map +1 -1
  1112. package/build-types/components/commands/index.d.ts.map +1 -1
  1113. package/build-types/components/editor/index.d.ts.map +1 -1
  1114. package/build-types/components/entities-saved-states/index.d.ts +2 -2
  1115. package/build-types/components/entities-saved-states/index.d.ts.map +1 -1
  1116. package/build-types/components/global-styles/hooks.d.ts +6 -6
  1117. package/build-types/components/global-styles/hooks.d.ts.map +1 -1
  1118. package/build-types/components/header/back-button.d.ts.map +1 -1
  1119. package/build-types/components/local-autosave-monitor/index.d.ts.map +1 -1
  1120. package/build-types/components/more-menu/tools-more-menu-group.d.ts.map +1 -1
  1121. package/build-types/components/more-menu/view-more-menu-group.d.ts.map +1 -1
  1122. package/build-types/components/plugin-document-setting-panel/index.d.ts.map +1 -1
  1123. package/build-types/components/plugin-post-publish-panel/index.d.ts.map +1 -1
  1124. package/build-types/components/plugin-post-status-info/index.d.ts.map +1 -1
  1125. package/build-types/components/plugin-pre-publish-panel/index.d.ts.map +1 -1
  1126. package/build-types/components/post-excerpt/plugin.d.ts.map +1 -1
  1127. package/build-types/components/post-locked-modal/index.d.ts.map +1 -1
  1128. package/build-types/components/post-publish-button/index.d.ts.map +1 -1
  1129. package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -1
  1130. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts +1 -10
  1131. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -1
  1132. package/build-types/components/post-template/panel.d.ts.map +1 -1
  1133. package/build-types/components/preferences-modal/enable-plugin-document-setting-panel.d.ts.map +1 -1
  1134. package/build-types/components/save-publish-panels/index.d.ts.map +1 -1
  1135. package/build-types/components/start-page-options/index.d.ts.map +1 -1
  1136. package/build-types/components/style-book/color-examples.d.ts.map +1 -1
  1137. package/build-types/components/style-book/duotone-examples.d.ts.map +1 -1
  1138. package/build-types/components/visual-editor/index.d.ts.map +1 -1
  1139. package/build-types/components/visual-editor/use-edit-content-only-section-exit.d.ts +6 -0
  1140. package/build-types/components/visual-editor/use-edit-content-only-section-exit.d.ts.map +1 -0
  1141. package/build-types/components/visual-editor/use-padding-appender.d.ts +2 -0
  1142. package/build-types/components/visual-editor/use-padding-appender.d.ts.map +1 -0
  1143. package/build-types/dataviews/fields/content-preview/content-preview-view.d.ts.map +1 -1
  1144. package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
  1145. package/build-types/store/actions.d.ts +3 -4
  1146. package/build-types/store/actions.d.ts.map +1 -1
  1147. package/build-types/store/private-actions.d.ts +7 -0
  1148. package/build-types/store/private-actions.d.ts.map +1 -1
  1149. package/build-types/store/private-selectors.d.ts +12 -5
  1150. package/build-types/store/private-selectors.d.ts.map +1 -1
  1151. package/build-types/store/reducer.d.ts +10 -0
  1152. package/build-types/store/reducer.d.ts.map +1 -1
  1153. package/build-types/store/selectors.d.ts +68 -68
  1154. package/build-types/store/selectors.d.ts.map +1 -1
  1155. package/package.json +40 -40
  1156. package/src/bindings/post-data.js +63 -111
  1157. package/src/bindings/post-meta.js +55 -46
  1158. package/src/bindings/test/post-meta.js +211 -0
  1159. package/src/components/collab-sidebar/add-comment.js +19 -16
  1160. package/src/components/collab-sidebar/comment-author-info.js +1 -1
  1161. package/src/components/collab-sidebar/comment-form.js +16 -4
  1162. package/src/components/collab-sidebar/comment-indicator-toolbar.js +19 -29
  1163. package/src/components/collab-sidebar/comment-menu-item.js +51 -11
  1164. package/src/components/collab-sidebar/comments.js +173 -80
  1165. package/src/components/collab-sidebar/hooks.js +6 -4
  1166. package/src/components/collab-sidebar/index.js +78 -40
  1167. package/src/components/collab-sidebar/style.scss +20 -44
  1168. package/src/components/collab-sidebar/utils.js +3 -2
  1169. package/src/components/commands/index.js +32 -19
  1170. package/src/components/editor/index.js +12 -1
  1171. package/src/components/entities-saved-states/index.js +1 -1
  1172. package/src/components/global-styles/hooks.js +4 -4
  1173. package/src/components/more-menu/index.js +1 -1
  1174. package/src/components/post-template/panel.js +11 -8
  1175. package/src/components/post-title/index.js +22 -9
  1176. package/src/components/preferences-modal/index.js +1 -1
  1177. package/src/components/start-page-options/index.js +5 -6
  1178. package/src/components/start-page-options/style.scss +1 -1
  1179. package/src/components/visual-editor/index.js +36 -6
  1180. package/src/components/visual-editor/use-edit-content-only-section-exit.js +55 -0
  1181. package/src/components/visual-editor/use-padding-appender.js +70 -0
  1182. package/src/dataviews/fields/content-preview/content-preview-view.tsx +2 -5
  1183. package/src/hooks/pattern-overrides.js +0 -2
  1184. package/src/store/actions.js +9 -1
  1185. package/src/store/private-actions.js +13 -0
  1186. package/src/store/private-selectors.js +10 -0
  1187. package/src/store/reducer.js +16 -0
  1188. package/src/store/selectors.js +0 -2
  1189. package/tsconfig.tsbuildinfo +1 -1
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-publish-panel/maybe-category-panel.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useState, useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport HierarchicalTermSelector from '../post-taxonomies/hierarchical-term-selector';\nimport { store as editorStore } from '../../store';\n\nfunction MaybeCategoryPanel() {\n\tconst { hasNoCategory, hasSiteCategories } = useSelect( ( select ) => {\n\t\tconst postType = select( editorStore ).getCurrentPostType();\n\t\tconst { canUser, getEntityRecord } = select( coreStore );\n\t\tconst categoriesTaxonomy = getEntityRecord(\n\t\t\t'root',\n\t\t\t'taxonomy',\n\t\t\t'category'\n\t\t);\n\t\tconst defaultCategoryId = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEntityRecord( 'root', 'site' )?.default_category\n\t\t\t: undefined;\n\t\tconst defaultCategory = defaultCategoryId\n\t\t\t? getEntityRecord( 'taxonomy', 'category', defaultCategoryId )\n\t\t\t: undefined;\n\t\tconst postTypeSupportsCategories =\n\t\t\tcategoriesTaxonomy &&\n\t\t\tcategoriesTaxonomy.types.some( ( type ) => type === postType );\n\t\tconst categories =\n\t\t\tcategoriesTaxonomy &&\n\t\t\tselect( editorStore ).getEditedPostAttribute(\n\t\t\t\tcategoriesTaxonomy.rest_base\n\t\t\t);\n\t\tconst siteCategories = postTypeSupportsCategories\n\t\t\t? !! select( coreStore ).getEntityRecords( 'taxonomy', 'category', {\n\t\t\t\t\texclude: [ defaultCategoryId ],\n\t\t\t\t\tper_page: 1,\n\t\t\t } )?.length\n\t\t\t: false;\n\n\t\t// This boolean should return true if everything is loaded\n\t\t// ( categoriesTaxonomy, defaultCategory )\n\t\t// and the post has not been assigned a category different than \"uncategorized\".\n\t\tconst noCategory =\n\t\t\t!! categoriesTaxonomy &&\n\t\t\t!! defaultCategory &&\n\t\t\tpostTypeSupportsCategories &&\n\t\t\t( categories?.length === 0 ||\n\t\t\t\t( categories?.length === 1 &&\n\t\t\t\t\tdefaultCategory?.id === categories[ 0 ] ) );\n\n\t\treturn {\n\t\t\thasNoCategory: noCategory,\n\t\t\thasSiteCategories: siteCategories,\n\t\t};\n\t}, [] );\n\n\tconst [ shouldShowPanel, setShouldShowPanel ] = useState( false );\n\tuseEffect( () => {\n\t\t// We use state to avoid hiding the panel if the user edits the categories\n\t\t// and adds one within the panel itself (while visible).\n\t\tif ( hasNoCategory ) {\n\t\t\tsetShouldShowPanel( true );\n\t\t}\n\t}, [ hasNoCategory ] );\n\n\t// We only want to show the category panel:\n\t// if the post type supports categories,\n\t// if the site has categories other than the default category,\n\t// and if the post has no other categories than the default category.\n\tif ( ! shouldShowPanel || ! hasSiteCategories ) {\n\t\treturn null;\n\t}\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'Assign a category' ) }\n\t\t</span>,\n\t];\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<HierarchicalTermSelector slug=\"category\" />\n\t\t</PanelBody>\n\t);\n}\n\nexport default MaybeCategoryPanel;\n"],
5
- "mappings": "AAoFE,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AAE,iBAAkB,YAAY,YAAY;AAAA,MACjE,SAAS,CAAE,iBAAkB;AAAA,MAC7B,UAAU;AAAA,IACV,CAAE,GAAG,SACL;AAKH,UAAM,aACL,CAAC,CAAE,sBACH,CAAC,CAAE,mBACH,+BACE,YAAY,WAAW,KACtB,YAAY,WAAW,KACxB,iBAAiB,OAAO,WAAY,CAAE;AAEzC,WAAO;AAAA,MACN,eAAe;AAAA,MACf,mBAAmB;AAAA,IACpB;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,QAAM,CAAE,iBAAiB,kBAAmB,IAAI,SAAU,KAAM;AAChE,YAAW,MAAM;AAGhB,QAAK,eAAgB;AACpB,yBAAoB,IAAK;AAAA,IAC1B;AAAA,EACD,GAAG,CAAE,aAAc,CAAE;AAMrB,MAAK,CAAE,mBAAmB,CAAE,mBAAoB;AAC/C,WAAO;AAAA,EACR;AAEA,QAAM,iBAAiB;AAAA,IACtB,GAAI,aAAc;AAAA,IAClB,oBAAC,UAAK,WAAU,mCACb,aAAI,mBAAoB,KAD2B,OAEtD;AAAA,EACD;AAEA,SACC,qBAAC,aAAU,aAAc,OAAQ,OAAQ,gBACxC;AAAA,wBAAC,OACE;AAAA,MACD;AAAA,IACD,GACD;AAAA,IACA,oBAAC,4BAAyB,MAAK,YAAW;AAAA,KAC3C;AAEF;AAEA,IAAO,+BAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,17 +1,18 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ // packages/editor/src/components/post-publish-panel/maybe-post-format-panel.js
2
2
  import { Button, PanelBody } from "@wordpress/components";
3
3
  import { useDispatch, useSelect } from "@wordpress/data";
4
4
  import { __, sprintf } from "@wordpress/i18n";
5
5
  import { store as coreStore } from "@wordpress/core-data";
6
6
  import { POST_FORMATS } from "../post-format";
7
7
  import { store as editorStore } from "../../store";
8
- const getSuggestion = (supportedFormats, suggestedPostFormat) => {
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ var getSuggestion = (supportedFormats, suggestedPostFormat) => {
9
10
  const formats = POST_FORMATS.filter(
10
11
  (format) => supportedFormats?.includes(format.id)
11
12
  );
12
13
  return formats.find((format) => format.id === suggestedPostFormat);
13
14
  };
14
- const PostFormatSuggestion = ({
15
+ var PostFormatSuggestion = ({
15
16
  suggestedPostFormat,
16
17
  suggestionText,
17
18
  onUpdatePostFormat
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-publish-panel/maybe-post-format-panel.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { Button, PanelBody } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { POST_FORMATS } from '../post-format';\nimport { store as editorStore } from '../../store';\n\nconst getSuggestion = ( supportedFormats, suggestedPostFormat ) => {\n\tconst formats = POST_FORMATS.filter( ( format ) =>\n\t\tsupportedFormats?.includes( format.id )\n\t);\n\treturn formats.find( ( format ) => format.id === suggestedPostFormat );\n};\n\nconst PostFormatSuggestion = ( {\n\tsuggestedPostFormat,\n\tsuggestionText,\n\tonUpdatePostFormat,\n} ) => (\n\t<Button\n\t\t__next40pxDefaultSize\n\t\tvariant=\"link\"\n\t\tonClick={ () => onUpdatePostFormat( suggestedPostFormat ) }\n\t>\n\t\t{ suggestionText }\n\t</Button>\n);\n\nexport default function PostFormatPanel() {\n\tconst { currentPostFormat, suggestion } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, getSuggestedPostFormat } =\n\t\t\tselect( editorStore );\n\t\tconst supportedFormats =\n\t\t\tselect( coreStore ).getThemeSupports().formats ?? [];\n\t\treturn {\n\t\t\tcurrentPostFormat: getEditedPostAttribute( 'format' ),\n\t\t\tsuggestion: getSuggestion(\n\t\t\t\tsupportedFormats,\n\t\t\t\tgetSuggestedPostFormat()\n\t\t\t),\n\t\t};\n\t}, [] );\n\n\tconst { editPost } = useDispatch( editorStore );\n\n\tconst onUpdatePostFormat = ( format ) => editPost( { format } );\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'Use a post format' ) }\n\t\t</span>,\n\t];\n\n\tif ( ! suggestion || suggestion.id === currentPostFormat ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<PostFormatSuggestion\n\t\t\t\t\tonUpdatePostFormat={ onUpdatePostFormat }\n\t\t\t\t\tsuggestedPostFormat={ suggestion.id }\n\t\t\t\t\tsuggestionText={ sprintf(\n\t\t\t\t\t\t/* translators: %1s: post format */\n\t\t\t\t\t\t__( 'Apply the \"%1$s\" format.' ),\n\t\t\t\t\t\tsuggestion.caption\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</p>\n\t\t</PanelBody>\n\t);\n}\n"],
5
- "mappings": "AA0BC,cAwCC,YAxCD;AAvBD,SAAS,QAAQ,iBAAiB;AAClC,SAAS,aAAa,iBAAiB;AACvC,SAAS,IAAI,eAAe;AAC5B,SAAS,SAAS,iBAAiB;AAKnC,SAAS,oBAAoB;AAC7B,SAAS,SAAS,mBAAmB;AAErC,MAAM,gBAAgB,CAAE,kBAAkB,wBAAyB;AAClE,QAAM,UAAU,aAAa;AAAA,IAAQ,CAAE,WACtC,kBAAkB,SAAU,OAAO,EAAG;AAAA,EACvC;AACA,SAAO,QAAQ,KAAM,CAAE,WAAY,OAAO,OAAO,mBAAoB;AACtE;AAEA,MAAM,uBAAuB,CAAE;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AACD,MACC;AAAA,EAAC;AAAA;AAAA,IACA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UAC/B,WAAW;AAAA,QACZ;AAAA;AAAA,IACD,GACD;AAAA,KACD;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ // packages/editor/src/components/post-publish-panel/maybe-tags-panel.js
2
2
  import { __, sprintf } from "@wordpress/i18n";
3
3
  import { useState } from "@wordpress/element";
4
4
  import { useSelect } from "@wordpress/data";
@@ -6,7 +6,8 @@ import { PanelBody } from "@wordpress/components";
6
6
  import { store as coreStore } from "@wordpress/core-data";
7
7
  import FlatTermSelector from "../post-taxonomies/flat-term-selector";
8
8
  import { store as editorStore } from "../../store";
9
- const TagsPanel = () => {
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ var TagsPanel = () => {
10
11
  const tagLabels = useSelect((select) => {
11
12
  const taxonomy = select(coreStore).getTaxonomy("post_tag");
12
13
  return taxonomy?.labels;
@@ -28,7 +29,7 @@ const TagsPanel = () => {
28
29
  /* @__PURE__ */ jsx(FlatTermSelector, { slug: "post_tag", __nextHasNoMarginBottom: true })
29
30
  ] });
30
31
  };
31
- const MaybeTagsPanel = () => {
32
+ var MaybeTagsPanel = () => {
32
33
  const { postHasTags, siteHasTags, isPostTypeSupported } = useSelect(
33
34
  (select) => {
34
35
  const postType = select(editorStore).getCurrentPostType();
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-publish-panel/maybe-tags-panel.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport FlatTermSelector from '../post-taxonomies/flat-term-selector';\nimport { store as editorStore } from '../../store';\n\nconst TagsPanel = () => {\n\tconst tagLabels = useSelect( ( select ) => {\n\t\tconst taxonomy = select( coreStore ).getTaxonomy( 'post_tag' );\n\t\treturn taxonomy?.labels;\n\t}, [] );\n\n\tconst addNewItem = tagLabels?.add_new_item ?? __( 'Add tag' );\n\tconst tagLabel = tagLabels?.name ?? __( 'Tags' );\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ addNewItem }\n\t\t</span>,\n\t];\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ sprintf(\n\t\t\t\t\t// translators: %s is the taxonomy name (e.g., \"Tags\").\n\t\t\t\t\t__(\n\t\t\t\t\t\t'%s help users and search engines navigate your site and find your content. Add a few keywords to describe your post.'\n\t\t\t\t\t),\n\t\t\t\t\ttagLabel\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<FlatTermSelector slug=\"post_tag\" __nextHasNoMarginBottom />\n\t\t</PanelBody>\n\t);\n};\n\nconst MaybeTagsPanel = () => {\n\tconst { postHasTags, siteHasTags, isPostTypeSupported } = useSelect(\n\t\t( select ) => {\n\t\t\tconst postType = select( editorStore ).getCurrentPostType();\n\t\t\tconst tagsTaxonomy = select( coreStore ).getEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'taxonomy',\n\t\t\t\t'post_tag'\n\t\t\t);\n\t\t\tconst _isPostTypeSupported =\n\t\t\t\ttagsTaxonomy?.types?.includes( postType );\n\t\t\tconst areTagsFetched = tagsTaxonomy !== undefined;\n\t\t\tconst tags =\n\t\t\t\ttagsTaxonomy &&\n\t\t\t\tselect( editorStore ).getEditedPostAttribute(\n\t\t\t\t\ttagsTaxonomy.rest_base\n\t\t\t\t);\n\t\t\tconst siteTags = _isPostTypeSupported\n\t\t\t\t? !! select( coreStore ).getEntityRecords(\n\t\t\t\t\t\t'taxonomy',\n\t\t\t\t\t\t'post_tag',\n\t\t\t\t\t\t{ per_page: 1 }\n\t\t\t\t )?.length\n\t\t\t\t: false;\n\n\t\t\treturn {\n\t\t\t\tpostHasTags: !! tags?.length,\n\t\t\t\tsiteHasTags: siteTags,\n\t\t\t\tisPostTypeSupported: areTagsFetched && _isPostTypeSupported,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst [ hadTagsWhenOpeningThePanel ] = useState( postHasTags );\n\n\t/**\n\t * We only want to show the tag panel if the post type supports\n\t * tags and the site has tags.\n\t */\n\tif ( ! isPostTypeSupported || ! siteHasTags ) {\n\t\treturn null;\n\t}\n\n\t/*\n\t * We only want to show the tag panel if the post didn't have\n\t * any tags when the user hit the Publish button.\n\t *\n\t * We can't use the prop.postHasTags because it'll change to true\n\t * if the user adds a new tag within the pre-publish panel.\n\t * This would force a re-render and a new prop.postHasTags check,\n\t * hiding this panel and keeping the user from adding\n\t * more than one tag.\n\t */\n\tif ( ! hadTagsWhenOpeningThePanel ) {\n\t\treturn <TagsPanel />;\n\t}\n\n\treturn null;\n};\n\nexport default MaybeTagsPanel;\n"],
5
- "mappings": "AA0BE,cAMA,YANA;AAvBF,SAAS,IAAI,eAAe;AAC5B,SAAS,gBAAgB;AACzB,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAC1B,SAAS,SAAS,iBAAiB;AAKnC,OAAO,sBAAsB;AAC7B,SAAS,SAAS,mBAAmB;AAErC,MAAM,YAAY,MAAM;AACvB,QAAM,YAAY,UAAW,CAAE,WAAY;AAC1C,UAAM,WAAW,OAAQ,SAAU,EAAE,YAAa,UAAW;AAC7D,WAAO,UAAU;AAAA,EAClB,GAAG,CAAC,CAAE;AAEN,QAAM,aAAa,WAAW,gBAAgB,GAAI,SAAU;AAC5D,QAAM,WAAW,WAAW,QAAQ,GAAI,MAAO;AAE/C,QAAM,iBAAiB;AAAA,IACtB,GAAI,aAAc;AAAA,IAClB,oBAAC,UAAK,WAAU,mCACb,wBADmD,OAEtD;AAAA,EACD;AAEA,SACC,qBAAC,aAAU,aAAc,OAAQ,OAAQ,gBACxC;AAAA,wBAAC,OACE;AAAA;AAA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AAAA,EACR;AAYA,MAAK,CAAE,4BAA6B;AACnC,WAAO,oBAAC,aAAU;AAAA,EACnB;AAEA,SAAO;AACR;AAEA,IAAO,2BAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ // packages/editor/src/components/post-publish-panel/maybe-upload-media.js
2
2
  import {
3
3
  PanelBody,
4
4
  Button,
@@ -12,6 +12,7 @@ import { store as blockEditorStore } from "@wordpress/block-editor";
12
12
  import { useState } from "@wordpress/element";
13
13
  import { isBlobURL } from "@wordpress/blob";
14
14
  import { fetchMedia } from "./media-util";
15
+ import { jsx, jsxs } from "react/jsx-runtime";
15
16
  function flattenBlocks(blocks) {
16
17
  const result = [];
17
18
  blocks.forEach((block) => {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-publish-panel/maybe-upload-media.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tPanelBody,\n\tButton,\n\tSpinner,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useState } from '@wordpress/element';\nimport { isBlobURL } from '@wordpress/blob';\n\n/**\n * Internal dependencies\n */\nimport { fetchMedia } from './media-util';\n\nfunction flattenBlocks( blocks ) {\n\tconst result = [];\n\n\tblocks.forEach( ( block ) => {\n\t\tresult.push( block );\n\t\tresult.push( ...flattenBlocks( block.innerBlocks ) );\n\t} );\n\n\treturn result;\n}\n\n/**\n * Determine whether a block has external media.\n *\n * Different blocks use different attribute names (and potentially\n * different logic as well) in determining whether the media is\n * present, and whether it's external.\n *\n * @param {{name: string, attributes: Object}} block The block.\n * @return {boolean?} Whether the block has external media\n */\nfunction hasExternalMedia( block ) {\n\tif ( block.name === 'core/image' || block.name === 'core/cover' ) {\n\t\treturn block.attributes.url && ! block.attributes.id;\n\t}\n\n\tif ( block.name === 'core/media-text' ) {\n\t\treturn block.attributes.mediaUrl && ! block.attributes.mediaId;\n\t}\n\n\treturn undefined;\n}\n\n/**\n * Retrieve media info from a block.\n *\n * Different blocks use different attribute names, so we need this\n * function to normalize things into a consistent naming scheme.\n *\n * @param {{name: string, attributes: Object}} block The block.\n * @return {{url: ?string, alt: ?string, id: ?number}} The media info for the block.\n */\nfunction getMediaInfo( block ) {\n\tif ( block.name === 'core/image' || block.name === 'core/cover' ) {\n\t\tconst { url, alt, id } = block.attributes;\n\t\treturn { url, alt, id };\n\t}\n\n\tif ( block.name === 'core/media-text' ) {\n\t\tconst { mediaUrl: url, mediaAlt: alt, mediaId: id } = block.attributes;\n\t\treturn { url, alt, id };\n\t}\n\n\treturn {};\n}\n\n// Image component to represent a single image in the upload dialog.\nfunction Image( { clientId, alt, url } ) {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\treturn (\n\t\t<motion.img\n\t\t\ttabIndex={ 0 }\n\t\t\trole=\"button\"\n\t\t\taria-label={ __( 'Select image block.' ) }\n\t\t\tonClick={ () => {\n\t\t\t\tselectBlock( clientId );\n\t\t\t} }\n\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\tif ( event.key === 'Enter' || event.key === ' ' ) {\n\t\t\t\t\tselectBlock( clientId );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t} }\n\t\t\tkey={ clientId }\n\t\t\talt={ alt }\n\t\t\tsrc={ url }\n\t\t\tanimate={ { opacity: 1 } }\n\t\t\texit={ { opacity: 0, scale: 0 } }\n\t\t\tstyle={ {\n\t\t\t\twidth: '32px',\n\t\t\t\theight: '32px',\n\t\t\t\tobjectFit: 'cover',\n\t\t\t\tborderRadius: '2px',\n\t\t\t\tcursor: 'pointer',\n\t\t\t} }\n\t\t\twhileHover={ { scale: 1.08 } }\n\t\t/>\n\t);\n}\n\nexport default function MaybeUploadMediaPanel() {\n\tconst [ isUploading, setIsUploading ] = useState( false );\n\tconst [ isAnimating, setIsAnimating ] = useState( false );\n\tconst [ hadUploadError, setHadUploadError ] = useState( false );\n\tconst { editorBlocks, mediaUpload } = useSelect(\n\t\t( select ) => ( {\n\t\t\teditorBlocks: select( blockEditorStore ).getBlocks(),\n\t\t\tmediaUpload: select( blockEditorStore ).getSettings().mediaUpload,\n\t\t} ),\n\t\t[]\n\t);\n\n\t// Get a list of blocks with external media.\n\tconst blocksWithExternalMedia = flattenBlocks( editorBlocks ).filter(\n\t\t( block ) => hasExternalMedia( block )\n\t);\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\n\tif ( ! mediaUpload || ! blocksWithExternalMedia.length ) {\n\t\treturn null;\n\t}\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'External media' ) }\n\t\t</span>,\n\t];\n\n\t/**\n\t * Update an individual block to point to newly-added library media.\n\t *\n\t * Different blocks use different attribute names, so we need this\n\t * function to ensure we modify the correct attributes for each type.\n\t *\n\t * @param {{name: string, attributes: Object}} block The block.\n\t * @param {{id: number, url: string}} media Media library file info.\n\t */\n\tfunction updateBlockWithUploadedMedia( block, media ) {\n\t\tif ( block.name === 'core/image' || block.name === 'core/cover' ) {\n\t\t\tupdateBlockAttributes( block.clientId, {\n\t\t\t\tid: media.id,\n\t\t\t\turl: media.url,\n\t\t\t} );\n\t\t}\n\n\t\tif ( block.name === 'core/media-text' ) {\n\t\t\tupdateBlockAttributes( block.clientId, {\n\t\t\t\tmediaId: media.id,\n\t\t\t\tmediaUrl: media.url,\n\t\t\t} );\n\t\t}\n\t}\n\n\t// Handle fetching and uploading all external media in the post.\n\tfunction uploadImages() {\n\t\tsetIsUploading( true );\n\t\tsetHadUploadError( false );\n\n\t\t// Multiple blocks can be using the same URL, so we\n\t\t// should ensure we only fetch and upload each of them once.\n\t\tconst mediaUrls = new Set(\n\t\t\tblocksWithExternalMedia.map( ( block ) => {\n\t\t\t\tconst { url } = getMediaInfo( block );\n\t\t\t\treturn url;\n\t\t\t} )\n\t\t);\n\n\t\t// Create an upload promise for each URL, that we can wait for in all\n\t\t// blocks that make use of that media.\n\t\tconst uploadPromises = Object.fromEntries(\n\t\t\tObject.entries( fetchMedia( [ ...mediaUrls ] ) ).map(\n\t\t\t\t( [ url, filePromise ] ) => {\n\t\t\t\t\tconst uploadPromise = filePromise.then(\n\t\t\t\t\t\t( blob ) =>\n\t\t\t\t\t\t\tnew Promise( ( resolve, reject ) => {\n\t\t\t\t\t\t\t\tmediaUpload( {\n\t\t\t\t\t\t\t\t\tfilesList: [ blob ],\n\t\t\t\t\t\t\t\t\tonFileChange: ( [ media ] ) => {\n\t\t\t\t\t\t\t\t\t\tif ( isBlobURL( media.url ) ) {\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tresolve( media );\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tonError() {\n\t\t\t\t\t\t\t\t\t\treject();\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t);\n\n\t\t\t\t\treturn [ url, uploadPromise ];\n\t\t\t\t}\n\t\t\t)\n\t\t);\n\n\t\t// Wait for all blocks to be updated with library media.\n\t\tPromise.allSettled(\n\t\t\tblocksWithExternalMedia.map( ( block ) => {\n\t\t\t\tconst { url } = getMediaInfo( block );\n\n\t\t\t\treturn uploadPromises[ url ]\n\t\t\t\t\t.then( ( media ) =>\n\t\t\t\t\t\tupdateBlockWithUploadedMedia( block, media )\n\t\t\t\t\t)\n\t\t\t\t\t.then( () => setIsAnimating( true ) )\n\t\t\t\t\t.catch( () => setHadUploadError( true ) );\n\t\t\t} )\n\t\t).finally( () => {\n\t\t\tsetIsUploading( false );\n\t\t} );\n\t}\n\n\treturn (\n\t\t<PanelBody initialOpen title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<div\n\t\t\t\tstyle={ {\n\t\t\t\t\tdisplay: 'inline-flex',\n\t\t\t\t\tflexWrap: 'wrap',\n\t\t\t\t\tgap: '8px',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<AnimatePresence\n\t\t\t\t\tonExitComplete={ () => setIsAnimating( false ) }\n\t\t\t\t>\n\t\t\t\t\t{ blocksWithExternalMedia.map( ( block ) => {\n\t\t\t\t\t\tconst { url, alt } = getMediaInfo( block );\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Image\n\t\t\t\t\t\t\t\tkey={ block.clientId }\n\t\t\t\t\t\t\t\tclientId={ block.clientId }\n\t\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\t\talt={ alt }\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</AnimatePresence>\n\t\t\t\t{ isUploading || isAnimating ? (\n\t\t\t\t\t<Spinner />\n\t\t\t\t) : (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ uploadImages }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ _x( 'Upload', 'verb' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t\t{ hadUploadError && <p>{ __( 'Upload failed, try again.' ) }</p> }\n\t\t</PanelBody>\n\t);\n}\n"],
5
- "mappings": "AAiFE,cAuJC,YAvJD;AA9EF;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA,oBAAoB;AAAA,EACpB,6BAA6B;AAAA,OACvB;AACP,SAAS,WAAW,mBAAmB;AACvC,SAAS,IAAI,UAAU;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AM,eAAgB,KAAM;AAAA,cAE3C,kCAAwB,IAAK,CAAE,UAAW;AAC3C,sBAAM,EAAE,KAAK,IAAI,IAAI,aAAc,KAAM;AACzC,uBACC;AAAA,kBAAC;AAAA;AAAA,oBAEA,UAAW,MAAM;AAAA,oBACjB;AAAA,oBACA;AAAA;AAAA,kBAHM,MAAM;AAAA,gBAIb;AAAA,cAEF,CAAE;AAAA;AAAA,UACH;AAAA,UACE,eAAe,cAChB,oBAAC,WAAQ,IAET;AAAA,YAAC;AAAA;AAAA,cACA,MAAK;AAAA,cACL,SAAQ;AAAA,cACR,SAAU;AAAA,cAER,aAAI,UAAU,MAAO;AAAA;AAAA,UACxB;AAAA;AAAA;AAAA,IAEF;AAAA,IACE,kBAAkB,oBAAC,OAAI,aAAI,2BAA4B,GAAG;AAAA,KAC7D;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/editor/src/components/post-publish-panel/media-util.js
1
2
  import { v4 as uuid } from "uuid";
2
3
  import { getFilename } from "@wordpress/url";
3
4
  function generateUniqueBasenames(urls) {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-publish-panel/media-util.js"],
4
4
  "sourcesContent": ["/**\n * External dependencies\n */\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport { getFilename } from '@wordpress/url';\n\n/**\n * Generate a list of unique basenames given a list of URLs.\n *\n * We want all basenames to be unique, since sometimes the extension\n * doesn't reflect the mime type, and may end up getting changed by\n * the server, on upload.\n *\n * @param {string[]} urls The list of URLs\n * @return {Record< string, string >} A URL => basename record.\n */\nexport function generateUniqueBasenames( urls ) {\n\tconst basenames = new Set();\n\n\treturn Object.fromEntries(\n\t\turls.map( ( url ) => {\n\t\t\t// We prefer to match the remote filename, if possible.\n\t\t\tconst filename = getFilename( url );\n\t\t\tlet basename = '';\n\n\t\t\tif ( filename ) {\n\t\t\t\tconst parts = filename.split( '.' );\n\t\t\t\tif ( parts.length > 1 ) {\n\t\t\t\t\t// Assume the last part is the extension.\n\t\t\t\t\tparts.pop();\n\t\t\t\t}\n\t\t\t\tbasename = parts.join( '.' );\n\t\t\t}\n\n\t\t\tif ( ! basename ) {\n\t\t\t\t// It looks like we don't have a basename, so let's use a UUID.\n\t\t\t\tbasename = uuid();\n\t\t\t}\n\n\t\t\tif ( basenames.has( basename ) ) {\n\t\t\t\t// Append a UUID to deduplicate the basename.\n\t\t\t\t// The server will try to deduplicate on its own if we don't do this,\n\t\t\t\t// but it may run into a race condition\n\t\t\t\t// (see https://github.com/WordPress/gutenberg/issues/64899).\n\t\t\t\t// Deduplicating the filenames before uploading is safer.\n\t\t\t\tbasename = `${ basename }-${ uuid() }`;\n\t\t\t}\n\n\t\t\tbasenames.add( basename );\n\n\t\t\treturn [ url, basename ];\n\t\t} )\n\t);\n}\n\n/**\n * Fetch a list of URLs, turning those into promises for files with\n * unique filenames.\n *\n * @param {string[]} urls The list of URLs\n * @return {Record< string, Promise< File > >} A URL => File promise record.\n */\nexport function fetchMedia( urls ) {\n\treturn Object.fromEntries(\n\t\tObject.entries( generateUniqueBasenames( urls ) ).map(\n\t\t\t( [ url, basename ] ) => {\n\t\t\t\tconst filePromise = window\n\t\t\t\t\t.fetch( url.includes( '?' ) ? url : url + '?' )\n\t\t\t\t\t.then( ( response ) => response.blob() )\n\t\t\t\t\t.then( ( blob ) => {\n\t\t\t\t\t\t// The server will reject the upload if it doesn't have an extension,\n\t\t\t\t\t\t// even though it'll rewrite the file name to match the mime type.\n\t\t\t\t\t\t// Here we provide it with a safe extension to get it past that check.\n\t\t\t\t\t\treturn new File( [ blob ], `${ basename }.png`, {\n\t\t\t\t\t\t\ttype: blob.type,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} );\n\n\t\t\t\treturn [ url, filePromise ];\n\t\t\t}\n\t\t)\n\t);\n}\n"],
5
- "mappings": "AAGA,SAAS,MAAM,YAAY;AAK3B,SAAS,mBAAmB;AAYrB,SAAS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,WAAW;AAEf,UAAK,UAAW;AACf,cAAM,QAAQ,SAAS,MAAO,GAAI;AAClC,YAAK,MAAM,SAAS,GAAI;AAEvB,gBAAM,IAAI;AAAA,QACX;AACA,mBAAW,MAAM,KAAM,GAAI;AAAA,MAC5B;AAEA,UAAK,CAAE,UAAW;AAEjB,mBAAW,KAAK;AAAA,MACjB;AAEA,UAAK,UAAU,IAAK,QAAS,GAAI;AAMhC,mBAAW,GAAI,QAAS,IAAK,KAAK,CAAE;AAAA,MACrC;AAEA,gBAAU,IAAK,QAAS;AAExB,aAAO,CAAE,KAAK,QAAS;AAAA,IACxB,CAAE;AAAA,EACH;AACD;AASO,SAAS,WAAY,MAAO;AAClC,SAAO,OAAO;AAAA,IACb,OAAO,QAAS,wBAAyB,IAAK,CAAE,EAAE;AAAA,MACjD,CAAE,CAAE,KAAK,QAAS,MAAO;AACxB,cAAM,cAAc,OAClB,MAAO,IAAI,SAAU,GAAI,IAAI,MAAM,MAAM,GAAI,EAC7C,KAAM,CAAE,aAAc,SAAS,KAAK,CAAE,EACtC,KAAM,CAAE,SAAU;AAIlB,iBAAO,IAAI,KAAM,CAAE,IAAK,GAAG,GAAI,QAAS,QAAQ;AAAA,YAC/C,MAAM,KAAK;AAAA,UACZ,CAAE;AAAA,QACH,CAAE;AAEH,eAAO,CAAE,KAAK,WAAY;AAAA,MAC3B;AAAA,IACD;AAAA,EACD;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
1
+ // packages/editor/src/components/post-publish-panel/postpublish.js
2
2
  import {
3
3
  PanelBody,
4
4
  Button,
@@ -16,9 +16,10 @@ import { store as coreStore } from "@wordpress/core-data";
16
16
  import { external } from "@wordpress/icons";
17
17
  import PostScheduleLabel from "../post-schedule/label";
18
18
  import { store as editorStore } from "../../store";
19
- const POSTNAME = "%postname%";
20
- const PAGENAME = "%pagename%";
21
- const getFuturePostUrl = (post) => {
19
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
20
+ var POSTNAME = "%postname%";
21
+ var PAGENAME = "%pagename%";
22
+ var getFuturePostUrl = (post) => {
22
23
  const { slug } = post;
23
24
  if (post.permalink_template.includes(POSTNAME)) {
24
25
  return post.permalink_template.replace(POSTNAME, slug);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-publish-panel/postpublish.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tPanelBody,\n\tButton,\n\tTextControl,\n\tExternalLink,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useEffect, useState, useRef } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { addQueryArgs, safeDecodeURIComponent } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { external } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport PostScheduleLabel from '../post-schedule/label';\nimport { store as editorStore } from '../../store';\n\nconst POSTNAME = '%postname%';\nconst PAGENAME = '%pagename%';\n\n/**\n * Returns URL for a future post.\n *\n * @param {Object} post Post object.\n *\n * @return {string} PostPublish URL.\n */\n\nconst getFuturePostUrl = ( post ) => {\n\tconst { slug } = post;\n\n\tif ( post.permalink_template.includes( POSTNAME ) ) {\n\t\treturn post.permalink_template.replace( POSTNAME, slug );\n\t}\n\n\tif ( post.permalink_template.includes( PAGENAME ) ) {\n\t\treturn post.permalink_template.replace( PAGENAME, slug );\n\t}\n\n\treturn post.permalink_template;\n};\n\nfunction CopyButton( { text } ) {\n\tconst [ showCopyConfirmation, setShowCopyConfirmation ] = useState( false );\n\tconst timeoutIdRef = useRef();\n\tconst ref = useCopyToClipboard( text, () => {\n\t\tsetShowCopyConfirmation( true );\n\t\tif ( timeoutIdRef.current ) {\n\t\t\tclearTimeout( timeoutIdRef.current );\n\t\t}\n\t\ttimeoutIdRef.current = setTimeout( () => {\n\t\t\tsetShowCopyConfirmation( false );\n\t\t}, 4000 );\n\t} );\n\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tif ( timeoutIdRef.current ) {\n\t\t\t\tclearTimeout( timeoutIdRef.current );\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Button __next40pxDefaultSize variant=\"secondary\" ref={ ref }>\n\t\t\t{ showCopyConfirmation ? __( 'Copied!' ) : __( 'Copy' ) }\n\t\t</Button>\n\t);\n}\n\nexport default function PostPublishPanelPostpublish( {\n\tfocusOnMount,\n\tchildren,\n} ) {\n\tconst { post, postType, isScheduled } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEditedPostAttribute,\n\t\t\tgetCurrentPost,\n\t\t\tisCurrentPostScheduled,\n\t\t} = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\n\t\treturn {\n\t\t\tpost: getCurrentPost(),\n\t\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t};\n\t}, [] );\n\n\tconst postLabel = postType?.labels?.singular_name;\n\tconst viewPostLabel = postType?.labels?.view_item;\n\tconst addNewPostLabel = postType?.labels?.add_new_item;\n\tconst link =\n\t\tpost.status === 'future' ? getFuturePostUrl( post ) : post.link;\n\tconst addLink = addQueryArgs( 'post-new.php', {\n\t\tpost_type: post.type,\n\t} );\n\n\tconst postLinkRef = useCallback(\n\t\t( node ) => {\n\t\t\tif ( focusOnMount && node ) {\n\t\t\t\tnode.focus();\n\t\t\t}\n\t\t},\n\t\t[ focusOnMount ]\n\t);\n\n\tconst postPublishNonLinkHeader = isScheduled ? (\n\t\t<>\n\t\t\t{ __( 'is now scheduled. It will go live on' ) }{ ' ' }\n\t\t\t<PostScheduleLabel />.\n\t\t</>\n\t) : (\n\t\t__( 'is now live.' )\n\t);\n\n\treturn (\n\t\t<div className=\"post-publish-panel__postpublish\">\n\t\t\t<PanelBody className=\"post-publish-panel__postpublish-header\">\n\t\t\t\t<ExternalLink ref={ postLinkRef } href={ link }>\n\t\t\t\t\t{ decodeEntities( post.title ) || __( '(no title)' ) }\n\t\t\t\t</ExternalLink>{ ' ' }\n\t\t\t\t{ postPublishNonLinkHeader }\n\t\t\t</PanelBody>\n\t\t\t<PanelBody>\n\t\t\t\t<p className=\"post-publish-panel__postpublish-subheader\">\n\t\t\t\t\t<strong>{ __( 'What\u2019s next?' ) }</strong>\n\t\t\t\t</p>\n\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address-container\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tclassName=\"post-publish-panel__postpublish-post-address\"\n\t\t\t\t\t\treadOnly\n\t\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t\t/* translators: %s: post type singular name */\n\t\t\t\t\t\t\t__( '%s address' ),\n\t\t\t\t\t\t\tpostLabel\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tvalue={ safeDecodeURIComponent( link ) }\n\t\t\t\t\t\tonFocus={ ( event ) => event.target.select() }\n\t\t\t\t\t/>\n\n\t\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address__copy-button-wrap\">\n\t\t\t\t\t\t<CopyButton text={ link } />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"post-publish-panel__postpublish-buttons\">\n\t\t\t\t\t{ ! isScheduled && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\thref={ link }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\ticonPosition=\"right\"\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ viewPostLabel }\n\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant={ isScheduled ? 'primary' : 'secondary' }\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\thref={ addLink }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ addNewPostLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</PanelBody>\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n"],
5
- "mappings": "AAwEE,SA4CA,UA5CA,KA4CA,YA5CA;AArEF;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,IAAI,eAAe;AAC5B,SAAS,aAAa,WAAW,UAAU,cAAc;AACzD,SAAS,iBAAiB;AAC1B,SAAS,cAAc,8BAA8B;AACrD,SAAS,sBAAsB;AAC/B,SAAS,0BAA0B;AACnC,SAAS,SAAS,iBAAiB;AACnC,SAAS,gBAAgB;AAKzB,OAAO,uBAAuB;AAC9B,SAAS,SAAS,mBAAmB;AAErC,MAAM,WAAW;AACjB,MAAM,WAAW;AAUjB,MAAM,mBAAmB,CAAE,SAAU;AACpC,QAAM,EAAE,KAAK,IAAI;AAEjB,MAAK,KAAK,mBAAmB,SAAU,QAAS,GAAI;AACnD,WAAO,KAAK,mBAAmB,QAAS,UAAU,IAAK;AAAA,EACxD;AAEA,MAAK,KAAK,mBAAmB,SAAU,QAAS,GAAI;AACnD,WAAO,KAAK,mBAAmB,QAAS,UAAU,IAAK;AAAA,EACxD;AAEA,SAAO,KAAK;AACb;AAEA,SAAS,WAAY,EAAE,KAAK,GAAI;AAC/B,QAAM,CAAE,sBAAsB,uBAAwB,IAAI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AAA,IACA,qBAAC,aACA;AAAA,0BAAC,OAAE,WAAU,6CACZ,8BAAC,YAAS,aAAI,mBAAe,GAAG,GACjC;AAAA,MACA,qBAAC,SAAI,WAAU,0DACd;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,uBAAqB;AAAA,YACrB,yBAAuB;AAAA,YACvB,WAAU;AAAA,YACV,UAAQ;AAAA,YACR,OAAQ;AAAA;AAAA,cAEP,GAAI,YAAa;AAAA,cACjB;AAAA,YACD;AAAA,YACA,OAAQ,uBAAwB,IAAK;AAAA,YACrC,SAAU,CAAE,UAAW,MAAM,OAAO,OAAO;AAAA;AAAA,QAC5C;AAAA,QAEA,oBAAC,SAAI,WAAU,kEACd,8BAAC,cAAW,MAAO,MAAO,GAC3B;AAAA,SACD;AAAA,MAEA,qBAAC,SAAI,WAAU,2CACZ;AAAA,SAAE,eACH;AAAA,UAAC;AAAA;AAAA,YACA,SAAQ;AAAA,YACR,MAAO;AAAA,YACP,uBAAqB;AAAA,YACrB,MAAO;AAAA,YACP,cAAa;AAAA,YACb,QAAO;AAAA,YAEL;AAAA;AAAA,cACF,oBAAC;AAAA,gBAAe,IAAG;AAAA;AAAA,gBAGjB,aAAI,sBAAuB;AAAA,eAE7B;AAAA;AAAA;AAAA,QACD;AAAA,QAED;AAAA,UAAC;AAAA;AAAA,YACA,SAAU,cAAc,YAAY;AAAA,YACpC,uBAAqB;AAAA,YACrB,MAAO;AAAA,YAEL;AAAA;AAAA,QACH;AAAA,SACD;AAAA,OACD;AAAA,IACE;AAAA,KACH;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
1
+ // packages/editor/src/components/post-publish-panel/prepublish.js
2
2
  import { __ } from "@wordpress/i18n";
3
3
  import { Icon, PanelBody } from "@wordpress/components";
4
4
  import { useSelect } from "@wordpress/data";
@@ -15,6 +15,7 @@ import MaybePostFormatPanel from "./maybe-post-format-panel";
15
15
  import { store as editorStore } from "../../store";
16
16
  import MaybeCategoryPanel from "./maybe-category-panel";
17
17
  import MaybeUploadMedia from "./maybe-upload-media";
18
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
18
19
  function PostPublishPanelPrepublish({ children }) {
19
20
  const {
20
21
  isBeingScheduled,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-publish-panel/prepublish.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Icon, PanelBody } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { wordpress } from '@wordpress/icons';\nimport { filterURLForDisplay } from '@wordpress/url';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport PostVisibility from '../post-visibility';\nimport PostVisibilityLabel from '../post-visibility/label';\nimport PostSchedule from '../post-schedule';\nimport PostScheduleLabel from '../post-schedule/label';\nimport MaybeTagsPanel from './maybe-tags-panel';\nimport MaybePostFormatPanel from './maybe-post-format-panel';\nimport { store as editorStore } from '../../store';\nimport MaybeCategoryPanel from './maybe-category-panel';\nimport MaybeUploadMedia from './maybe-upload-media';\n\nfunction PostPublishPanelPrepublish( { children } ) {\n\tconst {\n\t\tisBeingScheduled,\n\t\tisRequestingSiteIcon,\n\t\thasPublishAction,\n\t\tsiteIconUrl,\n\t\tsiteTitle,\n\t\tsiteHome,\n\t} = useSelect( ( select ) => {\n\t\tconst { getCurrentPost, isEditedPostBeingScheduled } =\n\t\t\tselect( editorStore );\n\t\tconst { getEntityRecord, isResolving } = select( coreStore );\n\t\tconst siteData =\n\t\t\tgetEntityRecord( 'root', '__unstableBase', undefined ) || {};\n\n\t\treturn {\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tisBeingScheduled: isEditedPostBeingScheduled(),\n\t\t\tisRequestingSiteIcon: isResolving( 'getEntityRecord', [\n\t\t\t\t'root',\n\t\t\t\t'__unstableBase',\n\t\t\t\tundefined,\n\t\t\t] ),\n\t\t\tsiteIconUrl: siteData.site_icon_url,\n\t\t\tsiteTitle: siteData.name,\n\t\t\tsiteHome: siteData.home && filterURLForDisplay( siteData.home ),\n\t\t};\n\t}, [] );\n\n\tlet siteIcon = (\n\t\t<Icon className=\"components-site-icon\" size=\"36px\" icon={ wordpress } />\n\t);\n\n\tif ( siteIconUrl ) {\n\t\tsiteIcon = (\n\t\t\t<img\n\t\t\t\talt={ __( 'Site Icon' ) }\n\t\t\t\tclassName=\"components-site-icon\"\n\t\t\t\tsrc={ siteIconUrl }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isRequestingSiteIcon ) {\n\t\tsiteIcon = null;\n\t}\n\n\tlet prePublishTitle, prePublishBodyText;\n\n\tif ( ! hasPublishAction ) {\n\t\tprePublishTitle = __( 'Are you ready to submit for review?' );\n\t\tprePublishBodyText = __(\n\t\t\t'Your work will be reviewed and then approved.'\n\t\t);\n\t} else if ( isBeingScheduled ) {\n\t\tprePublishTitle = __( 'Are you ready to schedule?' );\n\t\tprePublishBodyText = __(\n\t\t\t'Your work will be published at the specified date and time.'\n\t\t);\n\t} else {\n\t\tprePublishTitle = __( 'Are you ready to publish?' );\n\t\tprePublishBodyText = __(\n\t\t\t'Double-check your settings before publishing.'\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"editor-post-publish-panel__prepublish\">\n\t\t\t<div>\n\t\t\t\t<strong>{ prePublishTitle }</strong>\n\t\t\t</div>\n\t\t\t<p>{ prePublishBodyText }</p>\n\t\t\t<div className=\"components-site-card\">\n\t\t\t\t{ siteIcon }\n\t\t\t\t<div className=\"components-site-info\">\n\t\t\t\t\t<span className=\"components-site-name\">\n\t\t\t\t\t\t{ decodeEntities( siteTitle ) || __( '(Untitled)' ) }\n\t\t\t\t\t</span>\n\t\t\t\t\t<span className=\"components-site-home\">{ siteHome }</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<MaybeUploadMedia />\n\t\t\t{ hasPublishAction && (\n\t\t\t\t<>\n\t\t\t\t\t<PanelBody\n\t\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t\t\ttitle={ [\n\t\t\t\t\t\t\t__( 'Visibility:' ),\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName=\"editor-post-publish-panel__link\"\n\t\t\t\t\t\t\t\tkey=\"label\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PostVisibilityLabel />\n\t\t\t\t\t\t\t</span>,\n\t\t\t\t\t\t] }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PostVisibility />\n\t\t\t\t\t</PanelBody>\n\t\t\t\t\t<PanelBody\n\t\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t\t\ttitle={ [\n\t\t\t\t\t\t\t__( 'Publish:' ),\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName=\"editor-post-publish-panel__link\"\n\t\t\t\t\t\t\t\tkey=\"label\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PostScheduleLabel />\n\t\t\t\t\t\t\t</span>,\n\t\t\t\t\t\t] }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PostSchedule />\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t<MaybePostFormatPanel />\n\t\t\t<MaybeTagsPanel />\n\t\t\t<MaybeCategoryPanel />\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default PostPublishPanelPrepublish;\n"],
5
- "mappings": "AAuDE,SAqDE,UArDF,KA4CE,YA5CF;AApDF,SAAS,UAAU;AACnB,SAAS,MAAM,iBAAiB;AAChC,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAC1B,SAAS,2BAA2B;AACpC,SAAS,SAAS,iBAAiB;AACnC,SAAS,sBAAsB;AAK/B,OAAO,oBAAoB;AAC3B,OAAO,yBAAyB;AA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A,IAClB;AAAA,KACH;AAEF;AAEA,IAAO,qBAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ // packages/editor/src/components/post-saved-state/index.js
2
2
  import clsx from "clsx";
3
3
  import {
4
4
  __unstableGetAnimateClassName as getAnimateClassName,
@@ -13,6 +13,7 @@ import { displayShortcut } from "@wordpress/keycodes";
13
13
  import { store as preferencesStore } from "@wordpress/preferences";
14
14
  import { STATUS_OPTIONS } from "../../components/post-status";
15
15
  import { store as editorStore } from "../../store";
16
+ import { jsx, jsxs } from "react/jsx-runtime";
16
17
  function PostSavedState({ forceIsDirty }) {
17
18
  const [forceSavedMessage, setForceSavedMessage] = useState(false);
18
19
  const isLargeViewport = useViewportMatch("small");
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-saved-state/index.js"],
4
4
  "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__unstableGetAnimateClassName as getAnimateClassName,\n\tButton,\n} from '@wordpress/components';\nimport { usePrevious, useViewportMatch } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEffect, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Icon, check, cloud, cloudUpload } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { STATUS_OPTIONS } from '../../components/post-status';\nimport { store as editorStore } from '../../store';\n\n/**\n * Component showing whether the post is saved or not and providing save\n * buttons.\n *\n * @param {Object} props Component props.\n * @param {?boolean} props.forceIsDirty Whether to force the post to be marked\n * as dirty.\n * @return {import('react').ComponentType} The component.\n */\nexport default function PostSavedState( { forceIsDirty } ) {\n\tconst [ forceSavedMessage, setForceSavedMessage ] = useState( false );\n\tconst isLargeViewport = useViewportMatch( 'small' );\n\n\tconst {\n\t\tisAutosaving,\n\t\tisDirty,\n\t\tisNew,\n\t\tisPublished,\n\t\tisSaveable,\n\t\tisSaving,\n\t\tisScheduled,\n\t\thasPublishAction,\n\t\tshowIconLabels,\n\t\tpostStatus,\n\t\tpostStatusHasChanged,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tisEditedPostNew,\n\t\t\t\tisCurrentPostPublished,\n\t\t\t\tisCurrentPostScheduled,\n\t\t\t\tisEditedPostDirty,\n\t\t\t\tisSavingPost,\n\t\t\t\tisEditedPostSaveable,\n\t\t\t\tgetCurrentPost,\n\t\t\t\tisAutosavingPost,\n\t\t\t\tgetEditedPostAttribute,\n\t\t\t\tgetPostEdits,\n\t\t\t} = select( editorStore );\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\treturn {\n\t\t\t\tisAutosaving: isAutosavingPost(),\n\t\t\t\tisDirty: forceIsDirty || isEditedPostDirty(),\n\t\t\t\tisNew: isEditedPostNew(),\n\t\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\t\tisSaving: isSavingPost(),\n\t\t\t\tisSaveable: isEditedPostSaveable(),\n\t\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t\t\thasPublishAction:\n\t\t\t\t\tgetCurrentPost()?._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\t\tpostStatus: getEditedPostAttribute( 'status' ),\n\t\t\t\tpostStatusHasChanged: !! getPostEdits()?.status,\n\t\t\t};\n\t\t},\n\t\t[ forceIsDirty ]\n\t);\n\tconst isPending = postStatus === 'pending';\n\tconst { savePost } = useDispatch( editorStore );\n\n\tconst wasSaving = usePrevious( isSaving );\n\n\tuseEffect( () => {\n\t\tlet timeoutId;\n\n\t\tif ( wasSaving && ! isSaving ) {\n\t\t\tsetForceSavedMessage( true );\n\t\t\ttimeoutId = setTimeout( () => {\n\t\t\t\tsetForceSavedMessage( false );\n\t\t\t}, 1000 );\n\t\t}\n\n\t\treturn () => clearTimeout( timeoutId );\n\t}, [ isSaving ] );\n\n\t// Once the post has been submitted for review this button\n\t// is not needed for the contributor role.\n\tif ( ! hasPublishAction && isPending ) {\n\t\treturn null;\n\t}\n\n\t// We shouldn't render the button if the post has not one of the following statuses: pending, draft, auto-draft.\n\t// The reason for this is that this button handles the `save as pending` and `save draft` actions.\n\t// An exception for this is when the post has a custom status and there should be a way to save changes without\n\t// having to publish. This should be handled better in the future when custom statuses have better support.\n\t// @see https://github.com/WordPress/gutenberg/issues/3144.\n\tconst isIneligibleStatus =\n\t\t! [ 'pending', 'draft', 'auto-draft' ].includes( postStatus ) &&\n\t\tSTATUS_OPTIONS.map( ( { value } ) => value ).includes( postStatus );\n\n\tif (\n\t\tisPublished ||\n\t\tisScheduled ||\n\t\tisIneligibleStatus ||\n\t\t( postStatusHasChanged &&\n\t\t\t[ 'pending', 'draft' ].includes( postStatus ) )\n\t) {\n\t\treturn null;\n\t}\n\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tconst label = isPending ? __( 'Save as pending' ) : __( 'Save draft' );\n\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tconst shortLabel = __( 'Save' );\n\n\tconst isSaved = forceSavedMessage || ( ! isNew && ! isDirty );\n\tconst isSavedState = isSaving || isSaved;\n\tconst isDisabled = isSaving || isSaved || ! isSaveable;\n\tlet text;\n\n\tif ( isSaving ) {\n\t\ttext = isAutosaving ? __( 'Autosaving' ) : __( 'Saving' );\n\t} else if ( isSaved ) {\n\t\ttext = __( 'Saved' );\n\t} else if ( isLargeViewport ) {\n\t\ttext = label;\n\t} else if ( showIconLabels ) {\n\t\ttext = shortLabel;\n\t}\n\n\t// Use common Button instance for all saved states so that focus is not\n\t// lost.\n\treturn (\n\t\t<Button\n\t\t\tclassName={\n\t\t\t\tisSaveable || isSaving\n\t\t\t\t\t? clsx( {\n\t\t\t\t\t\t\t'editor-post-save-draft': ! isSavedState,\n\t\t\t\t\t\t\t'editor-post-saved-state': isSavedState,\n\t\t\t\t\t\t\t'is-saving': isSaving,\n\t\t\t\t\t\t\t'is-autosaving': isAutosaving,\n\t\t\t\t\t\t\t'is-saved': isSaved,\n\t\t\t\t\t\t\t[ getAnimateClassName( {\n\t\t\t\t\t\t\t\ttype: 'loading',\n\t\t\t\t\t\t\t} ) ]: isSaving,\n\t\t\t\t\t } )\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\tonClick={ isDisabled ? undefined : () => savePost() }\n\t\t\t/*\n\t\t\t * We want the tooltip to show the keyboard shortcut only when the\n\t\t\t * button does something, i.e. when it's not disabled.\n\t\t\t */\n\t\t\tshortcut={ isDisabled ? undefined : displayShortcut.primary( 's' ) }\n\t\t\tvariant=\"tertiary\"\n\t\t\tsize=\"compact\"\n\t\t\ticon={ isLargeViewport ? undefined : cloudUpload }\n\t\t\tlabel={ text || label }\n\t\t\taria-disabled={ isDisabled }\n\t\t>\n\t\t\t{ isSavedState && <Icon icon={ isSaved ? check : cloud } /> }\n\t\t\t{ text }\n\t\t</Button>\n\t);\n}\n"],
5
- "mappings": "AAsJE,SA2BmB,KA3BnB;AAnJF,OAAO,UAAU;AAKjB;AAAA,EACC,iCAAiC;AAAA,EACjC;AAAA,OACM;AACP,SAAS,aAAa,wBAAwB;AAC9C,SAAS,aAAa,iBAAiB;AACvC,SAAS,WAAW,gBAAgB;AACpC,SAAS,UAAU;AACnB,SAAS,MAAM,OAAO,OAAO,mBAAmB;AAChD,SAAS,uBAAuB;AAChC,SAAS,SAAS,wBAAwB;AAK1C,SAAS,sBAAsB;AAC/B,SAAS,SAAS,mBAAmB;AAWtB,SAAR,eAAiC,EAAE,aAAa,GAAI;AAC1D,QAAM,CAAE,mBAAmB,oBAAqB,IAAI,SAAU,KAAM;AACpE,QAAM,kBAAkB,iBAAkB,OAAQ;AAElD,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;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D,UAAW,aAAa,SAAY,gBAAgB,QAAS,GAAI;AAAA,MACjE,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,MAAO,kBAAkB,SAAY;AAAA,MACrC,OAAQ,QAAQ;AAAA,MAChB,iBAAgB;AAAA,MAEd;AAAA,wBAAgB,oBAAC,QAAK,MAAO,UAAU,QAAQ,OAAQ;AAAA,QACvD;AAAA;AAAA;AAAA,EACH;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/editor/src/components/post-schedule/check.js
1
2
  import { useSelect } from "@wordpress/data";
2
3
  import { store as editorStore } from "../../store";
3
4
  function PostScheduleCheck({ children }) {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-schedule/check.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Wrapper component that renders its children only if post has a publish action.\n *\n * @param {Object} props Props.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @return {React.ReactNode} - The component to be rendered or null if there is no publish action.\n */\nexport default function PostScheduleCheck( { children } ) {\n\tconst hasPublishAction = useSelect( ( select ) => {\n\t\treturn (\n\t\t\tselect( editorStore ).getCurrentPost()._links?.[\n\t\t\t\t'wp:action-publish'\n\t\t\t] ?? false\n\t\t);\n\t}, [] );\n\n\tif ( ! hasPublishAction ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n"],
5
- "mappings": "AAGA,SAAS,iBAAiB;AAK1B,SAAS,SAAS,mBAAmB;AAUtB,SAAR,kBAAoC,EAAE,SAAS,GAAI;AACzD,QAAM,mBAAmB,UAAW,CAAE,WAAY;AACjD,WACC,OAAQ,WAAY,EAAE,eAAe,EAAE,SACtC,mBACD,KAAK;AAAA,EAEP,GAAG,CAAC,CAAE;AAEN,MAAK,CAAE,kBAAmB;AACzB,WAAO;AAAA,EACR;AAEA,SAAO;AACR;",
5
+ "mappings": ";AAGA,SAAS,iBAAiB;AAK1B,SAAS,SAAS,mBAAmB;AAUtB,SAAR,kBAAoC,EAAE,SAAS,GAAI;AACzD,QAAM,mBAAmB,UAAW,CAAE,WAAY;AACjD,WACC,OAAQ,WAAY,EAAE,eAAe,EAAE,SACtC,mBACD,KAAK;AAAA,EAEP,GAAG,CAAC,CAAE;AAEN,MAAK,CAAE,kBAAmB;AACzB,WAAO;AAAA,EACR;AAEA,SAAO;AACR;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ // packages/editor/src/components/post-schedule/index.js
2
2
  import { parseISO, endOfMonth, startOfMonth } from "date-fns";
3
3
  import { getSettings } from "@wordpress/date";
4
4
  import { _x } from "@wordpress/i18n";
@@ -8,7 +8,8 @@ import { useState, useMemo } from "@wordpress/element";
8
8
  import { store as coreStore } from "@wordpress/core-data";
9
9
  import { store as editorStore } from "../../store";
10
10
  import { unlock } from "../../lock-unlock";
11
- const { PrivatePublishDateTimePicker } = unlock(blockEditorPrivateApis);
11
+ import { jsx } from "react/jsx-runtime";
12
+ var { PrivatePublishDateTimePicker } = unlock(blockEditorPrivateApis);
12
13
  function PostSchedule(props) {
13
14
  return /* @__PURE__ */ jsx(
14
15
  PrivatePostSchedule,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-schedule/index.js"],
4
4
  "sourcesContent": ["/**\n * External dependencies\n */\nimport { parseISO, endOfMonth, startOfMonth } from 'date-fns';\n\n/**\n * WordPress dependencies\n */\nimport { getSettings } from '@wordpress/date';\nimport { _x } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useState, useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { PrivatePublishDateTimePicker } = unlock( blockEditorPrivateApis );\n\n/**\n * Renders the PostSchedule component. It allows the user to schedule a post.\n *\n * @param {Object} props Props.\n * @param {Function} props.onClose Function to close the component.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostSchedule( props ) {\n\treturn (\n\t\t<PrivatePostSchedule\n\t\t\t{ ...props }\n\t\t\tshowPopoverHeaderActions\n\t\t\tisCompact={ false }\n\t\t/>\n\t);\n}\n\nexport function PrivatePostSchedule( {\n\tonClose,\n\tshowPopoverHeaderActions,\n\tisCompact,\n} ) {\n\tconst { postDate, postType } = useSelect(\n\t\t( select ) => ( {\n\t\t\tpostDate: select( editorStore ).getEditedPostAttribute( 'date' ),\n\t\t\tpostType: select( editorStore ).getCurrentPostType(),\n\t\t} ),\n\t\t[]\n\t);\n\n\tconst { editPost } = useDispatch( editorStore );\n\tconst onUpdateDate = ( date ) => editPost( { date } );\n\n\tconst [ previewedMonth, setPreviewedMonth ] = useState(\n\t\tstartOfMonth( new Date( postDate ) )\n\t);\n\n\t// Pick up published and scheduled site posts.\n\tconst eventsByPostType = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecords( 'postType', postType, {\n\t\t\t\tstatus: 'publish,future',\n\t\t\t\tafter: startOfMonth( previewedMonth ).toISOString(),\n\t\t\t\tbefore: endOfMonth( previewedMonth ).toISOString(),\n\t\t\t\texclude: [ select( editorStore ).getCurrentPostId() ],\n\t\t\t\tper_page: 100,\n\t\t\t\t_fields: 'id,date',\n\t\t\t} ),\n\t\t[ previewedMonth, postType ]\n\t);\n\n\tconst events = useMemo(\n\t\t() =>\n\t\t\t( eventsByPostType || [] ).map( ( { date: eventDate } ) => ( {\n\t\t\t\tdate: new Date( eventDate ),\n\t\t\t} ) ),\n\t\t[ eventsByPostType ]\n\t);\n\n\tconst settings = getSettings();\n\n\t// To know if the current timezone is a 12 hour time with look for \"a\" in the time format\n\t// We also make sure this a is not escaped by a \"/\"\n\tconst is12HourTime = /a(?!\\\\)/i.test(\n\t\tsettings.formats.time\n\t\t\t.toLowerCase() // Test only the lower case a.\n\t\t\t.replace( /\\\\\\\\/g, '' ) // Replace \"//\" with empty strings.\n\t\t\t.split( '' )\n\t\t\t.reverse()\n\t\t\t.join( '' ) // Reverse the string and test for \"a\" not followed by a slash.\n\t);\n\n\treturn (\n\t\t<PrivatePublishDateTimePicker\n\t\t\tcurrentDate={ postDate }\n\t\t\tonChange={ onUpdateDate }\n\t\t\tis12Hour={ is12HourTime }\n\t\t\tdateOrder={\n\t\t\t\t/* translators: Order of day, month, and year. Available formats are 'dmy', 'mdy', and 'ymd'. */\n\t\t\t\t_x( 'dmy', 'date order' )\n\t\t\t}\n\t\t\tevents={ events }\n\t\t\tonMonthPreviewed={ ( date ) =>\n\t\t\t\tsetPreviewedMonth( parseISO( date ) )\n\t\t\t}\n\t\t\tonClose={ onClose }\n\t\t\tisCompact={ isCompact }\n\t\t\tshowPopoverHeaderActions={ showPopoverHeaderActions }\n\t\t/>\n\t);\n}\n"],
5
- "mappings": "AAiCE;AA9BF,SAAS,UAAU,YAAY,oBAAoB;AAKnD,SAAS,mBAAmB;AAC5B,SAAS,UAAU;AACnB,SAAS,aAAa,iBAAiB;AACvC,SAAS,eAAe,8BAA8B;AACtD,SAAS,UAAU,eAAe;AAClC,SAAS,SAAS,iBAAiB;AAKnC,SAAS,SAAS,mBAAmB;AACrC,SAAS,cAAc;AAEvB,MAAM,EAAE,6BAA6B,IAAI,OAAQ,sBAAuB;AAUzD,SAAR,aAA+B,OAAQ;AAC7C,SACC;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACL,0BAAwB;AAAA,MACxB,WAAY;AAAA;AAAA,EACb;AAEF;AAEO,SAAS,oBAAqB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,QAAM,EAAE,UAAU,SAAS,IAAI;AAAA,IAC9B,CAAE,YAAc;AAAA,MACf,UAAU,OAAQ,WAAY,EAAE,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,QAAS;AAAA,EAC5B;AAEA,QAAM,SAAS;AAAA,IACd,OACG,oBAAoB,CAAC,GAAI,IAAK,CAAE,EAAE,MAAM,UAAU,OAAS;AAAA,MAC5D,MAAM,IAAI,KAAM,SAAU;AAAA,IAC3B,EAAI;AAAA,IACL,CAAE,gBAAiB;AAAA,EACpB;AAEA,QAAM,WAAW,YAAY;AAI7B,QAAM,eAAe,WAAW;AAAA,IAC/B,SAAS,QAAQ,KACf,YAAY,EACZ,QAAS,SAAS,EAAG,EACrB,MAAO,EAAG,EACV,QAAQ,EACR,KAAM,EAAG;AAAA;AAAA,EACZ;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,aAAc;AAAA,MACd,UAAW;AAAA,MACX,UAAW;AAAA,MACX;AAAA;AAAA,QAEC,GAAI,OAAO,YAAa;AAAA;AAAA,MAEzB;AAAA,MACA,kBAAmB,CAAE,SACpB,kBAAmB,SAAU,IAAK,CAAE;AAAA,MAErC;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACD;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/editor/src/components/post-schedule/label.js
1
2
  import { __, _x, sprintf, isRTL } from "@wordpress/i18n";
2
3
  import { getSettings, getDate, dateI18n } from "@wordpress/date";
3
4
  import { useSelect } from "@wordpress/data";
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-schedule/label.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf, isRTL } from '@wordpress/i18n';\nimport { getSettings, getDate, dateI18n } from '@wordpress/date';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the PostScheduleLabel component.\n *\n * @param {Object} props Props.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostScheduleLabel( props ) {\n\treturn usePostScheduleLabel( props );\n}\n\n/**\n * Custom hook to get the label for post schedule.\n *\n * @param {Object} options Options for the hook.\n * @param {boolean} options.full Whether to get the full label or not. Default is false.\n *\n * @return {string} The label for post schedule.\n */\nexport function usePostScheduleLabel( { full = false } = {} ) {\n\tconst { date, isFloating } = useSelect(\n\t\t( select ) => ( {\n\t\t\tdate: select( editorStore ).getEditedPostAttribute( 'date' ),\n\t\t\tisFloating: select( editorStore ).isEditedPostDateFloating(),\n\t\t} ),\n\t\t[]\n\t);\n\n\treturn full\n\t\t? getFullPostScheduleLabel( date )\n\t\t: getPostScheduleLabel( date, { isFloating } );\n}\n\nexport function getFullPostScheduleLabel( dateAttribute ) {\n\tconst date = getDate( dateAttribute );\n\n\tconst timezoneAbbreviation = getTimezoneAbbreviation();\n\tconst formattedDate = dateI18n(\n\t\t// translators: Use a non-breaking space between 'g:i' and 'a' if appropriate.\n\t\t_x( 'F j, Y g:i\\xa0a', 'post schedule full date format' ),\n\t\tdate\n\t);\n\treturn isRTL()\n\t\t? `${ timezoneAbbreviation } ${ formattedDate }`\n\t\t: `${ formattedDate } ${ timezoneAbbreviation }`;\n}\n\nexport function getPostScheduleLabel(\n\tdateAttribute,\n\t{ isFloating = false, now = new Date() } = {}\n) {\n\tif ( ! dateAttribute || isFloating ) {\n\t\treturn __( 'Immediately' );\n\t}\n\n\t// If the user timezone does not equal the site timezone then using words\n\t// like 'tomorrow' is confusing, so show the full date.\n\tif ( ! isTimezoneSameAsSiteTimezone( now ) ) {\n\t\treturn getFullPostScheduleLabel( dateAttribute );\n\t}\n\n\tconst date = getDate( dateAttribute );\n\n\tif ( isSameDay( date, now ) ) {\n\t\treturn sprintf(\n\t\t\t// translators: %s: Time of day the post is scheduled for.\n\t\t\t__( 'Today at %s' ),\n\t\t\t// translators: If using a space between 'g:i' and 'a', use a non-breaking space.\n\t\t\tdateI18n( _x( 'g:i\\xa0a', 'post schedule time format' ), date )\n\t\t);\n\t}\n\n\tconst tomorrow = new Date( now );\n\ttomorrow.setDate( tomorrow.getDate() + 1 );\n\n\tif ( isSameDay( date, tomorrow ) ) {\n\t\treturn sprintf(\n\t\t\t// translators: %s: Time of day the post is scheduled for.\n\t\t\t__( 'Tomorrow at %s' ),\n\t\t\t// translators: If using a space between 'g:i' and 'a', use a non-breaking space.\n\t\t\tdateI18n( _x( 'g:i\\xa0a', 'post schedule time format' ), date )\n\t\t);\n\t}\n\n\tif ( date.getFullYear() === now.getFullYear() ) {\n\t\treturn dateI18n(\n\t\t\t// translators: If using a space between 'g:i' and 'a', use a non-breaking space.\n\t\t\t_x( 'F j g:i\\xa0a', 'post schedule date format without year' ),\n\t\t\tdate\n\t\t);\n\t}\n\n\treturn dateI18n(\n\t\t// translators: Use a non-breaking space between 'g:i' and 'a' if appropriate.\n\t\t_x( 'F j, Y g:i\\xa0a', 'post schedule full date format' ),\n\t\tdate\n\t);\n}\n\nfunction getTimezoneAbbreviation() {\n\tconst { timezone } = getSettings();\n\n\tif ( timezone.abbr && isNaN( Number( timezone.abbr ) ) ) {\n\t\treturn timezone.abbr;\n\t}\n\n\tconst symbol = timezone.offset < 0 ? '' : '+';\n\treturn `UTC${ symbol }${ timezone.offsetFormatted }`;\n}\n\nfunction isTimezoneSameAsSiteTimezone( date ) {\n\tconst { timezone } = getSettings();\n\n\tconst siteOffset = Number( timezone.offset );\n\tconst dateOffset = -1 * ( date.getTimezoneOffset() / 60 );\n\treturn siteOffset === dateOffset;\n}\n\nfunction isSameDay( left, right ) {\n\treturn (\n\t\tleft.getDate() === right.getDate() &&\n\t\tleft.getMonth() === right.getMonth() &&\n\t\tleft.getFullYear() === right.getFullYear()\n\t);\n}\n"],
5
- "mappings": "AAGA,SAAS,IAAI,IAAI,SAAS,aAAa;AACvC,SAAS,aAAa,SAAS,gBAAgB;AAC/C,SAAS,iBAAiB;AAK1B,SAAS,SAAS,mBAAmB;AAStB,SAAR,kBAAoC,OAAQ;AAClD,SAAO,qBAAsB,KAAM;AACpC;AAUO,SAAS,qBAAsB,EAAE,OAAO,MAAM,IAAI,CAAC,GAAI;AAC7D,QA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,SAAS,IAAI,YAAY;AAEjC,MAAK,SAAS,QAAQ,MAAO,OAAQ,SAAS,IAAK,CAAE,GAAI;AACxD,WAAO,SAAS;AAAA,EACjB;AAEA,QAAM,SAAS,SAAS,SAAS,IAAI,KAAK;AAC1C,SAAO,MAAO,MAAO,GAAI,SAAS,eAAgB;AACnD;AAEA,SAAS,6BAA8B,MAAO;AAC7C,QAAM,EAAE,SAAS,IAAI,YAAY;AAEjC,QAAM,aAAa,OAAQ,SAAS,MAAO;AAC3C,QAAM,aAAa,MAAO,KAAK,kBAAkB,IAAI;AACrD,SAAO,eAAe;AACvB;AAEA,SAAS,UAAW,MAAM,OAAQ;AACjC,SACC,KAAK,QAAQ,MAAM,MAAM,QAAQ,KACjC,KAAK,SAAS,MAAM,MAAM,SAAS,KACnC,KAAK,YAAY,MAAM,MAAM,YAAY;AAE3C;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ // packages/editor/src/components/post-schedule/panel.js
2
2
  import { Button, Dropdown } from "@wordpress/components";
3
3
  import { __, sprintf } from "@wordpress/i18n";
4
4
  import { useState, useMemo } from "@wordpress/element";
@@ -14,7 +14,8 @@ import {
14
14
  PATTERN_POST_TYPE,
15
15
  NAVIGATION_POST_TYPE
16
16
  } from "../../store/constants";
17
- const DESIGN_POST_TYPES = [
17
+ import { jsx } from "react/jsx-runtime";
18
+ var DESIGN_POST_TYPES = [
18
19
  TEMPLATE_POST_TYPE,
19
20
  TEMPLATE_PART_POST_TYPE,
20
21
  PATTERN_POST_TYPE,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-schedule/panel.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { Button, Dropdown } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useState, useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostScheduleCheck from './check';\nimport PostScheduleForm from './index';\nimport { usePostScheduleLabel } from './label';\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tPATTERN_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n} from '../../store/constants';\n\nconst DESIGN_POST_TYPES = [\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tPATTERN_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n];\n\n/**\n * Renders the Post Schedule Panel component.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostSchedulePanel() {\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\tconst postType = useSelect(\n\t\t( select ) => select( editorStore ).getCurrentPostType(),\n\t\t[]\n\t);\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\t'aria-label': __( 'Change publish date' ),\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\tconst label = usePostScheduleLabel();\n\tconst fullLabel = usePostScheduleLabel( { full: true } );\n\tif ( DESIGN_POST_TYPES.includes( postType ) ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostScheduleCheck>\n\t\t\t<PostPanelRow label={ __( 'Publish' ) } ref={ setPopoverAnchor }>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\tclassName=\"editor-post-schedule__panel-dropdown\"\n\t\t\t\t\tcontentClassName=\"editor-post-schedule__dialog\"\n\t\t\t\t\trenderToggle={ ( { onToggle, isOpen } ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\tclassName=\"editor-post-schedule__dialog-toggle\"\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\ttooltipPosition=\"middle left\"\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Current post date.\n\t\t\t\t\t\t\t\t__( 'Change date: %s' ),\n\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tlabel={ fullLabel }\n\t\t\t\t\t\t\tshowTooltip={ label !== fullLabel }\n\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<PostScheduleForm onClose={ onClose } />\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PostPanelRow>\n\t\t</PostScheduleCheck>\n\t);\n}\n"],
5
- "mappings": "AAsEM;AAnEN,SAAS,QAAQ,gBAAgB;AACjC,SAAS,IAAI,eAAe;AAC5B,SAAS,UAAU,eAAe;AAClC,SAAS,iBAAiB;AAK1B,OAAO,uBAAuB;AAC9B,OAAO,sBAAsB;AAC7B,SAAS,4BAA4B;AACrC,OAAO,kBAAkB;AACzB,SAAS,SAAS,mBAAmB;AACrC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAEP,MAAM,oBAAoB;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAOe,SAAR,oBAAqC;AAC3C,QAAM,CAAE,eAAe,gBAAiB,IAAI,SAAU,IAAK;AAC3D,QAAM,WAAW;AAAA,IAChB,CAAE,WAAY,OAAQ,WAAY,EAAE,mBAAmB;AAAA,IACvD,CAAC;AAAA,EACF;AAEA,QAAM,eAAe;AAAA,IACpB,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,EACA;AAAA,EACA;AACD;AAOe,SAAR,oBAAqC;AAC3C,QAAM,CAAE,eAAe,gBAAiB,IAAI,SAAU,IAAK;AAC3D,QAAM,WAAW;AAAA,IAChB,CAAE,WAAY,OAAQ,WAAY,EAAE,mBAAmB;AAAA,IACvD,CAAC;AAAA,EACF;AAEA,QAAM,eAAe;AAAA,IACpB,OAAQ;AAAA;AAAA;AAAA,MAGP,QAAQ;AAAA,MACR,cAAc,GAAI,qBAAsB;AAAA,MACxC,WAAW;AAAA,MACX,QAAQ;AAAA,MACR,OAAO;AAAA,IACR;AAAA,IACA,CAAE,aAAc;AAAA,EACjB;AAEA,QAAM,QAAQ,qBAAqB;AACnC,QAAM,YAAY,qBAAsB,EAAE,MAAM,KAAK,CAAE;AACvD,MAAK,kBAAkB,SAAU,QAAS,GAAI;AAC7C,WAAO;AAAA,EACR;AAEA,SACC,oBAAC,qBACA,8BAAC,gBAAa,OAAQ,GAAI,SAAU,GAAI,KAAM,kBAC7C;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,cAAY;AAAA,MACZ,WAAU;AAAA,MACV,kBAAiB;AAAA,MACjB,cAAe,CAAE,EAAE,UAAU,OAAO,MACnC;AAAA,QAAC;AAAA;AAAA,UACA,MAAK;AAAA,UACL,WAAU;AAAA,UACV,SAAQ;AAAA,UACR,iBAAgB;AAAA,UAChB,SAAU;AAAA,UACV,cAAa;AAAA;AAAA,YAEZ,GAAI,iBAAkB;AAAA,YACtB;AAAA,UACD;AAAA,UACA,OAAQ;AAAA,UACR,aAAc,UAAU;AAAA,UACxB,iBAAgB;AAAA,UAEd;AAAA;AAAA,MACH;AAAA,MAED,eAAgB,CAAE,EAAE,QAAQ,MAC3B,oBAAC,oBAAiB,SAAoB;AAAA;AAAA,EAExC,GACD,GACD;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
1
+ // packages/editor/src/components/post-status/index.js
2
2
  import {
3
3
  Button,
4
4
  CheckboxControl,
@@ -30,7 +30,8 @@ import PostPanelRow from "../post-panel-row";
30
30
  import PostSticky from "../post-sticky";
31
31
  import { PrivatePostSchedule } from "../post-schedule";
32
32
  import { store as editorStore } from "../../store";
33
- const postStatusesInfo = {
33
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
34
+ var postStatusesInfo = {
34
35
  "auto-draft": { label: __("Draft"), icon: drafts },
35
36
  draft: { label: __("Draft"), icon: drafts },
36
37
  pending: { label: __("Pending"), icon: pending },
@@ -38,7 +39,7 @@ const postStatusesInfo = {
38
39
  future: { label: __("Scheduled"), icon: scheduled },
39
40
  publish: { label: __("Published"), icon: published }
40
41
  };
41
- const STATUS_OPTIONS = [
42
+ var STATUS_OPTIONS = [
42
43
  {
43
44
  label: __("Draft"),
44
45
  value: "draft",
@@ -65,7 +66,7 @@ const STATUS_OPTIONS = [
65
66
  description: __("Visible to everyone.")
66
67
  }
67
68
  ];
68
- const DESIGN_POST_TYPES = [
69
+ var DESIGN_POST_TYPES = [
69
70
  TEMPLATE_POST_TYPE,
70
71
  TEMPLATE_PART_POST_TYPE,
71
72
  PATTERN_POST_TYPE,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-status/index.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tCheckboxControl,\n\tDropdown,\n\t__experimentalVStack as VStack,\n\tTextControl,\n\tRadioControl,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useState, useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tdrafts,\n\tpublished,\n\tscheduled,\n\tpending,\n\tnotAllowed,\n} from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tPATTERN_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n} from '../../store/constants';\nimport PostPanelRow from '../post-panel-row';\nimport PostSticky from '../post-sticky';\nimport { PrivatePostSchedule } from '../post-schedule';\nimport { store as editorStore } from '../../store';\n\nconst postStatusesInfo = {\n\t'auto-draft': { label: __( 'Draft' ), icon: drafts },\n\tdraft: { label: __( 'Draft' ), icon: drafts },\n\tpending: { label: __( 'Pending' ), icon: pending },\n\tprivate: { label: __( 'Private' ), icon: notAllowed },\n\tfuture: { label: __( 'Scheduled' ), icon: scheduled },\n\tpublish: { label: __( 'Published' ), icon: published },\n};\n\nexport const STATUS_OPTIONS = [\n\t{\n\t\tlabel: __( 'Draft' ),\n\t\tvalue: 'draft',\n\t\tdescription: __( 'Not ready to publish.' ),\n\t},\n\t{\n\t\tlabel: __( 'Pending' ),\n\t\tvalue: 'pending',\n\t\tdescription: __( 'Waiting for review before publishing.' ),\n\t},\n\t{\n\t\tlabel: __( 'Private' ),\n\t\tvalue: 'private',\n\t\tdescription: __( 'Only visible to site admins and editors.' ),\n\t},\n\t{\n\t\tlabel: __( 'Scheduled' ),\n\t\tvalue: 'future',\n\t\tdescription: __( 'Publish automatically on a chosen date.' ),\n\t},\n\t{\n\t\tlabel: __( 'Published' ),\n\t\tvalue: 'publish',\n\t\tdescription: __( 'Visible to everyone.' ),\n\t},\n];\n\nconst DESIGN_POST_TYPES = [\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tPATTERN_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n];\n\nexport default function PostStatus() {\n\tconst { status, date, password, postId, postType, canEdit } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEditedPostAttribute,\n\t\t\t\tgetCurrentPostId,\n\t\t\t\tgetCurrentPostType,\n\t\t\t\tgetCurrentPost,\n\t\t\t} = select( editorStore );\n\t\t\treturn {\n\t\t\t\tstatus: getEditedPostAttribute( 'status' ),\n\t\t\t\tdate: getEditedPostAttribute( 'date' ),\n\t\t\t\tpassword: getEditedPostAttribute( 'password' ),\n\t\t\t\tpostId: getCurrentPostId(),\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t\tcanEdit:\n\t\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst [ showPassword, setShowPassword ] = useState( !! password );\n\tconst passwordInputId = useInstanceId(\n\t\tPostStatus,\n\t\t'editor-change-status__password-input'\n\t);\n\tconst { editEntityRecord } = useDispatch( coreStore );\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\t'aria-label': __( 'Status & visibility' ),\n\t\t\theaderTitle: __( 'Status & visibility' ),\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\tif ( DESIGN_POST_TYPES.includes( postType ) ) {\n\t\treturn null;\n\t}\n\n\tconst updatePost = ( {\n\t\tstatus: newStatus = status,\n\t\tpassword: newPassword = password,\n\t\tdate: newDate = date,\n\t} ) => {\n\t\teditEntityRecord( 'postType', postType, postId, {\n\t\t\tstatus: newStatus,\n\t\t\tdate: newDate,\n\t\t\tpassword: newPassword,\n\t\t} );\n\t};\n\n\tconst handleTogglePassword = ( value ) => {\n\t\tsetShowPassword( value );\n\t\tif ( ! value ) {\n\t\t\tupdatePost( { password: '' } );\n\t\t}\n\t};\n\n\tconst handleStatus = ( value ) => {\n\t\tlet newDate = date;\n\t\tlet newPassword = password;\n\t\tif ( status === 'future' && new Date( date ) > new Date() ) {\n\t\t\tnewDate = null;\n\t\t}\n\t\tif ( value === 'private' && password ) {\n\t\t\tnewPassword = '';\n\t\t}\n\t\tupdatePost( {\n\t\t\tstatus: value,\n\t\t\tdate: newDate,\n\t\t\tpassword: newPassword,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<PostPanelRow label={ __( 'Status' ) } ref={ setPopoverAnchor }>\n\t\t\t{ canEdit ? (\n\t\t\t\t<Dropdown\n\t\t\t\t\tclassName=\"editor-post-status\"\n\t\t\t\t\tcontentClassName=\"editor-change-status__content\"\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { onToggle, isOpen } ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"editor-post-status__toggle\"\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\ticon={ postStatusesInfo[ status ]?.icon }\n\t\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Current post status.\n\t\t\t\t\t\t\t\t__( 'Change status: %s' ),\n\t\t\t\t\t\t\t\tpostStatusesInfo[ status ]?.label\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ postStatusesInfo[ status ]?.label }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\t\ttitle={ __( 'Status & visibility' ) }\n\t\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t\t\t\t\t<RadioControl\n\t\t\t\t\t\t\t\t\t\tclassName=\"editor-change-status__options\"\n\t\t\t\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Status' ) }\n\t\t\t\t\t\t\t\t\t\toptions={ STATUS_OPTIONS }\n\t\t\t\t\t\t\t\t\t\tonChange={ handleStatus }\n\t\t\t\t\t\t\t\t\t\tselected={\n\t\t\t\t\t\t\t\t\t\t\tstatus === 'auto-draft'\n\t\t\t\t\t\t\t\t\t\t\t\t? 'draft'\n\t\t\t\t\t\t\t\t\t\t\t\t: status\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t{ status === 'future' && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"editor-change-status__publish-date-wrapper\">\n\t\t\t\t\t\t\t\t\t\t\t<PrivatePostSchedule\n\t\t\t\t\t\t\t\t\t\t\t\tshowPopoverHeaderActions={\n\t\t\t\t\t\t\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tisCompact\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ status !== 'private' && (\n\t\t\t\t\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\t\t\t\t\tas=\"fieldset\"\n\t\t\t\t\t\t\t\t\t\t\tspacing={ 4 }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-change-status__password-fieldset\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Password protected'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Only visible to those who know the password.'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\tchecked={ showPassword }\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={\n\t\t\t\t\t\t\t\t\t\t\t\t\thandleTogglePassword\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t{ showPassword && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"editor-change-status__password-input\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Password'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupdatePost( {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpassword: value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={ password }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Use a secure password'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tid={ passwordInputId }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaxLength={ 255 }\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t<PostSticky />\n\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<div className=\"editor-post-status is-read-only\">\n\t\t\t\t\t{ postStatusesInfo[ status ]?.label }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</PostPanelRow>\n\t);\n}\n"],
5
- "mappings": "AA8KM,SAiBA,UAjBA,KAoDI,YApDJ;AA3KN;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA,wBAAwB;AAAA,EACxB;AAAA,EACA;AAAA,OACM;AACP,SAAS,IAAI,eAAe;AAC5B,SAAS,aAAa,iBAAiB;AACvC,SAAS,UAAU,eAAe;AAClC,SAAS,SAAS,iBAAiB;AACnC,SAAS,wCAAwC,8BAA8B;AAC/E,SAAS,qBAAqB;AAC9B;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAKP;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,OAAO,kBAAkB;AACzB,OAAO,gBAAgB;AACvB,SAAS,2BAA2B;AACpC,SAAS,SAAS,mBAAmB;AAErC,MAAM,mBAAmB;AAAA,EACxB,cAAc,EAAE,OAAO,GAAI,OAAQ,GAAG,MAAM,OAAO;AAAA,EACnD,OAAO,EAAE,OAAO,GAAI,OAAQ,GAAG,MAAM,OAAO;AAAA,EAC5C,SAAS,EAAE,OAAO,GAAI,SAAU,GAAG,MAAM,QAAQ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A,IAAG;AAAA,kBACH,SAAU;AAAA,kBACV,WAAU;AAAA,kBAEV;AAAA;AAAA,sBAAC;AAAA;AAAA,wBACA,yBAAuB;AAAA,wBACvB,OAAQ;AAAA,0BACP;AAAA,wBACD;AAAA,wBACA,MAAO;AAAA,0BACN;AAAA,wBACD;AAAA,wBACA,SAAU;AAAA,wBACV,UACC;AAAA;AAAA,oBAEF;AAAA,oBACE,gBACD,oBAAC,SAAI,WAAU,wCACd;AAAA,sBAAC;AAAA;AAAA,wBACA,OAAQ;AAAA,0BACP;AAAA,wBACD;AAAA,wBACA,UAAW,CAAE,UACZ,WAAY;AAAA,0BACX,UAAU;AAAA,wBACX,CAAE;AAAA,wBAEH,OAAQ;AAAA,wBACR,aAAc;AAAA,0BACb;AAAA,wBACD;AAAA,wBACA,MAAK;AAAA,wBACL,IAAK;AAAA,wBACL,uBAAqB;AAAA,wBACrB,yBAAuB;AAAA,wBACvB,WAAY;AAAA;AAAA,oBACb,GACD;AAAA;AAAA;AAAA,cAEF;AAAA,cAED,oBAAC,cAAW;AAAA,eACb;AAAA;AAAA,QACD;AAAA,SACD;AAAA;AAAA,EAEF,IAEA,oBAAC,SAAI,WAAU,mCACZ,2BAAkB,MAAO,GAAG,OAC/B,GAEF;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/editor/src/components/post-sticky/check.js
1
2
  import { useSelect } from "@wordpress/data";
2
3
  import { store as editorStore } from "../../store";
3
4
  function PostStickyCheck({ children }) {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-sticky/check.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Wrapper component that renders its children only if post has a sticky action.\n *\n * @param {Object} props Props.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @return {React.ReactNode} The component to be rendered or null if post type is not 'post' or hasStickyAction is false.\n */\nexport default function PostStickyCheck( { children } ) {\n\tconst { hasStickyAction, postType } = useSelect( ( select ) => {\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\treturn {\n\t\t\thasStickyAction: post._links?.[ 'wp:action-sticky' ] ?? false,\n\t\t\tpostType: select( editorStore ).getCurrentPostType(),\n\t\t};\n\t}, [] );\n\n\tif ( postType !== 'post' || ! hasStickyAction ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n"],
5
- "mappings": "AAGA,SAAS,iBAAiB;AAK1B,SAAS,SAAS,mBAAmB;AAUtB,SAAR,gBAAkC,EAAE,SAAS,GAAI;AACvD,QAAM,EAAE,iBAAiB,SAAS,IAAI,UAAW,CAAE,WAAY;AAC9D,UAAM,OAAO,OAAQ,WAAY,EAAE,eAAe;AAClD,WAAO;AAAA,MACN,iBAAiB,KAAK,SAAU,kBAAmB,KAAK;AAAA,MACxD,UAAU,OAAQ,WAAY,EAAE,mBAAmB;AAAA,IACpD;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,MAAK,aAAa,UAAU,CAAE,iBAAkB;AAC/C,WAAO;AAAA,EACR;AAEA,SAAO;AACR;",
5
+ "mappings": ";AAGA,SAAS,iBAAiB;AAK1B,SAAS,SAAS,mBAAmB;AAUtB,SAAR,gBAAkC,EAAE,SAAS,GAAI;AACvD,QAAM,EAAE,iBAAiB,SAAS,IAAI,UAAW,CAAE,WAAY;AAC9D,UAAM,OAAO,OAAQ,WAAY,EAAE,eAAe;AAClD,WAAO;AAAA,MACN,iBAAiB,KAAK,SAAU,kBAAmB,KAAK;AAAA,MACxD,UAAU,OAAQ,WAAY,EAAE,mBAAmB;AAAA,IACpD;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,MAAK,aAAa,UAAU,CAAE,iBAAkB;AAC/C,WAAO;AAAA,EACR;AAEA,SAAO;AACR;",
6
6
  "names": []
7
7
  }