@wordpress/editor 14.9.0 → 14.11.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 +8 -0
- package/README.md +2 -2
- package/build/bindings/api.js +0 -29
- package/build/bindings/api.js.map +1 -1
- package/build/bindings/post-meta.js +2 -1
- package/build/bindings/post-meta.js.map +1 -1
- package/build/components/autocompleters/user.js.map +1 -1
- package/build/components/block-manager/index.js +2 -2
- package/build/components/block-manager/index.js.map +1 -1
- package/build/components/collab-sidebar/add-comment.js +120 -0
- package/build/components/collab-sidebar/add-comment.js.map +1 -0
- package/build/components/collab-sidebar/comment-button-toolbar.js +37 -0
- package/build/components/collab-sidebar/comment-button-toolbar.js.map +1 -0
- package/build/components/collab-sidebar/comment-button.js +37 -0
- package/build/components/collab-sidebar/comment-button.js.map +1 -0
- package/build/components/collab-sidebar/comments.js +321 -0
- package/build/components/collab-sidebar/comments.js.map +1 -0
- package/build/components/collab-sidebar/constants.js +8 -0
- package/build/components/collab-sidebar/constants.js.map +1 -0
- package/build/components/collab-sidebar/index.js +272 -0
- package/build/components/collab-sidebar/index.js.map +1 -0
- package/build/components/collab-sidebar/utils.js +16 -0
- package/build/components/collab-sidebar/utils.js.map +1 -0
- package/build/components/commands/index.js +6 -6
- package/build/components/commands/index.js.map +1 -1
- package/build/components/create-template-part-modal/index.js.map +1 -1
- package/build/components/create-template-part-modal/utils.js.map +1 -1
- package/build/components/document-bar/index.js +8 -7
- package/build/components/document-bar/index.js.map +1 -1
- package/build/components/document-outline/index.js.map +1 -1
- package/build/components/document-outline/item.js.map +1 -1
- package/build/components/document-tools/index.js +2 -6
- package/build/components/document-tools/index.js.map +1 -1
- package/build/components/editor-interface/index.js +4 -14
- package/build/components/editor-interface/index.js.map +1 -1
- package/build/components/entities-saved-states/index.js +2 -2
- package/build/components/entities-saved-states/index.js.map +1 -1
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js +3 -3
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
- package/build/components/global-styles-provider/index.js +13 -3
- package/build/components/global-styles-provider/index.js.map +1 -1
- package/build/components/header/index.js +5 -2
- package/build/components/header/index.js.map +1 -1
- package/build/components/inserter-sidebar/index.js +2 -2
- package/build/components/inserter-sidebar/index.js.map +1 -1
- package/build/components/media-categories/index.js.map +1 -1
- package/build/components/page-attributes/parent.js +5 -5
- package/build/components/page-attributes/parent.js.map +1 -1
- package/build/components/plugin-document-setting-panel/index.js.map +1 -1
- package/build/components/plugin-more-menu-item/index.js +13 -11
- package/build/components/plugin-more-menu-item/index.js.map +1 -1
- package/build/components/plugin-preview-menu-item/index.js +15 -13
- package/build/components/plugin-preview-menu-item/index.js.map +1 -1
- package/build/components/plugin-sidebar/index.js +0 -15
- package/build/components/plugin-sidebar/index.js.map +1 -1
- package/build/components/post-actions/index.js +5 -5
- package/build/components/post-actions/index.js.map +1 -1
- package/build/components/post-author/panel.js +4 -4
- package/build/components/post-author/panel.js.map +1 -1
- package/build/components/post-card-panel/index.js +7 -36
- package/build/components/post-card-panel/index.js.map +1 -1
- package/build/components/post-content-information/index.js +2 -3
- package/build/components/post-content-information/index.js.map +1 -1
- package/build/components/post-featured-image/index.js +26 -7
- package/build/components/post-featured-image/index.js.map +1 -1
- package/build/components/post-format/index.js +1 -1
- package/build/components/post-format/index.js.map +1 -1
- package/build/components/post-last-revision/index.js +1 -1
- package/build/components/post-last-revision/index.js.map +1 -1
- package/build/components/post-locked-modal/index.js +2 -2
- package/build/components/post-locked-modal/index.js.map +1 -1
- package/build/components/post-preview-button/index.js +1 -1
- package/build/components/post-preview-button/index.js.map +1 -1
- package/build/components/post-publish-button/index.js.map +1 -1
- package/build/components/post-publish-panel/maybe-post-format-panel.js +1 -1
- package/build/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
- package/build/components/post-publish-panel/maybe-upload-media.js +1 -0
- package/build/components/post-publish-panel/maybe-upload-media.js.map +1 -1
- package/build/components/post-publish-panel/media-util.js +1 -0
- package/build/components/post-publish-panel/media-util.js.map +1 -1
- package/build/components/post-publish-panel/postpublish.js +1 -1
- package/build/components/post-publish-panel/postpublish.js.map +1 -1
- package/build/components/post-schedule/label.js +1 -1
- package/build/components/post-schedule/label.js.map +1 -1
- package/build/components/post-taxonomies/flat-term-selector.js +13 -5
- package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/hierarchical-term-selector.js +3 -2
- package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/index.js +1 -1
- package/build/components/post-taxonomies/index.js.map +1 -1
- package/build/components/post-taxonomies/panel.js.map +1 -1
- package/build/components/post-template/classic-theme.js +2 -4
- package/build/components/post-template/classic-theme.js.map +1 -1
- package/build/components/post-text-editor/index.js.map +1 -1
- package/build/components/post-title/index.js +15 -19
- package/build/components/post-title/index.js.map +1 -1
- package/build/components/post-title/index.native.js +2 -2
- package/build/components/post-title/index.native.js.map +1 -1
- package/build/components/post-url/index.js +76 -63
- package/build/components/post-url/index.js.map +1 -1
- package/build/components/post-url/panel.js +49 -29
- package/build/components/post-url/panel.js.map +1 -1
- package/build/components/post-visibility/index.js.map +1 -1
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/preview-dropdown/index.js +0 -4
- package/build/components/preview-dropdown/index.js.map +1 -1
- package/build/components/provider/index.js +10 -12
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/use-block-editor-settings.js +1 -1
- package/build/components/provider/use-block-editor-settings.js.map +1 -1
- package/build/components/resizable-editor/resize-handle.js.map +1 -1
- package/build/components/sidebar/header.js +2 -1
- package/build/components/sidebar/header.js.map +1 -1
- package/build/components/sidebar/index.js +3 -3
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/time-to-read/index.js +2 -2
- package/build/components/time-to-read/index.js.map +1 -1
- package/build/components/visual-editor/edit-template-blocks-notification.js +4 -1
- package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
- package/build/components/visual-editor/index.js +24 -25
- package/build/components/visual-editor/index.js.map +1 -1
- package/build/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
- package/build/components/visual-editor/use-zoom-out-mode-exit.js +52 -0
- package/build/components/visual-editor/use-zoom-out-mode-exit.js.map +1 -0
- package/build/components/zoom-out-toggle/index.js +37 -5
- package/build/components/zoom-out-toggle/index.js.map +1 -1
- package/build/dataviews/actions/duplicate-template-part.js +3 -3
- package/build/dataviews/actions/duplicate-template-part.js.map +1 -1
- package/build/private-apis.js +0 -1
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +30 -4
- package/build/store/actions.js.map +1 -1
- package/build/store/constants.js +1 -0
- package/build/store/constants.js.map +1 -1
- package/build/store/local-autosave.js.map +1 -1
- package/build/store/private-actions.js +8 -7
- package/build/store/private-actions.js.map +1 -1
- package/build/store/selectors.js +24 -2
- package/build/store/selectors.js.map +1 -1
- package/build/utils/media-upload/index.js.map +1 -1
- package/build/utils/pageTypeBadge.js +51 -0
- package/build/utils/pageTypeBadge.js.map +1 -0
- package/build/utils/terms.js +2 -2
- package/build/utils/terms.js.map +1 -1
- package/build-module/bindings/api.js +1 -29
- package/build-module/bindings/api.js.map +1 -1
- package/build-module/bindings/post-meta.js +2 -1
- package/build-module/bindings/post-meta.js.map +1 -1
- package/build-module/components/autocompleters/user.js +1 -3
- package/build-module/components/autocompleters/user.js.map +1 -1
- package/build-module/components/block-manager/category.js +1 -2
- package/build-module/components/block-manager/category.js.map +1 -1
- package/build-module/components/block-manager/checklist.js +1 -2
- package/build-module/components/block-manager/checklist.js.map +1 -1
- package/build-module/components/block-manager/index.js +3 -4
- package/build-module/components/block-manager/index.js.map +1 -1
- package/build-module/components/block-settings-menu/content-only-settings-menu.js +1 -3
- package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
- package/build-module/components/blog-title/index.js +1 -3
- package/build-module/components/blog-title/index.js.map +1 -1
- package/build-module/components/collab-sidebar/add-comment.js +114 -0
- package/build-module/components/collab-sidebar/add-comment.js.map +1 -0
- package/build-module/components/collab-sidebar/comment-button-toolbar.js +30 -0
- package/build-module/components/collab-sidebar/comment-button-toolbar.js.map +1 -0
- package/build-module/components/collab-sidebar/comment-button.js +30 -0
- package/build-module/components/collab-sidebar/comment-button.js.map +1 -0
- package/build-module/components/collab-sidebar/comments.js +314 -0
- package/build-module/components/collab-sidebar/comments.js.map +1 -0
- package/build-module/components/collab-sidebar/constants.js +2 -0
- package/build-module/components/collab-sidebar/constants.js.map +1 -0
- package/build-module/components/collab-sidebar/index.js +264 -0
- package/build-module/components/collab-sidebar/index.js.map +1 -0
- package/build-module/components/collab-sidebar/utils.js +10 -0
- package/build-module/components/collab-sidebar/utils.js.map +1 -0
- package/build-module/components/collapsible-block-toolbar/index.js +1 -3
- package/build-module/components/collapsible-block-toolbar/index.js.map +1 -1
- package/build-module/components/commands/index.js +6 -6
- package/build-module/components/commands/index.js.map +1 -1
- package/build-module/components/create-template-part-modal/index.js +1 -2
- package/build-module/components/create-template-part-modal/index.js.map +1 -1
- package/build-module/components/create-template-part-modal/utils.js.map +1 -1
- package/build-module/components/document-bar/index.js +10 -10
- package/build-module/components/document-bar/index.js.map +1 -1
- package/build-module/components/document-outline/index.js +1 -2
- package/build-module/components/document-outline/index.js.map +1 -1
- package/build-module/components/document-outline/item.js +1 -2
- package/build-module/components/document-outline/item.js.map +1 -1
- package/build-module/components/document-tools/index.js +4 -10
- package/build-module/components/document-tools/index.js.map +1 -1
- package/build-module/components/editor/index.js +1 -3
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor-help/add-blocks.native.js +1 -3
- package/build-module/components/editor-help/add-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/customize-blocks.native.js +1 -3
- package/build-module/components/editor-help/customize-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/help-detail-navigation-screen.native.js +1 -2
- package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +1 -1
- package/build-module/components/editor-help/index.native.js +1 -3
- package/build-module/components/editor-help/index.native.js.map +1 -1
- package/build-module/components/editor-help/intro-to-blocks.native.js +1 -3
- package/build-module/components/editor-help/intro-to-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/move-blocks.native.js +1 -3
- package/build-module/components/editor-help/move-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/remove-blocks.native.js +1 -3
- package/build-module/components/editor-help/remove-blocks.native.js.map +1 -1
- package/build-module/components/editor-help/view-sections.native.js +1 -2
- package/build-module/components/editor-help/view-sections.native.js.map +1 -1
- package/build-module/components/editor-interface/index.js +5 -17
- package/build-module/components/editor-interface/index.js.map +1 -1
- package/build-module/components/editor-notices/index.js +1 -3
- package/build-module/components/editor-notices/index.js.map +1 -1
- package/build-module/components/entities-saved-states/entity-record-item.js +1 -3
- package/build-module/components/entities-saved-states/entity-record-item.js.map +1 -1
- package/build-module/components/entities-saved-states/entity-type-list.js +1 -2
- package/build-module/components/entities-saved-states/entity-type-list.js.map +1 -1
- package/build-module/components/entities-saved-states/index.js +3 -4
- package/build-module/components/entities-saved-states/index.js.map +1 -1
- package/build-module/components/error-boundary/index.native.js +1 -2
- package/build-module/components/error-boundary/index.native.js.map +1 -1
- package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +3 -3
- package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
- package/build-module/components/global-styles-provider/index.js +13 -3
- package/build-module/components/global-styles-provider/index.js.map +1 -1
- package/build-module/components/header/index.js +6 -4
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/inserter-sidebar/index.js +2 -2
- package/build-module/components/inserter-sidebar/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +1 -2
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +1 -3
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build-module/components/list-view-sidebar/list-view-outline.js +1 -3
- package/build-module/components/list-view-sidebar/list-view-outline.js.map +1 -1
- package/build-module/components/media-categories/index.js.map +1 -1
- package/build-module/components/more-menu/index.js +1 -3
- package/build-module/components/more-menu/index.js.map +1 -1
- package/build-module/components/offline-status/index.native.js +1 -2
- package/build-module/components/offline-status/index.native.js.map +1 -1
- package/build-module/components/page-attributes/parent.js +6 -7
- package/build-module/components/page-attributes/parent.js.map +1 -1
- package/build-module/components/plugin-document-setting-panel/index.js +1 -3
- package/build-module/components/plugin-document-setting-panel/index.js.map +1 -1
- package/build-module/components/plugin-more-menu-item/index.js +12 -10
- package/build-module/components/plugin-more-menu-item/index.js.map +1 -1
- package/build-module/components/plugin-preview-menu-item/index.js +14 -12
- package/build-module/components/plugin-preview-menu-item/index.js.map +1 -1
- package/build-module/components/plugin-sidebar/index.js +0 -15
- package/build-module/components/plugin-sidebar/index.js.map +1 -1
- package/build-module/components/post-actions/index.js +6 -8
- package/build-module/components/post-actions/index.js.map +1 -1
- package/build-module/components/post-author/panel.js +5 -6
- package/build-module/components/post-author/panel.js.map +1 -1
- package/build-module/components/post-card-panel/index.js +9 -38
- package/build-module/components/post-card-panel/index.js.map +1 -1
- package/build-module/components/post-content-information/index.js +2 -3
- package/build-module/components/post-content-information/index.js.map +1 -1
- package/build-module/components/post-discussion/panel.js +1 -2
- package/build-module/components/post-discussion/panel.js.map +1 -1
- package/build-module/components/post-excerpt/panel.js +1 -3
- package/build-module/components/post-excerpt/panel.js.map +1 -1
- package/build-module/components/post-featured-image/index.js +27 -9
- package/build-module/components/post-featured-image/index.js.map +1 -1
- package/build-module/components/post-format/index.js +2 -3
- package/build-module/components/post-format/index.js.map +1 -1
- package/build-module/components/post-format/panel.js +1 -2
- package/build-module/components/post-format/panel.js.map +1 -1
- package/build-module/components/post-last-revision/index.js +1 -1
- package/build-module/components/post-last-revision/index.js.map +1 -1
- package/build-module/components/post-locked-modal/index.js +3 -5
- package/build-module/components/post-locked-modal/index.js.map +1 -1
- package/build-module/components/post-panel-row/index.js +1 -2
- package/build-module/components/post-panel-row/index.js.map +1 -1
- package/build-module/components/post-preview-button/index.js +2 -4
- package/build-module/components/post-preview-button/index.js.map +1 -1
- package/build-module/components/post-publish-button/index.js +1 -2
- package/build-module/components/post-publish-button/index.js.map +1 -1
- package/build-module/components/post-publish-panel/index.js +1 -3
- package/build-module/components/post-publish-panel/index.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-category-panel.js +1 -2
- package/build-module/components/post-publish-panel/maybe-category-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js +2 -3
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-tags-panel.js +1 -2
- package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +1 -1
- package/build-module/components/post-publish-panel/maybe-upload-media.js +2 -2
- package/build-module/components/post-publish-panel/maybe-upload-media.js.map +1 -1
- package/build-module/components/post-publish-panel/media-util.js +1 -0
- package/build-module/components/post-publish-panel/media-util.js.map +1 -1
- package/build-module/components/post-publish-panel/postpublish.js +2 -4
- package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
- package/build-module/components/post-publish-panel/prepublish.js +1 -3
- package/build-module/components/post-publish-panel/prepublish.js.map +1 -1
- package/build-module/components/post-saved-state/index.js +1 -2
- package/build-module/components/post-saved-state/index.js.map +1 -1
- package/build-module/components/post-schedule/label.js +1 -1
- package/build-module/components/post-schedule/label.js.map +1 -1
- package/build-module/components/post-status/index.js +1 -3
- package/build-module/components/post-status/index.js.map +1 -1
- package/build-module/components/post-switch-to-draft-button/index.js +1 -3
- package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build-module/components/post-taxonomies/flat-term-selector.js +16 -10
- package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js +4 -4
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/index.js +1 -1
- package/build-module/components/post-taxonomies/index.js.map +1 -1
- package/build-module/components/post-taxonomies/most-used-terms.js +1 -2
- package/build-module/components/post-taxonomies/most-used-terms.js.map +1 -1
- package/build-module/components/post-taxonomies/panel.js.map +1 -1
- package/build-module/components/post-template/block-theme.js +1 -3
- package/build-module/components/post-template/block-theme.js.map +1 -1
- package/build-module/components/post-template/classic-theme.js +3 -6
- package/build-module/components/post-template/classic-theme.js.map +1 -1
- package/build-module/components/post-template/create-new-template-modal.js +1 -2
- package/build-module/components/post-template/create-new-template-modal.js.map +1 -1
- package/build-module/components/post-template/create-new-template.js +1 -3
- package/build-module/components/post-template/create-new-template.js.map +1 -1
- package/build-module/components/post-template/swap-template-button.js +1 -3
- package/build-module/components/post-template/swap-template-button.js.map +1 -1
- package/build-module/components/post-text-editor/index.js +1 -3
- package/build-module/components/post-text-editor/index.js.map +1 -1
- package/build-module/components/post-title/index.js +15 -19
- package/build-module/components/post-title/index.js.map +1 -1
- package/build-module/components/post-title/index.native.js +2 -2
- package/build-module/components/post-title/index.native.js.map +1 -1
- package/build-module/components/post-trash/index.js +1 -2
- package/build-module/components/post-trash/index.js.map +1 -1
- package/build-module/components/post-url/index.js +78 -66
- package/build-module/components/post-url/index.js.map +1 -1
- package/build-module/components/post-url/panel.js +51 -31
- package/build-module/components/post-url/panel.js.map +1 -1
- package/build-module/components/post-visibility/index.js +1 -2
- package/build-module/components/post-visibility/index.js.map +1 -1
- package/build-module/components/posts-per-page/index.js +1 -3
- package/build-module/components/posts-per-page/index.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +1 -3
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/preview-dropdown/index.js +1 -7
- package/build-module/components/preview-dropdown/index.js.map +1 -1
- package/build-module/components/provider/index.js +11 -15
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/provider/index.native.js +1 -3
- package/build-module/components/provider/index.native.js.map +1 -1
- package/build-module/components/provider/use-block-editor-settings.js +1 -1
- package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
- package/build-module/components/resizable-editor/resize-handle.js +1 -3
- package/build-module/components/resizable-editor/resize-handle.js.map +1 -1
- package/build-module/components/save-publish-panels/index.js +1 -3
- package/build-module/components/save-publish-panels/index.js.map +1 -1
- package/build-module/components/sidebar/header.js +3 -3
- package/build-module/components/sidebar/header.js.map +1 -1
- package/build-module/components/sidebar/index.js +5 -6
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar/post-summary.js +1 -3
- package/build-module/components/sidebar/post-summary.js.map +1 -1
- package/build-module/components/site-discussion/index.js +1 -3
- package/build-module/components/site-discussion/index.js.map +1 -1
- package/build-module/components/start-template-options/index.js +1 -2
- package/build-module/components/start-template-options/index.js.map +1 -1
- package/build-module/components/table-of-contents/panel.js +1 -3
- package/build-module/components/table-of-contents/panel.js.map +1 -1
- package/build-module/components/template-part-menu-items/convert-to-template-part.js +1 -3
- package/build-module/components/template-part-menu-items/convert-to-template-part.js.map +1 -1
- package/build-module/components/template-validation-notice/index.js +1 -3
- package/build-module/components/template-validation-notice/index.js.map +1 -1
- package/build-module/components/text-editor/index.js +1 -2
- package/build-module/components/text-editor/index.js.map +1 -1
- package/build-module/components/time-to-read/index.js +2 -2
- package/build-module/components/time-to-read/index.js.map +1 -1
- package/build-module/components/visual-editor/edit-template-blocks-notification.js +4 -1
- package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
- package/build-module/components/visual-editor/index.js +26 -29
- package/build-module/components/visual-editor/index.js.map +1 -1
- package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +1 -1
- package/build-module/components/visual-editor/use-zoom-out-mode-exit.js +46 -0
- package/build-module/components/visual-editor/use-zoom-out-mode-exit.js.map +1 -0
- package/build-module/components/zoom-out-toggle/index.js +37 -5
- package/build-module/components/zoom-out-toggle/index.js.map +1 -1
- package/build-module/dataviews/actions/duplicate-template-part.js +4 -4
- package/build-module/dataviews/actions/duplicate-template-part.js.map +1 -1
- package/build-module/hooks/pattern-overrides.js +1 -3
- package/build-module/hooks/pattern-overrides.js.map +1 -1
- package/build-module/private-apis.js +1 -2
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +30 -4
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/constants.js +1 -0
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/local-autosave.js.map +1 -1
- package/build-module/store/private-actions.js +9 -8
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/selectors.js +24 -2
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/media-upload/index.js.map +1 -1
- package/build-module/utils/pageTypeBadge.js +45 -0
- package/build-module/utils/pageTypeBadge.js.map +1 -0
- package/build-module/utils/terms.js +2 -2
- package/build-module/utils/terms.js.map +1 -1
- package/build-style/style-rtl.css +116 -59
- package/build-style/style.css +116 -59
- package/build-types/bindings/api.d.ts +0 -13
- package/build-types/bindings/api.d.ts.map +1 -1
- package/build-types/bindings/post-meta.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/add-comment.d.ts +15 -0
- package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/comment-button-toolbar.d.ts +5 -0
- package/build-types/components/collab-sidebar/comment-button-toolbar.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/comment-button.d.ts +5 -0
- package/build-types/components/collab-sidebar/comment-button.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/comments.d.ts +19 -0
- package/build-types/components/collab-sidebar/comments.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/constants.d.ts +2 -0
- package/build-types/components/collab-sidebar/constants.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/index.d.ts +5 -0
- package/build-types/components/collab-sidebar/index.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/utils.d.ts +8 -0
- package/build-types/components/collab-sidebar/utils.d.ts.map +1 -0
- package/build-types/components/commands/index.d.ts.map +1 -1
- package/build-types/components/document-bar/index.d.ts.map +1 -1
- package/build-types/components/document-tools/index.d.ts.map +1 -1
- package/build-types/components/editor-interface/index.d.ts +1 -2
- package/build-types/components/editor-interface/index.d.ts.map +1 -1
- package/build-types/components/global-styles-provider/index.d.ts.map +1 -1
- package/build-types/components/header/index.d.ts.map +1 -1
- package/build-types/components/inserter-sidebar/index.d.ts.map +1 -1
- package/build-types/components/page-attributes/parent.d.ts.map +1 -1
- package/build-types/components/plugin-more-menu-item/index.d.ts +62 -2
- package/build-types/components/plugin-more-menu-item/index.d.ts.map +1 -1
- package/build-types/components/plugin-preview-menu-item/index.d.ts +41 -2
- package/build-types/components/plugin-preview-menu-item/index.d.ts.map +1 -1
- package/build-types/components/plugin-sidebar/index.d.ts.map +1 -1
- package/build-types/components/post-author/panel.d.ts.map +1 -1
- package/build-types/components/post-card-panel/index.d.ts.map +1 -1
- package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -1
- package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -1
- package/build-types/components/post-template/classic-theme.d.ts.map +1 -1
- package/build-types/components/post-url/index.d.ts.map +1 -1
- package/build-types/components/post-url/panel.d.ts.map +1 -1
- package/build-types/components/preview-dropdown/index.d.ts.map +1 -1
- package/build-types/components/provider/index.d.ts.map +1 -1
- package/build-types/components/sidebar/index.d.ts.map +1 -1
- package/build-types/components/visual-editor/edit-template-blocks-notification.d.ts.map +1 -1
- package/build-types/components/visual-editor/index.d.ts.map +1 -1
- package/build-types/components/visual-editor/use-zoom-out-mode-exit.d.ts +5 -0
- package/build-types/components/visual-editor/use-zoom-out-mode-exit.d.ts.map +1 -0
- package/build-types/components/zoom-out-toggle/index.d.ts +3 -1
- package/build-types/components/zoom-out-toggle/index.d.ts.map +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/store/actions.d.ts +1 -4
- package/build-types/store/actions.d.ts.map +1 -1
- package/build-types/store/selectors.d.ts +21 -0
- package/build-types/store/selectors.d.ts.map +1 -1
- package/build-types/utils/pageTypeBadge.d.ts +5 -0
- package/build-types/utils/pageTypeBadge.d.ts.map +1 -0
- package/build-types/utils/terms.d.ts.map +1 -1
- package/package.json +39 -38
- package/src/bindings/api.js +1 -32
- package/src/bindings/post-meta.js +1 -0
- package/src/components/collab-sidebar/add-comment.js +124 -0
- package/src/components/collab-sidebar/comment-button-toolbar.js +29 -0
- package/src/components/collab-sidebar/comment-button.js +31 -0
- package/src/components/collab-sidebar/comments.js +404 -0
- package/src/components/collab-sidebar/constants.js +1 -0
- package/src/components/collab-sidebar/index.js +307 -0
- package/src/components/collab-sidebar/style.scss +111 -0
- package/src/components/collab-sidebar/utils.js +9 -0
- package/src/components/commands/index.js +9 -7
- package/src/components/document-bar/index.js +15 -7
- package/src/components/document-bar/style.scss +0 -4
- package/src/components/document-tools/index.js +2 -8
- package/src/components/editor-interface/index.js +4 -18
- package/src/components/entities-saved-states/index.js +2 -2
- package/src/components/global-keyboard-shortcuts/register-shortcuts.js +3 -3
- package/src/components/global-styles-provider/index.js +20 -6
- package/src/components/header/index.js +3 -1
- package/src/components/header/style.scss +1 -0
- package/src/components/inserter-sidebar/index.js +3 -6
- package/src/components/page-attributes/parent.js +6 -4
- package/src/components/plugin-more-menu-item/index.js +12 -11
- package/src/components/plugin-preview-menu-item/index.js +14 -13
- package/src/components/plugin-sidebar/index.js +0 -13
- package/src/components/post-actions/index.js +8 -11
- package/src/components/post-author/panel.js +4 -2
- package/src/components/post-card-panel/index.js +9 -43
- package/src/components/post-card-panel/style.scss +1 -9
- package/src/components/post-content-information/index.js +1 -1
- package/src/components/post-featured-image/index.js +31 -16
- package/src/components/post-featured-image/style.scss +5 -2
- package/src/components/post-last-revision/index.js +1 -1
- package/src/components/post-saved-state/test/__snapshots__/index.js.snap +1 -1
- package/src/components/post-schedule/label.js +1 -1
- package/src/components/post-sticky/test/index.js +6 -6
- package/src/components/post-taxonomies/flat-term-selector.js +15 -4
- package/src/components/post-taxonomies/hierarchical-term-selector.js +3 -2
- package/src/components/post-template/classic-theme.js +1 -2
- package/src/components/post-url/index.js +67 -55
- package/src/components/post-url/panel.js +61 -35
- package/src/components/post-url/style.scss +21 -3
- package/src/components/preview-dropdown/index.js +0 -2
- package/src/components/provider/index.js +32 -24
- package/src/components/provider/use-block-editor-settings.js +1 -1
- package/src/components/sidebar/header.js +3 -2
- package/src/components/sidebar/index.js +5 -3
- package/src/components/time-to-read/index.js +3 -3
- package/src/components/visual-editor/edit-template-blocks-notification.js +5 -1
- package/src/components/visual-editor/index.js +32 -39
- package/src/components/visual-editor/use-zoom-out-mode-exit.js +49 -0
- package/src/components/zoom-out-toggle/index.js +39 -5
- package/src/dataviews/actions/duplicate-template-part.tsx +3 -3
- package/src/private-apis.js +1 -5
- package/src/store/actions.js +33 -4
- package/src/store/private-actions.js +3 -3
- package/src/store/selectors.js +24 -2
- package/src/style.scss +1 -0
- package/src/utils/pageTypeBadge.js +41 -0
- package/src/utils/terms.js +4 -2
- package/src/utils/test/terms.js +3 -3
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/global-styles-provider/index.js"],"names":[],"mappings":"AAuBA,mEAoBC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/global-styles-provider/index.js"],"names":[],"mappings":"AAuBA,mEAoBC;AAqJD;;;;;;4BAjDa,WAAS,MAAM,YAEf,MAAM;;;;;;;4BAFN,WAAS,MAAM,YAEf,MAAM;EA8ElB;AAED;;uCAWC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/header/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/header/index.js"],"names":[],"mappings":";AA4CA;;;;;;;gCA4IC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/inserter-sidebar/index.js"],"names":[],"mappings":"AAsBA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/inserter-sidebar/index.js"],"names":[],"mappings":"AAsBA,uEAuFC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parent.d.ts","sourceRoot":"","sources":["../../../src/components/page-attributes/parent.js"],"names":[],"mappings":"AAsDA;;;;;GAKG;AACH,wCAFY,SAAS,GAAC,IAAI,CAqIzB;
|
|
1
|
+
{"version":3,"file":"parent.d.ts","sourceRoot":"","sources":["../../../src/components/page-attributes/parent.js"],"names":[],"mappings":"AAsDA;;;;;GAKG;AACH,wCAFY,SAAS,GAAC,IAAI,CAqIzB;AAkCD,yDA4EC;AArQM,qEAYN"}
|
|
@@ -1,3 +1,63 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Renders a menu item in `Plugins` group in `More Menu` drop down, and can be used to as a button or link depending on the props provided.
|
|
3
|
+
* The text within the component appears as the menu item label.
|
|
4
|
+
*
|
|
5
|
+
* @param {Object} props Component properties.
|
|
6
|
+
* @param {string} [props.href] When `href` is provided then the menu item is represented as an anchor rather than button. It corresponds to the `href` attribute of the anchor.
|
|
7
|
+
* @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.
|
|
8
|
+
* @param {Function} [props.onClick=noop] The callback function to be executed when the user clicks the menu item.
|
|
9
|
+
* @param {...*} [props.other] Any additional props are passed through to the underlying [Button](/packages/components/src/button/README.md) component.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```js
|
|
13
|
+
* // Using ES5 syntax
|
|
14
|
+
* var __ = wp.i18n.__;
|
|
15
|
+
* var PluginMoreMenuItem = wp.editor.PluginMoreMenuItem;
|
|
16
|
+
* var moreIcon = wp.element.createElement( 'svg' ); //... svg element.
|
|
17
|
+
*
|
|
18
|
+
* function onButtonClick() {
|
|
19
|
+
* alert( 'Button clicked.' );
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* function MyButtonMoreMenuItem() {
|
|
23
|
+
* return wp.element.createElement(
|
|
24
|
+
* PluginMoreMenuItem,
|
|
25
|
+
* {
|
|
26
|
+
* icon: moreIcon,
|
|
27
|
+
* onClick: onButtonClick,
|
|
28
|
+
* },
|
|
29
|
+
* __( 'My button title' )
|
|
30
|
+
* );
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```jsx
|
|
36
|
+
* // Using ESNext syntax
|
|
37
|
+
* import { __ } from '@wordpress/i18n';
|
|
38
|
+
* import { PluginMoreMenuItem } from '@wordpress/editor';
|
|
39
|
+
* import { more } from '@wordpress/icons';
|
|
40
|
+
*
|
|
41
|
+
* function onButtonClick() {
|
|
42
|
+
* alert( 'Button clicked.' );
|
|
43
|
+
* }
|
|
44
|
+
*
|
|
45
|
+
* const MyButtonMoreMenuItem = () => (
|
|
46
|
+
* <PluginMoreMenuItem
|
|
47
|
+
* icon={ more }
|
|
48
|
+
* onClick={ onButtonClick }
|
|
49
|
+
* >
|
|
50
|
+
* { __( 'My button title' ) }
|
|
51
|
+
* </PluginMoreMenuItem>
|
|
52
|
+
* );
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @return {Component} The component to be rendered.
|
|
56
|
+
*/
|
|
57
|
+
export default function PluginMoreMenuItem(props: {
|
|
58
|
+
href?: string | undefined;
|
|
59
|
+
icon?: any;
|
|
60
|
+
onClick?: Function | undefined;
|
|
61
|
+
other?: any[];
|
|
62
|
+
}): Component;
|
|
3
63
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/plugin-more-menu-item/index.js"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/plugin-more-menu-item/index.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,kDAnDG;IAAsC,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,KAAK,GAAhC,GAAC,EAAA;CAEZ,GA4CS,SAAS,CAYpB"}
|
|
@@ -1,3 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Renders a menu item in the Preview dropdown, which can be used as a button or link depending on the props provided.
|
|
3
|
+
* The text within the component appears as the menu item label.
|
|
4
|
+
*
|
|
5
|
+
* @param {Object} props Component properties.
|
|
6
|
+
* @param {string} [props.href] When `href` is provided, the menu item is rendered as an anchor instead of a button. It corresponds to the `href` attribute of the anchor.
|
|
7
|
+
* @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The icon to be rendered to the left of the menu item label. Can be a Dashicon slug or an SVG WP element.
|
|
8
|
+
* @param {Function} [props.onClick] The callback function to be executed when the user clicks the menu item.
|
|
9
|
+
* @param {...*} [props.other] Any additional props are passed through to the underlying MenuItem component.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```jsx
|
|
13
|
+
* import { __ } from '@wordpress/i18n';
|
|
14
|
+
* import { PluginPreviewMenuItem } from '@wordpress/editor';
|
|
15
|
+
* import { external } from '@wordpress/icons';
|
|
16
|
+
*
|
|
17
|
+
* function onPreviewClick() {
|
|
18
|
+
* // Handle preview action
|
|
19
|
+
* }
|
|
20
|
+
*
|
|
21
|
+
* const ExternalPreviewMenuItem = () => (
|
|
22
|
+
* <PluginPreviewMenuItem
|
|
23
|
+
* icon={ external }
|
|
24
|
+
* onClick={ onPreviewClick }
|
|
25
|
+
* >
|
|
26
|
+
* { __( 'Preview in new tab' ) }
|
|
27
|
+
* </PluginPreviewMenuItem>
|
|
28
|
+
* );
|
|
29
|
+
* registerPlugin( 'external-preview-menu-item', {
|
|
30
|
+
* render: ExternalPreviewMenuItem,
|
|
31
|
+
* } );
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @return {Component} The rendered menu item component.
|
|
35
|
+
*/
|
|
36
|
+
export default function PluginPreviewMenuItem(props: {
|
|
37
|
+
href?: string | undefined;
|
|
38
|
+
icon?: any;
|
|
39
|
+
onClick?: Function | undefined;
|
|
40
|
+
other?: any[];
|
|
41
|
+
}): Component;
|
|
3
42
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/plugin-preview-menu-item/index.js"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/plugin-preview-menu-item/index.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,qDA9BG;IAAsC,IAAI;IACJ,IAAI;IACJ,OAAO;IACP,KAAK,GAAhC,GAAC,EAAA;CAEZ,GAuBS,SAAS,CAYpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/plugin-sidebar/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/plugin-sidebar/index.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,+DArDG;IAAqC,IAAI,EAAjC,MAAM;IACwB,SAAS;IACV,KAAK,EAAlC,MAAM;IACwB,UAAU;IACV,IAAI;CAE1C,+BAwDF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../src/components/post-author/panel.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../src/components/post-author/panel.js"],"names":[],"mappings":"AAsCA;;;;GAIG;AACH,8BAFY,SAAS,CA4CpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-card-panel/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-card-panel/index.js"],"names":[],"mappings":"AAyBA;;;;gCA6DC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flat-term-selector.d.ts","sourceRoot":"","sources":["../../../src/components/post-taxonomies/flat-term-selector.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flat-term-selector.d.ts","sourceRoot":"","sources":["../../../src/components/post-taxonomies/flat-term-selector.js"],"names":[],"mappings":"AA2DA;;;;;;;;GAQG;AACH,oEALG;IAAuB,IAAI,EAAnB,MAAM;IACS,uBAAuB,EAAtC,OAAO;CAEf,GAAS,GAAG,CAAC,OAAO,CA+PtB;;;;;;;yBAzRW,OAAO;;wJASX,CAAC;4BAGJ,CAAC;;;;kCAQE,OAAO;;6BAEmC,CAAvB;yBACiC,CAAC,iCAC3C,OAAO;+BAAmD,CAAC;0BAA2F,CAAA,2DAA4D,CAAA;0BAEzM,CAAC;iCAE5B,CAAA;iCAA2C,CAAC;wCAE3B,CAAA;2BACgC,CAAA;kCAIG,CAAC;;;;;yBAIoF,OAAM;;wJActG,CAAC;4BAElB,CAAC;;;;kCAIhB,OAAM;;6BAC2B,CAAC;yBAKT,CAAC,iCAI5B,OACL;+BAEK,CAAN;0BAGS,CAAC,2DAEM,CAAC;0BACT,CAAC;iCAEW,CAAC;iCAEL,CAAC;wCAGR,CAAC;2BAEN,CAAC;kCAUH,CAAD;;yBAIe,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hierarchical-term-selector.d.ts","sourceRoot":"","sources":["../../../src/components/post-taxonomies/hierarchical-term-selector.js"],"names":[],"mappings":"AA2CA;;;;;;;GAOG;AACH,0CALW,MAAM,EAAE,SACR,MAAM,EAAE,GAEP,MAAM,EAAE,CAqCnB;AAED;;;;;;;GAOG;AACH,gCALW,MAAM,EAAE,UACR,MAAM,GAAC,MAAM,QACb,MAAM,GACL,MAAM,CAUjB;AAED;;;;;GAKG;AACH,8CAHW,MAAM,GACL,CAAC,CAAS,IAAM,EAAN,MAAM,KAAG,CAAC,MAAM,GAAC,OAAO,CAAC,CAAC,CAmC/C;AAED;;;;;;GAMG;AACH,mDAHG;IAAsB,IAAI,EAAlB,MAAM;CACd,GAAS,OAAO,
|
|
1
|
+
{"version":3,"file":"hierarchical-term-selector.d.ts","sourceRoot":"","sources":["../../../src/components/post-taxonomies/hierarchical-term-selector.js"],"names":[],"mappings":"AA2CA;;;;;;;GAOG;AACH,0CALW,MAAM,EAAE,SACR,MAAM,EAAE,GAEP,MAAM,EAAE,CAqCnB;AAED;;;;;;;GAOG;AACH,gCALW,MAAM,EAAE,UACR,MAAM,GAAC,MAAM,QACb,MAAM,GACL,MAAM,CAUjB;AAED;;;;;GAKG;AACH,8CAHW,MAAM,GACL,CAAC,CAAS,IAAM,EAAN,MAAM,KAAG,CAAC,MAAM,GAAC,OAAO,CAAC,CAAC,CAmC/C;AAED;;;;;;GAMG;AACH,mDAHG;IAAsB,IAAI,EAAlB,MAAM;CACd,GAAS,OAAO,CAuUlB;;;;;;;yBA1ae,OAAO;;wJASC,CAAC;4BAGS,CAAC;;;;kCAIJ,OAAO;;6BAIJ,CAAC;yBASjC,CAAC,iCAC6B,OAChC;+BACQ,CAAA;0BAMyB,CAAA,2DAE3B,CAAC;0BACJ,CAAC;iCAEM,CAAC;iCACP,CAAC;wCAGS,CAAA;2BACsB,CAAC;kCASpC,CAAD;;;;;yBAI0B,OACxB;;wJAOW,CAAC;4BACX,CAAC;;;;kCAIuB,OAAO;;6BAGiB,CAAC;yBAG7C,CAAC,iCACuB,OAAO;+BACjB,CAAC;0BAKmC,CAAC,2DAEtD,CAAC;0BAEoB,CAAC;iCAMzB,CAAD;iCAA2C,CAAC;wCAED,CAAC;2BAES,CAAA;kCAInD,CAAC;;yBAGgB,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classic-theme.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/classic-theme.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"classic-theme.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/classic-theme.js"],"names":[],"mappings":";AAyNA,oEAaC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-url/index.js"],"names":[],"mappings":"AA0BA;;;;;;;;;;;GAWG;AACH,wDAFY,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/post-url/index.js"],"names":[],"mappings":"AA0BA;;;;;;;;;;;GAWG;AACH,wDAFY,SAAS,CAgKpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../src/components/post-url/panel.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../src/components/post-url/panel.js"],"names":[],"mappings":"AAkBA;;;;GAIG;AACH,wCAFY,GAAG,CAAC,OAAO,CA2DtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/preview-dropdown/index.js"],"names":[],"mappings":"AAgCA;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/preview-dropdown/index.js"],"names":[],"mappings":"AAgCA;;;uCA0IC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/provider/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/provider/index.js"],"names":[],"mappings":"AAwWA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,sCArBG;IAAwB,IAAI;IACJ,kBAAkB;IAElB,QAAQ;IAER,QAAQ;CAGhC,GAWS,GAAG,CAAC,OAAO,CAWtB;AA7QD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,4GA0ME"}
|
|
@@ -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":";AAkIA;;;gCA8DC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit-template-blocks-notification.d.ts","sourceRoot":"","sources":["../../../src/components/visual-editor/edit-template-blocks-notification.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;GAaG;AACH,uEAHG;IAAsD,UAAU,EAAxD,OAAO,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC;CAEhD,
|
|
1
|
+
{"version":3,"file":"edit-template-blocks-notification.d.ts","sourceRoot":"","sources":["../../../src/components/visual-editor/edit-template-blocks-notification.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;GAaG;AACH,uEAHG;IAAsD,UAAU,EAAxD,OAAO,OAAO,EAAE,SAAS,CAAC,WAAW,CAAC;CAEhD,sCAyEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/visual-editor/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/visual-editor/index.js"],"names":[],"mappings":";AAmGA;;;;;;;gCAwYC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-zoom-out-mode-exit.d.ts","sourceRoot":"","sources":["../../../src/components/visual-editor/use-zoom-out-mode-exit.js"],"names":[],"mappings":"AAYA;;GAEG;AACH,+EAiCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/zoom-out-toggle/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/zoom-out-toggle/index.js"],"names":[],"mappings":";AAqBA;;gCA6DC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-apis.d.ts","sourceRoot":"","sources":["../src/private-apis.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"private-apis.d.ts","sourceRoot":"","sources":["../src/private-apis.js"],"names":[],"mappings":"AA6BA,6BAA8B"}
|
|
@@ -200,10 +200,7 @@ export function togglePublishSidebar(): Object;
|
|
|
200
200
|
export function setupEditor(post: Object, edits: Object, template: any[] | null): ({ dispatch }: {
|
|
201
201
|
dispatch: any;
|
|
202
202
|
}) => void;
|
|
203
|
-
export function editPost(edits: Object, options: Object):
|
|
204
|
-
select: any;
|
|
205
|
-
registry: any;
|
|
206
|
-
}) => void;
|
|
203
|
+
export function editPost(edits: Object, options: Object): Object;
|
|
207
204
|
export function savePost(options?: Object): ({ select, dispatch, registry }: {
|
|
208
205
|
select: any;
|
|
209
206
|
dispatch: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/store/actions.js"],"names":[],"mappings":"AA0EA;;;;;;;GAOG;AACH,gDAFY,MAAM,CAUjB;AAED;;;;;GAKG;AACH;;EAOC;AAED;;;;;;GAMG;AACH,8BAHY,MAAM,CAWjB;AAED;;;;;;GAMG;AACH,uCAFW,MAAM,UAQhB;AAED;;;;;;;GAOG;AACH,wCALW,MAAM,UACN,MAAM,GAEL,MAAM,CAQjB;
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/store/actions.js"],"names":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BhB;AAwBK,uCAFI,MAAM;;;;WAef;AAuBK,oDAJI,MAAM,GAEL,MAAM,CA0BhB;AAOK,mDAFI,MAAM;;WAyBf;AAgCK,2CAbI,OAAO,GAAC,MAAM,GAWb,MAAM,CAoBhB;AAoBK;;;WA0DL;AAOK,uCAFI,MAAM;;;WAyBf;AA2CD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC"}
|
|
@@ -29,6 +29,11 @@ export function isCleanNewPost(state: Object): boolean;
|
|
|
29
29
|
*
|
|
30
30
|
* @param {Object} state Global application state.
|
|
31
31
|
*
|
|
32
|
+
* @example
|
|
33
|
+
*
|
|
34
|
+
*```js
|
|
35
|
+
* const currentPostType = wp.data.select( 'core/editor' ).getCurrentPostType();
|
|
36
|
+
*```
|
|
32
37
|
* @return {string} Post type.
|
|
33
38
|
*/
|
|
34
39
|
export function getCurrentPostType(state: Object): string;
|
|
@@ -83,6 +88,22 @@ export function getCurrentPostAttribute(state: Object, attributeName: string): a
|
|
|
83
88
|
* @param {Object} state Global application state.
|
|
84
89
|
* @param {string} attributeName Post attribute name.
|
|
85
90
|
*
|
|
91
|
+
* @example
|
|
92
|
+
*
|
|
93
|
+
*```js
|
|
94
|
+
* // Get specific media size based on the featured media ID
|
|
95
|
+
* // Note: change sizes?.large for any registered size
|
|
96
|
+
* const getFeaturedMediaUrl = useSelect( ( select ) => {
|
|
97
|
+
* const getFeaturedMediaId =
|
|
98
|
+
* select( 'core/editor' ).getEditedPostAttribute( 'featured_media' );
|
|
99
|
+
* const getMedia = select( 'core' ).getMedia( getFeaturedMediaId );
|
|
100
|
+
*
|
|
101
|
+
* return (
|
|
102
|
+
* getMedia?.media_details?.sizes?.large?.source_url || getMedia?.source_url || ''
|
|
103
|
+
* );
|
|
104
|
+
* }, [] );
|
|
105
|
+
*```
|
|
106
|
+
*
|
|
86
107
|
* @return {*} Post attribute value.
|
|
87
108
|
*/
|
|
88
109
|
export function getEditedPostAttribute(state: Object, attributeName: string): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/store/selectors.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/store/selectors.js"],"names":[],"mappings":"AAgEA;;;;;;;GAOG;AACH,uCAJW,MAAM,GAEL,OAAO,CAIlB;AAED;;;;;;GAMG;AACH,yCAJW,MAAM,GAEL,OAAO,CAKlB;AA+CD;;;;;;;GAOG;AACH,sCAJW,MAAM,GAEL,OAAO,CAIlB;AAgCD;;;;;;;;;;;GAWG;AACH,0CATW,MAAM,GAOL,MAAM,CAIjB;AAED;;;;;;;GAOG;AACH,wCAJW,MAAM,GAEJ,MAAM,OAAA,CAIlB;AAED;;;;;;GAMG;AACH,4CAJW,MAAM,GAEL,MAAM,OAAC,CAIlB;AAED;;;;;;GAMG;AACH,oDAJW,MAAM,GAEL,MAAM,CAMjB;AAED;;;;;;;GAOG;AACH,oDAJW,MAAM,GAEJ,MAAM,OAAA,CAOlB;AAsBD;;;;;;;GAOG;AACH,+CALW,MAAM,iBACN,MAAM,GAEL,GAAC,CAkBZ;AA8BD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,8CArBW,MAAM,iBACN,MAAM,GAkBL,GAAC,CAsBZ;AA6CD;;;;;;;;GAQG;AACH,+CAJW,MAAM,GAEL,MAAM,CAcjB;AAED;;;;;;GAMG;AACH,4CAJW,MAAM,GAEL,OAAO,CAIlB;AAED;;;;;;;GAOG;A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D;AAE7D;;GAEG;AACH,kDAEE;AAEF;;GAEG;AACH,8CAEE;AAEF;;GAEG;AACH,oDAEE;AAEF;;GAEG;AACH,uCAA2E;AAE3E;;GAEG;AACH,mCAAmE;AAEnE;;GAEG;AACH,uCAA2E;AAE3E;;GAEG;AACH,0CACgD;AAEhD;;GAEG;AACH,wCAA6E;AAE7E;;GAEG;AACH,wCAA6E;AAE7E;;GAEG;AACH,4CAEE;AAaF;;;;;;GAMG;AACH,kHASE;AAEF;;;;;;;GAOG;AACH,wHAcE;AAEF;;;;;;;GAOG;AACH,oHAgCE;AAEF;;;;;;GAMG;AACH,wCAQE;;;;;;;;cAzlBY,MAAM;;;;kBACN,MAAM;;;;;YACN,MAAM"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageTypeBadge.d.ts","sourceRoot":"","sources":["../../src/utils/pageTypeBadge.js"],"names":[],"mappings":"AAYA;;GAEG;AACH,2DAyBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terms.d.ts","sourceRoot":"","sources":["../../src/utils/terms.js"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,
|
|
1
|
+
{"version":3,"file":"terms.d.ts","sourceRoot":"","sources":["../../src/utils/terms.js"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,wDA4CC;AAEM,iDAEN;AASM,mCAJI,MAAM,GAEL,MAAM,CAOjB;AAUM,qCAJI,MAAM,EAAE,GAEP,MAAM,EAAE,CAInB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/editor",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.11.0",
|
|
4
4
|
"description": "Enhanced block editor for WordPress posts.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -31,42 +31,42 @@
|
|
|
31
31
|
"{src,build,build-module}/{index.js,store/index.js,hooks/**,bindings/**}"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@babel/runtime": "
|
|
35
|
-
"@wordpress/a11y": "
|
|
36
|
-
"@wordpress/api-fetch": "
|
|
37
|
-
"@wordpress/blob": "
|
|
38
|
-
"@wordpress/block-editor": "
|
|
39
|
-
"@wordpress/blocks": "
|
|
40
|
-
"@wordpress/commands": "
|
|
41
|
-
"@wordpress/components": "
|
|
42
|
-
"@wordpress/compose": "
|
|
43
|
-
"@wordpress/core-data": "
|
|
44
|
-
"@wordpress/data": "
|
|
45
|
-
"@wordpress/dataviews": "
|
|
46
|
-
"@wordpress/date": "
|
|
47
|
-
"@wordpress/deprecated": "
|
|
48
|
-
"@wordpress/dom": "
|
|
49
|
-
"@wordpress/element": "
|
|
50
|
-
"@wordpress/fields": "
|
|
51
|
-
"@wordpress/hooks": "
|
|
52
|
-
"@wordpress/html-entities": "
|
|
53
|
-
"@wordpress/i18n": "
|
|
54
|
-
"@wordpress/icons": "
|
|
55
|
-
"@wordpress/interface": "
|
|
56
|
-
"@wordpress/keyboard-shortcuts": "
|
|
57
|
-
"@wordpress/keycodes": "
|
|
58
|
-
"@wordpress/media-utils": "
|
|
59
|
-
"@wordpress/notices": "
|
|
60
|
-
"@wordpress/patterns": "
|
|
61
|
-
"@wordpress/plugins": "
|
|
62
|
-
"@wordpress/preferences": "
|
|
63
|
-
"@wordpress/private-apis": "
|
|
64
|
-
"@wordpress/reusable-blocks": "
|
|
65
|
-
"@wordpress/rich-text": "
|
|
66
|
-
"@wordpress/server-side-render": "
|
|
67
|
-
"@wordpress/url": "
|
|
68
|
-
"@wordpress/warning": "
|
|
69
|
-
"@wordpress/wordcount": "
|
|
34
|
+
"@babel/runtime": "7.25.7",
|
|
35
|
+
"@wordpress/a11y": "*",
|
|
36
|
+
"@wordpress/api-fetch": "*",
|
|
37
|
+
"@wordpress/blob": "*",
|
|
38
|
+
"@wordpress/block-editor": "*",
|
|
39
|
+
"@wordpress/blocks": "*",
|
|
40
|
+
"@wordpress/commands": "*",
|
|
41
|
+
"@wordpress/components": "*",
|
|
42
|
+
"@wordpress/compose": "*",
|
|
43
|
+
"@wordpress/core-data": "*",
|
|
44
|
+
"@wordpress/data": "*",
|
|
45
|
+
"@wordpress/dataviews": "*",
|
|
46
|
+
"@wordpress/date": "*",
|
|
47
|
+
"@wordpress/deprecated": "*",
|
|
48
|
+
"@wordpress/dom": "*",
|
|
49
|
+
"@wordpress/element": "*",
|
|
50
|
+
"@wordpress/fields": "*",
|
|
51
|
+
"@wordpress/hooks": "*",
|
|
52
|
+
"@wordpress/html-entities": "*",
|
|
53
|
+
"@wordpress/i18n": "*",
|
|
54
|
+
"@wordpress/icons": "*",
|
|
55
|
+
"@wordpress/interface": "*",
|
|
56
|
+
"@wordpress/keyboard-shortcuts": "*",
|
|
57
|
+
"@wordpress/keycodes": "*",
|
|
58
|
+
"@wordpress/media-utils": "*",
|
|
59
|
+
"@wordpress/notices": "*",
|
|
60
|
+
"@wordpress/patterns": "*",
|
|
61
|
+
"@wordpress/plugins": "*",
|
|
62
|
+
"@wordpress/preferences": "*",
|
|
63
|
+
"@wordpress/private-apis": "*",
|
|
64
|
+
"@wordpress/reusable-blocks": "*",
|
|
65
|
+
"@wordpress/rich-text": "*",
|
|
66
|
+
"@wordpress/server-side-render": "*",
|
|
67
|
+
"@wordpress/url": "*",
|
|
68
|
+
"@wordpress/warning": "*",
|
|
69
|
+
"@wordpress/wordcount": "*",
|
|
70
70
|
"change-case": "^4.1.2",
|
|
71
71
|
"client-zip": "^2.4.5",
|
|
72
72
|
"clsx": "^2.1.1",
|
|
@@ -86,5 +86,6 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"
|
|
89
|
+
"wpScript": true,
|
|
90
|
+
"gitHead": "dcf4613b33b0eda14e203ac30f700ed0db70347f"
|
|
90
91
|
}
|
package/src/bindings/api.js
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
store as blocksStore,
|
|
6
|
-
registerBlockBindingsSource,
|
|
7
|
-
} from '@wordpress/blocks';
|
|
8
|
-
import { dispatch } from '@wordpress/data';
|
|
4
|
+
import { registerBlockBindingsSource } from '@wordpress/blocks';
|
|
9
5
|
|
|
10
6
|
/**
|
|
11
7
|
* Internal dependencies
|
|
12
8
|
*/
|
|
13
9
|
import patternOverrides from './pattern-overrides';
|
|
14
10
|
import postMeta from './post-meta';
|
|
15
|
-
import { unlock } from '../lock-unlock';
|
|
16
11
|
|
|
17
12
|
/**
|
|
18
13
|
* Function to register core block bindings sources provided by the editor.
|
|
@@ -28,29 +23,3 @@ export function registerCoreBlockBindingsSources() {
|
|
|
28
23
|
registerBlockBindingsSource( patternOverrides );
|
|
29
24
|
registerBlockBindingsSource( postMeta );
|
|
30
25
|
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Function to bootstrap core block bindings sources defined in the server.
|
|
34
|
-
*
|
|
35
|
-
* @param {Object} sources Object containing the sources to bootstrap.
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```js
|
|
39
|
-
* import { bootstrapBlockBindingsSourcesFromServer } from '@wordpress/editor';
|
|
40
|
-
*
|
|
41
|
-
* bootstrapBlockBindingsSourcesFromServer( sources );
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
export function bootstrapBlockBindingsSourcesFromServer( sources ) {
|
|
45
|
-
if ( sources ) {
|
|
46
|
-
const { addBootstrappedBlockBindingsSource } = unlock(
|
|
47
|
-
dispatch( blocksStore )
|
|
48
|
-
);
|
|
49
|
-
for ( const [ name, args ] of Object.entries( sources ) ) {
|
|
50
|
-
addBootstrappedBlockBindingsSource( {
|
|
51
|
-
name,
|
|
52
|
-
...args,
|
|
53
|
-
} );
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __, _x } from '@wordpress/i18n';
|
|
5
|
+
import { useSelect } from '@wordpress/data';
|
|
6
|
+
import { useState, useEffect } from '@wordpress/element';
|
|
7
|
+
import {
|
|
8
|
+
__experimentalHStack as HStack,
|
|
9
|
+
__experimentalVStack as VStack,
|
|
10
|
+
Button,
|
|
11
|
+
TextControl,
|
|
12
|
+
} from '@wordpress/components';
|
|
13
|
+
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
14
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Internal dependencies
|
|
18
|
+
*/
|
|
19
|
+
import { sanitizeCommentString } from './utils';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Renders the UI for adding a comment in the Gutenberg editor's collaboration sidebar.
|
|
23
|
+
*
|
|
24
|
+
* @param {Object} props - The component props.
|
|
25
|
+
* @param {Function} props.onSubmit - A callback function to be called when the user submits a comment.
|
|
26
|
+
* @param {boolean} props.showCommentBoard - The function to edit the comment.
|
|
27
|
+
* @param {Function} props.setShowCommentBoard - The function to delete the comment.
|
|
28
|
+
* @return {JSX.Element} The rendered comment input UI.
|
|
29
|
+
*/
|
|
30
|
+
export function AddComment( {
|
|
31
|
+
onSubmit,
|
|
32
|
+
showCommentBoard,
|
|
33
|
+
setShowCommentBoard,
|
|
34
|
+
} ) {
|
|
35
|
+
// State to manage the comment thread.
|
|
36
|
+
const [ inputComment, setInputComment ] = useState( '' );
|
|
37
|
+
|
|
38
|
+
const {
|
|
39
|
+
defaultAvatar,
|
|
40
|
+
clientId,
|
|
41
|
+
blockCommentId,
|
|
42
|
+
showAddCommentBoard,
|
|
43
|
+
currentUser,
|
|
44
|
+
} = useSelect( ( select ) => {
|
|
45
|
+
const { getSettings } = select( blockEditorStore );
|
|
46
|
+
const { __experimentalDiscussionSettings } = getSettings();
|
|
47
|
+
const selectedBlock = select( blockEditorStore ).getSelectedBlock();
|
|
48
|
+
const userData = select( coreStore ).getCurrentUser();
|
|
49
|
+
return {
|
|
50
|
+
defaultAvatar: __experimentalDiscussionSettings?.avatarURL,
|
|
51
|
+
clientId: selectedBlock?.clientId,
|
|
52
|
+
blockCommentId: selectedBlock?.attributes?.blockCommentId,
|
|
53
|
+
showAddCommentBoard: showCommentBoard,
|
|
54
|
+
currentUser: userData,
|
|
55
|
+
};
|
|
56
|
+
} );
|
|
57
|
+
|
|
58
|
+
const userAvatar =
|
|
59
|
+
currentUser && currentUser.avatar_urls && currentUser.avatar_urls[ 48 ]
|
|
60
|
+
? currentUser.avatar_urls[ 48 ]
|
|
61
|
+
: defaultAvatar;
|
|
62
|
+
|
|
63
|
+
useEffect( () => {
|
|
64
|
+
setInputComment( '' );
|
|
65
|
+
}, [ clientId ] );
|
|
66
|
+
|
|
67
|
+
const handleCancel = () => {
|
|
68
|
+
setShowCommentBoard( false );
|
|
69
|
+
setInputComment( '' );
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
if ( ! showAddCommentBoard || ! clientId || undefined !== blockCommentId ) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<VStack
|
|
78
|
+
spacing="3"
|
|
79
|
+
className="editor-collab-sidebar-panel__thread editor-collab-sidebar-panel__active-thread"
|
|
80
|
+
>
|
|
81
|
+
<HStack alignment="left" spacing="3">
|
|
82
|
+
<img
|
|
83
|
+
src={ userAvatar }
|
|
84
|
+
// translators: alt text for user avatar image
|
|
85
|
+
alt={ __( 'User Avatar' ) }
|
|
86
|
+
className="editor-collab-sidebar-panel__user-avatar"
|
|
87
|
+
width={ 32 }
|
|
88
|
+
height={ 32 }
|
|
89
|
+
/>
|
|
90
|
+
<span className="editor-collab-sidebar-panel__user-name">
|
|
91
|
+
{ currentUser?.name ?? '' }
|
|
92
|
+
</span>
|
|
93
|
+
</HStack>
|
|
94
|
+
<TextControl
|
|
95
|
+
__next40pxDefaultSize
|
|
96
|
+
__nextHasNoMarginBottom
|
|
97
|
+
value={ inputComment }
|
|
98
|
+
onChange={ setInputComment }
|
|
99
|
+
placeholder={ _x( 'Comment', 'noun' ) }
|
|
100
|
+
/>
|
|
101
|
+
<HStack alignment="right" spacing="3">
|
|
102
|
+
<Button
|
|
103
|
+
__next40pxDefaultSize
|
|
104
|
+
variant="tertiary"
|
|
105
|
+
text={ _x( 'Cancel', 'Cancel comment button' ) }
|
|
106
|
+
onClick={ handleCancel }
|
|
107
|
+
/>
|
|
108
|
+
<Button
|
|
109
|
+
__next40pxDefaultSize
|
|
110
|
+
accessibleWhenDisabled
|
|
111
|
+
variant="primary"
|
|
112
|
+
text={ _x( 'Comment', 'Add comment button' ) }
|
|
113
|
+
disabled={
|
|
114
|
+
0 === sanitizeCommentString( inputComment ).length
|
|
115
|
+
}
|
|
116
|
+
onClick={ () => {
|
|
117
|
+
onSubmit( inputComment );
|
|
118
|
+
setInputComment( '' );
|
|
119
|
+
} }
|
|
120
|
+
/>
|
|
121
|
+
</HStack>
|
|
122
|
+
</VStack>
|
|
123
|
+
);
|
|
124
|
+
}
|