@wordpress/editor 14.40.2-next.v.202602241322.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.
- package/CHANGELOG.md +6 -0
- package/build/components/collab-sidebar/index.cjs +7 -4
- package/build/components/collab-sidebar/index.cjs.map +2 -2
- package/build/components/collab-sidebar/utils.cjs +13 -15
- package/build/components/collab-sidebar/utils.cjs.map +2 -2
- package/build/components/collaborators-overlay/avatar-iframe-styles.cjs +141 -0
- package/build/components/collaborators-overlay/avatar-iframe-styles.cjs.map +7 -0
- package/build/components/collaborators-overlay/collaborator-styles.cjs +38 -2
- package/build/components/collaborators-overlay/collaborator-styles.cjs.map +2 -2
- package/build/components/collaborators-overlay/compute-selection.cjs +185 -0
- package/build/components/collaborators-overlay/compute-selection.cjs.map +7 -0
- package/build/components/collaborators-overlay/cursor-dom-utils.cjs +243 -0
- package/build/components/collaborators-overlay/cursor-dom-utils.cjs.map +7 -0
- package/build/components/collaborators-overlay/cursor-registry.cjs +86 -0
- package/build/components/collaborators-overlay/cursor-registry.cjs.map +7 -0
- package/build/components/collaborators-overlay/index.cjs +7 -2
- package/build/components/collaborators-overlay/index.cjs.map +2 -2
- package/build/components/collaborators-overlay/overlay-iframe-styles.cjs +148 -0
- package/build/components/collaborators-overlay/overlay-iframe-styles.cjs.map +7 -0
- package/build/components/collaborators-overlay/overlay.cjs +146 -236
- package/build/components/collaborators-overlay/overlay.cjs.map +3 -3
- package/build/components/collaborators-overlay/timing-utils.cjs +46 -0
- package/build/components/collaborators-overlay/timing-utils.cjs.map +7 -0
- package/build/components/collaborators-overlay/use-block-highlighting.cjs +91 -42
- package/build/components/collaborators-overlay/use-block-highlighting.cjs.map +2 -2
- package/build/components/collaborators-overlay/use-debounced-recompute.cjs +49 -0
- package/build/components/collaborators-overlay/use-debounced-recompute.cjs.map +7 -0
- package/build/components/collaborators-overlay/use-render-cursors.cjs +82 -172
- package/build/components/collaborators-overlay/use-render-cursors.cjs.map +3 -3
- package/build/components/collaborators-presence/avatar/component.cjs +121 -0
- package/build/components/collaborators-presence/avatar/component.cjs.map +7 -0
- package/build/components/collaborators-presence/avatar/index.cjs +37 -0
- package/build/components/collaborators-presence/avatar/index.cjs.map +7 -0
- package/build/components/collaborators-presence/avatar/types.cjs +19 -0
- package/build/components/collaborators-presence/avatar/types.cjs.map +7 -0
- package/build/components/collaborators-presence/avatar/use-image-loading-status.cjs +44 -0
- package/build/components/collaborators-presence/avatar/use-image-loading-status.cjs.map +7 -0
- package/build/components/collaborators-presence/avatar-group/component.cjs +78 -0
- package/build/components/collaborators-presence/avatar-group/component.cjs.map +7 -0
- package/build/components/collaborators-presence/avatar-group/index.cjs +37 -0
- package/build/components/collaborators-presence/avatar-group/index.cjs.map +7 -0
- package/build/components/collaborators-presence/avatar-group/types.cjs +19 -0
- package/build/components/collaborators-presence/avatar-group/types.cjs.map +7 -0
- package/build/components/collaborators-presence/index.cjs +66 -19
- package/build/components/collaborators-presence/index.cjs.map +3 -3
- package/build/components/collaborators-presence/list.cjs +60 -38
- package/build/components/collaborators-presence/list.cjs.map +3 -3
- package/build/components/collaborators-presence/use-collaborator-notifications.cjs +149 -0
- package/build/components/collaborators-presence/use-collaborator-notifications.cjs.map +7 -0
- package/build/components/editor-interface/index.cjs +11 -6
- package/build/components/editor-interface/index.cjs.map +2 -2
- package/build/components/inserter-sidebar/index.cjs +2 -1
- package/build/components/inserter-sidebar/index.cjs.map +2 -2
- package/build/components/post-last-revision/index.cjs +27 -6
- package/build/components/post-last-revision/index.cjs.map +2 -2
- package/build/components/post-locked-modal/index.cjs +49 -17
- package/build/components/post-locked-modal/index.cjs.map +3 -3
- package/build/components/post-revisions-preview/block-diff.cjs +130 -34
- package/build/components/post-revisions-preview/block-diff.cjs.map +2 -2
- package/build/components/post-revisions-preview/diff-markers.cjs +6 -5
- package/build/components/post-revisions-preview/diff-markers.cjs.map +2 -2
- package/build/components/post-revisions-preview/revisions-canvas.cjs +16 -60
- package/build/components/post-revisions-preview/revisions-canvas.cjs.map +3 -3
- package/build/components/post-revisions-preview/revisions-header.cjs +33 -26
- package/build/components/post-revisions-preview/revisions-header.cjs.map +3 -3
- package/build/components/post-revisions-preview/revisions-slider.cjs +104 -39
- package/build/components/post-revisions-preview/revisions-slider.cjs.map +3 -3
- package/build/components/preferences-modal/index.cjs +36 -4
- package/build/components/preferences-modal/index.cjs.map +2 -2
- package/build/components/provider/disable-non-page-content-blocks.cjs +31 -28
- package/build/components/provider/disable-non-page-content-blocks.cjs.map +3 -3
- package/build/components/provider/index.cjs +17 -5
- package/build/components/provider/index.cjs.map +2 -2
- package/build/components/provider/use-block-editor-settings.cjs +20 -4
- package/build/components/provider/use-block-editor-settings.cjs.map +3 -3
- package/build/components/provider/{use-post-content-blocks.cjs → use-post-content-block-types.cjs} +8 -19
- package/build/components/provider/use-post-content-block-types.cjs.map +7 -0
- package/build/components/provider/use-revision-blocks.cjs +106 -0
- package/build/components/provider/use-revision-blocks.cjs.map +7 -0
- package/build/components/revision-block-diff/index.cjs +61 -0
- package/build/components/revision-block-diff/index.cjs.map +7 -0
- package/build/components/revision-diff-panel/index.cjs +68 -0
- package/build/components/revision-diff-panel/index.cjs.map +7 -0
- package/build/components/revision-fields-diff/index.cjs +96 -0
- package/build/components/revision-fields-diff/index.cjs.map +7 -0
- package/build/components/sidebar/header.cjs +1 -1
- package/build/components/sidebar/header.cjs.map +2 -2
- package/build/components/sidebar/index.cjs +7 -1
- package/build/components/sidebar/index.cjs.map +3 -3
- package/build/components/style-book/index.cjs +4 -3
- package/build/components/style-book/index.cjs.map +2 -2
- package/build/components/sync-connection-error-modal/index.cjs +187 -0
- package/build/components/sync-connection-error-modal/index.cjs.map +7 -0
- package/build/components/sync-connection-error-modal/use-retry-countdown.cjs +84 -0
- package/build/components/sync-connection-error-modal/use-retry-countdown.cjs.map +7 -0
- package/build/components/template-content-panel/index.cjs +35 -31
- package/build/components/template-content-panel/index.cjs.map +3 -3
- package/build/components/template-part-menu-items/convert-to-regular.cjs +54 -11
- package/build/components/template-part-menu-items/convert-to-regular.cjs.map +3 -3
- package/build/components/visual-editor/index.cjs +6 -15
- package/build/components/visual-editor/index.cjs.map +2 -2
- package/build/store/private-actions.cjs +46 -2
- package/build/store/private-actions.cjs.map +2 -2
- package/build/store/private-selectors.cjs +156 -21
- package/build/store/private-selectors.cjs.map +2 -2
- package/build/store/reducer.cjs +27 -0
- package/build/store/reducer.cjs.map +2 -2
- package/build/store/selectors.cjs +0 -14
- package/build/store/selectors.cjs.map +2 -2
- package/build/utils/media-finalize/index.cjs +43 -0
- package/build/utils/media-finalize/index.cjs.map +7 -0
- package/build/utils/media-upload/on-success.cjs +46 -0
- package/build/utils/media-upload/on-success.cjs.map +7 -0
- package/build/utils/sync-error-messages.cjs +32 -15
- package/build/utils/sync-error-messages.cjs.map +3 -3
- package/build-module/components/collab-sidebar/index.mjs +7 -4
- package/build-module/components/collab-sidebar/index.mjs.map +2 -2
- package/build-module/components/collab-sidebar/utils.mjs +13 -15
- package/build-module/components/collab-sidebar/utils.mjs.map +2 -2
- package/build-module/components/collaborators-overlay/avatar-iframe-styles.mjs +128 -0
- package/build-module/components/collaborators-overlay/avatar-iframe-styles.mjs.map +7 -0
- package/build-module/components/collaborators-overlay/collaborator-styles.mjs +25 -1
- package/build-module/components/collaborators-overlay/collaborator-styles.mjs.map +2 -2
- package/build-module/components/collaborators-overlay/compute-selection.mjs +166 -0
- package/build-module/components/collaborators-overlay/compute-selection.mjs.map +7 -0
- package/build-module/components/collaborators-overlay/cursor-dom-utils.mjs +213 -0
- package/build-module/components/collaborators-overlay/cursor-dom-utils.mjs.map +7 -0
- package/build-module/components/collaborators-overlay/cursor-registry.mjs +61 -0
- package/build-module/components/collaborators-overlay/cursor-registry.mjs.map +7 -0
- package/build-module/components/collaborators-overlay/index.mjs +7 -2
- package/build-module/components/collaborators-overlay/index.mjs.map +2 -2
- package/build-module/components/collaborators-overlay/overlay-iframe-styles.mjs +130 -0
- package/build-module/components/collaborators-overlay/overlay-iframe-styles.mjs.map +7 -0
- package/build-module/components/collaborators-overlay/overlay.mjs +137 -237
- package/build-module/components/collaborators-overlay/overlay.mjs.map +2 -2
- package/build-module/components/collaborators-overlay/timing-utils.mjs +21 -0
- package/build-module/components/collaborators-overlay/timing-utils.mjs.map +7 -0
- package/build-module/components/collaborators-overlay/use-block-highlighting.mjs +93 -45
- package/build-module/components/collaborators-overlay/use-block-highlighting.mjs.map +2 -2
- package/build-module/components/collaborators-overlay/use-debounced-recompute.mjs +24 -0
- package/build-module/components/collaborators-overlay/use-debounced-recompute.mjs.map +7 -0
- package/build-module/components/collaborators-overlay/use-render-cursors.mjs +83 -176
- package/build-module/components/collaborators-overlay/use-render-cursors.mjs.map +2 -2
- package/build-module/components/collaborators-presence/avatar/component.mjs +90 -0
- package/build-module/components/collaborators-presence/avatar/component.mjs.map +7 -0
- package/build-module/components/collaborators-presence/avatar/index.mjs +6 -0
- package/build-module/components/collaborators-presence/avatar/index.mjs.map +7 -0
- package/build-module/components/collaborators-presence/avatar/types.mjs +1 -0
- package/build-module/components/collaborators-presence/avatar/types.mjs.map +7 -0
- package/build-module/components/collaborators-presence/avatar/use-image-loading-status.mjs +19 -0
- package/build-module/components/collaborators-presence/avatar/use-image-loading-status.mjs.map +7 -0
- package/build-module/components/collaborators-presence/avatar-group/component.mjs +47 -0
- package/build-module/components/collaborators-presence/avatar-group/component.mjs.map +7 -0
- package/build-module/components/collaborators-presence/avatar-group/index.mjs +6 -0
- package/build-module/components/collaborators-presence/avatar-group/index.mjs.map +7 -0
- package/build-module/components/collaborators-presence/avatar-group/types.mjs +1 -0
- package/build-module/components/collaborators-presence/avatar-group/types.mjs.map +7 -0
- package/build-module/components/collaborators-presence/index.mjs +57 -23
- package/build-module/components/collaborators-presence/index.mjs.map +2 -2
- package/build-module/components/collaborators-presence/list.mjs +52 -44
- package/build-module/components/collaborators-presence/list.mjs.map +2 -2
- package/build-module/components/collaborators-presence/use-collaborator-notifications.mjs +126 -0
- package/build-module/components/collaborators-presence/use-collaborator-notifications.mjs.map +7 -0
- package/build-module/components/editor-interface/index.mjs +12 -7
- package/build-module/components/editor-interface/index.mjs.map +2 -2
- package/build-module/components/inserter-sidebar/index.mjs +2 -1
- package/build-module/components/inserter-sidebar/index.mjs.map +2 -2
- package/build-module/components/post-last-revision/index.mjs +27 -6
- package/build-module/components/post-last-revision/index.mjs.map +2 -2
- package/build-module/components/post-locked-modal/index.mjs +49 -17
- package/build-module/components/post-locked-modal/index.mjs.map +2 -2
- package/build-module/components/post-revisions-preview/block-diff.mjs +130 -34
- package/build-module/components/post-revisions-preview/block-diff.mjs.map +2 -2
- package/build-module/components/post-revisions-preview/diff-markers.mjs +6 -5
- package/build-module/components/post-revisions-preview/diff-markers.mjs.map +2 -2
- package/build-module/components/post-revisions-preview/revisions-canvas.mjs +18 -65
- package/build-module/components/post-revisions-preview/revisions-canvas.mjs.map +2 -2
- package/build-module/components/post-revisions-preview/revisions-header.mjs +36 -33
- package/build-module/components/post-revisions-preview/revisions-header.mjs.map +2 -2
- package/build-module/components/post-revisions-preview/revisions-slider.mjs +112 -42
- package/build-module/components/post-revisions-preview/revisions-slider.mjs.map +2 -2
- package/build-module/components/preferences-modal/index.mjs +36 -4
- package/build-module/components/preferences-modal/index.mjs.map +2 -2
- package/build-module/components/provider/disable-non-page-content-blocks.mjs +31 -28
- package/build-module/components/provider/disable-non-page-content-blocks.mjs.map +2 -2
- package/build-module/components/provider/index.mjs +17 -5
- package/build-module/components/provider/index.mjs.map +2 -2
- package/build-module/components/provider/use-block-editor-settings.mjs +20 -4
- package/build-module/components/provider/use-block-editor-settings.mjs.map +2 -2
- package/build-module/components/provider/use-post-content-block-types.mjs +23 -0
- package/build-module/components/provider/use-post-content-block-types.mjs.map +7 -0
- package/build-module/components/provider/use-revision-blocks.mjs +81 -0
- package/build-module/components/provider/use-revision-blocks.mjs.map +7 -0
- package/build-module/components/revision-block-diff/index.mjs +30 -0
- package/build-module/components/revision-block-diff/index.mjs.map +7 -0
- package/build-module/components/revision-diff-panel/index.mjs +37 -0
- package/build-module/components/revision-diff-panel/index.mjs.map +7 -0
- package/build-module/components/revision-fields-diff/index.mjs +65 -0
- package/build-module/components/revision-fields-diff/index.mjs.map +7 -0
- package/build-module/components/sidebar/header.mjs +1 -1
- package/build-module/components/sidebar/header.mjs.map +2 -2
- package/build-module/components/sidebar/index.mjs +7 -1
- package/build-module/components/sidebar/index.mjs.map +2 -2
- package/build-module/components/style-book/index.mjs +4 -3
- package/build-module/components/style-book/index.mjs.map +2 -2
- package/build-module/components/sync-connection-error-modal/index.mjs +170 -0
- package/build-module/components/sync-connection-error-modal/index.mjs.map +7 -0
- package/build-module/components/sync-connection-error-modal/use-retry-countdown.mjs +59 -0
- package/build-module/components/sync-connection-error-modal/use-retry-countdown.mjs.map +7 -0
- package/build-module/components/template-content-panel/index.mjs +25 -31
- package/build-module/components/template-content-panel/index.mjs.map +2 -2
- package/build-module/components/template-part-menu-items/convert-to-regular.mjs +60 -14
- package/build-module/components/template-part-menu-items/convert-to-regular.mjs.map +2 -2
- package/build-module/components/visual-editor/index.mjs +6 -15
- package/build-module/components/visual-editor/index.mjs.map +2 -2
- package/build-module/store/private-actions.mjs +44 -2
- package/build-module/store/private-actions.mjs.map +2 -2
- package/build-module/store/private-selectors.mjs +155 -21
- package/build-module/store/private-selectors.mjs.map +2 -2
- package/build-module/store/reducer.mjs +25 -0
- package/build-module/store/reducer.mjs.map +2 -2
- package/build-module/store/selectors.mjs +0 -13
- package/build-module/store/selectors.mjs.map +2 -2
- package/build-module/utils/media-finalize/index.mjs +12 -0
- package/build-module/utils/media-finalize/index.mjs.map +7 -0
- package/build-module/utils/media-upload/on-success.mjs +25 -0
- package/build-module/utils/media-upload/on-success.mjs.map +7 -0
- package/build-module/utils/sync-error-messages.mjs +27 -15
- package/build-module/utils/sync-error-messages.mjs.map +3 -3
- package/build-style/style-rtl.css +388 -132
- package/build-style/style.css +388 -132
- package/build-types/components/autocompleters/link.d.ts +8 -0
- package/build-types/components/autocompleters/link.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/add-note-menu-item.d.ts +5 -0
- package/build-types/components/collab-sidebar/add-note-menu-item.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/add-note.d.ts +6 -0
- package/build-types/components/collab-sidebar/add-note.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/board-store.d.ts +9 -0
- package/build-types/components/collab-sidebar/board-store.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/floating-container.d.ts +8 -0
- package/build-types/components/collab-sidebar/floating-container.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/note-byline.d.ts +10 -0
- package/build-types/components/collab-sidebar/note-byline.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/note-card.d.ts +8 -0
- package/build-types/components/collab-sidebar/note-card.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/note-form.d.ts +7 -0
- package/build-types/components/collab-sidebar/note-form.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/note-indicator-toolbar.d.ts +5 -0
- package/build-types/components/collab-sidebar/note-indicator-toolbar.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/note-thread.d.ts +11 -0
- package/build-types/components/collab-sidebar/note-thread.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/note.d.ts +9 -0
- package/build-types/components/collab-sidebar/note.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/notes.d.ts +7 -0
- package/build-types/components/collab-sidebar/notes.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/utils.d.ts.map +1 -1
- package/build-types/components/collaborators-overlay/avatar-iframe-styles.d.ts +11 -0
- package/build-types/components/collaborators-overlay/avatar-iframe-styles.d.ts.map +1 -0
- package/build-types/components/collaborators-overlay/collaborator-styles.d.ts +17 -2
- package/build-types/components/collaborators-overlay/collaborator-styles.d.ts.map +1 -1
- package/build-types/components/collaborators-overlay/compute-selection.d.ts +24 -0
- package/build-types/components/collaborators-overlay/compute-selection.d.ts.map +1 -0
- package/build-types/components/collaborators-overlay/cursor-dom-utils.d.ts +72 -0
- package/build-types/components/collaborators-overlay/cursor-dom-utils.d.ts.map +1 -0
- package/build-types/components/collaborators-overlay/cursor-registry.d.ts +36 -0
- package/build-types/components/collaborators-overlay/cursor-registry.d.ts.map +1 -0
- package/build-types/components/collaborators-overlay/index.d.ts +7 -4
- package/build-types/components/collaborators-overlay/index.d.ts.map +1 -1
- package/build-types/components/collaborators-overlay/overlay-iframe-styles.d.ts +6 -0
- package/build-types/components/collaborators-overlay/overlay-iframe-styles.d.ts.map +1 -0
- package/build-types/components/collaborators-overlay/overlay.d.ts +4 -1
- package/build-types/components/collaborators-overlay/overlay.d.ts.map +1 -1
- package/build-types/components/collaborators-overlay/timing-utils.d.ts +11 -0
- package/build-types/components/collaborators-overlay/timing-utils.d.ts.map +1 -0
- package/build-types/components/collaborators-overlay/use-block-highlighting.d.ts +21 -5
- package/build-types/components/collaborators-overlay/use-block-highlighting.d.ts.map +1 -1
- package/build-types/components/collaborators-overlay/use-debounced-recompute.d.ts +10 -0
- package/build-types/components/collaborators-overlay/use-debounced-recompute.d.ts.map +1 -0
- package/build-types/components/collaborators-overlay/use-render-cursors.d.ts +6 -1
- package/build-types/components/collaborators-overlay/use-render-cursors.d.ts.map +1 -1
- package/build-types/components/collaborators-presence/avatar/component.d.ts +7 -0
- package/build-types/components/collaborators-presence/avatar/component.d.ts.map +1 -0
- package/build-types/components/collaborators-presence/avatar/index.d.ts +3 -0
- package/build-types/components/collaborators-presence/avatar/index.d.ts.map +1 -0
- package/build-types/components/collaborators-presence/avatar/types.d.ts +66 -0
- package/build-types/components/collaborators-presence/avatar/types.d.ts.map +1 -0
- package/build-types/components/collaborators-presence/avatar/use-image-loading-status.d.ts +17 -0
- package/build-types/components/collaborators-presence/avatar/use-image-loading-status.d.ts.map +1 -0
- package/build-types/components/collaborators-presence/avatar-group/component.d.ts +7 -0
- package/build-types/components/collaborators-presence/avatar-group/component.d.ts.map +1 -0
- package/build-types/components/collaborators-presence/avatar-group/index.d.ts +3 -0
- package/build-types/components/collaborators-presence/avatar-group/index.d.ts.map +1 -0
- package/build-types/components/collaborators-presence/avatar-group/types.d.ts +14 -0
- package/build-types/components/collaborators-presence/avatar-group/types.d.ts.map +1 -0
- package/build-types/components/collaborators-presence/index.d.ts.map +1 -1
- package/build-types/components/collaborators-presence/list.d.ts +6 -2
- package/build-types/components/collaborators-presence/list.d.ts.map +1 -1
- package/build-types/components/collaborators-presence/use-collaborator-notifications.d.ts +9 -0
- package/build-types/components/collaborators-presence/use-collaborator-notifications.d.ts.map +1 -0
- package/build-types/components/editor-interface/index.d.ts.map +1 -1
- package/build-types/components/inserter-sidebar/index.d.ts.map +1 -1
- package/build-types/components/media/media-editor-modal.d.ts +15 -0
- package/build-types/components/media/media-editor-modal.d.ts.map +1 -0
- package/build-types/components/post-last-revision/index.d.ts.map +1 -1
- package/build-types/components/post-locked-modal/index.d.ts.map +1 -1
- package/build-types/components/post-revisions-panel/index.d.ts +2 -0
- package/build-types/components/post-revisions-panel/index.d.ts.map +1 -0
- package/build-types/components/post-revisions-preview/block-diff.d.ts.map +1 -1
- package/build-types/components/post-revisions-preview/diff-markers.d.ts.map +1 -1
- package/build-types/components/post-revisions-preview/revisions-canvas.d.ts +2 -5
- package/build-types/components/post-revisions-preview/revisions-canvas.d.ts.map +1 -1
- package/build-types/components/post-revisions-preview/revisions-header.d.ts.map +1 -1
- package/build-types/components/post-revisions-preview/revisions-slider.d.ts +1 -1
- package/build-types/components/post-revisions-preview/revisions-slider.d.ts.map +1 -1
- package/build-types/components/post-text-editor/utils.d.ts +29 -0
- package/build-types/components/post-text-editor/utils.d.ts.map +1 -0
- package/build-types/components/provider/disable-non-page-content-blocks.d.ts.map +1 -1
- package/build-types/components/provider/index.d.ts.map +1 -1
- package/build-types/components/provider/use-block-editor-settings.d.ts.map +1 -1
- package/build-types/components/provider/use-network-reconnect.d.ts +8 -0
- package/build-types/components/provider/use-network-reconnect.d.ts.map +1 -0
- package/build-types/components/provider/use-post-content-block-types.d.ts +9 -0
- package/build-types/components/provider/use-post-content-block-types.d.ts.map +1 -0
- package/build-types/components/provider/use-revision-blocks.d.ts +10 -0
- package/build-types/components/provider/use-revision-blocks.d.ts.map +1 -0
- package/build-types/components/revision-block-diff/index.d.ts +6 -0
- package/build-types/components/revision-block-diff/index.d.ts.map +1 -0
- package/build-types/components/revision-diff-panel/index.d.ts +14 -0
- package/build-types/components/revision-diff-panel/index.d.ts.map +1 -0
- package/build-types/components/revision-fields-diff/index.d.ts +6 -0
- package/build-types/components/revision-fields-diff/index.d.ts.map +1 -0
- package/build-types/components/sidebar/dataform-post-summary.d.ts +4 -0
- package/build-types/components/sidebar/dataform-post-summary.d.ts.map +1 -0
- package/build-types/components/sidebar/index.d.ts.map +1 -1
- package/build-types/components/sidebar/post-revision-summary.d.ts +2 -0
- package/build-types/components/sidebar/post-revision-summary.d.ts.map +1 -0
- package/build-types/components/style-book/index.d.ts +2 -1
- package/build-types/components/style-book/index.d.ts.map +1 -1
- package/build-types/components/sync-connection-error-modal/index.d.ts +8 -0
- package/build-types/components/sync-connection-error-modal/index.d.ts.map +1 -0
- package/build-types/components/sync-connection-error-modal/use-retry-countdown.d.ts +11 -0
- package/build-types/components/sync-connection-error-modal/use-retry-countdown.d.ts.map +1 -0
- package/build-types/components/template-actions-panel/block-theme-content.d.ts +2 -0
- package/build-types/components/template-actions-panel/block-theme-content.d.ts.map +1 -0
- package/build-types/components/template-actions-panel/classic-theme-content.d.ts +2 -0
- package/build-types/components/template-actions-panel/classic-theme-content.d.ts.map +1 -0
- package/build-types/components/template-actions-panel/index.d.ts +2 -0
- package/build-types/components/template-actions-panel/index.d.ts.map +1 -0
- package/build-types/components/template-content-panel/index.d.ts.map +1 -1
- package/build-types/components/template-part-menu-items/convert-to-regular.d.ts.map +1 -1
- package/build-types/components/upload-progress-snackbar/index.d.ts +19 -0
- package/build-types/components/upload-progress-snackbar/index.d.ts.map +1 -0
- package/build-types/components/upload-progress-snackbar/stories/index.story.d.ts +28 -0
- package/build-types/components/upload-progress-snackbar/stories/index.story.d.ts.map +1 -0
- package/build-types/components/upload-progress-snackbar/tracker.d.ts +41 -0
- package/build-types/components/upload-progress-snackbar/tracker.d.ts.map +1 -0
- package/build-types/components/visual-editor/index.d.ts.map +1 -1
- package/build-types/store/private-actions.d.ts +12 -0
- package/build-types/store/private-actions.d.ts.map +1 -1
- package/build-types/store/private-selectors.d.ts +45 -0
- package/build-types/store/private-selectors.d.ts.map +1 -1
- package/build-types/store/reducer.d.ts +21 -0
- package/build-types/store/reducer.d.ts.map +1 -1
- package/build-types/store/selectors.d.ts +0 -10
- package/build-types/store/selectors.d.ts.map +1 -1
- package/build-types/utils/media-delete/index.d.ts +2 -0
- package/build-types/utils/media-delete/index.d.ts.map +1 -0
- package/build-types/utils/media-finalize/index.d.ts +2 -0
- package/build-types/utils/media-finalize/index.d.ts.map +1 -0
- package/build-types/utils/media-upload/on-success.d.ts +9 -0
- package/build-types/utils/media-upload/on-success.d.ts.map +1 -0
- package/build-types/utils/sync-error-messages.d.ts +17 -3
- package/build-types/utils/sync-error-messages.d.ts.map +1 -1
- package/package.json +45 -44
- package/src/components/collab-sidebar/index.js +7 -4
- package/src/components/collab-sidebar/utils.js +9 -10
- package/src/components/collaborators-overlay/avatar-iframe-styles.ts +134 -0
- package/src/components/collaborators-overlay/collaborator-styles.ts +43 -2
- package/src/components/collaborators-overlay/compute-selection.ts +315 -0
- package/src/components/collaborators-overlay/cursor-dom-utils.ts +382 -0
- package/src/components/collaborators-overlay/cursor-registry.ts +96 -0
- package/src/components/collaborators-overlay/index.tsx +12 -4
- package/src/components/collaborators-overlay/overlay-iframe-styles.ts +131 -0
- package/src/components/collaborators-overlay/overlay.tsx +145 -229
- package/src/components/collaborators-overlay/timing-utils.ts +30 -0
- package/src/components/collaborators-overlay/use-block-highlighting.ts +152 -64
- package/src/components/collaborators-overlay/use-debounced-recompute.ts +32 -0
- package/src/components/collaborators-overlay/use-render-cursors.ts +120 -282
- package/src/components/collaborators-presence/avatar/component.tsx +123 -0
- package/src/components/collaborators-presence/avatar/index.ts +2 -0
- package/src/components/collaborators-presence/avatar/styles.scss +184 -0
- package/src/components/collaborators-presence/avatar/test/index.tsx +389 -0
- package/src/components/collaborators-presence/avatar/types.ts +66 -0
- package/src/components/collaborators-presence/avatar/use-image-loading-status.ts +36 -0
- package/src/components/collaborators-presence/avatar-group/component.tsx +55 -0
- package/src/components/collaborators-presence/avatar-group/index.ts +2 -0
- package/src/components/collaborators-presence/avatar-group/styles.scss +33 -0
- package/src/components/collaborators-presence/avatar-group/test/index.tsx +139 -0
- package/src/components/collaborators-presence/avatar-group/types.ts +13 -0
- package/src/components/collaborators-presence/index.tsx +43 -12
- package/src/components/collaborators-presence/list.tsx +68 -40
- package/src/components/collaborators-presence/styles/collaborators-list.scss +26 -19
- package/src/components/collaborators-presence/styles/collaborators-presence.scss +6 -2
- package/src/components/collaborators-presence/test/use-collaborator-notifications.ts +397 -0
- package/src/components/collaborators-presence/use-collaborator-notifications.ts +203 -0
- package/src/components/document-bar/style.scss +1 -1
- package/src/components/editor-interface/index.js +13 -6
- package/src/components/inserter-sidebar/index.js +4 -1
- package/src/components/post-last-revision/index.js +35 -6
- package/src/components/post-last-revision/style.scss +0 -3
- package/src/components/post-locked-modal/index.js +69 -25
- package/src/components/post-panel-row/style.scss +1 -0
- package/src/components/post-revisions-preview/block-diff.js +224 -61
- package/src/components/post-revisions-preview/diff-markers.js +15 -12
- package/src/components/post-revisions-preview/revisions-canvas.js +23 -86
- package/src/components/post-revisions-preview/revisions-header.js +35 -37
- package/src/components/post-revisions-preview/revisions-slider.js +138 -62
- package/src/components/post-revisions-preview/style.scss +3 -3
- package/src/components/post-revisions-preview/test/block-diff.js +202 -35
- package/src/components/preferences-modal/index.js +37 -7
- package/src/components/provider/disable-non-page-content-blocks.js +42 -40
- package/src/components/provider/index.js +20 -2
- package/src/components/provider/use-block-editor-settings.js +21 -1
- package/src/components/provider/use-post-content-block-types.js +30 -0
- package/src/components/provider/use-revision-blocks.js +105 -0
- package/src/components/revision-block-diff/index.js +39 -0
- package/src/components/revision-diff-panel/index.js +59 -0
- package/src/components/revision-diff-panel/style.scss +13 -0
- package/src/components/revision-fields-diff/index.js +91 -0
- package/src/components/sidebar/header.js +1 -1
- package/src/components/sidebar/index.js +4 -0
- package/src/components/style-book/index.js +4 -2
- package/src/components/sync-connection-error-modal/index.tsx +253 -0
- package/src/components/sync-connection-error-modal/style.scss +14 -0
- package/src/components/sync-connection-error-modal/use-retry-countdown.ts +93 -0
- package/src/components/template-content-panel/index.js +30 -38
- package/src/components/template-part-menu-items/convert-to-regular.js +74 -12
- package/src/components/visual-editor/index.js +6 -23
- package/src/store/private-actions.js +70 -1
- package/src/store/private-selectors.js +216 -28
- package/src/store/reducer.js +41 -0
- package/src/store/selectors.js +0 -19
- package/src/style.scss +4 -1
- package/src/utils/media-finalize/index.js +11 -0
- package/src/utils/media-finalize/test/index.js +34 -0
- package/src/utils/media-upload/on-success.js +34 -0
- package/src/utils/sync-error-messages.ts +72 -0
- package/src/utils/test/sync-error-messages.js +34 -0
- package/build/components/provider/use-post-content-blocks.cjs.map +0 -7
- package/build/components/sync-connection-modal/index.cjs +0 -130
- package/build/components/sync-connection-modal/index.cjs.map +0 -7
- package/build-module/components/provider/use-post-content-blocks.mjs +0 -34
- package/build-module/components/provider/use-post-content-blocks.mjs.map +0 -7
- package/build-module/components/sync-connection-modal/index.mjs +0 -114
- package/build-module/components/sync-connection-modal/index.mjs.map +0 -7
- package/build-types/components/provider/use-post-content-blocks.d.ts +0 -2
- package/build-types/components/provider/use-post-content-blocks.d.ts.map +0 -1
- package/build-types/components/sync-connection-modal/index.d.ts +0 -8
- package/build-types/components/sync-connection-modal/index.d.ts.map +0 -1
- package/src/components/provider/use-post-content-blocks.js +0 -42
- package/src/components/sync-connection-modal/index.js +0 -140
- package/src/components/sync-connection-modal/style.scss +0 -11
- package/src/utils/sync-error-messages.js +0 -53
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../src/components/autocompleters/link.js"],"names":[],"mappings":"AAUA;;;;GAIG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-note-menu-item.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/add-note-menu-item.js"],"names":[],"mappings":"AAiEA,wBAAgB,eAAe,CAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE;;;CAAA,+BAe9D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-note.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/add-note.js"],"names":[],"mappings":"AAuBA,wBAAgB,OAAO,CAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE;;;;CAAA,sCAuE1D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function createBoardStore(): {
|
|
2
|
+
subscribe(listener: any): () => void;
|
|
3
|
+
getSnapshot(): {};
|
|
4
|
+
registerThread(id: any, blockEl: any, floatingEl: any): void;
|
|
5
|
+
unregisterThread(id: any): void;
|
|
6
|
+
getBlockRects(): any;
|
|
7
|
+
getFirstBlockElement(): any;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=board-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"board-store.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/board-store.js"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB;;;;;;;EAoF/B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function FloatingContainer({ floating, className, style, children, ...props }: {
|
|
2
|
+
[x: string]: any;
|
|
3
|
+
children: any;
|
|
4
|
+
className: any;
|
|
5
|
+
floating: any;
|
|
6
|
+
style: any;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=floating-container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floating-container.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/floating-container.js"],"names":[],"mappings":"AAUA,wBAAgB,iBAAiB,CAAE,EAClC,QAAQ,EACR,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACR;;;;;;CAAA,+BAaA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/index.js"],"names":[],"mappings":"AA6PA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/index.js"],"names":[],"mappings":"AA6PA,oFA0BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"note-byline.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/note-byline.js"],"names":[],"mappings":"AAAA;;GAEG;AAmBH,wBAAgB,UAAU,CAAE,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE;;;;;CAAA,+BA6FzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"note-card.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/note-card.js"],"names":[],"mappings":"AAWA,wBAAgB,QAAQ,CAAE,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE;;;;;;CAAA,+BAwBzE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"note-form.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/note-form.js"],"names":[],"mappings":"AAuBA,wBAAgB,QAAQ,CAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;;;;;CAAA,+BAuE7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"note-indicator-toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/note-indicator-toolbar.js"],"names":[],"mappings":"AAwEA,wBAAgB,mBAAmB,CAAE,EAAE,OAAO,EAAE,IAAI,EAAE;;;CAAA,sCA8CrD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function NoteThread({ note, onEditNote, onAddReply, onDeleteNote, isSelected, sidebarRef, floating, onKeyDown }: {
|
|
2
|
+
floating: any;
|
|
3
|
+
isSelected: any;
|
|
4
|
+
note: any;
|
|
5
|
+
onAddReply: any;
|
|
6
|
+
onDeleteNote: any;
|
|
7
|
+
onEditNote: any;
|
|
8
|
+
onKeyDown: any;
|
|
9
|
+
sidebarRef: any;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=note-thread.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"note-thread.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/note-thread.js"],"names":[],"mappings":"AAsCA,wBAAgB,UAAU,CAAE,EAC3B,IAAI,EACJ,UAAU,EACV,UAAU,EACV,YAAY,EACZ,UAAU,EACV,UAAU,EACV,QAAQ,EACR,SAAS,EACT;;;;;;;;;CAAA,+BA6SA"}
|
|
@@ -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 @@
|
|
|
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;
|
|
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
|
|
3
|
-
*
|
|
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
|
|
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
|
|
8
|
-
* @param props.postId
|
|
9
|
-
* @param props.postType
|
|
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":"
|
|
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":"
|
|
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
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* @param
|
|
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):
|
|
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":"
|
|
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":"
|
|
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 @@
|
|
|
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"}
|