@wordpress/editor 14.45.2-next.v.202605131032.0 → 14.47.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 +12 -1
- package/build/components/collab-sidebar/add-note.cjs +6 -0
- package/build/components/collab-sidebar/add-note.cjs.map +2 -2
- package/build/components/collab-sidebar/hooks.cjs +36 -24
- package/build/components/collab-sidebar/hooks.cjs.map +2 -2
- package/build/components/collab-sidebar/index.cjs +19 -10
- package/build/components/collab-sidebar/index.cjs.map +2 -2
- package/build/components/collab-sidebar/note-byline.cjs +16 -9
- package/build/components/collab-sidebar/note-byline.cjs.map +2 -2
- package/build/components/collab-sidebar/notes.cjs +20 -11
- package/build/components/collab-sidebar/notes.cjs.map +2 -2
- package/build/components/collab-sidebar/utils.cjs +42 -2
- package/build/components/collab-sidebar/utils.cjs.map +2 -2
- package/build/components/collaborators-overlay/compute-selection.cjs +39 -15
- package/build/components/collaborators-overlay/compute-selection.cjs.map +3 -3
- package/build/components/collaborators-overlay/use-block-highlighting.cjs +10 -2
- package/build/components/collaborators-overlay/use-block-highlighting.cjs.map +3 -3
- package/build/components/collaborators-overlay/use-render-cursors.cjs +15 -7
- package/build/components/collaborators-overlay/use-render-cursors.cjs.map +3 -3
- package/build/components/collaborators-presence/avatar/component.cjs +5 -1
- package/build/components/collaborators-presence/avatar/component.cjs.map +3 -3
- package/build/components/collaborators-presence/use-collaborator-notifications.cjs +6 -3
- package/build/components/collaborators-presence/use-collaborator-notifications.cjs.map +2 -2
- package/build/components/editor-interface/index.cjs +17 -16
- package/build/components/editor-interface/index.cjs.map +3 -3
- package/build/components/editor-notices/index.cjs +6 -1
- package/build/components/editor-notices/index.cjs.map +3 -3
- package/build/components/global-styles/hooks.cjs +12 -1
- package/build/components/global-styles/hooks.cjs.map +2 -2
- package/build/components/header/index.cjs +11 -6
- package/build/components/header/index.cjs.map +2 -2
- package/build/components/media/media-editor-modal.cjs +14 -1
- package/build/components/media/media-editor-modal.cjs.map +2 -2
- package/build/components/post-card-panel/index.cjs +7 -1
- package/build/components/post-card-panel/index.cjs.map +3 -3
- package/build/components/post-last-revision/index.cjs +28 -8
- package/build/components/post-last-revision/index.cjs.map +2 -2
- package/build/components/post-locked-modal/index.cjs +9 -6
- package/build/components/post-locked-modal/index.cjs.map +2 -2
- package/build/components/post-publish-button/label.cjs +0 -7
- package/build/components/post-publish-button/label.cjs.map +2 -2
- package/build/components/post-publish-panel/prepublish.cjs +8 -1
- package/build/components/post-publish-panel/prepublish.cjs.map +3 -3
- package/build/components/post-revisions-panel/index.cjs +7 -0
- package/build/components/post-revisions-panel/index.cjs.map +2 -2
- package/build/components/post-revisions-preview/diff-markers.cjs +21 -13
- package/build/components/post-revisions-preview/diff-markers.cjs.map +2 -2
- package/build/components/post-revisions-preview/revisions-canvas.cjs +7 -1
- package/build/components/post-revisions-preview/revisions-canvas.cjs.map +2 -2
- package/build/components/post-taxonomies/check.cjs +1 -2
- package/build/components/post-taxonomies/check.cjs.map +2 -2
- package/build/components/post-taxonomies/index.cjs +1 -2
- package/build/components/post-taxonomies/index.cjs.map +2 -2
- package/build/components/preferences-modal/index.cjs +1 -1
- package/build/components/preferences-modal/index.cjs.map +2 -2
- package/build/components/preview-dropdown/index.cjs.map +3 -3
- package/build/components/provider/index.cjs +5 -21
- package/build/components/provider/index.cjs.map +3 -3
- package/build/components/provider/use-block-editor-settings.cjs +16 -9
- package/build/components/provider/use-block-editor-settings.cjs.map +3 -3
- package/build/components/resizable-editor/resize-handle.cjs +24 -16
- package/build/components/resizable-editor/resize-handle.cjs.map +2 -2
- package/build/components/sidebar/header.cjs +16 -21
- package/build/components/sidebar/header.cjs.map +3 -3
- package/build/components/sidebar/index.cjs +2 -6
- package/build/components/sidebar/index.cjs.map +2 -2
- package/build/components/start-page-options/index.cjs +14 -4
- package/build/components/start-page-options/index.cjs.map +2 -2
- package/build/components/start-template-options/index.cjs +8 -6
- package/build/components/start-template-options/index.cjs.map +2 -2
- package/build/components/styles-canvas/style-book.cjs +59 -2
- package/build/components/styles-canvas/style-book.cjs.map +2 -2
- package/build/components/sync-connection-error-modal/index.cjs +10 -7
- package/build/components/sync-connection-error-modal/index.cjs.map +3 -3
- package/build/components/template-actions-panel/block-theme-content.cjs +21 -12
- package/build/components/template-actions-panel/block-theme-content.cjs.map +2 -2
- package/build/dataviews/store/private-actions.cjs.map +2 -2
- package/build/store/private-actions.cjs +17 -1
- package/build/store/private-actions.cjs.map +3 -3
- package/build/store/private-selectors.cjs +18 -0
- package/build/store/private-selectors.cjs.map +2 -2
- package/build/store/selectors.cjs +0 -17
- package/build/store/selectors.cjs.map +2 -2
- package/build/{components/media → utils/media-delete}/index.cjs +12 -13
- package/build/utils/media-delete/index.cjs.map +7 -0
- package/build/utils/media-finalize/index.cjs +3 -1
- package/build/utils/media-finalize/index.cjs.map +2 -2
- package/build/utils/sync-error-messages.cjs +9 -0
- package/build/utils/sync-error-messages.cjs.map +2 -2
- package/build-module/components/collab-sidebar/add-note.mjs +6 -0
- package/build-module/components/collab-sidebar/add-note.mjs.map +2 -2
- package/build-module/components/collab-sidebar/hooks.mjs +42 -25
- package/build-module/components/collab-sidebar/hooks.mjs.map +2 -2
- package/build-module/components/collab-sidebar/index.mjs +19 -10
- package/build-module/components/collab-sidebar/index.mjs.map +2 -2
- package/build-module/components/collab-sidebar/note-byline.mjs +17 -10
- package/build-module/components/collab-sidebar/note-byline.mjs.map +2 -2
- package/build-module/components/collab-sidebar/notes.mjs +26 -13
- package/build-module/components/collab-sidebar/notes.mjs.map +2 -2
- package/build-module/components/collab-sidebar/utils.mjs +38 -2
- package/build-module/components/collab-sidebar/utils.mjs.map +2 -2
- package/build-module/components/collaborators-overlay/compute-selection.mjs +36 -12
- package/build-module/components/collaborators-overlay/compute-selection.mjs.map +2 -2
- package/build-module/components/collaborators-overlay/use-block-highlighting.mjs +10 -3
- package/build-module/components/collaborators-overlay/use-block-highlighting.mjs.map +2 -2
- package/build-module/components/collaborators-overlay/use-render-cursors.mjs +11 -6
- package/build-module/components/collaborators-overlay/use-render-cursors.mjs.map +2 -2
- package/build-module/components/collaborators-presence/avatar/component.mjs +7 -3
- package/build-module/components/collaborators-presence/avatar/component.mjs.map +2 -2
- package/build-module/components/collaborators-presence/use-collaborator-notifications.mjs +6 -3
- package/build-module/components/collaborators-presence/use-collaborator-notifications.mjs.map +2 -2
- package/build-module/components/editor-interface/index.mjs +22 -17
- package/build-module/components/editor-interface/index.mjs.map +2 -2
- package/build-module/components/editor-notices/index.mjs +6 -1
- package/build-module/components/editor-notices/index.mjs.map +2 -2
- package/build-module/components/global-styles/hooks.mjs +12 -1
- package/build-module/components/global-styles/hooks.mjs.map +2 -2
- package/build-module/components/header/index.mjs +11 -6
- package/build-module/components/header/index.mjs.map +2 -2
- package/build-module/components/media/media-editor-modal.mjs +14 -1
- package/build-module/components/media/media-editor-modal.mjs.map +2 -2
- package/build-module/components/post-card-panel/index.mjs +8 -2
- package/build-module/components/post-card-panel/index.mjs.map +2 -2
- package/build-module/components/post-last-revision/index.mjs +29 -9
- package/build-module/components/post-last-revision/index.mjs.map +2 -2
- package/build-module/components/post-locked-modal/index.mjs +9 -6
- package/build-module/components/post-locked-modal/index.mjs.map +2 -2
- package/build-module/components/post-publish-button/label.mjs +0 -7
- package/build-module/components/post-publish-button/label.mjs.map +2 -2
- package/build-module/components/post-publish-panel/prepublish.mjs +9 -2
- package/build-module/components/post-publish-panel/prepublish.mjs.map +2 -2
- package/build-module/components/post-revisions-panel/index.mjs +7 -0
- package/build-module/components/post-revisions-panel/index.mjs.map +2 -2
- package/build-module/components/post-revisions-preview/diff-markers.mjs +22 -14
- package/build-module/components/post-revisions-preview/diff-markers.mjs.map +2 -2
- package/build-module/components/post-revisions-preview/revisions-canvas.mjs +7 -1
- package/build-module/components/post-revisions-preview/revisions-canvas.mjs.map +2 -2
- package/build-module/components/post-taxonomies/check.mjs +1 -2
- package/build-module/components/post-taxonomies/check.mjs.map +2 -2
- package/build-module/components/post-taxonomies/index.mjs +1 -2
- package/build-module/components/post-taxonomies/index.mjs.map +2 -2
- package/build-module/components/preferences-modal/index.mjs +1 -1
- package/build-module/components/preferences-modal/index.mjs.map +2 -2
- package/build-module/components/preview-dropdown/index.mjs +2 -2
- package/build-module/components/preview-dropdown/index.mjs.map +2 -2
- package/build-module/components/provider/index.mjs +6 -22
- package/build-module/components/provider/index.mjs.map +2 -2
- package/build-module/components/provider/use-block-editor-settings.mjs +16 -9
- package/build-module/components/provider/use-block-editor-settings.mjs.map +2 -2
- package/build-module/components/resizable-editor/resize-handle.mjs +26 -18
- package/build-module/components/resizable-editor/resize-handle.mjs.map +2 -2
- package/build-module/components/sidebar/header.mjs +11 -16
- package/build-module/components/sidebar/header.mjs.map +2 -2
- package/build-module/components/sidebar/index.mjs +2 -7
- package/build-module/components/sidebar/index.mjs.map +2 -2
- package/build-module/components/start-page-options/index.mjs +14 -4
- package/build-module/components/start-page-options/index.mjs.map +2 -2
- package/build-module/components/start-template-options/index.mjs +8 -6
- package/build-module/components/start-template-options/index.mjs.map +2 -2
- package/build-module/components/styles-canvas/style-book.mjs +60 -3
- package/build-module/components/styles-canvas/style-book.mjs.map +2 -2
- package/build-module/components/sync-connection-error-modal/index.mjs +14 -8
- package/build-module/components/sync-connection-error-modal/index.mjs.map +2 -2
- package/build-module/components/template-actions-panel/block-theme-content.mjs +21 -13
- package/build-module/components/template-actions-panel/block-theme-content.mjs.map +2 -2
- package/build-module/dataviews/store/private-actions.mjs.map +2 -2
- package/build-module/store/private-actions.mjs +16 -1
- package/build-module/store/private-actions.mjs.map +2 -2
- package/build-module/store/private-selectors.mjs +18 -0
- package/build-module/store/private-selectors.mjs.map +2 -2
- package/build-module/store/selectors.mjs +0 -16
- package/build-module/store/selectors.mjs.map +2 -2
- package/build-module/utils/media-delete/index.mjs +12 -0
- package/build-module/utils/media-delete/index.mjs.map +7 -0
- package/build-module/utils/media-finalize/index.mjs +3 -1
- package/build-module/utils/media-finalize/index.mjs.map +2 -2
- package/build-module/utils/sync-error-messages.mjs +8 -0
- package/build-module/utils/sync-error-messages.mjs.map +2 -2
- package/build-style/style-rtl.css +462 -408
- package/build-style/style.css +462 -408
- package/build-types/components/collab-sidebar/add-note.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/hooks.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/note-byline.d.ts +3 -0
- package/build-types/components/collab-sidebar/note-byline.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/notes.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/utils.d.ts +33 -0
- package/build-types/components/collab-sidebar/utils.d.ts.map +1 -1
- package/build-types/components/collaborators-overlay/compute-selection.d.ts.map +1 -1
- package/build-types/components/collaborators-overlay/use-block-highlighting.d.ts +3 -0
- package/build-types/components/collaborators-overlay/use-block-highlighting.d.ts.map +1 -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.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/editor-notices/index.d.ts.map +1 -1
- package/build-types/components/global-styles/hooks.d.ts.map +1 -1
- package/build-types/components/media/media-editor-modal.d.ts +6 -2
- package/build-types/components/media/media-editor-modal.d.ts.map +1 -1
- package/build-types/components/post-card-panel/index.d.ts.map +1 -1
- package/build-types/components/post-last-revision/index.d.ts.map +1 -1
- package/build-types/components/post-locked-modal/index.d.ts +1 -6
- package/build-types/components/post-locked-modal/index.d.ts.map +1 -1
- package/build-types/components/post-publish-button/label.d.ts.map +1 -1
- package/build-types/components/post-publish-panel/prepublish.d.ts.map +1 -1
- package/build-types/components/post-revisions-panel/index.d.ts +1 -1
- package/build-types/components/post-revisions-panel/index.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.map +1 -1
- package/build-types/components/post-taxonomies/check.d.ts.map +1 -1
- package/build-types/components/post-taxonomies/flat-term-selector.d.ts +1 -6
- package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts +1 -6
- package/build-types/components/post-taxonomies/index.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/resizable-editor/resize-handle.d.ts.map +1 -1
- package/build-types/components/sidebar/index.d.ts.map +1 -1
- package/build-types/components/start-page-options/index.d.ts.map +1 -1
- package/build-types/components/start-template-options/index.d.ts.map +1 -1
- package/build-types/components/styles-canvas/style-book.d.ts.map +1 -1
- package/build-types/components/sync-connection-error-modal/index.d.ts.map +1 -1
- package/build-types/components/template-actions-panel/block-theme-content.d.ts.map +1 -1
- package/build-types/dataviews/store/private-actions.d.ts +0 -1
- package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
- package/build-types/store/private-actions.d.ts +15 -0
- package/build-types/store/private-actions.d.ts.map +1 -1
- package/build-types/store/private-selectors.d.ts +10 -0
- package/build-types/store/private-selectors.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/get-template-part-icon.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 +1 -1
- package/build-types/utils/media-finalize/index.d.ts.map +1 -1
- package/build-types/utils/sync-error-messages.d.ts +1 -0
- package/build-types/utils/sync-error-messages.d.ts.map +1 -1
- package/package.json +48 -48
- package/src/components/collab-sidebar/add-note.js +9 -0
- package/src/components/collab-sidebar/hooks.js +53 -29
- package/src/components/collab-sidebar/index.js +28 -14
- package/src/components/collab-sidebar/note-byline.js +15 -10
- package/src/components/collab-sidebar/notes.js +36 -14
- package/src/components/collab-sidebar/test/utils.js +375 -1
- package/src/components/collab-sidebar/utils.js +70 -1
- package/src/components/collaborators-overlay/compute-selection.ts +67 -19
- package/src/components/collaborators-overlay/use-block-highlighting.ts +14 -1
- package/src/components/collaborators-overlay/use-render-cursors.ts +15 -4
- package/src/components/collaborators-presence/avatar/component.tsx +10 -3
- package/src/components/collaborators-presence/avatar/test/index.tsx +50 -18
- package/src/components/collaborators-presence/styles/collaborators-presence.scss +4 -1
- package/src/components/collaborators-presence/test/use-collaborator-notifications.ts +2 -1
- package/src/components/collaborators-presence/use-collaborator-notifications.ts +6 -4
- package/src/components/editor-help/help-topic-row.native.js +2 -2
- package/src/components/editor-interface/index.js +22 -23
- package/src/components/editor-interface/style.scss +4 -0
- package/src/components/editor-notices/index.js +7 -1
- package/src/components/error-boundary/index.native.js +2 -2
- package/src/components/global-styles/hooks.js +26 -0
- package/src/components/global-styles-sidebar/style.scss +0 -9
- package/src/components/header/index.js +12 -12
- package/src/components/media/media-editor-modal.js +20 -2
- package/src/components/offline-status/index.native.js +2 -2
- package/src/components/post-card-panel/index.js +5 -2
- package/src/components/post-last-revision/index.js +37 -9
- package/src/components/post-last-revision/style.scss +0 -3
- package/src/components/post-locked-modal/index.js +8 -5
- package/src/components/post-panel-row/style.scss +1 -0
- package/src/components/post-publish-button/label.js +0 -11
- package/src/components/post-publish-panel/prepublish.js +6 -2
- package/src/components/post-revisions-panel/index.js +8 -0
- package/src/components/post-revisions-preview/diff-markers.js +17 -11
- package/src/components/post-revisions-preview/revisions-canvas.js +7 -1
- package/src/components/post-revisions-preview/style.scss +4 -4
- package/src/components/post-taxonomies/check.js +1 -2
- package/src/components/post-taxonomies/index.js +1 -2
- package/src/components/preferences-modal/index.js +1 -1
- package/src/components/preview-dropdown/index.js +2 -2
- package/src/components/provider/index.js +10 -31
- package/src/components/provider/use-block-editor-settings.js +19 -12
- package/src/components/resizable-editor/resize-handle.js +22 -16
- package/src/components/sidebar/header.js +18 -28
- package/src/components/sidebar/index.js +5 -14
- package/src/components/start-page-options/index.js +19 -4
- package/src/components/start-template-options/index.js +13 -6
- package/src/components/styles-canvas/style-book.js +75 -13
- package/src/components/sync-connection-error-modal/index.tsx +25 -11
- package/src/components/template-actions-panel/block-theme-content.js +19 -13
- package/src/components/text-editor/style.scss +2 -2
- package/src/dataviews/store/private-actions.ts +0 -1
- package/src/store/private-actions.js +27 -0
- package/src/store/private-selectors.js +26 -0
- package/src/store/selectors.js +0 -24
- package/src/store/test/actions.js +34 -0
- package/src/utils/media-delete/index.js +11 -0
- package/src/utils/media-finalize/index.js +6 -1
- package/src/utils/media-finalize/test/index.js +32 -2
- package/src/utils/sync-error-messages.ts +8 -0
- package/src/utils/test/sync-error-messages.js +1 -0
- package/build/components/global-styles-provider/index.cjs +0 -181
- package/build/components/global-styles-provider/index.cjs.map +0 -7
- package/build/components/media/index.cjs.map +0 -7
- package/build/components/media/metadata-panel.cjs +0 -96
- package/build/components/media/metadata-panel.cjs.map +0 -7
- package/build/components/media/preview.cjs +0 -39
- package/build/components/media/preview.cjs.map +0 -7
- package/build-module/components/global-styles-provider/index.mjs +0 -156
- package/build-module/components/global-styles-provider/index.mjs.map +0 -7
- package/build-module/components/media/index.mjs +0 -8
- package/build-module/components/media/index.mjs.map +0 -7
- package/build-module/components/media/metadata-panel.mjs +0 -65
- package/build-module/components/media/metadata-panel.mjs.map +0 -7
- package/build-module/components/media/preview.mjs +0 -21
- package/build-module/components/media/preview.mjs.map +0 -7
- package/build-types/components/global-styles-provider/index.d.ts +0 -16
- package/build-types/components/global-styles-provider/index.d.ts.map +0 -1
- package/build-types/components/media/index.d.ts +0 -3
- package/build-types/components/media/index.d.ts.map +0 -1
- package/build-types/components/media/metadata-panel.d.ts +0 -12
- package/build-types/components/media/metadata-panel.d.ts.map +0 -1
- package/build-types/components/media/preview.d.ts +0 -9
- package/build-types/components/media/preview.d.ts.map +0 -1
- package/src/components/global-styles-provider/index.js +0 -207
- package/src/components/media/index.js +0 -2
- package/src/components/media/metadata-panel.js +0 -77
- package/src/components/media/preview.js +0 -35
|
@@ -4,6 +4,7 @@ var AUTHENTICATION_FAILED = "authentication-failed";
|
|
|
4
4
|
var CONNECTION_EXPIRED = "connection-expired";
|
|
5
5
|
var CONNECTION_LIMIT_EXCEEDED = "connection-limit-exceeded";
|
|
6
6
|
var DOCUMENT_SIZE_LIMIT_EXCEEDED = "document-size-limit-exceeded";
|
|
7
|
+
var PROTOCOL_MISMATCH = "protocol-mismatch";
|
|
7
8
|
var UNKNOWN_ERROR = "unknown-error";
|
|
8
9
|
var ERROR_MESSAGES = {
|
|
9
10
|
[AUTHENTICATION_FAILED]: {
|
|
@@ -24,6 +25,12 @@ var ERROR_MESSAGES = {
|
|
|
24
25
|
"Real-time collaboration has reached its connection limit. Try again later or contact your site administrator."
|
|
25
26
|
)
|
|
26
27
|
},
|
|
28
|
+
[PROTOCOL_MISMATCH]: {
|
|
29
|
+
title: __("Protocol update"),
|
|
30
|
+
description: __(
|
|
31
|
+
"Real-time collaboration has been updated. Please refresh the page to continue editing."
|
|
32
|
+
)
|
|
33
|
+
},
|
|
27
34
|
// DOCUMENT_SIZE_LIMIT_EXCEEDED is not included here because it results in
|
|
28
35
|
// collaboration being disabled entirely.
|
|
29
36
|
[UNKNOWN_ERROR]: {
|
|
@@ -44,6 +51,7 @@ export {
|
|
|
44
51
|
CONNECTION_EXPIRED,
|
|
45
52
|
CONNECTION_LIMIT_EXCEEDED,
|
|
46
53
|
DOCUMENT_SIZE_LIMIT_EXCEEDED,
|
|
54
|
+
PROTOCOL_MISMATCH,
|
|
47
55
|
UNKNOWN_ERROR,
|
|
48
56
|
getSyncErrorMessages
|
|
49
57
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/sync-error-messages.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { type ConnectionError } from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\n\n// These error codes are defined in the sync package:\n// packages/sync/src/errors.ts\nexport const AUTHENTICATION_FAILED = 'authentication-failed';\nexport const CONNECTION_EXPIRED = 'connection-expired';\nexport const CONNECTION_LIMIT_EXCEEDED = 'connection-limit-exceeded';\nexport const DOCUMENT_SIZE_LIMIT_EXCEEDED = 'document-size-limit-exceeded';\nexport const UNKNOWN_ERROR = 'unknown-error';\n\ninterface ConnectionErrorMessages {\n\tdescription: string;\n\ttitle: string;\n}\n\n/**\n * Default error messages for known error codes.\n */\nconst ERROR_MESSAGES: Record< string, ConnectionErrorMessages > = {\n\t[ AUTHENTICATION_FAILED ]: {\n\t\ttitle: __( 'Unable to connect' ),\n\t\tdescription: __(\n\t\t\t\"Real-time collaboration couldn't verify your permissions. \" +\n\t\t\t\t'Check that you have access to edit this post or contact your site administrator.'\n\t\t),\n\t},\n\t[ CONNECTION_EXPIRED ]: {\n\t\ttitle: __( 'Connection expired' ),\n\t\tdescription: __(\n\t\t\t'Your connection to real-time collaboration has timed out. ' +\n\t\t\t\t'Editing is paused to prevent conflicts with other editors.'\n\t\t),\n\t},\n\t[ CONNECTION_LIMIT_EXCEEDED ]: {\n\t\ttitle: __( 'Too many editors connected' ),\n\t\tdescription: __(\n\t\t\t'Real-time collaboration has reached its connection limit. ' +\n\t\t\t\t'Try again later or contact your site administrator.'\n\t\t),\n\t},\n\t// DOCUMENT_SIZE_LIMIT_EXCEEDED is not included here because it results in\n\t// collaboration being disabled entirely.\n\t[ UNKNOWN_ERROR ]: {\n\t\ttitle: __( 'Connection lost' ),\n\t\tdescription: __(\n\t\t\t'The connection to real-time collaboration was interrupted. ' +\n\t\t\t\t'Editing is paused to prevent conflicts with other editors.'\n\t\t),\n\t},\n};\n\n/**\n * Get user-facing title and description from a sync connection error.\n *\n * Provides default messages based on error.code.\n *\n * @param error - Connection error.\n * @return Object with title, description, and canRetry flag.\n */\nexport function getSyncErrorMessages(\n\terror?: ConnectionError\n): ConnectionErrorMessages {\n\tif ( error?.code && ERROR_MESSAGES[ error?.code ] ) {\n\t\treturn ERROR_MESSAGES[ error.code ];\n\t}\n\n\treturn ERROR_MESSAGES[ UNKNOWN_ERROR ];\n}\n"],
|
|
5
|
-
"mappings": ";AAIA,SAAS,UAAU;AAIZ,IAAM,wBAAwB;AAC9B,IAAM,qBAAqB;AAC3B,IAAM,4BAA4B;AAClC,IAAM,+BAA+B;AACrC,IAAM,gBAAgB;AAU7B,IAAM,iBAA4D;AAAA,EACjE,CAAE,qBAAsB,GAAG;AAAA,IAC1B,OAAO,GAAI,mBAAoB;AAAA,IAC/B,aAAa;AAAA,MACZ;AAAA,IAED;AAAA,EACD;AAAA,EACA,CAAE,kBAAmB,GAAG;AAAA,IACvB,OAAO,GAAI,oBAAqB;AAAA,IAChC,aAAa;AAAA,MACZ;AAAA,IAED;AAAA,EACD;AAAA,EACA,CAAE,yBAA0B,GAAG;AAAA,IAC9B,OAAO,GAAI,4BAA6B;AAAA,IACxC,aAAa;AAAA,MACZ;AAAA,IAED;AAAA,EACD;AAAA;AAAA;AAAA,EAGA,CAAE,aAAc,GAAG;AAAA,IAClB,OAAO,GAAI,iBAAkB;AAAA,IAC7B,aAAa;AAAA,MACZ;AAAA,IAED;AAAA,EACD;AACD;AAUO,SAAS,qBACf,OAC0B;AAC1B,MAAK,OAAO,QAAQ,eAAgB,OAAO,IAAK,GAAI;AACnD,WAAO,eAAgB,MAAM,IAAK;AAAA,EACnC;AAEA,SAAO,eAAgB,aAAc;AACtC;",
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { type ConnectionError } from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\n\n// These error codes are defined in the sync package:\n// packages/sync/src/errors.ts\nexport const AUTHENTICATION_FAILED = 'authentication-failed';\nexport const CONNECTION_EXPIRED = 'connection-expired';\nexport const CONNECTION_LIMIT_EXCEEDED = 'connection-limit-exceeded';\nexport const DOCUMENT_SIZE_LIMIT_EXCEEDED = 'document-size-limit-exceeded';\nexport const PROTOCOL_MISMATCH = 'protocol-mismatch';\nexport const UNKNOWN_ERROR = 'unknown-error';\n\ninterface ConnectionErrorMessages {\n\tdescription: string;\n\ttitle: string;\n}\n\n/**\n * Default error messages for known error codes.\n */\nconst ERROR_MESSAGES: Record< string, ConnectionErrorMessages > = {\n\t[ AUTHENTICATION_FAILED ]: {\n\t\ttitle: __( 'Unable to connect' ),\n\t\tdescription: __(\n\t\t\t\"Real-time collaboration couldn't verify your permissions. \" +\n\t\t\t\t'Check that you have access to edit this post or contact your site administrator.'\n\t\t),\n\t},\n\t[ CONNECTION_EXPIRED ]: {\n\t\ttitle: __( 'Connection expired' ),\n\t\tdescription: __(\n\t\t\t'Your connection to real-time collaboration has timed out. ' +\n\t\t\t\t'Editing is paused to prevent conflicts with other editors.'\n\t\t),\n\t},\n\t[ CONNECTION_LIMIT_EXCEEDED ]: {\n\t\ttitle: __( 'Too many editors connected' ),\n\t\tdescription: __(\n\t\t\t'Real-time collaboration has reached its connection limit. ' +\n\t\t\t\t'Try again later or contact your site administrator.'\n\t\t),\n\t},\n\t[ PROTOCOL_MISMATCH ]: {\n\t\ttitle: __( 'Protocol update' ),\n\t\tdescription: __(\n\t\t\t'Real-time collaboration has been updated. ' +\n\t\t\t\t'Please refresh the page to continue editing.'\n\t\t),\n\t},\n\t// DOCUMENT_SIZE_LIMIT_EXCEEDED is not included here because it results in\n\t// collaboration being disabled entirely.\n\t[ UNKNOWN_ERROR ]: {\n\t\ttitle: __( 'Connection lost' ),\n\t\tdescription: __(\n\t\t\t'The connection to real-time collaboration was interrupted. ' +\n\t\t\t\t'Editing is paused to prevent conflicts with other editors.'\n\t\t),\n\t},\n};\n\n/**\n * Get user-facing title and description from a sync connection error.\n *\n * Provides default messages based on error.code.\n *\n * @param error - Connection error.\n * @return Object with title, description, and canRetry flag.\n */\nexport function getSyncErrorMessages(\n\terror?: ConnectionError\n): ConnectionErrorMessages {\n\tif ( error?.code && ERROR_MESSAGES[ error?.code ] ) {\n\t\treturn ERROR_MESSAGES[ error.code ];\n\t}\n\n\treturn ERROR_MESSAGES[ UNKNOWN_ERROR ];\n}\n"],
|
|
5
|
+
"mappings": ";AAIA,SAAS,UAAU;AAIZ,IAAM,wBAAwB;AAC9B,IAAM,qBAAqB;AAC3B,IAAM,4BAA4B;AAClC,IAAM,+BAA+B;AACrC,IAAM,oBAAoB;AAC1B,IAAM,gBAAgB;AAU7B,IAAM,iBAA4D;AAAA,EACjE,CAAE,qBAAsB,GAAG;AAAA,IAC1B,OAAO,GAAI,mBAAoB;AAAA,IAC/B,aAAa;AAAA,MACZ;AAAA,IAED;AAAA,EACD;AAAA,EACA,CAAE,kBAAmB,GAAG;AAAA,IACvB,OAAO,GAAI,oBAAqB;AAAA,IAChC,aAAa;AAAA,MACZ;AAAA,IAED;AAAA,EACD;AAAA,EACA,CAAE,yBAA0B,GAAG;AAAA,IAC9B,OAAO,GAAI,4BAA6B;AAAA,IACxC,aAAa;AAAA,MACZ;AAAA,IAED;AAAA,EACD;AAAA,EACA,CAAE,iBAAkB,GAAG;AAAA,IACtB,OAAO,GAAI,iBAAkB;AAAA,IAC7B,aAAa;AAAA,MACZ;AAAA,IAED;AAAA,EACD;AAAA;AAAA;AAAA,EAGA,CAAE,aAAc,GAAG;AAAA,IAClB,OAAO,GAAI,iBAAkB;AAAA,IAC7B,aAAa;AAAA,MACZ;AAAA,IAED;AAAA,EACD;AACD;AAUO,SAAS,qBACf,OAC0B;AAC1B,MAAK,OAAO,QAAQ,eAAgB,OAAO,IAAK,GAAI;AACnD,WAAO,eAAgB,MAAM,IAAK;AAAA,EACnC;AAEA,SAAO,eAAgB,aAAc;AACtC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|