@wordpress/editor 14.42.0 → 14.43.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 +2 -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 +1 -1
- package/build/components/collaborators-overlay/overlay-iframe-styles.cjs.map +2 -2
- package/build/components/collaborators-overlay/overlay.cjs +31 -1
- package/build/components/collaborators-overlay/overlay.cjs.map +2 -2
- package/build/components/collaborators-presence/index.cjs +14 -4
- package/build/components/collaborators-presence/index.cjs.map +2 -2
- package/build/components/collaborators-presence/list.cjs +20 -4
- package/build/components/collaborators-presence/list.cjs.map +2 -2
- package/build/components/post-card-panel/index.cjs +4 -15
- package/build/components/post-card-panel/index.cjs.map +2 -2
- package/build/components/post-content-information/index.cjs +10 -13
- package/build/components/post-content-information/index.cjs.map +2 -2
- package/build/components/post-revisions-panel/index.cjs +164 -0
- package/build/components/post-revisions-panel/index.cjs.map +7 -0
- package/build/components/post-revisions-preview/revisions-slider.cjs +24 -5
- package/build/components/post-revisions-preview/revisions-slider.cjs.map +2 -2
- package/build/components/post-template/create-new-template-modal.cjs +39 -46
- package/build/components/post-template/create-new-template-modal.cjs.map +2 -2
- package/build/components/post-template/hooks.cjs +52 -6
- package/build/components/post-template/hooks.cjs.map +2 -2
- package/build/components/post-template/swap-template-button.cjs +31 -20
- package/build/components/post-template/swap-template-button.cjs.map +2 -2
- package/build/components/preferences-modal/index.cjs +35 -27
- package/build/components/preferences-modal/index.cjs.map +2 -2
- package/build/components/revision-block-diff/index.cjs +9 -32
- package/build/components/revision-block-diff/index.cjs.map +3 -3
- 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/dataform-post-summary.cjs +8 -53
- package/build/components/sidebar/dataform-post-summary.cjs.map +2 -2
- package/build/components/sidebar/index.cjs +25 -22
- package/build/components/sidebar/index.cjs.map +3 -3
- package/build/components/sidebar/post-revision-summary.cjs +74 -0
- package/build/components/sidebar/post-revision-summary.cjs.map +7 -0
- package/build/components/sidebar/post-summary.cjs +35 -42
- package/build/components/sidebar/post-summary.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 +2 -2
- package/build/components/sync-connection-error-modal/index.cjs.map +1 -1
- package/build/components/template-actions-panel/block-theme-content.cjs +188 -0
- package/build/components/template-actions-panel/block-theme-content.cjs.map +7 -0
- package/build/components/template-actions-panel/classic-theme-content.cjs +159 -0
- package/build/components/template-actions-panel/classic-theme-content.cjs.map +7 -0
- package/build/components/template-actions-panel/index.cjs +59 -0
- package/build/components/template-actions-panel/index.cjs.map +7 -0
- package/build/dataviews/store/private-actions.cjs +2 -0
- package/build/dataviews/store/private-actions.cjs.map +2 -2
- package/build/store/private-actions.cjs +21 -2
- package/build/store/private-actions.cjs.map +2 -2
- package/build/store/private-selectors.cjs +40 -15
- package/build/store/private-selectors.cjs.map +2 -2
- 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 +1 -1
- package/build-module/components/collaborators-overlay/overlay-iframe-styles.mjs.map +2 -2
- package/build-module/components/collaborators-overlay/overlay.mjs +32 -2
- package/build-module/components/collaborators-overlay/overlay.mjs.map +2 -2
- package/build-module/components/collaborators-presence/index.mjs +14 -4
- package/build-module/components/collaborators-presence/index.mjs.map +2 -2
- package/build-module/components/collaborators-presence/list.mjs +20 -4
- package/build-module/components/collaborators-presence/list.mjs.map +2 -2
- package/build-module/components/post-card-panel/index.mjs +6 -17
- package/build-module/components/post-card-panel/index.mjs.map +2 -2
- package/build-module/components/post-content-information/index.mjs +6 -13
- package/build-module/components/post-content-information/index.mjs.map +2 -2
- package/build-module/components/post-revisions-panel/index.mjs +139 -0
- package/build-module/components/post-revisions-panel/index.mjs.map +7 -0
- package/build-module/components/post-revisions-preview/revisions-slider.mjs +24 -5
- package/build-module/components/post-revisions-preview/revisions-slider.mjs.map +2 -2
- package/build-module/components/post-template/create-new-template-modal.mjs +39 -46
- package/build-module/components/post-template/create-new-template-modal.mjs.map +2 -2
- package/build-module/components/post-template/hooks.mjs +53 -7
- package/build-module/components/post-template/hooks.mjs.map +2 -2
- package/build-module/components/post-template/swap-template-button.mjs +27 -20
- package/build-module/components/post-template/swap-template-button.mjs.map +2 -2
- package/build-module/components/preferences-modal/index.mjs +35 -27
- package/build-module/components/preferences-modal/index.mjs.map +2 -2
- package/build-module/components/revision-block-diff/index.mjs +9 -32
- package/build-module/components/revision-block-diff/index.mjs.map +2 -2
- 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/dataform-post-summary.mjs +8 -53
- package/build-module/components/sidebar/dataform-post-summary.mjs.map +2 -2
- package/build-module/components/sidebar/index.mjs +25 -22
- package/build-module/components/sidebar/index.mjs.map +2 -2
- package/build-module/components/sidebar/post-revision-summary.mjs +43 -0
- package/build-module/components/sidebar/post-revision-summary.mjs.map +7 -0
- package/build-module/components/sidebar/post-summary.mjs +31 -42
- package/build-module/components/sidebar/post-summary.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 +2 -2
- package/build-module/components/sync-connection-error-modal/index.mjs.map +1 -1
- package/build-module/components/template-actions-panel/block-theme-content.mjs +167 -0
- package/build-module/components/template-actions-panel/block-theme-content.mjs.map +7 -0
- package/build-module/components/template-actions-panel/classic-theme-content.mjs +138 -0
- package/build-module/components/template-actions-panel/classic-theme-content.mjs.map +7 -0
- package/build-module/components/template-actions-panel/index.mjs +28 -0
- package/build-module/components/template-actions-panel/index.mjs.map +7 -0
- package/build-module/dataviews/store/private-actions.mjs +5 -1
- package/build-module/dataviews/store/private-actions.mjs.map +2 -2
- package/build-module/store/private-actions.mjs +21 -2
- package/build-module/store/private-actions.mjs.map +2 -2
- package/build-module/store/private-selectors.mjs +40 -15
- package/build-module/store/private-selectors.mjs.map +2 -2
- package/build-style/style-rtl.css +111 -42
- package/build-style/style.css +111 -42
- 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 +1 -1
- package/build-types/components/collaborators-overlay/overlay-iframe-styles.d.ts.map +1 -1
- 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-presence/index.d.ts.map +1 -1
- package/build-types/components/collaborators-presence/list.d.ts +4 -1
- package/build-types/components/collaborators-presence/list.d.ts.map +1 -1
- package/build-types/components/post-card-panel/index.d.ts.map +1 -1
- package/build-types/components/post-content-information/index.d.ts +4 -1
- package/build-types/components/post-content-information/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/revisions-slider.d.ts.map +1 -1
- package/build-types/components/post-template/create-new-template-modal.d.ts.map +1 -1
- package/build-types/components/post-template/hooks.d.ts +1 -1
- package/build-types/components/post-template/hooks.d.ts.map +1 -1
- package/build-types/components/post-template/swap-template-button.d.ts +4 -0
- package/build-types/components/post-template/swap-template-button.d.ts.map +1 -1
- package/build-types/components/revision-block-diff/index.d.ts.map +1 -1
- 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.map +1 -1
- 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/sidebar/post-summary.d.ts +3 -0
- package/build-types/components/sidebar/post-summary.d.ts.map +1 -1
- 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/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/dataviews/store/private-actions.d.ts.map +1 -1
- package/build-types/store/private-actions.d.ts.map +1 -1
- package/build-types/store/private-selectors.d.ts.map +1 -1
- package/package.json +45 -44
- 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 +1 -1
- package/src/components/collaborators-overlay/overlay.tsx +45 -1
- package/src/components/collaborators-presence/index.tsx +9 -1
- package/src/components/collaborators-presence/list.tsx +25 -1
- package/src/components/post-card-panel/index.js +7 -21
- package/src/components/post-content-information/index.js +5 -16
- package/src/components/post-revisions-panel/index.js +151 -0
- package/src/components/post-revisions-panel/style.scss +16 -0
- package/src/components/post-revisions-preview/revisions-slider.js +29 -7
- package/src/components/post-template/create-new-template-modal.js +1 -4
- package/src/components/post-template/hooks.js +65 -9
- package/src/components/post-template/style.scss +0 -6
- package/src/components/post-template/swap-template-button.js +30 -21
- package/src/components/preferences-modal/index.js +37 -25
- package/src/components/revision-block-diff/index.js +8 -43
- package/src/components/revision-diff-panel/index.js +59 -0
- package/src/components/revision-fields-diff/index.js +91 -0
- package/src/components/sidebar/dataform-post-summary.js +8 -55
- package/src/components/sidebar/index.js +33 -22
- package/src/components/sidebar/post-revision-summary.js +50 -0
- package/src/components/sidebar/post-summary.js +22 -40
- package/src/components/sidebar/style.scss +7 -0
- package/src/components/style-book/index.js +4 -2
- package/src/components/sync-connection-error-modal/index.tsx +2 -2
- package/src/components/template-actions-panel/block-theme-content.js +196 -0
- package/src/components/template-actions-panel/classic-theme-content.js +170 -0
- package/src/components/template-actions-panel/index.js +32 -0
- package/src/components/template-actions-panel/style.scss +39 -0
- package/src/dataviews/store/private-actions.ts +6 -0
- package/src/store/private-actions.js +24 -3
- package/src/store/private-selectors.js +46 -16
- package/src/style.scss +3 -1
- /package/src/components/{revision-block-diff → revision-diff-panel}/style.scss +0 -0
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* CSS for the collaborators overlay — cursor indicators, block highlights,
|
|
3
3
|
* and positioning of Avatar labels inside the editor canvas iframe.
|
|
4
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
|
|
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
6
|
//# sourceMappingURL=overlay-iframe-styles.d.ts.map
|
|
@@ -1 +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,
|
|
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,+BAkKd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-presence/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-presence/index.tsx"],"names":[],"mappings":"AAgBA,OAAO,sCAAsC,CAAC;AAK9C,UAAU,0BAA0B;IACnC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAE,EACtC,MAAM,EACN,QAAQ,GACR,EAAE,0BAA0B,sCAsG5B"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type PostEditorAwarenessState } from '@wordpress/core-data';
|
|
2
|
+
import { type CursorRegistry } from '../collaborators-overlay/cursor-registry';
|
|
2
3
|
import './styles/collaborators-list.scss';
|
|
3
4
|
interface CollaboratorsListProps {
|
|
4
5
|
activeCollaborators: PostEditorAwarenessState[];
|
|
5
6
|
popoverAnchor?: HTMLElement | null;
|
|
6
7
|
setIsPopoverVisible: (isVisible: boolean) => void;
|
|
8
|
+
cursorRegistry: CursorRegistry;
|
|
7
9
|
}
|
|
8
10
|
/**
|
|
9
11
|
* Renders a list showing all active collaborators with their details.
|
|
@@ -13,7 +15,8 @@ interface CollaboratorsListProps {
|
|
|
13
15
|
* @param props.activeCollaborators List of active collaborators
|
|
14
16
|
* @param props.popoverAnchor Anchor element for the popover
|
|
15
17
|
* @param props.setIsPopoverVisible Callback to set the visibility of the popover
|
|
18
|
+
* @param props.cursorRegistry Shared registry for scroll-to-cursor support
|
|
16
19
|
*/
|
|
17
|
-
export declare function CollaboratorsList({ activeCollaborators, popoverAnchor, setIsPopoverVisible, }: CollaboratorsListProps): import("react").JSX.Element;
|
|
20
|
+
export declare function CollaboratorsList({ activeCollaborators, popoverAnchor, setIsPopoverVisible, cursorRegistry, }: CollaboratorsListProps): import("react").JSX.Element;
|
|
18
21
|
export {};
|
|
19
22
|
//# sourceMappingURL=list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-presence/list.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAMrE,OAAO,kCAAkC,CAAC;AAE1C,UAAU,sBAAsB;IAC/B,mBAAmB,EAAE,wBAAwB,EAAE,CAAC;IAChD,aAAa,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACnC,mBAAmB,EAAE,CAAE,SAAS,EAAE,OAAO,KAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/components/collaborators-presence/list.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAMrE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE/E,OAAO,kCAAkC,CAAC;AAE1C,UAAU,sBAAsB;IAC/B,mBAAmB,EAAE,wBAAwB,EAAE,CAAC;IAChD,aAAa,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACnC,mBAAmB,EAAE,CAAE,SAAS,EAAE,OAAO,KAAM,IAAI,CAAC;IACpD,cAAc,EAAE,cAAc,CAAC;CAC/B;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAE,EAClC,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,cAAc,GACd,EAAE,sBAAsB,+BAsFxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-card-panel/index.js"],"names":[],"mappings":"AAgCA;;;;;;;;;;GAUG;AACH,sGAPG;IAAgC,QAAQ;IACR,MAAM;IACN,WAAW;IACX,iBAAiB;IACjB,OAAO;CACvC,GAAS,KAAK,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-card-panel/index.js"],"names":[],"mappings":"AAgCA;;;;;;;;;;GAUG;AACH,sGAPG;IAAgC,QAAQ;IACR,MAAM;IACN,WAAW;IACX,iBAAiB;IACjB,OAAO;CACvC,GAAS,KAAK,CAAC,SAAS,CAoI1B"}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
export default function PostContentInformation(): import("react").JSX.Element
|
|
1
|
+
export default function PostContentInformation(): import("react").JSX.Element;
|
|
2
|
+
export function PostContentInformationUI({ postContent }: {
|
|
3
|
+
postContent: any;
|
|
4
|
+
}): import("react").JSX.Element | null;
|
|
2
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-content-information/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-content-information/index.js"],"names":[],"mappings":"AAuBA,8EAuBC;AAED;;uCAwCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-revisions-panel/index.js"],"names":[],"mappings":"AAgJA,0EAMC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revisions-slider.d.ts","sourceRoot":"","sources":["../../../src/components/post-revisions-preview/revisions-slider.js"],"names":[],"mappings":";AAgBA;;;;GAIG;AACH,oCAFY,KAAK,CAAC,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"revisions-slider.d.ts","sourceRoot":"","sources":["../../../src/components/post-revisions-preview/revisions-slider.js"],"names":[],"mappings":";AAgBA;;;;GAIG;AACH,oCAFY,KAAK,CAAC,GAAG,CAAC,OAAO,CAkI5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-new-template-modal.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/create-new-template-modal.js"],"names":[],"mappings":"AA4BA;;
|
|
1
|
+
{"version":3,"file":"create-new-template-modal.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/create-new-template-modal.js"],"names":[],"mappings":"AA4BA;;gCAiIC"}
|
|
@@ -3,7 +3,7 @@ export function useEditedPostContext(): {
|
|
|
3
3
|
postType: string;
|
|
4
4
|
};
|
|
5
5
|
export function useAllowSwitchingTemplates(): boolean;
|
|
6
|
-
export function useAvailableTemplates(
|
|
6
|
+
export function useAvailableTemplates(): false | any[];
|
|
7
7
|
export function usePostTemplatePanelMode(): "classic" | "block-theme" | null;
|
|
8
8
|
export function useCurrentTemplateSlug(): any;
|
|
9
9
|
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/hooks.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/hooks.js"],"names":[],"mappings":"AAaA;;;EAQC;AACD,sDA8BC;AAeD,uDAsEC;AAED,6EAwCC;AAED,8CAuBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swap-template-button.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/swap-template-button.js"],"names":[],"mappings":"AAkBA;;
|
|
1
|
+
{"version":3,"file":"swap-template-button.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/swap-template-button.js"],"names":[],"mappings":"AAkBA;;;gCA4BC;AAED;;gCAqBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/revision-block-diff/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/revision-block-diff/index.js"],"names":[],"mappings":"AAYA;;;GAGG;AACH,qFAsBC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renders a panel of word-level diffs.
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} props
|
|
5
|
+
* @param {string} props.title Panel title.
|
|
6
|
+
* @param {Object} props.entries Map of key → diffWords parts arrays.
|
|
7
|
+
* @param {boolean} props.initialOpen Whether the panel starts open.
|
|
8
|
+
*/
|
|
9
|
+
export default function RevisionDiffPanel({ title, entries, initialOpen }: {
|
|
10
|
+
title: string;
|
|
11
|
+
entries: Object;
|
|
12
|
+
initialOpen: boolean;
|
|
13
|
+
}): import("react").JSX.Element | null;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/revision-diff-panel/index.js"],"names":[],"mappings":"AAUA;;;;;;;GAOG;AACH,2EAJG;IAAuB,KAAK,EAApB,MAAM;IACS,OAAO,EAAtB,MAAM;IACS,WAAW,EAA1B,OAAO;CACjB,sCAyCA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Panel that shows meta field diffs between the current revision and
|
|
3
|
+
* the previous revision in the document sidebar during revision mode.
|
|
4
|
+
*/
|
|
5
|
+
export default function RevisionFieldsDiffPanel(): import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/revision-fields-diff/index.js"],"names":[],"mappings":"AAmCA;;;GAGG;AACH,+EAmDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataform-post-summary.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/dataform-post-summary.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dataform-post-summary.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/dataform-post-summary.js"],"names":[],"mappings":"AAuBA;;gCA2HC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/index.js"],"names":[],"mappings":";AAsKA;;;gCAkEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-revision-summary.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/post-revision-summary.js"],"names":[],"mappings":"AAmBA,kFA8BC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-summary.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/post-summary.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"post-summary.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/post-summary.js"],"names":[],"mappings":"AA2CA;;gCAUC;AAED;;gCAYC"}
|
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
* @return {Array} Deduped examples.
|
|
5
5
|
*/
|
|
6
6
|
export function getExamplesForSinglePageUse(examples: any[]): any[];
|
|
7
|
-
export function StyleBookPreview({ userConfig, isStatic, path, onPathChange, }: {
|
|
7
|
+
export function StyleBookPreview({ userConfig, isStatic, path, onPathChange, settings: settingsProp, }: {
|
|
8
8
|
path: string;
|
|
9
9
|
onPathChange: Function;
|
|
10
10
|
userConfig: Object;
|
|
11
11
|
isStatic: boolean;
|
|
12
|
+
settings: Object;
|
|
12
13
|
}): Object;
|
|
13
14
|
export function StyleBookBody({ examples, isSelected, onClick, onSelect, settings, title, goTo, }: {
|
|
14
15
|
examples: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/style-book/index.js"],"names":[],"mappings":"AAyLA;;;;GAIG;AACH,oEAkBC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/style-book/index.js"],"names":[],"mappings":"AAyLA;;;;GAIG;AACH,oEAkBC;AA4KM,wGAPJ;IAAwB,IAAI,EAApB,MAAM;IACU,YAAY;IACZ,UAAU,EAA1B,MAAM;IACU,QAAQ,EAAxB,OAAO;IACS,QAAQ,EAAxB,MAAM;CACd,GAAS,MAAM,CAmLjB;AAEM;;;;;;;;gCAmFN"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-theme-content.d.ts","sourceRoot":"","sources":["../../../src/components/template-actions-panel/block-theme-content.js"],"names":[],"mappings":"AA+BA,0FAoKC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classic-theme-content.d.ts","sourceRoot":"","sources":["../../../src/components/template-actions-panel/classic-theme-content.js"],"names":[],"mappings":"AA6BA,kFA4IC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/template-actions-panel/index.js"],"names":[],"mappings":"AAaA,mFAkBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-actions.d.ts","sourceRoot":"","sources":["../../../src/dataviews/store/private-actions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"private-actions.d.ts","sourceRoot":"","sources":["../../../src/dataviews/store/private-actions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AA4D1D,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,8BAA8B,CAAC,EAAE,OAAO,CAAC;QACzC,yBAAyB,CAAC,EAAE,OAAO,CAAC;KACpC;CACD;AAgBD,wBAAgB,oBAAoB,CAAE,IAAI,EACzC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,CAAE,IAAI,CAAE;;;;;EAQtB;AAED,wBAAgB,sBAAsB,CACrC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM;;;;;EAQhB;AAED,wBAAgB,mBAAmB,CAAE,IAAI,EACxC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,KAAK,CAAE,IAAI,CAAE;;;;;EAQrB;AAED,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM;;;;;EAQf;AAED,wBAAgB,UAAU,CAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;;;;EAMrD;AA2BD,eAAO,MAAM,sBAAsB,GAChC,UAAU,MAAM,MACV,cAAc;IAAE,QAAQ,EAAE,GAAG,CAAA;CAAE,kBA2JtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-actions.d.ts","sourceRoot":"","sources":["../../src/store/private-actions.js"],"names":[],"mappings":"AAoBA;;;;;;GAMG;AACH,yCAJW,MAAM,GAEL,MAAM,CAOjB;AA4fD;;;;;GAKG;AACH,oCAHW,MAAM,GACL,MAAM,CAOjB;AAED;;;;;GAKG;AACH,uCAHW,OAAO,GACN,MAAM,CAOjB;AAED;;;;GAIG;AACH,yCAFY,MAAM,CAMjB;AAED;;;;;GAKG;AACH,8CAHW,MAAM,GACL,MAAM,CAOjB;AAED;;;;;;GAMG;AACH,iDAHW,MAAM,GAAC,IAAI,GACV,MAAM,CAOjB;AAED;;;;;GAKG;AACH,8CAHW,OAAO,GACN,MAAM,CAOjB;
|
|
1
|
+
{"version":3,"file":"private-actions.d.ts","sourceRoot":"","sources":["../../src/store/private-actions.js"],"names":[],"mappings":"AAoBA;;;;;;GAMG;AACH,yCAJW,MAAM,GAEL,MAAM,CAOjB;AA4fD;;;;;GAKG;AACH,oCAHW,MAAM,GACL,MAAM,CAOjB;AAED;;;;;GAKG;AACH,uCAHW,OAAO,GACN,MAAM,CAOjB;AAED;;;;GAIG;AACH,yCAFY,MAAM,CAMjB;AAED;;;;;GAKG;AACH,8CAHW,MAAM,GACL,MAAM,CAOjB;AAED;;;;;;GAMG;AACH,iDAHW,MAAM,GAAC,IAAI,GACV,MAAM,CAOjB;AAED;;;;;GAKG;AACH,8CAHW,OAAO,GACN,MAAM,CAOjB;AAyFD;;;;;;;GAOG;AACH,mCALW,SAAS,GAAC,MAAM,GAAC,KAAK,YAE9B;IAAyC,KAAK;CAC9C,GAAS,MAAM,CAQjB;;AAvqBM,yCAFK,MAAM,OAAA,IAIT;;;;CAA8B,kBAiCrC;AAOK,2CAFI,MAAM,EAAE,IAIhB;;CAAY,UAgBb;AAOK,2CAFI,MAAM,EAAE,IAIhB;;CAAY,UAcb;AAYK,iHANJ;IAA2B,MAAM;IACN,kBAAkB;IAClB,cAAc;IACd,KAAK;IACL,oBAAoB;CACjD,IASE;;CAAY,UAoGb;AAUK,yCALI,MAAM,kBAEd;IAA0B,SAAS;CAErC,IAGQ;;CAAY,mBA0HnB;AAOK,gDAEE;;CAAY,mBAwHnB;AAOK,8CAFI,MAAM,IAId;;;CAAoB,UAwBrB;AAqFK,4CAFI,MAAM,IAIR;;;;CAA8B,mBA6ErC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-selectors.d.ts","sourceRoot":"","sources":["../../src/store/private-selectors.js"],"names":[],"mappings":"AAwHA,sDAEC;AACD,6DAEC;AAsFD,2GAEC;AAED,mEAEC;AAED,yGAEC;AAiGD;;;;;GAKG;AACH,qCAHW,MAAM,GACL,MAAM,CAIjB;AAED;;;;;GAKG;AACH,wCAHW,MAAM,GACL,OAAO,CAIlB;AAED;;;;;GAKG;AACH,0CAHW,MAAM,GACL,MAAM,CAIjB;AAED;;;;;GAKG;AACH,uCAHW,MAAM,GACL,OAAO,CAIlB;AAED;;;;;GAKG;AACH,6CAHW,MAAM,GACL,OAAO,CAIlB;AAED;;;;;GAKG;AACH,4CAHW,MAAM,GACL,MAAM,GAAC,IAAI,CAItB;
|
|
1
|
+
{"version":3,"file":"private-selectors.d.ts","sourceRoot":"","sources":["../../src/store/private-selectors.js"],"names":[],"mappings":"AAwHA,sDAEC;AACD,6DAEC;AAsFD,2GAEC;AAED,mEAEC;AAED,yGAEC;AAiGD;;;;;GAKG;AACH,qCAHW,MAAM,GACL,MAAM,CAIjB;AAED;;;;;GAKG;AACH,wCAHW,MAAM,GACL,OAAO,CAIlB;AAED;;;;;GAKG;AACH,0CAHW,MAAM,GACL,MAAM,CAIjB;AAED;;;;;GAKG;AACH,uCAHW,MAAM,GACL,OAAO,CAIlB;AAED;;;;;GAKG;AACH,6CAHW,MAAM,GACL,OAAO,CAIlB;AAED;;;;;GAKG;AACH,4CAHW,MAAM,GACL,MAAM,GAAC,IAAI,CAItB;AA2DD;;;;;;GAMG;AACH,uCAJW,MAAM,GAEL,SAAS,GAAC,MAAM,GAAC,KAAK,CAIjC;AAED;;;;;;GAMG;AACH,qCAJW,MAAM,GAEL,OAAO,CAIlB;AA7ZD;;;;;;GAMG;AACH;;;;EAqEE;AAeF;;;;EAqCE;AAEF;;;;;;;;;GASG;AACH;;;;EA2BE;AAcF;;;;;;;;GAQG;AACH;;;;EAiCE;AAEF;;;;;;;GAOG;AACH;;;;EAyCE;AA8DF;;;;;GAKG;AACH;;;;EAiDE;AAwBF;;;;;;GAMG;AACH;;;;EA8DE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/editor",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.43.0",
|
|
4
4
|
"description": "Enhanced block editor for WordPress posts.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -61,48 +61,49 @@
|
|
|
61
61
|
],
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@floating-ui/react-dom": "2.0.8",
|
|
64
|
-
"@wordpress/a11y": "^4.
|
|
65
|
-
"@wordpress/api-fetch": "^7.
|
|
66
|
-
"@wordpress/base-styles": "^6.
|
|
67
|
-
"@wordpress/blob": "^4.
|
|
68
|
-
"@wordpress/block-editor": "^15.
|
|
69
|
-
"@wordpress/block-serialization-default-parser": "^5.
|
|
70
|
-
"@wordpress/blocks": "^15.
|
|
71
|
-
"@wordpress/commands": "^1.
|
|
72
|
-
"@wordpress/components": "^32.
|
|
73
|
-
"@wordpress/compose": "^7.
|
|
74
|
-
"@wordpress/core-data": "^7.
|
|
75
|
-
"@wordpress/data": "^10.
|
|
76
|
-
"@wordpress/dataviews": "^
|
|
77
|
-
"@wordpress/date": "^5.
|
|
78
|
-
"@wordpress/deprecated": "^4.
|
|
79
|
-
"@wordpress/dom": "^4.
|
|
80
|
-
"@wordpress/element": "^6.
|
|
81
|
-
"@wordpress/fields": "^0.
|
|
82
|
-
"@wordpress/global-styles-engine": "^1.
|
|
83
|
-
"@wordpress/global-styles-ui": "^1.
|
|
84
|
-
"@wordpress/hooks": "^4.
|
|
85
|
-
"@wordpress/html-entities": "^4.
|
|
86
|
-
"@wordpress/i18n": "^6.
|
|
87
|
-
"@wordpress/icons": "^12.
|
|
88
|
-
"@wordpress/interface": "^9.
|
|
89
|
-
"@wordpress/keyboard-shortcuts": "^5.
|
|
90
|
-
"@wordpress/keycodes": "^4.
|
|
91
|
-
"@wordpress/media-editor": "^0.
|
|
92
|
-
"@wordpress/media-fields": "^0.
|
|
93
|
-
"@wordpress/media-utils": "^5.
|
|
94
|
-
"@wordpress/notices": "^5.
|
|
95
|
-
"@wordpress/patterns": "^2.
|
|
96
|
-
"@wordpress/plugins": "^7.
|
|
97
|
-
"@wordpress/preferences": "^4.
|
|
98
|
-
"@wordpress/private-apis": "^1.
|
|
99
|
-
"@wordpress/reusable-blocks": "^5.
|
|
100
|
-
"@wordpress/rich-text": "^7.
|
|
101
|
-
"@wordpress/server-side-render": "^6.
|
|
102
|
-
"@wordpress/upload-media": "^0.
|
|
103
|
-
"@wordpress/url": "^4.
|
|
104
|
-
"@wordpress/
|
|
105
|
-
"@wordpress/
|
|
64
|
+
"@wordpress/a11y": "^4.43.0",
|
|
65
|
+
"@wordpress/api-fetch": "^7.43.0",
|
|
66
|
+
"@wordpress/base-styles": "^6.19.0",
|
|
67
|
+
"@wordpress/blob": "^4.43.0",
|
|
68
|
+
"@wordpress/block-editor": "^15.16.0",
|
|
69
|
+
"@wordpress/block-serialization-default-parser": "^5.43.0",
|
|
70
|
+
"@wordpress/blocks": "^15.16.0",
|
|
71
|
+
"@wordpress/commands": "^1.43.0",
|
|
72
|
+
"@wordpress/components": "^32.5.0",
|
|
73
|
+
"@wordpress/compose": "^7.43.0",
|
|
74
|
+
"@wordpress/core-data": "^7.43.0",
|
|
75
|
+
"@wordpress/data": "^10.43.0",
|
|
76
|
+
"@wordpress/dataviews": "^14.0.0",
|
|
77
|
+
"@wordpress/date": "^5.43.0",
|
|
78
|
+
"@wordpress/deprecated": "^4.43.0",
|
|
79
|
+
"@wordpress/dom": "^4.43.0",
|
|
80
|
+
"@wordpress/element": "^6.43.0",
|
|
81
|
+
"@wordpress/fields": "^0.35.0",
|
|
82
|
+
"@wordpress/global-styles-engine": "^1.10.0",
|
|
83
|
+
"@wordpress/global-styles-ui": "^1.10.0",
|
|
84
|
+
"@wordpress/hooks": "^4.43.0",
|
|
85
|
+
"@wordpress/html-entities": "^4.43.0",
|
|
86
|
+
"@wordpress/i18n": "^6.16.0",
|
|
87
|
+
"@wordpress/icons": "^12.1.0",
|
|
88
|
+
"@wordpress/interface": "^9.28.0",
|
|
89
|
+
"@wordpress/keyboard-shortcuts": "^5.43.0",
|
|
90
|
+
"@wordpress/keycodes": "^4.43.0",
|
|
91
|
+
"@wordpress/media-editor": "^0.6.0",
|
|
92
|
+
"@wordpress/media-fields": "^0.8.0",
|
|
93
|
+
"@wordpress/media-utils": "^5.43.0",
|
|
94
|
+
"@wordpress/notices": "^5.43.0",
|
|
95
|
+
"@wordpress/patterns": "^2.43.0",
|
|
96
|
+
"@wordpress/plugins": "^7.43.0",
|
|
97
|
+
"@wordpress/preferences": "^4.43.0",
|
|
98
|
+
"@wordpress/private-apis": "^1.43.0",
|
|
99
|
+
"@wordpress/reusable-blocks": "^5.43.0",
|
|
100
|
+
"@wordpress/rich-text": "^7.43.0",
|
|
101
|
+
"@wordpress/server-side-render": "^6.19.0",
|
|
102
|
+
"@wordpress/upload-media": "^0.28.0",
|
|
103
|
+
"@wordpress/url": "^4.43.0",
|
|
104
|
+
"@wordpress/views": "^1.10.0",
|
|
105
|
+
"@wordpress/warning": "^3.43.0",
|
|
106
|
+
"@wordpress/wordcount": "^4.43.0",
|
|
106
107
|
"change-case": "^4.1.2",
|
|
107
108
|
"client-zip": "^2.4.5",
|
|
108
109
|
"clsx": "^2.1.1",
|
|
@@ -125,5 +126,5 @@
|
|
|
125
126
|
"publishConfig": {
|
|
126
127
|
"access": "public"
|
|
127
128
|
},
|
|
128
|
-
"gitHead": "
|
|
129
|
+
"gitHead": "2cea90674d11aa521ec3f71652fb3a6a4c383969"
|
|
129
130
|
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
interface ScrollToCursorOptions {
|
|
2
|
+
behavior?: ScrollBehavior;
|
|
3
|
+
block?: ScrollLogicalPosition;
|
|
4
|
+
inline?: ScrollLogicalPosition;
|
|
5
|
+
highlightDuration?: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Cursor Registry
|
|
10
|
+
* ===
|
|
11
|
+
* This registry stores references to cursor elements so that we can access them
|
|
12
|
+
* in different parts of the component tree. This would more ideally be solved
|
|
13
|
+
* with React context or state in the awareness store, but:
|
|
14
|
+
*
|
|
15
|
+
* 1. EditorPresence and BlockCanvasCover slot/fill break context propagation. We
|
|
16
|
+
* don't currently have a way to provide context to both the slot and fill.
|
|
17
|
+
* 2. Storing pointers to the cursor elements in the awareness store might be a
|
|
18
|
+
* better solution, but would require broader refactoring.
|
|
19
|
+
*
|
|
20
|
+
* For now, we create a single instance of this registry and pass it down to the
|
|
21
|
+
* components that need it. It's important that we create a single instance and
|
|
22
|
+
* not a new instance per component or render; use useState with a lazy
|
|
23
|
+
* initializer to accomplish this.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
function highlightCursor( element: HTMLElement, duration: number ): void {
|
|
27
|
+
element.classList.add( 'collaborators-overlay-cursor-highlighted' );
|
|
28
|
+
|
|
29
|
+
setTimeout( () => {
|
|
30
|
+
element.classList.remove( 'collaborators-overlay-cursor-highlighted' );
|
|
31
|
+
}, duration );
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function createCursorRegistry() {
|
|
35
|
+
const cursorMap = new Map< number, HTMLElement >();
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
/**
|
|
39
|
+
* Register a cursor element when it's created.
|
|
40
|
+
*
|
|
41
|
+
* @param clientId - The clientId of the cursor to register.
|
|
42
|
+
* @param element - The cursor element to register.
|
|
43
|
+
*/
|
|
44
|
+
registerCursor( clientId: number, element: HTMLElement ): void {
|
|
45
|
+
cursorMap.set( clientId, element );
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Unregister a cursor element when it's removed.
|
|
50
|
+
*
|
|
51
|
+
* @param clientId - The clientId of the cursor to unregister.
|
|
52
|
+
*/
|
|
53
|
+
unregisterCursor( clientId: number ): void {
|
|
54
|
+
cursorMap.delete( clientId );
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Scroll to a cursor by clientId.
|
|
59
|
+
*
|
|
60
|
+
* @param clientId - The clientId of the cursor to scroll to.
|
|
61
|
+
* @param options - The options for the scroll.
|
|
62
|
+
* @return true if cursor was found and scrolled to, false otherwise.
|
|
63
|
+
*/
|
|
64
|
+
scrollToCursor(
|
|
65
|
+
clientId: number,
|
|
66
|
+
options?: ScrollToCursorOptions
|
|
67
|
+
): boolean {
|
|
68
|
+
const cursorElement = cursorMap.get( clientId );
|
|
69
|
+
|
|
70
|
+
if ( ! cursorElement ) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
cursorElement.scrollIntoView( {
|
|
75
|
+
behavior: options?.behavior ?? 'smooth',
|
|
76
|
+
block: options?.block ?? 'center',
|
|
77
|
+
inline: options?.inline ?? 'nearest',
|
|
78
|
+
} );
|
|
79
|
+
|
|
80
|
+
if ( options?.highlightDuration ) {
|
|
81
|
+
highlightCursor( cursorElement, options.highlightDuration );
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return true;
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Clear the registry.
|
|
89
|
+
*/
|
|
90
|
+
removeAll(): void {
|
|
91
|
+
cursorMap.clear();
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type CursorRegistry = ReturnType< typeof createCursorRegistry >;
|
|
@@ -9,22 +9,29 @@ import { privateApis } from '@wordpress/block-editor';
|
|
|
9
9
|
*/
|
|
10
10
|
import { unlock } from '../../lock-unlock';
|
|
11
11
|
import { Overlay } from './overlay';
|
|
12
|
+
import { type CursorRegistry } from './cursor-registry';
|
|
12
13
|
|
|
13
14
|
const { BlockCanvasCover } = unlock( privateApis );
|
|
14
15
|
|
|
15
16
|
interface Props {
|
|
16
17
|
postId: number | null;
|
|
17
18
|
postType: string | null;
|
|
19
|
+
cursorRegistry?: CursorRegistry;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
23
|
* Collaborators Overlay component
|
|
22
|
-
* @param props
|
|
23
|
-
* @param props.postId
|
|
24
|
-
* @param props.postType
|
|
24
|
+
* @param props - The props for the CollaboratorsOverlay component
|
|
25
|
+
* @param props.postId - The ID of the post
|
|
26
|
+
* @param props.postType - The type of the post
|
|
27
|
+
* @param props.cursorRegistry - The shared cursor registry
|
|
25
28
|
* @return The CollaboratorsOverlay component
|
|
26
29
|
*/
|
|
27
|
-
export function CollaboratorsOverlay( {
|
|
30
|
+
export function CollaboratorsOverlay( {
|
|
31
|
+
postId,
|
|
32
|
+
postType,
|
|
33
|
+
cursorRegistry,
|
|
34
|
+
}: Props ) {
|
|
28
35
|
return (
|
|
29
36
|
<BlockCanvasCover.Fill>
|
|
30
37
|
{ ( {
|
|
@@ -36,6 +43,7 @@ export function CollaboratorsOverlay( { postId, postType }: Props ) {
|
|
|
36
43
|
blockEditorDocument={ containerRef.current?.ownerDocument }
|
|
37
44
|
postId={ postId }
|
|
38
45
|
postType={ postType }
|
|
46
|
+
cursorRegistry={ cursorRegistry }
|
|
39
47
|
/>
|
|
40
48
|
) }
|
|
41
49
|
</BlockCanvasCover.Fill>
|
|
@@ -119,7 +119,7 @@ export const OVERLAY_IFRAME_STYLES = `
|
|
|
119
119
|
outline-style: solid;
|
|
120
120
|
outline-width: calc(var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1));
|
|
121
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
|
|
122
|
+
box-shadow: inset 0 0 0 calc((var(--wp-admin-border-width-focus) / var(--wp-block-editor-iframe-zoom-out-scale, 1)) + 0.5px) rgba(${ WHITE }, 0.7);
|
|
123
123
|
z-index: 1;
|
|
124
124
|
}
|
|
125
125
|
@media (prefers-reduced-motion: reduce) {
|