@wordpress/editor 14.44.0 → 14.45.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/collab-sidebar/{comment-menu-item.cjs → add-note-menu-item.cjs} +17 -14
- package/build/components/collab-sidebar/add-note-menu-item.cjs.map +7 -0
- package/build/components/collab-sidebar/add-note.cjs +100 -0
- package/build/components/collab-sidebar/add-note.cjs.map +7 -0
- package/build/components/collab-sidebar/board-store.cjs +106 -0
- package/build/components/collab-sidebar/board-store.cjs.map +7 -0
- package/build/components/collab-sidebar/floating-container.cjs +63 -0
- package/build/components/collab-sidebar/floating-container.cjs.map +7 -0
- package/build/components/collab-sidebar/hooks.cjs +105 -140
- package/build/components/collab-sidebar/hooks.cjs.map +3 -3
- package/build/components/collab-sidebar/index.cjs +28 -90
- package/build/components/collab-sidebar/index.cjs.map +3 -3
- package/build/components/collab-sidebar/{comment-author-info.cjs → note-byline.cjs} +13 -9
- package/build/components/collab-sidebar/note-byline.cjs.map +7 -0
- package/build/components/collab-sidebar/note-card.cjs +58 -0
- package/build/components/collab-sidebar/note-card.cjs.map +7 -0
- package/build/components/collab-sidebar/{comment-form.cjs → note-form.cjs} +46 -45
- package/build/components/collab-sidebar/note-form.cjs.map +7 -0
- package/build/components/collab-sidebar/{comment-indicator-toolbar.cjs → note-indicator-toolbar.cjs} +31 -27
- package/build/components/collab-sidebar/note-indicator-toolbar.cjs.map +7 -0
- package/build/components/collab-sidebar/note-thread.cjs +321 -0
- package/build/components/collab-sidebar/note-thread.cjs.map +7 -0
- package/build/components/collab-sidebar/note.cjs +207 -0
- package/build/components/collab-sidebar/note.cjs.map +7 -0
- package/build/components/collab-sidebar/notes.cjs +237 -0
- package/build/components/collab-sidebar/notes.cjs.map +7 -0
- package/build/components/collab-sidebar/utils.cjs +80 -14
- package/build/components/collab-sidebar/utils.cjs.map +2 -2
- package/build/components/collaborators-presence/avatar/component.cjs.map +1 -1
- package/build/components/collaborators-presence/index.cjs +3 -3
- package/build/components/collaborators-presence/index.cjs.map +2 -2
- package/build/components/collaborators-presence/list.cjs +3 -3
- package/build/components/collaborators-presence/list.cjs.map +2 -2
- package/build/components/document-bar/index.cjs.map +3 -3
- package/build/components/error-boundary/index.cjs.map +3 -3
- package/build/components/list-view-sidebar/list-view-outline.cjs.map +3 -3
- package/build/components/media/media-editor-modal.cjs +93 -0
- package/build/components/media/media-editor-modal.cjs.map +7 -0
- package/build/components/media-categories/index.cjs +1 -1
- package/build/components/media-categories/index.cjs.map +1 -1
- package/build/components/more-menu/index.cjs +4 -3
- package/build/components/more-menu/index.cjs.map +2 -2
- package/build/components/post-actions/set-as-homepage.cjs.map +3 -3
- package/build/components/post-actions/set-as-posts-page.cjs.map +3 -3
- package/build/components/post-card-panel/index.cjs +2 -2
- package/build/components/post-card-panel/index.cjs.map +3 -3
- package/build/components/post-content-information/index.cjs.map +3 -3
- package/build/components/post-excerpt/panel.cjs.map +3 -3
- package/build/components/post-last-edited-panel/index.cjs.map +3 -3
- package/build/components/post-preview-button/index.cjs +3 -2
- package/build/components/post-preview-button/index.cjs.map +2 -2
- package/build/components/post-publish-button/index.cjs +2 -2
- package/build/components/post-publish-button/index.cjs.map +2 -2
- package/build/components/post-publish-button/label.cjs +4 -2
- package/build/components/post-publish-button/label.cjs.map +2 -2
- package/build/components/post-publish-panel/maybe-upload-media.cjs +1 -1
- package/build/components/post-publish-panel/maybe-upload-media.cjs.map +1 -1
- package/build/components/post-publish-panel/postpublish.cjs +3 -2
- package/build/components/post-publish-panel/postpublish.cjs.map +2 -2
- package/build/components/post-revisions-panel/index.cjs +2 -2
- package/build/components/post-revisions-panel/index.cjs.map +2 -2
- package/build/components/post-revisions-preview/diff-markers.cjs +1 -1
- package/build/components/post-revisions-preview/diff-markers.cjs.map +2 -2
- package/build/components/post-revisions-preview/revisions-slider.cjs +1 -0
- package/build/components/post-revisions-preview/revisions-slider.cjs.map +2 -2
- package/build/components/post-saved-state/index.cjs +4 -1
- package/build/components/post-saved-state/index.cjs.map +2 -2
- package/build/components/post-text-editor/index.cjs +3 -4
- package/build/components/post-text-editor/index.cjs.map +2 -2
- package/build/components/preview-dropdown/index.cjs +3 -2
- package/build/components/preview-dropdown/index.cjs.map +2 -2
- package/build/components/provider/index.cjs +3 -1
- package/build/components/provider/index.cjs.map +3 -3
- package/build/components/provider/use-block-editor-settings.cjs +7 -1
- package/build/components/provider/use-block-editor-settings.cjs.map +3 -3
- package/build/components/provider/use-upload-save-lock.cjs +2 -12
- package/build/components/provider/use-upload-save-lock.cjs.map +2 -2
- package/build/components/resizable-editor/resize-handle.cjs +2 -1
- package/build/components/resizable-editor/resize-handle.cjs.map +2 -2
- package/build/components/revision-created-panel/index.cjs.map +3 -3
- package/build/components/site-discussion/index.cjs.map +2 -2
- package/build/components/style-book/constants.cjs +1 -1
- package/build/components/style-book/constants.cjs.map +1 -1
- package/build/components/style-book/index.cjs +1 -1
- package/build/components/style-book/index.cjs.map +1 -1
- package/build/components/template-actions-panel/classic-theme-content.cjs.map +2 -2
- package/build/components/template-part-menu-items/convert-to-regular.cjs +54 -11
- package/build/components/template-part-menu-items/convert-to-regular.cjs.map +3 -3
- package/build/components/visual-editor/index.cjs +5 -22
- package/build/components/visual-editor/index.cjs.map +2 -2
- package/build/store/private-actions.cjs +0 -8
- package/build/store/private-actions.cjs.map +2 -2
- package/build/store/private-selectors.cjs +0 -5
- package/build/store/private-selectors.cjs.map +2 -2
- package/build/store/reducer.cjs +0 -10
- package/build/store/reducer.cjs.map +2 -2
- package/build/utils/media-finalize/index.cjs +3 -2
- package/build/utils/media-finalize/index.cjs.map +2 -2
- package/build/utils/media-upload/index.cjs +14 -25
- package/build/utils/media-upload/index.cjs.map +2 -2
- package/build-module/components/collab-sidebar/{comment-menu-item.mjs → add-note-menu-item.mjs} +10 -11
- package/build-module/components/collab-sidebar/add-note-menu-item.mjs.map +7 -0
- package/build-module/components/collab-sidebar/add-note.mjs +78 -0
- package/build-module/components/collab-sidebar/add-note.mjs.map +7 -0
- package/build-module/components/collab-sidebar/board-store.mjs +81 -0
- package/build-module/components/collab-sidebar/board-store.mjs.map +7 -0
- package/build-module/components/collab-sidebar/floating-container.mjs +28 -0
- package/build-module/components/collab-sidebar/floating-container.mjs.map +7 -0
- package/build-module/components/collab-sidebar/hooks.mjs +105 -144
- package/build-module/components/collab-sidebar/hooks.mjs.map +2 -2
- package/build-module/components/collab-sidebar/index.mjs +29 -95
- package/build-module/components/collab-sidebar/index.mjs.map +2 -2
- package/build-module/components/collab-sidebar/{comment-author-info.mjs → note-byline.mjs} +7 -7
- package/build-module/components/collab-sidebar/note-byline.mjs.map +7 -0
- package/build-module/components/collab-sidebar/note-card.mjs +33 -0
- package/build-module/components/collab-sidebar/note-card.mjs.map +7 -0
- package/build-module/components/collab-sidebar/note-form.mjs +84 -0
- package/build-module/components/collab-sidebar/note-form.mjs.map +7 -0
- package/build-module/components/collab-sidebar/{comment-indicator-toolbar.mjs → note-indicator-toolbar.mjs} +25 -29
- package/build-module/components/collab-sidebar/note-indicator-toolbar.mjs.map +7 -0
- package/build-module/components/collab-sidebar/note-thread.mjs +289 -0
- package/build-module/components/collab-sidebar/note-thread.mjs.map +7 -0
- package/build-module/components/collab-sidebar/note.mjs +176 -0
- package/build-module/components/collab-sidebar/note.mjs.map +7 -0
- package/build-module/components/collab-sidebar/notes.mjs +215 -0
- package/build-module/components/collab-sidebar/notes.mjs.map +7 -0
- package/build-module/components/collab-sidebar/utils.mjs +76 -10
- package/build-module/components/collab-sidebar/utils.mjs.map +2 -2
- package/build-module/components/collaborators-presence/avatar/component.mjs.map +1 -1
- package/build-module/components/collaborators-presence/index.mjs +3 -3
- package/build-module/components/collaborators-presence/index.mjs.map +2 -2
- package/build-module/components/collaborators-presence/list.mjs +3 -3
- package/build-module/components/collaborators-presence/list.mjs.map +2 -2
- package/build-module/components/document-bar/index.mjs +3 -3
- package/build-module/components/document-bar/index.mjs.map +2 -2
- package/build-module/components/error-boundary/index.mjs +2 -2
- package/build-module/components/error-boundary/index.mjs.map +2 -2
- package/build-module/components/list-view-sidebar/list-view-outline.mjs +5 -5
- package/build-module/components/list-view-sidebar/list-view-outline.mjs.map +2 -2
- package/build-module/components/media/media-editor-modal.mjs +62 -0
- package/build-module/components/media/media-editor-modal.mjs.map +7 -0
- package/build-module/components/media-categories/index.mjs +1 -1
- package/build-module/components/media-categories/index.mjs.map +1 -1
- package/build-module/components/more-menu/index.mjs +4 -8
- package/build-module/components/more-menu/index.mjs.map +2 -2
- package/build-module/components/post-actions/set-as-homepage.mjs +2 -2
- package/build-module/components/post-actions/set-as-homepage.mjs.map +2 -2
- package/build-module/components/post-actions/set-as-posts-page.mjs +2 -2
- package/build-module/components/post-actions/set-as-posts-page.mjs.map +2 -2
- package/build-module/components/post-card-panel/index.mjs +5 -5
- package/build-module/components/post-card-panel/index.mjs.map +2 -2
- package/build-module/components/post-content-information/index.mjs +2 -2
- package/build-module/components/post-content-information/index.mjs.map +2 -2
- package/build-module/components/post-excerpt/panel.mjs +2 -2
- package/build-module/components/post-excerpt/panel.mjs.map +2 -2
- package/build-module/components/post-last-edited-panel/index.mjs +2 -2
- package/build-module/components/post-last-edited-panel/index.mjs.map +2 -2
- package/build-module/components/post-preview-button/index.mjs +3 -2
- package/build-module/components/post-preview-button/index.mjs.map +2 -2
- package/build-module/components/post-publish-button/index.mjs +2 -2
- package/build-module/components/post-publish-button/index.mjs.map +2 -2
- package/build-module/components/post-publish-button/label.mjs +4 -2
- package/build-module/components/post-publish-button/label.mjs.map +2 -2
- package/build-module/components/post-publish-panel/maybe-upload-media.mjs +1 -1
- package/build-module/components/post-publish-panel/maybe-upload-media.mjs.map +1 -1
- package/build-module/components/post-publish-panel/postpublish.mjs +3 -3
- package/build-module/components/post-publish-panel/postpublish.mjs.map +2 -2
- package/build-module/components/post-revisions-panel/index.mjs +2 -2
- package/build-module/components/post-revisions-panel/index.mjs.map +2 -2
- package/build-module/components/post-revisions-preview/diff-markers.mjs +1 -1
- package/build-module/components/post-revisions-preview/diff-markers.mjs.map +2 -2
- package/build-module/components/post-revisions-preview/revisions-slider.mjs +1 -0
- package/build-module/components/post-revisions-preview/revisions-slider.mjs.map +2 -2
- package/build-module/components/post-saved-state/index.mjs +4 -1
- package/build-module/components/post-saved-state/index.mjs.map +2 -2
- package/build-module/components/post-text-editor/index.mjs +2 -3
- package/build-module/components/post-text-editor/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 +3 -1
- package/build-module/components/provider/index.mjs.map +2 -2
- package/build-module/components/provider/use-block-editor-settings.mjs +7 -1
- package/build-module/components/provider/use-block-editor-settings.mjs.map +2 -2
- package/build-module/components/provider/use-upload-save-lock.mjs +2 -12
- package/build-module/components/provider/use-upload-save-lock.mjs.map +2 -2
- package/build-module/components/resizable-editor/resize-handle.mjs +2 -5
- package/build-module/components/resizable-editor/resize-handle.mjs.map +2 -2
- package/build-module/components/revision-created-panel/index.mjs +2 -2
- package/build-module/components/revision-created-panel/index.mjs.map +2 -2
- package/build-module/components/site-discussion/index.mjs +2 -2
- package/build-module/components/site-discussion/index.mjs.map +2 -2
- package/build-module/components/style-book/constants.mjs +1 -1
- package/build-module/components/style-book/constants.mjs.map +1 -1
- package/build-module/components/style-book/index.mjs +1 -1
- package/build-module/components/style-book/index.mjs.map +1 -1
- package/build-module/components/template-actions-panel/classic-theme-content.mjs +2 -2
- package/build-module/components/template-actions-panel/classic-theme-content.mjs.map +2 -2
- package/build-module/components/template-part-menu-items/convert-to-regular.mjs +60 -14
- package/build-module/components/template-part-menu-items/convert-to-regular.mjs.map +2 -2
- package/build-module/components/visual-editor/index.mjs +5 -22
- package/build-module/components/visual-editor/index.mjs.map +2 -2
- package/build-module/store/private-actions.mjs +0 -7
- package/build-module/store/private-actions.mjs.map +2 -2
- package/build-module/store/private-selectors.mjs +0 -4
- package/build-module/store/private-selectors.mjs.map +2 -2
- package/build-module/store/reducer.mjs +0 -9
- package/build-module/store/reducer.mjs.map +2 -2
- package/build-module/utils/media-finalize/index.mjs +3 -2
- package/build-module/utils/media-finalize/index.mjs.map +2 -2
- package/build-module/utils/media-upload/index.mjs +14 -25
- package/build-module/utils/media-upload/index.mjs.map +2 -2
- package/build-style/style-rtl.css +397 -171
- package/build-style/style.css +397 -171
- package/build-types/components/collab-sidebar/add-note-menu-item.d.ts +5 -0
- package/build-types/components/collab-sidebar/add-note-menu-item.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/add-note.d.ts +6 -0
- package/build-types/components/collab-sidebar/add-note.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/board-store.d.ts +9 -0
- package/build-types/components/collab-sidebar/board-store.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/floating-container.d.ts +8 -0
- package/build-types/components/collab-sidebar/floating-container.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/hooks.d.ts +13 -22
- 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 +7 -0
- package/build-types/components/collab-sidebar/note-byline.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/note-card.d.ts +8 -0
- package/build-types/components/collab-sidebar/note-card.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/note-form.d.ts +7 -0
- package/build-types/components/collab-sidebar/note-form.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/note-indicator-toolbar.d.ts +5 -0
- package/build-types/components/collab-sidebar/note-indicator-toolbar.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/note-thread.d.ts +11 -0
- package/build-types/components/collab-sidebar/note-thread.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/note.d.ts +9 -0
- package/build-types/components/collab-sidebar/note.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/notes.d.ts +7 -0
- package/build-types/components/collab-sidebar/notes.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/utils.d.ts +41 -17
- package/build-types/components/collab-sidebar/utils.d.ts.map +1 -1
- package/build-types/components/media/media-editor-modal.d.ts +11 -0
- package/build-types/components/media/media-editor-modal.d.ts.map +1 -0
- package/build-types/components/more-menu/index.d.ts.map +1 -1
- package/build-types/components/post-preview-button/index.d.ts.map +1 -1
- package/build-types/components/post-publish-button/index.d.ts.map +1 -1
- package/build-types/components/post-publish-button/label.d.ts.map +1 -1
- package/build-types/components/post-revisions-preview/revisions-slider.d.ts.map +1 -1
- package/build-types/components/post-saved-state/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/provider/use-upload-save-lock.d.ts +0 -2
- package/build-types/components/provider/use-upload-save-lock.d.ts.map +1 -1
- package/build-types/components/resizable-editor/resize-handle.d.ts.map +1 -1
- package/build-types/components/style-book/constants.d.ts +1 -1
- package/build-types/components/style-book/constants.d.ts.map +1 -1
- package/build-types/components/template-part-menu-items/convert-to-regular.d.ts.map +1 -1
- package/build-types/components/visual-editor/index.d.ts.map +1 -1
- package/build-types/store/private-actions.d.ts +0 -7
- package/build-types/store/private-actions.d.ts.map +1 -1
- package/build-types/store/private-selectors.d.ts +0 -7
- package/build-types/store/private-selectors.d.ts.map +1 -1
- package/build-types/store/reducer.d.ts +0 -10
- package/build-types/store/reducer.d.ts.map +1 -1
- 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/media-upload/index.d.ts.map +1 -1
- package/package.json +46 -46
- package/src/components/collab-sidebar/README.md +117 -0
- package/src/components/collab-sidebar/{comment-menu-item.js → add-note-menu-item.js} +8 -10
- package/src/components/collab-sidebar/{add-comment.js → add-note.js} +26 -49
- package/src/components/collab-sidebar/board-store.js +85 -0
- package/src/components/collab-sidebar/floating-container.js +30 -0
- package/src/components/collab-sidebar/hooks.js +130 -178
- package/src/components/collab-sidebar/index.js +35 -106
- package/src/components/collab-sidebar/{comment-author-info.js → note-byline.js} +5 -6
- package/src/components/collab-sidebar/note-card.js +36 -0
- package/src/components/collab-sidebar/{comment-form.js → note-form.js} +29 -40
- package/src/components/collab-sidebar/{comment-indicator-toolbar.js → note-indicator-toolbar.js} +29 -32
- package/src/components/collab-sidebar/note-thread.js +331 -0
- package/src/components/collab-sidebar/note.js +209 -0
- package/src/components/collab-sidebar/notes.js +276 -0
- package/src/components/collab-sidebar/style.scss +21 -11
- package/src/components/collab-sidebar/test/utils.js +155 -0
- package/src/components/collab-sidebar/utils.js +125 -19
- package/src/components/collaborators-presence/avatar/component.tsx +1 -1
- package/src/components/collaborators-presence/styles/collaborators-list.scss +1 -1
- package/src/components/collaborators-presence/styles/collaborators-presence.scss +1 -1
- package/src/components/document-bar/index.js +4 -4
- package/src/components/document-outline/style.scss +1 -1
- package/src/components/error-boundary/index.js +3 -3
- package/src/components/list-view-sidebar/list-view-outline.js +6 -6
- package/src/components/media/media-editor-modal.js +95 -0
- package/src/components/media-categories/index.js +1 -1
- package/src/components/more-menu/index.js +4 -8
- package/src/components/post-actions/set-as-homepage.js +2 -2
- package/src/components/post-actions/set-as-posts-page.js +2 -2
- package/src/components/post-card-panel/index.js +7 -7
- package/src/components/post-content-information/index.js +3 -3
- package/src/components/post-excerpt/panel.js +3 -3
- package/src/components/post-last-edited-panel/index.js +3 -3
- package/src/components/post-preview-button/index.js +3 -2
- package/src/components/post-publish-button/index.js +6 -5
- package/src/components/post-publish-button/label.js +3 -1
- package/src/components/post-publish-panel/maybe-upload-media.js +1 -1
- package/src/components/post-publish-panel/postpublish.js +2 -2
- package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +10 -16
- package/src/components/post-revisions-panel/index.js +3 -3
- package/src/components/post-revisions-preview/diff-markers.js +1 -1
- package/src/components/post-revisions-preview/revisions-slider.js +1 -0
- package/src/components/post-revisions-preview/style.scss +1 -1
- package/src/components/post-saved-state/index.js +4 -1
- package/src/components/post-saved-state/test/__snapshots__/index.js.snap +0 -1
- package/src/components/post-text-editor/index.js +3 -3
- package/src/components/preview-dropdown/index.js +2 -2
- package/src/components/provider/index.js +4 -0
- package/src/components/provider/use-block-editor-settings.js +10 -0
- package/src/components/provider/use-upload-save-lock.js +2 -17
- package/src/components/resizable-editor/resize-handle.js +2 -5
- package/src/components/revision-created-panel/index.js +3 -3
- package/src/components/site-discussion/index.js +3 -3
- package/src/components/style-book/constants.ts +1 -1
- package/src/components/style-book/index.js +1 -1
- package/src/components/template-actions-panel/classic-theme-content.js +3 -3
- package/src/components/template-actions-panel/style.scss +1 -1
- package/src/components/template-part-menu-items/convert-to-regular.js +74 -12
- package/src/components/visual-editor/index.js +2 -29
- package/src/store/private-actions.js +0 -13
- package/src/store/private-selectors.js +0 -10
- package/src/store/reducer.js +0 -16
- package/src/utils/media-finalize/index.js +2 -1
- package/src/utils/media-finalize/test/index.js +25 -1
- package/src/utils/media-upload/index.js +26 -29
- package/build/components/collab-sidebar/add-comment.cjs +0 -129
- package/build/components/collab-sidebar/add-comment.cjs.map +0 -7
- package/build/components/collab-sidebar/comment-author-info.cjs.map +0 -7
- package/build/components/collab-sidebar/comment-form.cjs.map +0 -7
- package/build/components/collab-sidebar/comment-indicator-toolbar.cjs.map +0 -7
- package/build/components/collab-sidebar/comment-menu-item.cjs.map +0 -7
- package/build/components/collab-sidebar/comments.cjs +0 -816
- package/build/components/collab-sidebar/comments.cjs.map +0 -7
- package/build-module/components/collab-sidebar/add-comment.mjs +0 -100
- package/build-module/components/collab-sidebar/add-comment.mjs.map +0 -7
- package/build-module/components/collab-sidebar/comment-author-info.mjs.map +0 -7
- package/build-module/components/collab-sidebar/comment-form.mjs +0 -90
- package/build-module/components/collab-sidebar/comment-form.mjs.map +0 -7
- package/build-module/components/collab-sidebar/comment-indicator-toolbar.mjs.map +0 -7
- package/build-module/components/collab-sidebar/comment-menu-item.mjs.map +0 -7
- package/build-module/components/collab-sidebar/comments.mjs +0 -799
- package/build-module/components/collab-sidebar/comments.mjs.map +0 -7
- package/build-types/components/collab-sidebar/add-comment.d.ts +0 -10
- package/build-types/components/collab-sidebar/add-comment.d.ts.map +0 -1
- package/build-types/components/collab-sidebar/comment-author-info.d.ts +0 -8
- package/build-types/components/collab-sidebar/comment-author-info.d.ts.map +0 -1
- package/build-types/components/collab-sidebar/comment-form.d.ts +0 -11
- package/build-types/components/collab-sidebar/comment-form.d.ts.map +0 -1
- package/build-types/components/collab-sidebar/comment-indicator-toolbar.d.ts +0 -6
- package/build-types/components/collab-sidebar/comment-indicator-toolbar.d.ts.map +0 -1
- package/build-types/components/collab-sidebar/comment-menu-item.d.ts +0 -6
- package/build-types/components/collab-sidebar/comment-menu-item.d.ts.map +0 -1
- package/build-types/components/collab-sidebar/comments.d.ts +0 -12
- package/build-types/components/collab-sidebar/comments.d.ts.map +0 -1
- package/src/components/collab-sidebar/comments.js +0 -985
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
Button,
|
|
7
7
|
__experimentalHStack as HStack,
|
|
8
8
|
__experimentalVStack as VStack,
|
|
9
|
-
__experimentalText as
|
|
9
|
+
__experimentalText as WCText,
|
|
10
10
|
privateApis as componentsPrivateApis,
|
|
11
11
|
} from '@wordpress/components';
|
|
12
12
|
import { close } from '@wordpress/icons';
|
|
@@ -28,7 +28,7 @@ import { unlock } from '../../lock-unlock';
|
|
|
28
28
|
import PostActions from '../post-actions';
|
|
29
29
|
import usePageTypeBadge from '../../utils/pageTypeBadge';
|
|
30
30
|
import { getTemplateInfo } from '../../utils/get-template-info';
|
|
31
|
-
const { Badge } = unlock( componentsPrivateApis );
|
|
31
|
+
const { Badge: WCBadge } = unlock( componentsPrivateApis );
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Renders a title of the post type and the available quick actions available within a 3-dot dropdown.
|
|
@@ -131,7 +131,7 @@ export default function PostCardPanel( {
|
|
|
131
131
|
alignment="flex-start"
|
|
132
132
|
>
|
|
133
133
|
<Icon className="editor-post-card-panel__icon" icon={ icon } />
|
|
134
|
-
<
|
|
134
|
+
<WCText
|
|
135
135
|
numberOfLines={ 2 }
|
|
136
136
|
truncate
|
|
137
137
|
className="editor-post-card-panel__title"
|
|
@@ -141,9 +141,9 @@ export default function PostCardPanel( {
|
|
|
141
141
|
{ title }
|
|
142
142
|
</span>
|
|
143
143
|
{ pageTypeBadge && postIds.length === 1 && (
|
|
144
|
-
<
|
|
144
|
+
<WCBadge>{ pageTypeBadge }</WCBadge>
|
|
145
145
|
) }
|
|
146
|
-
</
|
|
146
|
+
</WCText>
|
|
147
147
|
{ ! hideActions && postIds.length === 1 && (
|
|
148
148
|
<PostActions
|
|
149
149
|
postType={ postType }
|
|
@@ -161,13 +161,13 @@ export default function PostCardPanel( {
|
|
|
161
161
|
) }
|
|
162
162
|
</HStack>
|
|
163
163
|
{ postIds.length > 1 && (
|
|
164
|
-
<
|
|
164
|
+
<WCText className="editor-post-card-panel__description">
|
|
165
165
|
{ sprintf(
|
|
166
166
|
// translators: %s: Name of the plural post type e.g: "Posts".
|
|
167
167
|
__( 'Changes will be applied to all selected %s.' ),
|
|
168
168
|
labels?.name.toLowerCase()
|
|
169
169
|
) }
|
|
170
|
-
</
|
|
170
|
+
</WCText>
|
|
171
171
|
) }
|
|
172
172
|
</VStack>
|
|
173
173
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { __experimentalText as
|
|
4
|
+
import { __experimentalText as WCText } from '@wordpress/components';
|
|
5
5
|
import { useSelect } from '@wordpress/data';
|
|
6
6
|
import { __, _x, _n, sprintf } from '@wordpress/i18n';
|
|
7
7
|
import { count as wordCount } from '@wordpress/wordcount';
|
|
@@ -76,14 +76,14 @@ export function PostContentInformationUI( { postContent } ) {
|
|
|
76
76
|
);
|
|
77
77
|
return (
|
|
78
78
|
<div className="editor-post-content-information">
|
|
79
|
-
<
|
|
79
|
+
<WCText>
|
|
80
80
|
{ sprintf(
|
|
81
81
|
/* translators: 1: How many words a post has. 2: the number of minutes to read the post (e.g. 130 words, 2 minutes read time.) */
|
|
82
82
|
__( '%1$s, %2$s read time.' ),
|
|
83
83
|
wordsCountText,
|
|
84
84
|
minutesText
|
|
85
85
|
) }
|
|
86
|
-
</
|
|
86
|
+
</WCText>
|
|
87
87
|
</div>
|
|
88
88
|
);
|
|
89
89
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
5
|
import {
|
|
6
6
|
PanelBody,
|
|
7
|
-
__experimentalText as
|
|
7
|
+
__experimentalText as WCText,
|
|
8
8
|
Dropdown,
|
|
9
9
|
Button,
|
|
10
10
|
__experimentalVStack as VStack,
|
|
@@ -185,9 +185,9 @@ function PrivateExcerpt() {
|
|
|
185
185
|
return false;
|
|
186
186
|
}
|
|
187
187
|
const excerptText = !! excerpt && (
|
|
188
|
-
<
|
|
188
|
+
<WCText align="left" numberOfLines={ 4 } truncate={ allowEditing }>
|
|
189
189
|
{ decodeEntities( excerpt ) }
|
|
190
|
-
</
|
|
190
|
+
</WCText>
|
|
191
191
|
);
|
|
192
192
|
if ( ! allowEditing ) {
|
|
193
193
|
return excerptText;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { __experimentalText as
|
|
4
|
+
import { __experimentalText as WCText } from '@wordpress/components';
|
|
5
5
|
import { useSelect } from '@wordpress/data';
|
|
6
6
|
import { __, sprintf } from '@wordpress/i18n';
|
|
7
7
|
import { humanTimeDiff } from '@wordpress/date';
|
|
@@ -22,13 +22,13 @@ export default function PostLastEditedPanel() {
|
|
|
22
22
|
}
|
|
23
23
|
return (
|
|
24
24
|
<div className="editor-post-last-edited-panel">
|
|
25
|
-
<
|
|
25
|
+
<WCText>
|
|
26
26
|
{ sprintf(
|
|
27
27
|
// translators: %s: Human-readable time difference, e.g. "2 days ago".
|
|
28
28
|
__( 'Last edited %s.' ),
|
|
29
29
|
humanTimeDiff( modified )
|
|
30
30
|
) }
|
|
31
|
-
</
|
|
31
|
+
</WCText>
|
|
32
32
|
</div>
|
|
33
33
|
);
|
|
34
34
|
}
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { renderToString } from '@wordpress/element';
|
|
5
|
-
import { Button, Path, SVG
|
|
5
|
+
import { Button, Path, SVG } from '@wordpress/components';
|
|
6
6
|
import { __, _x } from '@wordpress/i18n';
|
|
7
7
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
8
8
|
import { applyFilters } from '@wordpress/hooks';
|
|
9
9
|
import { store as coreStore } from '@wordpress/core-data';
|
|
10
|
+
import { VisuallyHidden } from '@wordpress/ui';
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Internal dependencies
|
|
@@ -196,7 +197,7 @@ export default function PostPreviewButton( {
|
|
|
196
197
|
{ textContent || (
|
|
197
198
|
<>
|
|
198
199
|
{ _x( 'Preview', 'imperative verb' ) }
|
|
199
|
-
<VisuallyHidden
|
|
200
|
+
<VisuallyHidden render={ <span /> }>
|
|
200
201
|
{
|
|
201
202
|
/* translators: accessibility text */
|
|
202
203
|
__( '(opens in a new tab)' )
|
|
@@ -101,18 +101,19 @@ export class PostPublishButton extends Component {
|
|
|
101
101
|
} = this.props;
|
|
102
102
|
|
|
103
103
|
const isButtonDisabled =
|
|
104
|
-
|
|
104
|
+
isPostSavingLocked ||
|
|
105
|
+
( ( isSaving ||
|
|
105
106
|
! isSaveable ||
|
|
106
|
-
isPostSavingLocked ||
|
|
107
107
|
( ! isPublishable && ! forceIsDirty ) ) &&
|
|
108
|
-
|
|
108
|
+
( ! hasNonPostEntityChanges || isSavingNonPostEntityChanges ) );
|
|
109
109
|
|
|
110
110
|
const isToggleDisabled =
|
|
111
|
-
|
|
111
|
+
isPostSavingLocked ||
|
|
112
|
+
( ( isPublished ||
|
|
112
113
|
isSaving ||
|
|
113
114
|
! isSaveable ||
|
|
114
115
|
( ! isPublishable && ! forceIsDirty ) ) &&
|
|
115
|
-
|
|
116
|
+
( ! hasNonPostEntityChanges || isSavingNonPostEntityChanges ) );
|
|
116
117
|
|
|
117
118
|
// If the new status has not changed explicitly, we derive it from
|
|
118
119
|
// other factors, like having a publish action, etc.. We need to preserve
|
|
@@ -29,6 +29,7 @@ export default function PublishButtonLabel() {
|
|
|
29
29
|
postStatusHasChanged,
|
|
30
30
|
postStatus,
|
|
31
31
|
postType,
|
|
32
|
+
isPostSavingLocked,
|
|
32
33
|
} = useSelect( ( select ) => {
|
|
33
34
|
const {
|
|
34
35
|
isCurrentPostPublished,
|
|
@@ -52,6 +53,7 @@ export default function PublishButtonLabel() {
|
|
|
52
53
|
isAutosaving: isAutosavingPost(),
|
|
53
54
|
hasNonPostEntityChanges:
|
|
54
55
|
select( editorStore ).hasNonPostEntityChanges(),
|
|
56
|
+
isPostSavingLocked: select( editorStore ).isPostSavingLocked(),
|
|
55
57
|
postStatusHasChanged: !! getPostEdits()?.status,
|
|
56
58
|
postStatus: getEditedPostAttribute( 'status' ),
|
|
57
59
|
};
|
|
@@ -82,7 +84,7 @@ export default function PublishButtonLabel() {
|
|
|
82
84
|
: __( 'Submit for Review' );
|
|
83
85
|
}
|
|
84
86
|
if (
|
|
85
|
-
hasNonPostEntityChanges ||
|
|
87
|
+
( hasNonPostEntityChanges && ! isPostSavingLocked ) ||
|
|
86
88
|
isPublished ||
|
|
87
89
|
( postStatusHasChanged &&
|
|
88
90
|
! [ 'future', 'publish' ].includes( postStatus ) ) ||
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
Button,
|
|
7
7
|
TextControl,
|
|
8
8
|
ExternalLink,
|
|
9
|
-
VisuallyHidden,
|
|
10
9
|
} from '@wordpress/components';
|
|
11
10
|
import { __, sprintf } from '@wordpress/i18n';
|
|
12
11
|
import { useCallback, useEffect, useState, useRef } from '@wordpress/element';
|
|
@@ -16,6 +15,7 @@ import { decodeEntities } from '@wordpress/html-entities';
|
|
|
16
15
|
import { useCopyToClipboard } from '@wordpress/compose';
|
|
17
16
|
import { store as coreStore } from '@wordpress/core-data';
|
|
18
17
|
import { external } from '@wordpress/icons';
|
|
18
|
+
import { VisuallyHidden } from '@wordpress/ui';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Internal dependencies
|
|
@@ -164,7 +164,7 @@ export default function PostPublishPanelPostpublish( {
|
|
|
164
164
|
target="_blank"
|
|
165
165
|
>
|
|
166
166
|
{ viewPostLabel }
|
|
167
|
-
<VisuallyHidden
|
|
167
|
+
<VisuallyHidden render={ <span /> }>
|
|
168
168
|
{
|
|
169
169
|
/* translators: accessibility text */
|
|
170
170
|
__( '(opens in a new tab)' )
|
|
@@ -27,7 +27,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is pu
|
|
|
27
27
|
padding: 0;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.emotion-
|
|
30
|
+
.emotion-10 {
|
|
31
31
|
display: -webkit-box;
|
|
32
32
|
display: -webkit-flex;
|
|
33
33
|
display: -ms-flexbox;
|
|
@@ -47,7 +47,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is pu
|
|
|
47
47
|
width: 100%;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.emotion-
|
|
50
|
+
.emotion-10>* {
|
|
51
51
|
min-width: 0;
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -89,7 +89,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is pu
|
|
|
89
89
|
<a
|
|
90
90
|
class="components-external-link"
|
|
91
91
|
href="https://wordpress.local/sample-page/"
|
|
92
|
-
rel="external
|
|
92
|
+
rel="external noopener"
|
|
93
93
|
target="_blank"
|
|
94
94
|
>
|
|
95
95
|
<span
|
|
@@ -161,10 +161,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is pu
|
|
|
161
161
|
target="_blank"
|
|
162
162
|
>
|
|
163
163
|
<span
|
|
164
|
-
|
|
165
|
-
data-wp-c16t="true"
|
|
166
|
-
data-wp-component="VisuallyHidden"
|
|
167
|
-
style="border: 0px; clip: rect(1px, 1px, 1px, 1px); clip-path: inset( 50% ); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-wrap: normal; word-break: normal;"
|
|
164
|
+
data-visually-hidden=""
|
|
168
165
|
>
|
|
169
166
|
(opens in a new tab)
|
|
170
167
|
</span>
|
|
@@ -199,7 +196,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is pu
|
|
|
199
196
|
class="components-base-control__field emotion-2 emotion-3"
|
|
200
197
|
>
|
|
201
198
|
<div
|
|
202
|
-
class="components-flex components-h-stack emotion-
|
|
199
|
+
class="components-flex components-h-stack emotion-10 emotion-11"
|
|
203
200
|
data-wp-c16t="true"
|
|
204
201
|
data-wp-component="HStack"
|
|
205
202
|
>
|
|
@@ -254,7 +251,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is sc
|
|
|
254
251
|
padding: 0;
|
|
255
252
|
}
|
|
256
253
|
|
|
257
|
-
.emotion-
|
|
254
|
+
.emotion-10 {
|
|
258
255
|
display: -webkit-box;
|
|
259
256
|
display: -webkit-flex;
|
|
260
257
|
display: -ms-flexbox;
|
|
@@ -274,7 +271,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is sc
|
|
|
274
271
|
width: 100%;
|
|
275
272
|
}
|
|
276
273
|
|
|
277
|
-
.emotion-
|
|
274
|
+
.emotion-10>* {
|
|
278
275
|
min-width: 0;
|
|
279
276
|
}
|
|
280
277
|
|
|
@@ -316,7 +313,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is sc
|
|
|
316
313
|
<a
|
|
317
314
|
class="components-external-link"
|
|
318
315
|
href="https://wordpress.local/sample-page/"
|
|
319
|
-
rel="external
|
|
316
|
+
rel="external noopener"
|
|
320
317
|
target="_blank"
|
|
321
318
|
>
|
|
322
319
|
<span
|
|
@@ -388,10 +385,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is sc
|
|
|
388
385
|
target="_blank"
|
|
389
386
|
>
|
|
390
387
|
<span
|
|
391
|
-
|
|
392
|
-
data-wp-c16t="true"
|
|
393
|
-
data-wp-component="VisuallyHidden"
|
|
394
|
-
style="border: 0px; clip: rect(1px, 1px, 1px, 1px); clip-path: inset( 50% ); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-wrap: normal; word-break: normal;"
|
|
388
|
+
data-visually-hidden=""
|
|
395
389
|
>
|
|
396
390
|
(opens in a new tab)
|
|
397
391
|
</span>
|
|
@@ -426,7 +420,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is sc
|
|
|
426
420
|
class="components-base-control__field emotion-2 emotion-3"
|
|
427
421
|
>
|
|
428
422
|
<div
|
|
429
|
-
class="components-flex components-h-stack emotion-
|
|
423
|
+
class="components-flex components-h-stack emotion-10 emotion-11"
|
|
430
424
|
data-wp-c16t="true"
|
|
431
425
|
data-wp-component="HStack"
|
|
432
426
|
>
|
|
@@ -22,7 +22,7 @@ import PostLastRevisionCheck from '../post-last-revision/check';
|
|
|
22
22
|
import { store as editorStore } from '../../store';
|
|
23
23
|
import { unlock } from '../../lock-unlock';
|
|
24
24
|
|
|
25
|
-
const { Badge } = unlock( componentsPrivateApis );
|
|
25
|
+
const { Badge: WCBadge } = unlock( componentsPrivateApis );
|
|
26
26
|
const DAY_IN_MILLISECONDS = 86400000;
|
|
27
27
|
const EMPTY_ARRAY = [];
|
|
28
28
|
const defaultLayouts = { activity: true };
|
|
@@ -107,9 +107,9 @@ function PostRevisionsPanelContent() {
|
|
|
107
107
|
title={
|
|
108
108
|
<HStack justify="space-between" align="center" as="span">
|
|
109
109
|
<span>{ __( 'Revisions' ) }</span>
|
|
110
|
-
<
|
|
110
|
+
<WCBadge className="editor-post-revisions-panel__revisions-count">
|
|
111
111
|
{ revisionsCount }
|
|
112
|
-
</
|
|
112
|
+
</WCBadge>
|
|
113
113
|
</HStack>
|
|
114
114
|
}
|
|
115
115
|
initialOpen={ false }
|
|
@@ -145,7 +145,7 @@ export function useDiffMarkers() {
|
|
|
145
145
|
key="diff-markers"
|
|
146
146
|
className="revision-diff-markers"
|
|
147
147
|
role="navigation"
|
|
148
|
-
aria-label={ __( '
|
|
148
|
+
aria-label={ __( 'Document changes' ) }
|
|
149
149
|
>
|
|
150
150
|
{ isMounted &&
|
|
151
151
|
diffBlocks.map( ( { clientId, status } ) => (
|
|
@@ -45,6 +45,7 @@ export default function PostSavedState( { forceIsDirty } ) {
|
|
|
45
45
|
isPublished,
|
|
46
46
|
isSaveable,
|
|
47
47
|
isSaving,
|
|
48
|
+
isSavingLocked,
|
|
48
49
|
isScheduled,
|
|
49
50
|
hasPublishAction,
|
|
50
51
|
showIconLabels,
|
|
@@ -60,6 +61,7 @@ export default function PostSavedState( { forceIsDirty } ) {
|
|
|
60
61
|
isEditedPostDirty,
|
|
61
62
|
isSavingPost,
|
|
62
63
|
isEditedPostSaveable,
|
|
64
|
+
isPostSavingLocked,
|
|
63
65
|
getCurrentPost,
|
|
64
66
|
isAutosavingPost,
|
|
65
67
|
getEditedPostAttribute,
|
|
@@ -73,6 +75,7 @@ export default function PostSavedState( { forceIsDirty } ) {
|
|
|
73
75
|
isPublished: isCurrentPostPublished(),
|
|
74
76
|
isSaving: isSavingPost(),
|
|
75
77
|
isSaveable: isEditedPostSaveable(),
|
|
78
|
+
isSavingLocked: isPostSavingLocked(),
|
|
76
79
|
isScheduled: isCurrentPostScheduled(),
|
|
77
80
|
hasPublishAction:
|
|
78
81
|
getCurrentPost()?._links?.[ 'wp:action-publish' ] ?? false,
|
|
@@ -140,7 +143,7 @@ export default function PostSavedState( { forceIsDirty } ) {
|
|
|
140
143
|
|
|
141
144
|
const isSaved = forceSavedMessage || ( ! isNew && ! isDirty );
|
|
142
145
|
const isSavedState = isSaving || isSaved;
|
|
143
|
-
const isDisabled = isSaving || isSaved || ! isSaveable;
|
|
146
|
+
const isDisabled = isSaving || isSaved || ! isSaveable || isSavingLocked;
|
|
144
147
|
let text;
|
|
145
148
|
|
|
146
149
|
if ( isSaving ) {
|
|
@@ -24,7 +24,6 @@ exports[`PostSavedState returns a disabled button if the post is not saveable 1`
|
|
|
24
24
|
|
|
25
25
|
exports[`PostSavedState should return Save button if edits to be saved 1`] = `
|
|
26
26
|
<button
|
|
27
|
-
aria-disabled="false"
|
|
28
27
|
aria-label="Save draft"
|
|
29
28
|
class="components-button editor-post-save-draft is-compact is-tertiary"
|
|
30
29
|
type="button"
|
|
@@ -10,7 +10,7 @@ import { __ } from '@wordpress/i18n';
|
|
|
10
10
|
import { store as coreStore } from '@wordpress/core-data';
|
|
11
11
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
12
12
|
import { useInstanceId } from '@wordpress/compose';
|
|
13
|
-
import { VisuallyHidden } from '@wordpress/
|
|
13
|
+
import { VisuallyHidden } from '@wordpress/ui';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Internal dependencies
|
|
@@ -38,8 +38,8 @@ export default function PostTextEditor() {
|
|
|
38
38
|
return (
|
|
39
39
|
<>
|
|
40
40
|
<VisuallyHidden
|
|
41
|
-
|
|
42
|
-
htmlFor={ `post-content-${ instanceId }` }
|
|
41
|
+
// eslint-disable-next-line jsx-a11y/label-has-associated-control
|
|
42
|
+
render={ <label htmlFor={ `post-content-${ instanceId }` } /> }
|
|
43
43
|
>
|
|
44
44
|
{ __( 'Type text or HTML' ) }
|
|
45
45
|
</VisuallyHidden>
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
MenuGroup,
|
|
13
13
|
MenuItem,
|
|
14
14
|
MenuItemsChoice,
|
|
15
|
-
VisuallyHidden,
|
|
16
15
|
Icon,
|
|
17
16
|
} from '@wordpress/components';
|
|
18
17
|
import { __ } from '@wordpress/i18n';
|
|
@@ -22,6 +21,7 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
22
21
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
23
22
|
import { ActionItem } from '@wordpress/interface';
|
|
24
23
|
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
24
|
+
import { VisuallyHidden } from '@wordpress/ui';
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Internal dependencies
|
|
@@ -151,7 +151,7 @@ export default function PreviewDropdown( { forceIsAutosaveable, disabled } ) {
|
|
|
151
151
|
onClick={ onClose }
|
|
152
152
|
>
|
|
153
153
|
{ __( 'View site' ) }
|
|
154
|
-
<VisuallyHidden
|
|
154
|
+
<VisuallyHidden render={ <span /> }>
|
|
155
155
|
{
|
|
156
156
|
/* translators: accessibility text */
|
|
157
157
|
__( '(opens in a new tab)' )
|
|
@@ -45,6 +45,7 @@ import EditorKeyboardShortcuts from '../global-keyboard-shortcuts';
|
|
|
45
45
|
import PatternRenameModal from '../pattern-rename-modal';
|
|
46
46
|
import PatternDuplicateModal from '../pattern-duplicate-modal';
|
|
47
47
|
import TemplatePartMenuItems from '../template-part-menu-items';
|
|
48
|
+
import MediaEditorModalMount from '../media/media-editor-modal';
|
|
48
49
|
|
|
49
50
|
const { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );
|
|
50
51
|
const { PatternsMenuItems } = unlock( editPatternsPrivateApis );
|
|
@@ -465,6 +466,9 @@ export const ExperimentalEditorProvider = withRegistryProvider(
|
|
|
465
466
|
<StartTemplateOptions />
|
|
466
467
|
<PatternRenameModal />
|
|
467
468
|
<PatternDuplicateModal />
|
|
469
|
+
{ window?.__experimentalMediaEditorModal && (
|
|
470
|
+
<MediaEditorModalMount />
|
|
471
|
+
) }
|
|
468
472
|
</>
|
|
469
473
|
) }
|
|
470
474
|
</BlockEditorProviderComponent>
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
privateApis,
|
|
18
18
|
store as blockEditorStore,
|
|
19
19
|
} from '@wordpress/block-editor';
|
|
20
|
+
import { privateApis as mediaEditorPrivateApis } from '@wordpress/media-editor';
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* Internal dependencies
|
|
@@ -30,6 +31,8 @@ import { store as editorStore } from '../../store';
|
|
|
30
31
|
import { unlock } from '../../lock-unlock';
|
|
31
32
|
import { useGlobalStylesContext } from '../global-styles-provider';
|
|
32
33
|
|
|
34
|
+
const { store: mediaEditorStore } = unlock( mediaEditorPrivateApis );
|
|
35
|
+
|
|
33
36
|
const EMPTY_OBJECT = {};
|
|
34
37
|
|
|
35
38
|
function __experimentalReusableBlocksSelect( select ) {
|
|
@@ -107,6 +110,7 @@ const {
|
|
|
107
110
|
isNavigationOverlayContextKey,
|
|
108
111
|
isNavigationPostEditorKey,
|
|
109
112
|
mediaUploadOnSuccessKey,
|
|
113
|
+
openMediaEditorModalKey,
|
|
110
114
|
} = unlock( privateApis );
|
|
111
115
|
|
|
112
116
|
/**
|
|
@@ -269,6 +273,7 @@ function useBlockEditorSettings( settings, postType, postId, renderingMode ) {
|
|
|
269
273
|
const { undo, setIsInserterOpened } = useDispatch( editorStore );
|
|
270
274
|
const { editMediaEntity } = unlock( useDispatch( coreStore ) );
|
|
271
275
|
const { saveEntityRecord } = useDispatch( coreStore );
|
|
276
|
+
const { openMediaEditorModal } = useDispatch( mediaEditorStore );
|
|
272
277
|
|
|
273
278
|
/**
|
|
274
279
|
* Creates a Post entity.
|
|
@@ -339,6 +344,10 @@ function useBlockEditorSettings( settings, postType, postId, renderingMode ) {
|
|
|
339
344
|
[ mediaEditKey ]: hasUploadPermissions
|
|
340
345
|
? editMediaEntity
|
|
341
346
|
: undefined,
|
|
347
|
+
[ openMediaEditorModalKey ]: window?.__experimentalMediaEditorModal
|
|
348
|
+
? ( { id, onUpdate } ) =>
|
|
349
|
+
openMediaEditorModal( { id, onUpdate } )
|
|
350
|
+
: undefined,
|
|
342
351
|
mediaUpload: hasUploadPermissions ? mediaUpload : undefined,
|
|
343
352
|
[ mediaUploadOnSuccessKey ]: hasUploadPermissions
|
|
344
353
|
? mediaUploadOnSuccess
|
|
@@ -435,6 +444,7 @@ function useBlockEditorSettings( settings, postType, postId, renderingMode ) {
|
|
|
435
444
|
globalStylesLinksData,
|
|
436
445
|
renderingMode,
|
|
437
446
|
editMediaEntity,
|
|
447
|
+
openMediaEditorModal,
|
|
438
448
|
settings.onNavigateToEntityRecord,
|
|
439
449
|
deviceType,
|
|
440
450
|
allImageSizes,
|
|
@@ -15,21 +15,11 @@ const LOCK_NAME = 'upload-in-progress';
|
|
|
15
15
|
/**
|
|
16
16
|
* A hook that locks post saving and autosaving while media uploads are in progress.
|
|
17
17
|
* This prevents users from publishing or saving while files are still uploading.
|
|
18
|
-
*
|
|
19
|
-
* Only active when client-side media processing is enabled.
|
|
20
18
|
*/
|
|
21
19
|
export default function useUploadSaveLock() {
|
|
22
|
-
const isClientSideMediaProcessingEnabled =
|
|
23
|
-
window.__clientSideMediaProcessing;
|
|
24
|
-
|
|
25
20
|
const isUploading = useSelect(
|
|
26
|
-
( select ) =>
|
|
27
|
-
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
return select( uploadStore ).isUploading();
|
|
31
|
-
},
|
|
32
|
-
[ isClientSideMediaProcessingEnabled ]
|
|
21
|
+
( select ) => select( uploadStore ).isUploading(),
|
|
22
|
+
[]
|
|
33
23
|
);
|
|
34
24
|
|
|
35
25
|
const {
|
|
@@ -40,10 +30,6 @@ export default function useUploadSaveLock() {
|
|
|
40
30
|
} = useDispatch( editorStore );
|
|
41
31
|
|
|
42
32
|
useEffect( () => {
|
|
43
|
-
if ( ! isClientSideMediaProcessingEnabled ) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
33
|
if ( isUploading ) {
|
|
48
34
|
lockPostSaving( LOCK_NAME );
|
|
49
35
|
lockPostAutosaving( LOCK_NAME );
|
|
@@ -57,7 +43,6 @@ export default function useUploadSaveLock() {
|
|
|
57
43
|
unlockPostAutosaving( LOCK_NAME );
|
|
58
44
|
};
|
|
59
45
|
}, [
|
|
60
|
-
isClientSideMediaProcessingEnabled,
|
|
61
46
|
isUploading,
|
|
62
47
|
lockPostSaving,
|
|
63
48
|
unlockPostSaving,
|
|
@@ -3,11 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
5
|
import { LEFT, RIGHT } from '@wordpress/keycodes';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
Tooltip,
|
|
9
|
-
__unstableMotion as motion,
|
|
10
|
-
} from '@wordpress/components';
|
|
6
|
+
import { Tooltip, __unstableMotion as motion } from '@wordpress/components';
|
|
7
|
+
import { VisuallyHidden } from '@wordpress/ui';
|
|
11
8
|
|
|
12
9
|
const DELTA_DISTANCE = 20; // The distance to resize per keydown in pixels.
|
|
13
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { __experimentalText as
|
|
4
|
+
import { __experimentalText as WCText } from '@wordpress/components';
|
|
5
5
|
import { useSelect } from '@wordpress/data';
|
|
6
6
|
import { __, sprintf } from '@wordpress/i18n';
|
|
7
7
|
import { humanTimeDiff } from '@wordpress/date';
|
|
@@ -24,13 +24,13 @@ export default function RevisionCreatedPanel() {
|
|
|
24
24
|
|
|
25
25
|
return (
|
|
26
26
|
<div className="editor-post-last-edited-panel">
|
|
27
|
-
<
|
|
27
|
+
<WCText>
|
|
28
28
|
{ sprintf(
|
|
29
29
|
// translators: %s: Human-readable time difference, e.g. "2 days ago".
|
|
30
30
|
__( 'Created %s.' ),
|
|
31
31
|
humanTimeDiff( date )
|
|
32
32
|
) }
|
|
33
|
-
</
|
|
33
|
+
</WCText>
|
|
34
34
|
</div>
|
|
35
35
|
);
|
|
36
36
|
}
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
Dropdown,
|
|
10
10
|
RadioControl,
|
|
11
11
|
__experimentalVStack as VStack,
|
|
12
|
-
__experimentalText as
|
|
12
|
+
__experimentalText as WCText,
|
|
13
13
|
} from '@wordpress/components';
|
|
14
14
|
import { useState, useMemo } from '@wordpress/element';
|
|
15
15
|
import { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';
|
|
@@ -109,11 +109,11 @@ export default function SiteDiscussion() {
|
|
|
109
109
|
onClose={ onClose }
|
|
110
110
|
/>
|
|
111
111
|
<VStack spacing={ 3 }>
|
|
112
|
-
<
|
|
112
|
+
<WCText>
|
|
113
113
|
{ __(
|
|
114
114
|
'Changes will apply to new posts only. Individual posts may override these settings.'
|
|
115
115
|
) }
|
|
116
|
-
</
|
|
116
|
+
</WCText>
|
|
117
117
|
<RadioControl
|
|
118
118
|
className="editor-site-discussion__options"
|
|
119
119
|
hideLabelFromVision
|
|
@@ -620,7 +620,7 @@ export const StyleBookBody = ( {
|
|
|
620
620
|
<style>
|
|
621
621
|
{ STYLE_BOOK_IFRAME_STYLES }
|
|
622
622
|
{ !! onClick &&
|
|
623
|
-
'body { cursor:
|
|
623
|
+
'body { cursor: var(--wpds-cursor-control); } body * { pointer-events: none; }' }
|
|
624
624
|
</style>
|
|
625
625
|
<Examples
|
|
626
626
|
className="editor-style-book__examples"
|