@wordpress/editor 14.33.5 → 14.34.1-next.2f1c7c01b.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 (1245) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/bindings/api.js +2 -0
  3. package/build/bindings/api.js.map +1 -1
  4. package/build/bindings/pattern-overrides.js +3 -1
  5. package/build/bindings/pattern-overrides.js.map +1 -1
  6. package/build/bindings/post-data.js +4 -2
  7. package/build/bindings/post-data.js.map +1 -1
  8. package/build/bindings/post-meta.js +2 -0
  9. package/build/bindings/post-meta.js.map +1 -1
  10. package/build/bindings/term-data.js +3 -1
  11. package/build/bindings/term-data.js.map +1 -1
  12. package/build/components/autocompleters/index.js +2 -0
  13. package/build/components/autocompleters/index.js.map +1 -1
  14. package/build/components/autocompleters/user.js +3 -1
  15. package/build/components/autocompleters/user.js.map +1 -1
  16. package/build/components/autosave-monitor/index.js +4 -2
  17. package/build/components/autosave-monitor/index.js.map +1 -1
  18. package/build/components/block-removal-warnings/index.js +6 -4
  19. package/build/components/block-removal-warnings/index.js.map +1 -1
  20. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +6 -4
  21. package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  22. package/build/components/block-visibility/index.js +5 -3
  23. package/build/components/block-visibility/index.js.map +1 -1
  24. package/build/components/blog-title/index.js +4 -2
  25. package/build/components/blog-title/index.js.map +1 -1
  26. package/build/components/character-count/index.js +2 -0
  27. package/build/components/character-count/index.js.map +1 -1
  28. package/build/components/collab-sidebar/add-comment.js +10 -8
  29. package/build/components/collab-sidebar/add-comment.js.map +2 -2
  30. package/build/components/collab-sidebar/comment-author-info.js +3 -1
  31. package/build/components/collab-sidebar/comment-author-info.js.map +1 -1
  32. package/build/components/collab-sidebar/comment-form.js +3 -1
  33. package/build/components/collab-sidebar/comment-form.js.map +1 -1
  34. package/build/components/collab-sidebar/comment-indicator-toolbar.js +5 -3
  35. package/build/components/collab-sidebar/comment-indicator-toolbar.js.map +1 -1
  36. package/build/components/collab-sidebar/comment-menu-item.js +6 -4
  37. package/build/components/collab-sidebar/comment-menu-item.js.map +1 -1
  38. package/build/components/collab-sidebar/comments.js +40 -31
  39. package/build/components/collab-sidebar/comments.js.map +2 -2
  40. package/build/components/collab-sidebar/constants.js +5 -3
  41. package/build/components/collab-sidebar/constants.js.map +1 -1
  42. package/build/components/collab-sidebar/hooks.js +3 -1
  43. package/build/components/collab-sidebar/hooks.js.map +1 -1
  44. package/build/components/collab-sidebar/index.js +15 -13
  45. package/build/components/collab-sidebar/index.js.map +2 -2
  46. package/build/components/collab-sidebar/utils.js +5 -6
  47. package/build/components/collab-sidebar/utils.js.map +2 -2
  48. package/build/components/collapsible-block-toolbar/index.js +4 -2
  49. package/build/components/collapsible-block-toolbar/index.js.map +1 -1
  50. package/build/components/commands/index.js +6 -4
  51. package/build/components/commands/index.js.map +1 -1
  52. package/build/components/deprecated.js +55 -53
  53. package/build/components/deprecated.js.map +1 -1
  54. package/build/components/document-bar/index.js +20 -5
  55. package/build/components/document-bar/index.js.map +2 -2
  56. package/build/components/document-outline/check.js +2 -0
  57. package/build/components/document-outline/check.js.map +1 -1
  58. package/build/components/document-outline/index.js +9 -7
  59. package/build/components/document-outline/index.js.map +1 -1
  60. package/build/components/document-outline/item.js +4 -2
  61. package/build/components/document-outline/item.js.map +1 -1
  62. package/build/components/document-tools/index.js +3 -1
  63. package/build/components/document-tools/index.js.map +1 -1
  64. package/build/components/editor/index.js +26 -5
  65. package/build/components/editor/index.js.map +3 -3
  66. package/build/components/editor-history/redo.js +3 -1
  67. package/build/components/editor-history/redo.js.map +1 -1
  68. package/build/components/editor-history/undo.js +3 -1
  69. package/build/components/editor-history/undo.js.map +1 -1
  70. package/build/components/editor-interface/index.js +19 -12
  71. package/build/components/editor-interface/index.js.map +3 -3
  72. package/build/components/editor-notices/index.js +3 -1
  73. package/build/components/editor-notices/index.js.map +1 -1
  74. package/build/components/editor-snackbars/index.js +4 -2
  75. package/build/components/editor-snackbars/index.js.map +1 -1
  76. package/build/components/entities-saved-states/entity-record-item.js +3 -1
  77. package/build/components/entities-saved-states/entity-record-item.js.map +1 -1
  78. package/build/components/entities-saved-states/entity-type-list.js +22 -16
  79. package/build/components/entities-saved-states/entity-type-list.js.map +3 -3
  80. package/build/components/entities-saved-states/hooks/use-is-dirty.js +3 -1
  81. package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  82. package/build/components/entities-saved-states/index.js +3 -1
  83. package/build/components/entities-saved-states/index.js.map +1 -1
  84. package/build/components/error-boundary/index.js +5 -3
  85. package/build/components/error-boundary/index.js.map +1 -1
  86. package/build/components/global-keyboard-shortcuts/index.js +2 -0
  87. package/build/components/global-keyboard-shortcuts/index.js.map +1 -1
  88. package/build/components/global-keyboard-shortcuts/register-shortcuts.js +3 -1
  89. package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  90. package/build/components/global-styles/block-link.js +72 -0
  91. package/build/components/global-styles/block-link.js.map +7 -0
  92. package/build/components/global-styles/header.js +56 -0
  93. package/build/components/global-styles/header.js.map +7 -0
  94. package/build/components/global-styles/hooks.js +178 -0
  95. package/build/components/global-styles/hooks.js.map +7 -0
  96. package/build/components/global-styles/index.js +140 -0
  97. package/build/components/global-styles/index.js.map +7 -0
  98. package/build/components/global-styles/menu.js +97 -0
  99. package/build/components/global-styles/menu.js.map +7 -0
  100. package/build/components/global-styles-provider/index.js +5 -49
  101. package/build/components/global-styles-provider/index.js.map +3 -3
  102. package/build/components/global-styles-renderer/index.js +57 -0
  103. package/build/components/global-styles-renderer/index.js.map +7 -0
  104. package/build/components/global-styles-sidebar/default-sidebar.js +68 -0
  105. package/build/components/global-styles-sidebar/default-sidebar.js.map +7 -0
  106. package/build/components/global-styles-sidebar/index.js +184 -0
  107. package/build/components/global-styles-sidebar/index.js.map +7 -0
  108. package/build/components/global-styles-sidebar/welcome-guide-image.js +39 -0
  109. package/build/components/global-styles-sidebar/welcome-guide-image.js.map +7 -0
  110. package/build/components/global-styles-sidebar/welcome-guide.js +145 -0
  111. package/build/components/global-styles-sidebar/welcome-guide.js.map +7 -0
  112. package/build/components/header/back-button.js +8 -6
  113. package/build/components/header/back-button.js.map +1 -1
  114. package/build/components/header/index.js +17 -12
  115. package/build/components/header/index.js.map +2 -2
  116. package/build/components/index.js +4 -2
  117. package/build/components/index.js.map +2 -2
  118. package/build/components/inserter-sidebar/index.js +4 -2
  119. package/build/components/inserter-sidebar/index.js.map +1 -1
  120. package/build/components/keyboard-shortcut-help-modal/config.js +3 -1
  121. package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  122. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +3 -1
  123. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  124. package/build/components/keyboard-shortcut-help-modal/index.js +7 -5
  125. package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  126. package/build/components/keyboard-shortcut-help-modal/shortcut.js +3 -1
  127. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  128. package/build/components/list-view-sidebar/index.js +4 -2
  129. package/build/components/list-view-sidebar/index.js.map +1 -1
  130. package/build/components/list-view-sidebar/list-view-outline.js +3 -1
  131. package/build/components/list-view-sidebar/list-view-outline.js.map +1 -1
  132. package/build/components/local-autosave-monitor/index.js +6 -4
  133. package/build/components/local-autosave-monitor/index.js.map +1 -1
  134. package/build/components/media-categories/index.js +8 -6
  135. package/build/components/media-categories/index.js.map +1 -1
  136. package/build/components/mode-switcher/index.js +4 -2
  137. package/build/components/mode-switcher/index.js.map +1 -1
  138. package/build/components/more-menu/copy-content-menu-item.js +3 -1
  139. package/build/components/more-menu/copy-content-menu-item.js.map +1 -1
  140. package/build/components/more-menu/index.js +3 -1
  141. package/build/components/more-menu/index.js.map +1 -1
  142. package/build/components/more-menu/tools-more-menu-group.js +4 -2
  143. package/build/components/more-menu/tools-more-menu-group.js.map +1 -1
  144. package/build/components/more-menu/view-more-menu-group.js +4 -2
  145. package/build/components/more-menu/view-more-menu-group.js.map +1 -1
  146. package/build/components/page-attributes/check.js +2 -0
  147. package/build/components/page-attributes/check.js.map +1 -1
  148. package/build/components/page-attributes/order.js +3 -1
  149. package/build/components/page-attributes/order.js.map +1 -1
  150. package/build/components/page-attributes/panel.js +4 -2
  151. package/build/components/page-attributes/panel.js.map +1 -1
  152. package/build/components/page-attributes/parent.js +4 -2
  153. package/build/components/page-attributes/parent.js.map +1 -1
  154. package/build/components/pattern-duplicate-modal/index.js +5 -3
  155. package/build/components/pattern-duplicate-modal/index.js.map +1 -1
  156. package/build/components/pattern-overrides-panel/index.js +4 -2
  157. package/build/components/pattern-overrides-panel/index.js.map +1 -1
  158. package/build/components/pattern-rename-modal/index.js +5 -3
  159. package/build/components/pattern-rename-modal/index.js.map +1 -1
  160. package/build/components/plugin-document-setting-panel/index.js +5 -3
  161. package/build/components/plugin-document-setting-panel/index.js.map +1 -1
  162. package/build/components/plugin-more-menu-item/index.js +3 -1
  163. package/build/components/plugin-more-menu-item/index.js.map +1 -1
  164. package/build/components/plugin-post-publish-panel/index.js +5 -3
  165. package/build/components/plugin-post-publish-panel/index.js.map +1 -1
  166. package/build/components/plugin-post-status-info/index.js +5 -3
  167. package/build/components/plugin-post-status-info/index.js.map +1 -1
  168. package/build/components/plugin-pre-publish-panel/index.js +5 -3
  169. package/build/components/plugin-pre-publish-panel/index.js.map +1 -1
  170. package/build/components/plugin-preview-menu-item/index.js +3 -1
  171. package/build/components/plugin-preview-menu-item/index.js.map +1 -1
  172. package/build/components/plugin-sidebar/index.js +3 -1
  173. package/build/components/plugin-sidebar/index.js.map +1 -1
  174. package/build/components/plugin-sidebar-more-menu-item/index.js +3 -1
  175. package/build/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
  176. package/build/components/post-actions/actions.js +3 -1
  177. package/build/components/post-actions/actions.js.map +1 -1
  178. package/build/components/post-actions/index.js +4 -2
  179. package/build/components/post-actions/index.js.map +1 -1
  180. package/build/components/post-actions/set-as-homepage.js +5 -3
  181. package/build/components/post-actions/set-as-homepage.js.map +1 -1
  182. package/build/components/post-actions/set-as-posts-page.js +5 -3
  183. package/build/components/post-actions/set-as-posts-page.js.map +1 -1
  184. package/build/components/post-author/check.js +3 -1
  185. package/build/components/post-author/check.js.map +1 -1
  186. package/build/components/post-author/combobox.js +3 -1
  187. package/build/components/post-author/combobox.js.map +1 -1
  188. package/build/components/post-author/constants.js +4 -2
  189. package/build/components/post-author/constants.js.map +1 -1
  190. package/build/components/post-author/hook.js +2 -0
  191. package/build/components/post-author/hook.js.map +1 -1
  192. package/build/components/post-author/index.js +4 -2
  193. package/build/components/post-author/index.js.map +1 -1
  194. package/build/components/post-author/panel.js +3 -1
  195. package/build/components/post-author/panel.js.map +1 -1
  196. package/build/components/post-author/select.js +3 -1
  197. package/build/components/post-author/select.js.map +1 -1
  198. package/build/components/post-card-panel/index.js +4 -2
  199. package/build/components/post-card-panel/index.js.map +1 -1
  200. package/build/components/post-comments/index.js +4 -2
  201. package/build/components/post-comments/index.js.map +1 -1
  202. package/build/components/post-content-information/index.js +4 -2
  203. package/build/components/post-content-information/index.js.map +1 -1
  204. package/build/components/post-discussion/panel.js +4 -2
  205. package/build/components/post-discussion/panel.js.map +1 -1
  206. package/build/components/post-excerpt/check.js +3 -1
  207. package/build/components/post-excerpt/check.js.map +1 -1
  208. package/build/components/post-excerpt/index.js +3 -1
  209. package/build/components/post-excerpt/index.js.map +1 -1
  210. package/build/components/post-excerpt/panel.js +4 -2
  211. package/build/components/post-excerpt/panel.js.map +1 -1
  212. package/build/components/post-excerpt/plugin.js +5 -3
  213. package/build/components/post-excerpt/plugin.js.map +1 -1
  214. package/build/components/post-featured-image/check.js +3 -1
  215. package/build/components/post-featured-image/check.js.map +1 -1
  216. package/build/components/post-featured-image/index.js +41 -8
  217. package/build/components/post-featured-image/index.js.map +3 -3
  218. package/build/components/post-featured-image/panel.js +4 -2
  219. package/build/components/post-featured-image/panel.js.map +1 -1
  220. package/build/components/post-fields/index.js +2 -0
  221. package/build/components/post-fields/index.js.map +1 -1
  222. package/build/components/post-format/check.js +3 -1
  223. package/build/components/post-format/check.js.map +1 -1
  224. package/build/components/post-format/index.js +4 -2
  225. package/build/components/post-format/index.js.map +1 -1
  226. package/build/components/post-format/panel.js +3 -1
  227. package/build/components/post-format/panel.js.map +1 -1
  228. package/build/components/post-last-edited-panel/index.js +3 -1
  229. package/build/components/post-last-edited-panel/index.js.map +1 -1
  230. package/build/components/post-last-revision/check.js +3 -1
  231. package/build/components/post-last-revision/check.js.map +1 -1
  232. package/build/components/post-last-revision/index.js +3 -1
  233. package/build/components/post-last-revision/index.js.map +1 -1
  234. package/build/components/post-last-revision/panel.js +3 -1
  235. package/build/components/post-last-revision/panel.js.map +1 -1
  236. package/build/components/post-locked-modal/index.js +3 -1
  237. package/build/components/post-locked-modal/index.js.map +1 -1
  238. package/build/components/post-panel-row/index.js +4 -2
  239. package/build/components/post-panel-row/index.js.map +1 -1
  240. package/build/components/post-panel-section/index.js +3 -1
  241. package/build/components/post-panel-section/index.js.map +1 -1
  242. package/build/components/post-pending-status/check.js +2 -0
  243. package/build/components/post-pending-status/check.js.map +1 -1
  244. package/build/components/post-pending-status/index.js +3 -1
  245. package/build/components/post-pending-status/index.js.map +1 -1
  246. package/build/components/post-pingbacks/index.js +3 -1
  247. package/build/components/post-pingbacks/index.js.map +1 -1
  248. package/build/components/post-preview-button/index.js +3 -1
  249. package/build/components/post-preview-button/index.js.map +1 -1
  250. package/build/components/post-publish-button/index.js +6 -4
  251. package/build/components/post-publish-button/index.js.map +1 -1
  252. package/build/components/post-publish-button/label.js +2 -0
  253. package/build/components/post-publish-button/label.js.map +1 -1
  254. package/build/components/post-publish-button/post-publish-button-or-toggle.js +5 -3
  255. package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  256. package/build/components/post-publish-panel/index.js +5 -3
  257. package/build/components/post-publish-panel/index.js.map +1 -1
  258. package/build/components/post-publish-panel/maybe-category-panel.js +3 -1
  259. package/build/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  260. package/build/components/post-publish-panel/maybe-post-format-panel.js +5 -3
  261. package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  262. package/build/components/post-publish-panel/maybe-tags-panel.js +5 -3
  263. package/build/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  264. package/build/components/post-publish-panel/maybe-upload-media.js +3 -1
  265. package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  266. package/build/components/post-publish-panel/media-util.js +2 -0
  267. package/build/components/post-publish-panel/media-util.js.map +1 -1
  268. package/build/components/post-publish-panel/postpublish.js +6 -4
  269. package/build/components/post-publish-panel/postpublish.js.map +1 -1
  270. package/build/components/post-publish-panel/prepublish.js +3 -1
  271. package/build/components/post-publish-panel/prepublish.js.map +1 -1
  272. package/build/components/post-saved-state/index.js +3 -1
  273. package/build/components/post-saved-state/index.js.map +1 -1
  274. package/build/components/post-schedule/check.js +2 -0
  275. package/build/components/post-schedule/check.js.map +1 -1
  276. package/build/components/post-schedule/index.js +4 -2
  277. package/build/components/post-schedule/index.js.map +1 -1
  278. package/build/components/post-schedule/label.js +2 -0
  279. package/build/components/post-schedule/label.js.map +1 -1
  280. package/build/components/post-schedule/panel.js +4 -2
  281. package/build/components/post-schedule/panel.js.map +1 -1
  282. package/build/components/post-status/index.js +6 -4
  283. package/build/components/post-status/index.js.map +1 -1
  284. package/build/components/post-sticky/check.js +2 -0
  285. package/build/components/post-sticky/check.js.map +1 -1
  286. package/build/components/post-sticky/index.js +3 -1
  287. package/build/components/post-sticky/index.js.map +1 -1
  288. package/build/components/post-sticky/panel.js +3 -1
  289. package/build/components/post-sticky/panel.js.map +1 -1
  290. package/build/components/post-switch-to-draft-button/index.js +3 -1
  291. package/build/components/post-switch-to-draft-button/index.js.map +1 -1
  292. package/build/components/post-sync-status/index.js +3 -1
  293. package/build/components/post-sync-status/index.js.map +1 -1
  294. package/build/components/post-taxonomies/check.js +2 -0
  295. package/build/components/post-taxonomies/check.js.map +1 -1
  296. package/build/components/post-taxonomies/flat-term-selector.js +9 -7
  297. package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
  298. package/build/components/post-taxonomies/hierarchical-term-selector.js +8 -6
  299. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  300. package/build/components/post-taxonomies/index.js +4 -2
  301. package/build/components/post-taxonomies/index.js.map +1 -1
  302. package/build/components/post-taxonomies/most-used-terms.js +5 -3
  303. package/build/components/post-taxonomies/most-used-terms.js.map +1 -1
  304. package/build/components/post-taxonomies/panel.js +3 -1
  305. package/build/components/post-taxonomies/panel.js.map +1 -1
  306. package/build/components/post-template/block-theme.js +3 -1
  307. package/build/components/post-template/block-theme.js.map +1 -1
  308. package/build/components/post-template/classic-theme.js +3 -1
  309. package/build/components/post-template/classic-theme.js.map +1 -1
  310. package/build/components/post-template/create-new-template-modal.js +4 -2
  311. package/build/components/post-template/create-new-template-modal.js.map +1 -1
  312. package/build/components/post-template/create-new-template.js +3 -1
  313. package/build/components/post-template/create-new-template.js.map +1 -1
  314. package/build/components/post-template/hooks.js +2 -0
  315. package/build/components/post-template/hooks.js.map +1 -1
  316. package/build/components/post-template/panel.js +3 -1
  317. package/build/components/post-template/panel.js.map +1 -1
  318. package/build/components/post-template/reset-default-template.js +3 -1
  319. package/build/components/post-template/reset-default-template.js.map +1 -1
  320. package/build/components/post-template/swap-template-button.js +3 -1
  321. package/build/components/post-template/swap-template-button.js.map +1 -1
  322. package/build/components/post-text-editor/index.js +3 -1
  323. package/build/components/post-text-editor/index.js.map +1 -1
  324. package/build/components/post-title/constants.js +4 -2
  325. package/build/components/post-title/constants.js.map +1 -1
  326. package/build/components/post-title/index.js +7 -5
  327. package/build/components/post-title/index.js.map +1 -1
  328. package/build/components/post-title/post-title-raw.js +3 -1
  329. package/build/components/post-title/post-title-raw.js.map +1 -1
  330. package/build/components/post-title/use-post-title-focus.js +2 -0
  331. package/build/components/post-title/use-post-title-focus.js.map +1 -1
  332. package/build/components/post-title/use-post-title.js +2 -0
  333. package/build/components/post-title/use-post-title.js.map +1 -1
  334. package/build/components/post-transform-panel/hooks.js +3 -1
  335. package/build/components/post-transform-panel/hooks.js.map +1 -1
  336. package/build/components/post-transform-panel/index.js +3 -1
  337. package/build/components/post-transform-panel/index.js.map +1 -1
  338. package/build/components/post-trash/check.js +2 -0
  339. package/build/components/post-trash/check.js.map +1 -1
  340. package/build/components/post-trash/index.js +3 -1
  341. package/build/components/post-trash/index.js.map +1 -1
  342. package/build/components/post-type-support-check/index.js +2 -0
  343. package/build/components/post-type-support-check/index.js.map +1 -1
  344. package/build/components/post-url/check.js +2 -0
  345. package/build/components/post-url/check.js.map +1 -1
  346. package/build/components/post-url/index.js +3 -1
  347. package/build/components/post-url/index.js.map +1 -1
  348. package/build/components/post-url/label.js +2 -0
  349. package/build/components/post-url/label.js.map +1 -1
  350. package/build/components/post-url/panel.js +3 -1
  351. package/build/components/post-url/panel.js.map +1 -1
  352. package/build/components/post-view-link/index.js +3 -1
  353. package/build/components/post-view-link/index.js.map +1 -1
  354. package/build/components/post-visibility/check.js +2 -0
  355. package/build/components/post-visibility/check.js.map +1 -1
  356. package/build/components/post-visibility/index.js +3 -1
  357. package/build/components/post-visibility/index.js.map +1 -1
  358. package/build/components/post-visibility/label.js +2 -0
  359. package/build/components/post-visibility/label.js.map +1 -1
  360. package/build/components/post-visibility/utils.js +3 -1
  361. package/build/components/post-visibility/utils.js.map +1 -1
  362. package/build/components/posts-per-page/index.js +3 -1
  363. package/build/components/posts-per-page/index.js.map +1 -1
  364. package/build/components/preferences-modal/enable-panel.js +4 -2
  365. package/build/components/preferences-modal/enable-panel.js.map +1 -1
  366. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +5 -3
  367. package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  368. package/build/components/preferences-modal/enable-publish-sidebar.js +4 -2
  369. package/build/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
  370. package/build/components/preferences-modal/index.js +5 -3
  371. package/build/components/preferences-modal/index.js.map +2 -2
  372. package/build/components/preview-dropdown/index.js +3 -1
  373. package/build/components/preview-dropdown/index.js.map +1 -1
  374. package/build/components/provider/disable-non-page-content-blocks.js +2 -0
  375. package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
  376. package/build/components/provider/index.js +8 -8
  377. package/build/components/provider/index.js.map +3 -3
  378. package/build/components/provider/navigation-block-editing-mode.js +2 -0
  379. package/build/components/provider/navigation-block-editing-mode.js.map +1 -1
  380. package/build/components/provider/use-auto-switch-editor-sidebars.js +2 -0
  381. package/build/components/provider/use-auto-switch-editor-sidebars.js.map +1 -1
  382. package/build/components/provider/use-block-editor-settings.js +5 -3
  383. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  384. package/build/components/provider/use-hide-blocks-from-inserter.js +3 -1
  385. package/build/components/provider/use-hide-blocks-from-inserter.js.map +1 -1
  386. package/build/components/provider/use-post-content-blocks.js +3 -1
  387. package/build/components/provider/use-post-content-blocks.js.map +1 -1
  388. package/build/components/provider/with-registry-provider.js +4 -2
  389. package/build/components/provider/with-registry-provider.js.map +1 -1
  390. package/build/components/resizable-editor/index.js +4 -2
  391. package/build/components/resizable-editor/index.js.map +1 -1
  392. package/build/components/resizable-editor/resize-handle.js +4 -2
  393. package/build/components/resizable-editor/resize-handle.js.map +1 -1
  394. package/build/components/save-publish-panels/index.js +5 -3
  395. package/build/components/save-publish-panels/index.js.map +1 -1
  396. package/build/components/sidebar/constants.js +3 -1
  397. package/build/components/sidebar/constants.js.map +1 -1
  398. package/build/components/sidebar/header.js +5 -3
  399. package/build/components/sidebar/header.js.map +1 -1
  400. package/build/components/sidebar/index.js +7 -5
  401. package/build/components/sidebar/index.js.map +1 -1
  402. package/build/components/sidebar/post-summary.js +4 -2
  403. package/build/components/sidebar/post-summary.js.map +1 -1
  404. package/build/components/site-discussion/index.js +4 -2
  405. package/build/components/site-discussion/index.js.map +1 -1
  406. package/build/components/start-page-options/index.js +7 -6
  407. package/build/components/start-page-options/index.js.map +2 -2
  408. package/build/components/start-template-options/index.js +3 -1
  409. package/build/components/start-template-options/index.js.map +1 -1
  410. package/build/components/style-book/categories.js +88 -0
  411. package/build/components/style-book/categories.js.map +7 -0
  412. package/build/components/style-book/color-examples.js +66 -0
  413. package/build/components/style-book/color-examples.js.map +7 -0
  414. package/build/components/style-book/constants.js +321 -0
  415. package/build/components/style-book/constants.js.map +7 -0
  416. package/build/components/style-book/duotone-examples.js +70 -0
  417. package/build/components/style-book/duotone-examples.js.map +7 -0
  418. package/build/components/style-book/examples.js +239 -0
  419. package/build/components/style-book/examples.js.map +7 -0
  420. package/build/components/style-book/index.js +629 -0
  421. package/build/components/style-book/index.js.map +7 -0
  422. package/build/components/style-book/types.js +19 -0
  423. package/build/components/style-book/types.js.map +7 -0
  424. package/build/components/styles-canvas/index.js +140 -0
  425. package/build/components/styles-canvas/index.js.map +7 -0
  426. package/build/components/styles-canvas/revisions.js +123 -0
  427. package/build/components/styles-canvas/revisions.js.map +7 -0
  428. package/build/components/styles-canvas/style-book.js +70 -0
  429. package/build/components/styles-canvas/style-book.js.map +7 -0
  430. package/build/components/table-of-contents/index.js +3 -1
  431. package/build/components/table-of-contents/index.js.map +1 -1
  432. package/build/components/table-of-contents/panel.js +3 -1
  433. package/build/components/table-of-contents/panel.js.map +1 -1
  434. package/build/components/template-content-panel/index.js +6 -4
  435. package/build/components/template-content-panel/index.js.map +1 -1
  436. package/build/components/template-part-content-panel/index.js +4 -2
  437. package/build/components/template-part-content-panel/index.js.map +1 -1
  438. package/build/components/template-part-menu-items/convert-to-regular.js +3 -1
  439. package/build/components/template-part-menu-items/convert-to-regular.js.map +1 -1
  440. package/build/components/template-part-menu-items/convert-to-template-part.js +3 -1
  441. package/build/components/template-part-menu-items/convert-to-template-part.js.map +1 -1
  442. package/build/components/template-part-menu-items/index.js +3 -1
  443. package/build/components/template-part-menu-items/index.js.map +1 -1
  444. package/build/components/template-validation-notice/index.js +3 -1
  445. package/build/components/template-validation-notice/index.js.map +1 -1
  446. package/build/components/text-editor/index.js +3 -1
  447. package/build/components/text-editor/index.js.map +1 -1
  448. package/build/components/theme-support-check/index.js +2 -0
  449. package/build/components/theme-support-check/index.js.map +1 -1
  450. package/build/components/time-to-read/index.js +4 -2
  451. package/build/components/time-to-read/index.js.map +1 -1
  452. package/build/components/unsaved-changes-warning/index.js +2 -0
  453. package/build/components/unsaved-changes-warning/index.js.map +1 -1
  454. package/build/components/visual-editor/edit-template-blocks-notification.js +3 -1
  455. package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  456. package/build/components/visual-editor/index.js +7 -4
  457. package/build/components/visual-editor/index.js.map +2 -2
  458. package/build/components/visual-editor/use-select-nearest-editable-block.js +3 -1
  459. package/build/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  460. package/build/components/visual-editor/use-zoom-out-mode-exit.js +2 -0
  461. package/build/components/visual-editor/use-zoom-out-mode-exit.js.map +1 -1
  462. package/build/components/word-count/index.js +3 -1
  463. package/build/components/word-count/index.js.map +1 -1
  464. package/build/components/zoom-out-toggle/index.js +4 -2
  465. package/build/components/zoom-out-toggle/index.js.map +1 -1
  466. package/build/dataviews/api.js +2 -0
  467. package/build/dataviews/api.js.map +1 -1
  468. package/build/dataviews/fields/content-preview/content-preview-view.js +4 -2
  469. package/build/dataviews/fields/content-preview/content-preview-view.js.map +2 -2
  470. package/build/dataviews/fields/content-preview/index.js +3 -1
  471. package/build/dataviews/fields/content-preview/index.js.map +1 -1
  472. package/build/dataviews/store/private-actions.js +3 -1
  473. package/build/dataviews/store/private-actions.js.map +1 -1
  474. package/build/dataviews/store/private-selectors.js +3 -1
  475. package/build/dataviews/store/private-selectors.js.map +1 -1
  476. package/build/dataviews/store/reducer.js +2 -0
  477. package/build/dataviews/store/reducer.js.map +1 -1
  478. package/build/hooks/custom-sources-backwards-compatibility.js +4 -2
  479. package/build/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  480. package/build/hooks/default-autocompleters.js +2 -0
  481. package/build/hooks/default-autocompleters.js.map +1 -1
  482. package/build/hooks/index.js +3 -0
  483. package/build/hooks/index.js.map +2 -2
  484. package/build/hooks/media-upload.js +17 -4
  485. package/build/hooks/media-upload.js.map +3 -3
  486. package/build/hooks/navigation-link-view-button.js +5 -3
  487. package/build/hooks/navigation-link-view-button.js.map +1 -1
  488. package/build/hooks/pattern-overrides.js +5 -3
  489. package/build/hooks/pattern-overrides.js.map +1 -1
  490. package/build/hooks/push-changes-to-global-styles/index.js +324 -0
  491. package/build/hooks/push-changes-to-global-styles/index.js.map +7 -0
  492. package/build/hooks/template-part-navigation-edit-button.js +7 -5
  493. package/build/hooks/template-part-navigation-edit-button.js.map +1 -1
  494. package/build/hooks/use-global-styles-output.js +76 -0
  495. package/build/hooks/use-global-styles-output.js.map +7 -0
  496. package/build/index.js +2 -0
  497. package/build/index.js.map +1 -1
  498. package/build/lock-unlock.js +3 -1
  499. package/build/lock-unlock.js.map +1 -1
  500. package/build/private-apis.js +14 -7
  501. package/build/private-apis.js.map +3 -3
  502. package/build/store/actions.js +53 -51
  503. package/build/store/actions.js.map +1 -1
  504. package/build/store/constants.js +15 -13
  505. package/build/store/constants.js.map +1 -1
  506. package/build/store/defaults.js +3 -1
  507. package/build/store/defaults.js.map +1 -1
  508. package/build/store/index.js +4 -2
  509. package/build/store/index.js.map +1 -1
  510. package/build/store/local-autosave.js +2 -0
  511. package/build/store/local-autosave.js.map +1 -1
  512. package/build/store/private-actions.js +32 -7
  513. package/build/store/private-actions.js.map +2 -2
  514. package/build/store/private-selectors.js +20 -8
  515. package/build/store/private-selectors.js.map +2 -2
  516. package/build/store/reducer.js +26 -0
  517. package/build/store/reducer.js.map +2 -2
  518. package/build/store/selectors.js +80 -78
  519. package/build/store/selectors.js.map +2 -2
  520. package/build/store/utils/is-template-revertable.js +2 -0
  521. package/build/store/utils/is-template-revertable.js.map +1 -1
  522. package/build/store/utils/notice-builder.js +2 -0
  523. package/build/store/utils/notice-builder.js.map +1 -1
  524. package/build/utils/get-item-title.js +2 -0
  525. package/build/utils/get-item-title.js.map +1 -1
  526. package/build/utils/get-template-info.js +4 -2
  527. package/build/utils/get-template-info.js.map +1 -1
  528. package/build/utils/get-template-part-icon.js +2 -0
  529. package/build/utils/get-template-part-icon.js.map +1 -1
  530. package/build/utils/index.js +2 -0
  531. package/build/utils/index.js.map +1 -1
  532. package/build/utils/media-sideload/index.js +3 -1
  533. package/build/utils/media-sideload/index.js.map +1 -1
  534. package/build/utils/media-upload/index.js +3 -1
  535. package/build/utils/media-upload/index.js.map +1 -1
  536. package/build/utils/pageTypeBadge.js +2 -0
  537. package/build/utils/pageTypeBadge.js.map +1 -1
  538. package/build/utils/search-templates.js +2 -0
  539. package/build/utils/search-templates.js.map +1 -1
  540. package/build/{components/editor-interface/content-slot-fill.js → utils/set-nested-value.js} +26 -10
  541. package/build/utils/set-nested-value.js.map +7 -0
  542. package/build/utils/terms.js +5 -3
  543. package/build/utils/terms.js.map +1 -1
  544. package/build/utils/url.js +2 -0
  545. package/build/utils/url.js.map +1 -1
  546. package/build-module/bindings/api.js +1 -0
  547. package/build-module/bindings/api.js.map +1 -1
  548. package/build-module/bindings/pattern-overrides.js +2 -1
  549. package/build-module/bindings/pattern-overrides.js.map +1 -1
  550. package/build-module/bindings/post-data.js +3 -2
  551. package/build-module/bindings/post-data.js.map +1 -1
  552. package/build-module/bindings/post-meta.js +1 -0
  553. package/build-module/bindings/post-meta.js.map +1 -1
  554. package/build-module/bindings/term-data.js +2 -1
  555. package/build-module/bindings/term-data.js.map +1 -1
  556. package/build-module/components/autocompleters/index.js +1 -0
  557. package/build-module/components/autocompleters/index.js.map +1 -1
  558. package/build-module/components/autocompleters/user.js +2 -1
  559. package/build-module/components/autocompleters/user.js.map +1 -1
  560. package/build-module/components/autosave-monitor/index.js +3 -2
  561. package/build-module/components/autosave-monitor/index.js.map +1 -1
  562. package/build-module/components/block-removal-warnings/index.js +5 -4
  563. package/build-module/components/block-removal-warnings/index.js.map +1 -1
  564. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +5 -4
  565. package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -1
  566. package/build-module/components/block-visibility/index.js +4 -3
  567. package/build-module/components/block-visibility/index.js.map +1 -1
  568. package/build-module/components/blog-title/index.js +3 -2
  569. package/build-module/components/blog-title/index.js.map +1 -1
  570. package/build-module/components/character-count/index.js +1 -0
  571. package/build-module/components/character-count/index.js.map +1 -1
  572. package/build-module/components/collab-sidebar/add-comment.js +9 -8
  573. package/build-module/components/collab-sidebar/add-comment.js.map +2 -2
  574. package/build-module/components/collab-sidebar/comment-author-info.js +2 -1
  575. package/build-module/components/collab-sidebar/comment-author-info.js.map +1 -1
  576. package/build-module/components/collab-sidebar/comment-form.js +2 -1
  577. package/build-module/components/collab-sidebar/comment-form.js.map +1 -1
  578. package/build-module/components/collab-sidebar/comment-indicator-toolbar.js +4 -3
  579. package/build-module/components/collab-sidebar/comment-indicator-toolbar.js.map +1 -1
  580. package/build-module/components/collab-sidebar/comment-menu-item.js +5 -4
  581. package/build-module/components/collab-sidebar/comment-menu-item.js.map +1 -1
  582. package/build-module/components/collab-sidebar/comments.js +39 -31
  583. package/build-module/components/collab-sidebar/comments.js.map +2 -2
  584. package/build-module/components/collab-sidebar/constants.js +4 -3
  585. package/build-module/components/collab-sidebar/constants.js.map +1 -1
  586. package/build-module/components/collab-sidebar/hooks.js +2 -1
  587. package/build-module/components/collab-sidebar/hooks.js.map +1 -1
  588. package/build-module/components/collab-sidebar/index.js +14 -13
  589. package/build-module/components/collab-sidebar/index.js.map +2 -2
  590. package/build-module/components/collab-sidebar/utils.js +4 -6
  591. package/build-module/components/collab-sidebar/utils.js.map +2 -2
  592. package/build-module/components/collapsible-block-toolbar/index.js +3 -2
  593. package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
  594. package/build-module/components/commands/index.js +5 -4
  595. package/build-module/components/commands/index.js.map +1 -1
  596. package/build-module/components/deprecated.js +54 -53
  597. package/build-module/components/deprecated.js.map +1 -1
  598. package/build-module/components/document-bar/index.js +19 -5
  599. package/build-module/components/document-bar/index.js.map +2 -2
  600. package/build-module/components/document-outline/check.js +1 -0
  601. package/build-module/components/document-outline/check.js.map +1 -1
  602. package/build-module/components/document-outline/index.js +8 -7
  603. package/build-module/components/document-outline/index.js.map +1 -1
  604. package/build-module/components/document-outline/item.js +3 -2
  605. package/build-module/components/document-outline/item.js.map +1 -1
  606. package/build-module/components/document-tools/index.js +2 -1
  607. package/build-module/components/document-tools/index.js.map +1 -1
  608. package/build-module/components/editor/index.js +25 -5
  609. package/build-module/components/editor/index.js.map +2 -2
  610. package/build-module/components/editor-history/redo.js +2 -1
  611. package/build-module/components/editor-history/redo.js.map +1 -1
  612. package/build-module/components/editor-history/undo.js +2 -1
  613. package/build-module/components/editor-history/undo.js.map +1 -1
  614. package/build-module/components/editor-interface/index.js +18 -12
  615. package/build-module/components/editor-interface/index.js.map +2 -2
  616. package/build-module/components/editor-notices/index.js +2 -1
  617. package/build-module/components/editor-notices/index.js.map +1 -1
  618. package/build-module/components/editor-snackbars/index.js +3 -2
  619. package/build-module/components/editor-snackbars/index.js.map +1 -1
  620. package/build-module/components/entities-saved-states/entity-record-item.js +2 -1
  621. package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
  622. package/build-module/components/entities-saved-states/entity-type-list.js +20 -15
  623. package/build-module/components/entities-saved-states/entity-type-list.js.map +2 -2
  624. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +2 -1
  625. package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
  626. package/build-module/components/entities-saved-states/index.js +2 -1
  627. package/build-module/components/entities-saved-states/index.js.map +1 -1
  628. package/build-module/components/error-boundary/index.js +4 -3
  629. package/build-module/components/error-boundary/index.js.map +1 -1
  630. package/build-module/components/global-keyboard-shortcuts/index.js +1 -0
  631. package/build-module/components/global-keyboard-shortcuts/index.js.map +1 -1
  632. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +2 -1
  633. package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
  634. package/build-module/components/global-styles/block-link.js +47 -0
  635. package/build-module/components/global-styles/block-link.js.map +7 -0
  636. package/build-module/components/global-styles/header.js +42 -0
  637. package/build-module/components/global-styles/header.js.map +7 -0
  638. package/build-module/components/global-styles/hooks.js +155 -0
  639. package/build-module/components/global-styles/hooks.js.map +7 -0
  640. package/build-module/components/global-styles/index.js +113 -0
  641. package/build-module/components/global-styles/index.js.map +7 -0
  642. package/build-module/components/global-styles/menu.js +72 -0
  643. package/build-module/components/global-styles/menu.js.map +7 -0
  644. package/build-module/components/global-styles-provider/index.js +4 -37
  645. package/build-module/components/global-styles-provider/index.js.map +2 -2
  646. package/build-module/components/global-styles-renderer/index.js +32 -0
  647. package/build-module/components/global-styles-renderer/index.js.map +7 -0
  648. package/build-module/components/global-styles-sidebar/default-sidebar.js +50 -0
  649. package/build-module/components/global-styles-sidebar/default-sidebar.js.map +7 -0
  650. package/build-module/components/global-styles-sidebar/index.js +153 -0
  651. package/build-module/components/global-styles-sidebar/index.js.map +7 -0
  652. package/build-module/components/global-styles-sidebar/welcome-guide-image.js +18 -0
  653. package/build-module/components/global-styles-sidebar/welcome-guide-image.js.map +7 -0
  654. package/build-module/components/global-styles-sidebar/welcome-guide.js +114 -0
  655. package/build-module/components/global-styles-sidebar/welcome-guide.js.map +7 -0
  656. package/build-module/components/header/back-button.js +7 -6
  657. package/build-module/components/header/back-button.js.map +1 -1
  658. package/build-module/components/header/index.js +16 -12
  659. package/build-module/components/header/index.js.map +2 -2
  660. package/build-module/components/index.js +3 -2
  661. package/build-module/components/index.js.map +1 -1
  662. package/build-module/components/inserter-sidebar/index.js +3 -2
  663. package/build-module/components/inserter-sidebar/index.js.map +1 -1
  664. package/build-module/components/keyboard-shortcut-help-modal/config.js +2 -1
  665. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
  666. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +2 -1
  667. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
  668. package/build-module/components/keyboard-shortcut-help-modal/index.js +6 -5
  669. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
  670. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +5 -4
  671. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
  672. package/build-module/components/list-view-sidebar/index.js +3 -2
  673. package/build-module/components/list-view-sidebar/index.js.map +1 -1
  674. package/build-module/components/list-view-sidebar/list-view-outline.js +2 -1
  675. package/build-module/components/list-view-sidebar/list-view-outline.js.map +1 -1
  676. package/build-module/components/local-autosave-monitor/index.js +5 -4
  677. package/build-module/components/local-autosave-monitor/index.js.map +1 -1
  678. package/build-module/components/media-categories/index.js +7 -6
  679. package/build-module/components/media-categories/index.js.map +1 -1
  680. package/build-module/components/mode-switcher/index.js +3 -2
  681. package/build-module/components/mode-switcher/index.js.map +1 -1
  682. package/build-module/components/more-menu/copy-content-menu-item.js +2 -1
  683. package/build-module/components/more-menu/copy-content-menu-item.js.map +1 -1
  684. package/build-module/components/more-menu/index.js +2 -1
  685. package/build-module/components/more-menu/index.js.map +1 -1
  686. package/build-module/components/more-menu/tools-more-menu-group.js +3 -2
  687. package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -1
  688. package/build-module/components/more-menu/view-more-menu-group.js +3 -2
  689. package/build-module/components/more-menu/view-more-menu-group.js.map +1 -1
  690. package/build-module/components/page-attributes/check.js +1 -0
  691. package/build-module/components/page-attributes/check.js.map +1 -1
  692. package/build-module/components/page-attributes/order.js +2 -1
  693. package/build-module/components/page-attributes/order.js.map +1 -1
  694. package/build-module/components/page-attributes/panel.js +3 -2
  695. package/build-module/components/page-attributes/panel.js.map +1 -1
  696. package/build-module/components/page-attributes/parent.js +3 -2
  697. package/build-module/components/page-attributes/parent.js.map +1 -1
  698. package/build-module/components/pattern-duplicate-modal/index.js +4 -3
  699. package/build-module/components/pattern-duplicate-modal/index.js.map +1 -1
  700. package/build-module/components/pattern-overrides-panel/index.js +3 -2
  701. package/build-module/components/pattern-overrides-panel/index.js.map +1 -1
  702. package/build-module/components/pattern-rename-modal/index.js +4 -3
  703. package/build-module/components/pattern-rename-modal/index.js.map +1 -1
  704. package/build-module/components/plugin-document-setting-panel/index.js +4 -3
  705. package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
  706. package/build-module/components/plugin-more-menu-item/index.js +2 -1
  707. package/build-module/components/plugin-more-menu-item/index.js.map +1 -1
  708. package/build-module/components/plugin-post-publish-panel/index.js +4 -3
  709. package/build-module/components/plugin-post-publish-panel/index.js.map +1 -1
  710. package/build-module/components/plugin-post-status-info/index.js +4 -3
  711. package/build-module/components/plugin-post-status-info/index.js.map +1 -1
  712. package/build-module/components/plugin-pre-publish-panel/index.js +4 -3
  713. package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -1
  714. package/build-module/components/plugin-preview-menu-item/index.js +2 -1
  715. package/build-module/components/plugin-preview-menu-item/index.js.map +1 -1
  716. package/build-module/components/plugin-sidebar/index.js +2 -1
  717. package/build-module/components/plugin-sidebar/index.js.map +1 -1
  718. package/build-module/components/plugin-sidebar-more-menu-item/index.js +2 -1
  719. package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +1 -1
  720. package/build-module/components/post-actions/actions.js +2 -1
  721. package/build-module/components/post-actions/actions.js.map +1 -1
  722. package/build-module/components/post-actions/index.js +3 -2
  723. package/build-module/components/post-actions/index.js.map +1 -1
  724. package/build-module/components/post-actions/set-as-homepage.js +4 -3
  725. package/build-module/components/post-actions/set-as-homepage.js.map +1 -1
  726. package/build-module/components/post-actions/set-as-posts-page.js +4 -3
  727. package/build-module/components/post-actions/set-as-posts-page.js.map +1 -1
  728. package/build-module/components/post-author/check.js +2 -1
  729. package/build-module/components/post-author/check.js.map +1 -1
  730. package/build-module/components/post-author/combobox.js +2 -1
  731. package/build-module/components/post-author/combobox.js.map +1 -1
  732. package/build-module/components/post-author/constants.js +3 -2
  733. package/build-module/components/post-author/constants.js.map +1 -1
  734. package/build-module/components/post-author/hook.js +1 -0
  735. package/build-module/components/post-author/hook.js.map +1 -1
  736. package/build-module/components/post-author/index.js +3 -2
  737. package/build-module/components/post-author/index.js.map +1 -1
  738. package/build-module/components/post-author/panel.js +2 -1
  739. package/build-module/components/post-author/panel.js.map +1 -1
  740. package/build-module/components/post-author/select.js +2 -1
  741. package/build-module/components/post-author/select.js.map +1 -1
  742. package/build-module/components/post-card-panel/index.js +3 -2
  743. package/build-module/components/post-card-panel/index.js.map +1 -1
  744. package/build-module/components/post-comments/index.js +3 -2
  745. package/build-module/components/post-comments/index.js.map +1 -1
  746. package/build-module/components/post-content-information/index.js +3 -2
  747. package/build-module/components/post-content-information/index.js.map +1 -1
  748. package/build-module/components/post-discussion/panel.js +3 -2
  749. package/build-module/components/post-discussion/panel.js.map +1 -1
  750. package/build-module/components/post-excerpt/check.js +2 -1
  751. package/build-module/components/post-excerpt/check.js.map +1 -1
  752. package/build-module/components/post-excerpt/index.js +2 -1
  753. package/build-module/components/post-excerpt/index.js.map +1 -1
  754. package/build-module/components/post-excerpt/panel.js +3 -2
  755. package/build-module/components/post-excerpt/panel.js.map +1 -1
  756. package/build-module/components/post-excerpt/plugin.js +4 -3
  757. package/build-module/components/post-excerpt/plugin.js.map +1 -1
  758. package/build-module/components/post-featured-image/check.js +2 -1
  759. package/build-module/components/post-featured-image/check.js.map +1 -1
  760. package/build-module/components/post-featured-image/index.js +42 -9
  761. package/build-module/components/post-featured-image/index.js.map +2 -2
  762. package/build-module/components/post-featured-image/panel.js +3 -2
  763. package/build-module/components/post-featured-image/panel.js.map +1 -1
  764. package/build-module/components/post-fields/index.js +1 -0
  765. package/build-module/components/post-fields/index.js.map +1 -1
  766. package/build-module/components/post-format/check.js +2 -1
  767. package/build-module/components/post-format/check.js.map +1 -1
  768. package/build-module/components/post-format/index.js +3 -2
  769. package/build-module/components/post-format/index.js.map +1 -1
  770. package/build-module/components/post-format/panel.js +2 -1
  771. package/build-module/components/post-format/panel.js.map +1 -1
  772. package/build-module/components/post-last-edited-panel/index.js +2 -1
  773. package/build-module/components/post-last-edited-panel/index.js.map +1 -1
  774. package/build-module/components/post-last-revision/check.js +2 -1
  775. package/build-module/components/post-last-revision/check.js.map +1 -1
  776. package/build-module/components/post-last-revision/index.js +2 -1
  777. package/build-module/components/post-last-revision/index.js.map +1 -1
  778. package/build-module/components/post-last-revision/panel.js +2 -1
  779. package/build-module/components/post-last-revision/panel.js.map +1 -1
  780. package/build-module/components/post-locked-modal/index.js +2 -1
  781. package/build-module/components/post-locked-modal/index.js.map +1 -1
  782. package/build-module/components/post-panel-row/index.js +3 -2
  783. package/build-module/components/post-panel-row/index.js.map +1 -1
  784. package/build-module/components/post-panel-section/index.js +2 -1
  785. package/build-module/components/post-panel-section/index.js.map +1 -1
  786. package/build-module/components/post-pending-status/check.js +1 -0
  787. package/build-module/components/post-pending-status/check.js.map +1 -1
  788. package/build-module/components/post-pending-status/index.js +2 -1
  789. package/build-module/components/post-pending-status/index.js.map +1 -1
  790. package/build-module/components/post-pingbacks/index.js +2 -1
  791. package/build-module/components/post-pingbacks/index.js.map +1 -1
  792. package/build-module/components/post-preview-button/index.js +2 -1
  793. package/build-module/components/post-preview-button/index.js.map +1 -1
  794. package/build-module/components/post-publish-button/index.js +5 -4
  795. package/build-module/components/post-publish-button/index.js.map +1 -1
  796. package/build-module/components/post-publish-button/label.js +1 -0
  797. package/build-module/components/post-publish-button/label.js.map +1 -1
  798. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +4 -3
  799. package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -1
  800. package/build-module/components/post-publish-panel/index.js +4 -3
  801. package/build-module/components/post-publish-panel/index.js.map +1 -1
  802. package/build-module/components/post-publish-panel/maybe-category-panel.js +2 -1
  803. package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
  804. package/build-module/components/post-publish-panel/maybe-post-format-panel.js +4 -3
  805. package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
  806. package/build-module/components/post-publish-panel/maybe-tags-panel.js +4 -3
  807. package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
  808. package/build-module/components/post-publish-panel/maybe-upload-media.js +2 -1
  809. package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
  810. package/build-module/components/post-publish-panel/media-util.js +1 -0
  811. package/build-module/components/post-publish-panel/media-util.js.map +1 -1
  812. package/build-module/components/post-publish-panel/postpublish.js +5 -4
  813. package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
  814. package/build-module/components/post-publish-panel/prepublish.js +2 -1
  815. package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
  816. package/build-module/components/post-saved-state/index.js +2 -1
  817. package/build-module/components/post-saved-state/index.js.map +1 -1
  818. package/build-module/components/post-schedule/check.js +1 -0
  819. package/build-module/components/post-schedule/check.js.map +1 -1
  820. package/build-module/components/post-schedule/index.js +3 -2
  821. package/build-module/components/post-schedule/index.js.map +1 -1
  822. package/build-module/components/post-schedule/label.js +1 -0
  823. package/build-module/components/post-schedule/label.js.map +1 -1
  824. package/build-module/components/post-schedule/panel.js +3 -2
  825. package/build-module/components/post-schedule/panel.js.map +1 -1
  826. package/build-module/components/post-status/index.js +5 -4
  827. package/build-module/components/post-status/index.js.map +1 -1
  828. package/build-module/components/post-sticky/check.js +1 -0
  829. package/build-module/components/post-sticky/check.js.map +1 -1
  830. package/build-module/components/post-sticky/index.js +2 -1
  831. package/build-module/components/post-sticky/index.js.map +1 -1
  832. package/build-module/components/post-sticky/panel.js +2 -1
  833. package/build-module/components/post-sticky/panel.js.map +1 -1
  834. package/build-module/components/post-switch-to-draft-button/index.js +2 -1
  835. package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
  836. package/build-module/components/post-sync-status/index.js +2 -1
  837. package/build-module/components/post-sync-status/index.js.map +1 -1
  838. package/build-module/components/post-taxonomies/check.js +1 -0
  839. package/build-module/components/post-taxonomies/check.js.map +1 -1
  840. package/build-module/components/post-taxonomies/flat-term-selector.js +8 -7
  841. package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
  842. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +7 -6
  843. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  844. package/build-module/components/post-taxonomies/index.js +3 -2
  845. package/build-module/components/post-taxonomies/index.js.map +1 -1
  846. package/build-module/components/post-taxonomies/most-used-terms.js +4 -3
  847. package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
  848. package/build-module/components/post-taxonomies/panel.js +2 -1
  849. package/build-module/components/post-taxonomies/panel.js.map +1 -1
  850. package/build-module/components/post-template/block-theme.js +2 -1
  851. package/build-module/components/post-template/block-theme.js.map +1 -1
  852. package/build-module/components/post-template/classic-theme.js +2 -1
  853. package/build-module/components/post-template/classic-theme.js.map +1 -1
  854. package/build-module/components/post-template/create-new-template-modal.js +3 -2
  855. package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
  856. package/build-module/components/post-template/create-new-template.js +2 -1
  857. package/build-module/components/post-template/create-new-template.js.map +1 -1
  858. package/build-module/components/post-template/hooks.js +1 -0
  859. package/build-module/components/post-template/hooks.js.map +1 -1
  860. package/build-module/components/post-template/panel.js +2 -1
  861. package/build-module/components/post-template/panel.js.map +1 -1
  862. package/build-module/components/post-template/reset-default-template.js +2 -1
  863. package/build-module/components/post-template/reset-default-template.js.map +1 -1
  864. package/build-module/components/post-template/swap-template-button.js +2 -1
  865. package/build-module/components/post-template/swap-template-button.js.map +1 -1
  866. package/build-module/components/post-text-editor/index.js +2 -1
  867. package/build-module/components/post-text-editor/index.js.map +1 -1
  868. package/build-module/components/post-title/constants.js +3 -2
  869. package/build-module/components/post-title/constants.js.map +1 -1
  870. package/build-module/components/post-title/index.js +3 -2
  871. package/build-module/components/post-title/index.js.map +1 -1
  872. package/build-module/components/post-title/post-title-raw.js +2 -1
  873. package/build-module/components/post-title/post-title-raw.js.map +1 -1
  874. package/build-module/components/post-title/use-post-title-focus.js +1 -0
  875. package/build-module/components/post-title/use-post-title-focus.js.map +1 -1
  876. package/build-module/components/post-title/use-post-title.js +1 -0
  877. package/build-module/components/post-title/use-post-title.js.map +1 -1
  878. package/build-module/components/post-transform-panel/hooks.js +2 -1
  879. package/build-module/components/post-transform-panel/hooks.js.map +1 -1
  880. package/build-module/components/post-transform-panel/index.js +2 -1
  881. package/build-module/components/post-transform-panel/index.js.map +1 -1
  882. package/build-module/components/post-trash/check.js +1 -0
  883. package/build-module/components/post-trash/check.js.map +1 -1
  884. package/build-module/components/post-trash/index.js +2 -1
  885. package/build-module/components/post-trash/index.js.map +1 -1
  886. package/build-module/components/post-type-support-check/index.js +1 -0
  887. package/build-module/components/post-type-support-check/index.js.map +1 -1
  888. package/build-module/components/post-url/check.js +1 -0
  889. package/build-module/components/post-url/check.js.map +1 -1
  890. package/build-module/components/post-url/index.js +2 -1
  891. package/build-module/components/post-url/index.js.map +1 -1
  892. package/build-module/components/post-url/label.js +1 -0
  893. package/build-module/components/post-url/label.js.map +1 -1
  894. package/build-module/components/post-url/panel.js +2 -1
  895. package/build-module/components/post-url/panel.js.map +1 -1
  896. package/build-module/components/post-view-link/index.js +2 -1
  897. package/build-module/components/post-view-link/index.js.map +1 -1
  898. package/build-module/components/post-visibility/check.js +1 -0
  899. package/build-module/components/post-visibility/check.js.map +1 -1
  900. package/build-module/components/post-visibility/index.js +2 -1
  901. package/build-module/components/post-visibility/index.js.map +1 -1
  902. package/build-module/components/post-visibility/label.js +1 -0
  903. package/build-module/components/post-visibility/label.js.map +1 -1
  904. package/build-module/components/post-visibility/utils.js +2 -1
  905. package/build-module/components/post-visibility/utils.js.map +1 -1
  906. package/build-module/components/posts-per-page/index.js +2 -1
  907. package/build-module/components/posts-per-page/index.js.map +1 -1
  908. package/build-module/components/preferences-modal/enable-panel.js +3 -2
  909. package/build-module/components/preferences-modal/enable-panel.js.map +1 -1
  910. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js +4 -3
  911. package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js.map +1 -1
  912. package/build-module/components/preferences-modal/enable-publish-sidebar.js +3 -2
  913. package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +1 -1
  914. package/build-module/components/preferences-modal/index.js +4 -3
  915. package/build-module/components/preferences-modal/index.js.map +2 -2
  916. package/build-module/components/preview-dropdown/index.js +2 -1
  917. package/build-module/components/preview-dropdown/index.js.map +1 -1
  918. package/build-module/components/provider/disable-non-page-content-blocks.js +1 -0
  919. package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
  920. package/build-module/components/provider/index.js +7 -8
  921. package/build-module/components/provider/index.js.map +2 -2
  922. package/build-module/components/provider/navigation-block-editing-mode.js +1 -0
  923. package/build-module/components/provider/navigation-block-editing-mode.js.map +1 -1
  924. package/build-module/components/provider/use-auto-switch-editor-sidebars.js +1 -0
  925. package/build-module/components/provider/use-auto-switch-editor-sidebars.js.map +1 -1
  926. package/build-module/components/provider/use-block-editor-settings.js +4 -3
  927. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  928. package/build-module/components/provider/use-hide-blocks-from-inserter.js +2 -1
  929. package/build-module/components/provider/use-hide-blocks-from-inserter.js.map +1 -1
  930. package/build-module/components/provider/use-post-content-blocks.js +2 -1
  931. package/build-module/components/provider/use-post-content-blocks.js.map +1 -1
  932. package/build-module/components/provider/with-registry-provider.js +3 -2
  933. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  934. package/build-module/components/resizable-editor/index.js +3 -2
  935. package/build-module/components/resizable-editor/index.js.map +1 -1
  936. package/build-module/components/resizable-editor/resize-handle.js +3 -2
  937. package/build-module/components/resizable-editor/resize-handle.js.map +1 -1
  938. package/build-module/components/save-publish-panels/index.js +4 -3
  939. package/build-module/components/save-publish-panels/index.js.map +1 -1
  940. package/build-module/components/sidebar/constants.js +2 -1
  941. package/build-module/components/sidebar/constants.js.map +1 -1
  942. package/build-module/components/sidebar/header.js +4 -3
  943. package/build-module/components/sidebar/header.js.map +1 -1
  944. package/build-module/components/sidebar/index.js +6 -5
  945. package/build-module/components/sidebar/index.js.map +1 -1
  946. package/build-module/components/sidebar/post-summary.js +3 -2
  947. package/build-module/components/sidebar/post-summary.js.map +1 -1
  948. package/build-module/components/site-discussion/index.js +3 -2
  949. package/build-module/components/site-discussion/index.js.map +1 -1
  950. package/build-module/components/start-page-options/index.js +7 -7
  951. package/build-module/components/start-page-options/index.js.map +2 -2
  952. package/build-module/components/start-template-options/index.js +2 -1
  953. package/build-module/components/start-template-options/index.js.map +1 -1
  954. package/build-module/components/style-book/categories.js +65 -0
  955. package/build-module/components/style-book/categories.js.map +7 -0
  956. package/build-module/components/style-book/color-examples.js +38 -0
  957. package/build-module/components/style-book/color-examples.js.map +7 -0
  958. package/build-module/components/style-book/constants.js +291 -0
  959. package/build-module/components/style-book/constants.js.map +7 -0
  960. package/build-module/components/style-book/duotone-examples.js +49 -0
  961. package/build-module/components/style-book/duotone-examples.js.map +7 -0
  962. package/build-module/components/style-book/examples.js +209 -0
  963. package/build-module/components/style-book/examples.js.map +7 -0
  964. package/build-module/components/style-book/index.js +619 -0
  965. package/build-module/components/style-book/index.js.map +7 -0
  966. package/build-module/components/style-book/types.js +1 -0
  967. package/build-module/components/style-book/types.js.map +7 -0
  968. package/build-module/components/styles-canvas/index.js +105 -0
  969. package/build-module/components/styles-canvas/index.js.map +7 -0
  970. package/build-module/components/styles-canvas/revisions.js +108 -0
  971. package/build-module/components/styles-canvas/revisions.js.map +7 -0
  972. package/build-module/components/styles-canvas/style-book.js +39 -0
  973. package/build-module/components/styles-canvas/style-book.js.map +7 -0
  974. package/build-module/components/table-of-contents/index.js +2 -1
  975. package/build-module/components/table-of-contents/index.js.map +1 -1
  976. package/build-module/components/table-of-contents/panel.js +2 -1
  977. package/build-module/components/table-of-contents/panel.js.map +1 -1
  978. package/build-module/components/template-content-panel/index.js +5 -4
  979. package/build-module/components/template-content-panel/index.js.map +1 -1
  980. package/build-module/components/template-part-content-panel/index.js +3 -2
  981. package/build-module/components/template-part-content-panel/index.js.map +1 -1
  982. package/build-module/components/template-part-menu-items/convert-to-regular.js +2 -1
  983. package/build-module/components/template-part-menu-items/convert-to-regular.js.map +1 -1
  984. package/build-module/components/template-part-menu-items/convert-to-template-part.js +2 -1
  985. package/build-module/components/template-part-menu-items/convert-to-template-part.js.map +1 -1
  986. package/build-module/components/template-part-menu-items/index.js +2 -1
  987. package/build-module/components/template-part-menu-items/index.js.map +1 -1
  988. package/build-module/components/template-validation-notice/index.js +2 -1
  989. package/build-module/components/template-validation-notice/index.js.map +1 -1
  990. package/build-module/components/text-editor/index.js +2 -1
  991. package/build-module/components/text-editor/index.js.map +1 -1
  992. package/build-module/components/theme-support-check/index.js +1 -0
  993. package/build-module/components/theme-support-check/index.js.map +1 -1
  994. package/build-module/components/time-to-read/index.js +3 -2
  995. package/build-module/components/time-to-read/index.js.map +1 -1
  996. package/build-module/components/unsaved-changes-warning/index.js +1 -0
  997. package/build-module/components/unsaved-changes-warning/index.js.map +1 -1
  998. package/build-module/components/visual-editor/edit-template-blocks-notification.js +2 -1
  999. package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
  1000. package/build-module/components/visual-editor/index.js +6 -4
  1001. package/build-module/components/visual-editor/index.js.map +2 -2
  1002. package/build-module/components/visual-editor/use-select-nearest-editable-block.js +2 -1
  1003. package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
  1004. package/build-module/components/visual-editor/use-zoom-out-mode-exit.js +1 -0
  1005. package/build-module/components/visual-editor/use-zoom-out-mode-exit.js.map +1 -1
  1006. package/build-module/components/word-count/index.js +2 -1
  1007. package/build-module/components/word-count/index.js.map +1 -1
  1008. package/build-module/components/zoom-out-toggle/index.js +3 -2
  1009. package/build-module/components/zoom-out-toggle/index.js.map +1 -1
  1010. package/build-module/dataviews/api.js +1 -0
  1011. package/build-module/dataviews/api.js.map +1 -1
  1012. package/build-module/dataviews/fields/content-preview/content-preview-view.js +3 -2
  1013. package/build-module/dataviews/fields/content-preview/content-preview-view.js.map +2 -2
  1014. package/build-module/dataviews/fields/content-preview/index.js +2 -1
  1015. package/build-module/dataviews/fields/content-preview/index.js.map +1 -1
  1016. package/build-module/dataviews/store/private-actions.js +2 -1
  1017. package/build-module/dataviews/store/private-actions.js.map +1 -1
  1018. package/build-module/dataviews/store/private-selectors.js +2 -1
  1019. package/build-module/dataviews/store/private-selectors.js.map +1 -1
  1020. package/build-module/dataviews/store/reducer.js +1 -0
  1021. package/build-module/dataviews/store/reducer.js.map +1 -1
  1022. package/build-module/hooks/custom-sources-backwards-compatibility.js +3 -2
  1023. package/build-module/hooks/custom-sources-backwards-compatibility.js.map +1 -1
  1024. package/build-module/hooks/default-autocompleters.js +1 -0
  1025. package/build-module/hooks/default-autocompleters.js.map +1 -1
  1026. package/build-module/hooks/index.js +2 -0
  1027. package/build-module/hooks/index.js.map +2 -2
  1028. package/build-module/hooks/media-upload.js +20 -5
  1029. package/build-module/hooks/media-upload.js.map +2 -2
  1030. package/build-module/hooks/navigation-link-view-button.js +4 -3
  1031. package/build-module/hooks/navigation-link-view-button.js.map +1 -1
  1032. package/build-module/hooks/pattern-overrides.js +4 -3
  1033. package/build-module/hooks/pattern-overrides.js.map +1 -1
  1034. package/build-module/hooks/push-changes-to-global-styles/index.js +310 -0
  1035. package/build-module/hooks/push-changes-to-global-styles/index.js.map +7 -0
  1036. package/build-module/hooks/template-part-navigation-edit-button.js +6 -5
  1037. package/build-module/hooks/template-part-navigation-edit-button.js.map +1 -1
  1038. package/build-module/hooks/use-global-styles-output.js +50 -0
  1039. package/build-module/hooks/use-global-styles-output.js.map +7 -0
  1040. package/build-module/index.js +1 -0
  1041. package/build-module/index.js.map +1 -1
  1042. package/build-module/lock-unlock.js +2 -1
  1043. package/build-module/lock-unlock.js.map +1 -1
  1044. package/build-module/private-apis.js +13 -10
  1045. package/build-module/private-apis.js.map +2 -2
  1046. package/build-module/store/actions.js +52 -51
  1047. package/build-module/store/actions.js.map +1 -1
  1048. package/build-module/store/constants.js +14 -13
  1049. package/build-module/store/constants.js.map +1 -1
  1050. package/build-module/store/defaults.js +2 -1
  1051. package/build-module/store/defaults.js.map +1 -1
  1052. package/build-module/store/index.js +3 -2
  1053. package/build-module/store/index.js.map +1 -1
  1054. package/build-module/store/local-autosave.js +1 -0
  1055. package/build-module/store/local-autosave.js.map +1 -1
  1056. package/build-module/store/private-actions.js +28 -7
  1057. package/build-module/store/private-actions.js.map +2 -2
  1058. package/build-module/store/private-selectors.js +17 -8
  1059. package/build-module/store/private-selectors.js.map +2 -2
  1060. package/build-module/store/reducer.js +23 -0
  1061. package/build-module/store/reducer.js.map +2 -2
  1062. package/build-module/store/selectors.js +79 -78
  1063. package/build-module/store/selectors.js.map +2 -2
  1064. package/build-module/store/utils/is-template-revertable.js +1 -0
  1065. package/build-module/store/utils/is-template-revertable.js.map +1 -1
  1066. package/build-module/store/utils/notice-builder.js +1 -0
  1067. package/build-module/store/utils/notice-builder.js.map +1 -1
  1068. package/build-module/utils/get-item-title.js +1 -0
  1069. package/build-module/utils/get-item-title.js.map +1 -1
  1070. package/build-module/utils/get-template-info.js +3 -2
  1071. package/build-module/utils/get-template-info.js.map +1 -1
  1072. package/build-module/utils/get-template-part-icon.js +1 -0
  1073. package/build-module/utils/get-template-part-icon.js.map +1 -1
  1074. package/build-module/utils/index.js +1 -0
  1075. package/build-module/utils/index.js.map +1 -1
  1076. package/build-module/utils/media-sideload/index.js +2 -1
  1077. package/build-module/utils/media-sideload/index.js.map +1 -1
  1078. package/build-module/utils/media-upload/index.js +2 -1
  1079. package/build-module/utils/media-upload/index.js.map +1 -1
  1080. package/build-module/utils/pageTypeBadge.js +1 -0
  1081. package/build-module/utils/pageTypeBadge.js.map +1 -1
  1082. package/build-module/utils/search-templates.js +1 -0
  1083. package/build-module/utils/search-templates.js.map +1 -1
  1084. package/build-module/utils/set-nested-value.js +24 -0
  1085. package/build-module/utils/set-nested-value.js.map +7 -0
  1086. package/build-module/utils/terms.js +4 -3
  1087. package/build-module/utils/terms.js.map +1 -1
  1088. package/build-module/utils/url.js +1 -0
  1089. package/build-module/utils/url.js.map +1 -1
  1090. package/build-style/style-rtl.css +3020 -13
  1091. package/build-style/style.css +3021 -13
  1092. package/build-types/components/collab-sidebar/add-comment.d.ts +3 -3
  1093. package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
  1094. package/build-types/components/collab-sidebar/comments.d.ts +3 -3
  1095. package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
  1096. package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
  1097. package/build-types/components/collab-sidebar/utils.d.ts +2 -2
  1098. package/build-types/components/collab-sidebar/utils.d.ts.map +1 -1
  1099. package/build-types/components/document-bar/index.d.ts +2 -2
  1100. package/build-types/components/document-bar/index.d.ts.map +1 -1
  1101. package/build-types/components/editor/index.d.ts.map +1 -1
  1102. package/build-types/components/editor-interface/index.d.ts +1 -3
  1103. package/build-types/components/editor-interface/index.d.ts.map +1 -1
  1104. package/build-types/components/entities-saved-states/entity-type-list.d.ts.map +1 -1
  1105. package/build-types/components/global-styles/block-link.d.ts +12 -0
  1106. package/build-types/components/global-styles/block-link.d.ts.map +1 -0
  1107. package/build-types/components/global-styles/header.d.ts +7 -0
  1108. package/build-types/components/global-styles/header.d.ts.map +1 -0
  1109. package/build-types/components/global-styles/hooks.d.ts +24 -0
  1110. package/build-types/components/global-styles/hooks.d.ts.map +1 -0
  1111. package/build-types/components/global-styles/index.d.ts +6 -0
  1112. package/build-types/components/global-styles/index.d.ts.map +1 -0
  1113. package/build-types/components/global-styles/menu.d.ts +13 -0
  1114. package/build-types/components/global-styles/menu.d.ts.map +1 -0
  1115. package/build-types/components/global-styles-provider/index.d.ts +1 -5
  1116. package/build-types/components/global-styles-provider/index.d.ts.map +1 -1
  1117. package/build-types/components/global-styles-renderer/index.d.ts +4 -0
  1118. package/build-types/components/global-styles-renderer/index.d.ts.map +1 -0
  1119. package/build-types/components/global-styles-sidebar/default-sidebar.d.ts +13 -0
  1120. package/build-types/components/global-styles-sidebar/default-sidebar.d.ts.map +1 -0
  1121. package/build-types/components/global-styles-sidebar/index.d.ts +2 -0
  1122. package/build-types/components/global-styles-sidebar/index.d.ts.map +1 -0
  1123. package/build-types/components/global-styles-sidebar/welcome-guide-image.d.ts +5 -0
  1124. package/build-types/components/global-styles-sidebar/welcome-guide-image.d.ts.map +1 -0
  1125. package/build-types/components/global-styles-sidebar/welcome-guide.d.ts +2 -0
  1126. package/build-types/components/global-styles-sidebar/welcome-guide.d.ts.map +1 -0
  1127. package/build-types/components/header/index.d.ts +1 -3
  1128. package/build-types/components/header/index.d.ts.map +1 -1
  1129. package/build-types/components/provider/index.d.ts.map +1 -1
  1130. package/build-types/components/start-page-options/index.d.ts.map +1 -1
  1131. package/build-types/components/style-book/categories.d.ts +18 -0
  1132. package/build-types/components/style-book/categories.d.ts.map +1 -0
  1133. package/build-types/components/style-book/color-examples.d.ts +7 -0
  1134. package/build-types/components/style-book/color-examples.d.ts.map +1 -0
  1135. package/build-types/components/style-book/constants.d.ts +11 -0
  1136. package/build-types/components/style-book/constants.d.ts.map +1 -0
  1137. package/build-types/components/style-book/duotone-examples.d.ts +9 -0
  1138. package/build-types/components/style-book/duotone-examples.d.ts.map +1 -0
  1139. package/build-types/components/style-book/examples.d.ts +12 -0
  1140. package/build-types/components/style-book/examples.d.ts.map +1 -0
  1141. package/build-types/components/style-book/index.d.ts +31 -0
  1142. package/build-types/components/style-book/index.d.ts.map +1 -0
  1143. package/build-types/components/style-book/types.d.ts +72 -0
  1144. package/build-types/components/style-book/types.d.ts.map +1 -0
  1145. package/build-types/components/styles-canvas/index.d.ts +16 -0
  1146. package/build-types/components/styles-canvas/index.d.ts.map +1 -0
  1147. package/build-types/components/styles-canvas/revisions.d.ts +5 -0
  1148. package/build-types/components/styles-canvas/revisions.d.ts.map +1 -0
  1149. package/build-types/components/styles-canvas/style-book.d.ts +6 -0
  1150. package/build-types/components/styles-canvas/style-book.d.ts.map +1 -0
  1151. package/build-types/components/visual-editor/index.d.ts +1 -2
  1152. package/build-types/components/visual-editor/index.d.ts.map +1 -1
  1153. package/build-types/dataviews/fields/content-preview/content-preview-view.d.ts.map +1 -1
  1154. package/build-types/hooks/push-changes-to-global-styles/index.d.ts +2 -0
  1155. package/build-types/hooks/push-changes-to-global-styles/index.d.ts.map +1 -0
  1156. package/build-types/hooks/use-global-styles-output.d.ts +18 -0
  1157. package/build-types/hooks/use-global-styles-output.d.ts.map +1 -0
  1158. package/build-types/private-apis.d.ts.map +1 -1
  1159. package/build-types/store/private-actions.d.ts +20 -0
  1160. package/build-types/store/private-actions.d.ts.map +1 -1
  1161. package/build-types/store/private-selectors.d.ts +14 -0
  1162. package/build-types/store/private-selectors.d.ts.map +1 -1
  1163. package/build-types/store/reducer.d.ts +20 -0
  1164. package/build-types/store/reducer.d.ts.map +1 -1
  1165. package/build-types/store/selectors.d.ts.map +1 -1
  1166. package/build-types/utils/set-nested-value.d.ts +20 -0
  1167. package/build-types/utils/set-nested-value.d.ts.map +1 -0
  1168. package/package.json +40 -40
  1169. package/src/components/collab-sidebar/add-comment.js +10 -6
  1170. package/src/components/collab-sidebar/comments.js +42 -28
  1171. package/src/components/collab-sidebar/index.js +14 -12
  1172. package/src/components/collab-sidebar/style.scss +2 -1
  1173. package/src/components/collab-sidebar/utils.js +3 -12
  1174. package/src/components/document-bar/index.js +18 -3
  1175. package/src/components/editor/index.js +25 -1
  1176. package/src/components/editor-help/style.scss +1 -1
  1177. package/src/components/editor-interface/index.js +40 -39
  1178. package/src/components/entities-saved-states/entity-type-list.js +19 -17
  1179. package/src/components/global-styles/block-link.js +65 -0
  1180. package/src/components/global-styles/header.js +48 -0
  1181. package/src/components/global-styles/hooks.js +216 -0
  1182. package/src/components/global-styles/index.js +125 -0
  1183. package/src/components/global-styles/menu.js +101 -0
  1184. package/src/components/global-styles/style.scss +11 -0
  1185. package/src/components/global-styles-provider/index.js +3 -45
  1186. package/src/components/global-styles-renderer/index.js +39 -0
  1187. package/src/components/global-styles-sidebar/default-sidebar.js +46 -0
  1188. package/src/components/global-styles-sidebar/index.js +177 -0
  1189. package/src/components/global-styles-sidebar/style.scss +119 -0
  1190. package/src/components/global-styles-sidebar/welcome-guide-image.js +11 -0
  1191. package/src/components/global-styles-sidebar/welcome-guide.js +136 -0
  1192. package/src/components/header/index.js +11 -6
  1193. package/src/components/post-featured-image/index.js +44 -1
  1194. package/src/components/post-last-revision/style.scss +1 -1
  1195. package/src/components/post-panel-row/style.scss +1 -0
  1196. package/src/components/post-publish-panel/style.scss +1 -1
  1197. package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +2 -2
  1198. package/src/components/preferences-modal/index.js +1 -1
  1199. package/src/components/provider/index.js +0 -2
  1200. package/src/components/start-page-options/index.js +5 -6
  1201. package/src/components/start-page-options/style.scss +1 -1
  1202. package/src/components/style-book/categories.ts +97 -0
  1203. package/src/components/style-book/color-examples.tsx +56 -0
  1204. package/src/components/style-book/constants.ts +308 -0
  1205. package/src/components/style-book/duotone-examples.tsx +56 -0
  1206. package/src/components/style-book/examples.tsx +273 -0
  1207. package/src/components/style-book/index.js +794 -0
  1208. package/src/components/style-book/style.scss +44 -0
  1209. package/src/components/style-book/test/categories.js +166 -0
  1210. package/src/components/style-book/types.ts +80 -0
  1211. package/src/components/styles-canvas/index.js +126 -0
  1212. package/src/components/styles-canvas/revisions.js +144 -0
  1213. package/src/components/styles-canvas/style-book.js +57 -0
  1214. package/src/components/styles-canvas/style.scss +40 -0
  1215. package/src/components/visual-editor/index.js +2 -1
  1216. package/src/dataviews/fields/content-preview/content-preview-view.tsx +2 -0
  1217. package/src/hooks/index.js +1 -0
  1218. package/src/hooks/media-upload.js +25 -5
  1219. package/src/hooks/push-changes-to-global-styles/index.js +391 -0
  1220. package/src/hooks/push-changes-to-global-styles/style.scss +4 -0
  1221. package/src/hooks/use-global-styles-output.js +76 -0
  1222. package/src/private-apis.js +10 -8
  1223. package/src/store/private-actions.js +37 -0
  1224. package/src/store/private-selectors.js +20 -0
  1225. package/src/store/reducer.js +36 -0
  1226. package/src/store/selectors.js +0 -2
  1227. package/src/style.scss +7 -1
  1228. package/src/utils/set-nested-value.js +39 -0
  1229. package/tsconfig.json +3 -0
  1230. package/tsconfig.tsbuildinfo +1 -1
  1231. package/build/components/block-settings-menu/content-only-settings-menu.js +0 -186
  1232. package/build/components/block-settings-menu/content-only-settings-menu.js.map +0 -7
  1233. package/build/components/editor-interface/content-slot-fill.js.map +0 -7
  1234. package/build-module/components/block-settings-menu/content-only-settings-menu.js +0 -161
  1235. package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +0 -7
  1236. package/build-module/components/editor-interface/content-slot-fill.js +0 -9
  1237. package/build-module/components/editor-interface/content-slot-fill.js.map +0 -7
  1238. package/build-types/components/block-settings-menu/content-only-settings-menu.d.ts +0 -2
  1239. package/build-types/components/block-settings-menu/content-only-settings-menu.d.ts.map +0 -1
  1240. package/build-types/components/editor-interface/content-slot-fill.d.ts +0 -14
  1241. package/build-types/components/editor-interface/content-slot-fill.d.ts.map +0 -1
  1242. package/src/components/block-settings-menu/content-only-settings-menu.js +0 -185
  1243. package/src/components/block-settings-menu/content-only-settings-menu.native.js +0 -4
  1244. package/src/components/block-settings-menu/style.scss +0 -6
  1245. package/src/components/editor-interface/content-slot-fill.js +0 -10
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/collab-sidebar/comments.js"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseState,\n\tRawHTML,\n\tuseEffect,\n\tuseCallback,\n\tuseMemo,\n\tuseRef,\n} from '@wordpress/element';\nimport {\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalConfirmDialog as ConfirmDialog,\n\tButton,\n\tFlexItem,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { useDebounce } from '@wordpress/compose';\n\nimport { published, moreVertical } from '@wordpress/icons';\nimport { __, _x, sprintf, _n } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport {\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport CommentAuthorInfo from './comment-author-info';\nimport CommentForm from './comment-form';\nimport { focusCommentThread, getCommentExcerpt } from './utils';\nimport { useFloatingThread } from './hooks';\nimport { AddComment } from './add-comment';\nimport { store as editorStore } from '../../store';\n\nconst { useBlockElement } = unlock( blockEditorPrivateApis );\nconst { Menu } = unlock( componentsPrivateApis );\n\nexport function Comments( {\n\tthreads: noteThreads,\n\tonEditComment,\n\tonAddReply,\n\tonCommentDelete,\n\tshowCommentBoard,\n\tsetShowCommentBoard,\n\tcommentSidebarRef,\n\treflowComments,\n\tisFloating = false,\n\tcommentLastUpdated,\n} ) {\n\tconst [ heights, setHeights ] = useState( {} );\n\tconst [ selectedThread, setSelectedThread ] = useState( null );\n\tconst [ boardOffsets, setBoardOffsets ] = useState( {} );\n\tconst [ blockRefs, setBlockRefs ] = useState( {} );\n\n\tconst { setCanvasMinHeight } = unlock( useDispatch( editorStore ) );\n\tconst { blockCommentId, selectedBlockClientId, orderedBlockIds } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst { getBlockAttributes, getSelectedBlockClientId } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\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\tselectedBlockClientId: clientId,\n\t\t\t\torderedBlockIds: select( blockEditorStore ).getBlockOrder(),\n\t\t\t};\n\t\t}, [] );\n\n\tconst relatedBlockElement = useBlockElement( selectedBlockClientId );\n\n\tconst threads = useMemo( () => {\n\t\tconst t = [ ...noteThreads ];\n\t\tconst orderedThreads = [];\n\t\t// In floating mode, when the note board is shown, and as long\n\t\t// as the selected block doesn't have an existing note attached -\n\t\t// add a \"new note\" entry to the threads. This special thread type\n\t\t// gets sorted and floated like regular threads, but shows an AddComment\n\t\t// component instead of a regular comment thread.\n\t\tif ( isFloating && showCommentBoard && undefined === blockCommentId ) {\n\t\t\t// Insert the new note entry at the correct location for its blockId.\n\t\t\tconst newNoteThread = {\n\t\t\t\tid: 'new-note-thread',\n\t\t\t\tblockClientId: selectedBlockClientId,\n\t\t\t\tcontent: { rendered: '' },\n\t\t\t};\n\t\t\t// Insert the new comment block at the right order within the threads.\n\t\t\torderedBlockIds.forEach( ( blockId ) => {\n\t\t\t\tif ( blockId === selectedBlockClientId ) {\n\t\t\t\t\torderedThreads.push( newNoteThread );\n\t\t\t\t} else {\n\t\t\t\t\tconst threadForBlock = t.find(\n\t\t\t\t\t\t( thread ) => thread.blockClientId === blockId\n\t\t\t\t\t);\n\t\t\t\t\tif ( threadForBlock ) {\n\t\t\t\t\t\torderedThreads.push( threadForBlock );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn orderedThreads;\n\t\t}\n\t\treturn t;\n\t}, [\n\t\tnoteThreads,\n\t\tisFloating,\n\t\tshowCommentBoard,\n\t\tblockCommentId,\n\t\tselectedBlockClientId,\n\t\torderedBlockIds,\n\t] );\n\n\tconst handleDelete = async ( comment ) => {\n\t\tconst currentIndex = threads.findIndex( ( t ) => t.id === comment.id );\n\t\tconst nextThread = threads[ currentIndex + 1 ];\n\t\tconst prevThread = threads[ currentIndex - 1 ];\n\n\t\tawait onCommentDelete( comment );\n\n\t\tif ( comment.parent !== 0 ) {\n\t\t\t// Move focus to the parent thread when a reply was deleted.\n\t\t\tsetSelectedThread( comment.parent );\n\t\t\tfocusCommentThread( comment.parent, commentSidebarRef.current );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nextThread ) {\n\t\t\tsetSelectedThread( nextThread.id );\n\t\t\tfocusCommentThread( nextThread.id, commentSidebarRef.current );\n\t\t} else if ( prevThread ) {\n\t\t\tsetSelectedThread( prevThread.id );\n\t\t\tfocusCommentThread( prevThread.id, commentSidebarRef.current );\n\t\t} else {\n\t\t\tsetSelectedThread( null );\n\t\t\tsetShowCommentBoard( false );\n\t\t\t// Move focus to the related block.\n\t\t\trelatedBlockElement?.focus();\n\t\t}\n\t};\n\n\t// Auto-select the related comment thread when a block is selected.\n\tuseEffect( () => {\n\t\t// Fallback to 'new-note-thread' when showing the comment board for a new note.\n\t\tconst fallback = showCommentBoard ? 'new-note-thread' : null;\n\t\tsetSelectedThread( blockCommentId ?? fallback );\n\t}, [ blockCommentId, showCommentBoard ] );\n\n\tconst setBlockRef = useCallback( ( id, blockRef ) => {\n\t\tsetBlockRefs( ( prev ) => ( { ...prev, [ id ]: blockRef } ) );\n\t}, [] );\n\n\t// Recalculate floating comment thread offsets whenever the heights change.\n\tuseEffect( () => {\n\t\t/**\n\t\t * Calculate the y offsets for all comment threads. Account for potentially\n\t\t * overlapping threads and adjust their positions accordingly.\n\t\t */\n\t\tconst calculateAllOffsets = () => {\n\t\t\tconst offsets = {};\n\n\t\t\tif ( ! isFloating ) {\n\t\t\t\treturn { offsets, minHeight: 0 };\n\t\t\t}\n\n\t\t\t// Find the index of the selected thread.\n\t\t\tconst selectedThreadIndex = threads.findIndex(\n\t\t\t\t( t ) => t.id === selectedThread\n\t\t\t);\n\n\t\t\tconst breakIndex =\n\t\t\t\tselectedThreadIndex === -1 ? 0 : selectedThreadIndex;\n\n\t\t\t// If there is a selected thread, push threads above up and threads below down.\n\t\t\tconst selectedThreadData = threads[ breakIndex ];\n\n\t\t\tif (\n\t\t\t\t! selectedThreadData ||\n\t\t\t\t! blockRefs[ selectedThreadData.id ]\n\t\t\t) {\n\t\t\t\treturn { offsets, minHeight: 0 };\n\t\t\t}\n\n\t\t\tlet blockElement = blockRefs[ selectedThreadData.id ];\n\t\t\tlet blockRect = blockElement?.getBoundingClientRect();\n\t\t\tconst selectedThreadTop = blockRect?.top || 0;\n\t\t\tconst selectedThreadHeight = heights[ selectedThreadData.id ] || 0;\n\n\t\t\toffsets[ selectedThreadData.id ] = -16;\n\n\t\t\tlet previousThreadData = {\n\t\t\t\tthreadTop: selectedThreadTop - 16,\n\t\t\t\tthreadHeight: selectedThreadHeight,\n\t\t\t};\n\n\t\t\t// Process threads after the selected thread, offsetting any overlapping\n\t\t\t// threads downward.\n\t\t\tfor ( let i = breakIndex + 1; i < threads.length; i++ ) {\n\t\t\t\tconst thread = threads[ i ];\n\t\t\t\tif ( ! blockRefs[ thread.id ] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tblockElement = blockRefs[ thread.id ];\n\t\t\t\tblockRect = blockElement?.getBoundingClientRect();\n\t\t\t\tconst threadTop = blockRect?.top || 0;\n\t\t\t\tconst threadHeight = heights[ thread.id ] || 0;\n\n\t\t\t\tlet additionalOffset = -16;\n\n\t\t\t\t// Check if the thread overlaps with the previous one.\n\t\t\t\tconst previousBottom =\n\t\t\t\t\tpreviousThreadData.threadTop +\n\t\t\t\t\tpreviousThreadData.threadHeight;\n\t\t\t\tif ( threadTop < previousBottom + 16 ) {\n\t\t\t\t\t// Shift down by the difference plus a margin to avoid overlap.\n\t\t\t\t\tadditionalOffset = previousBottom - threadTop + 20;\n\t\t\t\t}\n\n\t\t\t\toffsets[ thread.id ] = additionalOffset;\n\n\t\t\t\t// Update for next iteration.\n\t\t\t\tpreviousThreadData = {\n\t\t\t\t\tthreadTop: threadTop + additionalOffset,\n\t\t\t\t\tthreadHeight,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Process threads before the selected thread, offsetting any overlapping\n\t\t\t// threads upward.\n\t\t\tlet nextThreadData = {\n\t\t\t\tthreadTop: selectedThreadTop - 16,\n\t\t\t};\n\n\t\t\tfor ( let i = selectedThreadIndex - 1; i >= 0; i-- ) {\n\t\t\t\tconst thread = threads[ i ];\n\t\t\t\tif ( ! blockRefs[ thread.id ] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tblockElement = blockRefs[ thread.id ];\n\t\t\t\tblockRect = blockElement?.getBoundingClientRect();\n\t\t\t\tconst threadTop = blockRect?.top || 0;\n\t\t\t\tconst threadHeight = heights[ thread.id ] || 0;\n\n\t\t\t\tlet additionalOffset = -16;\n\n\t\t\t\t// Calculate the bottom position of this thread with default offset.\n\t\t\t\tconst threadBottom = threadTop + threadHeight;\n\n\t\t\t\t// Check if this thread's bottom would overlap with the next thread's top.\n\t\t\t\tif ( threadBottom > nextThreadData.threadTop ) {\n\t\t\t\t\t// Shift up by the difference plus a margin to avoid overlap.\n\t\t\t\t\tadditionalOffset =\n\t\t\t\t\t\tnextThreadData.threadTop -\n\t\t\t\t\t\tthreadTop -\n\t\t\t\t\t\tthreadHeight -\n\t\t\t\t\t\t20;\n\t\t\t\t}\n\n\t\t\t\toffsets[ thread.id ] = additionalOffset;\n\n\t\t\t\t// Update for next iteration (going upward).\n\t\t\t\tnextThreadData = {\n\t\t\t\t\tthreadTop: threadTop + additionalOffset,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tlet editorMinHeight = 0;\n\t\t\t// Take the calculated top of the final note plus its height as the editor min height.\n\t\t\tconst lastThread = threads[ threads.length - 1 ];\n\t\t\tif ( blockRefs[ lastThread.id ] ) {\n\t\t\t\tconst lastBlockElement = blockRefs[ lastThread.id ];\n\t\t\t\tconst lastBlockRect = lastBlockElement?.getBoundingClientRect();\n\t\t\t\tconst lastThreadTop = lastBlockRect?.top || 0;\n\t\t\t\tconst lastThreadHeight = heights[ lastThread.id ] || 0;\n\t\t\t\tconst lastThreadOffset = offsets[ lastThread.id ] || 0;\n\t\t\t\teditorMinHeight =\n\t\t\t\t\tlastThreadTop + lastThreadHeight + lastThreadOffset + 32;\n\t\t\t}\n\n\t\t\treturn { offsets, minHeight: editorMinHeight };\n\t\t};\n\t\tconst { offsets: newOffsets, minHeight } = calculateAllOffsets();\n\t\tif ( Object.keys( newOffsets ).length > 0 ) {\n\t\t\tsetBoardOffsets( newOffsets );\n\t\t}\n\t\t// Ensure the editor has enough height to scroll to all notes.\n\t\tsetCanvasMinHeight( minHeight );\n\t}, [\n\t\theights,\n\t\tblockRefs,\n\t\tisFloating,\n\t\tthreads,\n\t\tselectedThread,\n\t\tsetCanvasMinHeight,\n\t] );\n\n\tconst hasThreads = Array.isArray( threads ) && threads.length > 0;\n\t// This should no longer happen since https://github.com/WordPress/gutenberg/pull/72872.\n\tif ( ! hasThreads && ! isFloating ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ ! isFloating &&\n\t\t\t\tshowCommentBoard &&\n\t\t\t\tundefined === blockCommentId && (\n\t\t\t\t\t<AddComment\n\t\t\t\t\t\tonSubmit={ onAddReply }\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/>\n\t\t\t\t) }\n\t\t\t{ threads.map( ( thread ) => (\n\t\t\t\t<Thread\n\t\t\t\t\tkey={ thread.id }\n\t\t\t\t\tthread={ thread }\n\t\t\t\t\tonAddReply={ onAddReply }\n\t\t\t\t\tonCommentDelete={ handleDelete }\n\t\t\t\t\tonEditComment={ onEditComment }\n\t\t\t\t\tisSelected={ selectedThread === thread.id }\n\t\t\t\t\tsetSelectedThread={ setSelectedThread }\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\tisFloating={ isFloating }\n\t\t\t\t\tcalculatedOffset={ boardOffsets[ thread.id ] ?? 0 }\n\t\t\t\t\tsetHeights={ setHeights }\n\t\t\t\t\tsetBlockRef={ setBlockRef }\n\t\t\t\t\tselectedThread={ selectedThread }\n\t\t\t\t\tcommentLastUpdated={ commentLastUpdated }\n\t\t\t\t\tshowCommentBoard={ showCommentBoard }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</>\n\t);\n}\n\nfunction Thread( {\n\tthread,\n\tonEditComment,\n\tonAddReply,\n\tonCommentDelete,\n\tisSelected,\n\tsetShowCommentBoard,\n\tcommentSidebarRef,\n\treflowComments,\n\tisFloating,\n\tcalculatedOffset,\n\tsetHeights,\n\tsetBlockRef,\n\tsetSelectedThread,\n\tselectedThread,\n\tcommentLastUpdated,\n\tshowCommentBoard,\n} ) {\n\tconst { toggleBlockHighlight, selectBlock, toggleBlockSpotlight } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\tconst relatedBlockElement = useBlockElement( thread.blockClientId );\n\tconst debouncedToggleBlockHighlight = useDebounce(\n\t\ttoggleBlockHighlight,\n\t\t50\n\t);\n\tconst { y, refs } = useFloatingThread( {\n\t\tthread,\n\t\tcalculatedOffset,\n\t\tsetHeights,\n\t\tsetBlockRef,\n\t\tselectedThread,\n\t\tcommentLastUpdated,\n\t} );\n\n\tconst onMouseEnter = () => {\n\t\tdebouncedToggleBlockHighlight( thread.blockClientId, true );\n\t};\n\n\tconst onMouseLeave = () => {\n\t\tdebouncedToggleBlockHighlight( thread.blockClientId, false );\n\t};\n\n\tconst handleCommentSelect = () => {\n\t\tsetShowCommentBoard( false );\n\t\tsetSelectedThread( thread.id );\n\t\tif ( !! thread.blockClientId ) {\n\t\t\t// Pass `null` as the second parameter to prevent focusing the block.\n\t\t\tselectBlock( thread.blockClientId, null );\n\t\t\ttoggleBlockSpotlight( thread.blockClientId, true );\n\t\t}\n\t};\n\n\tconst unselectThread = () => {\n\t\tsetSelectedThread( null );\n\t\tsetShowCommentBoard( false );\n\t\ttoggleBlockSpotlight( thread.blockClientId, false );\n\t};\n\n\tconst allReplies = thread?.reply || [];\n\n\tconst lastReply =\n\t\tallReplies.length > 0 ? allReplies[ allReplies.length - 1 ] : undefined;\n\tconst restReplies = allReplies.length > 0 ? allReplies.slice( 0, -1 ) : [];\n\n\tconst commentExcerpt = getCommentExcerpt(\n\t\tstripHTML( thread.content?.rendered ),\n\t\t10\n\t);\n\tconst ariaLabel = !! thread.blockClientId\n\t\t? sprintf(\n\t\t\t\t// translators: %s: note excerpt\n\t\t\t\t__( 'Note: %s' ),\n\t\t\t\tcommentExcerpt\n\t\t )\n\t\t: sprintf(\n\t\t\t\t// translators: %s: note excerpt\n\t\t\t\t__( 'Original block deleted. Note: %s' ),\n\t\t\t\tcommentExcerpt\n\t\t );\n\n\tif ( 'new-note-thread' === thread.id && showCommentBoard && isFloating ) {\n\t\treturn (\n\t\t\t<AddComment\n\t\t\t\tonSubmit={ onAddReply }\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\tisFloating={ isFloating }\n\t\t\t\ty={ y }\n\t\t\t\trefs={ refs }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<VStack\n\t\t\tclassName={ clsx( 'editor-collab-sidebar-panel__thread', {\n\t\t\t\t'is-selected': isSelected,\n\t\t\t\t'is-floating': isFloating,\n\t\t\t} ) }\n\t\t\tid={ `comment-thread-${ thread.id }` }\n\t\t\tspacing=\"3\"\n\t\t\tonClick={ handleCommentSelect }\n\t\t\tonMouseEnter={ onMouseEnter }\n\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\tonFocus={ onMouseEnter }\n\t\t\tonBlur={ onMouseLeave }\n\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// Expand or Collapse thread.\n\t\t\t\tif (\n\t\t\t\t\tevent.key === 'Enter' &&\n\t\t\t\t\tevent.currentTarget === event.target\n\t\t\t\t) {\n\t\t\t\t\tif ( isSelected ) {\n\t\t\t\t\t\tunselectThread();\n\t\t\t\t\t} else {\n\t\t\t\t\t\thandleCommentSelect();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Collapse thread and focus the thread.\n\t\t\t\tif ( event.key === 'Escape' ) {\n\t\t\t\t\tunselectThread();\n\t\t\t\t\tfocusCommentThread( thread.id, commentSidebarRef.current );\n\t\t\t\t}\n\t\t\t} }\n\t\t\ttabIndex={ 0 }\n\t\t\trole=\"treeitem\"\n\t\t\taria-label={ ariaLabel }\n\t\t\taria-expanded={ isSelected }\n\t\t\tref={ isFloating ? refs.setFloating : undefined }\n\t\t\tstyle={ isFloating ? { top: y } : undefined }\n\t\t>\n\t\t\t<Button\n\t\t\t\tclassName=\"editor-collab-sidebar-panel__skip-to-comment\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tsize=\"compact\"\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tfocusCommentThread(\n\t\t\t\t\t\tthread.id,\n\t\t\t\t\t\tcommentSidebarRef.current,\n\t\t\t\t\t\t'textarea'\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ __( 'Add new note' ) }\n\t\t\t</Button>\n\t\t\t{ ! thread.blockClientId && (\n\t\t\t\t<Text as=\"p\" weight={ 500 } variant=\"muted\">\n\t\t\t\t\t{ __( 'Original block deleted.' ) }\n\t\t\t\t</Text>\n\t\t\t) }\n\t\t\t<CommentBoard\n\t\t\t\tthread={ thread }\n\t\t\t\tisExpanded={ isSelected }\n\t\t\t\tonEdit={ ( params = {} ) => {\n\t\t\t\t\tconst { status } = params;\n\t\t\t\t\tonEditComment( params );\n\t\t\t\t\tif ( status === 'approved' ) {\n\t\t\t\t\t\tunselectThread();\n\t\t\t\t\t\tfocusCommentThread(\n\t\t\t\t\t\t\tthread.id,\n\t\t\t\t\t\t\tcommentSidebarRef.current\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t\tonDelete={ onCommentDelete }\n\t\t\t\treflowComments={ reflowComments }\n\t\t\t/>\n\t\t\t{ isSelected &&\n\t\t\t\tallReplies.map( ( reply ) => (\n\t\t\t\t\t<CommentBoard\n\t\t\t\t\t\tkey={ reply.id }\n\t\t\t\t\t\tthread={ reply }\n\t\t\t\t\t\tparent={ thread }\n\t\t\t\t\t\tisExpanded={ isSelected }\n\t\t\t\t\t\tonEdit={ onEditComment }\n\t\t\t\t\t\tonDelete={ onCommentDelete }\n\t\t\t\t\t\treflowComments={ reflowComments }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t{ ! isSelected && restReplies.length > 0 && (\n\t\t\t\t<HStack className=\"editor-collab-sidebar-panel__more-reply-separator\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__more-reply-button\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetSelectedThread( thread.id );\n\t\t\t\t\t\t\tfocusCommentThread(\n\t\t\t\t\t\t\t\tthread.id,\n\t\t\t\t\t\t\t\tcommentSidebarRef.current\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %s: number of replies.\n\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t'%s more reply',\n\t\t\t\t\t\t\t\t'%s more replies',\n\t\t\t\t\t\t\t\trestReplies.length\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\trestReplies.length\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t\t{ ! isSelected && lastReply && (\n\t\t\t\t<CommentBoard\n\t\t\t\t\tthread={ lastReply }\n\t\t\t\t\tparent={ thread }\n\t\t\t\t\tisExpanded={ isSelected }\n\t\t\t\t\tonEdit={ onEditComment }\n\t\t\t\t\tonDelete={ onCommentDelete }\n\t\t\t\t\treflowComments={ reflowComments }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ isSelected && (\n\t\t\t\t<VStack spacing=\"2\" role=\"treeitem\">\n\t\t\t\t\t<HStack alignment=\"left\" spacing=\"3\" justify=\"flex-start\">\n\t\t\t\t\t\t<CommentAuthorInfo />\n\t\t\t\t\t</HStack>\n\t\t\t\t\t<VStack spacing=\"2\">\n\t\t\t\t\t\t<CommentForm\n\t\t\t\t\t\t\tonSubmit={ ( inputComment ) => {\n\t\t\t\t\t\t\t\tif ( 'approved' === thread.status ) {\n\t\t\t\t\t\t\t\t\t// For reopening, include the content in the reopen action.\n\t\t\t\t\t\t\t\t\tonEditComment( {\n\t\t\t\t\t\t\t\t\t\tid: thread.id,\n\t\t\t\t\t\t\t\t\t\tstatus: 'hold',\n\t\t\t\t\t\t\t\t\t\tcontent: inputComment,\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// For regular replies, add as separate comment.\n\t\t\t\t\t\t\t\t\tonAddReply( {\n\t\t\t\t\t\t\t\t\t\tcontent: inputComment,\n\t\t\t\t\t\t\t\t\t\tparent: thread.id,\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonCancel={ ( event ) => {\n\t\t\t\t\t\t\t\t// Prevent the parent onClick from being triggered.\n\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\tunselectThread();\n\t\t\t\t\t\t\t\tfocusCommentThread(\n\t\t\t\t\t\t\t\t\tthread.id,\n\t\t\t\t\t\t\t\t\tcommentSidebarRef.current\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tsubmitButtonText={\n\t\t\t\t\t\t\t\t'approved' === thread.status\n\t\t\t\t\t\t\t\t\t? __( 'Reopen & Reply' )\n\t\t\t\t\t\t\t\t\t: __( 'Reply' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\trows={ 'approved' === thread.status ? 2 : 4 }\n\t\t\t\t\t\t\tlabelText={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %1$s: note identifier, %2$s: author name\n\t\t\t\t\t\t\t\t__( 'Reply to note %1$s by %2$s' ),\n\t\t\t\t\t\t\t\tthread.id,\n\t\t\t\t\t\t\t\tthread.author_name\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\treflowComments={ reflowComments }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</VStack>\n\t\t\t\t</VStack>\n\t\t\t) }\n\t\t\t{ !! thread.blockClientId && (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__skip-to-block\"\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\trelatedBlockElement?.focus();\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Back to block' ) }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nconst CommentBoard = ( {\n\tthread,\n\tparent,\n\tisExpanded,\n\tonEdit,\n\tonDelete,\n\treflowComments,\n} ) => {\n\tconst [ actionState, setActionState ] = useState( false );\n\tconst [ showConfirmDialog, setShowConfirmDialog ] = useState( false );\n\tconst actionButtonRef = useRef( null );\n\tconst handleConfirmDelete = () => {\n\t\tonDelete( thread );\n\t\tsetActionState( false );\n\t\tsetShowConfirmDialog( false );\n\t};\n\n\tconst handleCancel = () => {\n\t\tsetActionState( false );\n\t\tsetShowConfirmDialog( false );\n\t\tactionButtonRef.current?.focus();\n\t};\n\n\t// Check if this is a resolution comment by checking metadata.\n\tconst isResolutionComment =\n\t\tthread.type === 'note' &&\n\t\tthread.meta &&\n\t\t( thread.meta._wp_note_status === 'resolved' ||\n\t\t\tthread.meta._wp_note_status === 'reopen' );\n\n\tconst actions = [\n\t\t{\n\t\t\tid: 'edit',\n\t\t\ttitle: __( 'Edit' ),\n\t\t\tisEligible: ( { status } ) => status !== 'approved',\n\t\t\tonClick: () => {\n\t\t\t\tsetActionState( 'edit' );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tid: 'reopen',\n\t\t\ttitle: _x( 'Reopen', 'Reopen note' ),\n\t\t\tisEligible: ( { status } ) => status === 'approved',\n\t\t\tonClick: () => {\n\t\t\t\tonEdit( { id: thread.id, status: 'hold' } );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tid: 'delete',\n\t\t\ttitle: __( 'Delete' ),\n\t\t\tisEligible: () => true,\n\t\t\tonClick: () => {\n\t\t\t\tsetActionState( 'delete' );\n\t\t\t\tsetShowConfirmDialog( true );\n\t\t\t},\n\t\t},\n\t];\n\n\tconst canResolve = thread.parent === 0;\n\tconst moreActions =\n\t\tparent?.status !== 'approved'\n\t\t\t? actions.filter( ( item ) => item.isEligible( thread ) )\n\t\t\t: [];\n\n\treturn (\n\t\t<VStack\n\t\t\tspacing=\"2\"\n\t\t\trole={ thread.parent !== 0 ? 'treeitem' : undefined }\n\t\t>\n\t\t\t<HStack alignment=\"left\" spacing=\"3\" justify=\"flex-start\">\n\t\t\t\t<CommentAuthorInfo\n\t\t\t\t\tavatar={ thread?.author_avatar_urls?.[ 48 ] }\n\t\t\t\t\tname={ thread?.author_name }\n\t\t\t\t\tdate={ thread?.date }\n\t\t\t\t\tuserId={ thread?.author }\n\t\t\t\t/>\n\t\t\t\t{ isExpanded && (\n\t\t\t\t\t<FlexItem\n\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__comment-status\"\n\t\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\t\t// Prevent the thread from being selected.\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<HStack spacing=\"0\">\n\t\t\t\t\t\t\t{ canResolve && (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t\t\t\t'Resolve',\n\t\t\t\t\t\t\t\t\t\t'Mark note as resolved'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\ticon={ published }\n\t\t\t\t\t\t\t\t\tdisabled={ thread.status === 'approved' }\n\t\t\t\t\t\t\t\t\taccessibleWhenDisabled={\n\t\t\t\t\t\t\t\t\t\tthread.status === 'approved'\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tonEdit( {\n\t\t\t\t\t\t\t\t\t\t\tid: thread.id,\n\t\t\t\t\t\t\t\t\t\t\tstatus: 'approved',\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<Menu placement=\"bottom-end\">\n\t\t\t\t\t\t\t\t<Menu.TriggerButton\n\t\t\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tref={ actionButtonRef }\n\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\t\t\t\t\t\t\t\tdisabled={ ! moreActions.length }\n\t\t\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Menu.Popover>\n\t\t\t\t\t\t\t\t\t{ moreActions.map( ( action ) => (\n\t\t\t\t\t\t\t\t\t\t<Menu.Item\n\t\t\t\t\t\t\t\t\t\t\tkey={ action.id }\n\t\t\t\t\t\t\t\t\t\t\tonClick={ () => action.onClick() }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Menu.ItemLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t{ action.title }\n\t\t\t\t\t\t\t\t\t\t\t</Menu.ItemLabel>\n\t\t\t\t\t\t\t\t\t\t</Menu.Item>\n\t\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t\t</Menu.Popover>\n\t\t\t\t\t\t\t</Menu>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t\t{ 'edit' === actionState ? (\n\t\t\t\t<CommentForm\n\t\t\t\t\tonSubmit={ ( value ) => {\n\t\t\t\t\t\tonEdit( {\n\t\t\t\t\t\t\tid: thread.id,\n\t\t\t\t\t\t\tcontent: value,\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tsetActionState( false );\n\t\t\t\t\t\tactionButtonRef.current?.focus();\n\t\t\t\t\t} }\n\t\t\t\t\tonCancel={ () => handleCancel() }\n\t\t\t\t\tthread={ thread }\n\t\t\t\t\tsubmitButtonText={ _x( 'Update', 'verb' ) }\n\t\t\t\t\tlabelText={ sprintf(\n\t\t\t\t\t\t// translators: %1$s: note identifier, %2$s: author name.\n\t\t\t\t\t\t__( 'Edit note %1$s by %2$s' ),\n\t\t\t\t\t\tthread.id,\n\t\t\t\t\t\tthread.author_name\n\t\t\t\t\t) }\n\t\t\t\t\treflowComments={ reflowComments }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<RawHTML\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'editor-collab-sidebar-panel__user-comment',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'editor-collab-sidebar-panel__resolution-text':\n\t\t\t\t\t\t\t\tisResolutionComment,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ isResolutionComment\n\t\t\t\t\t\t? ( () => {\n\t\t\t\t\t\t\t\tconst actionText =\n\t\t\t\t\t\t\t\t\tthread.meta._wp_note_status === 'resolved'\n\t\t\t\t\t\t\t\t\t\t? __( 'Marked as resolved' )\n\t\t\t\t\t\t\t\t\t\t: __( 'Reopened' );\n\t\t\t\t\t\t\t\tconst content = thread?.content?.raw;\n\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tcontent &&\n\t\t\t\t\t\t\t\t\ttypeof content === 'string' &&\n\t\t\t\t\t\t\t\t\tcontent.trim() !== ''\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\treturn sprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %1$s: action label (\"Marked as resolved\" or \"Reopened\"); %2$s: note text.\n\t\t\t\t\t\t\t\t\t\t__( '%1$s: %2$s' ),\n\t\t\t\t\t\t\t\t\t\tactionText,\n\t\t\t\t\t\t\t\t\t\tcontent\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// If no content, just show the action.\n\t\t\t\t\t\t\t\treturn actionText;\n\t\t\t\t\t\t } )()\n\t\t\t\t\t\t: thread?.content?.rendered }\n\t\t\t\t</RawHTML>\n\t\t\t) }\n\t\t\t{ 'delete' === actionState && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\tisOpen={ showConfirmDialog }\n\t\t\t\t\tonConfirm={ handleConfirmDelete }\n\t\t\t\t\tonCancel={ handleCancel }\n\t\t\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t\t\t>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t\"Are you sure you want to delete this note? This will also delete all of this note's replies.\"\n\t\t\t\t\t) }\n\t\t\t\t</ConfirmDialog>\n\t\t\t) }\n\t\t</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P,IAAI,OAAO;AAAA,gBACX,SAAS;AAAA,cACV,CAAE;AACF,6BAAgB,KAAM;AACtB,8BAAgB,SAAS,MAAM;AAAA,YAChC;AAAA,YACA,UAAW,MAAM,aAAa;AAAA,YAC9B;AAAA,YACA,kBAAmB,GAAI,UAAU,MAAO;AAAA,YACxC,WAAY;AAAA;AAAA,cAEX,GAAI,wBAAyB;AAAA,cAC7B,OAAO;AAAA,cACP,OAAO;AAAA,YACR;AAAA,YACA;AAAA;AAAA,QACD,IAEA;AAAA,UAAC;AAAA;AAAA,YACA,WAAY;AAAA,cACX;AAAA,cACA;AAAA,gBACC,gDACC;AAAA,cACF;AAAA,YACD;AAAA,YAEE,iCACG,MAAM;AACR,oBAAM,aACL,OAAO,KAAK,oBAAoB,aAC7B,GAAI,oBAAqB,IACzB,GAAI,UAAW;AACnB,oBAAM,UAAU,QAAQ,SAAS;AAEjC,kBACC,WACA,OAAO,YAAY,YACnB,QAAQ,KAAK,MAAM,IAClB;AACD,uBAAO;AAAA;AAAA,kBAEN,GAAI,YAAa;AAAA,kBACjB;AAAA,kBACA;AAAA,gBACD;AAAA,cACD;AAEA,qBAAO;AAAA,YACP,GAAI,IACJ,QAAQ,SAAS;AAAA;AAAA,QACrB;AAAA,QAEC,aAAa,eACd;AAAA,UAAC;AAAA;AAAA,YACA,QAAS;AAAA,YACT,WAAY;AAAA,YACZ,UAAW;AAAA,YACX,mBAAoB,GAAI,QAAS;AAAA,YAE/B;AAAA,cACD;AAAA,YACD;AAAA;AAAA,QACD;AAAA;AAAA;AAAA,EAEF;AAEF;AAEA,IAAO,mBAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseState,\n\tRawHTML,\n\tuseEffect,\n\tuseCallback,\n\tuseMemo,\n\tuseRef,\n} from '@wordpress/element';\nimport {\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalConfirmDialog as ConfirmDialog,\n\tButton,\n\tFlexItem,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { useDebounce } from '@wordpress/compose';\n\nimport { published, moreVertical } from '@wordpress/icons';\nimport { __, _x, sprintf, _n } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport {\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport CommentAuthorInfo from './comment-author-info';\nimport CommentForm from './comment-form';\nimport { focusCommentThread, getCommentExcerpt } from './utils';\nimport { useFloatingThread } from './hooks';\nimport { AddComment } from './add-comment';\nimport { store as editorStore } from '../../store';\n\nconst { useBlockElement } = unlock( blockEditorPrivateApis );\nconst { Menu } = unlock( componentsPrivateApis );\n\nexport function Comments( {\n\tthreads: noteThreads,\n\tonEditComment,\n\tonAddReply,\n\tonCommentDelete,\n\tnewNoteFormState,\n\tsetNewNoteFormState,\n\tcommentSidebarRef,\n\treflowComments,\n\tisFloating = false,\n\tcommentLastUpdated,\n} ) {\n\tconst [ heights, setHeights ] = useState( {} );\n\tconst [ selectedThread, setSelectedThread ] = useState( null );\n\tconst [ boardOffsets, setBoardOffsets ] = useState( {} );\n\tconst [ blockRefs, setBlockRefs ] = useState( {} );\n\n\tconst { setCanvasMinHeight } = unlock( useDispatch( editorStore ) );\n\tconst { blockCommentId, selectedBlockClientId, orderedBlockIds } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockAttributes,\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t\tgetClientIdsWithDescendants,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\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\tselectedBlockClientId: clientId,\n\t\t\t\torderedBlockIds: getClientIdsWithDescendants(),\n\t\t\t};\n\t\t}, [] );\n\n\tconst relatedBlockElement = useBlockElement( selectedBlockClientId );\n\n\tconst threads = useMemo( () => {\n\t\tconst t = [ ...noteThreads ];\n\t\tconst orderedThreads = [];\n\t\t// In floating mode, when the note board is shown, and as long\n\t\t// as the selected block doesn't have an existing note attached -\n\t\t// add a \"new note\" entry to the threads. This special thread type\n\t\t// gets sorted and floated like regular threads, but shows an AddComment\n\t\t// component instead of a regular comment thread.\n\t\tif (\n\t\t\tisFloating &&\n\t\t\tnewNoteFormState === 'open' &&\n\t\t\tundefined === blockCommentId\n\t\t) {\n\t\t\t// Insert the new note entry at the correct location for its blockId.\n\t\t\tconst newNoteThread = {\n\t\t\t\tid: 'new-note-thread',\n\t\t\t\tblockClientId: selectedBlockClientId,\n\t\t\t\tcontent: { rendered: '' },\n\t\t\t};\n\t\t\t// Insert the new comment block at the right order within the threads.\n\t\t\torderedBlockIds.forEach( ( blockId ) => {\n\t\t\t\tif ( blockId === selectedBlockClientId ) {\n\t\t\t\t\torderedThreads.push( newNoteThread );\n\t\t\t\t} else {\n\t\t\t\t\tconst threadForBlock = t.find(\n\t\t\t\t\t\t( thread ) => thread.blockClientId === blockId\n\t\t\t\t\t);\n\t\t\t\t\tif ( threadForBlock ) {\n\t\t\t\t\t\torderedThreads.push( threadForBlock );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn orderedThreads;\n\t\t}\n\t\treturn t;\n\t}, [\n\t\tnoteThreads,\n\t\tisFloating,\n\t\tnewNoteFormState,\n\t\tblockCommentId,\n\t\tselectedBlockClientId,\n\t\torderedBlockIds,\n\t] );\n\n\tconst handleDelete = async ( comment ) => {\n\t\tconst currentIndex = threads.findIndex( ( t ) => t.id === comment.id );\n\t\tconst nextThread = threads[ currentIndex + 1 ];\n\t\tconst prevThread = threads[ currentIndex - 1 ];\n\n\t\tawait onCommentDelete( comment );\n\n\t\tif ( comment.parent !== 0 ) {\n\t\t\t// Move focus to the parent thread when a reply was deleted.\n\t\t\tsetSelectedThread( comment.parent );\n\t\t\tfocusCommentThread( comment.parent, commentSidebarRef.current );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nextThread ) {\n\t\t\tsetSelectedThread( nextThread.id );\n\t\t\tfocusCommentThread( nextThread.id, commentSidebarRef.current );\n\t\t} else if ( prevThread ) {\n\t\t\tsetSelectedThread( prevThread.id );\n\t\t\tfocusCommentThread( prevThread.id, commentSidebarRef.current );\n\t\t} else {\n\t\t\tsetSelectedThread( null );\n\t\t\tsetNewNoteFormState( 'closed' );\n\t\t\t// Move focus to the related block.\n\t\t\trelatedBlockElement?.focus();\n\t\t}\n\t};\n\n\t// Auto-select the related comment thread when a block is selected.\n\tuseEffect( () => {\n\t\t// Fallback to 'new-note-thread' when showing the comment board for a new note.\n\t\tconst fallback = newNoteFormState === 'open' ? 'new-note-thread' : null;\n\t\tsetSelectedThread( blockCommentId ?? fallback );\n\t}, [ blockCommentId, newNoteFormState ] );\n\n\tconst setBlockRef = useCallback( ( id, blockRef ) => {\n\t\tsetBlockRefs( ( prev ) => ( { ...prev, [ id ]: blockRef } ) );\n\t}, [] );\n\n\t// Recalculate floating comment thread offsets whenever the heights change.\n\tuseEffect( () => {\n\t\t/**\n\t\t * Calculate the y offsets for all comment threads. Account for potentially\n\t\t * overlapping threads and adjust their positions accordingly.\n\t\t */\n\t\tconst calculateAllOffsets = () => {\n\t\t\tconst offsets = {};\n\n\t\t\tif ( ! isFloating ) {\n\t\t\t\treturn { offsets, minHeight: 0 };\n\t\t\t}\n\n\t\t\t// Find the index of the selected thread.\n\t\t\tconst selectedThreadIndex = threads.findIndex(\n\t\t\t\t( t ) => t.id === selectedThread\n\t\t\t);\n\n\t\t\tconst breakIndex =\n\t\t\t\tselectedThreadIndex === -1 ? 0 : selectedThreadIndex;\n\n\t\t\t// If there is a selected thread, push threads above up and threads below down.\n\t\t\tconst selectedThreadData = threads[ breakIndex ];\n\n\t\t\tif (\n\t\t\t\t! selectedThreadData ||\n\t\t\t\t! blockRefs[ selectedThreadData.id ]\n\t\t\t) {\n\t\t\t\treturn { offsets, minHeight: 0 };\n\t\t\t}\n\n\t\t\tlet blockElement = blockRefs[ selectedThreadData.id ];\n\t\t\tlet blockRect = blockElement?.getBoundingClientRect();\n\t\t\tconst selectedThreadTop = blockRect?.top || 0;\n\t\t\tconst selectedThreadHeight = heights[ selectedThreadData.id ] || 0;\n\n\t\t\toffsets[ selectedThreadData.id ] = -16;\n\n\t\t\tlet previousThreadData = {\n\t\t\t\tthreadTop: selectedThreadTop - 16,\n\t\t\t\tthreadHeight: selectedThreadHeight,\n\t\t\t};\n\n\t\t\t// Process threads after the selected thread, offsetting any overlapping\n\t\t\t// threads downward.\n\t\t\tfor ( let i = breakIndex + 1; i < threads.length; i++ ) {\n\t\t\t\tconst thread = threads[ i ];\n\t\t\t\tif ( ! blockRefs[ thread.id ] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tblockElement = blockRefs[ thread.id ];\n\t\t\t\tblockRect = blockElement?.getBoundingClientRect();\n\t\t\t\tconst threadTop = blockRect?.top || 0;\n\t\t\t\tconst threadHeight = heights[ thread.id ] || 0;\n\n\t\t\t\tlet additionalOffset = -16;\n\n\t\t\t\t// Check if the thread overlaps with the previous one.\n\t\t\t\tconst previousBottom =\n\t\t\t\t\tpreviousThreadData.threadTop +\n\t\t\t\t\tpreviousThreadData.threadHeight;\n\t\t\t\tif ( threadTop < previousBottom + 16 ) {\n\t\t\t\t\t// Shift down by the difference plus a margin to avoid overlap.\n\t\t\t\t\tadditionalOffset = previousBottom - threadTop + 20;\n\t\t\t\t}\n\n\t\t\t\toffsets[ thread.id ] = additionalOffset;\n\n\t\t\t\t// Update for next iteration.\n\t\t\t\tpreviousThreadData = {\n\t\t\t\t\tthreadTop: threadTop + additionalOffset,\n\t\t\t\t\tthreadHeight,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Process threads before the selected thread, offsetting any overlapping\n\t\t\t// threads upward.\n\t\t\tlet nextThreadData = {\n\t\t\t\tthreadTop: selectedThreadTop - 16,\n\t\t\t};\n\n\t\t\tfor ( let i = selectedThreadIndex - 1; i >= 0; i-- ) {\n\t\t\t\tconst thread = threads[ i ];\n\t\t\t\tif ( ! blockRefs[ thread.id ] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tblockElement = blockRefs[ thread.id ];\n\t\t\t\tblockRect = blockElement?.getBoundingClientRect();\n\t\t\t\tconst threadTop = blockRect?.top || 0;\n\t\t\t\tconst threadHeight = heights[ thread.id ] || 0;\n\n\t\t\t\tlet additionalOffset = -16;\n\n\t\t\t\t// Calculate the bottom position of this thread with default offset.\n\t\t\t\tconst threadBottom = threadTop + threadHeight;\n\n\t\t\t\t// Check if this thread's bottom would overlap with the next thread's top.\n\t\t\t\tif ( threadBottom > nextThreadData.threadTop ) {\n\t\t\t\t\t// Shift up by the difference plus a margin to avoid overlap.\n\t\t\t\t\tadditionalOffset =\n\t\t\t\t\t\tnextThreadData.threadTop -\n\t\t\t\t\t\tthreadTop -\n\t\t\t\t\t\tthreadHeight -\n\t\t\t\t\t\t20;\n\t\t\t\t}\n\n\t\t\t\toffsets[ thread.id ] = additionalOffset;\n\n\t\t\t\t// Update for next iteration (going upward).\n\t\t\t\tnextThreadData = {\n\t\t\t\t\tthreadTop: threadTop + additionalOffset,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tlet editorMinHeight = 0;\n\t\t\t// Take the calculated top of the final note plus its height as the editor min height.\n\t\t\tconst lastThread = threads[ threads.length - 1 ];\n\t\t\tif ( blockRefs[ lastThread.id ] ) {\n\t\t\t\tconst lastBlockElement = blockRefs[ lastThread.id ];\n\t\t\t\tconst lastBlockRect = lastBlockElement?.getBoundingClientRect();\n\t\t\t\tconst lastThreadTop = lastBlockRect?.top || 0;\n\t\t\t\tconst lastThreadHeight = heights[ lastThread.id ] || 0;\n\t\t\t\tconst lastThreadOffset = offsets[ lastThread.id ] || 0;\n\t\t\t\teditorMinHeight =\n\t\t\t\t\tlastThreadTop + lastThreadHeight + lastThreadOffset + 32;\n\t\t\t}\n\n\t\t\treturn { offsets, minHeight: editorMinHeight };\n\t\t};\n\t\tconst { offsets: newOffsets, minHeight } = calculateAllOffsets();\n\t\tif ( Object.keys( newOffsets ).length > 0 ) {\n\t\t\tsetBoardOffsets( newOffsets );\n\t\t}\n\t\t// Ensure the editor has enough height to scroll to all notes.\n\t\tsetCanvasMinHeight( minHeight );\n\t}, [\n\t\theights,\n\t\tblockRefs,\n\t\tisFloating,\n\t\tthreads,\n\t\tselectedThread,\n\t\tsetCanvasMinHeight,\n\t] );\n\n\tconst hasThreads = Array.isArray( threads ) && threads.length > 0;\n\t// This should no longer happen since https://github.com/WordPress/gutenberg/pull/72872.\n\tif ( ! hasThreads && ! isFloating ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ ! isFloating &&\n\t\t\t\tnewNoteFormState === 'open' &&\n\t\t\t\tundefined === blockCommentId && (\n\t\t\t\t\t<AddComment\n\t\t\t\t\t\tonSubmit={ onAddReply }\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/>\n\t\t\t\t) }\n\t\t\t{ threads.map( ( thread ) => (\n\t\t\t\t<Thread\n\t\t\t\t\tkey={ thread.id }\n\t\t\t\t\tthread={ thread }\n\t\t\t\t\tonAddReply={ onAddReply }\n\t\t\t\t\tonCommentDelete={ handleDelete }\n\t\t\t\t\tonEditComment={ onEditComment }\n\t\t\t\t\tisSelected={ selectedThread === thread.id }\n\t\t\t\t\tsetSelectedThread={ setSelectedThread }\n\t\t\t\t\tsetNewNoteFormState={ setNewNoteFormState }\n\t\t\t\t\tcommentSidebarRef={ commentSidebarRef }\n\t\t\t\t\treflowComments={ reflowComments }\n\t\t\t\t\tisFloating={ isFloating }\n\t\t\t\t\tcalculatedOffset={ boardOffsets[ thread.id ] ?? 0 }\n\t\t\t\t\tsetHeights={ setHeights }\n\t\t\t\t\tsetBlockRef={ setBlockRef }\n\t\t\t\t\tselectedThread={ selectedThread }\n\t\t\t\t\tcommentLastUpdated={ commentLastUpdated }\n\t\t\t\t\tnewNoteFormState={ newNoteFormState }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</>\n\t);\n}\n\nfunction Thread( {\n\tthread,\n\tonEditComment,\n\tonAddReply,\n\tonCommentDelete,\n\tisSelected,\n\tsetNewNoteFormState,\n\tcommentSidebarRef,\n\treflowComments,\n\tisFloating,\n\tcalculatedOffset,\n\tsetHeights,\n\tsetBlockRef,\n\tsetSelectedThread,\n\tselectedThread,\n\tcommentLastUpdated,\n\tnewNoteFormState,\n} ) {\n\tconst { toggleBlockHighlight, selectBlock, toggleBlockSpotlight } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\tconst relatedBlockElement = useBlockElement( thread.blockClientId );\n\tconst debouncedToggleBlockHighlight = useDebounce(\n\t\ttoggleBlockHighlight,\n\t\t50\n\t);\n\tconst { y, refs } = useFloatingThread( {\n\t\tthread,\n\t\tcalculatedOffset,\n\t\tsetHeights,\n\t\tsetBlockRef,\n\t\tselectedThread,\n\t\tcommentLastUpdated,\n\t} );\n\n\tconst onMouseEnter = () => {\n\t\tdebouncedToggleBlockHighlight( thread.blockClientId, true );\n\t};\n\n\tconst onMouseLeave = () => {\n\t\tdebouncedToggleBlockHighlight( thread.blockClientId, false );\n\t};\n\n\tconst handleCommentSelect = () => {\n\t\tsetNewNoteFormState( 'closed' );\n\t\tsetSelectedThread( thread.id );\n\t\tif ( !! thread.blockClientId ) {\n\t\t\t// Pass `null` as the second parameter to prevent focusing the block.\n\t\t\tselectBlock( thread.blockClientId, null );\n\t\t\ttoggleBlockSpotlight( thread.blockClientId, true );\n\t\t}\n\t};\n\n\tconst unselectThread = () => {\n\t\tsetSelectedThread( null );\n\t\tsetNewNoteFormState( 'closed' );\n\t\ttoggleBlockSpotlight( thread.blockClientId, false );\n\t};\n\n\tconst allReplies = thread?.reply || [];\n\n\tconst lastReply =\n\t\tallReplies.length > 0 ? allReplies[ allReplies.length - 1 ] : undefined;\n\tconst restReplies = allReplies.length > 0 ? allReplies.slice( 0, -1 ) : [];\n\n\tconst commentExcerpt = getCommentExcerpt(\n\t\tstripHTML( thread.content?.rendered ),\n\t\t10\n\t);\n\tconst ariaLabel = !! thread.blockClientId\n\t\t? sprintf(\n\t\t\t\t// translators: %s: note excerpt\n\t\t\t\t__( 'Note: %s' ),\n\t\t\t\tcommentExcerpt\n\t\t )\n\t\t: sprintf(\n\t\t\t\t// translators: %s: note excerpt\n\t\t\t\t__( 'Original block deleted. Note: %s' ),\n\t\t\t\tcommentExcerpt\n\t\t );\n\n\tif (\n\t\tthread.id === 'new-note-thread' &&\n\t\tnewNoteFormState === 'open' &&\n\t\tisFloating\n\t) {\n\t\treturn (\n\t\t\t<AddComment\n\t\t\t\tonSubmit={ onAddReply }\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\tisFloating={ isFloating }\n\t\t\t\ty={ y }\n\t\t\t\trefs={ refs }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<VStack\n\t\t\tclassName={ clsx( 'editor-collab-sidebar-panel__thread', {\n\t\t\t\t'is-selected': isSelected,\n\t\t\t\t'is-floating': isFloating,\n\t\t\t} ) }\n\t\t\tid={ `comment-thread-${ thread.id }` }\n\t\t\tspacing=\"3\"\n\t\t\tonClick={ handleCommentSelect }\n\t\t\tonMouseEnter={ onMouseEnter }\n\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\tonFocus={ onMouseEnter }\n\t\t\tonBlur={ onMouseLeave }\n\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// Expand or Collapse thread.\n\t\t\t\tif (\n\t\t\t\t\tevent.key === 'Enter' &&\n\t\t\t\t\tevent.currentTarget === event.target\n\t\t\t\t) {\n\t\t\t\t\tif ( isSelected ) {\n\t\t\t\t\t\tunselectThread();\n\t\t\t\t\t} else {\n\t\t\t\t\t\thandleCommentSelect();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Collapse thread and focus the thread.\n\t\t\t\tif ( event.key === 'Escape' ) {\n\t\t\t\t\tunselectThread();\n\t\t\t\t\tfocusCommentThread( thread.id, commentSidebarRef.current );\n\t\t\t\t}\n\t\t\t} }\n\t\t\ttabIndex={ 0 }\n\t\t\trole=\"treeitem\"\n\t\t\taria-label={ ariaLabel }\n\t\t\taria-expanded={ isSelected }\n\t\t\tref={ isFloating ? refs.setFloating : undefined }\n\t\t\tstyle={ isFloating ? { top: y } : undefined }\n\t\t>\n\t\t\t<Button\n\t\t\t\tclassName=\"editor-collab-sidebar-panel__skip-to-comment\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tsize=\"compact\"\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tfocusCommentThread(\n\t\t\t\t\t\tthread.id,\n\t\t\t\t\t\tcommentSidebarRef.current,\n\t\t\t\t\t\t'textarea'\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ __( 'Add new note' ) }\n\t\t\t</Button>\n\t\t\t{ ! thread.blockClientId && (\n\t\t\t\t<Text as=\"p\" weight={ 500 } variant=\"muted\">\n\t\t\t\t\t{ __( 'Original block deleted.' ) }\n\t\t\t\t</Text>\n\t\t\t) }\n\t\t\t<CommentBoard\n\t\t\t\tthread={ thread }\n\t\t\t\tisExpanded={ isSelected }\n\t\t\t\tonEdit={ ( params = {} ) => {\n\t\t\t\t\tonEditComment( params );\n\t\t\t\t\tif ( params.status === 'approved' ) {\n\t\t\t\t\t\tunselectThread();\n\t\t\t\t\t\tif ( isFloating ) {\n\t\t\t\t\t\t\trelatedBlockElement?.focus();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfocusCommentThread(\n\t\t\t\t\t\t\t\tthread.id,\n\t\t\t\t\t\t\t\tcommentSidebarRef.current\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t\tonDelete={ onCommentDelete }\n\t\t\t\treflowComments={ reflowComments }\n\t\t\t/>\n\t\t\t{ isSelected &&\n\t\t\t\tallReplies.map( ( reply ) => (\n\t\t\t\t\t<CommentBoard\n\t\t\t\t\t\tkey={ reply.id }\n\t\t\t\t\t\tthread={ reply }\n\t\t\t\t\t\tparent={ thread }\n\t\t\t\t\t\tisExpanded={ isSelected }\n\t\t\t\t\t\tonEdit={ onEditComment }\n\t\t\t\t\t\tonDelete={ onCommentDelete }\n\t\t\t\t\t\treflowComments={ reflowComments }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t{ ! isSelected && restReplies.length > 0 && (\n\t\t\t\t<HStack className=\"editor-collab-sidebar-panel__more-reply-separator\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__more-reply-button\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetSelectedThread( thread.id );\n\t\t\t\t\t\t\tfocusCommentThread(\n\t\t\t\t\t\t\t\tthread.id,\n\t\t\t\t\t\t\t\tcommentSidebarRef.current\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %s: number of replies.\n\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t'%s more reply',\n\t\t\t\t\t\t\t\t'%s more replies',\n\t\t\t\t\t\t\t\trestReplies.length\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\trestReplies.length\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t\t{ ! isSelected && lastReply && (\n\t\t\t\t<CommentBoard\n\t\t\t\t\tthread={ lastReply }\n\t\t\t\t\tparent={ thread }\n\t\t\t\t\tisExpanded={ isSelected }\n\t\t\t\t\tonEdit={ onEditComment }\n\t\t\t\t\tonDelete={ onCommentDelete }\n\t\t\t\t\treflowComments={ reflowComments }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ isSelected && (\n\t\t\t\t<VStack spacing=\"2\" role=\"treeitem\">\n\t\t\t\t\t<HStack alignment=\"left\" spacing=\"3\" justify=\"flex-start\">\n\t\t\t\t\t\t<CommentAuthorInfo />\n\t\t\t\t\t</HStack>\n\t\t\t\t\t<VStack spacing=\"2\">\n\t\t\t\t\t\t<CommentForm\n\t\t\t\t\t\t\tonSubmit={ ( inputComment ) => {\n\t\t\t\t\t\t\t\tif ( 'approved' === thread.status ) {\n\t\t\t\t\t\t\t\t\t// For reopening, include the content in the reopen action.\n\t\t\t\t\t\t\t\t\tonEditComment( {\n\t\t\t\t\t\t\t\t\t\tid: thread.id,\n\t\t\t\t\t\t\t\t\t\tstatus: 'hold',\n\t\t\t\t\t\t\t\t\t\tcontent: inputComment,\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// For regular replies, add as separate comment.\n\t\t\t\t\t\t\t\t\tonAddReply( {\n\t\t\t\t\t\t\t\t\t\tcontent: inputComment,\n\t\t\t\t\t\t\t\t\t\tparent: thread.id,\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonCancel={ ( event ) => {\n\t\t\t\t\t\t\t\t// Prevent the parent onClick from being triggered.\n\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\tunselectThread();\n\t\t\t\t\t\t\t\tfocusCommentThread(\n\t\t\t\t\t\t\t\t\tthread.id,\n\t\t\t\t\t\t\t\t\tcommentSidebarRef.current\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tsubmitButtonText={\n\t\t\t\t\t\t\t\t'approved' === thread.status\n\t\t\t\t\t\t\t\t\t? __( 'Reopen & Reply' )\n\t\t\t\t\t\t\t\t\t: __( 'Reply' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\trows={ 'approved' === thread.status ? 2 : 4 }\n\t\t\t\t\t\t\tlabelText={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %1$s: note identifier, %2$s: author name\n\t\t\t\t\t\t\t\t__( 'Reply to note %1$s by %2$s' ),\n\t\t\t\t\t\t\t\tthread.id,\n\t\t\t\t\t\t\t\tthread.author_name\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\treflowComments={ reflowComments }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</VStack>\n\t\t\t\t</VStack>\n\t\t\t) }\n\t\t\t{ !! thread.blockClientId && (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__skip-to-block\"\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\trelatedBlockElement?.focus();\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Back to block' ) }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nconst CommentBoard = ( {\n\tthread,\n\tparent,\n\tisExpanded,\n\tonEdit,\n\tonDelete,\n\treflowComments,\n} ) => {\n\tconst [ actionState, setActionState ] = useState( false );\n\tconst [ showConfirmDialog, setShowConfirmDialog ] = useState( false );\n\tconst actionButtonRef = useRef( null );\n\tconst handleConfirmDelete = () => {\n\t\tonDelete( thread );\n\t\tsetActionState( false );\n\t\tsetShowConfirmDialog( false );\n\t};\n\n\tconst handleCancel = () => {\n\t\tsetActionState( false );\n\t\tsetShowConfirmDialog( false );\n\t\tactionButtonRef.current?.focus();\n\t};\n\n\t// Check if this is a resolution comment by checking metadata.\n\tconst isResolutionComment =\n\t\tthread.type === 'note' &&\n\t\tthread.meta &&\n\t\t( thread.meta._wp_note_status === 'resolved' ||\n\t\t\tthread.meta._wp_note_status === 'reopen' );\n\n\tconst actions = [\n\t\t{\n\t\t\tid: 'edit',\n\t\t\ttitle: __( 'Edit' ),\n\t\t\tisEligible: ( { status } ) => status !== 'approved',\n\t\t\tonClick: () => {\n\t\t\t\tsetActionState( 'edit' );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tid: 'reopen',\n\t\t\ttitle: _x( 'Reopen', 'Reopen note' ),\n\t\t\tisEligible: ( { status } ) => status === 'approved',\n\t\t\tonClick: () => {\n\t\t\t\tonEdit( { id: thread.id, status: 'hold' } );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tid: 'delete',\n\t\t\ttitle: __( 'Delete' ),\n\t\t\tisEligible: () => true,\n\t\t\tonClick: () => {\n\t\t\t\tsetActionState( 'delete' );\n\t\t\t\tsetShowConfirmDialog( true );\n\t\t\t},\n\t\t},\n\t];\n\n\tconst canResolve = thread.parent === 0;\n\tconst moreActions =\n\t\tparent?.status !== 'approved'\n\t\t\t? actions.filter( ( item ) => item.isEligible( thread ) )\n\t\t\t: [];\n\n\treturn (\n\t\t<VStack\n\t\t\tspacing=\"2\"\n\t\t\trole={ thread.parent !== 0 ? 'treeitem' : undefined }\n\t\t>\n\t\t\t<HStack alignment=\"left\" spacing=\"3\" justify=\"flex-start\">\n\t\t\t\t<CommentAuthorInfo\n\t\t\t\t\tavatar={ thread?.author_avatar_urls?.[ 48 ] }\n\t\t\t\t\tname={ thread?.author_name }\n\t\t\t\t\tdate={ thread?.date }\n\t\t\t\t\tuserId={ thread?.author }\n\t\t\t\t/>\n\t\t\t\t{ isExpanded && (\n\t\t\t\t\t<FlexItem\n\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__comment-status\"\n\t\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\t\t// Prevent the thread from being selected.\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<HStack spacing=\"0\">\n\t\t\t\t\t\t\t{ canResolve && (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t\t\t\t'Resolve',\n\t\t\t\t\t\t\t\t\t\t'Mark note as resolved'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\ticon={ published }\n\t\t\t\t\t\t\t\t\tdisabled={ thread.status === 'approved' }\n\t\t\t\t\t\t\t\t\taccessibleWhenDisabled={\n\t\t\t\t\t\t\t\t\t\tthread.status === 'approved'\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tonEdit( {\n\t\t\t\t\t\t\t\t\t\t\tid: thread.id,\n\t\t\t\t\t\t\t\t\t\t\tstatus: 'approved',\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<Menu placement=\"bottom-end\">\n\t\t\t\t\t\t\t\t<Menu.TriggerButton\n\t\t\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tref={ actionButtonRef }\n\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\t\t\t\t\t\t\t\tdisabled={ ! moreActions.length }\n\t\t\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Menu.Popover>\n\t\t\t\t\t\t\t\t\t{ moreActions.map( ( action ) => (\n\t\t\t\t\t\t\t\t\t\t<Menu.Item\n\t\t\t\t\t\t\t\t\t\t\tkey={ action.id }\n\t\t\t\t\t\t\t\t\t\t\tonClick={ () => action.onClick() }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Menu.ItemLabel>\n\t\t\t\t\t\t\t\t\t\t\t\t{ action.title }\n\t\t\t\t\t\t\t\t\t\t\t</Menu.ItemLabel>\n\t\t\t\t\t\t\t\t\t\t</Menu.Item>\n\t\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t\t</Menu.Popover>\n\t\t\t\t\t\t\t</Menu>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t\t{ 'edit' === actionState ? (\n\t\t\t\t<CommentForm\n\t\t\t\t\tonSubmit={ ( value ) => {\n\t\t\t\t\t\tonEdit( {\n\t\t\t\t\t\t\tid: thread.id,\n\t\t\t\t\t\t\tcontent: value,\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tsetActionState( false );\n\t\t\t\t\t\tactionButtonRef.current?.focus();\n\t\t\t\t\t} }\n\t\t\t\t\tonCancel={ () => handleCancel() }\n\t\t\t\t\tthread={ thread }\n\t\t\t\t\tsubmitButtonText={ _x( 'Update', 'verb' ) }\n\t\t\t\t\tlabelText={ sprintf(\n\t\t\t\t\t\t// translators: %1$s: note identifier, %2$s: author name.\n\t\t\t\t\t\t__( 'Edit note %1$s by %2$s' ),\n\t\t\t\t\t\tthread.id,\n\t\t\t\t\t\tthread.author_name\n\t\t\t\t\t) }\n\t\t\t\t\treflowComments={ reflowComments }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<RawHTML\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'editor-collab-sidebar-panel__user-comment',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'editor-collab-sidebar-panel__resolution-text':\n\t\t\t\t\t\t\t\tisResolutionComment,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ isResolutionComment\n\t\t\t\t\t\t? ( () => {\n\t\t\t\t\t\t\t\tconst actionText =\n\t\t\t\t\t\t\t\t\tthread.meta._wp_note_status === 'resolved'\n\t\t\t\t\t\t\t\t\t\t? __( 'Marked as resolved' )\n\t\t\t\t\t\t\t\t\t\t: __( 'Reopened' );\n\t\t\t\t\t\t\t\tconst content = thread?.content?.raw;\n\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tcontent &&\n\t\t\t\t\t\t\t\t\ttypeof content === 'string' &&\n\t\t\t\t\t\t\t\t\tcontent.trim() !== ''\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\treturn sprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %1$s: action label (\"Marked as resolved\" or \"Reopened\"); %2$s: note text.\n\t\t\t\t\t\t\t\t\t\t__( '%1$s: %2$s' ),\n\t\t\t\t\t\t\t\t\t\tactionText,\n\t\t\t\t\t\t\t\t\t\tcontent\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// If no content, just show the action.\n\t\t\t\t\t\t\t\treturn actionText;\n\t\t\t\t\t\t } )()\n\t\t\t\t\t\t: thread?.content?.rendered }\n\t\t\t\t</RawHTML>\n\t\t\t) }\n\t\t\t{ 'delete' === actionState && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\tisOpen={ showConfirmDialog }\n\t\t\t\t\tonConfirm={ handleConfirmDelete }\n\t\t\t\t\tonCancel={ handleCancel }\n\t\t\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t\t\t>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t\"Are you sure you want to delete this note? This will also delete all of this note's replies.\"\n\t\t\t\t\t) }\n\t\t\t\t</ConfirmDialog>\n\t\t\t) }\n\t\t</VStack>\n\t);\n};\n\nexport default Comments;\n"],
5
+ "mappings": ";AAGA,OAAO,UAAU;AAKjB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP;AAAA,EACC,sBAAsB;AAAA,EACtB,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,+BAA+B;AAAA,EAC/B;AAAA,EACA;AAAA,EACA,eAAe;AAAA,OACT;AACP,SAAS,mBAAmB;AAE5B,SAAS,WAAW,oBAAoB;AACxC,SAAS,IAAI,IAAI,SAAS,UAAU;AACpC,SAAS,WAAW,mBAAmB;AACvC,SAAS,uBAAuB,iBAAiB;AACjD;AAAA,EACC,SAAS;AAAA,EACT,eAAe;AAAA,OACT;AAKP,SAAS,cAAc;AACvB,OAAO,uBAAuB;AAC9B,OAAO,iBAAiB;AACxB,SAAS,oBAAoB,yBAAyB;AACtD,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAC3B,SAAS,SAAS,mBAAmB;AAsRnC,mBAIG,KAJH;AApRF,IAAM,EAAE,gBAAgB,IAAI,OAAQ,sBAAuB;AAC3D,IAAM,EAAE,KAAK,IAAI,OAAQ,qBAAsB;AAExC,SAAS,SAAU;AAAA,EACzB,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb;AACD,GAAI;AACH,QAAM,CAAE,SAAS,UAAW,IAAI,SAAU,CAAC,CAAE;AAC7C,QAAM,CAAE,gBAAgB,iBAAkB,IA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AAA;AAAA,QACD;AAAA;AAAA;AAAA,EAEF;AAEF;AAEA,IAAO,mBAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,7 @@
1
- const collabHistorySidebarName = "edit-post/collab-history-sidebar";
2
- const collabSidebarName = "edit-post/collab-sidebar";
3
- const SIDEBARS = [collabHistorySidebarName, collabSidebarName];
1
+ // packages/editor/src/components/collab-sidebar/constants.js
2
+ var collabHistorySidebarName = "edit-post/collab-history-sidebar";
3
+ var collabSidebarName = "edit-post/collab-sidebar";
4
+ var SIDEBARS = [collabHistorySidebarName, collabSidebarName];
4
5
  export {
5
6
  SIDEBARS,
6
7
  collabHistorySidebarName,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/collab-sidebar/constants.js"],
4
4
  "sourcesContent": ["export const collabHistorySidebarName = 'edit-post/collab-history-sidebar';\nexport const collabSidebarName = 'edit-post/collab-sidebar';\nexport const SIDEBARS = [ collabHistorySidebarName, collabSidebarName ];\n"],
5
- "mappings": "AAAO,MAAM,2BAA2B;AACjC,MAAM,oBAAoB;AAC1B,MAAM,WAAW,CAAE,0BAA0B,iBAAkB;",
5
+ "mappings": ";AAAO,IAAM,2BAA2B;AACjC,IAAM,oBAAoB;AAC1B,IAAM,WAAW,CAAE,0BAA0B,iBAAkB;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,4 @@
1
+ // packages/editor/src/components/collab-sidebar/hooks.js
1
2
  import {
2
3
  useFloating,
3
4
  offset as offsetMiddleware,
@@ -24,7 +25,7 @@ import { store as editorStore } from "../../store";
24
25
  import { collabSidebarName } from "./constants";
25
26
  import { unlock } from "../../lock-unlock";
26
27
  import { noop } from "./utils";
27
- const { useBlockElementRef, cleanEmptyObject } = unlock(
28
+ var { useBlockElementRef, cleanEmptyObject } = unlock(
28
29
  blockEditorPrivateApis
29
30
  );
30
31
  function useBlockComments(postId) {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/collab-sidebar/hooks.js"],
4
4
  "sourcesContent": ["/**\n * External dependencies\n */\nimport {\n\tuseFloating,\n\toffset as offsetMiddleware,\n\tautoUpdate,\n} from '@floating-ui/react-dom';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseEffect,\n\tuseMemo,\n\tuseRef,\n\tuseCallback,\n\tuseReducer,\n} from '@wordpress/element';\nimport { useEntityRecords, store as coreStore } from '@wordpress/core-data';\nimport { useDispatch, useRegistry, useSelect } from '@wordpress/data';\nimport {\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { collabSidebarName } from './constants';\nimport { unlock } from '../../lock-unlock';\nimport { noop } from './utils';\n\nconst { useBlockElementRef, cleanEmptyObject } = unlock(\n\tblockEditorPrivateApis\n);\n\nexport function useBlockComments( postId ) {\n\tconst [ commentLastUpdated, reflowComments ] = useReducer(\n\t\t() => Date.now(),\n\t\t0\n\t);\n\n\tconst queryArgs = {\n\t\tpost: postId,\n\t\ttype: 'note',\n\t\tstatus: 'all',\n\t\tper_page: -1,\n\t};\n\n\tconst { records: threads } = useEntityRecords(\n\t\t'root',\n\t\t'comment',\n\t\tqueryArgs,\n\t\t{ enabled: !! postId && typeof postId === 'number' }\n\t);\n\n\tconst { getBlockAttributes } = useSelect( blockEditorStore );\n\tconst { clientIds } = useSelect( ( select ) => {\n\t\tconst { getClientIdsWithDescendants } = select( blockEditorStore );\n\t\treturn {\n\t\t\tclientIds: getClientIdsWithDescendants(),\n\t\t};\n\t}, [] );\n\n\t// Process comments to build the tree structure.\n\tconst { resultComments, unresolvedSortedThreads } = useMemo( () => {\n\t\tif ( ! threads || threads.length === 0 ) {\n\t\t\treturn { resultComments: [], unresolvedSortedThreads: [] };\n\t\t}\n\n\t\tconst blocksWithComments = clientIds.reduce( ( results, clientId ) => {\n\t\t\tconst commentId = getBlockAttributes( clientId )?.metadata?.noteId;\n\t\t\tif ( commentId ) {\n\t\t\t\tresults[ clientId ] = commentId;\n\t\t\t}\n\t\t\treturn results;\n\t\t}, {} );\n\n\t\t// Create a compare to store the references to all objects by id.\n\t\tconst compare = {};\n\t\tconst result = [];\n\n\t\t// Initialize each object with an empty `reply` array and map blockClientId.\n\t\tthreads.forEach( ( item ) => {\n\t\t\tconst itemBlock = Object.keys( blocksWithComments ).find(\n\t\t\t\t( key ) => blocksWithComments[ key ] === item.id\n\t\t\t);\n\n\t\t\tcompare[ item.id ] = {\n\t\t\t\t...item,\n\t\t\t\treply: [],\n\t\t\t\tblockClientId: item.parent === 0 ? itemBlock : null,\n\t\t\t};\n\t\t} );\n\n\t\t// Iterate over the data to build the tree structure.\n\t\tthreads.forEach( ( item ) => {\n\t\t\tif ( item.parent === 0 ) {\n\t\t\t\t// If parent is 0, it's a root item, push it to the result array.\n\t\t\t\tresult.push( compare[ item.id ] );\n\t\t\t} else if ( compare[ item.parent ] ) {\n\t\t\t\t// Otherwise, find its parent and push it to the parent's `reply` array.\n\t\t\t\tcompare[ item.parent ].reply.push( compare[ item.id ] );\n\t\t\t}\n\t\t} );\n\n\t\tif ( 0 === result?.length ) {\n\t\t\treturn { resultComments: [], unresolvedSortedThreads: [] };\n\t\t}\n\n\t\tconst updatedResult = result.map( ( item ) => ( {\n\t\t\t...item,\n\t\t\treply: [ ...item.reply ].reverse(),\n\t\t} ) );\n\n\t\tconst threadIdMap = new Map(\n\t\t\tupdatedResult.map( ( thread ) => [ String( thread.id ), thread ] )\n\t\t);\n\n\t\t// Prepare sets to determine which threads are linked to existing blocks.\n\t\tconst mappedIds = new Set(\n\t\t\tObject.values( blocksWithComments ).map( ( id ) => String( id ) )\n\t\t);\n\n\t\t// Get comments by block order, first unresolved, then resolved.\n\t\tconst unresolvedSortedComments = Object.values( blocksWithComments )\n\t\t\t.map( ( commentId ) => threadIdMap.get( String( commentId ) ) )\n\t\t\t.filter(\n\t\t\t\t( thread ) => thread !== undefined && thread.status === 'hold'\n\t\t\t);\n\n\t\tconst resolvedSortedComments = Object.values( blocksWithComments )\n\t\t\t.map( ( commentId ) => threadIdMap.get( String( commentId ) ) )\n\t\t\t.filter(\n\t\t\t\t( thread ) =>\n\t\t\t\t\tthread !== undefined && thread.status === 'approved'\n\t\t\t);\n\n\t\t// Append orphaned notes (whose related block was deleted or missing).\n\t\tconst orphanedComments = updatedResult.filter(\n\t\t\t( thread ) => ! mappedIds.has( String( thread.id ) )\n\t\t);\n\n\t\tconst allSortedComments = [\n\t\t\t...unresolvedSortedComments,\n\t\t\t...resolvedSortedComments,\n\t\t\t...orphanedComments,\n\t\t];\n\n\t\treturn {\n\t\t\tresultComments: allSortedComments,\n\t\t\tunresolvedSortedThreads: unresolvedSortedComments,\n\t\t};\n\t}, [ clientIds, threads, getBlockAttributes ] );\n\n\treturn {\n\t\tresultComments,\n\t\tunresolvedSortedThreads,\n\t\treflowComments,\n\t\tcommentLastUpdated,\n\t};\n}\n\nexport function useBlockCommentsActions( reflowComments = noop ) {\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst { saveEntityRecord, deleteEntityRecord } = useDispatch( coreStore );\n\tconst { getCurrentPostId } = useSelect( editorStore );\n\tconst { getBlockAttributes, getSelectedBlockClientId } =\n\t\tuseSelect( blockEditorStore );\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\n\tconst onError = ( error ) => {\n\t\tconst errorMessage =\n\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t? decodeEntities( error.message )\n\t\t\t\t: __( 'An error occurred while performing an update.' );\n\t\tcreateNotice( 'error', errorMessage, {\n\t\t\ttype: 'snackbar',\n\t\t\tisDismissible: true,\n\t\t} );\n\t};\n\n\tconst onCreate = async ( { content, parent } ) => {\n\t\ttry {\n\t\t\tconst savedRecord = await saveEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'comment',\n\t\t\t\t{\n\t\t\t\t\tpost: getCurrentPostId(),\n\t\t\t\t\tcontent,\n\t\t\t\t\tstatus: 'hold',\n\t\t\t\t\ttype: 'note',\n\t\t\t\t\tparent: parent || 0,\n\t\t\t\t},\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\n\t\t\t// If it's a main comment, update the block attributes with the comment id.\n\t\t\tif ( ! parent && savedRecord?.id ) {\n\t\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\t\tconst metadata = getBlockAttributes( clientId )?.metadata;\n\t\t\t\tupdateBlockAttributes( clientId, {\n\t\t\t\t\tmetadata: {\n\t\t\t\t\t\t...metadata,\n\t\t\t\t\t\tnoteId: savedRecord.id,\n\t\t\t\t\t},\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tcreateNotice(\n\t\t\t\t'snackbar',\n\t\t\t\tparent ? __( 'Reply added.' ) : __( 'Note added.' ),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tisDismissible: true,\n\t\t\t\t}\n\t\t\t);\n\t\t\tsetTimeout( reflowComments, 300 );\n\t\t\treturn savedRecord;\n\t\t} catch ( error ) {\n\t\t\treflowComments();\n\t\t\tonError( error );\n\t\t}\n\t};\n\n\tconst onEdit = async ( { id, content, status } ) => {\n\t\tconst messageType = status ? status : 'updated';\n\t\tconst messages = {\n\t\t\tapproved: __( 'Note marked as resolved.' ),\n\t\t\thold: __( 'Note reopened.' ),\n\t\t\tupdated: __( 'Note updated.' ),\n\t\t};\n\n\t\ttry {\n\t\t\t// For resolution or reopen actions, create a new note with metadata.\n\t\t\tif ( status === 'approved' || status === 'hold' ) {\n\t\t\t\t// First, update the thread status.\n\t\t\t\tawait saveEntityRecord(\n\t\t\t\t\t'root',\n\t\t\t\t\t'comment',\n\t\t\t\t\t{\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tstatus,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tthrowOnError: true,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Then create a new comment with the metadata.\n\t\t\t\tconst newCommentData = {\n\t\t\t\t\tpost: getCurrentPostId(),\n\t\t\t\t\tcontent: content || '', // Empty content for resolve, content for reopen.\n\t\t\t\t\ttype: 'note',\n\t\t\t\t\tstatus,\n\t\t\t\t\tparent: id,\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\t_wp_note_status:\n\t\t\t\t\t\t\tstatus === 'approved' ? 'resolved' : 'reopen',\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\tawait saveEntityRecord( 'root', 'comment', newCommentData, {\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tconst updateData = {\n\t\t\t\t\tid,\n\t\t\t\t\tcontent,\n\t\t\t\t\tstatus,\n\t\t\t\t};\n\n\t\t\t\tawait saveEntityRecord( 'root', 'comment', updateData, {\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tcreateNotice(\n\t\t\t\t'snackbar',\n\t\t\t\tmessages[ messageType ] ?? __( 'Note updated.' ),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tisDismissible: true,\n\t\t\t\t}\n\t\t\t);\n\t\t\treflowComments();\n\t\t} catch ( error ) {\n\t\t\treflowComments();\n\t\t\tonError( error );\n\t\t}\n\t};\n\n\tconst onDelete = async ( comment ) => {\n\t\ttry {\n\t\t\tawait deleteEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'comment',\n\t\t\t\tcomment.id,\n\t\t\t\tundefined,\n\t\t\t\t{\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( ! comment.parent ) {\n\t\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\t\tconst metadata = getBlockAttributes( clientId )?.metadata;\n\t\t\t\tupdateBlockAttributes( clientId, {\n\t\t\t\t\tmetadata: cleanEmptyObject( {\n\t\t\t\t\t\t...metadata,\n\t\t\t\t\t\tnoteId: undefined,\n\t\t\t\t\t} ),\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tcreateNotice( 'snackbar', __( 'Note deleted.' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t\tisDismissible: true,\n\t\t\t} );\n\t\t\treflowComments();\n\t\t} catch ( error ) {\n\t\t\treflowComments();\n\t\t\tonError( error );\n\t\t}\n\t};\n\n\treturn { onCreate, onEdit, onDelete };\n}\n\nexport function useEnableFloatingSidebar( enabled = false ) {\n\tconst registry = useRegistry();\n\tuseEffect( () => {\n\t\tif ( ! enabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { getActiveComplementaryArea } =\n\t\t\tregistry.select( interfaceStore );\n\t\tconst { disableComplementaryArea, enableComplementaryArea } =\n\t\t\tregistry.dispatch( interfaceStore );\n\n\t\tconst unsubscribe = registry.subscribe( () => {\n\t\t\t// Return `null` to indicate the user hid the complementary area.\n\t\t\tif ( getActiveComplementaryArea( 'core' ) === null ) {\n\t\t\t\tenableComplementaryArea( 'core', collabSidebarName );\n\t\t\t}\n\t\t} );\n\n\t\treturn () => {\n\t\t\tunsubscribe();\n\t\t\tif ( getActiveComplementaryArea( 'core' ) === collabSidebarName ) {\n\t\t\t\tdisableComplementaryArea( 'core', collabSidebarName );\n\t\t\t}\n\t\t};\n\t}, [ enabled, registry ] );\n}\n\nexport function useFloatingThread( {\n\tthread,\n\tcalculatedOffset,\n\tsetHeights,\n\tselectedThread,\n\tsetBlockRef,\n\tcommentLastUpdated,\n} ) {\n\tconst blockRef = useRef();\n\tuseBlockElementRef( thread.blockClientId, blockRef );\n\n\tconst updateHeight = useCallback(\n\t\t( id, newHeight ) => {\n\t\t\tsetHeights( ( prev ) => {\n\t\t\t\tif ( prev[ id ] !== newHeight ) {\n\t\t\t\t\treturn { ...prev, [ id ]: newHeight };\n\t\t\t\t}\n\t\t\t\treturn prev;\n\t\t\t} );\n\t\t},\n\t\t[ setHeights ]\n\t);\n\n\t// Use floating-ui to track the block element's position with the calculated offset.\n\tconst { y, refs } = useFloating( {\n\t\tplacement: 'right-start',\n\t\tmiddleware: [\n\t\t\toffsetMiddleware( {\n\t\t\t\tcrossAxis: calculatedOffset || -16,\n\t\t\t} ),\n\t\t],\n\t\twhileElementsMounted: autoUpdate,\n\t} );\n\n\t// Store the block reference for each thread.\n\tuseEffect( () => {\n\t\tif ( blockRef.current ) {\n\t\t\trefs.setReference( blockRef.current );\n\t\t}\n\t}, [ blockRef, refs, commentLastUpdated ] );\n\n\t// Track thread heights.\n\tuseEffect( () => {\n\t\tif ( refs.floating?.current ) {\n\t\t\tsetBlockRef( thread.id, blockRef.current );\n\t\t}\n\t}, [ thread.id, refs.floating, setBlockRef ] );\n\n\t// When the selected thread changes, update heights, triggering offset recalculation.\n\tuseEffect( () => {\n\t\tif ( refs.floating?.current ) {\n\t\t\tconst newHeight = refs.floating.current.scrollHeight;\n\t\t\tupdateHeight( thread.id, newHeight );\n\t\t}\n\t}, [\n\t\tthread.id,\n\t\tupdateHeight,\n\t\trefs.floating,\n\t\tselectedThread,\n\t\tcommentLastUpdated,\n\t] );\n\n\treturn {\n\t\tblockRef,\n\t\ty,\n\t\trefs,\n\t};\n}\n"],
5
- "mappings": "AAGA;AAAA,EACC;AAAA,EACA,UAAU;AAAA,EACV;AAAA,OACM;AAKP,SAAS,UAAU;AACnB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,kBAAkB,SAAS,iBAAiB;AACrD,SAAS,aAAa,aAAa,iBAAiB;AACpD;AAAA,EACC,SAAS;AAAA,EACT,eAAe;AAAA,OACT;AACP,SAAS,SAAS,oBAAoB;AACtC,SAAS,sBAAsB;AAC/B,SAAS,SAAS,sBAAsB;AAKxC,SAAS,SAAS,mBAAmB;AACrC,SAAS,yBAAyB;AAClC,SAAS,cAAc;AACvB,SAAS,YAAY;AAErB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I,SAAS,OAAQ;AAAA,IAC1C;AAAA,EACD,GAAG,CAAE,OAAO,IAAI,KAAK,UAAU,WAAY,CAAE;AAG7C,YAAW,MAAM;AAChB,QAAK,KAAK,UAAU,SAAU;AAC7B,YAAM,YAAY,KAAK,SAAS,QAAQ;AACxC,mBAAc,OAAO,IAAI,SAAU;AAAA,IACpC;AAAA,EACD,GAAG;AAAA,IACF,OAAO;AAAA,IACP;AAAA,IACA,KAAK;AAAA,IACL;AAAA,IACA;AAAA,EACD,CAAE;AAEF,SAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
1
+ // packages/editor/src/components/collab-sidebar/index.js
2
2
  import { __ } from "@wordpress/i18n";
3
3
  import { useSelect, useDispatch } from "@wordpress/data";
4
4
  import { __experimentalVStack as VStack } from "@wordpress/components";
@@ -26,9 +26,10 @@ import {
26
26
  import { focusCommentThread } from "./utils";
27
27
  import PostTypeSupportCheck from "../post-type-support-check";
28
28
  import { unlock } from "../../lock-unlock";
29
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
29
30
  function NotesSidebarContent({
30
- showCommentBoard,
31
- setShowCommentBoard,
31
+ newNoteFormState,
32
+ setNewNoteFormState,
32
33
  styles,
33
34
  comments,
34
35
  commentSidebarRef,
@@ -58,8 +59,8 @@ function NotesSidebarContent({
58
59
  onEditComment: onEdit,
59
60
  onAddReply: onCreate,
60
61
  onCommentDelete: onDelete,
61
- showCommentBoard,
62
- setShowCommentBoard,
62
+ newNoteFormState,
63
+ setNewNoteFormState,
63
64
  commentSidebarRef,
64
65
  reflowComments,
65
66
  commentLastUpdated,
@@ -70,7 +71,7 @@ function NotesSidebarContent({
70
71
  );
71
72
  }
72
73
  function NotesSidebar({ postId, mode }) {
73
- const [showCommentBoard, setShowCommentBoard] = useState(false);
74
+ const [newNoteFormState, setNewNoteFormState] = useState("closed");
74
75
  const { getActiveComplementaryArea } = useSelect(interfaceStore);
75
76
  const { enableComplementaryArea } = useDispatch(interfaceStore);
76
77
  const { toggleBlockSpotlight } = unlock(useDispatch(blockEditorStore));
@@ -100,7 +101,7 @@ function NotesSidebar({ postId, mode }) {
100
101
  commentLastUpdated
101
102
  } = useBlockComments(postId);
102
103
  useEnableFloatingSidebar(
103
- showFloatingSidebar && (unresolvedSortedThreads.length > 0 || showCommentBoard)
104
+ showFloatingSidebar && (unresolvedSortedThreads.length > 0 || newNoteFormState !== "closed")
104
105
  );
105
106
  const { merged: GlobalStyles } = useGlobalStylesContext();
106
107
  const backgroundColor = GlobalStyles?.styles?.color?.background;
@@ -111,7 +112,7 @@ function NotesSidebar({ postId, mode }) {
111
112
  const activeNotesArea = SIDEBARS.find((name) => name === prevArea);
112
113
  if (currentThread?.status === "approved") {
113
114
  enableComplementaryArea("core", collabHistorySidebarName);
114
- } else if (!activeNotesArea) {
115
+ } else if (!activeNotesArea || !showAllNotesSidebar) {
115
116
  enableComplementaryArea(
116
117
  "core",
117
118
  showFloatingSidebar ? collabSidebarName : collabHistorySidebarName
@@ -121,7 +122,7 @@ function NotesSidebar({ postId, mode }) {
121
122
  if (!SIDEBARS.includes(currentArea)) {
122
123
  return;
123
124
  }
124
- setShowCommentBoard(!blockCommentId);
125
+ setNewNoteFormState(!blockCommentId ? "open" : "closed");
125
126
  focusCommentThread(
126
127
  blockCommentId,
127
128
  commentSidebarRef.current,
@@ -155,8 +156,8 @@ function NotesSidebar({ postId, mode }) {
155
156
  NotesSidebarContent,
156
157
  {
157
158
  comments: resultComments,
158
- showCommentBoard,
159
- setShowCommentBoard,
159
+ newNoteFormState,
160
+ setNewNoteFormState,
160
161
  commentSidebarRef,
161
162
  reflowComments,
162
163
  commentLastUpdated
@@ -177,8 +178,8 @@ function NotesSidebar({ postId, mode }) {
177
178
  NotesSidebarContent,
178
179
  {
179
180
  comments: unresolvedSortedThreads,
180
- showCommentBoard,
181
- setShowCommentBoard,
181
+ newNoteFormState,
182
+ setNewNoteFormState,
182
183
  commentSidebarRef,
183
184
  reflowComments,
184
185
  commentLastUpdated,
@@ -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';\nimport { unlock } from '../../lock-unlock';\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=\"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\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 { 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 || 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\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 ) {\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\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{ 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{ 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\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/>\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\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, 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": "AAkEG,SAuGD,UAvGC,KAuGD,YAvGC;AA/DH,SAAS,UAAU;AACnB,SAAS,WAAW,mBAAmB;AACvC,SAAS,wBAAwB,cAAc;AAC/C,SAAS,UAAU,cAAc;AACjC,SAAS,wBAAwB;AACjC,SAAS,WAAW,mBAAmB;AACvC,SAAS,SAAS,wBAAwB;AAC1C,SAAS,SAAS,sBAAsB;AAKxC,OAAO,mBAAmB;AAC1B;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,gBAAgB;AACzB,SAAS,SAAS,mBAAmB;AACrC,OAAO,wBAAwB;AAC/B,OAAO,4BAA4B;AACnC,SAAS,8BAA8B;AACvC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,0BAA0B;AACnC,OAAO,0BAA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AAA,IAC7C,uBACD;AAAA,MAAC;AAAA;AAAA,QACA,YAAa;AAAA,QACb,MAAO;AAAA,QACP,OAAQ,GAAI,WAAY;AAAA,QACxB,QACC,oBAAC,QAAG,WAAU,8CACX,aAAI,WAAY,GACnB;AAAA,QAED,MAAO;AAAA,QACP,YAAa,GAAI,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;AAAA;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,IAAI,UAAW,CAAE,WAAY;AAC7D,UAAM,EAAE,kBAAkB,kBAAkB,cAAc,IACzD,OAAQ,WAAY;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,oBAAC,wBAAqB,aAAY,gBACjC,8BAAC,gBAAa,QAAkB,MAAc,GAC/C;AAEF;",
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( ! blockCommentId ? 'open' : 'closed' );\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\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{ 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{ 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": ";AAGA,SAAS,UAAU;AACnB,SAAS,WAAW,mBAAmB;AACvC,SAAS,wBAAwB,cAAc;AAC/C,SAAS,UAAU,cAAc;AACjC,SAAS,wBAAwB;AACjC,SAAS,WAAW,mBAAmB;AACvC,SAAS,SAAS,wBAAwB;AAC1C,SAAS,SAAS,sBAAsB;AAKxC,OAAO,mBAAmB;AAC1B;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,gBAAgB;AACzB,SAAS,SAAS,mBAAmB;AACrC,OAAO,wBAAwB;AAC/B,OAAO,4BAA4B;AACnC,SAAS,8BAA8B;AACvC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,0BAA0B;AACnC,OAAO,0BAA0B;AACjC,SAAS,cAAc;AAiCpB,SAyGD,UAzGC,KAyGD,YAzGC;AA/BH,SAAS,oBAAqB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AACd,GAAI;AAC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C,oBAAC,QAAG,WAAU,8CACX,aAAI,WAAY,GACnB;AAAA,QAED,MAAO;AAAA,QACP,YAAa,GAAI,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;AAAA;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,IAAI,UAAW,CAAE,WAAY;AAC7D,UAAM,EAAE,kBAAkB,kBAAkB,cAAc,IACzD,OAAQ,WAAY;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,oBAAC,wBAAqB,aAAY,gBACjC,8BAAC,gBAAa,QAAkB,MAAc,GAC/C;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,10 +1,11 @@
1
+ // packages/editor/src/components/collab-sidebar/utils.js
1
2
  import { _x } from "@wordpress/i18n";
2
3
  function sanitizeCommentString(str) {
3
4
  return str.trim();
4
5
  }
5
6
  function noop() {
6
7
  }
7
- const AVATAR_BORDER_COLORS = [
8
+ var AVATAR_BORDER_COLORS = [
8
9
  "#3858E9",
9
10
  // Blueberry
10
11
  "#9fB1FF",
@@ -44,16 +45,13 @@ function getCommentExcerpt(text, excerptLength = 10) {
44
45
  const isTrimmed = trimmedExcerpt !== rawText;
45
46
  return isTrimmed ? trimmedExcerpt + "\u2026" : trimmedExcerpt;
46
47
  }
47
- function focusCommentThread(commentId, threadContainer, additionalSelector) {
48
- if (!threadContainer) {
48
+ function focusCommentThread(commentId, container, additionalSelector) {
49
+ if (!container) {
49
50
  return;
50
51
  }
51
52
  const threadSelector = commentId ? `[role=treeitem][id="comment-thread-${commentId}"]` : "[role=treeitem]:not([id])";
52
53
  const selector = additionalSelector ? `${threadSelector} ${additionalSelector}` : threadSelector;
53
54
  return new Promise((resolve) => {
54
- const container = threadContainer.closest(
55
- ".interface-interface-skeleton__sidebar"
56
- );
57
55
  if (container.querySelector(selector)) {
58
56
  return resolve(container.querySelector(selector));
59
57
  }
@@ -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} threadContainer The container element to search within.\n * @param {string} additionalSelector The additional selector to focus on.\n */\nexport function focusCommentThread(\n\tcommentId,\n\tthreadContainer,\n\tadditionalSelector\n) {\n\tif ( ! threadContainer ) {\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\t// Watch the sidebar skeleton in case the sidebar disappears and re-appears.\n\t\tconst container = threadContainer.closest(\n\t\t\t'.interface-interface-skeleton__sidebar'\n\t\t);\n\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": "AAGA,SAAS,UAAU;AAQZ,SAAS,sBAAuB,KAAM;AAC5C,SAAO,IAAI,KAAK;AACjB;AAKO,SAAS,OAAO;AAAC;AAMxB,MAAM,uBAAuB;AAAA,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AAEA,QAAI,QAAQ;AAEZ,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;AAEF,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": ";AAGA,SAAS,UAAU;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,gBAAgB,GAAI,SAAS,oCAAqC;AAExE,QAAM,UAAU,KAAK,KAAK;AAC1B,MAA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CAAE;AAC3C;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
1
+ // packages/editor/src/components/collapsible-block-toolbar/index.js
2
2
  import clsx from "clsx";
3
3
  import {
4
4
  BlockToolbar,
@@ -11,7 +11,8 @@ import { __ } from "@wordpress/i18n";
11
11
  import { next, previous } from "@wordpress/icons";
12
12
  import { useSelect } from "@wordpress/data";
13
13
  import { unlock } from "../../lock-unlock";
14
- const { useHasBlockToolbar } = unlock(blockEditorPrivateApis);
14
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
+ var { useHasBlockToolbar } = unlock(blockEditorPrivateApis);
15
16
  function CollapsibleBlockToolbar({ isCollapsed, onToggle }) {
16
17
  const { blockSelectionStart } = useSelect((select) => {
17
18
  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": "AAiDE,mBAME,KANF;AA9CF,OAAO,UAAU;AAKjB;AAAA,EACC;AAAA,EACA,SAAS;AAAA,EACT,eAAe;AAAA,OACT;AACP,SAAS,iBAAiB;AAC1B,SAAS,QAAQ,eAAe;AAChC,SAAS,UAAU;AACnB,SAAS,MAAM,gBAAgB;AAC/B,SAAS,iBAAiB;AAK1B,SAAS,cAAc;AAEvB,MAAM,EAAE,mBAAmB,IAAI,OAAQ,sBAAuB;AAE/C,SAAR,wBAA0C,EAAE,aAAa,SAAS,GAAI;AAC5E,QAAM,EAAE,oBAAoB,IAAI,UAAW,CAAE,WAAY;AACxD,WAAO;AAAA,MACN,qBACC,OAAQ,gBAAiB,EAAE,uBAAuB;AAAA,IACpD;AAAA,EACD,GAAG,CAAC,CAAE;AACN,QAAM,kBAAkB,mBAAmB;AAE3C,QAAM,oBAA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