@wordpress/editor 14.40.2-next.v.202602271551.0 → 14.40.2

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 (481) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/components/collab-sidebar/add-comment.cjs +0 -3
  3. package/build/components/collab-sidebar/add-comment.cjs.map +2 -2
  4. package/build/components/collab-sidebar/comments.cjs +0 -3
  5. package/build/components/collab-sidebar/comments.cjs.map +2 -2
  6. package/build/components/collab-sidebar/index.cjs +7 -4
  7. package/build/components/collab-sidebar/index.cjs.map +2 -2
  8. package/build/components/collab-sidebar/utils.cjs +13 -15
  9. package/build/components/collab-sidebar/utils.cjs.map +2 -2
  10. package/build/components/collaborators-overlay/avatar-iframe-styles.cjs +141 -0
  11. package/build/components/collaborators-overlay/avatar-iframe-styles.cjs.map +7 -0
  12. package/build/components/collaborators-overlay/collaborator-styles.cjs +38 -2
  13. package/build/components/collaborators-overlay/collaborator-styles.cjs.map +2 -2
  14. package/build/components/collaborators-overlay/compute-selection.cjs +185 -0
  15. package/build/components/collaborators-overlay/compute-selection.cjs.map +7 -0
  16. package/build/components/collaborators-overlay/cursor-dom-utils.cjs +243 -0
  17. package/build/components/collaborators-overlay/cursor-dom-utils.cjs.map +7 -0
  18. package/build/components/collaborators-overlay/cursor-registry.cjs +86 -0
  19. package/build/components/collaborators-overlay/cursor-registry.cjs.map +7 -0
  20. package/build/components/collaborators-overlay/index.cjs +7 -2
  21. package/build/components/collaborators-overlay/index.cjs.map +2 -2
  22. package/build/components/collaborators-overlay/overlay-iframe-styles.cjs +148 -0
  23. package/build/components/collaborators-overlay/overlay-iframe-styles.cjs.map +7 -0
  24. package/build/components/collaborators-overlay/overlay.cjs +141 -229
  25. package/build/components/collaborators-overlay/overlay.cjs.map +3 -3
  26. package/build/components/collaborators-overlay/timing-utils.cjs +46 -0
  27. package/build/components/collaborators-overlay/timing-utils.cjs.map +7 -0
  28. package/build/components/collaborators-overlay/use-block-highlighting.cjs +91 -42
  29. package/build/components/collaborators-overlay/use-block-highlighting.cjs.map +2 -2
  30. package/build/components/collaborators-overlay/use-debounced-recompute.cjs +49 -0
  31. package/build/components/collaborators-overlay/use-debounced-recompute.cjs.map +7 -0
  32. package/build/components/collaborators-overlay/use-render-cursors.cjs +82 -172
  33. package/build/components/collaborators-overlay/use-render-cursors.cjs.map +3 -3
  34. package/build/components/collaborators-presence/avatar/component.cjs +121 -0
  35. package/build/components/collaborators-presence/avatar/component.cjs.map +7 -0
  36. package/build/components/collaborators-presence/avatar/index.cjs +37 -0
  37. package/build/components/collaborators-presence/avatar/index.cjs.map +7 -0
  38. package/build/components/collaborators-presence/avatar/types.cjs +19 -0
  39. package/build/components/collaborators-presence/avatar/types.cjs.map +7 -0
  40. package/build/components/collaborators-presence/avatar/use-image-loading-status.cjs +44 -0
  41. package/build/components/collaborators-presence/avatar/use-image-loading-status.cjs.map +7 -0
  42. package/build/components/collaborators-presence/avatar-group/component.cjs +78 -0
  43. package/build/components/collaborators-presence/avatar-group/component.cjs.map +7 -0
  44. package/build/components/collaborators-presence/avatar-group/index.cjs +37 -0
  45. package/build/components/collaborators-presence/avatar-group/index.cjs.map +7 -0
  46. package/build/components/collaborators-presence/avatar-group/types.cjs +19 -0
  47. package/build/components/collaborators-presence/avatar-group/types.cjs.map +7 -0
  48. package/build/components/collaborators-presence/index.cjs +66 -19
  49. package/build/components/collaborators-presence/index.cjs.map +3 -3
  50. package/build/components/collaborators-presence/list.cjs +60 -38
  51. package/build/components/collaborators-presence/list.cjs.map +3 -3
  52. package/build/components/collaborators-presence/use-collaborator-notifications.cjs +149 -0
  53. package/build/components/collaborators-presence/use-collaborator-notifications.cjs.map +7 -0
  54. package/build/components/editor-interface/index.cjs +11 -6
  55. package/build/components/editor-interface/index.cjs.map +2 -2
  56. package/build/components/inserter-sidebar/index.cjs +2 -1
  57. package/build/components/inserter-sidebar/index.cjs.map +2 -2
  58. package/build/components/more-menu/copy-content-menu-item.cjs +19 -2
  59. package/build/components/more-menu/copy-content-menu-item.cjs.map +3 -3
  60. package/build/components/post-last-revision/index.cjs +27 -6
  61. package/build/components/post-last-revision/index.cjs.map +2 -2
  62. package/build/components/post-locked-modal/index.cjs +49 -17
  63. package/build/components/post-locked-modal/index.cjs.map +3 -3
  64. package/build/components/post-revisions-preview/block-diff.cjs +130 -34
  65. package/build/components/post-revisions-preview/block-diff.cjs.map +2 -2
  66. package/build/components/post-revisions-preview/diff-markers.cjs +6 -5
  67. package/build/components/post-revisions-preview/diff-markers.cjs.map +2 -2
  68. package/build/components/post-revisions-preview/revisions-canvas.cjs +16 -60
  69. package/build/components/post-revisions-preview/revisions-canvas.cjs.map +3 -3
  70. package/build/components/post-revisions-preview/revisions-slider.cjs +102 -39
  71. package/build/components/post-revisions-preview/revisions-slider.cjs.map +3 -3
  72. package/build/components/post-text-editor/index.cjs +20 -5
  73. package/build/components/post-text-editor/index.cjs.map +3 -3
  74. package/build/components/preferences-modal/index.cjs +36 -4
  75. package/build/components/preferences-modal/index.cjs.map +2 -2
  76. package/build/components/provider/disable-non-page-content-blocks.cjs +31 -28
  77. package/build/components/provider/disable-non-page-content-blocks.cjs.map +3 -3
  78. package/build/components/provider/index.cjs +17 -5
  79. package/build/components/provider/index.cjs.map +2 -2
  80. package/build/components/provider/use-block-editor-settings.cjs +20 -4
  81. package/build/components/provider/use-block-editor-settings.cjs.map +3 -3
  82. package/build/components/provider/{use-post-content-blocks.cjs → use-post-content-block-types.cjs} +8 -19
  83. package/build/components/provider/use-post-content-block-types.cjs.map +7 -0
  84. package/build/components/provider/use-revision-blocks.cjs +106 -0
  85. package/build/components/provider/use-revision-blocks.cjs.map +7 -0
  86. package/build/components/revision-block-diff/index.cjs +61 -0
  87. package/build/components/revision-block-diff/index.cjs.map +7 -0
  88. package/build/components/revision-diff-panel/index.cjs +68 -0
  89. package/build/components/revision-diff-panel/index.cjs.map +7 -0
  90. package/build/components/revision-fields-diff/index.cjs +96 -0
  91. package/build/components/revision-fields-diff/index.cjs.map +7 -0
  92. package/build/components/sidebar/header.cjs +1 -1
  93. package/build/components/sidebar/header.cjs.map +2 -2
  94. package/build/components/sidebar/index.cjs +7 -1
  95. package/build/components/sidebar/index.cjs.map +3 -3
  96. package/build/components/style-book/index.cjs +4 -3
  97. package/build/components/style-book/index.cjs.map +2 -2
  98. package/build/components/sync-connection-error-modal/index.cjs +187 -0
  99. package/build/components/sync-connection-error-modal/index.cjs.map +7 -0
  100. package/build/components/sync-connection-error-modal/use-retry-countdown.cjs +84 -0
  101. package/build/components/sync-connection-error-modal/use-retry-countdown.cjs.map +7 -0
  102. package/build/components/template-content-panel/index.cjs +35 -31
  103. package/build/components/template-content-panel/index.cjs.map +3 -3
  104. package/build/components/template-part-menu-items/convert-to-regular.cjs +54 -11
  105. package/build/components/template-part-menu-items/convert-to-regular.cjs.map +3 -3
  106. package/build/components/visual-editor/index.cjs +6 -15
  107. package/build/components/visual-editor/index.cjs.map +2 -2
  108. package/build/store/private-actions.cjs +46 -2
  109. package/build/store/private-actions.cjs.map +2 -2
  110. package/build/store/private-selectors.cjs +154 -29
  111. package/build/store/private-selectors.cjs.map +2 -2
  112. package/build/store/reducer.cjs +27 -0
  113. package/build/store/reducer.cjs.map +2 -2
  114. package/build/store/selectors.cjs +0 -14
  115. package/build/store/selectors.cjs.map +2 -2
  116. package/build/utils/media-finalize/index.cjs +43 -0
  117. package/build/utils/media-finalize/index.cjs.map +7 -0
  118. package/build/utils/media-upload/on-success.cjs +46 -0
  119. package/build/utils/media-upload/on-success.cjs.map +7 -0
  120. package/build/utils/sync-error-messages.cjs +32 -15
  121. package/build/utils/sync-error-messages.cjs.map +3 -3
  122. package/build-module/components/collab-sidebar/add-comment.mjs +0 -3
  123. package/build-module/components/collab-sidebar/add-comment.mjs.map +2 -2
  124. package/build-module/components/collab-sidebar/comments.mjs +0 -3
  125. package/build-module/components/collab-sidebar/comments.mjs.map +2 -2
  126. package/build-module/components/collab-sidebar/index.mjs +7 -4
  127. package/build-module/components/collab-sidebar/index.mjs.map +2 -2
  128. package/build-module/components/collab-sidebar/utils.mjs +13 -15
  129. package/build-module/components/collab-sidebar/utils.mjs.map +2 -2
  130. package/build-module/components/collaborators-overlay/avatar-iframe-styles.mjs +128 -0
  131. package/build-module/components/collaborators-overlay/avatar-iframe-styles.mjs.map +7 -0
  132. package/build-module/components/collaborators-overlay/collaborator-styles.mjs +25 -1
  133. package/build-module/components/collaborators-overlay/collaborator-styles.mjs.map +2 -2
  134. package/build-module/components/collaborators-overlay/compute-selection.mjs +166 -0
  135. package/build-module/components/collaborators-overlay/compute-selection.mjs.map +7 -0
  136. package/build-module/components/collaborators-overlay/cursor-dom-utils.mjs +213 -0
  137. package/build-module/components/collaborators-overlay/cursor-dom-utils.mjs.map +7 -0
  138. package/build-module/components/collaborators-overlay/cursor-registry.mjs +61 -0
  139. package/build-module/components/collaborators-overlay/cursor-registry.mjs.map +7 -0
  140. package/build-module/components/collaborators-overlay/index.mjs +7 -2
  141. package/build-module/components/collaborators-overlay/index.mjs.map +2 -2
  142. package/build-module/components/collaborators-overlay/overlay-iframe-styles.mjs +130 -0
  143. package/build-module/components/collaborators-overlay/overlay-iframe-styles.mjs.map +7 -0
  144. package/build-module/components/collaborators-overlay/overlay.mjs +132 -230
  145. package/build-module/components/collaborators-overlay/overlay.mjs.map +2 -2
  146. package/build-module/components/collaborators-overlay/timing-utils.mjs +21 -0
  147. package/build-module/components/collaborators-overlay/timing-utils.mjs.map +7 -0
  148. package/build-module/components/collaborators-overlay/use-block-highlighting.mjs +93 -45
  149. package/build-module/components/collaborators-overlay/use-block-highlighting.mjs.map +2 -2
  150. package/build-module/components/collaborators-overlay/use-debounced-recompute.mjs +24 -0
  151. package/build-module/components/collaborators-overlay/use-debounced-recompute.mjs.map +7 -0
  152. package/build-module/components/collaborators-overlay/use-render-cursors.mjs +83 -176
  153. package/build-module/components/collaborators-overlay/use-render-cursors.mjs.map +2 -2
  154. package/build-module/components/collaborators-presence/avatar/component.mjs +90 -0
  155. package/build-module/components/collaborators-presence/avatar/component.mjs.map +7 -0
  156. package/build-module/components/collaborators-presence/avatar/index.mjs +6 -0
  157. package/build-module/components/collaborators-presence/avatar/index.mjs.map +7 -0
  158. package/build-module/components/collaborators-presence/avatar/types.mjs +1 -0
  159. package/build-module/components/collaborators-presence/avatar/types.mjs.map +7 -0
  160. package/build-module/components/collaborators-presence/avatar/use-image-loading-status.mjs +19 -0
  161. package/build-module/components/collaborators-presence/avatar/use-image-loading-status.mjs.map +7 -0
  162. package/build-module/components/collaborators-presence/avatar-group/component.mjs +47 -0
  163. package/build-module/components/collaborators-presence/avatar-group/component.mjs.map +7 -0
  164. package/build-module/components/collaborators-presence/avatar-group/index.mjs +6 -0
  165. package/build-module/components/collaborators-presence/avatar-group/index.mjs.map +7 -0
  166. package/build-module/components/collaborators-presence/avatar-group/types.mjs +1 -0
  167. package/build-module/components/collaborators-presence/avatar-group/types.mjs.map +7 -0
  168. package/build-module/components/collaborators-presence/index.mjs +57 -23
  169. package/build-module/components/collaborators-presence/index.mjs.map +2 -2
  170. package/build-module/components/collaborators-presence/list.mjs +52 -44
  171. package/build-module/components/collaborators-presence/list.mjs.map +2 -2
  172. package/build-module/components/collaborators-presence/use-collaborator-notifications.mjs +126 -0
  173. package/build-module/components/collaborators-presence/use-collaborator-notifications.mjs.map +7 -0
  174. package/build-module/components/editor-interface/index.mjs +12 -7
  175. package/build-module/components/editor-interface/index.mjs.map +2 -2
  176. package/build-module/components/inserter-sidebar/index.mjs +2 -1
  177. package/build-module/components/inserter-sidebar/index.mjs.map +2 -2
  178. package/build-module/components/more-menu/copy-content-menu-item.mjs +19 -2
  179. package/build-module/components/more-menu/copy-content-menu-item.mjs.map +2 -2
  180. package/build-module/components/post-last-revision/index.mjs +27 -6
  181. package/build-module/components/post-last-revision/index.mjs.map +2 -2
  182. package/build-module/components/post-locked-modal/index.mjs +49 -17
  183. package/build-module/components/post-locked-modal/index.mjs.map +2 -2
  184. package/build-module/components/post-revisions-preview/block-diff.mjs +130 -34
  185. package/build-module/components/post-revisions-preview/block-diff.mjs.map +2 -2
  186. package/build-module/components/post-revisions-preview/diff-markers.mjs +6 -5
  187. package/build-module/components/post-revisions-preview/diff-markers.mjs.map +2 -2
  188. package/build-module/components/post-revisions-preview/revisions-canvas.mjs +18 -65
  189. package/build-module/components/post-revisions-preview/revisions-canvas.mjs.map +2 -2
  190. package/build-module/components/post-revisions-preview/revisions-slider.mjs +110 -42
  191. package/build-module/components/post-revisions-preview/revisions-slider.mjs.map +2 -2
  192. package/build-module/components/post-text-editor/index.mjs +20 -5
  193. package/build-module/components/post-text-editor/index.mjs.map +2 -2
  194. package/build-module/components/preferences-modal/index.mjs +36 -4
  195. package/build-module/components/preferences-modal/index.mjs.map +2 -2
  196. package/build-module/components/provider/disable-non-page-content-blocks.mjs +31 -28
  197. package/build-module/components/provider/disable-non-page-content-blocks.mjs.map +2 -2
  198. package/build-module/components/provider/index.mjs +17 -5
  199. package/build-module/components/provider/index.mjs.map +2 -2
  200. package/build-module/components/provider/use-block-editor-settings.mjs +20 -4
  201. package/build-module/components/provider/use-block-editor-settings.mjs.map +2 -2
  202. package/build-module/components/provider/use-post-content-block-types.mjs +23 -0
  203. package/build-module/components/provider/use-post-content-block-types.mjs.map +7 -0
  204. package/build-module/components/provider/use-revision-blocks.mjs +81 -0
  205. package/build-module/components/provider/use-revision-blocks.mjs.map +7 -0
  206. package/build-module/components/revision-block-diff/index.mjs +30 -0
  207. package/build-module/components/revision-block-diff/index.mjs.map +7 -0
  208. package/build-module/components/revision-diff-panel/index.mjs +37 -0
  209. package/build-module/components/revision-diff-panel/index.mjs.map +7 -0
  210. package/build-module/components/revision-fields-diff/index.mjs +65 -0
  211. package/build-module/components/revision-fields-diff/index.mjs.map +7 -0
  212. package/build-module/components/sidebar/header.mjs +1 -1
  213. package/build-module/components/sidebar/header.mjs.map +2 -2
  214. package/build-module/components/sidebar/index.mjs +7 -1
  215. package/build-module/components/sidebar/index.mjs.map +2 -2
  216. package/build-module/components/style-book/index.mjs +4 -3
  217. package/build-module/components/style-book/index.mjs.map +2 -2
  218. package/build-module/components/sync-connection-error-modal/index.mjs +170 -0
  219. package/build-module/components/sync-connection-error-modal/index.mjs.map +7 -0
  220. package/build-module/components/sync-connection-error-modal/use-retry-countdown.mjs +59 -0
  221. package/build-module/components/sync-connection-error-modal/use-retry-countdown.mjs.map +7 -0
  222. package/build-module/components/template-content-panel/index.mjs +25 -31
  223. package/build-module/components/template-content-panel/index.mjs.map +2 -2
  224. package/build-module/components/template-part-menu-items/convert-to-regular.mjs +60 -14
  225. package/build-module/components/template-part-menu-items/convert-to-regular.mjs.map +2 -2
  226. package/build-module/components/visual-editor/index.mjs +6 -15
  227. package/build-module/components/visual-editor/index.mjs.map +2 -2
  228. package/build-module/store/private-actions.mjs +44 -2
  229. package/build-module/store/private-actions.mjs.map +2 -2
  230. package/build-module/store/private-selectors.mjs +153 -29
  231. package/build-module/store/private-selectors.mjs.map +2 -2
  232. package/build-module/store/reducer.mjs +25 -0
  233. package/build-module/store/reducer.mjs.map +2 -2
  234. package/build-module/store/selectors.mjs +0 -13
  235. package/build-module/store/selectors.mjs.map +2 -2
  236. package/build-module/utils/media-finalize/index.mjs +12 -0
  237. package/build-module/utils/media-finalize/index.mjs.map +7 -0
  238. package/build-module/utils/media-upload/on-success.mjs +25 -0
  239. package/build-module/utils/media-upload/on-success.mjs.map +7 -0
  240. package/build-module/utils/sync-error-messages.mjs +27 -15
  241. package/build-module/utils/sync-error-messages.mjs.map +3 -3
  242. package/build-style/style-rtl.css +296 -121
  243. package/build-style/style.css +296 -121
  244. package/build-types/components/autocompleters/link.d.ts +8 -0
  245. package/build-types/components/autocompleters/link.d.ts.map +1 -0
  246. package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
  247. package/build-types/components/collab-sidebar/add-note-menu-item.d.ts +5 -0
  248. package/build-types/components/collab-sidebar/add-note-menu-item.d.ts.map +1 -0
  249. package/build-types/components/collab-sidebar/add-note.d.ts +6 -0
  250. package/build-types/components/collab-sidebar/add-note.d.ts.map +1 -0
  251. package/build-types/components/collab-sidebar/board-store.d.ts +9 -0
  252. package/build-types/components/collab-sidebar/board-store.d.ts.map +1 -0
  253. package/build-types/components/collab-sidebar/floating-container.d.ts +8 -0
  254. package/build-types/components/collab-sidebar/floating-container.d.ts.map +1 -0
  255. package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
  256. package/build-types/components/collab-sidebar/note-byline.d.ts +10 -0
  257. package/build-types/components/collab-sidebar/note-byline.d.ts.map +1 -0
  258. package/build-types/components/collab-sidebar/note-card.d.ts +8 -0
  259. package/build-types/components/collab-sidebar/note-card.d.ts.map +1 -0
  260. package/build-types/components/collab-sidebar/note-form.d.ts +7 -0
  261. package/build-types/components/collab-sidebar/note-form.d.ts.map +1 -0
  262. package/build-types/components/collab-sidebar/note-indicator-toolbar.d.ts +5 -0
  263. package/build-types/components/collab-sidebar/note-indicator-toolbar.d.ts.map +1 -0
  264. package/build-types/components/collab-sidebar/note-thread.d.ts +11 -0
  265. package/build-types/components/collab-sidebar/note-thread.d.ts.map +1 -0
  266. package/build-types/components/collab-sidebar/note.d.ts +9 -0
  267. package/build-types/components/collab-sidebar/note.d.ts.map +1 -0
  268. package/build-types/components/collab-sidebar/notes.d.ts +7 -0
  269. package/build-types/components/collab-sidebar/notes.d.ts.map +1 -0
  270. package/build-types/components/collab-sidebar/utils.d.ts.map +1 -1
  271. package/build-types/components/collaborators-overlay/avatar-iframe-styles.d.ts +11 -0
  272. package/build-types/components/collaborators-overlay/avatar-iframe-styles.d.ts.map +1 -0
  273. package/build-types/components/collaborators-overlay/collaborator-styles.d.ts +17 -2
  274. package/build-types/components/collaborators-overlay/collaborator-styles.d.ts.map +1 -1
  275. package/build-types/components/collaborators-overlay/compute-selection.d.ts +24 -0
  276. package/build-types/components/collaborators-overlay/compute-selection.d.ts.map +1 -0
  277. package/build-types/components/collaborators-overlay/cursor-dom-utils.d.ts +72 -0
  278. package/build-types/components/collaborators-overlay/cursor-dom-utils.d.ts.map +1 -0
  279. package/build-types/components/collaborators-overlay/cursor-registry.d.ts +36 -0
  280. package/build-types/components/collaborators-overlay/cursor-registry.d.ts.map +1 -0
  281. package/build-types/components/collaborators-overlay/index.d.ts +7 -4
  282. package/build-types/components/collaborators-overlay/index.d.ts.map +1 -1
  283. package/build-types/components/collaborators-overlay/overlay-iframe-styles.d.ts +6 -0
  284. package/build-types/components/collaborators-overlay/overlay-iframe-styles.d.ts.map +1 -0
  285. package/build-types/components/collaborators-overlay/overlay.d.ts +4 -1
  286. package/build-types/components/collaborators-overlay/overlay.d.ts.map +1 -1
  287. package/build-types/components/collaborators-overlay/timing-utils.d.ts +11 -0
  288. package/build-types/components/collaborators-overlay/timing-utils.d.ts.map +1 -0
  289. package/build-types/components/collaborators-overlay/use-block-highlighting.d.ts +21 -5
  290. package/build-types/components/collaborators-overlay/use-block-highlighting.d.ts.map +1 -1
  291. package/build-types/components/collaborators-overlay/use-debounced-recompute.d.ts +10 -0
  292. package/build-types/components/collaborators-overlay/use-debounced-recompute.d.ts.map +1 -0
  293. package/build-types/components/collaborators-overlay/use-render-cursors.d.ts +6 -1
  294. package/build-types/components/collaborators-overlay/use-render-cursors.d.ts.map +1 -1
  295. package/build-types/components/collaborators-presence/avatar/component.d.ts +7 -0
  296. package/build-types/components/collaborators-presence/avatar/component.d.ts.map +1 -0
  297. package/build-types/components/collaborators-presence/avatar/index.d.ts +3 -0
  298. package/build-types/components/collaborators-presence/avatar/index.d.ts.map +1 -0
  299. package/build-types/components/collaborators-presence/avatar/types.d.ts +66 -0
  300. package/build-types/components/collaborators-presence/avatar/types.d.ts.map +1 -0
  301. package/build-types/components/collaborators-presence/avatar/use-image-loading-status.d.ts +17 -0
  302. package/build-types/components/collaborators-presence/avatar/use-image-loading-status.d.ts.map +1 -0
  303. package/build-types/components/collaborators-presence/avatar-group/component.d.ts +7 -0
  304. package/build-types/components/collaborators-presence/avatar-group/component.d.ts.map +1 -0
  305. package/build-types/components/collaborators-presence/avatar-group/index.d.ts +3 -0
  306. package/build-types/components/collaborators-presence/avatar-group/index.d.ts.map +1 -0
  307. package/build-types/components/collaborators-presence/avatar-group/types.d.ts +14 -0
  308. package/build-types/components/collaborators-presence/avatar-group/types.d.ts.map +1 -0
  309. package/build-types/components/collaborators-presence/index.d.ts.map +1 -1
  310. package/build-types/components/collaborators-presence/list.d.ts +6 -2
  311. package/build-types/components/collaborators-presence/list.d.ts.map +1 -1
  312. package/build-types/components/collaborators-presence/use-collaborator-notifications.d.ts +9 -0
  313. package/build-types/components/collaborators-presence/use-collaborator-notifications.d.ts.map +1 -0
  314. package/build-types/components/editor-interface/index.d.ts.map +1 -1
  315. package/build-types/components/inserter-sidebar/index.d.ts.map +1 -1
  316. package/build-types/components/media/media-editor-modal.d.ts +15 -0
  317. package/build-types/components/media/media-editor-modal.d.ts.map +1 -0
  318. package/build-types/components/more-menu/copy-content-menu-item.d.ts.map +1 -1
  319. package/build-types/components/post-last-revision/index.d.ts.map +1 -1
  320. package/build-types/components/post-locked-modal/index.d.ts.map +1 -1
  321. package/build-types/components/post-revisions-panel/index.d.ts +2 -0
  322. package/build-types/components/post-revisions-panel/index.d.ts.map +1 -0
  323. package/build-types/components/post-revisions-preview/block-diff.d.ts.map +1 -1
  324. package/build-types/components/post-revisions-preview/diff-markers.d.ts.map +1 -1
  325. package/build-types/components/post-revisions-preview/revisions-canvas.d.ts +2 -5
  326. package/build-types/components/post-revisions-preview/revisions-canvas.d.ts.map +1 -1
  327. package/build-types/components/post-revisions-preview/revisions-slider.d.ts +1 -1
  328. package/build-types/components/post-revisions-preview/revisions-slider.d.ts.map +1 -1
  329. package/build-types/components/post-text-editor/index.d.ts.map +1 -1
  330. package/build-types/components/post-text-editor/utils.d.ts +29 -0
  331. package/build-types/components/post-text-editor/utils.d.ts.map +1 -0
  332. package/build-types/components/provider/disable-non-page-content-blocks.d.ts.map +1 -1
  333. package/build-types/components/provider/index.d.ts.map +1 -1
  334. package/build-types/components/provider/use-block-editor-settings.d.ts.map +1 -1
  335. package/build-types/components/provider/use-network-reconnect.d.ts +8 -0
  336. package/build-types/components/provider/use-network-reconnect.d.ts.map +1 -0
  337. package/build-types/components/provider/use-post-content-block-types.d.ts +9 -0
  338. package/build-types/components/provider/use-post-content-block-types.d.ts.map +1 -0
  339. package/build-types/components/provider/use-revision-blocks.d.ts +10 -0
  340. package/build-types/components/provider/use-revision-blocks.d.ts.map +1 -0
  341. package/build-types/components/revision-block-diff/index.d.ts +6 -0
  342. package/build-types/components/revision-block-diff/index.d.ts.map +1 -0
  343. package/build-types/components/revision-diff-panel/index.d.ts +14 -0
  344. package/build-types/components/revision-diff-panel/index.d.ts.map +1 -0
  345. package/build-types/components/revision-fields-diff/index.d.ts +6 -0
  346. package/build-types/components/revision-fields-diff/index.d.ts.map +1 -0
  347. package/build-types/components/sidebar/dataform-post-summary.d.ts +4 -0
  348. package/build-types/components/sidebar/dataform-post-summary.d.ts.map +1 -0
  349. package/build-types/components/sidebar/index.d.ts.map +1 -1
  350. package/build-types/components/sidebar/post-revision-summary.d.ts +2 -0
  351. package/build-types/components/sidebar/post-revision-summary.d.ts.map +1 -0
  352. package/build-types/components/style-book/index.d.ts +2 -1
  353. package/build-types/components/style-book/index.d.ts.map +1 -1
  354. package/build-types/components/sync-connection-error-modal/index.d.ts +8 -0
  355. package/build-types/components/sync-connection-error-modal/index.d.ts.map +1 -0
  356. package/build-types/components/sync-connection-error-modal/use-retry-countdown.d.ts +11 -0
  357. package/build-types/components/sync-connection-error-modal/use-retry-countdown.d.ts.map +1 -0
  358. package/build-types/components/template-actions-panel/block-theme-content.d.ts +2 -0
  359. package/build-types/components/template-actions-panel/block-theme-content.d.ts.map +1 -0
  360. package/build-types/components/template-actions-panel/classic-theme-content.d.ts +2 -0
  361. package/build-types/components/template-actions-panel/classic-theme-content.d.ts.map +1 -0
  362. package/build-types/components/template-actions-panel/index.d.ts +2 -0
  363. package/build-types/components/template-actions-panel/index.d.ts.map +1 -0
  364. package/build-types/components/template-content-panel/index.d.ts.map +1 -1
  365. package/build-types/components/template-part-menu-items/convert-to-regular.d.ts.map +1 -1
  366. package/build-types/components/upload-progress-snackbar/index.d.ts +19 -0
  367. package/build-types/components/upload-progress-snackbar/index.d.ts.map +1 -0
  368. package/build-types/components/upload-progress-snackbar/stories/index.story.d.ts +28 -0
  369. package/build-types/components/upload-progress-snackbar/stories/index.story.d.ts.map +1 -0
  370. package/build-types/components/upload-progress-snackbar/tracker.d.ts +41 -0
  371. package/build-types/components/upload-progress-snackbar/tracker.d.ts.map +1 -0
  372. package/build-types/components/visual-editor/index.d.ts.map +1 -1
  373. package/build-types/store/private-actions.d.ts +12 -0
  374. package/build-types/store/private-actions.d.ts.map +1 -1
  375. package/build-types/store/private-selectors.d.ts +45 -0
  376. package/build-types/store/private-selectors.d.ts.map +1 -1
  377. package/build-types/store/reducer.d.ts +21 -0
  378. package/build-types/store/reducer.d.ts.map +1 -1
  379. package/build-types/store/selectors.d.ts +0 -10
  380. package/build-types/store/selectors.d.ts.map +1 -1
  381. package/build-types/utils/media-delete/index.d.ts +2 -0
  382. package/build-types/utils/media-delete/index.d.ts.map +1 -0
  383. package/build-types/utils/media-finalize/index.d.ts +2 -0
  384. package/build-types/utils/media-finalize/index.d.ts.map +1 -0
  385. package/build-types/utils/media-upload/on-success.d.ts +9 -0
  386. package/build-types/utils/media-upload/on-success.d.ts.map +1 -0
  387. package/build-types/utils/sync-error-messages.d.ts +17 -3
  388. package/build-types/utils/sync-error-messages.d.ts.map +1 -1
  389. package/package.json +45 -44
  390. package/src/components/collab-sidebar/add-comment.js +0 -4
  391. package/src/components/collab-sidebar/comments.js +0 -5
  392. package/src/components/collab-sidebar/index.js +7 -4
  393. package/src/components/collab-sidebar/utils.js +9 -10
  394. package/src/components/collaborators-overlay/avatar-iframe-styles.ts +134 -0
  395. package/src/components/collaborators-overlay/collaborator-styles.ts +43 -2
  396. package/src/components/collaborators-overlay/compute-selection.ts +315 -0
  397. package/src/components/collaborators-overlay/cursor-dom-utils.ts +382 -0
  398. package/src/components/collaborators-overlay/cursor-registry.ts +96 -0
  399. package/src/components/collaborators-overlay/index.tsx +12 -4
  400. package/src/components/collaborators-overlay/overlay-iframe-styles.ts +131 -0
  401. package/src/components/collaborators-overlay/overlay.tsx +145 -223
  402. package/src/components/collaborators-overlay/timing-utils.ts +30 -0
  403. package/src/components/collaborators-overlay/use-block-highlighting.ts +152 -64
  404. package/src/components/collaborators-overlay/use-debounced-recompute.ts +32 -0
  405. package/src/components/collaborators-overlay/use-render-cursors.ts +120 -282
  406. package/src/components/collaborators-presence/avatar/component.tsx +123 -0
  407. package/src/components/collaborators-presence/avatar/index.ts +2 -0
  408. package/src/components/collaborators-presence/avatar/styles.scss +184 -0
  409. package/src/components/collaborators-presence/avatar/test/index.tsx +389 -0
  410. package/src/components/collaborators-presence/avatar/types.ts +66 -0
  411. package/src/components/collaborators-presence/avatar/use-image-loading-status.ts +36 -0
  412. package/src/components/collaborators-presence/avatar-group/component.tsx +55 -0
  413. package/src/components/collaborators-presence/avatar-group/index.ts +2 -0
  414. package/src/components/collaborators-presence/avatar-group/styles.scss +33 -0
  415. package/src/components/collaborators-presence/avatar-group/test/index.tsx +139 -0
  416. package/src/components/collaborators-presence/avatar-group/types.ts +13 -0
  417. package/src/components/collaborators-presence/index.tsx +43 -12
  418. package/src/components/collaborators-presence/list.tsx +68 -40
  419. package/src/components/collaborators-presence/styles/collaborators-list.scss +26 -19
  420. package/src/components/collaborators-presence/styles/collaborators-presence.scss +6 -2
  421. package/src/components/collaborators-presence/test/use-collaborator-notifications.ts +397 -0
  422. package/src/components/collaborators-presence/use-collaborator-notifications.ts +203 -0
  423. package/src/components/document-bar/style.scss +1 -1
  424. package/src/components/editor-interface/index.js +13 -6
  425. package/src/components/inserter-sidebar/index.js +4 -1
  426. package/src/components/more-menu/copy-content-menu-item.js +20 -2
  427. package/src/components/post-last-revision/index.js +35 -6
  428. package/src/components/post-last-revision/style.scss +0 -3
  429. package/src/components/post-locked-modal/index.js +69 -25
  430. package/src/components/post-panel-row/style.scss +1 -0
  431. package/src/components/post-revisions-preview/block-diff.js +224 -61
  432. package/src/components/post-revisions-preview/diff-markers.js +15 -12
  433. package/src/components/post-revisions-preview/revisions-canvas.js +23 -86
  434. package/src/components/post-revisions-preview/revisions-slider.js +136 -63
  435. package/src/components/post-revisions-preview/style.scss +3 -3
  436. package/src/components/post-revisions-preview/test/block-diff.js +202 -35
  437. package/src/components/post-text-editor/index.js +25 -6
  438. package/src/components/preferences-modal/index.js +37 -7
  439. package/src/components/provider/disable-non-page-content-blocks.js +42 -40
  440. package/src/components/provider/index.js +20 -2
  441. package/src/components/provider/use-block-editor-settings.js +21 -1
  442. package/src/components/provider/use-post-content-block-types.js +30 -0
  443. package/src/components/provider/use-revision-blocks.js +105 -0
  444. package/src/components/revision-block-diff/index.js +39 -0
  445. package/src/components/revision-diff-panel/index.js +59 -0
  446. package/src/components/revision-diff-panel/style.scss +13 -0
  447. package/src/components/revision-fields-diff/index.js +91 -0
  448. package/src/components/sidebar/header.js +1 -1
  449. package/src/components/sidebar/index.js +4 -0
  450. package/src/components/style-book/index.js +4 -2
  451. package/src/components/sync-connection-error-modal/index.tsx +253 -0
  452. package/src/components/sync-connection-error-modal/style.scss +14 -0
  453. package/src/components/sync-connection-error-modal/use-retry-countdown.ts +93 -0
  454. package/src/components/template-content-panel/index.js +30 -38
  455. package/src/components/template-part-menu-items/convert-to-regular.js +74 -12
  456. package/src/components/visual-editor/index.js +6 -23
  457. package/src/store/private-actions.js +70 -1
  458. package/src/store/private-selectors.js +215 -37
  459. package/src/store/reducer.js +41 -0
  460. package/src/store/selectors.js +0 -19
  461. package/src/style.scss +4 -1
  462. package/src/utils/media-finalize/index.js +11 -0
  463. package/src/utils/media-finalize/test/index.js +34 -0
  464. package/src/utils/media-upload/on-success.js +34 -0
  465. package/src/utils/sync-error-messages.ts +72 -0
  466. package/src/utils/test/sync-error-messages.js +34 -0
  467. package/build/components/provider/use-post-content-blocks.cjs.map +0 -7
  468. package/build/components/sync-connection-modal/index.cjs +0 -130
  469. package/build/components/sync-connection-modal/index.cjs.map +0 -7
  470. package/build-module/components/provider/use-post-content-blocks.mjs +0 -34
  471. package/build-module/components/provider/use-post-content-blocks.mjs.map +0 -7
  472. package/build-module/components/sync-connection-modal/index.mjs +0 -114
  473. package/build-module/components/sync-connection-modal/index.mjs.map +0 -7
  474. package/build-types/components/provider/use-post-content-blocks.d.ts +0 -2
  475. package/build-types/components/provider/use-post-content-blocks.d.ts.map +0 -1
  476. package/build-types/components/sync-connection-modal/index.d.ts +0 -8
  477. package/build-types/components/sync-connection-modal/index.d.ts.map +0 -1
  478. package/src/components/provider/use-post-content-blocks.js +0 -42
  479. package/src/components/sync-connection-modal/index.js +0 -140
  480. package/src/components/sync-connection-modal/style.scss +0 -11
  481. package/src/utils/sync-error-messages.js +0 -53
@@ -0,0 +1,9 @@
1
+ export declare function Note({ note, parentNote, isSelected, onEditNote, onDeleteNote, onResolve }: {
2
+ isSelected: any;
3
+ note: any;
4
+ onDeleteNote: any;
5
+ onEditNote: any;
6
+ onResolve: any;
7
+ parentNote: any;
8
+ }): import("react").JSX.Element;
9
+ //# sourceMappingURL=note.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"note.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/note.js"],"names":[],"mappings":"AAyDA,wBAAgB,IAAI,CAAE,EACrB,IAAI,EACJ,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACZ,SAAS,EACT;;;;;;;CAAA,+BAgJA"}
@@ -0,0 +1,7 @@
1
+ export declare function Notes({ notes, sidebarRef, isFloating, styles }: {
2
+ isFloating?: boolean | undefined;
3
+ notes: any;
4
+ sidebarRef: any;
5
+ styles: any;
6
+ }): import("react").JSX.Element;
7
+ //# sourceMappingURL=notes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notes.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/notes.js"],"names":[],"mappings":"AA4BA,wBAAgB,KAAK,CAAE,EAAE,KAAK,EAAE,UAAU,EAAE,UAAkB,EAAE,MAAM,EAAE;;;;;CAAA,+BAgRvE"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/utils.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,2CAHW,MAAM,GACL,MAAM,CAIjB;AAED;;GAEG;AACH,6BAAyB;AAiBzB;;;;;GAKG;AACH,6CAHW,MAAM,GACL,MAAM,CAIjB;AAED;;;;;;GAMG;AACH,wCAJW,MAAM,kBACN,MAAM,GACL,MAAM,CA0CjB;AAED;;;;;;;;;GASG;AACH,8CAJW,MAAM,aACL,WAAW,OAAA,sBACZ,MAAM,4BA0ChB"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/utils.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,2CAHW,MAAM,GACL,MAAM,CAIjB;AAED;;GAEG;AACH,6BAAyB;AAgBzB;;;;;GAKG;AACH,6CAHW,MAAM,GACL,MAAM,CAIjB;AAED;;;;;;GAMG;AACH,wCAJW,MAAM,kBACN,MAAM,GACL,MAAM,CA0CjB;AAED;;;;;;;;;GASG;AACH,8CAJW,MAAM,aACL,WAAW,OAAA,sBACZ,MAAM,4BA0ChB"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Compiled CSS for the Avatar component, for injection into the editor canvas
3
+ * iframe where the editor package's SCSS is not available.
4
+ *
5
+ * Source: ../collaborators-presence/avatar/styles.scss
6
+ *
7
+ * Dimmed and status-indicator styles are intentionally omitted — they are not
8
+ * used in the overlay. Keep in sync when editing the SCSS source.
9
+ */
10
+ export declare const AVATAR_IFRAME_STYLES = "\n.editor-avatar {\n\tposition: relative;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tborder-radius: 9999px;\n\tflex-shrink: 0;\n\tbox-shadow: 0 0 0 var(--wp-admin-border-width-focus, 2px) #fff, 0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01);\n}\n.editor-avatar__image {\n\tbox-sizing: border-box;\n\tposition: relative;\n\twidth: 32px;\n\theight: 32px;\n\tborder-radius: 9999px;\n\tborder: 0;\n\tbackground-color: var(--wp-admin-theme-color, #3858e9);\n\toverflow: hidden;\n\toverflow: clip;\n\tflex-shrink: 0;\n\tfont-size: 0;\n\tcolor: #fff;\n}\n.is-small > .editor-avatar__image {\n\twidth: 24px;\n\theight: 24px;\n}\n.has-avatar-border-color > .editor-avatar__image {\n\tborder: var(--wp-admin-border-width-focus, 2px) solid var(--editor-avatar-outline-color);\n\tbackground-clip: padding-box;\n}\n.has-avatar-border-color > .editor-avatar__image::after {\n\tcontent: \"\";\n\tposition: absolute;\n\tinset: 0;\n\tborder-radius: inherit;\n\tbox-shadow: inset 0 0 0 var(--wp-admin-border-width-focus, 2px) #fff;\n\tpointer-events: none;\n\tz-index: 1;\n}\n.editor-avatar__img {\n\tposition: absolute;\n\tinset: 0;\n\twidth: 100%;\n\theight: 100%;\n\tobject-fit: cover;\n\tborder-radius: inherit;\n\topacity: 0;\n}\n.has-src > .editor-avatar__image > .editor-avatar__img {\n\topacity: 1;\n}\n.editor-avatar:not(.has-src) > .editor-avatar__image {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tfont-size: 11px;\n\tfont-weight: 499;\n\tborder: 0;\n\tbackground-clip: border-box;\n}\n.editor-avatar:not(.has-src) > .editor-avatar__image::after {\n\tcontent: none;\n}\n.editor-avatar:not(.has-src).has-avatar-border-color > .editor-avatar__image {\n\tbackground-color: var(--editor-avatar-outline-color);\n}\n.editor-avatar__name {\n\tfont-size: 13px;\n\tfont-weight: 499;\n\tline-height: 20px;\n\tcolor: var(--editor-avatar-name-color, #fff);\n\tmin-width: 0;\n\tpadding-bottom: 2px; /* $grid-unit-05 / 2 */\n\toverflow: hidden;\n\topacity: 0;\n\twhite-space: nowrap;\n\ttransition: opacity 0.15s cubic-bezier(0.15, 0, 0.15, 1);\n}\n.editor-avatar.is-badge {\n\tdisplay: inline-grid;\n\tgrid-template-columns: min-content 0fr;\n\tcolumn-gap: 0;\n\tpadding-inline-end: 0;\n\tbackground-color: var(--wp-admin-theme-color, #3858e9);\n\ttransition:\n\t\tgrid-template-columns 0.3s cubic-bezier(0.15, 0, 0.15, 1),\n\t\tcolumn-gap 0.3s cubic-bezier(0.15, 0, 0.15, 1),\n\t\tpadding-inline-end 0.3s cubic-bezier(0.15, 0, 0.15, 1);\n}\n.editor-avatar.is-badge:hover {\n\tgrid-template-columns: min-content 1fr;\n\tcolumn-gap: 4px;\n\tpadding-inline-end: 8px;\n\ttransition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);\n}\n.editor-avatar.is-badge:hover .editor-avatar__name {\n\topacity: 1;\n\ttransition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);\n}\n.editor-avatar.is-badge.has-avatar-border-color {\n\tbackground-color: var(--editor-avatar-outline-color);\n}\n@media (prefers-reduced-motion: reduce) {\n\t.editor-avatar.is-badge,\n\t.editor-avatar__name {\n\t\ttransition: none;\n\t}\n}\n";
11
+ //# sourceMappingURL=avatar-iframe-styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar-iframe-styles.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-overlay/avatar-iframe-styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAgBH,eAAO,MAAM,oBAAoB,kiGA6GhC,CAAC"}
@@ -1,6 +1,21 @@
1
1
  /**
2
- * Compiled CSS value of $elevation-x-small.
3
- * Keep in sync with @wordpress/base-styles/_variables.scss.
2
+ * Compiled values of `@wordpress/base-styles` design tokens, for use in
3
+ * CSS strings injected into the editor canvas iframe where Sass is not
4
+ * available.
5
+ *
6
+ * Keep in sync with `@wordpress/base-styles`.
4
7
  */
5
8
  export declare const ELEVATION_X_SMALL = "0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01)";
9
+ export declare const RADIUS_FULL = "9999px";
10
+ export declare const BUTTON_SIZE_COMPACT = "32px";
11
+ export declare const BUTTON_SIZE_SMALL = "24px";
12
+ export declare const GRID_UNIT_05 = "4px";
13
+ export declare const GRID_UNIT_10 = "8px";
14
+ export declare const BORDER_WIDTH = "1px";
15
+ export declare const BORDER_WIDTH_FOCUS_FALLBACK = "2px";
16
+ export declare const WHITE = "#fff";
17
+ export declare const FONT_SIZE_X_SMALL = "11px";
18
+ export declare const FONT_SIZE_MEDIUM = "13px";
19
+ export declare const FONT_WEIGHT_MEDIUM = "499";
20
+ export declare const FONT_LINE_HEIGHT_SMALL = "20px";
6
21
  //# sourceMappingURL=collaborator-styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"collaborator-styles.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-overlay/collaborator-styles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,iBAAiB,+HAC+F,CAAC"}
1
+ {"version":3,"file":"collaborator-styles.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-overlay/collaborator-styles.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,eAAO,MAAM,iBAAiB,+HAC+F,CAAC;AAG9H,eAAO,MAAM,WAAW,WAAW,CAAC;AAGpC,eAAO,MAAM,mBAAmB,SAAS,CAAC;AAG1C,eAAO,MAAM,iBAAiB,SAAS,CAAC;AAGxC,eAAO,MAAM,YAAY,QAAQ,CAAC;AAGlC,eAAO,MAAM,YAAY,QAAQ,CAAC;AAGlC,eAAO,MAAM,YAAY,QAAQ,CAAC;AAGlC,eAAO,MAAM,2BAA2B,QAAQ,CAAC;AAGjD,eAAO,MAAM,KAAK,SAAS,CAAC;AAG5B,eAAO,MAAM,iBAAiB,SAAS,CAAC;AAGxC,eAAO,MAAM,gBAAgB,SAAS,CAAC;AAGvC,eAAO,MAAM,kBAAkB,QAAQ,CAAC;AAGxC,eAAO,MAAM,sBAAsB,SAAS,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { ResolvedSelection } from '@wordpress/core-data';
2
+ import type { CursorCoords, SelectionRect } from './cursor-dom-utils';
3
+ /** Common parameters passed to cursor/selection computation helpers. */
4
+ interface OverlayContext {
5
+ editorDocument: Document;
6
+ overlayRect: DOMRect;
7
+ }
8
+ /** Result of computing visual cursor/selection state for a single user. */
9
+ export interface SelectionVisual {
10
+ coords?: CursorCoords | null;
11
+ selectionRects?: SelectionRect[];
12
+ }
13
+ /**
14
+ * Compute cursor coords and optional selection rects for a single user's selection.
15
+ *
16
+ * @param selection - The selection state from the awareness layer.
17
+ * @param start - Start position (block clientId + text index).
18
+ * @param end - End position (only for range selections).
19
+ * @param overlayContext - Shared editor document / overlay references.
20
+ * @return Cursor coordinates and optional selection rectangles.
21
+ */
22
+ export declare function computeSelectionVisual(selection: any, start: ResolvedSelection, end: ResolvedSelection | undefined, overlayContext: OverlayContext): SelectionVisual;
23
+ export {};
24
+ //# sourceMappingURL=compute-selection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compute-selection.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-overlay/compute-selection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEX,iBAAiB,EACjB,MAAM,sBAAsB,CAAC;AAU9B,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAMtE,wEAAwE;AACxE,UAAU,cAAc;IACvB,cAAc,EAAE,QAAQ,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;CACrB;AAgBD,2EAA2E;AAC3E,MAAM,WAAW,eAAe;IAC/B,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAC7B,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;CACjC;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACrC,SAAS,EAAE,GAAG,EACd,KAAK,EAAE,iBAAiB,EACxB,GAAG,EAAE,iBAAiB,GAAG,SAAS,EAClC,cAAc,EAAE,cAAc,GAC5B,eAAe,CAiBjB"}
@@ -0,0 +1,72 @@
1
+ export interface SelectionRect {
2
+ x: number;
3
+ y: number;
4
+ width: number;
5
+ height: number;
6
+ }
7
+ export interface CursorCoords {
8
+ x: number;
9
+ y: number;
10
+ height: number;
11
+ }
12
+ /**
13
+ * Given a selection, returns the coordinates of the cursor in the block.
14
+ *
15
+ * @param absolutePositionIndex - The absolute position index
16
+ * @param blockElement - The block element (or null if deleted)
17
+ * @param editorDocument - The editor document
18
+ * @param overlayRect - Pre-computed bounding rect of the overlay element
19
+ * @return The position of the cursor
20
+ */
21
+ export declare const getCursorPosition: (absolutePositionIndex: number | null, blockElement: HTMLElement | null, editorDocument: Document, overlayRect: DOMRect) => CursorCoords | null;
22
+ /**
23
+ * Computes selection highlight rectangles for a text range within a single block.
24
+ *
25
+ * @param blockElement - The block element
26
+ * @param startOffset - Start character offset within the block
27
+ * @param endOffset - End character offset within the block
28
+ * @param editorDocument - The editor document
29
+ * @param overlayRect - Pre-computed bounding rect of the overlay element
30
+ * @return Array of selection rectangles relative to the overlay, or null on failure
31
+ */
32
+ export declare const getSelectionRects: (blockElement: HTMLElement, startOffset: number, endOffset: number, editorDocument: Document, overlayRect: DOMRect) => SelectionRect[] | null;
33
+ /**
34
+ * Computes selection highlight rectangles for the full content of a block.
35
+ * Used for intermediate blocks in a multi-block selection.
36
+ *
37
+ * @param blockElement - The block element
38
+ * @param editorDocument - The editor document
39
+ * @param overlayRect - Pre-computed bounding rect of the overlay element
40
+ * @return Array of selection rectangles relative to the overlay
41
+ */
42
+ export declare const getFullBlockSelectionRects: (blockElement: HTMLElement, editorDocument: Document, overlayRect: DOMRect) => SelectionRect[];
43
+ /**
44
+ * Finds all block elements between two blocks in DOM order (exclusive of start and end).
45
+ *
46
+ * @param startBlockId - The clientId of the start block
47
+ * @param endBlockId - The clientId of the end block
48
+ * @param editorDocument - The editor document
49
+ * @return Array of intermediate block HTMLElements in document order
50
+ */
51
+ export declare const getBlocksBetween: (startBlockId: string, endBlockId: string, editorDocument: Document) => HTMLElement[];
52
+ /**
53
+ * Given a block element and a character offset, returns an exact inner node and offset for use in a range.
54
+ *
55
+ * @param blockElement - The block element
56
+ * @param offset - The character offset
57
+ * @param editorDocument - The editor document
58
+ * @return The node and offset of the character at the offset
59
+ */
60
+ export declare const findInnerBlockOffset: (blockElement: HTMLElement, offset: number, editorDocument: Document) => {
61
+ node: Node;
62
+ offset: number;
63
+ };
64
+ /**
65
+ * Check if node `a` precedes node `b` in document order.
66
+ *
67
+ * @param a - First node.
68
+ * @param b - Second node.
69
+ * @return True if `a` comes before `b`.
70
+ */
71
+ export declare const isNodeBefore: (a: Node, b: Node) => boolean;
72
+ //# sourceMappingURL=cursor-dom-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor-dom-utils.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-overlay/cursor-dom-utils.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC7B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC5B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;CACf;AAID;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,GAC7B,uBAAuB,MAAM,GAAG,IAAI,EACpC,cAAc,WAAW,GAAG,IAAI,EAChC,gBAAgB,QAAQ,EACxB,aAAa,OAAO,KAClB,YAAY,GAAG,IAajB,CAAC;AAqEF;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,GAC7B,cAAc,WAAW,EACzB,aAAa,MAAM,EACnB,WAAW,MAAM,EACjB,gBAAgB,QAAQ,EACxB,aAAa,OAAO,KAClB,aAAa,EAAE,GAAG,IA2DpB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,GACtC,cAAc,WAAW,EACzB,gBAAgB,QAAQ,EACxB,aAAa,OAAO,KAClB,aAAa,EAgCf,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAC5B,cAAc,MAAM,EACpB,YAAY,MAAM,EAClB,gBAAgB,QAAQ,KACtB,WAAW,EA+Bb,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,GAChC,cAAc,WAAW,EACzB,QAAQ,MAAM,EACd,gBAAgB,QAAQ;;;CAgFxB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GAAK,GAAG,IAAI,EAAE,GAAG,IAAI,KAAI,OACkB,CAAC"}
@@ -0,0 +1,36 @@
1
+ interface ScrollToCursorOptions {
2
+ behavior?: ScrollBehavior;
3
+ block?: ScrollLogicalPosition;
4
+ inline?: ScrollLogicalPosition;
5
+ highlightDuration?: number;
6
+ }
7
+ export declare function createCursorRegistry(): {
8
+ /**
9
+ * Register a cursor element when it's created.
10
+ *
11
+ * @param clientId - The clientId of the cursor to register.
12
+ * @param element - The cursor element to register.
13
+ */
14
+ registerCursor(clientId: number, element: HTMLElement): void;
15
+ /**
16
+ * Unregister a cursor element when it's removed.
17
+ *
18
+ * @param clientId - The clientId of the cursor to unregister.
19
+ */
20
+ unregisterCursor(clientId: number): void;
21
+ /**
22
+ * Scroll to a cursor by clientId.
23
+ *
24
+ * @param clientId - The clientId of the cursor to scroll to.
25
+ * @param options - The options for the scroll.
26
+ * @return true if cursor was found and scrolled to, false otherwise.
27
+ */
28
+ scrollToCursor(clientId: number, options?: ScrollToCursorOptions): boolean;
29
+ /**
30
+ * Clear the registry.
31
+ */
32
+ removeAll(): void;
33
+ };
34
+ export type CursorRegistry = ReturnType<typeof createCursorRegistry>;
35
+ export {};
36
+ //# sourceMappingURL=cursor-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor-registry.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-overlay/cursor-registry.ts"],"names":[],"mappings":"AAAA,UAAU,qBAAqB;IAC9B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAC9B,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC3B;AA4BD,wBAAgB,oBAAoB;IAIlC;;;;;OAKG;6BACuB,MAAM,WAAW,WAAW,GAAI,IAAI;IAI9D;;;;OAIG;+BACyB,MAAM,GAAI,IAAI;IAI1C;;;;;;OAMG;6BAEQ,MAAM,YACN,qBAAqB,GAC7B,OAAO;IAoBV;;OAEG;iBACU,IAAI;EAIlB;AAED,MAAM,MAAM,cAAc,GAAG,UAAU,CAAE,OAAO,oBAAoB,CAAE,CAAC"}
@@ -1,14 +1,17 @@
1
+ import { type CursorRegistry } from './cursor-registry';
1
2
  interface Props {
2
3
  postId: number | null;
3
4
  postType: string | null;
5
+ cursorRegistry?: CursorRegistry;
4
6
  }
5
7
  /**
6
8
  * Collaborators Overlay component
7
- * @param props - The props for the CollaboratorsOverlay component
8
- * @param props.postId - The ID of the post
9
- * @param props.postType - The type of the post
9
+ * @param props - The props for the CollaboratorsOverlay component
10
+ * @param props.postId - The ID of the post
11
+ * @param props.postType - The type of the post
12
+ * @param props.cursorRegistry - The shared cursor registry
10
13
  * @return The CollaboratorsOverlay component
11
14
  */
12
- export declare function CollaboratorsOverlay({ postId, postType }: Props): import("react").JSX.Element;
15
+ export declare function CollaboratorsOverlay({ postId, postType, cursorRegistry, }: Props): import("react").JSX.Element;
13
16
  export {};
14
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-overlay/index.tsx"],"names":[],"mappings":"AAcA,UAAU,KAAK;IACd,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,KAAK,+BAgBhE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-overlay/index.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAIxD,UAAU,KAAK;IACd,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,cAAc,CAAC,EAAE,cAAc,CAAC;CAChC;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAE,EACrC,MAAM,EACN,QAAQ,EACR,cAAc,GACd,EAAE,KAAK,+BAiBP"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * CSS for the collaborators overlay — cursor indicators, block highlights,
3
+ * and positioning of Avatar labels inside the editor canvas iframe.
4
+ */
5
+ export declare const OVERLAY_IFRAME_STYLES = "\n.block-canvas-cover {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n\tpointer-events: none;\n\tz-index: 20000;\n}\n.block-canvas-cover .collaborators-overlay-full {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n}\n.block-canvas-cover .collaborators-overlay-fixed {\n\tposition: fixed;\n\twidth: 100%;\n\theight: 100%;\n}\n.collaborators-overlay-user {\n\tposition: absolute;\n}\n/* Cursor lines render below avatar labels across all users. The parent\n .collaborators-overlay-user has no z-index so it does not create a\n stacking context \u2014 children participate in the shared overlay context. */\n.collaborators-overlay-user-cursor {\n\tposition: absolute;\n\tz-index: 0;\n\twidth: 2px;\n\tborder-radius: 1px;\n\toutline: 1px solid #fff;\n\tbox-shadow: 0 1px 1px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 3px rgba(0, 0, 0, 0.02), 0 4px 4px rgba(0, 0, 0, 0.01);\n\tanimation: collaborators-overlay-cursor-blink 1s infinite;\n}\n.collaborators-overlay-selection-rect {\n\tposition: absolute;\n\topacity: 0.15;\n\tpointer-events: none;\n\tborder-radius: 2px;\n}\n\n/* Overlay-specific positioning applied to the Avatar cursor label. */\n.collaborators-overlay-user-label.editor-avatar {\n\tposition: absolute;\n\tz-index: 1;\n\ttransform: translate(-11px, -100%);\n\tmargin-top: -4px;\n\tpointer-events: auto;\n\toverflow: visible;\n\twidth: max-content;\n}\n/* Avatar positioned above a highlighted block as a label. */\n.collaborators-overlay-block-label.editor-avatar {\n\tposition: absolute;\n\tz-index: 1;\n\ttransform: translateY(calc(-100% - 8px));\n\tpointer-events: auto;\n\toverflow: visible;\n\twidth: max-content;\n}\n\n@keyframes collaborators-overlay-cursor-blink {\n\t0%, 45% { opacity: 1; }\n\t55%, 95% { opacity: 0; }\n\t100% { opacity: 1; }\n}\n.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-cursor {\n\tanimation: collaborators-overlay-cursor-highlight 0.6s ease-in-out 3;\n}\n.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-label {\n\tanimation: collaborators-overlay-label-highlight 0.6s ease-in-out 3;\n}\n@keyframes collaborators-overlay-cursor-highlight {\n\t0%, 100% {\n\t\ttransform: scale(1);\n\t\tfilter: drop-shadow(0 0 0 transparent);\n\t}\n\t50% {\n\t\ttransform: scale(1.2);\n\t\tfilter: drop-shadow(0 0 8px currentColor);\n\t}\n}\n@keyframes collaborators-overlay-label-highlight {\n\t0%, 100% {\n\t\ttransform: translate(-11px, -100%) scale(1);\n\t\tfilter: drop-shadow(0 0 0 transparent);\n\t}\n\t50% {\n\t\ttransform: translate(-11px, -100%) scale(1.1);\n\t\tfilter: drop-shadow(0 0 6px currentColor);\n\t}\n}\n.block-editor-block-list__block.is-collaborator-selected:not(:focus)::after {\n\tcontent: \"\";\n\tposition: absolute;\n\tpointer-events: none;\n\ttop: 0;\n\tright: 0;\n\tbottom: 0;\n\tleft: 0;\n\toutline-color: var(--collaborator-outline-color);\n\toutline-style: solid;\n\toutline-width: calc(var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));\n\toutline-offset: calc(-1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));\n\tbox-shadow: inset 0 0 0 calc((var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1)) + 0.5px) rgba(#fff, 0.7);\n\tz-index: 1;\n}\n@media (prefers-reduced-motion: reduce) {\n\t.collaborators-overlay-user-label,\n\t.collaborators-overlay-user-cursor {\n\t\tanimation: none;\n\t}\n}\n";
6
+ //# sourceMappingURL=overlay-iframe-styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overlay-iframe-styles.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-overlay/overlay-iframe-styles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,eAAO,MAAM,qBAAqB,86GAoHjC,CAAC"}
@@ -1,7 +1,9 @@
1
+ import { type CursorRegistry } from './cursor-registry';
1
2
  interface OverlayProps {
2
3
  blockEditorDocument?: Document;
3
4
  postId: number | null;
4
5
  postType: string | null;
6
+ cursorRegistry?: CursorRegistry;
5
7
  }
6
8
  /**
7
9
  * This component is responsible for rendering the overlay components within the editor iframe.
@@ -10,8 +12,9 @@ interface OverlayProps {
10
12
  * @param props.blockEditorDocument - The block editor document.
11
13
  * @param props.postId - The ID of the post.
12
14
  * @param props.postType - The type of the post.
15
+ * @param props.cursorRegistry - The shared cursor registry.
13
16
  * @return The Overlay component.
14
17
  */
15
- export declare function Overlay({ blockEditorDocument, postId, postType, }: OverlayProps): import("react").JSX.Element;
18
+ export declare function Overlay({ blockEditorDocument, postId, postType, cursorRegistry, }: OverlayProps): import("react").JSX.Element;
16
19
  export {};
17
20
  //# sourceMappingURL=overlay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-overlay/overlay.tsx"],"names":[],"mappings":"AAyMA,UAAU,YAAY;IACrB,mBAAmB,CAAC,EAAE,QAAQ,CAAC;IAC/B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAE,EACxB,mBAAmB,EACnB,MAAM,EACN,QAAQ,GACR,EAAE,YAAY,+BA8Dd"}
1
+ {"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-overlay/overlay.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAWxD,UAAU,YAAY;IACrB,mBAAmB,CAAC,EAAE,QAAQ,CAAC;IAC/B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,cAAc,CAAC,EAAE,cAAc,CAAC;CAChC;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAE,EACxB,mBAAmB,EACnB,MAAM,EACN,QAAQ,EACR,cAAc,GACd,EAAE,YAAY,+BAiKd"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Like setInterval but chains setTimeout calls, so the delay is measured from
3
+ * the end of one run to the start of the next. This prevents callbacks from
4
+ * stacking up when the main thread is busy.
5
+ *
6
+ * @param callback The function to call repeatedly.
7
+ * @param delayMs Milliseconds between runs.
8
+ * @return A cleanup function that stops the timer.
9
+ */
10
+ export declare function setDelayedInterval(callback: () => void, delayMs: number): () => void;
11
+ //# sourceMappingURL=timing-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timing-utils.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-overlay/timing-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAE,QAAQ,EAAE,MAAM,IAAI,EAAE,OAAO,EAAE,MAAM,cAoBxE"}
@@ -1,8 +1,24 @@
1
+ export interface BlockHighlightData {
2
+ blockId: string;
3
+ userName: string;
4
+ avatarUrl?: string;
5
+ color: string;
6
+ x: number;
7
+ y: number;
8
+ }
1
9
  /**
2
- * Custom hook for highlighting selected blocks in the editor
3
- * @param blockEditorDocument - Ref to the block editor document, used to directly style block elements.
4
- * @param postId - The ID of the post
5
- * @param postType - The type of the post
10
+ * Custom hook for highlighting selected blocks in the editor and computing
11
+ * their positions for rendering avatar labels in the overlay.
12
+ *
13
+ * @param overlayElement - The overlay element used as position reference.
14
+ * @param blockEditorDocument - Ref to the block editor document.
15
+ * @param postId - The ID of the post.
16
+ * @param postType - The type of the post.
17
+ * @param delayMs - Milliseconds to wait before recomputing highlight positions.
18
+ * @return Highlight data for rendering and a delayed recompute function.
6
19
  */
7
- export declare function useBlockHighlighting(blockEditorDocument: Document | null, postId: number | null, postType: string | null): void;
20
+ export declare function useBlockHighlighting(overlayElement: HTMLElement | null, blockEditorDocument: Document | null, postId: number | null, postType: string | null, delayMs: number): {
21
+ highlights: BlockHighlightData[];
22
+ rerenderHighlightsAfterDelay: () => () => void;
23
+ };
8
24
  //# sourceMappingURL=use-block-highlighting.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-block-highlighting.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-overlay/use-block-highlighting.ts"],"names":[],"mappings":"AAkBA;;;;;GAKG;AACH,wBAAgB,oBAAoB,CACnC,mBAAmB,EAAE,QAAQ,GAAG,IAAI,EACpC,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,QAiGvB"}
1
+ {"version":3,"file":"use-block-highlighting.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-overlay/use-block-highlighting.ts"],"names":[],"mappings":"AAyBA,MAAM,WAAW,kBAAkB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACV;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CACnC,cAAc,EAAE,WAAW,GAAG,IAAI,EAClC,mBAAmB,EAAE,QAAQ,GAAG,IAAI,EACpC,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,OAAO,EAAE,MAAM,GACb;IACF,UAAU,EAAE,kBAAkB,EAAE,CAAC;IACjC,4BAA4B,EAAE,MAAM,MAAM,IAAI,CAAC;CAC/C,CA8JA"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Returns a recompute token and a debounced callback that bumps it.
3
+ * Rapid successive calls cancel the previous pending timeout so only one
4
+ * recompute fires, `delayMs` after the last call.
5
+ *
6
+ * @param delayMs - Milliseconds to wait before bumping the recompute token.
7
+ * @return A tuple of [recomputeToken, rerenderAfterDelay].
8
+ */
9
+ export declare function useDebouncedRecompute(delayMs: number): [number, () => () => void];
10
+ //# sourceMappingURL=use-debounced-recompute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-debounced-recompute.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-overlay/use-debounced-recompute.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,MAAM,GACb,CAAE,MAAM,EAAE,MAAM,MAAM,IAAI,CAAE,CAmB9B"}
@@ -1,3 +1,5 @@
1
+ import type { SelectionRect } from './cursor-dom-utils';
2
+ export type { SelectionRect };
1
3
  export interface CursorData {
2
4
  userName: string;
3
5
  clientId: number;
@@ -6,6 +8,8 @@ export interface CursorData {
6
8
  x: number;
7
9
  y: number;
8
10
  height: number;
11
+ isMe?: boolean;
12
+ selectionRects?: SelectionRect[];
9
13
  }
10
14
  /**
11
15
  * Custom hook that computes cursor positions for each remote user in the editor.
@@ -14,9 +18,10 @@ export interface CursorData {
14
18
  * @param blockEditorDocument - The block editor document
15
19
  * @param postId - The ID of the post
16
20
  * @param postType - The type of the post
21
+ * @param delayMs - Milliseconds to wait before recomputing cursor positions.
17
22
  * @return An array of cursor data for rendering, and a function to trigger a delayed recompute.
18
23
  */
19
- export declare function useRenderCursors(overlayElement: HTMLElement | null, blockEditorDocument: Document | null, postId: number | null, postType: string | null): {
24
+ export declare function useRenderCursors(overlayElement: HTMLElement | null, blockEditorDocument: Document | null, postId: number | null, postType: string | null, delayMs: number): {
20
25
  cursors: CursorData[];
21
26
  rerenderCursorsAfterDelay: () => () => void;
22
27
  };
@@ -1 +1 @@
1
- {"version":3,"file":"use-render-cursors.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-overlay/use-render-cursors.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,UAAU;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC/B,cAAc,EAAE,WAAW,GAAG,IAAI,EAClC,mBAAmB,EAAE,QAAQ,GAAG,IAAI,EACpC,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,GACrB;IAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IAAC,yBAAyB,EAAE,MAAM,MAAM,IAAI,CAAA;CAAE,CAwGxE"}
1
+ {"version":3,"file":"use-render-cursors.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-overlay/use-render-cursors.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AASxD,YAAY,EAAE,aAAa,EAAE,CAAC;AAE9B,MAAM,WAAW,UAAU;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;CACjC;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC/B,cAAc,EAAE,WAAW,GAAG,IAAI,EAClC,mBAAmB,EAAE,QAAQ,GAAG,IAAI,EACpC,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,OAAO,EAAE,MAAM,GACb;IAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IAAC,yBAAyB,EAAE,MAAM,MAAM,IAAI,CAAA;CAAE,CAiIxE"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import type { AvatarProps } from './types';
5
+ declare function Avatar({ className, src, name, label, variant, size, borderColor, dimmed, statusIndicator, style, ...props }: AvatarProps & Omit<React.HTMLAttributes<HTMLDivElement>, keyof AvatarProps>): import("react").JSX.Element;
6
+ export default Avatar;
7
+ //# sourceMappingURL=component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/components/collaborators-presence/avatar/component.tsx"],"names":[],"mappings":"AAeA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAO3C,iBAAS,MAAM,CAAE,EAChB,SAAS,EACT,GAAG,EACH,IAAI,EACJ,KAAK,EACL,OAAO,EACP,IAAgB,EAChB,WAAW,EACX,MAAc,EACd,eAAe,EACf,KAAK,EACL,GAAG,KAAK,EACR,EAAE,WAAW,GACb,IAAI,CAAE,KAAK,CAAC,cAAc,CAAE,cAAc,CAAE,EAAE,MAAM,WAAW,CAAE,+BAkFjE;AAED,eAAe,MAAM,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default } from './component';
2
+ export type { AvatarProps } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/collaborators-presence/avatar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,66 @@
1
+ import type { IconType } from '@wordpress/components';
2
+ export type AvatarProps = {
3
+ /**
4
+ * URL of the avatar image.
5
+ *
6
+ * When not provided, initials derived from `name` are shown.
7
+ */
8
+ src?: string;
9
+ /**
10
+ * Name of the user. Used as an accessible label and to generate
11
+ * initials when no image is provided.
12
+ */
13
+ name?: string;
14
+ /**
15
+ * Visible text shown in the hover badge. When not provided, `name`
16
+ * is used instead. Use this to provide contextual labels like "You"
17
+ * without affecting the accessible name or initials.
18
+ */
19
+ label?: string;
20
+ /**
21
+ * Specifies the avatar's visual style treatment.
22
+ *
23
+ * - `'badge'`: Displays a hover-expand pill that reveals the user's
24
+ * name (or `label`) on hover. Requires `name` to be set.
25
+ *
26
+ * Leave undefined for the default circular avatar.
27
+ */
28
+ variant?: 'badge';
29
+ /**
30
+ * Size of the avatar.
31
+ *
32
+ * - `'default'`: For standalone avatars and list items where the
33
+ * avatar is a primary visual element (e.g. collaborator lists,
34
+ * user profiles).
35
+ * - `'small'`: For inline or compact contexts where space is
36
+ * limited (e.g. cursor labels, toolbars, badges alongside text).
37
+ *
38
+ * @default 'default'
39
+ */
40
+ size?: 'default' | 'small';
41
+ /**
42
+ * CSS color value for an accent border ring around the avatar.
43
+ *
44
+ * When not provided, no border is rendered and the hover badge
45
+ * uses the admin theme color as its background.
46
+ */
47
+ borderColor?: string;
48
+ /**
49
+ * Whether to dim the avatar to indicate an inactive or away state.
50
+ * When true, images are desaturated and faded, and initials are
51
+ * reduced in opacity.
52
+ *
53
+ * @default false
54
+ */
55
+ dimmed?: boolean;
56
+ /**
57
+ * An icon or custom component rendered as a centered overlay on the
58
+ * avatar image. Only visible when `dimmed` is true.
59
+ *
60
+ * Accepts any value supported by the `Icon` component: an icon from
61
+ * `@wordpress/icons`, a Dashicon name string, a component, or a
62
+ * JSX element.
63
+ */
64
+ statusIndicator?: IconType | null;
65
+ };
66
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/collaborators-presence/avatar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,MAAM,WAAW,GAAG;IACzB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC3B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CAClC,CAAC"}
@@ -0,0 +1,17 @@
1
+ export type ImageLoadingStatus = 'idle' | 'loading' | 'loaded' | 'error';
2
+ /**
3
+ * Tracks the loading status of an image URL. Returns the current status and
4
+ * `onLoad`/`onError` callbacks to attach to the `<img>` element.
5
+ *
6
+ * Unlike a side-channel `new Image()` preloader, this hook relies on the
7
+ * native `<img>` element's own events, which avoids cross-browser issues
8
+ * with Safari's privacy features blocking programmatic image requests.
9
+ *
10
+ * @param src - The image URL. When falsy, status is `'idle'`.
11
+ */
12
+ export declare function useImageLoadingStatus(src?: string): {
13
+ status: ImageLoadingStatus;
14
+ handleLoad: () => void;
15
+ handleError: () => void;
16
+ };
17
+ //# sourceMappingURL=use-image-loading-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-image-loading-status.d.ts","sourceRoot":"","sources":["../../../../src/components/collaborators-presence/avatar/use-image-loading-status.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzE;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAE,GAAG,CAAC,EAAE,MAAM;;;;EAkBlD"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import type { AvatarGroupProps } from './types';
5
+ declare function AvatarGroup({ className, max, children, ...props }: AvatarGroupProps & Omit<React.HTMLAttributes<HTMLDivElement>, keyof AvatarGroupProps>): import("react").JSX.Element;
6
+ export default AvatarGroup;
7
+ //# sourceMappingURL=component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../../src/components/collaborators-presence/avatar-group/component.tsx"],"names":[],"mappings":"AAWA;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,iBAAS,WAAW,CAAE,EACrB,SAAS,EACT,GAAO,EACP,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,gBAAgB,GAClB,IAAI,CAAE,KAAK,CAAC,cAAc,CAAE,cAAc,CAAE,EAAE,MAAM,gBAAgB,CAAE,+BA8BtE;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default } from './component';
2
+ export type { AvatarGroupProps } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/collaborators-presence/avatar-group/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,14 @@
1
+ export type AvatarGroupProps = {
2
+ /**
3
+ * Maximum number of avatars to display before showing an
4
+ * overflow indicator.
5
+ *
6
+ * @default 3
7
+ */
8
+ max?: number;
9
+ /**
10
+ * Avatar elements to display in the group.
11
+ */
12
+ children: React.ReactNode;
13
+ };
14
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/collaborators-presence/avatar-group/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC9B;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-presence/index.tsx"],"names":[],"mappings":"AAgBA,OAAO,sCAAsC,CAAC;AAM9C,UAAU,0BAA0B;IACnC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAE,EACtC,MAAM,EACN,QAAQ,GACR,EAAE,0BAA0B,sCAsE5B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-presence/index.tsx"],"names":[],"mappings":"AAgBA,OAAO,sCAAsC,CAAC;AAK9C,UAAU,0BAA0B;IACnC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAE,EACtC,MAAM,EACN,QAAQ,GACR,EAAE,0BAA0B,sCAsG5B"}
@@ -1,18 +1,22 @@
1
1
  import { type PostEditorAwarenessState } from '@wordpress/core-data';
2
+ import { type CursorRegistry } from '../collaborators-overlay/cursor-registry';
2
3
  import './styles/collaborators-list.scss';
3
4
  interface CollaboratorsListProps {
4
5
  activeCollaborators: PostEditorAwarenessState[];
5
6
  popoverAnchor?: HTMLElement | null;
6
7
  setIsPopoverVisible: (isVisible: boolean) => void;
8
+ cursorRegistry: CursorRegistry;
7
9
  }
8
10
  /**
9
11
  * Renders a list showing all active collaborators with their details.
10
- * Note: activeUsers should already exclude the current user (filtered by parent component).
12
+ * When the showCollaborationCursor preference is enabled, the current user
13
+ * is included and expected to be first in the list.
11
14
  * @param props Component props
12
15
  * @param props.activeCollaborators List of active collaborators
13
16
  * @param props.popoverAnchor Anchor element for the popover
14
17
  * @param props.setIsPopoverVisible Callback to set the visibility of the popover
18
+ * @param props.cursorRegistry Shared registry for scroll-to-cursor support
15
19
  */
16
- export declare function CollaboratorsList({ activeCollaborators, popoverAnchor, setIsPopoverVisible, }: CollaboratorsListProps): import("react").JSX.Element;
20
+ export declare function CollaboratorsList({ activeCollaborators, popoverAnchor, setIsPopoverVisible, cursorRegistry, }: CollaboratorsListProps): import("react").JSX.Element;
17
21
  export {};
18
22
  //# sourceMappingURL=list.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-presence/list.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAMrE,OAAO,kCAAkC,CAAC;AAI1C,UAAU,sBAAsB;IAC/B,mBAAmB,EAAE,wBAAwB,EAAE,CAAC;IAChD,aAAa,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACnC,mBAAmB,EAAE,CAAE,SAAS,EAAE,OAAO,KAAM,IAAI,CAAC;CACpD;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAE,EAClC,mBAAmB,EACnB,aAAa,EACb,mBAAmB,GACnB,EAAE,sBAAsB,+BA0DxB"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-presence/list.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAMrE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE/E,OAAO,kCAAkC,CAAC;AAE1C,UAAU,sBAAsB;IAC/B,mBAAmB,EAAE,wBAAwB,EAAE,CAAC;IAChD,aAAa,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACnC,mBAAmB,EAAE,CAAE,SAAS,EAAE,OAAO,KAAM,IAAI,CAAC;IACpD,cAAc,EAAE,cAAc,CAAC;CAC/B;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAE,EAClC,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,cAAc,GACd,EAAE,sBAAsB,+BAsFxB"}