@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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/collab-sidebar/index.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { useState, useRef } from '@wordpress/element';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { comment as commentIcon } from '@wordpress/icons';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport PluginSidebar from '../plugin-sidebar';\nimport {\n\tcollabHistorySidebarName,\n\tcollabSidebarName,\n\tSIDEBARS,\n} from './constants';\nimport { Comments } from './comments';\nimport { store as editorStore } from '../../store';\nimport AddCommentMenuItem from './comment-menu-item';\nimport CommentAvatarIndicator from './comment-indicator-toolbar';\nimport { useGlobalStylesContext } from '../global-styles-provider';\nimport {\n\tuseBlockComments,\n\tuseBlockCommentsActions,\n\tuseEnableFloatingSidebar,\n} from './hooks';\nimport { focusCommentThread } from './utils';\nimport PostTypeSupportCheck from '../post-type-support-check';\n\nfunction NotesSidebarContent( {\n\tshowCommentBoard,\n\tsetShowCommentBoard,\n\tstyles,\n\tcomments,\n\tcommentSidebarRef,\n\treflowComments,\n\tcommentLastUpdated,\n\tisFloating = false,\n} ) {\n\tconst { onCreate, onEdit, onDelete } =\n\t\tuseBlockCommentsActions( reflowComments );\n\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"editor-collab-sidebar-panel\"\n\t\t\tstyle={ styles }\n\t\t\trole=\"list\"\n\t\t\tspacing=\"3\"\n\t\t\tjustify=\"flex-start\"\n\t\t\tref={ ( node ) => {\n\t\t\t\t// Sometimes previous sidebar unmounts after the new one mounts.\n\t\t\t\t// This ensures we always have the latest reference.\n\t\t\t\tif ( node ) {\n\t\t\t\t\tcommentSidebarRef.current = node;\n\t\t\t\t}\n\t\t\t} }\n\t\t>\n\t\t\t<Comments\n\t\t\t\tthreads={ comments }\n\t\t\t\tonEditComment={ onEdit }\n\t\t\t\tonAddReply={ onCreate }\n\t\t\t\tonCommentDelete={ onDelete }\n\t\t\t\tshowCommentBoard={ showCommentBoard }\n\t\t\t\tsetShowCommentBoard={ setShowCommentBoard }\n\t\t\t\tcommentSidebarRef={ commentSidebarRef }\n\t\t\t\treflowComments={ reflowComments }\n\t\t\t\tcommentLastUpdated={ commentLastUpdated }\n\t\t\t\tisFloating={ isFloating }\n\t\t\t/>\n\t\t</VStack>\n\t);\n}\n\nfunction NotesSidebar( { postId, mode } ) {\n\tconst [ showCommentBoard, setShowCommentBoard ] = useState( false );\n\tconst { getActiveComplementaryArea } = useSelect( interfaceStore );\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst commentSidebarRef = useRef( null );\n\n\tconst showFloatingSidebar = isLargeViewport && mode === 'post-only';\n\n\tconst blockCommentId = useSelect( ( select ) => {\n\t\tconst { getBlockAttributes, getSelectedBlockClientId } =\n\t\t\tselect( blockEditorStore );\n\t\tconst clientId = getSelectedBlockClientId();\n\t\treturn clientId\n\t\t\t? getBlockAttributes( clientId )?.metadata?.noteId\n\t\t\t: null;\n\t}, [] );\n\n\tconst {\n\t\tresultComments,\n\t\tunresolvedSortedThreads,\n\t\treflowComments,\n\t\tcommentLastUpdated,\n\t} = useBlockComments( postId );\n\tuseEnableFloatingSidebar(\n\t\tshowFloatingSidebar &&\n\t\t\t( unresolvedSortedThreads.length > 0 || showCommentBoard )\n\t);\n\n\t// Get the global styles to set the background color of the sidebar.\n\tconst { merged: GlobalStyles } = useGlobalStylesContext();\n\tconst backgroundColor = GlobalStyles?.styles?.color?.background;\n\n\t// Find the current thread for the selected block.\n\tconst currentThread = blockCommentId\n\t\t? resultComments.find( ( thread ) => thread.id === blockCommentId )\n\t\t: null;\n\n\tasync function openTheSidebar() {\n\t\tconst prevArea = await getActiveComplementaryArea( 'core' );\n\t\tconst activeNotesArea = SIDEBARS.find( ( name ) => name === prevArea );\n\n\t\tif ( currentThread?.status === 'approved' ) {\n\t\t\tenableComplementaryArea( 'core', collabHistorySidebarName );\n\t\t} else if ( ! activeNotesArea ) {\n\t\t\tenableComplementaryArea(\n\t\t\t\t'core',\n\t\t\t\tshowFloatingSidebar\n\t\t\t\t\t? collabSidebarName\n\t\t\t\t\t: collabHistorySidebarName\n\t\t\t);\n\t\t}\n\n\t\tconst currentArea = await getActiveComplementaryArea( 'core' );\n\t\t// Bail out if the current active area is not one of note sidebars.\n\t\tif ( ! SIDEBARS.includes( currentArea ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetShowCommentBoard( ! blockCommentId );\n\t\tfocusCommentThread(\n\t\t\tblockCommentId,\n\t\t\tcommentSidebarRef.current,\n\t\t\t// Focus a comment thread when there's a selected block with a comment.\n\t\t\t! blockCommentId ? 'textarea' : undefined\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ blockCommentId && (\n\t\t\t\t<CommentAvatarIndicator\n\t\t\t\t\tthread={ currentThread }\n\t\t\t\t\tonClick={ openTheSidebar }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<AddCommentMenuItem onClick={ openTheSidebar } />\n\t\t\t<PluginSidebar\n\t\t\t\tidentifier={ collabHistorySidebarName }\n\t\t\t\tname={ collabHistorySidebarName }\n\t\t\t\ttitle={ __( 'Notes' ) }\n\t\t\t\ticon={ commentIcon }\n\t\t\t\tcloseLabel={ __( 'Close Notes' ) }\n\t\t\t>\n\t\t\t\t<NotesSidebarContent\n\t\t\t\t\tcomments={ resultComments }\n\t\t\t\t\tshowCommentBoard={ showCommentBoard }\n\t\t\t\t\tsetShowCommentBoard={ setShowCommentBoard }\n\t\t\t\t\tcommentSidebarRef={ commentSidebarRef }\n\t\t\t\t\treflowComments={ reflowComments }\n\t\t\t\t\tcommentLastUpdated={ commentLastUpdated }\n\t\t\t\t/>\n\t\t\t</PluginSidebar>\n\t\t\t{ isLargeViewport && (\n\t\t\t\t<PluginSidebar\n\t\t\t\t\tisPinnable={ false }\n\t\t\t\t\theader={ false }\n\t\t\t\t\tidentifier={ collabSidebarName }\n\t\t\t\t\tclassName=\"editor-collab-sidebar\"\n\t\t\t\t\theaderClassName=\"editor-collab-sidebar__header\"\n\t\t\t\t\tbackgroundColor={ backgroundColor }\n\t\t\t\t>\n\t\t\t\t\t<NotesSidebarContent\n\t\t\t\t\t\tcomments={ unresolvedSortedThreads }\n\t\t\t\t\t\tshowCommentBoard={ showCommentBoard }\n\t\t\t\t\t\tsetShowCommentBoard={ setShowCommentBoard }\n\t\t\t\t\t\tcommentSidebarRef={ commentSidebarRef }\n\t\t\t\t\t\treflowComments={ reflowComments }\n\t\t\t\t\t\tcommentLastUpdated={ commentLastUpdated }\n\t\t\t\t\t\tstyles={ {\n\t\t\t\t\t\t\tbackgroundColor,\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisFloating\n\t\t\t\t\t/>\n\t\t\t\t</PluginSidebar>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default function NotesSidebarContainer() {\n\tconst { postId, mode } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostId, getRenderingMode } = select( editorStore );\n\t\treturn {\n\t\t\tpostId: getCurrentPostId(),\n\t\t\tmode: getRenderingMode(),\n\t\t};\n\t}, [] );\n\n\tif ( ! postId || typeof postId !== 'number' ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"editor.notes\">\n\t\t\t<NotesSidebar postId={ postId } mode={ mode } />\n\t\t</PostT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AA,EAAmB,SAAU,gBAAiB;AAAA,IAC/C;AAAA,MAAC,sBAAAC;AAAA,MAAA;AAAA,QACA,YAAa;AAAA,QACb,MAAO;AAAA,QACP,WAAQ,gBAAI,OAAQ;AAAA,QACpB,MAAO,aAAAC;AAAA,QACP,gBAAa,gBAAI,aAAc;AAAA,QAE/B;AAAA,UAAC;AAAA;AAAA,YACA,UAAW;AAAA,YACX;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACD;AAAA;AAAA,IACD;AAAA,IACE,mBACD;AAAA,MAAC,sBAAAD;AAAA,MAAA;AAAA,QACA,YAAa;AAAA,QACb,QAAS;AAAA,QACT,YAAa;AAAA,QACb,WAAU;AAAA,QACV,iBAAgB;AAAA,QAChB;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACA,UAAW;AAAA,YACX;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,QAAS;AAAA,cACR;AAAA,YACD;AAAA,YACA,YAAU;AAAA;AAAA,QACX;AAAA;AAAA,IACD;AAAA,KAEF;AAEF;AAEe,SAAR,wBAAyC;AAC/C,QAAM,EAAE,QAAQ,KAAK,QAAI,uBAAW,CAAE,WAAY;AACjD,UAAM,EAAE,kBAAkB,iBAAiB,IAAI,OAAQ,aAAAE,KAAY;AACnE,WAAO;AAAA,MACN,QAAQ,iBAAiB;AAAA,MACzB,MAAM,iBAAiB;AAAA,IACxB;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,MAAK,CAAE,UAAU,OAAO,WAAW,UAAW;AAC7C,WAAO;AAAA,EACR;AAEA,SACC,4CAAC,+BAAAC,SAAA,EAAqB,aAAY,gBACjC,sDAAC,gBAAa,QAAkB,MAAc,GAC/C;AAEF;",
6
- "names": ["VStack", "interfaceStore", "blockEditorStore", "CommentAvatarIndicator", "AddCommentMenuItem", "PluginSidebar", "commentIcon", "editorStore", "PostTypeSupportCheck"]
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { useState, useRef } from '@wordpress/element';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { comment as commentIcon } from '@wordpress/icons';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport PluginSidebar from '../plugin-sidebar';\nimport {\n\tcollabHistorySidebarName,\n\tcollabSidebarName,\n\tSIDEBARS,\n} from './constants';\nimport { Comments } from './comments';\nimport { store as editorStore } from '../../store';\nimport AddCommentMenuItem from './comment-menu-item';\nimport CommentAvatarIndicator from './comment-indicator-toolbar';\nimport { useGlobalStylesContext } from '../global-styles-provider';\nimport {\n\tuseBlockComments,\n\tuseBlockCommentsActions,\n\tuseEnableFloatingSidebar,\n} from './hooks';\nimport { focusCommentThread } from './utils';\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { unlock } from '../../lock-unlock';\n\nfunction NotesSidebarContent( {\n\tnewNoteFormState,\n\tsetNewNoteFormState,\n\tstyles,\n\tcomments,\n\tcommentSidebarRef,\n\treflowComments,\n\tcommentLastUpdated,\n\tisFloating = false,\n} ) {\n\tconst { onCreate, onEdit, onDelete } =\n\t\tuseBlockCommentsActions( reflowComments );\n\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"editor-collab-sidebar-panel\"\n\t\t\tstyle={ styles }\n\t\t\trole=\"tree\"\n\t\t\tspacing=\"3\"\n\t\t\tjustify=\"flex-start\"\n\t\t\tref={ ( node ) => {\n\t\t\t\t// Sometimes previous sidebar unmounts after the new one mounts.\n\t\t\t\t// This ensures we always have the latest reference.\n\t\t\t\tif ( node ) {\n\t\t\t\t\tcommentSidebarRef.current = node;\n\t\t\t\t}\n\t\t\t} }\n\t\t\taria-label={\n\t\t\t\tisFloating ? __( 'Unresolved notes' ) : __( 'All notes' )\n\t\t\t}\n\t\t>\n\t\t\t<Comments\n\t\t\t\tthreads={ comments }\n\t\t\t\tonEditComment={ onEdit }\n\t\t\t\tonAddReply={ onCreate }\n\t\t\t\tonCommentDelete={ onDelete }\n\t\t\t\tnewNoteFormState={ newNoteFormState }\n\t\t\t\tsetNewNoteFormState={ setNewNoteFormState }\n\t\t\t\tcommentSidebarRef={ commentSidebarRef }\n\t\t\t\treflowComments={ reflowComments }\n\t\t\t\tcommentLastUpdated={ commentLastUpdated }\n\t\t\t\tisFloating={ isFloating }\n\t\t\t/>\n\t\t</VStack>\n\t);\n}\n\nfunction NotesSidebar( { postId, mode } ) {\n\t// Enum: 'closed' | 'creating' | 'open'\n\tconst [ newNoteFormState, setNewNoteFormState ] = useState( 'closed' );\n\tconst { getActiveComplementaryArea } = useSelect( interfaceStore );\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\tconst { toggleBlockSpotlight } = unlock( useDispatch( blockEditorStore ) );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst commentSidebarRef = useRef( null );\n\n\tconst showFloatingSidebar = isLargeViewport && mode === 'post-only';\n\n\tconst { clientId, blockCommentId, isDistractionFree } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockAttributes,\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t\tgetSettings,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst _clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tclientId: _clientId,\n\t\t\t\tblockCommentId: _clientId\n\t\t\t\t\t? getBlockAttributes( _clientId )?.metadata?.noteId\n\t\t\t\t\t: null,\n\t\t\t\tisDistractionFree: getSettings().isDistractionFree,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst {\n\t\tresultComments,\n\t\tunresolvedSortedThreads,\n\t\treflowComments,\n\t\tcommentLastUpdated,\n\t} = useBlockComments( postId );\n\tuseEnableFloatingSidebar(\n\t\tshowFloatingSidebar &&\n\t\t\t( unresolvedSortedThreads.length > 0 ||\n\t\t\t\tnewNoteFormState !== 'closed' )\n\t);\n\n\t// Get the global styles to set the background color of the sidebar.\n\tconst { merged: GlobalStyles } = useGlobalStylesContext();\n\tconst backgroundColor = GlobalStyles?.styles?.color?.background;\n\n\t// Find the current thread for the selected block.\n\tconst currentThread = blockCommentId\n\t\t? resultComments.find( ( thread ) => thread.id === blockCommentId )\n\t\t: null;\n\tconst showAllNotesSidebar =\n\t\tresultComments.length > 0 || ! showFloatingSidebar;\n\n\tasync function openTheSidebar() {\n\t\tconst prevArea = await getActiveComplementaryArea( 'core' );\n\t\tconst activeNotesArea = SIDEBARS.find( ( name ) => name === prevArea );\n\n\t\tif ( currentThread?.status === 'approved' ) {\n\t\t\tenableComplementaryArea( 'core', collabHistorySidebarName );\n\t\t} else if ( ! activeNotesArea || ! showAllNotesSidebar ) {\n\t\t\tenableComplementaryArea(\n\t\t\t\t'core',\n\t\t\t\tshowFloatingSidebar\n\t\t\t\t\t? collabSidebarName\n\t\t\t\t\t: collabHistorySidebarName\n\t\t\t);\n\t\t}\n\n\t\tconst currentArea = await getActiveComplementaryArea( 'core' );\n\t\t// Bail out if the current active area is not one of note sidebars.\n\t\tif ( ! SIDEBARS.includes( currentArea ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetNewNoteFormState( ! currentThread ? 'open' : 'closed' );\n\t\tfocusCommentThread(\n\t\t\tcurrentThread?.id,\n\t\t\tcommentSidebarRef.current,\n\t\t\t// Focus a comment thread when there's a selected block with a comment.\n\t\t\t! currentThread ? 'textarea' : undefined\n\t\t);\n\t\ttoggleBlockSpotlight( clientId, true );\n\t}\n\n\tif ( isDistractionFree ) {\n\t\treturn <AddCommentMenuItem isDistractionFree />;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ !! currentThread && (\n\t\t\t\t<CommentAvatarIndicator\n\t\t\t\t\tthread={ currentThread }\n\t\t\t\t\tonClick={ openTheSidebar }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<AddCommentMenuItem onClick={ openTheSidebar } />\n\t\t\t{ showAllNotesSidebar && (\n\t\t\t\t<PluginSidebar\n\t\t\t\t\tidentifier={ collabHistorySidebarName }\n\t\t\t\t\tname={ collabHistorySidebarName }\n\t\t\t\t\ttitle={ __( 'All notes' ) }\n\t\t\t\t\theader={\n\t\t\t\t\t\t<h2 className=\"interface-complementary-area-header__title\">\n\t\t\t\t\t\t\t{ __( 'All notes' ) }\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t}\n\t\t\t\t\ticon={ commentIcon }\n\t\t\t\t\tcloseLabel={ __( 'Close Notes' ) }\n\t\t\t\t>\n\t\t\t\t\t<NotesSidebarContent\n\t\t\t\t\t\tcomments={ resultComments }\n\t\t\t\t\t\tnewNoteFormState={ newNoteFormState }\n\t\t\t\t\t\tsetNewNoteFormState={ setNewNoteFormState }\n\t\t\t\t\t\tcommentSidebarRef={ commentSidebarRef }\n\t\t\t\t\t\treflowComments={ reflowComments }\n\t\t\t\t\t\tcommentLastUpdated={ commentLastUpdated }\n\t\t\t\t\t/>\n\t\t\t\t</PluginSidebar>\n\t\t\t) }\n\t\t\t{ isLargeViewport && (\n\t\t\t\t<PluginSidebar\n\t\t\t\t\tisPinnable={ false }\n\t\t\t\t\theader={ false }\n\t\t\t\t\tidentifier={ collabSidebarName }\n\t\t\t\t\tclassName=\"editor-collab-sidebar\"\n\t\t\t\t\theaderClassName=\"editor-collab-sidebar__header\"\n\t\t\t\t\tbackgroundColor={ backgroundColor }\n\t\t\t\t>\n\t\t\t\t\t<NotesSidebarContent\n\t\t\t\t\t\tcomments={ unresolvedSortedThreads }\n\t\t\t\t\t\tnewNoteFormState={ newNoteFormState }\n\t\t\t\t\t\tsetNewNoteFormState={ setNewNoteFormState }\n\t\t\t\t\t\tcommentSidebarRef={ commentSidebarRef }\n\t\t\t\t\t\treflowComments={ reflowComments }\n\t\t\t\t\t\tcommentLastUpdated={ commentLastUpdated }\n\t\t\t\t\t\tstyles={ {\n\t\t\t\t\t\t\tbackgroundColor,\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisFloating\n\t\t\t\t\t/>\n\t\t\t\t</PluginSidebar>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default function NotesSidebarContainer() {\n\tconst { postId, mode, editorMode } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostId, getRenderingMode, getEditorMode } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tpostId: getCurrentPostId(),\n\t\t\tmode: getRenderingMode(),\n\t\t\teditorMode: getEditorMode(),\n\t\t};\n\t}, [] );\n\n\tif ( ! postId || typeof postId !== 'number' ) {\n\t\treturn null;\n\t}\n\n\t// Hide Notes sidebar in Code Editor mode since block-level commenting.\n\tif ( editorMode === 'text' ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"editor.notes\">\n\t\t\t<NotesSidebar postId={ postId } mode={ mode } />\n\t\t</PostTypeSupportCheck>\n\t);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AACnB,kBAAuC;AACvC,wBAA+C;AAC/C,qBAAiC;AACjC,qBAAiC;AACjC,mBAAuC;AACvC,0BAA0C;AAC1C,uBAAwC;AAKxC,4BAA0B;AAC1B,uBAIO;AACP,sBAAyB;AACzB,mBAAqC;AACrC,+BAA+B;AAC/B,uCAAmC;AACnC,oCAAuC;AACvC,mBAIO;AACP,mBAAmC;AACnC,qCAAiC;AACjC,yBAAuB;AAiCpB;AA/BH,SAAS,oBAAqB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AACd,GAAI;AACH,QAAM,EAAE,UAAU,QAAQ,SAAS,QAClC,sCAAyB,cAAe;AAEzC,SACC;AAAA,IAAC,kBAAAA;AAAA,IAAA;AAAA,MACA,WAAU;AAAA,MACV,OA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B,QACC,4CAAC,QAAG,WAAU,8CACX,8BAAI,WAAY,GACnB;AAAA,QAED,MAAO,aAAAC;AAAA,QACP,gBAAa,gBAAI,aAAc;AAAA,QAE/B;AAAA,UAAC;AAAA;AAAA,YACA,UAAW;AAAA,YACX;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACD;AAAA;AAAA,IACD;AAAA,IAEC,mBACD;AAAA,MAAC,sBAAAD;AAAA,MAAA;AAAA,QACA,YAAa;AAAA,QACb,QAAS;AAAA,QACT,YAAa;AAAA,QACb,WAAU;AAAA,QACV,iBAAgB;AAAA,QAChB;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACA,UAAW;AAAA,YACX;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,QAAS;AAAA,cACR;AAAA,YACD;AAAA,YACA,YAAU;AAAA;AAAA,QACX;AAAA;AAAA,IACD;AAAA,KAEF;AAEF;AAEe,SAAR,wBAAyC;AAC/C,QAAM,EAAE,QAAQ,MAAM,WAAW,QAAI,uBAAW,CAAE,WAAY;AAC7D,UAAM,EAAE,kBAAkB,kBAAkB,cAAc,IACzD,OAAQ,aAAAE,KAAY;AACrB,WAAO;AAAA,MACN,QAAQ,iBAAiB;AAAA,MACzB,MAAM,iBAAiB;AAAA,MACvB,YAAY,cAAc;AAAA,IAC3B;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,MAAK,CAAE,UAAU,OAAO,WAAW,UAAW;AAC7C,WAAO;AAAA,EACR;AAGA,MAAK,eAAe,QAAS;AAC5B,WAAO;AAAA,EACR;AAEA,SACC,4CAAC,+BAAAC,SAAA,EAAqB,aAAY,gBACjC,sDAAC,gBAAa,QAAkB,MAAc,GAC/C;AAEF;",
6
+ "names": ["VStack", "interfaceStore", "blockEditorStore", "AddCommentMenuItem", "CommentAvatarIndicator", "PluginSidebar", "commentIcon", "editorStore", "PostTypeSupportCheck"]
7
7
  }
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/editor/src/components/collab-sidebar/utils.js
19
21
  var utils_exports = {};
20
22
  __export(utils_exports, {
21
23
  focusCommentThread: () => focusCommentThread,
@@ -31,7 +33,7 @@ function sanitizeCommentString(str) {
31
33
  }
32
34
  function noop() {
33
35
  }
34
- const AVATAR_BORDER_COLORS = [
36
+ var AVATAR_BORDER_COLORS = [
35
37
  "#3858E9",
36
38
  // Blueberry
37
39
  "#9fB1FF",
@@ -75,7 +77,7 @@ function focusCommentThread(commentId, container, additionalSelector) {
75
77
  if (!container) {
76
78
  return;
77
79
  }
78
- const threadSelector = commentId ? `[role=listitem][id="comment-thread-${commentId}"]` : "[role=listitem]:not([id])";
80
+ const threadSelector = commentId ? `[role=treeitem][id="comment-thread-${commentId}"]` : "[role=treeitem]:not([id])";
79
81
  const selector = additionalSelector ? `${threadSelector} ${additionalSelector}` : threadSelector;
80
82
  return new Promise((resolve) => {
81
83
  if (container.querySelector(selector)) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/collab-sidebar/utils.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\n\n/**\n * Sanitizes a comment string by removing non-printable ASCII characters.\n *\n * @param {string} str - The comment string to sanitize.\n * @return {string} - The sanitized comment string.\n */\nexport function sanitizeCommentString( str ) {\n\treturn str.trim();\n}\n\n/**\n * A no-operation function that does nothing.\n */\nexport function noop() {}\n\n/**\n * These colors are picked from the WordPress.org design library.\n * @see https://www.figma.com/design/HOJTpCFfa3tR0EccUlu0CM/WordPress.org-Design-Library?node-id=1-2193&t=M6WdRvTpt0mh8n6T-1\n */\nconst AVATAR_BORDER_COLORS = [\n\t'#3858E9', // Blueberry\n\t'#9fB1FF', // Blueberry 2\n\t'#1D35B4', // Dark Blueberry\n\t'#1A1919', // Charcoal 0\n\t'#E26F56', // Pomegranate\n\t'#33F078', // Acid Green\n\t'#FFF972', // Lemon\n\t'#7A00DF', // Purple\n];\n\n/**\n * Gets the border color for an avatar based on the user ID.\n *\n * @param {number} userId - The user ID.\n * @return {string} - The border color.\n */\nexport function getAvatarBorderColor( userId ) {\n\treturn AVATAR_BORDER_COLORS[ userId % AVATAR_BORDER_COLORS.length ];\n}\n\n/**\n * Generates a comment excerpt from text based on word count type and length.\n *\n * @param {string} text - The comment text to generate excerpt from.\n * @param {number} excerptLength - The maximum length for the commentexcerpt.\n * @return {string} - The generated comment excerpt.\n */\nexport function getCommentExcerpt( text, excerptLength = 10 ) {\n\tif ( ! text ) {\n\t\treturn '';\n\t}\n\n\t/*\n\t * translators: If your word count is based on single characters (e.g. East Asian characters),\n\t * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.\n\t * Do not translate into your own language.\n\t */\n\tconst wordCountType = _x( 'words', 'Word count type. Do not translate!' );\n\n\tconst rawText = text.trim();\n\tlet trimmedExcerpt = '';\n\n\tif ( wordCountType === 'words' ) {\n\t\ttrimmedExcerpt = rawText.split( ' ', excerptLength ).join( ' ' );\n\t} else if ( wordCountType === 'characters_excluding_spaces' ) {\n\t\t/*\n\t\t * 1. Split the text at the character limit,\n\t\t * then join the substrings back into one string.\n\t\t * 2. Count the number of spaces in the text\n\t\t * by comparing the lengths of the string with and without spaces.\n\t\t * 3. Add the number to the length of the visible excerpt,\n\t\t * so that the spaces are excluded from the word count.\n\t\t */\n\t\tconst textWithSpaces = rawText.split( '', excerptLength ).join( '' );\n\n\t\tconst numberOfSpaces =\n\t\t\ttextWithSpaces.length - textWithSpaces.replaceAll( ' ', '' ).length;\n\n\t\ttrimmedExcerpt = rawText\n\t\t\t.split( '', excerptLength + numberOfSpaces )\n\t\t\t.join( '' );\n\t} else if ( wordCountType === 'characters_including_spaces' ) {\n\t\ttrimmedExcerpt = rawText.split( '', excerptLength ).join( '' );\n\t}\n\n\tconst isTrimmed = trimmedExcerpt !== rawText;\n\treturn isTrimmed ? trimmedExcerpt + '\u2026' : trimmedExcerpt;\n}\n\n/**\n * Shift focus to the comment thread associated with a particular comment ID.\n * If an additional selector is provided, the focus will be shifted to the element matching the selector.\n *\n * @typedef {import('@wordpress/element').RefObject} RefObject\n *\n * @param {string} commentId The ID of the comment thread to focus.\n * @param {?HTMLElement} container The container element to search within.\n * @param {string} additionalSelector The additional selector to focus on.\n */\nexport function focusCommentThread( commentId, container, additionalSelector ) {\n\tif ( ! container ) {\n\t\treturn;\n\t}\n\n\t// A thread without a commentId is a new comment thread.\n\tconst threadSelector = commentId\n\t\t? `[role=listitem][id=\"comment-thread-${ commentId }\"]`\n\t\t: '[role=listitem]:not([id])';\n\tconst selector = additionalSelector\n\t\t? `${ threadSelector } ${ additionalSelector }`\n\t\t: threadSelector;\n\n\treturn new Promise( ( resolve ) => {\n\t\tif ( container.querySelector( selector ) ) {\n\t\t\treturn resolve( container.querySelector( selector ) );\n\t\t}\n\n\t\tlet timer = null;\n\t\t// Wait for the element to be added to the DOM.\n\t\tconst observer = new window.MutationObserver( () => {\n\t\t\tif ( container.querySelector( selector ) ) {\n\t\t\t\tclearTimeout( timer );\n\t\t\t\tobserver.disconnect();\n\t\t\t\tresolve( container.querySelector( selector ) );\n\t\t\t}\n\t\t} );\n\t\tobserver.observe( container, {\n\t\t\tchildList: true,\n\t\t\tsubtree: true,\n\t\t} );\n\n\t\t// Stop trying after 3 seconds.\n\t\ttimer = setTimeout( () => {\n\t\t\tobserver.disconnect();\n\t\t\tresolve( null );\n\t\t}, 3000 );\n\t} ).then( ( element ) => element?.focus() );\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AAQZ,SAAS,sBAAuB,KAAM;AAC5C,SAAO,IAAI,KAAK;AACjB;AAKO,SAAS,OAAO;AAAC;AAMxB,M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Z,UAAM,WAAW,IAAI,OAAO,iBAAkB,MAAM;AACnD,UAAK,UAAU,cAAe,QAAS,GAAI;AAC1C,qBAAc,KAAM;AACpB,iBAAS,WAAW;AACpB,gBAAS,UAAU,cAAe,QAAS,CAAE;AAAA,MAC9C;AAAA,IACD,CAAE;AACF,aAAS,QAAS,WAAW;AAAA,MAC5B,WAAW;AAAA,MACX,SAAS;AAAA,IACV,CAAE;AAGF,YAAQ,WAAY,MAAM;AACzB,eAAS,WAAW;AACpB,cAAS,IAAK;AAAA,IACf,GAAG,GAAK;AAAA,EACT,CAAE,EAAE,KAAM,CAAE,YAAa,SAAS,MAAM,CAAE;AAC3C;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\n\n/**\n * Sanitizes a comment string by removing non-printable ASCII characters.\n *\n * @param {string} str - The comment string to sanitize.\n * @return {string} - The sanitized comment string.\n */\nexport function sanitizeCommentString( str ) {\n\treturn str.trim();\n}\n\n/**\n * A no-operation function that does nothing.\n */\nexport function noop() {}\n\n/**\n * These colors are picked from the WordPress.org design library.\n * @see https://www.figma.com/design/HOJTpCFfa3tR0EccUlu0CM/WordPress.org-Design-Library?node-id=1-2193&t=M6WdRvTpt0mh8n6T-1\n */\nconst AVATAR_BORDER_COLORS = [\n\t'#3858E9', // Blueberry\n\t'#9fB1FF', // Blueberry 2\n\t'#1D35B4', // Dark Blueberry\n\t'#1A1919', // Charcoal 0\n\t'#E26F56', // Pomegranate\n\t'#33F078', // Acid Green\n\t'#FFF972', // Lemon\n\t'#7A00DF', // Purple\n];\n\n/**\n * Gets the border color for an avatar based on the user ID.\n *\n * @param {number} userId - The user ID.\n * @return {string} - The border color.\n */\nexport function getAvatarBorderColor( userId ) {\n\treturn AVATAR_BORDER_COLORS[ userId % AVATAR_BORDER_COLORS.length ];\n}\n\n/**\n * Generates a comment excerpt from text based on word count type and length.\n *\n * @param {string} text - The comment text to generate excerpt from.\n * @param {number} excerptLength - The maximum length for the commentexcerpt.\n * @return {string} - The generated comment excerpt.\n */\nexport function getCommentExcerpt( text, excerptLength = 10 ) {\n\tif ( ! text ) {\n\t\treturn '';\n\t}\n\n\t/*\n\t * translators: If your word count is based on single characters (e.g. East Asian characters),\n\t * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.\n\t * Do not translate into your own language.\n\t */\n\tconst wordCountType = _x( 'words', 'Word count type. Do not translate!' );\n\n\tconst rawText = text.trim();\n\tlet trimmedExcerpt = '';\n\n\tif ( wordCountType === 'words' ) {\n\t\ttrimmedExcerpt = rawText.split( ' ', excerptLength ).join( ' ' );\n\t} else if ( wordCountType === 'characters_excluding_spaces' ) {\n\t\t/*\n\t\t * 1. Split the text at the character limit,\n\t\t * then join the substrings back into one string.\n\t\t * 2. Count the number of spaces in the text\n\t\t * by comparing the lengths of the string with and without spaces.\n\t\t * 3. Add the number to the length of the visible excerpt,\n\t\t * so that the spaces are excluded from the word count.\n\t\t */\n\t\tconst textWithSpaces = rawText.split( '', excerptLength ).join( '' );\n\n\t\tconst numberOfSpaces =\n\t\t\ttextWithSpaces.length - textWithSpaces.replaceAll( ' ', '' ).length;\n\n\t\ttrimmedExcerpt = rawText\n\t\t\t.split( '', excerptLength + numberOfSpaces )\n\t\t\t.join( '' );\n\t} else if ( wordCountType === 'characters_including_spaces' ) {\n\t\ttrimmedExcerpt = rawText.split( '', excerptLength ).join( '' );\n\t}\n\n\tconst isTrimmed = trimmedExcerpt !== rawText;\n\treturn isTrimmed ? trimmedExcerpt + '\u2026' : trimmedExcerpt;\n}\n\n/**\n * Shift focus to the comment thread associated with a particular comment ID.\n * If an additional selector is provided, the focus will be shifted to the element matching the selector.\n *\n * @typedef {import('@wordpress/element').RefObject} RefObject\n *\n * @param {string} commentId The ID of the comment thread to focus.\n * @param {?HTMLElement} container The container element to search within.\n * @param {string} additionalSelector The additional selector to focus on.\n */\nexport function focusCommentThread( commentId, container, additionalSelector ) {\n\tif ( ! container ) {\n\t\treturn;\n\t}\n\n\t// A thread without a commentId is a new comment thread.\n\tconst threadSelector = commentId\n\t\t? `[role=treeitem][id=\"comment-thread-${ commentId }\"]`\n\t\t: '[role=treeitem]:not([id])';\n\tconst selector = additionalSelector\n\t\t? `${ threadSelector } ${ additionalSelector }`\n\t\t: threadSelector;\n\n\treturn new Promise( ( resolve ) => {\n\t\tif ( container.querySelector( selector ) ) {\n\t\t\treturn resolve( container.querySelector( selector ) );\n\t\t}\n\n\t\tlet timer = null;\n\t\t// Wait for the element to be added to the DOM.\n\t\tconst observer = new window.MutationObserver( () => {\n\t\t\tif ( container.querySelector( selector ) ) {\n\t\t\t\tclearTimeout( timer );\n\t\t\t\tobserver.disconnect();\n\t\t\t\tresolve( container.querySelector( selector ) );\n\t\t\t}\n\t\t} );\n\n\t\tobserver.observe( container, {\n\t\t\tchildList: true,\n\t\t\tsubtree: true,\n\t\t} );\n\n\t\t// Stop trying after 3 seconds.\n\t\ttimer = setTimeout( () => {\n\t\t\tobserver.disconnect();\n\t\t\tresolve( null );\n\t\t}, 3000 );\n\t} ).then( ( element ) => element?.focus() );\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AAQZ,SAAS,sBAAuB,KAAM;AAC5C,SAAO,IAAI,KAAK;AACjB;AAKO,SAAS,OAAO;AAAC;AAMxB,IAAM,uBAAuB;AAAA,EAC5B;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AACD;AAQO,SAAS,qBAAsB,QAAS;AAC9C,SAAO,qBAAsB,SAAS,qBAAqB,MAAO;AACnE;AASO,SAAS,kBAAmB,MAAM,gBAAgB,IAAK;AAC7D,MAAK,CAAE,MAAO;AACb,WAAO;AAAA,EACR;AAOA,QAAM,oBAAgB,gBAAI,SAAS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AA,EACT,CAAE,EAAE,KAAM,CAAE,YAAa,SAAS,MAAM,CAAE;AAC3C;",
6
6
  "names": []
7
7
  }
@@ -26,12 +26,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // packages/editor/src/components/collapsible-block-toolbar/index.js
29
31
  var collapsible_block_toolbar_exports = {};
30
32
  __export(collapsible_block_toolbar_exports, {
31
33
  default: () => CollapsibleBlockToolbar
32
34
  });
33
35
  module.exports = __toCommonJS(collapsible_block_toolbar_exports);
34
- var import_jsx_runtime = require("react/jsx-runtime");
35
36
  var import_clsx = __toESM(require("clsx"));
36
37
  var import_block_editor = require("@wordpress/block-editor");
37
38
  var import_element = require("@wordpress/element");
@@ -40,7 +41,8 @@ var import_i18n = require("@wordpress/i18n");
40
41
  var import_icons = require("@wordpress/icons");
41
42
  var import_data = require("@wordpress/data");
42
43
  var import_lock_unlock = require("../../lock-unlock");
43
- const { useHasBlockToolbar } = (0, import_lock_unlock.unlock)(import_block_editor.privateApis);
44
+ var import_jsx_runtime = require("react/jsx-runtime");
45
+ var { useHasBlockToolbar } = (0, import_lock_unlock.unlock)(import_block_editor.privateApis);
44
46
  function CollapsibleBlockToolbar({ isCollapsed, onToggle }) {
45
47
  const { blockSelectionStart } = (0, import_data.useSelect)((select) => {
46
48
  return {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/collapsible-block-toolbar/index.js"],
4
4
  "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBlockToolbar,\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useEffect } from '@wordpress/element';\nimport { Button, Popover } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { next, previous } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useHasBlockToolbar } = unlock( blockEditorPrivateApis );\n\nexport default function CollapsibleBlockToolbar( { isCollapsed, onToggle } ) {\n\tconst { blockSelectionStart } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tblockSelectionStart:\n\t\t\t\tselect( blockEditorStore ).getBlockSelectionStart(),\n\t\t};\n\t}, [] );\n\tconst hasBlockToolbar = useHasBlockToolbar();\n\n\tconst hasBlockSelection = !! blockSelectionStart;\n\n\tuseEffect( () => {\n\t\t// If we have a new block selection, show the block tools\n\t\tif ( blockSelectionStart ) {\n\t\t\tonToggle( false );\n\t\t}\n\t}, [ blockSelectionStart, onToggle ] );\n\n\tif ( ! hasBlockToolbar ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'editor-collapsible-block-toolbar', {\n\t\t\t\t\t'is-collapsed': isCollapsed || ! hasBlockSelection,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t</div>\n\t\t\t<Popover.Slot name=\"block-toolbar\" />\n\n\t\t\t<Button\n\t\t\t\tclassName=\"editor-collapsible-block-toolbar__toggle\"\n\t\t\t\ticon={ isCollapsed ? next : previous }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tonToggle( ! isCollapsed );\n\t\t\t\t} }\n\t\t\t\tlabel={\n\t\t\t\t\tisCollapsed\n\t\t\t\t\t\t? __( 'Show block tools' )\n\t\t\t\t\t\t: __( 'Hide block tools' )\n\t\t\t\t}\n\t\t\t\tsize=\"compact\"\n\t\t\t/>\n\t\t</>\n\t);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiDE;AA9CF,kBAAiB;AAKjB,0BAIO;AACP,qBAA0B;AAC1B,wBAAgC;AAChC,k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uB;AA2BrB;AAzBF,IAAM,EAAE,mBAAmB,QAAI,2BAAQ,oBAAAA,WAAuB;AAE/C,SAAR,wBAA0C,EAAE,aAAa,SAAS,GAAI;AAC5E,QAAM,EAAE,oBAAoB,QAAI,uBAAW,CAAE,WAAY;AACxD,WAAO;AAAA,MACN,qBACC,OAAQ,oBAAAC,KAAiB,EAAE,uBAAuB;AAAA,IACpD;AAAA,EACD,GAAG,CAAC,CAAE;AACN,QAAM,kBAAkB,mBAAmB;AAE3C,QAAM,oBAAoB,CAAC,CAAE;AAE7B,gCAAW,MAAM;AAEhB,QAAK,qBAAsB;AAC1B,eAAU,KAAM;AAAA,IACjB;AAAA,EACD,GAAG,CAAE,qBAAqB,QAAS,CAAE;AAErC,MAAK,CAAE,iBAAkB;AACxB,WAAO;AAAA,EACR;AAEA,SACC,4EACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,eAAY,YAAAC,SAAM,oCAAoC;AAAA,UACrD,gBAAgB,eAAe,CAAE;AAAA,QAClC,CAAE;AAAA,QAEF,sDAAC,oCAAa,gBAAc,MAAC;AAAA;AAAA,IAC9B;AAAA,IACA,4CAAC,0BAAQ,MAAR,EAAa,MAAK,iBAAgB;AAAA,IAEnC;AAAA,MAAC;AAAA;AAAA,QACA,WAAU;AAAA,QACV,MAAO,cAAc,oBAAO;AAAA,QAC5B,SAAU,MAAM;AACf,mBAAU,CAAE,WAAY;AAAA,QACzB;AAAA,QACA,OACC,kBACG,gBAAI,kBAAmB,QACvB,gBAAI,kBAAmB;AAAA,QAE3B,MAAK;AAAA;AAAA,IACN;AAAA,KACD;AAEF;",
6
6
  "names": ["blockEditorPrivateApis", "blockEditorStore", "clsx"]
7
7
  }
@@ -26,6 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // packages/editor/src/components/commands/index.js
29
31
  var commands_exports = {};
30
32
  __export(commands_exports, {
31
33
  default: () => useCommands
@@ -47,7 +49,7 @@ var import_constants = require("../../store/constants");
47
49
  var import_pattern_rename_modal = require("../pattern-rename-modal");
48
50
  var import_pattern_duplicate_modal = require("../pattern-duplicate-modal");
49
51
  var import_is_template_revertable = __toESM(require("../../store/utils/is-template-revertable"));
50
- const getEditorCommandLoader = () => function useEditorCommandLoader() {
52
+ var getEditorCommandLoader = () => function useEditorCommandLoader() {
51
53
  const {
52
54
  editorMode,
53
55
  isListViewOpen,
@@ -242,7 +244,7 @@ const getEditorCommandLoader = () => function useEditorCommandLoader() {
242
244
  isLoading: false
243
245
  };
244
246
  };
245
- const getEditedEntityContextualCommands = () => function useEditedEntityContextualCommands() {
247
+ var getEditedEntityContextualCommands = () => function useEditedEntityContextualCommands() {
246
248
  const { postType } = (0, import_data.useSelect)((select) => {
247
249
  const { getCurrentPostType } = select(import_store.store);
248
250
  return {
@@ -273,21 +275,33 @@ const getEditedEntityContextualCommands = () => function useEditedEntityContextu
273
275
  }
274
276
  return { isLoading: false, commands };
275
277
  };
276
- const getPageContentFocusCommands = () => function usePageContentFocusCommands() {
277
- const { onNavigateToEntityRecord, goBack, templateId, isPreviewMode } = (0, import_data.useSelect)((select) => {
278
+ var getPageContentFocusCommands = () => function usePageContentFocusCommands() {
279
+ const {
280
+ onNavigateToEntityRecord,
281
+ goBack,
282
+ templateId,
283
+ isPreviewMode,
284
+ canEditTemplate
285
+ } = (0, import_data.useSelect)((select) => {
278
286
  const {
279
287
  getRenderingMode,
280
288
  getEditorSettings: _getEditorSettings,
281
289
  getCurrentTemplateId
282
290
  } = (0, import_lock_unlock.unlock)(select(import_store.store));
283
291
  const editorSettings = _getEditorSettings();
292
+ const _templateId = getCurrentTemplateId();
284
293
  return {
285
294
  isTemplateHidden: getRenderingMode() === "post-only",
286
295
  onNavigateToEntityRecord: editorSettings.onNavigateToEntityRecord,
287
296
  getEditorSettings: _getEditorSettings,
288
297
  goBack: editorSettings.onNavigateToPreviousEntityRecord,
289
- templateId: getCurrentTemplateId(),
290
- isPreviewMode: editorSettings.isPreviewMode
298
+ templateId: _templateId,
299
+ isPreviewMode: editorSettings.isPreviewMode,
300
+ canEditTemplate: !!_templateId && select(import_core_data.store).canUser("update", {
301
+ kind: "postType",
302
+ name: "wp_template",
303
+ id: _templateId
304
+ })
291
305
  };
292
306
  }, []);
293
307
  const { editedRecord: template, hasResolved } = (0, import_core_data.useEntityRecord)(
@@ -299,7 +313,7 @@ const getPageContentFocusCommands = () => function usePageContentFocusCommands()
299
313
  return { isLoading: false, commands: [] };
300
314
  }
301
315
  const commands = [];
302
- if (templateId && hasResolved) {
316
+ if (templateId && hasResolved && canEditTemplate) {
303
317
  commands.push({
304
318
  name: "core/switch-to-template-focus",
305
319
  label: (0, import_i18n.sprintf)(
@@ -330,7 +344,7 @@ const getPageContentFocusCommands = () => function usePageContentFocusCommands()
330
344
  }
331
345
  return { isLoading: false, commands };
332
346
  };
333
- const getManipulateDocumentCommands = () => function useManipulateDocumentCommands() {
347
+ var getManipulateDocumentCommands = () => function useManipulateDocumentCommands() {
334
348
  const { postType, postId } = (0, import_data.useSelect)((select) => {
335
349
  const { getCurrentPostId, getCurrentPostType } = select(import_store.store);
336
350
  return {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/commands/index.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, isRTL, sprintf } from '@wordpress/i18n';\nimport {\n\tblockDefault,\n\tcode,\n\tdrawerLeft,\n\tdrawerRight,\n\tpencil,\n\tformatListBullets,\n\tlistView,\n\texternal,\n\tkeyboard,\n\tsymbol,\n\tpage,\n\tlayout,\n\trotateRight,\n\trotateLeft,\n} from '@wordpress/icons';\nimport { useCommandLoader } from '@wordpress/commands';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore, useEntityRecord } from '@wordpress/core-data';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\nimport {\n\tPATTERN_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_POST_TYPE,\n} from '../../store/constants';\nimport { modalName as patternRenameModalName } from '../pattern-rename-modal';\nimport { modalName as patternDuplicateModalName } from '../pattern-duplicate-modal';\nimport isTemplateRevertable from '../../store/utils/is-template-revertable';\n\nconst getEditorCommandLoader = () =>\n\tfunction useEditorCommandLoader() {\n\t\tconst {\n\t\t\teditorMode,\n\t\t\tisListViewOpen,\n\t\t\tshowBlockBreadcrumbs,\n\t\t\tisDistractionFree,\n\t\t\tisFocusMode,\n\t\t\tisPreviewMode,\n\t\t\tisViewable,\n\t\t\tisCodeEditingEnabled,\n\t\t\tisRichEditingEnabled,\n\t\t\tisPublishSidebarEnabled,\n\t\t} = useSelect( ( select ) => {\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst { isListViewOpened, getCurrentPostType, getEditorSettings } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst { getSettings } = select( blockEditorStore );\n\t\t\tconst { getPostType } = select( coreStore );\n\n\t\t\treturn {\n\t\t\t\teditorMode: get( 'core', 'editorMode' ) ?? 'visual',\n\t\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\t\tisFocusMode: get( 'core', 'focusMode' ),\n\t\t\t\tisPreviewMode: getSettings().isPreviewMode,\n\t\t\t\tisViewable:\n\t\t\t\t\tgetPostType( getCurrentPostType() )?.viewable ?? false,\n\t\t\t\tisCodeEditingEnabled: getEditorSettings().codeEditingEnabled,\n\t\t\t\tisRichEditingEnabled: getEditorSettings().richEditingEnabled,\n\t\t\t\tisPublishSidebarEnabled:\n\t\t\t\t\tselect( editorStore ).isPublishSidebarEnabled(),\n\t\t\t};\n\t\t}, [] );\n\t\tconst { getActiveComplementaryArea } = useSelect( interfaceStore );\n\t\tconst { toggle } = useDispatch( preferencesStore );\n\t\tconst { createInfoNotice } = useDispatch( noticesStore );\n\t\tconst {\n\t\t\t__unstableSaveForPreview,\n\t\t\tsetIsListViewOpened,\n\t\t\tswitchEditorMode,\n\t\t\ttoggleDistractionFree,\n\t\t\ttoggleSpotlightMode,\n\t\t\ttoggleTopToolbar,\n\t\t} = useDispatch( editorStore );\n\t\tconst { openModal, enableComplementaryArea, disableComplementaryArea } =\n\t\t\tuseDispatch( interfaceStore );\n\t\tconst { getCurrentPostId } = useSelect( editorStore );\n\t\tconst allowSwitchEditorMode =\n\t\t\tisCodeEditingEnabled && isRichEditingEnabled;\n\n\t\tif ( isPreviewMode ) {\n\t\t\treturn { commands: [], isLoading: false };\n\t\t}\n\n\t\tconst commands = [];\n\n\t\tcommands.push( {\n\t\t\tname: 'core/open-shortcut-help',\n\t\t\tlabel: __( 'Keyboard shortcuts' ),\n\t\t\ticon: keyboard,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tclose();\n\t\t\t\topenModal( 'editor/keyboard-shortcut-help' );\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-distraction-free',\n\t\t\tlabel: isDistractionFree\n\t\t\t\t? __( 'Exit Distraction free' )\n\t\t\t\t: __( 'Enter Distraction free' ),\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\ttoggleDistractionFree();\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/open-preferences',\n\t\t\tlabel: __( 'Editor preferences' ),\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tclose();\n\t\t\t\topenModal( 'editor/preferences' );\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-spotlight-mode',\n\t\t\tlabel: isFocusMode\n\t\t\t\t? __( 'Exit Spotlight mode' )\n\t\t\t\t: __( 'Enter Spotlight mode' ),\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\ttoggleSpotlightMode();\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-list-view',\n\t\t\tlabel: isListViewOpen\n\t\t\t\t? __( 'Close List View' )\n\t\t\t\t: __( 'Open List View' ),\n\t\t\ticon: listView,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tsetIsListViewOpened( ! isListViewOpen );\n\t\t\t\tclose();\n\t\t\t\tcreateInfoNotice(\n\t\t\t\t\tisListViewOpen\n\t\t\t\t\t\t? __( 'List View off.' )\n\t\t\t\t\t\t: __( 'List View on.' ),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'core/editor/toggle-list-view/notice',\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-top-toolbar',\n\t\t\tlabel: __( 'Top toolbar' ),\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\ttoggleTopToolbar();\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\n\t\tif ( allowSwitchEditorMode ) {\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/toggle-code-editor',\n\t\t\t\tlabel:\n\t\t\t\t\teditorMode === 'visual'\n\t\t\t\t\t\t? __( 'Open code editor' )\n\t\t\t\t\t\t: __( 'Exit code editor' ),\n\t\t\t\ticon: code,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tswitchEditorMode(\n\t\t\t\t\t\teditorMode === 'visual' ? 'text' : 'visual'\n\t\t\t\t\t);\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-breadcrumbs',\n\t\t\tlabel: showBlockBreadcrumbs\n\t\t\t\t? __( 'Hide block breadcrumbs' )\n\t\t\t\t: __( 'Show block breadcrumbs' ),\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\ttoggle( 'core', 'showBlockBreadcrumbs' );\n\t\t\t\tclose();\n\t\t\t\tcreateInfoNotice(\n\t\t\t\t\tshowBlockBreadcrumbs\n\t\t\t\t\t\t? __( 'Breadcrumbs hidden.' )\n\t\t\t\t\t\t: __( 'Breadcrumbs visible.' ),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'core/editor/toggle-breadcrumbs/notice',\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/open-settings-sidebar',\n\t\t\tlabel: __( 'Show or hide the Settings panel' ),\n\t\t\ticon: isRTL() ? drawerLeft : drawerRight,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tconst activeSidebar = getActiveComplementaryArea( 'core' );\n\t\t\t\tclose();\n\t\t\t\tif ( activeSidebar === 'edit-post/document' ) {\n\t\t\t\t\tdisableComplementaryArea( 'core' );\n\t\t\t\t} else {\n\t\t\t\t\tenableComplementaryArea( 'core', 'edit-post/document' );\n\t\t\t\t}\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/open-block-inspector',\n\t\t\tlabel: __( 'Show or hide the Block settings panel' ),\n\t\t\ticon: blockDefault,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tconst activeSidebar = getActiveComplementaryArea( 'core' );\n\t\t\t\tclose();\n\t\t\t\tif ( activeSidebar === 'edit-post/block' ) {\n\t\t\t\t\tdisableComplementaryArea( 'core' );\n\t\t\t\t} else {\n\t\t\t\t\tenableComplementaryArea( 'core', 'edit-post/block' );\n\t\t\t\t}\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-publish-sidebar',\n\t\t\tlabel: isPublishSidebarEnabled\n\t\t\t\t? __( 'Disable pre-publish checks' )\n\t\t\t\t: __( 'Enable pre-publish checks' ),\n\t\t\ticon: formatListBullets,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tclose();\n\t\t\t\ttoggle( 'core', 'isPublishSidebarEnabled' );\n\t\t\t\tcreateInfoNotice(\n\t\t\t\t\tisPublishSidebarEnabled\n\t\t\t\t\t\t? __( 'Pre-publish checks disabled.' )\n\t\t\t\t\t\t: __( 'Pre-publish checks enabled.' ),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'core/editor/publish-sidebar/notice',\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\t\t} );\n\n\t\tif ( isViewable ) {\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/preview-link',\n\t\t\t\tlabel: __( 'Preview in a new tab' ),\n\t\t\t\ticon: external,\n\t\t\t\tcallback: async ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tconst postId = getCurrentPostId();\n\t\t\t\t\tconst link = await __unstableSaveForPreview();\n\t\t\t\t\twindow.open( link, `wp-preview-${ postId }` );\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\treturn {\n\t\t\tcommands,\n\t\t\tisLoading: false,\n\t\t};\n\t};\n\nconst getEditedEntityContextualCommands = () =>\n\tfunction useEditedEntityContextualCommands() {\n\t\tconst { postType } = useSelect( ( select ) => {\n\t\t\tconst { getCurrentPostType } = select( editorStore );\n\t\t\treturn {\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t};\n\t\t}, [] );\n\t\tconst { openModal } = useDispatch( interfaceStore );\n\t\tconst commands = [];\n\n\t\tif ( postType === PATTERN_POST_TYPE ) {\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/rename-pattern',\n\t\t\t\tlabel: __( 'Rename pattern' ),\n\t\t\t\ticon: pencil,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\topenModal( patternRenameModalName );\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/duplicate-pattern',\n\t\t\t\tlabel: __( 'Duplicate pattern' ),\n\t\t\t\ticon: symbol,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\topenModal( patternDuplicateModalName );\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\treturn { isLoading: false, commands };\n\t};\n\nconst getPageContentFocusCommands = () =>\n\tfunction usePageContentFocusCommands() {\n\t\tconst { onNavigateToEntityRecord, goBack, templateId, isPreviewMode } =\n\t\t\tuseSelect( ( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\tgetRenderingMode,\n\t\t\t\t\tgetEditorSettings: _getEditorSettings,\n\t\t\t\t\tgetCurrentTemplateId,\n\t\t\t\t} = unlock( select( editorStore ) );\n\t\t\t\tconst editorSettings = _getEditorSettings();\n\t\t\t\treturn {\n\t\t\t\t\tisTemplateHidden: getRenderingMode() === 'post-only',\n\t\t\t\t\tonNavigateToEntityRecord:\n\t\t\t\t\t\teditorSettings.onNavigateToEntityRecord,\n\t\t\t\t\tgetEditorSettings: _getEditorSettings,\n\t\t\t\t\tgoBack: editorSettings.onNavigateToPreviousEntityRecord,\n\t\t\t\t\ttemplateId: getCurrentTemplateId(),\n\t\t\t\t\tisPreviewMode: editorSettings.isPreviewMode,\n\t\t\t\t};\n\t\t\t}, [] );\n\t\tconst { editedRecord: template, hasResolved } = useEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_template',\n\t\t\ttemplateId\n\t\t);\n\n\t\tif ( isPreviewMode ) {\n\t\t\treturn { isLoading: false, commands: [] };\n\t\t}\n\n\t\tconst commands = [];\n\n\t\tif ( templateId && hasResolved ) {\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/switch-to-template-focus',\n\t\t\t\tlabel: sprintf(\n\t\t\t\t\t/* translators: %s: template title */\n\t\t\t\t\t__( 'Edit template: %s' ),\n\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t),\n\t\t\t\ticon: layout,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tonNavigateToEntityRecord( {\n\t\t\t\t\t\tpostId: templateId,\n\t\t\t\t\t\tpostType: 'wp_template',\n\t\t\t\t\t} );\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\tif ( !! goBack ) {\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/switch-to-previous-entity',\n\t\t\t\tlabel: __( 'Go back' ),\n\t\t\t\ticon: page,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tgoBack();\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\treturn { isLoading: false, commands };\n\t};\n\nconst getManipulateDocumentCommands = () =>\n\tfunction useManipulateDocumentCommands() {\n\t\tconst { postType, postId } = useSelect( ( select ) => {\n\t\t\tconst { getCurrentPostId, getCurrentPostType } =\n\t\t\t\tselect( editorStore );\n\t\t\treturn {\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t\tpostId: getCurrentPostId(),\n\t\t\t};\n\t\t}, [] );\n\t\tconst { editedRecord: template, hasResolved } = useEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\t\tconst { revertTemplate } = unlock( useDispatch( editorStore ) );\n\n\t\tif (\n\t\t\t! hasResolved ||\n\t\t\t! [ TEMPLATE_PART_POST_TYPE, TEMPLATE_POST_TYPE ].includes(\n\t\t\t\tpostType\n\t\t\t)\n\t\t) {\n\t\t\treturn { isLoading: true, commands: [] };\n\t\t}\n\n\t\tconst commands = [];\n\n\t\tif ( isTemplateRevertable( template ) ) {\n\t\t\tconst label =\n\t\t\t\ttemplate.type === TEMPLATE_POST_TYPE\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t/* translators: %s: template title */\n\t\t\t\t\t\t\t__( 'Reset template: %s' ),\n\t\t\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t\t )\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t/* translators: %s: template part title */\n\t\t\t\t\t\t\t__( 'Reset template part: %s' ),\n\t\t\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t\t );\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/reset-template',\n\t\t\t\tlabel,\n\t\t\t\ticon: isRTL() ? rotateRight : rotateLeft,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\trevertTemplate( template );\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\treturn {\n\t\t\tisLoading: ! hasResolved,\n\t\t\tcommands,\n\t\t};\n\t};\n\nexport default function useCommands() {\n\tuseCommandLoader( {\n\t\tname: 'core/editor/edit-ui',\n\t\thook: getEditorCommandLoader(),\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/editor/contextual-commands',\n\t\thook: getEditedEntityContextualCommands(),\n\t\tcontext: 'entity-edit',\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/editor/page-content-focus',\n\t\thook: getPageContentFocusCommands(),\n\t\tcontext: 'entity-edit',\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/manipulate-document',\n\t\thook: getManipulateDocumentCommands(),\n\t} );\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAuC;AACvC,kBAAmC;AACnC,mBAeO;AACP,sBAAiC;AACjC,yBAA0C;AAC1C,qBAAsC;AACtC,0BAA0C;AAC1C,uBAAoD;AACpD,uBAAwC;AACxC,2BAA+B;AAK/B,yBAAuB;AACvB,mBAAqC;AACrC,uBAIO;AACP,kCAAoD;AACpD,qCAAuD;AACvD,oCAAiC;AAEj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QACA;AAAA;AAAA,UAEA,gBAAI,yBAA0B;AAAA,UAC9B,qCAAgB,SAAS,KAAM;AAAA,IAC/B;AACJ,aAAS,KAAM;AAAA,MACd,MAAM;AAAA,MACN;AAAA,MACA,UAAM,mBAAM,IAAI,2BAAc;AAAA,MAC9B,UAAU,CAAE,EAAE,MAAM,MAAO;AAC1B,uBAAgB,QAAS;AACzB,cAAM;AAAA,MACP;AAAA,IACD,CAAE;AAAA,EACH;AAEA,SAAO;AAAA,IACN,WAAW,CAAE;AAAA,IACb;AAAA,EACD;AACD;AAEc,SAAR,cAA+B;AACrC,wCAAkB;AAAA,IACjB,MAAM;AAAA,IACN,MAAM,uBAAuB;AAAA,EAC9B,CAAE;AAEF,wCAAkB;AAAA,IACjB,MAAM;AAAA,IACN,MAAM,kCAAkC;AAAA,IACxC,SAAS;AAAA,EACV,CAAE;AAEF,wCAAkB;AAAA,IACjB,MAAM;AAAA,IACN,MAAM,4BAA4B;AAAA,IAClC,SAAS;AAAA,EACV,CAAE;AAEF,wCAAkB;AAAA,IACjB,MAAM;AAAA,IACN,MAAM,8BAA8B;AAAA,EACrC,CAAE;AACH;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, isRTL, sprintf } from '@wordpress/i18n';\nimport {\n\tblockDefault,\n\tcode,\n\tdrawerLeft,\n\tdrawerRight,\n\tpencil,\n\tformatListBullets,\n\tlistView,\n\texternal,\n\tkeyboard,\n\tsymbol,\n\tpage,\n\tlayout,\n\trotateRight,\n\trotateLeft,\n} from '@wordpress/icons';\nimport { useCommandLoader } from '@wordpress/commands';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore, useEntityRecord } from '@wordpress/core-data';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\nimport {\n\tPATTERN_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_POST_TYPE,\n} from '../../store/constants';\nimport { modalName as patternRenameModalName } from '../pattern-rename-modal';\nimport { modalName as patternDuplicateModalName } from '../pattern-duplicate-modal';\nimport isTemplateRevertable from '../../store/utils/is-template-revertable';\n\nconst getEditorCommandLoader = () =>\n\tfunction useEditorCommandLoader() {\n\t\tconst {\n\t\t\teditorMode,\n\t\t\tisListViewOpen,\n\t\t\tshowBlockBreadcrumbs,\n\t\t\tisDistractionFree,\n\t\t\tisFocusMode,\n\t\t\tisPreviewMode,\n\t\t\tisViewable,\n\t\t\tisCodeEditingEnabled,\n\t\t\tisRichEditingEnabled,\n\t\t\tisPublishSidebarEnabled,\n\t\t} = useSelect( ( select ) => {\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst { isListViewOpened, getCurrentPostType, getEditorSettings } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst { getSettings } = select( blockEditorStore );\n\t\t\tconst { getPostType } = select( coreStore );\n\n\t\t\treturn {\n\t\t\t\teditorMode: get( 'core', 'editorMode' ) ?? 'visual',\n\t\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\t\tisFocusMode: get( 'core', 'focusMode' ),\n\t\t\t\tisPreviewMode: getSettings().isPreviewMode,\n\t\t\t\tisViewable:\n\t\t\t\t\tgetPostType( getCurrentPostType() )?.viewable ?? false,\n\t\t\t\tisCodeEditingEnabled: getEditorSettings().codeEditingEnabled,\n\t\t\t\tisRichEditingEnabled: getEditorSettings().richEditingEnabled,\n\t\t\t\tisPublishSidebarEnabled:\n\t\t\t\t\tselect( editorStore ).isPublishSidebarEnabled(),\n\t\t\t};\n\t\t}, [] );\n\t\tconst { getActiveComplementaryArea } = useSelect( interfaceStore );\n\t\tconst { toggle } = useDispatch( preferencesStore );\n\t\tconst { createInfoNotice } = useDispatch( noticesStore );\n\t\tconst {\n\t\t\t__unstableSaveForPreview,\n\t\t\tsetIsListViewOpened,\n\t\t\tswitchEditorMode,\n\t\t\ttoggleDistractionFree,\n\t\t\ttoggleSpotlightMode,\n\t\t\ttoggleTopToolbar,\n\t\t} = useDispatch( editorStore );\n\t\tconst { openModal, enableComplementaryArea, disableComplementaryArea } =\n\t\t\tuseDispatch( interfaceStore );\n\t\tconst { getCurrentPostId } = useSelect( editorStore );\n\t\tconst allowSwitchEditorMode =\n\t\t\tisCodeEditingEnabled && isRichEditingEnabled;\n\n\t\tif ( isPreviewMode ) {\n\t\t\treturn { commands: [], isLoading: false };\n\t\t}\n\n\t\tconst commands = [];\n\n\t\tcommands.push( {\n\t\t\tname: 'core/open-shortcut-help',\n\t\t\tlabel: __( 'Keyboard shortcuts' ),\n\t\t\ticon: keyboard,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tclose();\n\t\t\t\topenModal( 'editor/keyboard-shortcut-help' );\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-distraction-free',\n\t\t\tlabel: isDistractionFree\n\t\t\t\t? __( 'Exit Distraction free' )\n\t\t\t\t: __( 'Enter Distraction free' ),\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\ttoggleDistractionFree();\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/open-preferences',\n\t\t\tlabel: __( 'Editor preferences' ),\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tclose();\n\t\t\t\topenModal( 'editor/preferences' );\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-spotlight-mode',\n\t\t\tlabel: isFocusMode\n\t\t\t\t? __( 'Exit Spotlight mode' )\n\t\t\t\t: __( 'Enter Spotlight mode' ),\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\ttoggleSpotlightMode();\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-list-view',\n\t\t\tlabel: isListViewOpen\n\t\t\t\t? __( 'Close List View' )\n\t\t\t\t: __( 'Open List View' ),\n\t\t\ticon: listView,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tsetIsListViewOpened( ! isListViewOpen );\n\t\t\t\tclose();\n\t\t\t\tcreateInfoNotice(\n\t\t\t\t\tisListViewOpen\n\t\t\t\t\t\t? __( 'List View off.' )\n\t\t\t\t\t\t: __( 'List View on.' ),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'core/editor/toggle-list-view/notice',\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-top-toolbar',\n\t\t\tlabel: __( 'Top toolbar' ),\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\ttoggleTopToolbar();\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\n\t\tif ( allowSwitchEditorMode ) {\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/toggle-code-editor',\n\t\t\t\tlabel:\n\t\t\t\t\teditorMode === 'visual'\n\t\t\t\t\t\t? __( 'Open code editor' )\n\t\t\t\t\t\t: __( 'Exit code editor' ),\n\t\t\t\ticon: code,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tswitchEditorMode(\n\t\t\t\t\t\teditorMode === 'visual' ? 'text' : 'visual'\n\t\t\t\t\t);\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-breadcrumbs',\n\t\t\tlabel: showBlockBreadcrumbs\n\t\t\t\t? __( 'Hide block breadcrumbs' )\n\t\t\t\t: __( 'Show block breadcrumbs' ),\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\ttoggle( 'core', 'showBlockBreadcrumbs' );\n\t\t\t\tclose();\n\t\t\t\tcreateInfoNotice(\n\t\t\t\t\tshowBlockBreadcrumbs\n\t\t\t\t\t\t? __( 'Breadcrumbs hidden.' )\n\t\t\t\t\t\t: __( 'Breadcrumbs visible.' ),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'core/editor/toggle-breadcrumbs/notice',\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/open-settings-sidebar',\n\t\t\tlabel: __( 'Show or hide the Settings panel' ),\n\t\t\ticon: isRTL() ? drawerLeft : drawerRight,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tconst activeSidebar = getActiveComplementaryArea( 'core' );\n\t\t\t\tclose();\n\t\t\t\tif ( activeSidebar === 'edit-post/document' ) {\n\t\t\t\t\tdisableComplementaryArea( 'core' );\n\t\t\t\t} else {\n\t\t\t\t\tenableComplementaryArea( 'core', 'edit-post/document' );\n\t\t\t\t}\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/open-block-inspector',\n\t\t\tlabel: __( 'Show or hide the Block settings panel' ),\n\t\t\ticon: blockDefault,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tconst activeSidebar = getActiveComplementaryArea( 'core' );\n\t\t\t\tclose();\n\t\t\t\tif ( activeSidebar === 'edit-post/block' ) {\n\t\t\t\t\tdisableComplementaryArea( 'core' );\n\t\t\t\t} else {\n\t\t\t\t\tenableComplementaryArea( 'core', 'edit-post/block' );\n\t\t\t\t}\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-publish-sidebar',\n\t\t\tlabel: isPublishSidebarEnabled\n\t\t\t\t? __( 'Disable pre-publish checks' )\n\t\t\t\t: __( 'Enable pre-publish checks' ),\n\t\t\ticon: formatListBullets,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tclose();\n\t\t\t\ttoggle( 'core', 'isPublishSidebarEnabled' );\n\t\t\t\tcreateInfoNotice(\n\t\t\t\t\tisPublishSidebarEnabled\n\t\t\t\t\t\t? __( 'Pre-publish checks disabled.' )\n\t\t\t\t\t\t: __( 'Pre-publish checks enabled.' ),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'core/editor/publish-sidebar/notice',\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\t\t} );\n\n\t\tif ( isViewable ) {\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/preview-link',\n\t\t\t\tlabel: __( 'Preview in a new tab' ),\n\t\t\t\ticon: external,\n\t\t\t\tcallback: async ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tconst postId = getCurrentPostId();\n\t\t\t\t\tconst link = await __unstableSaveForPreview();\n\t\t\t\t\twindow.open( link, `wp-preview-${ postId }` );\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\treturn {\n\t\t\tcommands,\n\t\t\tisLoading: false,\n\t\t};\n\t};\n\nconst getEditedEntityContextualCommands = () =>\n\tfunction useEditedEntityContextualCommands() {\n\t\tconst { postType } = useSelect( ( select ) => {\n\t\t\tconst { getCurrentPostType } = select( editorStore );\n\t\t\treturn {\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t};\n\t\t}, [] );\n\t\tconst { openModal } = useDispatch( interfaceStore );\n\t\tconst commands = [];\n\n\t\tif ( postType === PATTERN_POST_TYPE ) {\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/rename-pattern',\n\t\t\t\tlabel: __( 'Rename pattern' ),\n\t\t\t\ticon: pencil,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\topenModal( patternRenameModalName );\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/duplicate-pattern',\n\t\t\t\tlabel: __( 'Duplicate pattern' ),\n\t\t\t\ticon: symbol,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\topenModal( patternDuplicateModalName );\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\treturn { isLoading: false, commands };\n\t};\n\nconst getPageContentFocusCommands = () =>\n\tfunction usePageContentFocusCommands() {\n\t\tconst {\n\t\t\tonNavigateToEntityRecord,\n\t\t\tgoBack,\n\t\t\ttemplateId,\n\t\t\tisPreviewMode,\n\t\t\tcanEditTemplate,\n\t\t} = useSelect( ( select ) => {\n\t\t\tconst {\n\t\t\t\tgetRenderingMode,\n\t\t\t\tgetEditorSettings: _getEditorSettings,\n\t\t\t\tgetCurrentTemplateId,\n\t\t\t} = unlock( select( editorStore ) );\n\t\t\tconst editorSettings = _getEditorSettings();\n\t\t\tconst _templateId = getCurrentTemplateId();\n\t\t\treturn {\n\t\t\t\tisTemplateHidden: getRenderingMode() === 'post-only',\n\t\t\t\tonNavigateToEntityRecord:\n\t\t\t\t\teditorSettings.onNavigateToEntityRecord,\n\t\t\t\tgetEditorSettings: _getEditorSettings,\n\t\t\t\tgoBack: editorSettings.onNavigateToPreviousEntityRecord,\n\t\t\t\ttemplateId: _templateId,\n\t\t\t\tisPreviewMode: editorSettings.isPreviewMode,\n\t\t\t\tcanEditTemplate:\n\t\t\t\t\t!! _templateId &&\n\t\t\t\t\tselect( coreStore ).canUser( 'update', {\n\t\t\t\t\t\tkind: 'postType',\n\t\t\t\t\t\tname: 'wp_template',\n\t\t\t\t\t\tid: _templateId,\n\t\t\t\t\t} ),\n\t\t\t};\n\t\t}, [] );\n\t\tconst { editedRecord: template, hasResolved } = useEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_template',\n\t\t\ttemplateId\n\t\t);\n\n\t\tif ( isPreviewMode ) {\n\t\t\treturn { isLoading: false, commands: [] };\n\t\t}\n\n\t\tconst commands = [];\n\n\t\tif ( templateId && hasResolved && canEditTemplate ) {\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/switch-to-template-focus',\n\t\t\t\tlabel: sprintf(\n\t\t\t\t\t/* translators: %s: template title */\n\t\t\t\t\t__( 'Edit template: %s' ),\n\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t),\n\t\t\t\ticon: layout,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tonNavigateToEntityRecord( {\n\t\t\t\t\t\tpostId: templateId,\n\t\t\t\t\t\tpostType: 'wp_template',\n\t\t\t\t\t} );\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\tif ( !! goBack ) {\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/switch-to-previous-entity',\n\t\t\t\tlabel: __( 'Go back' ),\n\t\t\t\ticon: page,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tgoBack();\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\treturn { isLoading: false, commands };\n\t};\n\nconst getManipulateDocumentCommands = () =>\n\tfunction useManipulateDocumentCommands() {\n\t\tconst { postType, postId } = useSelect( ( select ) => {\n\t\t\tconst { getCurrentPostId, getCurrentPostType } =\n\t\t\t\tselect( editorStore );\n\t\t\treturn {\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t\tpostId: getCurrentPostId(),\n\t\t\t};\n\t\t}, [] );\n\t\tconst { editedRecord: template, hasResolved } = useEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\t\tconst { revertTemplate } = unlock( useDispatch( editorStore ) );\n\n\t\tif (\n\t\t\t! hasResolved ||\n\t\t\t! [ TEMPLATE_PART_POST_TYPE, TEMPLATE_POST_TYPE ].includes(\n\t\t\t\tpostType\n\t\t\t)\n\t\t) {\n\t\t\treturn { isLoading: true, commands: [] };\n\t\t}\n\n\t\tconst commands = [];\n\n\t\tif ( isTemplateRevertable( template ) ) {\n\t\t\tconst label =\n\t\t\t\ttemplate.type === TEMPLATE_POST_TYPE\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t/* translators: %s: template title */\n\t\t\t\t\t\t\t__( 'Reset template: %s' ),\n\t\t\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t\t )\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t/* translators: %s: template part title */\n\t\t\t\t\t\t\t__( 'Reset template part: %s' ),\n\t\t\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t\t );\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/reset-template',\n\t\t\t\tlabel,\n\t\t\t\ticon: isRTL() ? rotateRight : rotateLeft,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\trevertTemplate( template );\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\treturn {\n\t\t\tisLoading: ! hasResolved,\n\t\t\tcommands,\n\t\t};\n\t};\n\nexport default function useCommands() {\n\tuseCommandLoader( {\n\t\tname: 'core/editor/edit-ui',\n\t\thook: getEditorCommandLoader(),\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/editor/contextual-commands',\n\t\thook: getEditedEntityContextualCommands(),\n\t\tcontext: 'entity-edit',\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/editor/page-content-focus',\n\t\thook: getPageContentFocusCommands(),\n\t\tcontext: 'entity-edit',\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/manipulate-document',\n\t\thook: getManipulateDocumentCommands(),\n\t} );\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAuC;AACvC,kBAAmC;AACnC,mBAeO;AACP,sBAAiC;AACjC,yBAA0C;AAC1C,qBAAsC;AACtC,0BAA0C;AAC1C,uBAAoD;AACpD,uBAAwC;AACxC,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,CAAE,CAAE,0CAAyB,mCAAmB,EAAE;AAAA,IACjD;AAAA,EACD,GACC;AACD,WAAO,EAAE,WAAW,MAAM,UAAU,CAAC,EAAE;AAAA,EACxC;AAEA,QAAM,WAAW,CAAC;AAElB,UAAK,8BAAAO,SAAsB,QAAS,GAAI;AACvC,UAAM,QACL,SAAS,SAAS,0CACf;AAAA;AAAA,UAEA,gBAAI,oBAAqB;AAAA,UACzB,qCAAgB,SAAS,KAAM;AAAA,IAC/B,QACA;AAAA;AAAA,UAEA,gBAAI,yBAA0B;AAAA,UAC9B,qCAAgB,SAAS,KAAM;AAAA,IAC/B;AACJ,aAAS,KAAM;AAAA,MACd,MAAM;AAAA,MACN;AAAA,MACA,UAAM,mBAAM,IAAI,2BAAc;AAAA,MAC9B,UAAU,CAAE,EAAE,MAAM,MAAO;AAC1B,uBAAgB,QAAS;AACzB,cAAM;AAAA,MACP;AAAA,IACD,CAAE;AAAA,EACH;AAEA,SAAO;AAAA,IACN,WAAW,CAAE;AAAA,IACb;AAAA,EACD;AACD;AAEc,SAAR,cAA+B;AACrC,wCAAkB;AAAA,IACjB,MAAM;AAAA,IACN,MAAM,uBAAuB;AAAA,EAC9B,CAAE;AAEF,wCAAkB;AAAA,IACjB,MAAM;AAAA,IACN,MAAM,kCAAkC;AAAA,IACxC,SAAS;AAAA,EACV,CAAE;AAEF,wCAAkB;AAAA,IACjB,MAAM;AAAA,IACN,MAAM,4BAA4B;AAAA,IAClC,SAAS;AAAA,EACV,CAAE;AAEF,wCAAkB;AAAA,IACjB,MAAM;AAAA,IACN,MAAM,8BAA8B;AAAA,EACrC,CAAE;AACH;",
6
6
  "names": ["preferencesStore", "editorStore", "blockEditorStore", "coreStore", "interfaceStore", "noticesStore", "patternRenameModalName", "patternDuplicateModalName", "isTemplateRevertable"]
7
7
  }
@@ -26,6 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // packages/editor/src/components/deprecated.js
29
31
  var deprecated_exports = {};
30
32
  __export(deprecated_exports, {
31
33
  AlignmentToolbar: () => AlignmentToolbar,
@@ -83,11 +85,11 @@ __export(deprecated_exports, {
83
85
  withFontSizes: () => withFontSizes
84
86
  });
85
87
  module.exports = __toCommonJS(deprecated_exports);
86
- var import_jsx_runtime = require("react/jsx-runtime");
87
88
  var import_deprecated = __toESM(require("@wordpress/deprecated"));
88
89
  var import_element = require("@wordpress/element");
89
90
  var import_block_editor = require("@wordpress/block-editor");
90
91
  var import_server_side_render = __toESM(require("@wordpress/server-side-render"));
92
+ var import_jsx_runtime = require("react/jsx-runtime");
91
93
  function deprecateComponent(name, Wrapped, staticsToHoist = []) {
92
94
  const Component = (0, import_element.forwardRef)((props, ref) => {
93
95
  (0, import_deprecated.default)("wp.editor." + name, {
@@ -115,172 +117,172 @@ function deprecateFunction(name, func) {
115
117
  return func(...args);
116
118
  };
117
119
  }
118
- const RichText = deprecateComponent("RichText", import_block_editor.RichText, ["Content"]);
120
+ var RichText = deprecateComponent("RichText", import_block_editor.RichText, ["Content"]);
119
121
  RichText.isEmpty = deprecateFunction(
120
122
  "RichText.isEmpty",
121
123
  import_block_editor.RichText.isEmpty
122
124
  );
123
- const Autocomplete = deprecateComponent(
125
+ var Autocomplete = deprecateComponent(
124
126
  "Autocomplete",
125
127
  import_block_editor.Autocomplete
126
128
  );
127
- const AlignmentToolbar = deprecateComponent(
129
+ var AlignmentToolbar = deprecateComponent(
128
130
  "AlignmentToolbar",
129
131
  import_block_editor.AlignmentToolbar
130
132
  );
131
- const BlockAlignmentToolbar = deprecateComponent(
133
+ var BlockAlignmentToolbar = deprecateComponent(
132
134
  "BlockAlignmentToolbar",
133
135
  import_block_editor.BlockAlignmentToolbar
134
136
  );
135
- const BlockControls = deprecateComponent(
137
+ var BlockControls = deprecateComponent(
136
138
  "BlockControls",
137
139
  import_block_editor.BlockControls,
138
140
  ["Slot"]
139
141
  );
140
- const BlockEdit = deprecateComponent("BlockEdit", import_block_editor.BlockEdit);
141
- const BlockEditorKeyboardShortcuts = deprecateComponent(
142
+ var BlockEdit = deprecateComponent("BlockEdit", import_block_editor.BlockEdit);
143
+ var BlockEditorKeyboardShortcuts = deprecateComponent(
142
144
  "BlockEditorKeyboardShortcuts",
143
145
  import_block_editor.BlockEditorKeyboardShortcuts
144
146
  );
145
- const BlockFormatControls = deprecateComponent(
147
+ var BlockFormatControls = deprecateComponent(
146
148
  "BlockFormatControls",
147
149
  import_block_editor.BlockFormatControls,
148
150
  ["Slot"]
149
151
  );
150
- const BlockIcon = deprecateComponent("BlockIcon", import_block_editor.BlockIcon);
151
- const BlockInspector = deprecateComponent(
152
+ var BlockIcon = deprecateComponent("BlockIcon", import_block_editor.BlockIcon);
153
+ var BlockInspector = deprecateComponent(
152
154
  "BlockInspector",
153
155
  import_block_editor.BlockInspector
154
156
  );
155
- const BlockList = deprecateComponent("BlockList", import_block_editor.BlockList);
156
- const BlockMover = deprecateComponent("BlockMover", import_block_editor.BlockMover);
157
- const BlockNavigationDropdown = deprecateComponent(
157
+ var BlockList = deprecateComponent("BlockList", import_block_editor.BlockList);
158
+ var BlockMover = deprecateComponent("BlockMover", import_block_editor.BlockMover);
159
+ var BlockNavigationDropdown = deprecateComponent(
158
160
  "BlockNavigationDropdown",
159
161
  import_block_editor.BlockNavigationDropdown
160
162
  );
161
- const BlockSelectionClearer = deprecateComponent(
163
+ var BlockSelectionClearer = deprecateComponent(
162
164
  "BlockSelectionClearer",
163
165
  import_block_editor.BlockSelectionClearer
164
166
  );
165
- const BlockSettingsMenu = deprecateComponent(
167
+ var BlockSettingsMenu = deprecateComponent(
166
168
  "BlockSettingsMenu",
167
169
  import_block_editor.BlockSettingsMenu
168
170
  );
169
- const BlockTitle = deprecateComponent("BlockTitle", import_block_editor.BlockTitle);
170
- const BlockToolbar = deprecateComponent(
171
+ var BlockTitle = deprecateComponent("BlockTitle", import_block_editor.BlockTitle);
172
+ var BlockToolbar = deprecateComponent(
171
173
  "BlockToolbar",
172
174
  import_block_editor.BlockToolbar
173
175
  );
174
- const ColorPalette = deprecateComponent(
176
+ var ColorPalette = deprecateComponent(
175
177
  "ColorPalette",
176
178
  import_block_editor.ColorPalette
177
179
  );
178
- const ContrastChecker = deprecateComponent(
180
+ var ContrastChecker = deprecateComponent(
179
181
  "ContrastChecker",
180
182
  import_block_editor.ContrastChecker
181
183
  );
182
- const CopyHandler = deprecateComponent("CopyHandler", import_block_editor.CopyHandler);
183
- const DefaultBlockAppender = deprecateComponent(
184
+ var CopyHandler = deprecateComponent("CopyHandler", import_block_editor.CopyHandler);
185
+ var DefaultBlockAppender = deprecateComponent(
184
186
  "DefaultBlockAppender",
185
187
  import_block_editor.DefaultBlockAppender
186
188
  );
187
- const FontSizePicker = deprecateComponent(
189
+ var FontSizePicker = deprecateComponent(
188
190
  "FontSizePicker",
189
191
  import_block_editor.FontSizePicker
190
192
  );
191
- const Inserter = deprecateComponent("Inserter", import_block_editor.Inserter);
192
- const InnerBlocks = deprecateComponent("InnerBlocks", import_block_editor.InnerBlocks, [
193
+ var Inserter = deprecateComponent("Inserter", import_block_editor.Inserter);
194
+ var InnerBlocks = deprecateComponent("InnerBlocks", import_block_editor.InnerBlocks, [
193
195
  "ButtonBlockAppender",
194
196
  "DefaultBlockAppender",
195
197
  "Content"
196
198
  ]);
197
- const InspectorAdvancedControls = deprecateComponent(
199
+ var InspectorAdvancedControls = deprecateComponent(
198
200
  "InspectorAdvancedControls",
199
201
  import_block_editor.InspectorAdvancedControls,
200
202
  ["Slot"]
201
203
  );
202
- const InspectorControls = deprecateComponent(
204
+ var InspectorControls = deprecateComponent(
203
205
  "InspectorControls",
204
206
  import_block_editor.InspectorControls,
205
207
  ["Slot"]
206
208
  );
207
- const PanelColorSettings = deprecateComponent(
209
+ var PanelColorSettings = deprecateComponent(
208
210
  "PanelColorSettings",
209
211
  import_block_editor.PanelColorSettings
210
212
  );
211
- const PlainText = deprecateComponent("PlainText", import_block_editor.PlainText);
212
- const RichTextShortcut = deprecateComponent(
213
+ var PlainText = deprecateComponent("PlainText", import_block_editor.PlainText);
214
+ var RichTextShortcut = deprecateComponent(
213
215
  "RichTextShortcut",
214
216
  import_block_editor.RichTextShortcut
215
217
  );
216
- const RichTextToolbarButton = deprecateComponent(
218
+ var RichTextToolbarButton = deprecateComponent(
217
219
  "RichTextToolbarButton",
218
220
  import_block_editor.RichTextToolbarButton
219
221
  );
220
- const __unstableRichTextInputEvent = deprecateComponent(
222
+ var __unstableRichTextInputEvent = deprecateComponent(
221
223
  "__unstableRichTextInputEvent",
222
224
  import_block_editor.__unstableRichTextInputEvent
223
225
  );
224
- const MediaPlaceholder = deprecateComponent(
226
+ var MediaPlaceholder = deprecateComponent(
225
227
  "MediaPlaceholder",
226
228
  import_block_editor.MediaPlaceholder
227
229
  );
228
- const MediaUpload = deprecateComponent("MediaUpload", import_block_editor.MediaUpload);
229
- const MediaUploadCheck = deprecateComponent(
230
+ var MediaUpload = deprecateComponent("MediaUpload", import_block_editor.MediaUpload);
231
+ var MediaUploadCheck = deprecateComponent(
230
232
  "MediaUploadCheck",
231
233
  import_block_editor.MediaUploadCheck
232
234
  );
233
- const MultiSelectScrollIntoView = deprecateComponent(
235
+ var MultiSelectScrollIntoView = deprecateComponent(
234
236
  "MultiSelectScrollIntoView",
235
237
  import_block_editor.MultiSelectScrollIntoView
236
238
  );
237
- const NavigableToolbar = deprecateComponent(
239
+ var NavigableToolbar = deprecateComponent(
238
240
  "NavigableToolbar",
239
241
  import_block_editor.NavigableToolbar
240
242
  );
241
- const ObserveTyping = deprecateComponent(
243
+ var ObserveTyping = deprecateComponent(
242
244
  "ObserveTyping",
243
245
  import_block_editor.ObserveTyping
244
246
  );
245
- const SkipToSelectedBlock = deprecateComponent(
247
+ var SkipToSelectedBlock = deprecateComponent(
246
248
  "SkipToSelectedBlock",
247
249
  import_block_editor.SkipToSelectedBlock
248
250
  );
249
- const URLInput = deprecateComponent("URLInput", import_block_editor.URLInput);
250
- const URLInputButton = deprecateComponent(
251
+ var URLInput = deprecateComponent("URLInput", import_block_editor.URLInput);
252
+ var URLInputButton = deprecateComponent(
251
253
  "URLInputButton",
252
254
  import_block_editor.URLInputButton
253
255
  );
254
- const URLPopover = deprecateComponent("URLPopover", import_block_editor.URLPopover);
255
- const Warning = deprecateComponent("Warning", import_block_editor.Warning);
256
- const WritingFlow = deprecateComponent("WritingFlow", import_block_editor.WritingFlow);
257
- const createCustomColorsHOC = deprecateFunction(
256
+ var URLPopover = deprecateComponent("URLPopover", import_block_editor.URLPopover);
257
+ var Warning = deprecateComponent("Warning", import_block_editor.Warning);
258
+ var WritingFlow = deprecateComponent("WritingFlow", import_block_editor.WritingFlow);
259
+ var createCustomColorsHOC = deprecateFunction(
258
260
  "createCustomColorsHOC",
259
261
  import_block_editor.createCustomColorsHOC
260
262
  );
261
- const getColorClassName = deprecateFunction(
263
+ var getColorClassName = deprecateFunction(
262
264
  "getColorClassName",
263
265
  import_block_editor.getColorClassName
264
266
  );
265
- const getColorObjectByAttributeValues = deprecateFunction(
267
+ var getColorObjectByAttributeValues = deprecateFunction(
266
268
  "getColorObjectByAttributeValues",
267
269
  import_block_editor.getColorObjectByAttributeValues
268
270
  );
269
- const getColorObjectByColorValue = deprecateFunction(
271
+ var getColorObjectByColorValue = deprecateFunction(
270
272
  "getColorObjectByColorValue",
271
273
  import_block_editor.getColorObjectByColorValue
272
274
  );
273
- const getFontSize = deprecateFunction("getFontSize", import_block_editor.getFontSize);
274
- const getFontSizeClass = deprecateFunction(
275
+ var getFontSize = deprecateFunction("getFontSize", import_block_editor.getFontSize);
276
+ var getFontSizeClass = deprecateFunction(
275
277
  "getFontSizeClass",
276
278
  import_block_editor.getFontSizeClass
277
279
  );
278
- const withColorContext = deprecateFunction(
280
+ var withColorContext = deprecateFunction(
279
281
  "withColorContext",
280
282
  import_block_editor.withColorContext
281
283
  );
282
- const withColors = deprecateFunction("withColors", import_block_editor.withColors);
283
- const withFontSizes = deprecateFunction(
284
+ var withColors = deprecateFunction("withColors", import_block_editor.withColors);
285
+ var withFontSizes = deprecateFunction(
284
286
  "withFontSizes",
285
287
  import_block_editor.withFontSizes
286
288
  );