@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/plugin-document-setting-panel/index.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelBody } from '@wordpress/components';\nimport { usePluginContext } from '@wordpress/plugins';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport EnablePluginDocumentSettingPanelOption from '../preferences-modal/enable-plugin-document-setting-panel';\nimport { store as editorStore } from '../../store';\n\nconst { Fill, Slot } = createSlotFill( 'PluginDocumentSettingPanel' );\n\n/**\n * Renders items below the Status & Availability panel in the Document Sidebar.\n *\n * @param {Object} props Component properties.\n * @param {string} props.name Required. A machine-friendly name for the panel.\n * @param {string} [props.className] An optional class name added to the row.\n * @param {string} [props.title] The title of the panel\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n * @param {React.ReactNode} props.children Children to be rendered\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var el = React.createElement;\n * var __ = wp.i18n.__;\n * var registerPlugin = wp.plugins.registerPlugin;\n * var PluginDocumentSettingPanel = wp.editor.PluginDocumentSettingPanel;\n *\n * function MyDocumentSettingPlugin() {\n * \treturn el(\n * \t\tPluginDocumentSettingPanel,\n * \t\t{\n * \t\t\tclassName: 'my-document-setting-plugin',\n * \t\t\ttitle: 'My Panel',\n * \t\t\tname: 'my-panel',\n * \t\t},\n * \t\t__( 'My Document Setting Panel' )\n * \t);\n * }\n *\n * registerPlugin( 'my-document-setting-plugin', {\n * \t\trender: MyDocumentSettingPlugin\n * } );\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { registerPlugin } from '@wordpress/plugins';\n * import { PluginDocumentSettingPanel } from '@wordpress/editor';\n *\n * const MyDocumentSettingTest = () => (\n * \t\t<PluginDocumentSettingPanel className=\"my-document-setting-plugin\" title=\"My Panel\" name=\"my-panel\">\n *\t\t\t<p>My Document Setting Panel</p>\n *\t\t</PluginDocumentSettingPanel>\n *\t);\n *\n * registerPlugin( 'document-setting-test', { render: MyDocumentSettingTest } );\n * ```\n *\n * @return {React.ReactNode} The component to be rendered.\n */\nconst PluginDocumentSettingPanel = ( {\n\tname,\n\tclassName,\n\ttitle,\n\ticon,\n\tchildren,\n} ) => {\n\tconst { name: pluginName } = usePluginContext();\n\tconst panelName = `${ pluginName }/${ name }`;\n\tconst { opened, isEnabled } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isEditorPanelOpened, isEditorPanelEnabled } =\n\t\t\t\tselect( editorStore );\n\n\t\t\treturn {\n\t\t\t\topened: isEditorPanelOpened( panelName ),\n\t\t\t\tisEnabled: isEditorPanelEnabled( panelName ),\n\t\t\t};\n\t\t},\n\t\t[ panelName ]\n\t);\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( undefined === name ) {\n\t\twarning( 'PluginDocumentSettingPanel requires a name property.' );\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<EnablePluginDocumentSettingPanelOption\n\t\t\t\tlabel={ title }\n\t\t\t\tpanelName={ panelName }\n\t\t\t/>\n\t\t\t<Fill>\n\t\t\t\t{ isEnabled && (\n\t\t\t\t\t<PanelBody\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\topened={ opened }\n\t\t\t\t\t\tonToggle={ () => toggleEditorPanelOpened( panelName ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</PanelBody>\n\t\t\t\t) }\n\t\t\t</Fill>\n\t\t</>\n\t);\n};\n\nPluginDocumentSettingPanel.Slot = Slot;\n\nexport default PluginDocumentSettingPanel;\n"],
5
- "mappings": "AAgGE,mBACC,KADD;AA7FF,SAAS,gBAAgB,iBAAiB;AAC1C,SAAS,wBAAwB;AACjC,SAAS,aAAa,iBAAiB;AACvC,OAAO,aAAa;AAKpB,OAAO,4CAA4C;AACnD,SAAS,SAAS,mBAAmB;AAErC,MAAM,EAAE,MAAM,KAAK,IAAI,eAAgB,4BAA6B;AAsDpE,MAAM,6BAA6B,CAAE;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,MAAO;AACN,QAAM,EAAE,MAAM,WAAW,IAAI,iBAAiB;AAC9C,QAAM,YAAY,GAAI,UAAW,IAAK,IAAK;AAC3C,QAAM,EAAE,QAAQ,UAAU,IAAI;AAAA,IAC7B,CAAE,WAAY;AACb,YAAM,EAAE,qBAAqB,qBAAqB,IACjD,OAAQ,WAAY;AAErB,aAAO;AAAA,QACN,QAAQ,oBAAqB,SAAU;AAAA,QACvC,WAAW,qBAAsB,SAAU;AAAA,MAC5C;AAAA,IACD;AAAA,IACA,CAAE,SAAU;AAAA,EACb;AACA,QAAM,EAAE,wBAAwB,IAAI,YAAa,WAAY;AAE7D,MAAK,WAAc,MAAO;AACzB,YAAS,sDAAuD;AAAA,EACjE;AAEA,SACC,iCACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,OAAQ;AAAA,QACR;AAAA;AAAA,IACD;AAAA,IACA,oBAAC,QACE,uBACD;AAAA,MAAC;AAAA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAW,MAAM,wBAAyB,SAAU;AAAA,QAElD;AAAA;AAAA,IACH,GAEF;AAAA,KACD;AAEF;AAEA,2BAA2B,OAAO;AAElC,IAAO,wCAAQ;",
5
+ "mappings": ";AAGA,SAAS,gBAAgB,iBAAiB;AAC1C,SAAS,wBAAwB;AACjC,SAAS,aAAa,iBAAiB;AACvC,OAAO,aAAa;AAKpB,OAAO,4CAA4C;AACnD,SAAS,SAAS,mBAAmB;AAoFnC,mBACC,KADD;AAlFF,IAAM,EAAE,MAAM,KAAK,IAAI,eAAgB,4BAA6B;AAsDpE,IAAM,6BAA6B,CAAE;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,MAAO;AACN,QAAM,EAAE,MAAM,WAAW,IAAI,iBAAiB;AAC9C,QAAM,YAAY,GAAI,UAAW,IAAK,IAAK;AAC3C,QAAM,EAAE,QAAQ,UAAU,IAAI;AAAA,IAC7B,CAAE,WAAY;AACb,YAAM,EAAE,qBAAqB,qBAAqB,IACjD,OAAQ,WAAY;AAErB,aAAO;AAAA,QACN,QAAQ,oBAAqB,SAAU;AAAA,QACvC,WAAW,qBAAsB,SAAU;AAAA,MAC5C;AAAA,IACD;AAAA,IACA,CAAE,SAAU;AAAA,EACb;AACA,QAAM,EAAE,wBAAwB,IAAI,YAAa,WAAY;AAE7D,MAAK,WAAc,MAAO;AACzB,YAAS,sDAAuD;AAAA,EACjE;AAEA,SACC,iCACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,OAAQ;AAAA,QACR;AAAA;AAAA,IACD;AAAA,IACA,oBAAC,QACE,uBACD;AAAA,MAAC;AAAA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAW,MAAM,wBAAyB,SAAU;AAAA,QAElD;AAAA;AAAA,IACH,GAEF;AAAA,KACD;AAEF;AAEA,2BAA2B,OAAO;AAElC,IAAO,wCAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,8 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ // packages/editor/src/components/plugin-more-menu-item/index.js
2
2
  import { MenuItem } from "@wordpress/components";
3
3
  import { usePluginContext } from "@wordpress/plugins";
4
4
  import { ActionItem } from "@wordpress/interface";
5
+ import { jsx } from "react/jsx-runtime";
5
6
  function PluginMoreMenuItem(props) {
6
7
  const context = usePluginContext();
7
8
  return /* @__PURE__ */ jsx(
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/plugin-more-menu-item/index.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { usePluginContext } from '@wordpress/plugins';\nimport { ActionItem } from '@wordpress/interface';\n\n/**\n * Renders a menu item in `Plugins` group in `More Menu` drop down, and can be used to as a button or link depending on the props provided.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component properties.\n * @param {React.ReactNode} [props.children] Children to be rendered.\n * @param {string} [props.href] When `href` is provided then the menu item is represented as an anchor rather than button. It corresponds to the `href` attribute of the anchor.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.\n * @param {Function} [props.onClick=noop] The callback function to be executed when the user clicks the menu item.\n * @param {...*} [props.other] Any additional props are passed through to the underlying [Button](/packages/components/src/button/README.md) component.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginMoreMenuItem = wp.editor.PluginMoreMenuItem;\n * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.\n *\n * function onButtonClick() {\n * \talert( 'Button clicked.' );\n * }\n *\n * function MyButtonMoreMenuItem() {\n * \treturn wp.element.createElement(\n * \t\tPluginMoreMenuItem,\n * \t\t{\n * \t\t\ticon: moreIcon,\n * \t\t\tonClick: onButtonClick,\n * \t\t},\n * \t\t__( 'My button title' )\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginMoreMenuItem } from '@wordpress/editor';\n * import { more } from '@wordpress/icons';\n *\n * function onButtonClick() {\n * \talert( 'Button clicked.' );\n * }\n *\n * const MyButtonMoreMenuItem = () => (\n * \t<PluginMoreMenuItem\n * \t\ticon={ more }\n * \t\tonClick={ onButtonClick }\n * \t>\n * \t\t{ __( 'My button title' ) }\n * \t</PluginMoreMenuItem>\n * );\n * ```\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PluginMoreMenuItem( props ) {\n\tconst context = usePluginContext();\n\treturn (\n\t\t<ActionItem\n\t\t\tname=\"core/plugin-more-menu\"\n\t\t\tas={ props.as ?? MenuItem }\n\t\t\ticon={ props.icon || context.icon }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],
5
- "mappings": "AAmEE;AAhEF,SAAS,gBAAgB;AACzB,SAAS,wBAAwB;AACjC,SAAS,kBAAkB;AA2DZ,SAAR,mBAAqC,OAAQ;AACnD,QAAM,UAAU,iBAAiB;AACjC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,MAAK;AAAA,MACL,IAAK,MAAM,MAAM;AAAA,MACjB,MAAO,MAAM,QAAQ,QAAQ;AAAA,MAC3B,GAAG;AAAA;AAAA,EACN;AAEF;",
5
+ "mappings": ";AAGA,SAAS,gBAAgB;AACzB,SAAS,wBAAwB;AACjC,SAAS,kBAAkB;AA8DzB;AAHa,SAAR,mBAAqC,OAAQ;AACnD,QAAM,UAAU,iBAAiB;AACjC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,MAAK;AAAA,MACL,IAAK,MAAM,MAAM;AAAA,MACjB,MAAO,MAAM,QAAQ,QAAQ;AAAA,MAC3B,GAAG;AAAA;AAAA,EACN;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,8 +1,9 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ // packages/editor/src/components/plugin-post-publish-panel/index.js
2
2
  import { usePluginContext } from "@wordpress/plugins";
3
3
  import { createSlotFill, PanelBody } from "@wordpress/components";
4
- const { Fill, Slot } = createSlotFill("PluginPostPublishPanel");
5
- const PluginPostPublishPanel = ({
4
+ import { jsx } from "react/jsx-runtime";
5
+ var { Fill, Slot } = createSlotFill("PluginPostPublishPanel");
6
+ var PluginPostPublishPanel = ({
6
7
  children,
7
8
  className,
8
9
  title,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/plugin-post-publish-panel/index.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { usePluginContext } from '@wordpress/plugins';\nimport { createSlotFill, PanelBody } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPostPublishPanel' );\n\n/**\n * Renders provided content to the post-publish panel in the publish flow\n * (side panel that opens after a user publishes the post).\n *\n * @param {Object} props Component properties.\n * @param {string} [props.className] An optional class name added to the panel.\n * @param {string} [props.title] Title displayed at the top of the panel.\n * @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened. When no title is provided it is always opened.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n * @param {React.ReactNode} props.children Children to be rendered\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPostPublishPanel } from '@wordpress/editor';\n *\n * const MyPluginPostPublishPanel = () => (\n * \t<PluginPostPublishPanel\n * \t\tclassName=\"my-plugin-post-publish-panel\"\n * \t\ttitle={ __( 'My panel title' ) }\n * \t\tinitialOpen={ true }\n * \t>\n * { __( 'My panel content' ) }\n * \t</PluginPostPublishPanel>\n * );\n * ```\n *\n * @return {React.ReactNode} The rendered component.\n */\nconst PluginPostPublishPanel = ( {\n\tchildren,\n\tclassName,\n\ttitle,\n\tinitialOpen = false,\n\ticon,\n} ) => {\n\tconst { icon: pluginIcon } = usePluginContext();\n\n\treturn (\n\t\t<Fill>\n\t\t\t<PanelBody\n\t\t\t\tclassName={ className }\n\t\t\t\tinitialOpen={ initialOpen || ! title }\n\t\t\t\ttitle={ title }\n\t\t\t\ticon={ icon ?? pluginIcon }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</PanelBody>\n\t\t</Fill>\n\t);\n};\n\nPluginPostPublishPanel.Slot = Slot;\n\nexport default PluginPostPublishPanel;\n"],
5
- "mappings": "AAiDG;AA9CH,SAAS,wBAAwB;AACjC,SAAS,gBAAgB,iBAAiB;AAE1C,MAAM,EAAE,MAAM,KAAK,IAAI,eAAgB,wBAAyB;AAgChE,MAAM,yBAAyB,CAAE;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd;AACD,MAAO;AACN,QAAM,EAAE,MAAM,WAAW,IAAI,iBAAiB;AAE9C,SACC,oBAAC,QACA;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,aAAc,eAAe,CAAE;AAAA,MAC/B;AAAA,MACA,MAAO,QAAQ;AAAA,MAEb;AAAA;AAAA,EACH,GACD;AAEF;AAEA,uBAAuB,OAAO;AAE9B,IAAO,oCAAQ;",
5
+ "mappings": ";AAGA,SAAS,wBAAwB;AACjC,SAAS,gBAAgB,iBAAiB;AA6CvC;AA3CH,IAAM,EAAE,MAAM,KAAK,IAAI,eAAgB,wBAAyB;AAgChE,IAAM,yBAAyB,CAAE;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd;AACD,MAAO;AACN,QAAM,EAAE,MAAM,WAAW,IAAI,iBAAiB;AAE9C,SACC,oBAAC,QACA;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,aAAc,eAAe,CAAE;AAAA,MAC/B;AAAA,MACA,MAAO,QAAQ;AAAA,MAEb;AAAA;AAAA,EACH,GACD;AAEF;AAEA,uBAAuB,OAAO;AAE9B,IAAO,oCAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,8 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ // packages/editor/src/components/plugin-post-status-info/index.js
2
2
  import { createSlotFill, PanelRow } from "@wordpress/components";
3
- const { Fill, Slot } = createSlotFill("PluginPostStatusInfo");
4
- const PluginPostStatusInfo = ({ children, className }) => /* @__PURE__ */ jsx(Fill, { children: /* @__PURE__ */ jsx(PanelRow, { className, children }) });
3
+ import { jsx } from "react/jsx-runtime";
4
+ var { Fill, Slot } = createSlotFill("PluginPostStatusInfo");
5
+ var PluginPostStatusInfo = ({ children, className }) => /* @__PURE__ */ jsx(Fill, { children: /* @__PURE__ */ jsx(PanelRow, { className, children }) });
5
6
  PluginPostStatusInfo.Slot = Slot;
6
7
  var plugin_post_status_info_default = PluginPostStatusInfo;
7
8
  export {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/plugin-post-status-info/index.js"],
4
4
  "sourcesContent": ["/**\n * Defines as extensibility slot for the Summary panel.\n */\n\n/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelRow } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPostStatusInfo' );\n\n/**\n * Renders a row in the Summary panel of the Document sidebar.\n * It should be noted that this is named and implemented around the function it serves\n * and not its location, which may change in future iterations.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.className] An optional class name added to the row.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginPostStatusInfo = wp.editor.PluginPostStatusInfo;\n *\n * function MyPluginPostStatusInfo() {\n * \treturn React.createElement(\n * \t\tPluginPostStatusInfo,\n * \t\t{\n * \t\t\tclassName: 'my-plugin-post-status-info',\n * \t\t},\n * \t\t__( 'My post status info' )\n * \t)\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPostStatusInfo } from '@wordpress/editor';\n *\n * const MyPluginPostStatusInfo = () => (\n * \t<PluginPostStatusInfo\n * \t\tclassName=\"my-plugin-post-status-info\"\n * \t>\n * \t\t{ __( 'My post status info' ) }\n * \t</PluginPostStatusInfo>\n * );\n * ```\n *\n * @return {React.ReactNode} The rendered component.\n */\nconst PluginPostStatusInfo = ( { children, className } ) => (\n\t<Fill>\n\t\t<PanelRow className={ className }>{ children }</PanelRow>\n\t</Fill>\n);\n\nPluginPostStatusInfo.Slot = Slot;\n\nexport default PluginPostStatusInfo;\n"],
5
- "mappings": "AAwDE;AAjDF,SAAS,gBAAgB,gBAAgB;AAEzC,MAAM,EAAE,MAAM,KAAK,IAAI,eAAgB,sBAAuB;AA6C9D,MAAM,uBAAuB,CAAE,EAAE,UAAU,UAAU,MACpD,oBAAC,QACA,8BAAC,YAAS,WAA0B,UAAU,GAC/C;AAGD,qBAAqB,OAAO;AAE5B,IAAO,kCAAQ;",
5
+ "mappings": ";AAOA,SAAS,gBAAgB,gBAAgB;AAiDvC;AA/CF,IAAM,EAAE,MAAM,KAAK,IAAI,eAAgB,sBAAuB;AA6C9D,IAAM,uBAAuB,CAAE,EAAE,UAAU,UAAU,MACpD,oBAAC,QACA,8BAAC,YAAS,WAA0B,UAAU,GAC/C;AAGD,qBAAqB,OAAO;AAE5B,IAAO,kCAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,8 +1,9 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ // packages/editor/src/components/plugin-pre-publish-panel/index.js
2
2
  import { createSlotFill, PanelBody } from "@wordpress/components";
3
3
  import { usePluginContext } from "@wordpress/plugins";
4
- const { Fill, Slot } = createSlotFill("PluginPrePublishPanel");
5
- const PluginPrePublishPanel = ({
4
+ import { jsx } from "react/jsx-runtime";
5
+ var { Fill, Slot } = createSlotFill("PluginPrePublishPanel");
6
+ var PluginPrePublishPanel = ({
6
7
  children,
7
8
  className,
8
9
  title,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/plugin-pre-publish-panel/index.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelBody } from '@wordpress/components';\nimport { usePluginContext } from '@wordpress/plugins';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPrePublishPanel' );\n\n/**\n * Renders provided content to the pre-publish side panel in the publish flow\n * (side panel that opens when a user first pushes \"Publish\" from the main editor).\n *\n * @param {Object} props Component props.\n * @param {string} [props.className] An optional class name added to the panel.\n * @param {string} [props.title] Title displayed at the top of the panel.\n * @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened.\n * When no title is provided it is always opened.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/)\n * icon slug string, or an SVG WP element, to be rendered when\n * the sidebar is pinned to toolbar. If `false` is passed, no icon will be rendered.\n * @param {React.ReactNode} props.children Children to be rendered\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPrePublishPanel } from '@wordpress/editor';\n *\n * const MyPluginPrePublishPanel = () => (\n * \t<PluginPrePublishPanel\n * \t\tclassName=\"my-plugin-pre-publish-panel\"\n * \t\ttitle={ __( 'My panel title' ) }\n * \t\tinitialOpen={ true }\n * \t>\n * \t { __( 'My panel content' ) }\n * \t</PluginPrePublishPanel>\n * );\n * ```\n *\n * @return {React.ReactNode} The rendered component.\n */\nconst PluginPrePublishPanel = ( {\n\tchildren,\n\tclassName,\n\ttitle,\n\tinitialOpen = false,\n\ticon,\n} ) => {\n\tconst { icon: pluginIcon } = usePluginContext();\n\n\treturn (\n\t\t<Fill>\n\t\t\t<PanelBody\n\t\t\t\tclassName={ className }\n\t\t\t\tinitialOpen={ initialOpen || ! title }\n\t\t\t\ttitle={ title }\n\t\t\t\ticon={ icon ?? pluginIcon }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</PanelBody>\n\t\t</Fill>\n\t);\n};\n\nPluginPrePublishPanel.Slot = Slot;\n\nexport default PluginPrePublishPanel;\n"],
5
- "mappings": "AAoDG;AAjDH,SAAS,gBAAgB,iBAAiB;AAC1C,SAAS,wBAAwB;AAEjC,MAAM,EAAE,MAAM,KAAK,IAAI,eAAgB,uBAAwB;AAmC/D,MAAM,wBAAwB,CAAE;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd;AACD,MAAO;AACN,QAAM,EAAE,MAAM,WAAW,IAAI,iBAAiB;AAE9C,SACC,oBAAC,QACA;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,aAAc,eAAe,CAAE;AAAA,MAC/B;AAAA,MACA,MAAO,QAAQ;AAAA,MAEb;AAAA;AAAA,EACH,GACD;AAEF;AAEA,sBAAsB,OAAO;AAE7B,IAAO,mCAAQ;",
5
+ "mappings": ";AAGA,SAAS,gBAAgB,iBAAiB;AAC1C,SAAS,wBAAwB;AAgD9B;AA9CH,IAAM,EAAE,MAAM,KAAK,IAAI,eAAgB,uBAAwB;AAmC/D,IAAM,wBAAwB,CAAE;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd;AACD,MAAO;AACN,QAAM,EAAE,MAAM,WAAW,IAAI,iBAAiB;AAE9C,SACC,oBAAC,QACA;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,aAAc,eAAe,CAAE;AAAA,MAC/B;AAAA,MACA,MAAO,QAAQ;AAAA,MAEb;AAAA;AAAA,EACH,GACD;AAEF;AAEA,sBAAsB,OAAO;AAE7B,IAAO,mCAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,8 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ // packages/editor/src/components/plugin-preview-menu-item/index.js
2
2
  import { MenuItem } from "@wordpress/components";
3
3
  import { usePluginContext } from "@wordpress/plugins";
4
4
  import { ActionItem } from "@wordpress/interface";
5
+ import { jsx } from "react/jsx-runtime";
5
6
  function PluginPreviewMenuItem(props) {
6
7
  const context = usePluginContext();
7
8
  return /* @__PURE__ */ jsx(
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/plugin-preview-menu-item/index.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { usePluginContext } from '@wordpress/plugins';\nimport { ActionItem } from '@wordpress/interface';\n\n/**\n * Renders a menu item in the Preview dropdown, which can be used as a button or link depending on the props provided.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component properties.\n * @param {React.ReactNode} [props.children] Children to be rendered.\n * @param {string} [props.href] When `href` is provided, the menu item is rendered as an anchor instead of a button. It corresponds to the `href` attribute of the anchor.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The icon to be rendered to the left of the menu item label. Can be a Dashicon slug or an SVG WP element.\n * @param {Function} [props.onClick] The callback function to be executed when the user clicks the menu item.\n * @param {...*} [props.other] Any additional props are passed through to the underlying MenuItem component.\n *\n * @example\n * ```jsx\n * import { __ } from '@wordpress/i18n';\n * import { PluginPreviewMenuItem } from '@wordpress/editor';\n * import { external } from '@wordpress/icons';\n *\n * function onPreviewClick() {\n * // Handle preview action\n * }\n *\n * const ExternalPreviewMenuItem = () => (\n * <PluginPreviewMenuItem\n * icon={ external }\n * onClick={ onPreviewClick }\n * >\n * { __( 'Preview in new tab' ) }\n * </PluginPreviewMenuItem>\n * );\n * registerPlugin( 'external-preview-menu-item', {\n * render: ExternalPreviewMenuItem,\n * } );\n * ```\n *\n * @return {React.ReactNode} The rendered menu item component.\n */\nexport default function PluginPreviewMenuItem( props ) {\n\tconst context = usePluginContext();\n\treturn (\n\t\t<ActionItem\n\t\t\tname=\"core/plugin-preview-menu\"\n\t\t\tas={ props.as ?? MenuItem }\n\t\t\ticon={ props.icon || context.icon }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],
5
- "mappings": "AA8CE;AA3CF,SAAS,gBAAgB;AACzB,SAAS,wBAAwB;AACjC,SAAS,kBAAkB;AAsCZ,SAAR,sBAAwC,OAAQ;AACtD,QAAM,UAAU,iBAAiB;AACjC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,MAAK;AAAA,MACL,IAAK,MAAM,MAAM;AAAA,MACjB,MAAO,MAAM,QAAQ,QAAQ;AAAA,MAC3B,GAAG;AAAA;AAAA,EACN;AAEF;",
5
+ "mappings": ";AAGA,SAAS,gBAAgB;AACzB,SAAS,wBAAwB;AACjC,SAAS,kBAAkB;AAyCzB;AAHa,SAAR,sBAAwC,OAAQ;AACtD,QAAM,UAAU,iBAAiB;AACjC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,MAAK;AAAA,MACL,IAAK,MAAM,MAAM;AAAA,MACjB,MAAO,MAAM,QAAQ,QAAQ;AAAA,MAC3B,GAAG;AAAA;AAAA,EACN;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,6 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ // packages/editor/src/components/plugin-sidebar/index.js
2
2
  import { ComplementaryArea } from "@wordpress/interface";
3
+ import { jsx } from "react/jsx-runtime";
3
4
  function PluginSidebar({ className, ...props }) {
4
5
  return /* @__PURE__ */ jsx(
5
6
  ComplementaryArea,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/plugin-sidebar/index.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { ComplementaryArea } from '@wordpress/interface';\n\n/**\n * Renders a sidebar when activated. The contents within the `PluginSidebar` will appear as content within the sidebar.\n * It also automatically renders a corresponding `PluginSidebarMenuItem` component when `isPinnable` flag is set to `true`.\n * If you wish to display the sidebar, you can with use the `PluginSidebarMoreMenuItem` component or the `wp.data.dispatch` API:\n *\n * ```js\n * wp.data.dispatch( 'core/edit-post' ).openGeneralSidebar( 'plugin-name/sidebar-name' );\n * ```\n *\n * @see PluginSidebarMoreMenuItem\n *\n * @param {Object} props Element props.\n * @param {string} props.name A string identifying the sidebar. Must be unique for every sidebar registered within the scope of your plugin.\n * @param {React.ReactNode} [props.children] Children to be rendered.\n * @param {string} [props.className] An optional class name added to the sidebar body.\n * @param {string} props.title Title displayed at the top of the sidebar.\n * @param {boolean} [props.isPinnable=true] Whether to allow to pin sidebar to the toolbar. When set to `true` it also automatically renders a corresponding menu item.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var el = React.createElement;\n * var PanelBody = wp.components.PanelBody;\n * var PluginSidebar = wp.editor.PluginSidebar;\n * var moreIcon = React.createElement( 'svg' ); //... svg element.\n *\n * function MyPluginSidebar() {\n * \treturn el(\n * \t\t\tPluginSidebar,\n * \t\t\t{\n * \t\t\t\tname: 'my-sidebar',\n * \t\t\t\ttitle: 'My sidebar title',\n * \t\t\t\ticon: moreIcon,\n * \t\t\t},\n * \t\t\tel(\n * \t\t\t\tPanelBody,\n * \t\t\t\t{},\n * \t\t\t\t__( 'My sidebar content' )\n * \t\t\t)\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PanelBody } from '@wordpress/components';\n * import { PluginSidebar } from '@wordpress/editor';\n * import { more } from '@wordpress/icons';\n *\n * const MyPluginSidebar = () => (\n * \t<PluginSidebar\n * \t\tname=\"my-sidebar\"\n * \t\ttitle=\"My sidebar title\"\n * \t\ticon={ more }\n * \t>\n * \t\t<PanelBody>\n * \t\t\t{ __( 'My sidebar content' ) }\n * \t\t</PanelBody>\n * \t</PluginSidebar>\n * );\n * ```\n */\nexport default function PluginSidebar( { className, ...props } ) {\n\treturn (\n\t\t<ComplementaryArea\n\t\t\tpanelClassName={ className }\n\t\t\tclassName=\"editor-sidebar\"\n\t\t\tscope=\"core\"\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],
5
- "mappings": "AAyEE;AAtEF,SAAS,yBAAyB;AAoEnB,SAAR,cAAgC,EAAE,WAAW,GAAG,MAAM,GAAI;AAChE,SACC;AAAA,IAAC;AAAA;AAAA,MACA,gBAAiB;AAAA,MACjB,WAAU;AAAA,MACV,OAAM;AAAA,MACJ,GAAG;AAAA;AAAA,EACN;AAEF;",
5
+ "mappings": ";AAGA,SAAS,yBAAyB;AAsEhC;AAFa,SAAR,cAAgC,EAAE,WAAW,GAAG,MAAM,GAAI;AAChE,SACC;AAAA,IAAC;AAAA;AAAA,MACA,gBAAiB;AAAA,MACjB,WAAU;AAAA,MACV,OAAM;AAAA,MACJ,GAAG;AAAA;AAAA,EACN;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,6 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ // packages/editor/src/components/plugin-sidebar-more-menu-item/index.js
2
2
  import { ComplementaryAreaMoreMenuItem } from "@wordpress/interface";
3
+ import { jsx } from "react/jsx-runtime";
3
4
  function PluginSidebarMoreMenuItem(props) {
4
5
  return /* @__PURE__ */ jsx(
5
6
  ComplementaryAreaMoreMenuItem,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/plugin-sidebar-more-menu-item/index.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { ComplementaryAreaMoreMenuItem } from '@wordpress/interface';\n\n/**\n * Renders a menu item in `Plugins` group in `More Menu` drop down,\n * and can be used to activate the corresponding `PluginSidebar` component.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component props.\n * @param {string} props.target A string identifying the target sidebar you wish to be activated by this menu item. Must be the same as the `name` prop you have given to that sidebar.\n * @param {React.ReactNode} [props.children] Children to be rendered.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginSidebarMoreMenuItem = wp.editor.PluginSidebarMoreMenuItem;\n * var moreIcon = React.createElement( 'svg' ); //... svg element.\n *\n * function MySidebarMoreMenuItem() {\n * \treturn React.createElement(\n * \t\tPluginSidebarMoreMenuItem,\n * \t\t{\n * \t\t\ttarget: 'my-sidebar',\n * \t\t\ticon: moreIcon,\n * \t\t},\n * \t\t__( 'My sidebar title' )\n * \t)\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginSidebarMoreMenuItem } from '@wordpress/editor';\n * import { more } from '@wordpress/icons';\n *\n * const MySidebarMoreMenuItem = () => (\n * \t<PluginSidebarMoreMenuItem\n * \t\ttarget=\"my-sidebar\"\n * \t\ticon={ more }\n * \t>\n * \t\t{ __( 'My sidebar title' ) }\n * \t</PluginSidebarMoreMenuItem>\n * );\n * ```\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PluginSidebarMoreMenuItem( props ) {\n\treturn (\n\t\t<ComplementaryAreaMoreMenuItem\n\t\t\t// Menu item is marked with unstable prop for backward compatibility.\n\t\t\t// @see https://github.com/WordPress/gutenberg/issues/14457\n\t\t\t__unstableExplicitMenuItem\n\t\t\tscope=\"core\"\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],
5
- "mappings": "AAuDE;AApDF,SAAS,qCAAqC;AAkD/B,SAAR,0BAA4C,OAAQ;AAC1D,SACC;AAAA,IAAC;AAAA;AAAA,MAGA,4BAA0B;AAAA,MAC1B,OAAM;AAAA,MACJ,GAAG;AAAA;AAAA,EACN;AAEF;",
5
+ "mappings": ";AAGA,SAAS,qCAAqC;AAoD5C;AAFa,SAAR,0BAA4C,OAAQ;AAC1D,SACC;AAAA,IAAC;AAAA;AAAA,MAGA,4BAA0B;AAAA,MAC1B,OAAM;AAAA,MACJ,GAAG;AAAA;AAAA,EACN;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ // packages/editor/src/components/post-actions/actions.js
2
2
  import { useDispatch, useSelect } from "@wordpress/data";
3
3
  import { useMemo, useEffect } from "@wordpress/element";
4
4
  import { store as coreStore } from "@wordpress/core-data";
@@ -6,6 +6,7 @@ import { store as editorStore } from "../../store";
6
6
  import { unlock } from "../../lock-unlock";
7
7
  import { useSetAsHomepageAction } from "./set-as-homepage";
8
8
  import { useSetAsPostsPageAction } from "./set-as-posts-page";
9
+ import { jsx } from "react/jsx-runtime";
9
10
  function usePostActions({ postType, onActionPerformed, context }) {
10
11
  const { defaultActions } = useSelect(
11
12
  (select) => {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-actions/actions.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useMemo, useEffect } 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';\nimport { useSetAsHomepageAction } from './set-as-homepage';\nimport { useSetAsPostsPageAction } from './set-as-posts-page';\n\nexport function usePostActions( { postType, onActionPerformed, context } ) {\n\tconst { defaultActions } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityActions } = unlock( select( editorStore ) );\n\t\t\treturn {\n\t\t\t\tdefaultActions: getEntityActions( 'postType', postType ),\n\t\t\t};\n\t\t},\n\t\t[ postType ]\n\t);\n\n\tconst shouldShowHomepageActions = useSelect(\n\t\t( select ) => {\n\t\t\tif ( postType !== 'page' ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst { getDefaultTemplateId, getEntityRecord, canUser } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst canUpdateSettings = canUser( 'update', {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t} );\n\n\t\t\tif ( ! canUpdateSettings ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Note that resolved template for `front-page` is not necessarily a\n\t\t\t// `front-page` template.\n\t\t\tconst frontPageTemplateId = getDefaultTemplateId( {\n\t\t\t\tslug: 'front-page',\n\t\t\t} );\n\n\t\t\tif ( ! frontPageTemplateId ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// This won't trigger a second network request, getDefaultTemplateId\n\t\t\t// will have received the whole template from the REST API.\n\t\t\tconst frontPageTemplate = getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_template',\n\t\t\t\tfrontPageTemplateId\n\t\t\t);\n\n\t\t\tif ( ! frontPageTemplate ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// When there is a front page template, the front page cannot be\n\t\t\t// changed. See\n\t\t\t// https://developer.wordpress.org/themes/basics/template-hierarchy/\n\t\t\treturn frontPageTemplate.slug !== 'front-page';\n\t\t},\n\t\t[ postType ]\n\t);\n\n\tconst setAsHomepageAction = useSetAsHomepageAction();\n\tconst setAsPostsPageAction = useSetAsPostsPageAction();\n\n\tconst { registerPostTypeSchema } = unlock( useDispatch( editorStore ) );\n\tuseEffect( () => {\n\t\tregisterPostTypeSchema( postType );\n\t}, [ registerPostTypeSchema, postType ] );\n\n\treturn useMemo( () => {\n\t\tlet actions = [ ...defaultActions ];\n\t\tif ( shouldShowHomepageActions ) {\n\t\t\tactions.push( setAsHomepageAction, setAsPostsPageAction );\n\t\t}\n\n\t\t// Ensure \"Move to trash\" is always the last action.\n\t\tactions = actions.sort( ( a, b ) =>\n\t\t\tb.id === 'move-to-trash' ? -1 : 0\n\t\t);\n\n\t\t// Filter actions based on provided context. If not provided\n\t\t// all actions are returned. We'll have a single entry for getting the actions\n\t\t// and the consumer should provide the context to filter the actions, if needed.\n\t\t// Actions should also provide the `context` they support, if it's specific, to\n\t\t// compare with the provided context to get all the actions.\n\t\t// Right now the only supported context is `list`.\n\t\tactions = actions.filter( ( action ) => {\n\t\t\tif ( ! action.context ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn action.context === context;\n\t\t} );\n\n\t\tif ( onActionPerformed ) {\n\t\t\tfor ( let i = 0; i < actions.length; ++i ) {\n\t\t\t\tif ( actions[ i ].callback ) {\n\t\t\t\t\tconst existingCallback = actions[ i ].callback;\n\t\t\t\t\tactions[ i ] = {\n\t\t\t\t\t\t...actions[ i ],\n\t\t\t\t\t\tcallback: ( items, argsObject ) => {\n\t\t\t\t\t\t\texistingCallback( items, {\n\t\t\t\t\t\t\t\t...argsObject,\n\t\t\t\t\t\t\t\tonActionPerformed: ( _items ) => {\n\t\t\t\t\t\t\t\t\tif ( argsObject?.onActionPerformed ) {\n\t\t\t\t\t\t\t\t\t\targsObject.onActionPerformed( _items );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonActionPerformed(\n\t\t\t\t\t\t\t\t\t\tactions[ i ].id,\n\t\t\t\t\t\t\t\t\t\t_items\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tif ( actions[ i ].RenderModal ) {\n\t\t\t\t\tconst ExistingRenderModal = actions[ i ].RenderModal;\n\t\t\t\t\tactions[ i ] = {\n\t\t\t\t\t\t...actions[ i ],\n\t\t\t\t\t\tRenderModal: ( props ) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<ExistingRenderModal\n\t\t\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\t\t\tonActionPerformed={ ( _items ) => {\n\t\t\t\t\t\t\t\t\t\tif ( props.onActionPerformed ) {\n\t\t\t\t\t\t\t\t\t\t\tprops.onActionPerformed( _items );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonActionPerformed(\n\t\t\t\t\t\t\t\t\t\t\tactions[ i ].id,\n\t\t\t\t\t\t\t\t\t\t\t_items\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/>\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}\n\t\t\t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AAA,YACH;AAAA,UACD;AAAA,QACD;AACA,YAAK,QAAS,CAAE,EAAE,aAAc;AAC/B,gBAAM,sBAAsB,QAAS,CAAE,EAAE;AACzC,kBAAS,CAAE,IAAI;AAAA,YACd,GAAG,QAAS,CAAE;AAAA,YACd,aAAa,CAAE,UAAW;AACzB,qBACC;AAAA,gBAAC;AAAA;AAAA,kBACE,GAAG;AAAA,kBACL,mBAAoB,CAAE,WAAY;AACjC,wBAAK,MAAM,mBAAoB;AAC9B,4BAAM,kBAAmB,MAAO;AAAA,oBACjC;AACA;AAAA,sBACC,QAAS,CAAE,EAAE;AAAA,sBACb;AAAA,oBACD;AAAA,kBACD;AAAA;AAAA,cACD;AAAA,YAEF;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAEA,WAAO;AAAA,EACR,GAAG;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,CAAE;AACH;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
1
+ // packages/editor/src/components/post-actions/index.js
2
2
  import { useRegistry, useSelect } from "@wordpress/data";
3
3
  import { useState, useMemo } from "@wordpress/element";
4
4
  import { __ } from "@wordpress/i18n";
@@ -11,7 +11,8 @@ import { moreVertical } from "@wordpress/icons";
11
11
  import { store as coreStore } from "@wordpress/core-data";
12
12
  import { unlock } from "../../lock-unlock";
13
13
  import { usePostActions } from "./actions";
14
- const { Menu, kebabCase } = unlock(componentsPrivateApis);
14
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
+ var { Menu, kebabCase } = unlock(componentsPrivateApis);
15
16
  function PostActions({ postType, postId, onActionPerformed }) {
16
17
  const [activeModalAction, setActiveModalAction] = useState(null);
17
18
  const { item, permissions } = useSelect(
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-actions/index.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useRegistry, useSelect } from '@wordpress/data';\nimport { useState, useMemo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tprivateApis as componentsPrivateApis,\n\tButton,\n\tModal,\n} from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { usePostActions } from './actions';\n\nconst { Menu, kebabCase } = unlock( componentsPrivateApis );\n\nexport default function PostActions( { postType, postId, onActionPerformed } ) {\n\tconst [ activeModalAction, setActiveModalAction ] = useState( null );\n\n\tconst { item, permissions } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord, getEntityRecordPermissions } =\n\t\t\t\tunlock( select( coreStore ) );\n\t\t\treturn {\n\t\t\t\titem: getEditedEntityRecord( 'postType', postType, postId ),\n\t\t\t\tpermissions: getEntityRecordPermissions(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ postId, postType ]\n\t);\n\tconst itemWithPermissions = useMemo( () => {\n\t\treturn {\n\t\t\t...item,\n\t\t\tpermissions,\n\t\t};\n\t}, [ item, permissions ] );\n\tconst allActions = usePostActions( { postType, onActionPerformed } );\n\n\tconst actions = useMemo( () => {\n\t\treturn allActions.filter( ( action ) => {\n\t\t\treturn (\n\t\t\t\t! action.isEligible || action.isEligible( itemWithPermissions )\n\t\t\t);\n\t\t} );\n\t}, [ allActions, itemWithPermissions ] );\n\n\treturn (\n\t\t<>\n\t\t\t<Menu placement=\"bottom-end\">\n\t\t\t\t<Menu.TriggerButton\n\t\t\t\t\trender={\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\t\t\t\tdisabled={ ! actions.length }\n\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\tclassName=\"editor-all-actions-button\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<Menu.Popover>\n\t\t\t\t\t<ActionsDropdownMenuGroup\n\t\t\t\t\t\tactions={ actions }\n\t\t\t\t\t\titems={ [ itemWithPermissions ] }\n\t\t\t\t\t\tsetActiveModalAction={ setActiveModalAction }\n\t\t\t\t\t/>\n\t\t\t\t</Menu.Popover>\n\t\t\t</Menu>\n\t\t\t{ !! activeModalAction && (\n\t\t\t\t<ActionModal\n\t\t\t\t\taction={ activeModalAction }\n\t\t\t\t\titems={ [ itemWithPermissions ] }\n\t\t\t\t\tcloseModal={ () => setActiveModalAction( null ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\n// From now on all the functions on this file are copied as from the dataviews packages,\n// The editor packages should not be using the dataviews packages directly,\n// and the dataviews package should not be using the editor packages directly,\n// so duplicating the code here seems like the least bad option.\n\nfunction DropdownMenuItemTrigger( { action, onClick, items } ) {\n\tconst label =\n\t\ttypeof action.label === 'string' ? action.label : action.label( items );\n\treturn (\n\t\t<Menu.Item onClick={ onClick }>\n\t\t\t<Menu.ItemLabel>{ label }</Menu.ItemLabel>\n\t\t</Menu.Item>\n\t);\n}\n\nexport function ActionModal( { action, items, closeModal } ) {\n\tconst label =\n\t\ttypeof action.label === 'string' ? action.label : action.label( items );\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ action.modalHeader || label }\n\t\t\t__experimentalHideHeader={ !! action.hideModalHeader }\n\t\t\tonRequestClose={ closeModal ?? ( () => {} ) }\n\t\t\tfocusOnMount=\"firstContentElement\"\n\t\t\tsize=\"medium\"\n\t\t\toverlayClassName={ `editor-action-modal editor-action-modal__${ kebabCase(\n\t\t\t\taction.id\n\t\t\t) }` }\n\t\t>\n\t\t\t<action.RenderModal items={ items } closeModal={ closeModal } />\n\t\t</Modal>\n\t);\n}\n\nfunction ActionsDropdownMenuGroup( { actions, items, setActiveModalAction } ) {\n\tconst registry = useRegistry();\n\treturn (\n\t\t<Menu.Group>\n\t\t\t{ actions.map( ( action ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<DropdownMenuItemTrigger\n\t\t\t\t\t\tkey={ action.id }\n\t\t\t\t\t\taction={ action }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tif ( 'RenderModal' in action ) {\n\t\t\t\t\t\t\t\tsetActiveModalAction( action );\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taction.callback( items, { registry } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\titems={ items }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Menu.Group>\n\t);\n}\n"],
5
- "mappings": "AAyDE,mBAII,KAHH,YADD;AAtDF,SAAS,aAAa,iBAAiB;AACvC,SAAS,UAAU,eAAe;AAClC,SAAS,UAAU;AACnB;AAAA,EACC,eAAe;AAAA,EACf;AAAA,EACA;AAAA,OACM;AACP,SAAS,oBAAoB;AAC7B,SAAS,SAAS,iBAAiB;AAKnC,SAAS,cAAc;AACvB,SAAS,sBAAsB;AAE/B,MAAM,EAAE,MAAM,UAAU,IAAI,OAAQ,qBAAsB;AAE3C,SAAR,YAA8B,EAAE,UAAU,QAAQ,kBAAkB,GAAI;AAC9E,QAAM,CAAE,mBAAmB,oBAAqB,IAAI,SAAU,IAAK;AAEnE,QAAM,EAAE,MAAM,YAAY,IAAI;AAAA,IAC7B,CAAE,WAAY;AACb,YAAM,EAAE,uBAAuB,2BAA2B,IACzD,OAAQ,OAAQ,SAAU,CAAE;AAC7B,aAAO;AAAA,QACN,MAAM,sBAAuB,YAAY,UAAU,MAAO;AAAA,QAC1D,aAAa;AAAA,UACZ;AAAA,UACA;AAAA,UACA;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,IACA,CAAE,QAAQ,QAAS;AAAA,EACpB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AAEF;AAOA,SAAS,wBAAyB,EAAE,QAAQ,SAAS,MAAM,GAAI;AAC9D,QAAM,QACL,OAAO,OAAO,UAAU,WAAW,OAAO,QAAQ,OAAO,MAAO,KAAM;AACvE,SACC,oBAAC,KAAK,MAAL,EAAU,SACV,8BAAC,KAAK,WAAL,EAAiB,iBAAO,GAC1B;AAEF;AAEO,SAAS,YAAa,EAAE,QAAQ,OAAO,WAAW,GAAI;AAC5D,QAAM,QACL,OAAO,OAAO,UAAU,WAAW,OAAO,QAAQ,OAAO,MAAO,KAAM;AACvE,SACC;AAAA,IAAC;AAAA;AAAA,MACA,OAAQ,OAAO,eAAe;AAAA,MAC9B,0BAA2B,CAAC,CAAE,OAAO;AAAA,MACrC,gBAAiB,eAAgB,MAAM;AAAA,MAAC;AAAA,MACxC,cAAa;AAAA,MACb,MAAK;AAAA,MACL,kBAAmB,4CAA6C;AAAA,QAC/D,OAAO;AAAA,MACR,CAAE;AAAA,MAEF,8BAAC,OAAO,aAAP,EAAmB,OAAgB,YAA0B;AAAA;AAAA,EAC/D;AAEF;AAEA,SAAS,yBAA0B,EAAE,SAAS,OAAO,qBAAqB,GAAI;AAC7E,QAAM,WAAW,YAAY;AAC7B,SACC,oBAAC,KAAK,OAAL,EACE,kBAAQ,IAAK,CAAE,WAAY;AAC5B,WACC;AAAA,MAAC;AAAA;AAAA,QAEA;AAAA,QACA,SAAU,MAAM;AACf,cAAK,iBAAiB,QAAS;AAC9B,iCAAsB,MAAO;AAC7B;AAAA,UACD;AACA,iBAAO,SAAU,OAAO,EAAE,SAAS,CAAE;AAAA,QACtC;AAAA,QACA;AAAA;AAAA,MATM,OAAO;AAAA,IAUd;AAAA,EAEF,CAAE,GACH;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ // packages/editor/src/components/post-actions/set-as-homepage.js
2
2
  import { __, sprintf } from "@wordpress/i18n";
3
3
  import { useMemo } from "@wordpress/element";
4
4
  import {
@@ -11,7 +11,8 @@ import { useDispatch, useSelect } from "@wordpress/data";
11
11
  import { store as coreStore } from "@wordpress/core-data";
12
12
  import { store as noticesStore } from "@wordpress/notices";
13
13
  import { getItemTitle } from "../../utils/get-item-title";
14
- const SetAsHomepageModal = ({ items, closeModal }) => {
14
+ import { jsx, jsxs } from "react/jsx-runtime";
15
+ var SetAsHomepageModal = ({ items, closeModal }) => {
15
16
  const [item] = items;
16
17
  const pageTitle = getItemTitle(item);
17
18
  const { showOnFront, currentHomePage, isSaving } = useSelect(
@@ -98,7 +99,7 @@ const SetAsHomepageModal = ({ items, closeModal }) => {
98
99
  ] })
99
100
  ] }) });
100
101
  };
101
- const useSetAsHomepageAction = () => {
102
+ var useSetAsHomepageAction = () => {
102
103
  const { pageOnFront, pageForPosts } = useSelect((select) => {
103
104
  const { getEntityRecord, canUser } = select(coreStore);
104
105
  const siteSettings = canUser("read", {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-actions/set-as-homepage.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useMemo } from '@wordpress/element';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { getItemTitle } from '../../utils/get-item-title';\n\nconst SetAsHomepageModal = ( { items, closeModal } ) => {\n\tconst [ item ] = items;\n\tconst pageTitle = getItemTitle( item );\n\tconst { showOnFront, currentHomePage, isSaving } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, isSavingEntityRecord } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteSettings = getEntityRecord( 'root', 'site' );\n\t\t\tconst currentHomePageItem = getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'page',\n\t\t\t\tsiteSettings?.page_on_front\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tshowOnFront: siteSettings?.show_on_front,\n\t\t\t\tcurrentHomePage: currentHomePageItem,\n\t\t\t\tisSaving: isSavingEntityRecord( 'root', 'site' ),\n\t\t\t};\n\t\t}\n\t);\n\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tasync function onSetPageAsHomepage( event ) {\n\t\tevent.preventDefault();\n\n\t\ttry {\n\t\t\tawait saveEntityRecord( 'root', 'site', {\n\t\t\t\tpage_on_front: item.id,\n\t\t\t\tshow_on_front: 'page',\n\t\t\t} );\n\n\t\t\tcreateSuccessNotice( __( 'Homepage updated.' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'An error occurred while setting the homepage.' );\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t} finally {\n\t\t\tcloseModal?.();\n\t\t}\n\t}\n\n\tlet modalWarning = '';\n\tif ( 'posts' === showOnFront ) {\n\t\tmodalWarning = __(\n\t\t\t'This will replace the current homepage which is set to display latest posts.'\n\t\t);\n\t} else if ( currentHomePage ) {\n\t\tmodalWarning = sprintf(\n\t\t\t// translators: %s: title of the current home page.\n\t\t\t__( 'This will replace the current homepage: \"%s\"' ),\n\t\t\tgetItemTitle( currentHomePage )\n\t\t);\n\t}\n\n\tconst modalText = sprintf(\n\t\t// translators: %1$s: title of the page to be set as the homepage, %2$s: homepage replacement warning message.\n\t\t__( 'Set \"%1$s\" as the site homepage? %2$s' ),\n\t\tpageTitle,\n\t\tmodalWarning\n\t).trim();\n\n\t// translators: Button label to confirm setting the specified page as the homepage.\n\tconst modalButtonLabel = __( 'Set homepage' );\n\n\treturn (\n\t\t<form onSubmit={ onSetPageAsHomepage }>\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<Text>{ modalText }</Text>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tdisabled={ isSaving }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\tdisabled={ isSaving }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ modalButtonLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t</form>\n\t);\n};\n\nexport const useSetAsHomepageAction = () => {\n\tconst { pageOnFront, pageForPosts } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, canUser } = select( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\t\treturn {\n\t\t\tpageOnFront: siteSettings?.page_on_front,\n\t\t\tpageForPosts: siteSettings?.page_for_posts,\n\t\t};\n\t} );\n\n\treturn useMemo(\n\t\t() => ( {\n\t\t\tid: 'set-as-homepage',\n\t\t\tlabel: __( 'Set as homepage' ),\n\t\t\tisEligible( post ) {\n\t\t\t\tif ( post.status !== 'publish' ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif ( post.type !== 'page' ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Don't show the action if the page is already set as the homepage.\n\t\t\t\tif ( pageOnFront === post.id ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Don't show the action if the page is already set as the page for posts.\n\t\t\t\tif ( pageForPosts === post.id ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tmodalFocusOnMount: 'firstContentElement',\n\t\t\tRenderModal: SetAsHomepageModal,\n\t\t} ),\n\t\t[ pageForPosts, pageOnFront ]\n\t);\n};\n"],
5
- "mappings": "AA8FI,cACA,YADA;AA3FJ,SAAS,IAAI,eAAe;AAC5B,SAAS,eAAe;AACxB;AAAA,EACC;AAAA,EACA,sBAAsB;AAAA,EACtB,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,OAClB;AACP,SAAS,aAAa,iBAAiB;AACvC,SAAS,SAAS,iBAAiB;AACnC,SAAS,SAAS,oBAAoB;AAKtC,SAAS,oBAAoB;AAE7B,MAAM,qBAAqB,CAAE,EAAE,OAAO,WAAW,MAAO;AACvD,QAAM,CAAE,IAAK,IAAI;AACjB,QAAM,YAAY,aAAc,IAAK;AACrC,QAAM,EAAE,aAAa,iBAAiB,SAAS,IAAI;AAAA,IAClD,CAAE,WAAY;AACb,YAAM,EAAE,iBAAiB,qBAAqB,IAC7C,OAAQ,SAAU;AACnB,YAAM,eAAe,gBAAiB,QAAQ,MAAO;AACrD,YAAM,sBAAsB;AAAA,QAC3B;AAAA,QACA;AAAA,QACA,cAAc;AAAA,MACf;AACA,aAAO;AAAA,QACN,aAAa,cAAc;AAAA,QAC3B,iBAAiB;AAAA,QACjB,UAAU,qBAAsB,QAAQ,MAAO;AAAA,MAChD;AAAA,IACD;AAAA,EACD;AAEA,QAAM,EAAE,iBAAiB,IAAI,YAAa,SAAU;AACpD,QAAM,EAAE,qBAAqB,kBAAkB,IAC9C,YAAa,YAAa;AAE3B,iBAAe,oBAAqB,OAAQ;AA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
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ // packages/editor/src/components/post-actions/set-as-posts-page.js
2
2
  import { __, sprintf } from "@wordpress/i18n";
3
3
  import { useMemo } from "@wordpress/element";
4
4
  import {
@@ -11,7 +11,8 @@ import { useDispatch, useSelect } from "@wordpress/data";
11
11
  import { store as coreStore } from "@wordpress/core-data";
12
12
  import { store as noticesStore } from "@wordpress/notices";
13
13
  import { getItemTitle } from "../../utils/get-item-title";
14
- const SetAsPostsPageModal = ({ items, closeModal }) => {
14
+ import { jsx, jsxs } from "react/jsx-runtime";
15
+ var SetAsPostsPageModal = ({ items, closeModal }) => {
15
16
  const [item] = items;
16
17
  const pageTitle = getItemTitle(item);
17
18
  const { currentPostsPage, isPageForPostsSet, isSaving } = useSelect(
@@ -91,7 +92,7 @@ const SetAsPostsPageModal = ({ items, closeModal }) => {
91
92
  ] })
92
93
  ] }) });
93
94
  };
94
- const useSetAsPostsPageAction = () => {
95
+ var useSetAsPostsPageAction = () => {
95
96
  const { pageOnFront, pageForPosts } = useSelect((select) => {
96
97
  const { getEntityRecord, canUser } = select(coreStore);
97
98
  const siteSettings = canUser("read", {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-actions/set-as-posts-page.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useMemo } from '@wordpress/element';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { getItemTitle } from '../../utils/get-item-title';\n\nconst SetAsPostsPageModal = ( { items, closeModal } ) => {\n\tconst [ item ] = items;\n\tconst pageTitle = getItemTitle( item );\n\tconst { currentPostsPage, isPageForPostsSet, isSaving } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, isSavingEntityRecord } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteSettings = getEntityRecord( 'root', 'site' );\n\t\t\tconst currentPostsPageItem = getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'page',\n\t\t\t\tsiteSettings?.page_for_posts\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tcurrentPostsPage: currentPostsPageItem,\n\t\t\t\tisPageForPostsSet: siteSettings?.page_for_posts !== 0,\n\t\t\t\tisSaving: isSavingEntityRecord( 'root', 'site' ),\n\t\t\t};\n\t\t}\n\t);\n\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tasync function onSetPageAsPostsPage( event ) {\n\t\tevent.preventDefault();\n\n\t\ttry {\n\t\t\tawait saveEntityRecord( 'root', 'site', {\n\t\t\t\tpage_for_posts: item.id,\n\t\t\t\tshow_on_front: 'page',\n\t\t\t} );\n\n\t\t\tcreateSuccessNotice( __( 'Posts page updated.' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'An error occurred while setting the posts page.' );\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t} finally {\n\t\t\tcloseModal?.();\n\t\t}\n\t}\n\n\tconst modalWarning =\n\t\tisPageForPostsSet && currentPostsPage\n\t\t\t? sprintf(\n\t\t\t\t\t// translators: %s: title of the current posts page.\n\t\t\t\t\t__( 'This will replace the current posts page: \"%s\"' ),\n\t\t\t\t\tgetItemTitle( currentPostsPage )\n\t\t\t )\n\t\t\t: __( 'This page will show the latest posts.' );\n\n\tconst modalText = sprintf(\n\t\t// translators: %1$s: title of the page to be set as the posts page, %2$s: posts page replacement warning message.\n\t\t__( 'Set \"%1$s\" as the posts page? %2$s' ),\n\t\tpageTitle,\n\t\tmodalWarning\n\t);\n\n\t// translators: Button label to confirm setting the specified page as the posts page.\n\tconst modalButtonLabel = __( 'Set posts page' );\n\n\treturn (\n\t\t<form onSubmit={ onSetPageAsPostsPage }>\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<Text>{ modalText }</Text>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tdisabled={ isSaving }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\tdisabled={ isSaving }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ modalButtonLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t</form>\n\t);\n};\n\nexport const useSetAsPostsPageAction = () => {\n\tconst { pageOnFront, pageForPosts } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, canUser } = select( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tpageOnFront: siteSettings?.page_on_front,\n\t\t\tpageForPosts: siteSettings?.page_for_posts,\n\t\t};\n\t} );\n\n\treturn useMemo(\n\t\t() => ( {\n\t\t\tid: 'set-as-posts-page',\n\t\t\tlabel: __( 'Set as posts page' ),\n\t\t\tisEligible( post ) {\n\t\t\t\tif ( post.status !== 'publish' ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif ( post.type !== 'page' ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Don't show the action if the page is already set as the homepage.\n\t\t\t\tif ( pageOnFront === post.id ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Don't show the action if the page is already set as the page for posts.\n\t\t\t\tif ( pageForPosts === post.id ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tmodalFocusOnMount: 'firstContentElement',\n\t\t\tRenderModal: SetAsPostsPageModal,\n\t\t} ),\n\t\t[ pageForPosts, pageOnFront ]\n\t);\n};\n"],
5
- "mappings": "AA0FI,cACA,YADA;AAvFJ,SAAS,IAAI,eAAe;AAC5B,SAAS,eAAe;AACxB;AAAA,EACC;AAAA,EACA,sBAAsB;AAAA,EACtB,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,OAClB;AACP,SAAS,aAAa,iBAAiB;AACvC,SAAS,SAAS,iBAAiB;AACnC,SAAS,SAAS,oBAAoB;AAKtC,SAAS,oBAAoB;AAE7B,MAAM,sBAAsB,CAAE,EAAE,OAAO,WAAW,MAAO;AACxD,QAAM,CAAE,IAAK,IAAI;AACjB,QAAM,YAAY,aAAc,IAAK;AACrC,QAAM,EAAE,kBAAkB,mBAAmB,SAAS,IAAI;AAAA,IACzD,CAAE,WAAY;AACb,YAAM,EAAE,iBAAiB,qBAAqB,IAC7C,OAAQ,SAAU;AACnB,YAAM,eAAe,gBAAiB,QAAQ,MAAO;AACrD,YAAM,uBAAuB;AAAA,QAC5B;AAAA,QACA;AAAA,QACA,cAAc;AAAA,MACf;AACA,aAAO;AAAA,QACN,kBAAkB;AAAA,QAClB,mBAAmB,cAAc,mBAAmB;AAAA,QACpD,UAAU,qBAAsB,QAAQ,MAAO;AAAA,MAChD;AAAA,IACD;AAAA,E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x-runtime";
1
+ // packages/editor/src/components/post-author/check.js
2
2
  import { useSelect } from "@wordpress/data";
3
3
  import PostTypeSupportCheck from "../post-type-support-check";
4
4
  import { store as editorStore } from "../../store";
5
+ import { jsx } from "react/jsx-runtime";
5
6
  function PostAuthorCheck({ children }) {
6
7
  const { hasAssignAuthorAction } = useSelect((select) => {
7
8
  const post = select(editorStore).getCurrentPost();
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-author/check.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\n\n/**\n * Wrapper component that renders its children only if the post type supports the author.\n *\n * @param {Object} props The component props.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @return {React.ReactNode} The component to be rendered. Return `null` if the post type doesn't\n * supports the author or if there are no authors available.\n */\nexport default function PostAuthorCheck( { children } ) {\n\tconst { hasAssignAuthorAction } = useSelect( ( select ) => {\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\tconst canAssignAuthor = post?._links?.[ 'wp:action-assign-author' ]\n\t\t\t? true\n\t\t\t: false;\n\t\treturn {\n\t\t\thasAssignAuthorAction: canAssignAuthor,\n\t\t};\n\t}, [] );\n\n\tif ( ! hasAssignAuthorAction ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"author\">\n\t\t\t{ children }\n\t\t</PostTypeSupportCheck>\n\t);\n}\n"],
5
- "mappings": "AAoCE;AAjCF,SAAS,iBAAiB;AAK1B,OAAO,0BAA0B;AACjC,SAAS,SAAS,mBAAmB;AAWtB,SAAR,gBAAkC,EAAE,SAAS,GAAI;AACvD,QAAM,EAAE,sBAAsB,IAAI,UAAW,CAAE,WAAY;AAC1D,UAAM,OAAO,OAAQ,WAAY,EAAE,eAAe;AAClD,UAAM,kBAAkB,MAAM,SAAU,yBAA0B,IAC/D,OACA;AACH,WAAO;AAAA,MACN,uBAAuB;AAAA,IACxB;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,MAAK,CAAE,uBAAwB;AAC9B,WAAO;AAAA,EACR;AAEA,SACC,oBAAC,wBAAqB,aAAY,UAC/B,UACH;AAEF;",
5
+ "mappings": ";AAGA,SAAS,iBAAiB;AAK1B,OAAO,0BAA0B;AACjC,SAAS,SAAS,mBAAmB;AA2BnC;AAhBa,SAAR,gBAAkC,EAAE,SAAS,GAAI;AACvD,QAAM,EAAE,sBAAsB,IAAI,UAAW,CAAE,WAAY;AAC1D,UAAM,OAAO,OAAQ,WAAY,EAAE,eAAe;AAClD,UAAM,kBAAkB,MAAM,SAAU,yBAA0B,IAC/D,OACA;AACH,WAAO;AAAA,MACN,uBAAuB;AAAA,IACxB;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,MAAK,CAAE,uBAAwB;AAC9B,WAAO;AAAA,EACR;AAEA,SACC,oBAAC,wBAAqB,aAAY,UAC/B,UACH;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ // packages/editor/src/components/post-author/combobox.js
2
2
  import { debounce } from "@wordpress/compose";
3
3
  import { useState } from "@wordpress/element";
4
4
  import { useDispatch } from "@wordpress/data";
@@ -6,6 +6,7 @@ import { __ } from "@wordpress/i18n";
6
6
  import { ComboboxControl } from "@wordpress/components";
7
7
  import { store as editorStore } from "../../store";
8
8
  import { useAuthorsQuery } from "./hook";
9
+ import { jsx } from "react/jsx-runtime";
9
10
  function PostAuthorCombobox() {
10
11
  const [fieldValue, setFieldValue] = useState();
11
12
  const { editPost } = useDispatch(editorStore);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-author/combobox.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { debounce } from '@wordpress/compose';\nimport { useState } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { ComboboxControl } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { useAuthorsQuery } from './hook';\n\nexport default function PostAuthorCombobox() {\n\tconst [ fieldValue, setFieldValue ] = useState();\n\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { authorId, authorOptions, isLoading } =\n\t\tuseAuthorsQuery( fieldValue );\n\n\t/**\n\t * Handle author selection.\n\t *\n\t * @param {number} postAuthorId The selected Author.\n\t */\n\tconst handleSelect = ( postAuthorId ) => {\n\t\tif ( ! postAuthorId ) {\n\t\t\treturn;\n\t\t}\n\t\teditPost( { author: postAuthorId } );\n\t};\n\n\treturn (\n\t\t<ComboboxControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\t__next40pxDefaultSize\n\t\t\tlabel={ __( 'Author' ) }\n\t\t\toptions={ authorOptions }\n\t\t\tvalue={ authorId }\n\t\t\tonFilterValueChange={ debounce( setFieldValue, 300 ) }\n\t\t\tonChange={ handleSelect }\n\t\t\tallowReset={ false }\n\t\t\thideLabelFromVision\n\t\t\tisLoading={ isLoading }\n\t\t/>\n\t);\n}\n"],
5
- "mappings": "AAmCE;AAhCF,SAAS,gBAAgB;AACzB,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B,SAAS,UAAU;AACnB,SAAS,uBAAuB;AAKhC,SAAS,SAAS,mBAAmB;AACrC,SAAS,uBAAuB;AAEjB,SAAR,qBAAsC;AAC5C,QAAM,CAAE,YAAY,aAAc,IAAI,SAAS;AAE/C,QAAM,EAAE,SAAS,IAAI,YAAa,WAAY;AAC9C,QAAM,EAAE,UAAU,eAAe,UAAU,IAC1C,gBAAiB,UAAW;AAO7B,QAAM,eAAe,CAAE,iBAAkB;AACxC,QAAK,CAAE,cAAe;AACrB;AAAA,IACD;AACA,aAAU,EAAE,QAAQ,aAAa,CAAE;AAAA,EACpC;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,yBAAuB;AAAA,MACvB,uBAAqB;AAAA,MACrB,OAAQ,GAAI,QAAS;AAAA,MACrB,SAAU;AAAA,MACV,OAAQ;AAAA,MACR,qBAAsB,SAAU,eAAe,GAAI;AAAA,MACnD,UAAW;AAAA,MACX,YAAa;AAAA,MACb,qBAAmB;AAAA,MACnB;AAAA;AAAA,EACD;AAEF;",
5
+ "mappings": ";AAGA,SAAS,gBAAgB;AACzB,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B,SAAS,UAAU;AACnB,SAAS,uBAAuB;AAKhC,SAAS,SAAS,mBAAmB;AACrC,SAAS,uBAAuB;AAsB9B;AApBa,SAAR,qBAAsC;AAC5C,QAAM,CAAE,YAAY,aAAc,IAAI,SAAS;AAE/C,QAAM,EAAE,SAAS,IAAI,YAAa,WAAY;AAC9C,QAAM,EAAE,UAAU,eAAe,UAAU,IAC1C,gBAAiB,UAAW;AAO7B,QAAM,eAAe,CAAE,iBAAkB;AACxC,QAAK,CAAE,cAAe;AACrB;AAAA,IACD;AACA,aAAU,EAAE,QAAQ,aAAa,CAAE;AAAA,EACpC;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,yBAAuB;AAAA,MACvB,uBAAqB;AAAA,MACrB,OAAQ,GAAI,QAAS;AAAA,MACrB,SAAU;AAAA,MACV,OAAQ;AAAA,MACR,qBAAsB,SAAU,eAAe,GAAI;AAAA,MACnD,UAAW;AAAA,MACX,YAAa;AAAA,MACb,qBAAmB;AAAA,MACnB;AAAA;AAAA,EACD;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,9 +1,10 @@
1
- const BASE_QUERY = {
1
+ // packages/editor/src/components/post-author/constants.js
2
+ var BASE_QUERY = {
2
3
  _fields: "id,name",
3
4
  context: "view"
4
5
  // Allows non-admins to perform requests.
5
6
  };
6
- const AUTHORS_QUERY = {
7
+ var AUTHORS_QUERY = {
7
8
  who: "authors",
8
9
  per_page: 100,
9
10
  ...BASE_QUERY
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-author/constants.js"],
4
4
  "sourcesContent": ["export const BASE_QUERY = {\n\t_fields: 'id,name',\n\tcontext: 'view', // Allows non-admins to perform requests.\n};\n\nexport const AUTHORS_QUERY = {\n\twho: 'authors',\n\tper_page: 100,\n\t...BASE_QUERY,\n};\n"],
5
- "mappings": "AAAO,MAAM,aAAa;AAAA,EACzB,SAAS;AAAA,EACT,SAAS;AAAA;AACV;AAEO,MAAM,gBAAgB;AAAA,EAC5B,KAAK;AAAA,EACL,UAAU;AAAA,EACV,GAAG;AACJ;",
5
+ "mappings": ";AAAO,IAAM,aAAa;AAAA,EACzB,SAAS;AAAA,EACT,SAAS;AAAA;AACV;AAEO,IAAM,gBAAgB;AAAA,EAC5B,KAAK;AAAA,EACL,UAAU;AAAA,EACV,GAAG;AACJ;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/editor/src/components/post-author/hook.js
1
2
  import { __ } from "@wordpress/i18n";
2
3
  import { useMemo } from "@wordpress/element";
3
4
  import { useSelect } from "@wordpress/data";
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-author/hook.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { AUTHORS_QUERY, BASE_QUERY } from './constants';\n\nexport function useAuthorsQuery( search ) {\n\tconst { authorId, authors, postAuthor, isLoading } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getUser, getUsers, isResolving } = select( coreStore );\n\t\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\t\tconst _authorId = getEditedPostAttribute( 'author' );\n\t\t\tconst query = { ...AUTHORS_QUERY };\n\n\t\t\tif ( search ) {\n\t\t\t\tquery.search = search;\n\t\t\t\tquery.search_columns = [ 'name' ];\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tauthorId: _authorId,\n\t\t\t\tauthors: getUsers( query ),\n\t\t\t\tpostAuthor: getUser( _authorId, BASE_QUERY ),\n\t\t\t\tisLoading: isResolving( 'getUsers', [ query ] ),\n\t\t\t};\n\t\t},\n\t\t[ search ]\n\t);\n\n\tconst authorOptions = useMemo( () => {\n\t\tconst fetchedAuthors = ( authors ?? [] ).map( ( author ) => {\n\t\t\treturn {\n\t\t\t\tvalue: author.id,\n\t\t\t\tlabel: decodeEntities( author.name ),\n\t\t\t};\n\t\t} );\n\n\t\t// Ensure the current author is included in the dropdown list.\n\t\tconst foundAuthor = fetchedAuthors.findIndex(\n\t\t\t( { value } ) => postAuthor?.id === value\n\t\t);\n\n\t\tlet currentAuthor = [];\n\t\tif ( foundAuthor < 0 && postAuthor ) {\n\t\t\tcurrentAuthor = [\n\t\t\t\t{\n\t\t\t\t\tvalue: postAuthor.id,\n\t\t\t\t\tlabel: decodeEntities( postAuthor.name ),\n\t\t\t\t},\n\t\t\t];\n\t\t} else if ( foundAuthor < 0 && ! postAuthor ) {\n\t\t\tcurrentAuthor = [\n\t\t\t\t{\n\t\t\t\t\tvalue: 0,\n\t\t\t\t\tlabel: __( '(No author)' ),\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\treturn [ ...currentAuthor, ...fetchedAuthors ];\n\t}, [ authors, postAuthor ] );\n\n\treturn { authorId, authorOptions, postAuthor, isLoading };\n}\n"],
5
- "mappings": "AAGA,SAAS,UAAU;AACnB,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAC1B,SAAS,sBAAsB;AAC/B,SAAS,SAAS,iBAAiB;AAKnC,SAAS,SAAS,mBAAmB;AACrC,SAAS,eAAe,kBAAkB;AAEnC,SAAS,gBAAiB,QAAS;AACzC,QAAM,EAAE,UAAU,SAAS,YAAY,UAAU,IAAI;AAAA,IAC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Ac;AAAA,QAC1B;AAAA,MACD;AAAA,IACD;AAEA,WAAO,CAAE,GAAG,eAAe,GAAG,cAAe;AAAA,EAC9C,GAAG,CAAE,SAAS,UAAW,CAAE;AAE3B,SAAO,EAAE,UAAU,eAAe,YAAY,UAAU;AACzD;",
6
6
  "names": []
7
7
  }
@@ -1,10 +1,11 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ // packages/editor/src/components/post-author/index.js
2
2
  import { useSelect } from "@wordpress/data";
3
3
  import { store as coreStore } from "@wordpress/core-data";
4
4
  import PostAuthorCombobox from "./combobox";
5
5
  import PostAuthorSelect from "./select";
6
6
  import { AUTHORS_QUERY } from "./constants";
7
- const minimumUsersForCombobox = 25;
7
+ import { jsx } from "react/jsx-runtime";
8
+ var minimumUsersForCombobox = 25;
8
9
  function PostAuthor() {
9
10
  const showCombobox = useSelect((select) => {
10
11
  const authors = select(coreStore).getUsers(AUTHORS_QUERY);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-author/index.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostAuthorCombobox from './combobox';\nimport PostAuthorSelect from './select';\nimport { AUTHORS_QUERY } from './constants';\n\nconst minimumUsersForCombobox = 25;\n\n/**\n * Renders the component for selecting the post author.\n *\n * @return {React.ReactNode} The rendered component.\n */\nfunction PostAuthor() {\n\tconst showCombobox = useSelect( ( select ) => {\n\t\tconst authors = select( coreStore ).getUsers( AUTHORS_QUERY );\n\n\t\treturn authors?.length >= minimumUsersForCombobox;\n\t}, [] );\n\n\tif ( showCombobox ) {\n\t\treturn <PostAuthorCombobox />;\n\t}\n\treturn <PostAuthorSelect />;\n}\n\nexport default PostAuthor;\n"],
5
- "mappings": "AA4BS;AAzBT,SAAS,iBAAiB;AAC1B,SAAS,SAAS,iBAAiB;AAKnC,OAAO,wBAAwB;AAC/B,OAAO,sBAAsB;AAC7B,SAAS,qBAAqB;AAE9B,MAAM,0BAA0B;AAOhC,SAAS,aAAa;AACrB,QAAM,eAAe,UAAW,CAAE,WAAY;AAC7C,UAAM,UAAU,OAAQ,SAAU,EAAE,SAAU,aAAc;AAE5D,WAAO,SAAS,UAAU;AAAA,EAC3B,GAAG,CAAC,CAAE;AAEN,MAAK,cAAe;AACnB,WAAO,oBAAC,sBAAmB;AAAA,EAC5B;AACA,SAAO,oBAAC,oBAAiB;AAC1B;AAEA,IAAO,sBAAQ;",
5
+ "mappings": ";AAGA,SAAS,iBAAiB;AAC1B,SAAS,SAAS,iBAAiB;AAKnC,OAAO,wBAAwB;AAC/B,OAAO,sBAAsB;AAC7B,SAAS,qBAAqB;AAiBrB;AAfT,IAAM,0BAA0B;AAOhC,SAAS,aAAa;AACrB,QAAM,eAAe,UAAW,CAAE,WAAY;AAC7C,UAAM,UAAU,OAAQ,SAAU,EAAE,SAAU,aAAc;AAE5D,WAAO,SAAS,UAAU;AAAA,EAC3B,GAAG,CAAC,CAAE;AAEN,MAAK,cAAe;AACnB,WAAO,oBAAC,sBAAmB;AAAA,EAC5B;AACA,SAAO,oBAAC,oBAAiB;AAC1B;AAEA,IAAO,sBAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ // packages/editor/src/components/post-author/panel.js
2
2
  import { __, sprintf } from "@wordpress/i18n";
3
3
  import { Button, Dropdown } from "@wordpress/components";
4
4
  import { useState, useMemo } from "@wordpress/element";
@@ -11,6 +11,7 @@ import PostAuthorForm from "./index";
11
11
  import PostPanelRow from "../post-panel-row";
12
12
  import { BASE_QUERY } from "./constants";
13
13
  import { store as editorStore } from "../../store";
14
+ import { jsx, jsxs } from "react/jsx-runtime";
14
15
  function PostAuthorToggle({ isOpen, onClick }) {
15
16
  const { postAuthor } = useSelect((select) => {
16
17
  const id = select(editorStore).getEditedPostAttribute("author");
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/post-author/panel.js"],
4
4
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button, Dropdown } from '@wordpress/components';\nimport { useState, useMemo } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostAuthorCheck from './check';\nimport PostAuthorForm from './index';\nimport PostPanelRow from '../post-panel-row';\nimport { BASE_QUERY } from './constants';\nimport { store as editorStore } from '../../store';\n\nfunction PostAuthorToggle( { isOpen, onClick } ) {\n\tconst { postAuthor } = useSelect( ( select ) => {\n\t\tconst id = select( editorStore ).getEditedPostAttribute( 'author' );\n\t\treturn {\n\t\t\tpostAuthor: select( coreStore ).getUser( id, BASE_QUERY ),\n\t\t};\n\t}, [] );\n\tconst authorName =\n\t\tdecodeEntities( postAuthor?.name ) || __( '(No author)' );\n\treturn (\n\t\t<Button\n\t\t\tsize=\"compact\"\n\t\t\tclassName=\"editor-post-author__panel-toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\taria-label={\n\t\t\t\t// translators: %s: Author name.\n\t\t\t\tsprintf( __( 'Change author: %s' ), authorName )\n\t\t\t}\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ authorName }\n\t\t</Button>\n\t);\n}\n\n/**\n * Renders the Post Author Panel component.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport function PostAuthor() {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\treturn (\n\t\t<PostAuthorCheck>\n\t\t\t<PostPanelRow label={ __( 'Author' ) } ref={ setPopoverAnchor }>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tcontentClassName=\"editor-post-author__panel-dialog\"\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<PostAuthorToggle\n\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<div className=\"editor-post-author\">\n\t\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\t\ttitle={ __( 'Author' ) }\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<PostAuthorForm onClose={ onClose } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PostPanelRow>\n\t\t</PostAuthorCheck>\n\t);\n}\n\nexport default PostAuthor;\n"],
5
- "mappings": "AA8BE,cAmDI,YAnDJ;AA3BF,SAAS,IAAI,eAAe;AAC5B,SAAS,QAAQ,gBAAgB;AACjC,SAAS,UAAU,eAAe;AAClC,SAAS,sBAAsB;AAC/B,SAAS,wCAAwC,8BAA8B;AAC/E,SAAS,iBAAiB;AAC1B,SAAS,SAAS,iBAAiB;AAKnC,OAAO,qBAAqB;AAC5B,OAAO,oBAAoB;AAC3B,OAAO,kBAAkB;AACzB,SAAS,kBAAkB;AAC3B,SAAS,SAAS,mBAAmB;AAErC,SAAS,iBAAkB,EAAE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