@wordpress/editor 14.41.0 → 14.41.2-next.v.202603161435.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +181 -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/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 +100 -229
- package/build/components/collaborators-overlay/overlay.cjs.map +3 -3
- package/build/components/collaborators-overlay/use-block-highlighting.cjs +90 -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 +80 -171
- 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 +54 -17
- package/build/components/collaborators-presence/index.cjs.map +3 -3
- package/build/components/collaborators-presence/list.cjs +43 -37
- package/build/components/collaborators-presence/list.cjs.map +3 -3
- package/build/components/collaborators-presence/use-collaborator-notifications.cjs +79 -107
- package/build/components/collaborators-presence/use-collaborator-notifications.cjs.map +3 -3
- package/build/components/editor-interface/index.cjs +9 -6
- package/build/components/editor-interface/index.cjs.map +2 -2
- package/build/components/entities-saved-states/hooks/use-is-dirty.cjs +14 -5
- package/build/components/entities-saved-states/hooks/use-is-dirty.cjs.map +2 -2
- package/build/components/global-styles/index.cjs +15 -24
- package/build/components/global-styles/index.cjs.map +3 -3
- package/build/components/global-styles-sidebar/index.cjs +6 -3
- package/build/components/global-styles-sidebar/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/page-attributes/parent.cjs +2 -1
- package/build/components/page-attributes/parent.cjs.map +2 -2
- package/build/components/post-revisions-preview/revisions-canvas.cjs +8 -58
- package/build/components/post-revisions-preview/revisions-canvas.cjs.map +3 -3
- package/build/components/post-revisions-preview/revisions-slider.cjs +5 -1
- package/build/components/post-revisions-preview/revisions-slider.cjs.map +2 -2
- package/build/components/post-url/panel.cjs +1 -0
- package/build/components/post-url/panel.cjs.map +2 -2
- package/build/components/preferences-modal/index.cjs +24 -0
- 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 +21 -6
- 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/sidebar/dataform-post-summary.cjs +182 -0
- package/build/components/sidebar/dataform-post-summary.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/post-summary.cjs +11 -0
- package/build/components/sidebar/post-summary.cjs.map +3 -3
- package/build/components/sync-connection-modal/index.cjs +8 -5
- package/build/components/sync-connection-modal/index.cjs.map +2 -2
- package/build/components/template-content-panel/index.cjs +35 -31
- package/build/components/template-content-panel/index.cjs.map +3 -3
- package/build/components/visual-editor/index.cjs +1 -1
- package/build/components/visual-editor/index.cjs.map +2 -2
- package/build/dataviews/store/private-actions.cjs +4 -0
- package/build/dataviews/store/private-actions.cjs.map +2 -2
- package/build/store/private-actions.cjs +11 -2
- package/build/store/private-actions.cjs.map +2 -2
- package/build/store/private-selectors.cjs +52 -13
- package/build/store/private-selectors.cjs.map +2 -2
- package/build/store/reducer.cjs +12 -0
- package/build/store/reducer.cjs.map +2 -2
- package/build/utils/media-upload/on-success.cjs +46 -0
- package/build/utils/media-upload/on-success.cjs.map +7 -0
- 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 +162 -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/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 +91 -230
- package/build-module/components/collaborators-overlay/overlay.mjs.map +2 -2
- package/build-module/components/collaborators-overlay/use-block-highlighting.mjs +91 -43
- 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 +81 -172
- 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 +45 -21
- package/build-module/components/collaborators-presence/index.mjs.map +2 -2
- package/build-module/components/collaborators-presence/list.mjs +35 -43
- package/build-module/components/collaborators-presence/list.mjs.map +2 -2
- package/build-module/components/collaborators-presence/use-collaborator-notifications.mjs +80 -108
- package/build-module/components/collaborators-presence/use-collaborator-notifications.mjs.map +2 -2
- package/build-module/components/editor-interface/index.mjs +10 -7
- package/build-module/components/editor-interface/index.mjs.map +2 -2
- package/build-module/components/entities-saved-states/hooks/use-is-dirty.mjs +14 -5
- package/build-module/components/entities-saved-states/hooks/use-is-dirty.mjs.map +2 -2
- package/build-module/components/global-styles/index.mjs +15 -24
- package/build-module/components/global-styles/index.mjs.map +2 -2
- package/build-module/components/global-styles-sidebar/index.mjs +6 -3
- package/build-module/components/global-styles-sidebar/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/page-attributes/parent.mjs +2 -1
- package/build-module/components/page-attributes/parent.mjs.map +2 -2
- package/build-module/components/post-revisions-preview/revisions-canvas.mjs +10 -63
- package/build-module/components/post-revisions-preview/revisions-canvas.mjs.map +2 -2
- package/build-module/components/post-revisions-preview/revisions-slider.mjs +5 -1
- package/build-module/components/post-revisions-preview/revisions-slider.mjs.map +2 -2
- package/build-module/components/post-url/panel.mjs +1 -0
- package/build-module/components/post-url/panel.mjs.map +2 -2
- package/build-module/components/preferences-modal/index.mjs +24 -0
- 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 +21 -6
- 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/sidebar/dataform-post-summary.mjs +151 -0
- package/build-module/components/sidebar/dataform-post-summary.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/post-summary.mjs +11 -0
- package/build-module/components/sidebar/post-summary.mjs.map +2 -2
- package/build-module/components/sync-connection-modal/index.mjs +8 -5
- package/build-module/components/sync-connection-modal/index.mjs.map +2 -2
- 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/visual-editor/index.mjs +1 -1
- package/build-module/components/visual-editor/index.mjs.map +2 -2
- package/build-module/dataviews/store/private-actions.mjs +8 -1
- package/build-module/dataviews/store/private-actions.mjs.map +2 -2
- package/build-module/store/private-actions.mjs +10 -2
- package/build-module/store/private-actions.mjs.map +2 -2
- package/build-module/store/private-selectors.mjs +50 -12
- package/build-module/store/private-selectors.mjs.map +2 -2
- package/build-module/store/reducer.mjs +11 -0
- package/build-module/store/reducer.mjs.map +2 -2
- 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-style/style-rtl.css +961 -159
- package/build-style/style.css +961 -159
- package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
- 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/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.map +1 -1
- 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 +2 -1
- package/build-types/components/collaborators-presence/list.d.ts.map +1 -1
- package/build-types/components/collaborators-presence/use-collaborator-notifications.d.ts.map +1 -1
- package/build-types/components/editor-interface/index.d.ts.map +1 -1
- package/build-types/components/entities-saved-states/hooks/use-is-dirty.d.ts.map +1 -1
- package/build-types/components/global-styles/index.d.ts +2 -1
- package/build-types/components/global-styles/index.d.ts.map +1 -1
- package/build-types/components/global-styles-sidebar/index.d.ts.map +1 -1
- package/build-types/components/inserter-sidebar/index.d.ts.map +1 -1
- package/build-types/components/page-attributes/parent.d.ts.map +1 -1
- package/build-types/components/post-author/hook.d.ts +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-slider.d.ts.map +1 -1
- 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-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/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/post-summary.d.ts.map +1 -1
- package/build-types/components/sync-connection-modal/index.d.ts.map +1 -1
- package/build-types/components/template-content-panel/index.d.ts.map +1 -1
- package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
- package/build-types/store/private-actions.d.ts +7 -0
- package/build-types/store/private-actions.d.ts.map +1 -1
- package/build-types/store/private-selectors.d.ts +7 -0
- package/build-types/store/private-selectors.d.ts.map +1 -1
- package/build-types/store/reducer.d.ts +14 -3
- package/build-types/store/reducer.d.ts.map +1 -1
- 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/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 +307 -0
- package/src/components/collaborators-overlay/cursor-dom-utils.ts +382 -0
- package/src/components/collaborators-overlay/overlay-iframe-styles.ts +131 -0
- package/src/components/collaborators-overlay/overlay.tsx +86 -226
- package/src/components/collaborators-overlay/use-block-highlighting.ts +147 -63
- package/src/components/collaborators-overlay/use-debounced-recompute.ts +32 -0
- package/src/components/collaborators-overlay/use-render-cursors.ts +113 -279
- 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 +34 -11
- package/src/components/collaborators-presence/list.tsx +44 -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 +188 -246
- package/src/components/collaborators-presence/use-collaborator-notifications.ts +109 -166
- package/src/components/document-bar/style.scss +1 -1
- package/src/components/editor-interface/index.js +8 -6
- package/src/components/entities-saved-states/hooks/use-is-dirty.js +14 -5
- package/src/components/global-styles/index.js +20 -27
- package/src/components/global-styles-sidebar/index.js +3 -0
- package/src/components/inserter-sidebar/index.js +4 -1
- package/src/components/page-attributes/parent.js +2 -1
- package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +2 -2
- package/src/components/post-revisions-preview/revisions-canvas.js +15 -84
- package/src/components/post-revisions-preview/revisions-slider.js +6 -1
- package/src/components/post-url/panel.js +1 -0
- package/src/components/post-url/style.scss +5 -0
- package/src/components/preferences-modal/index.js +18 -0
- 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 +24 -8
- 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/sidebar/dataform-post-summary.js +170 -0
- package/src/components/sidebar/header.js +1 -1
- package/src/components/sidebar/post-summary.js +15 -0
- package/src/components/sync-connection-modal/index.js +12 -6
- package/src/components/sync-connection-modal/style.scss +5 -0
- package/src/components/template-content-panel/index.js +30 -38
- package/src/components/visual-editor/index.js +1 -1
- package/src/dataviews/store/private-actions.ts +14 -0
- package/src/store/private-actions.js +21 -2
- package/src/store/private-selectors.js +75 -10
- package/src/store/reducer.js +19 -0
- package/src/style.scss +3 -0
- package/src/utils/media-upload/on-success.js +34 -0
- package/build/components/provider/use-post-content-blocks.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-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/src/components/provider/use-post-content-blocks.js +0 -42
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS for the collaborators overlay — cursor indicators, block highlights,
|
|
3
|
+
* and positioning of Avatar labels inside the editor canvas iframe.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
BORDER_WIDTH,
|
|
8
|
+
BORDER_WIDTH_FOCUS_FALLBACK,
|
|
9
|
+
ELEVATION_X_SMALL,
|
|
10
|
+
GRID_UNIT_05,
|
|
11
|
+
GRID_UNIT_10,
|
|
12
|
+
WHITE,
|
|
13
|
+
} from './collaborator-styles';
|
|
14
|
+
|
|
15
|
+
export const OVERLAY_IFRAME_STYLES = `
|
|
16
|
+
.block-canvas-cover {
|
|
17
|
+
position: absolute;
|
|
18
|
+
top: 0;
|
|
19
|
+
left: 0;
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
z-index: 20000;
|
|
24
|
+
}
|
|
25
|
+
.block-canvas-cover .collaborators-overlay-full {
|
|
26
|
+
position: absolute;
|
|
27
|
+
top: 0;
|
|
28
|
+
left: 0;
|
|
29
|
+
width: 100%;
|
|
30
|
+
height: 100%;
|
|
31
|
+
}
|
|
32
|
+
.block-canvas-cover .collaborators-overlay-fixed {
|
|
33
|
+
position: fixed;
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 100%;
|
|
36
|
+
}
|
|
37
|
+
.collaborators-overlay-user {
|
|
38
|
+
position: absolute;
|
|
39
|
+
}
|
|
40
|
+
/* Cursor lines render below avatar labels across all users. The parent
|
|
41
|
+
.collaborators-overlay-user has no z-index so it does not create a
|
|
42
|
+
stacking context — children participate in the shared overlay context. */
|
|
43
|
+
.collaborators-overlay-user-cursor {
|
|
44
|
+
position: absolute;
|
|
45
|
+
z-index: 0;
|
|
46
|
+
width: ${ BORDER_WIDTH_FOCUS_FALLBACK };
|
|
47
|
+
border-radius: ${ BORDER_WIDTH };
|
|
48
|
+
outline: ${ BORDER_WIDTH } solid ${ WHITE };
|
|
49
|
+
box-shadow: ${ ELEVATION_X_SMALL };
|
|
50
|
+
animation: collaborators-overlay-cursor-blink 1s infinite;
|
|
51
|
+
}
|
|
52
|
+
.collaborators-overlay-selection-rect {
|
|
53
|
+
position: absolute;
|
|
54
|
+
opacity: 0.15;
|
|
55
|
+
pointer-events: none;
|
|
56
|
+
border-radius: 2px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Overlay-specific positioning applied to the Avatar cursor label. */
|
|
60
|
+
.collaborators-overlay-user-label.editor-avatar {
|
|
61
|
+
position: absolute;
|
|
62
|
+
z-index: 1;
|
|
63
|
+
transform: translate(-11px, -100%);
|
|
64
|
+
margin-top: -${ GRID_UNIT_05 };
|
|
65
|
+
pointer-events: auto;
|
|
66
|
+
overflow: visible;
|
|
67
|
+
width: max-content;
|
|
68
|
+
}
|
|
69
|
+
/* Avatar positioned above a highlighted block as a label. */
|
|
70
|
+
.collaborators-overlay-block-label.editor-avatar {
|
|
71
|
+
position: absolute;
|
|
72
|
+
z-index: 1;
|
|
73
|
+
transform: translateY(calc(-100% - ${ GRID_UNIT_10 }));
|
|
74
|
+
pointer-events: auto;
|
|
75
|
+
overflow: visible;
|
|
76
|
+
width: max-content;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@keyframes collaborators-overlay-cursor-blink {
|
|
80
|
+
0%, 45% { opacity: 1; }
|
|
81
|
+
55%, 95% { opacity: 0; }
|
|
82
|
+
100% { opacity: 1; }
|
|
83
|
+
}
|
|
84
|
+
.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-cursor {
|
|
85
|
+
animation: collaborators-overlay-cursor-highlight 0.6s ease-in-out 3;
|
|
86
|
+
}
|
|
87
|
+
.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-label {
|
|
88
|
+
animation: collaborators-overlay-label-highlight 0.6s ease-in-out 3;
|
|
89
|
+
}
|
|
90
|
+
@keyframes collaborators-overlay-cursor-highlight {
|
|
91
|
+
0%, 100% {
|
|
92
|
+
transform: scale(1);
|
|
93
|
+
filter: drop-shadow(0 0 0 transparent);
|
|
94
|
+
}
|
|
95
|
+
50% {
|
|
96
|
+
transform: scale(1.2);
|
|
97
|
+
filter: drop-shadow(0 0 8px currentColor);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
@keyframes collaborators-overlay-label-highlight {
|
|
101
|
+
0%, 100% {
|
|
102
|
+
transform: translate(-11px, -100%) scale(1);
|
|
103
|
+
filter: drop-shadow(0 0 0 transparent);
|
|
104
|
+
}
|
|
105
|
+
50% {
|
|
106
|
+
transform: translate(-11px, -100%) scale(1.1);
|
|
107
|
+
filter: drop-shadow(0 0 6px currentColor);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
.block-editor-block-list__block.is-collaborator-selected:not(:focus)::after {
|
|
111
|
+
content: "";
|
|
112
|
+
position: absolute;
|
|
113
|
+
pointer-events: none;
|
|
114
|
+
top: 0;
|
|
115
|
+
right: 0;
|
|
116
|
+
bottom: 0;
|
|
117
|
+
left: 0;
|
|
118
|
+
outline-color: var(--collaborator-outline-color);
|
|
119
|
+
outline-style: solid;
|
|
120
|
+
outline-width: calc(var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
|
|
121
|
+
outline-offset: calc(-1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
|
|
122
|
+
box-shadow: inset 0 0 0 calc(var(--wp-admin-border-width-focus, ${ BORDER_WIDTH_FOCUS_FALLBACK }) + ${ BORDER_WIDTH }) ${ WHITE }, 0 0 0 ${ BORDER_WIDTH } ${ WHITE }, ${ ELEVATION_X_SMALL };
|
|
123
|
+
z-index: 1;
|
|
124
|
+
}
|
|
125
|
+
@media (prefers-reduced-motion: reduce) {
|
|
126
|
+
.collaborators-overlay-user-label,
|
|
127
|
+
.collaborators-overlay-user-cursor {
|
|
128
|
+
animation: none;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
`;
|
|
@@ -1,203 +1,14 @@
|
|
|
1
|
-
import { privateApis as componentsPrivateApis } from '@wordpress/components';
|
|
2
1
|
import { useResizeObserver, useMergeRefs } from '@wordpress/compose';
|
|
3
|
-
import { useEffect, useState } from '@wordpress/element';
|
|
2
|
+
import { useCallback, useEffect, useState } from '@wordpress/element';
|
|
3
|
+
import { __ } from '@wordpress/i18n';
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import Avatar from '../collaborators-presence/avatar';
|
|
6
|
+
import { AVATAR_IFRAME_STYLES } from './avatar-iframe-styles';
|
|
7
|
+
import { OVERLAY_IFRAME_STYLES } from './overlay-iframe-styles';
|
|
6
8
|
import { useBlockHighlighting } from './use-block-highlighting';
|
|
7
9
|
import { useRenderCursors } from './use-render-cursors';
|
|
8
|
-
import { ELEVATION_X_SMALL } from './collaborator-styles';
|
|
9
10
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
// wp-components styles are excluded from the editor canvas iframe, so the
|
|
13
|
-
// Avatar component's SCSS is not available there. We inject compiled versions
|
|
14
|
-
// of the relevant rules alongside the overlay-specific positioning styles.
|
|
15
|
-
const COLLABORATORS_OVERLAY_STYLES = `
|
|
16
|
-
.block-canvas-cover {
|
|
17
|
-
position: absolute;
|
|
18
|
-
top: 0;
|
|
19
|
-
left: 0;
|
|
20
|
-
width: 100%;
|
|
21
|
-
height: 100%;
|
|
22
|
-
pointer-events: none;
|
|
23
|
-
z-index: 20000;
|
|
24
|
-
}
|
|
25
|
-
.block-canvas-cover .collaborators-overlay-full {
|
|
26
|
-
position: absolute;
|
|
27
|
-
top: 0;
|
|
28
|
-
left: 0;
|
|
29
|
-
width: 100%;
|
|
30
|
-
height: 100%;
|
|
31
|
-
}
|
|
32
|
-
.block-canvas-cover .collaborators-overlay-fixed {
|
|
33
|
-
position: fixed;
|
|
34
|
-
width: 100%;
|
|
35
|
-
height: 100%;
|
|
36
|
-
}
|
|
37
|
-
.collaborators-overlay-user {
|
|
38
|
-
position: absolute;
|
|
39
|
-
}
|
|
40
|
-
.collaborators-overlay-user-cursor {
|
|
41
|
-
position: absolute;
|
|
42
|
-
width: 2px;
|
|
43
|
-
border-radius: 1px;
|
|
44
|
-
outline: 1px solid #fff;
|
|
45
|
-
box-shadow: ${ ELEVATION_X_SMALL };
|
|
46
|
-
animation: collaborators-overlay-cursor-blink 1s infinite;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/* ── Avatar component (compiled from packages/components/src/avatar/styles.scss) ── */
|
|
50
|
-
.components-avatar {
|
|
51
|
-
display: inline-flex;
|
|
52
|
-
align-items: center;
|
|
53
|
-
border-radius: 9999px;
|
|
54
|
-
overflow: clip;
|
|
55
|
-
flex-shrink: 0;
|
|
56
|
-
background-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
57
|
-
box-shadow: 0 0 0 var(--wp-admin-border-width-focus, 2px) #fff, ${ ELEVATION_X_SMALL };
|
|
58
|
-
}
|
|
59
|
-
.components-avatar__image {
|
|
60
|
-
box-sizing: border-box;
|
|
61
|
-
position: relative;
|
|
62
|
-
width: 32px;
|
|
63
|
-
height: 32px;
|
|
64
|
-
border-radius: 9999px;
|
|
65
|
-
border: 0;
|
|
66
|
-
background-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
67
|
-
overflow: clip;
|
|
68
|
-
flex-shrink: 0;
|
|
69
|
-
font-size: 0;
|
|
70
|
-
color: #fff;
|
|
71
|
-
}
|
|
72
|
-
.is-small > .components-avatar__image {
|
|
73
|
-
width: 24px;
|
|
74
|
-
height: 24px;
|
|
75
|
-
}
|
|
76
|
-
.has-src > .components-avatar__image {
|
|
77
|
-
background-image: var(--components-avatar-url);
|
|
78
|
-
background-size: cover;
|
|
79
|
-
background-position: center;
|
|
80
|
-
}
|
|
81
|
-
.has-avatar-border-color > .components-avatar__image {
|
|
82
|
-
border: var(--wp-admin-border-width-focus, 2px) solid var(--components-avatar-outline-color);
|
|
83
|
-
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus, 2px) #fff;
|
|
84
|
-
background-clip: padding-box;
|
|
85
|
-
}
|
|
86
|
-
.components-avatar:not(.has-src) > .components-avatar__image {
|
|
87
|
-
display: flex;
|
|
88
|
-
align-items: center;
|
|
89
|
-
justify-content: center;
|
|
90
|
-
font-size: 11px;
|
|
91
|
-
font-weight: 499;
|
|
92
|
-
border: 0;
|
|
93
|
-
box-shadow: none;
|
|
94
|
-
background-clip: border-box;
|
|
95
|
-
}
|
|
96
|
-
.components-avatar:not(.has-src).has-avatar-border-color > .components-avatar__image {
|
|
97
|
-
background-color: var(--components-avatar-outline-color);
|
|
98
|
-
}
|
|
99
|
-
.components-avatar__name {
|
|
100
|
-
font-size: 13px;
|
|
101
|
-
line-height: 20px;
|
|
102
|
-
color: #fff;
|
|
103
|
-
min-width: 0;
|
|
104
|
-
padding-bottom: 2px;
|
|
105
|
-
overflow: hidden;
|
|
106
|
-
opacity: 0;
|
|
107
|
-
white-space: nowrap;
|
|
108
|
-
transition: opacity 0.15s cubic-bezier(0.15, 0, 0.15, 1);
|
|
109
|
-
}
|
|
110
|
-
.components-avatar.has-badge {
|
|
111
|
-
display: inline-grid;
|
|
112
|
-
grid-template-columns: min-content 0fr;
|
|
113
|
-
column-gap: 0;
|
|
114
|
-
padding-inline-end: 0;
|
|
115
|
-
transition:
|
|
116
|
-
grid-template-columns 0.3s cubic-bezier(0.15, 0, 0.15, 1),
|
|
117
|
-
column-gap 0.3s cubic-bezier(0.15, 0, 0.15, 1),
|
|
118
|
-
padding-inline-end 0.3s cubic-bezier(0.15, 0, 0.15, 1);
|
|
119
|
-
}
|
|
120
|
-
.components-avatar.has-badge:hover {
|
|
121
|
-
grid-template-columns: min-content 1fr;
|
|
122
|
-
column-gap: 4px;
|
|
123
|
-
padding-inline-end: 8px;
|
|
124
|
-
transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);
|
|
125
|
-
}
|
|
126
|
-
.components-avatar.has-badge:hover .components-avatar__name {
|
|
127
|
-
opacity: 1;
|
|
128
|
-
transition-timing-function: cubic-bezier(0.85, 0, 0.85, 1);
|
|
129
|
-
}
|
|
130
|
-
.components-avatar.has-badge.has-avatar-border-color {
|
|
131
|
-
background-color: var(--components-avatar-outline-color);
|
|
132
|
-
}
|
|
133
|
-
/* ── end Avatar ── */
|
|
134
|
-
|
|
135
|
-
/* Overlay-specific positioning applied to the Avatar cursor label. */
|
|
136
|
-
.collaborators-overlay-user-label.components-avatar {
|
|
137
|
-
position: absolute;
|
|
138
|
-
transform: translate(-11px, -100%);
|
|
139
|
-
margin-top: -4px;
|
|
140
|
-
pointer-events: auto;
|
|
141
|
-
overflow: visible;
|
|
142
|
-
width: max-content;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
@keyframes collaborators-overlay-cursor-blink {
|
|
146
|
-
0%, 45% { opacity: 1; }
|
|
147
|
-
55%, 95% { opacity: 0; }
|
|
148
|
-
100% { opacity: 1; }
|
|
149
|
-
}
|
|
150
|
-
.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-cursor {
|
|
151
|
-
animation: collaborators-overlay-cursor-highlight 0.6s ease-in-out 3;
|
|
152
|
-
}
|
|
153
|
-
.collaborators-overlay-cursor-highlighted .collaborators-overlay-user-label {
|
|
154
|
-
animation: collaborators-overlay-label-highlight 0.6s ease-in-out 3;
|
|
155
|
-
}
|
|
156
|
-
@keyframes collaborators-overlay-cursor-highlight {
|
|
157
|
-
0%, 100% {
|
|
158
|
-
transform: scale(1);
|
|
159
|
-
filter: drop-shadow(0 0 0 transparent);
|
|
160
|
-
}
|
|
161
|
-
50% {
|
|
162
|
-
transform: scale(1.2);
|
|
163
|
-
filter: drop-shadow(0 0 8px currentColor);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
@keyframes collaborators-overlay-label-highlight {
|
|
167
|
-
0%, 100% {
|
|
168
|
-
transform: translate(-11px, -100%) scale(1);
|
|
169
|
-
filter: drop-shadow(0 0 0 transparent);
|
|
170
|
-
}
|
|
171
|
-
50% {
|
|
172
|
-
transform: translate(-11px, -100%) scale(1.1);
|
|
173
|
-
filter: drop-shadow(0 0 6px currentColor);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
.block-editor-block-list__block.is-collaborator-selected:not(:focus)::after {
|
|
177
|
-
content: "";
|
|
178
|
-
position: absolute;
|
|
179
|
-
pointer-events: none;
|
|
180
|
-
top: 0;
|
|
181
|
-
right: 0;
|
|
182
|
-
bottom: 0;
|
|
183
|
-
left: 0;
|
|
184
|
-
outline-color: var(--collaborator-outline-color);
|
|
185
|
-
outline-style: solid;
|
|
186
|
-
outline-width: calc(var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
|
|
187
|
-
outline-offset: calc(-1 * var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
|
|
188
|
-
box-shadow: inset 0 0 0 calc(var(--wp-admin-border-width-focus, 2px) + 1px) #fff, 0 0 0 1px #fff, ${ ELEVATION_X_SMALL };
|
|
189
|
-
z-index: 1;
|
|
190
|
-
}
|
|
191
|
-
@media (prefers-reduced-motion: reduce) {
|
|
192
|
-
.components-avatar.has-badge,
|
|
193
|
-
.components-avatar__name,
|
|
194
|
-
.collaborators-overlay-user-label,
|
|
195
|
-
.collaborators-overlay-user-cursor {
|
|
196
|
-
transition: none;
|
|
197
|
-
animation: none;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
`;
|
|
11
|
+
const RERENDER_DELAY_MS = 500;
|
|
201
12
|
|
|
202
13
|
interface OverlayProps {
|
|
203
14
|
blockEditorDocument?: Document;
|
|
@@ -227,13 +38,35 @@ export function Overlay( {
|
|
|
227
38
|
overlayElement,
|
|
228
39
|
blockEditorDocument ?? null,
|
|
229
40
|
postId ?? null,
|
|
230
|
-
postType ?? null
|
|
41
|
+
postType ?? null,
|
|
42
|
+
RERENDER_DELAY_MS
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const { highlights, rerenderHighlightsAfterDelay } = useBlockHighlighting(
|
|
46
|
+
overlayElement,
|
|
47
|
+
blockEditorDocument ?? null,
|
|
48
|
+
postId ?? null,
|
|
49
|
+
postType ?? null,
|
|
50
|
+
RERENDER_DELAY_MS
|
|
231
51
|
);
|
|
232
52
|
|
|
233
53
|
// Detect layout changes on overlay (e.g. turning on "Show Template") and window
|
|
234
|
-
// resizes, and re-render the cursors.
|
|
235
|
-
const
|
|
236
|
-
|
|
54
|
+
// resizes, and re-render the cursors and block highlights.
|
|
55
|
+
const onResize = useCallback( () => {
|
|
56
|
+
rerenderCursorsAfterDelay();
|
|
57
|
+
rerenderHighlightsAfterDelay();
|
|
58
|
+
}, [ rerenderCursorsAfterDelay, rerenderHighlightsAfterDelay ] );
|
|
59
|
+
const resizeObserverRef = useResizeObserver( onResize );
|
|
60
|
+
|
|
61
|
+
// Trigger the initial position computation on mount.
|
|
62
|
+
useEffect( () => {
|
|
63
|
+
const cleanupCursors = rerenderCursorsAfterDelay();
|
|
64
|
+
const cleanupHighlights = rerenderHighlightsAfterDelay();
|
|
65
|
+
return () => {
|
|
66
|
+
cleanupCursors();
|
|
67
|
+
cleanupHighlights();
|
|
68
|
+
};
|
|
69
|
+
}, [ rerenderCursorsAfterDelay, rerenderHighlightsAfterDelay ] );
|
|
237
70
|
|
|
238
71
|
// Merge the refs to use the same element for both overlay and resize observation
|
|
239
72
|
const mergedRef = useMergeRefs< HTMLDivElement | null >( [
|
|
@@ -241,43 +74,70 @@ export function Overlay( {
|
|
|
241
74
|
resizeObserverRef,
|
|
242
75
|
] );
|
|
243
76
|
|
|
244
|
-
useBlockHighlighting(
|
|
245
|
-
blockEditorDocument ?? null,
|
|
246
|
-
postId ?? null,
|
|
247
|
-
postType ?? null
|
|
248
|
-
);
|
|
249
|
-
|
|
250
77
|
// This is a full overlay that covers the entire iframe document. Good for
|
|
251
78
|
// scrollable elements like cursor indicators.
|
|
252
79
|
return (
|
|
253
80
|
<div className="collaborators-overlay-full" ref={ mergedRef }>
|
|
254
|
-
<style>{
|
|
81
|
+
<style>{ AVATAR_IFRAME_STYLES + OVERLAY_IFRAME_STYLES }</style>
|
|
255
82
|
{ cursors.map( ( cursor ) => (
|
|
256
|
-
<div
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
83
|
+
<div key={ cursor.clientId }>
|
|
84
|
+
{ ! cursor.isMe &&
|
|
85
|
+
cursor.selectionRects?.map( ( rect, index ) => (
|
|
86
|
+
<div
|
|
87
|
+
key={ `${ cursor.clientId }-sel-${ index }` }
|
|
88
|
+
className="collaborators-overlay-selection-rect"
|
|
89
|
+
style={ {
|
|
90
|
+
left: `${ rect.x }px`,
|
|
91
|
+
top: `${ rect.y }px`,
|
|
92
|
+
width: `${ rect.width }px`,
|
|
93
|
+
height: `${ rect.height }px`,
|
|
94
|
+
backgroundColor: cursor.color,
|
|
95
|
+
} }
|
|
96
|
+
/>
|
|
97
|
+
) ) }
|
|
264
98
|
<div
|
|
265
|
-
className="collaborators-overlay-user
|
|
99
|
+
className="collaborators-overlay-user"
|
|
266
100
|
style={ {
|
|
267
|
-
|
|
268
|
-
|
|
101
|
+
left: `${ cursor.x }px`,
|
|
102
|
+
top: `${ cursor.y }px`,
|
|
269
103
|
} }
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
104
|
+
>
|
|
105
|
+
{ ! cursor.isMe && (
|
|
106
|
+
<div
|
|
107
|
+
className="collaborators-overlay-user-cursor"
|
|
108
|
+
style={ {
|
|
109
|
+
backgroundColor: cursor.color,
|
|
110
|
+
height: `${ cursor.height }px`,
|
|
111
|
+
} }
|
|
112
|
+
/>
|
|
113
|
+
) }
|
|
114
|
+
<Avatar
|
|
115
|
+
className="collaborators-overlay-user-label"
|
|
116
|
+
variant="badge"
|
|
117
|
+
size="small"
|
|
118
|
+
src={ cursor.avatarUrl }
|
|
119
|
+
name={ cursor.userName }
|
|
120
|
+
label={ cursor.isMe ? __( 'You' ) : undefined }
|
|
121
|
+
borderColor={ cursor.color }
|
|
122
|
+
/>
|
|
123
|
+
</div>
|
|
279
124
|
</div>
|
|
280
125
|
) ) }
|
|
126
|
+
{ highlights.map( ( highlight ) => (
|
|
127
|
+
<Avatar
|
|
128
|
+
key={ highlight.blockId }
|
|
129
|
+
className="collaborators-overlay-block-label"
|
|
130
|
+
variant="badge"
|
|
131
|
+
size="small"
|
|
132
|
+
src={ highlight.avatarUrl }
|
|
133
|
+
name={ highlight.userName }
|
|
134
|
+
borderColor={ highlight.color }
|
|
135
|
+
style={ {
|
|
136
|
+
left: `${ highlight.x }px`,
|
|
137
|
+
top: `${ highlight.y }px`,
|
|
138
|
+
} }
|
|
139
|
+
/>
|
|
140
|
+
) ) }
|
|
281
141
|
</div>
|
|
282
142
|
);
|
|
283
143
|
}
|