@wordpress/editor 13.33.0 → 13.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -4
- package/README.md +132 -20
- package/build/bindings/pattern-overrides.js +70 -1
- package/build/bindings/pattern-overrides.js.map +1 -1
- package/build/components/autosave-monitor/index.js +15 -12
- package/build/components/autosave-monitor/index.js.map +1 -1
- package/build/components/block-settings-menu/content-only-settings-menu.js +126 -0
- package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -0
- package/build/components/block-settings-menu/content-only-settings-menu.native.js +11 -0
- package/build/components/block-settings-menu/content-only-settings-menu.native.js.map +1 -0
- package/build/components/character-count/index.js +5 -0
- package/build/components/character-count/index.js.map +1 -1
- package/build/components/collapsible-block-toolbar/index.js +73 -0
- package/build/components/collapsible-block-toolbar/index.js.map +1 -0
- package/build/components/document-bar/index.js +2 -2
- package/build/components/document-bar/index.js.map +1 -1
- package/build/components/document-outline/check.js +8 -0
- package/build/components/document-outline/check.js.map +1 -1
- package/build/components/document-outline/index.js +11 -0
- package/build/components/document-outline/index.js.map +1 -1
- package/build/components/document-outline/item.js +2 -2
- package/build/components/document-outline/item.js.map +1 -1
- package/build/components/document-tools/index.js +15 -25
- package/build/components/document-tools/index.js.map +1 -1
- package/build/components/editor-canvas/edit-template-blocks-notification.js +1 -1
- package/build/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
- package/build/components/editor-canvas/index.js +19 -8
- package/build/components/editor-canvas/index.js.map +1 -1
- package/build/components/editor-history/redo.js +11 -0
- package/build/components/editor-history/redo.js.map +1 -1
- package/build/components/editor-history/undo.js +11 -0
- package/build/components/editor-history/undo.js.map +1 -1
- package/build/components/editor-snackbars/index.js +6 -0
- package/build/components/editor-snackbars/index.js.map +1 -1
- package/build/components/global-keyboard-shortcuts/index.js +7 -0
- package/build/components/global-keyboard-shortcuts/index.js.map +1 -1
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js +35 -1
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
- package/build/components/global-styles-provider/index.js +130 -0
- package/build/components/global-styles-provider/index.js.map +1 -0
- package/build/components/header/index.js +147 -0
- package/build/components/header/index.js.map +1 -0
- package/build/components/inserter-sidebar/index.js +56 -34
- package/build/components/inserter-sidebar/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +4 -0
- package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +2 -2
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/list-view-sidebar/index.js +1 -1
- package/build/components/list-view-sidebar/index.js.map +1 -1
- package/build/components/more-menu/copy-content-menu-item.js +59 -0
- package/build/components/more-menu/copy-content-menu-item.js.map +1 -0
- package/build/components/more-menu/index.js +119 -0
- package/build/components/more-menu/index.js.map +1 -0
- package/build/components/more-menu/tools-more-menu-group.js +23 -0
- package/build/components/more-menu/tools-more-menu-group.js.map +1 -0
- package/build/components/more-menu/view-more-menu-group.js +24 -0
- package/build/components/more-menu/view-more-menu-group.js.map +1 -0
- package/build/components/page-attributes/check.js +8 -0
- package/build/components/page-attributes/check.js.map +1 -1
- package/build/components/page-attributes/order.js +7 -0
- package/build/components/page-attributes/order.js.map +1 -1
- package/build/components/page-attributes/panel.js +14 -8
- package/build/components/page-attributes/panel.js.map +1 -1
- package/build/components/page-attributes/parent.js +7 -0
- package/build/components/page-attributes/parent.js.map +1 -1
- package/build/components/plugin-post-publish-panel/index.js +1 -1
- package/build/components/plugin-post-publish-panel/index.js.map +1 -1
- package/build/components/plugin-pre-publish-panel/index.js +1 -1
- package/build/components/plugin-pre-publish-panel/index.js.map +1 -1
- package/build/components/plugin-sidebar/index.js +1 -1
- package/build/components/plugin-sidebar/index.js.map +1 -1
- package/build/components/post-actions/actions.js +219 -66
- package/build/components/post-actions/actions.js.map +1 -1
- package/build/components/post-actions/index.js +32 -16
- package/build/components/post-actions/index.js.map +1 -1
- package/build/components/post-author/check.js +9 -0
- package/build/components/post-author/check.js.map +1 -1
- package/build/components/post-author/index.js +6 -0
- package/build/components/post-author/index.js.map +1 -1
- package/build/components/post-author/panel.js +5 -0
- package/build/components/post-author/panel.js.map +1 -1
- package/build/components/post-card-panel/index.js +7 -66
- package/build/components/post-card-panel/index.js.map +1 -1
- package/build/components/post-comments/index.js +28 -8
- package/build/components/post-comments/index.js.map +1 -1
- package/build/components/post-content-information/index.js +72 -0
- package/build/components/post-content-information/index.js.map +1 -0
- package/build/components/post-discussion/panel.js +104 -20
- package/build/components/post-discussion/panel.js.map +1 -1
- package/build/components/post-excerpt/check.js +0 -19
- package/build/components/post-excerpt/check.js.map +1 -1
- package/build/components/post-excerpt/index.js +52 -12
- package/build/components/post-excerpt/index.js.map +1 -1
- package/build/components/post-excerpt/panel.js +118 -7
- package/build/components/post-excerpt/panel.js.map +1 -1
- package/build/components/post-excerpt/plugin.js +2 -2
- package/build/components/post-excerpt/plugin.js.map +1 -1
- package/build/components/post-featured-image/index.js +1 -1
- package/build/components/post-featured-image/index.js.map +1 -1
- package/build/components/post-format/panel.js +27 -0
- package/build/components/post-format/panel.js.map +1 -0
- package/build/components/post-last-edited-panel/index.js +33 -0
- package/build/components/post-last-edited-panel/index.js.map +1 -0
- package/build/components/post-panel-row/index.js +2 -2
- package/build/components/post-panel-row/index.js.map +1 -1
- package/build/components/post-panel-section/index.js +28 -0
- package/build/components/post-panel-section/index.js.map +1 -0
- package/build/components/post-pingbacks/index.js +5 -2
- package/build/components/post-pingbacks/index.js.map +1 -1
- package/build/components/post-publish-button/post-publish-button-or-toggle.js +100 -0
- package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -0
- package/build/components/post-saved-state/index.js +2 -2
- package/build/components/post-saved-state/index.js.map +1 -1
- package/build/components/post-schedule/panel.js +1 -1
- package/build/components/post-schedule/panel.js.map +1 -1
- package/build/components/post-slug/panel.js +27 -0
- package/build/components/post-slug/panel.js.map +1 -0
- package/build/components/post-status/index.js +13 -13
- package/build/components/post-status/index.js.map +1 -1
- package/build/components/post-sticky/panel.js +21 -0
- package/build/components/post-sticky/panel.js.map +1 -0
- package/build/components/post-template/block-theme.js +2 -2
- package/build/components/post-template/block-theme.js.map +1 -1
- package/build/components/post-template/classic-theme.js +0 -1
- package/build/components/post-template/classic-theme.js.map +1 -1
- package/build/components/post-template/swap-template-button.js +2 -5
- package/build/components/post-template/swap-template-button.js.map +1 -1
- package/build/components/post-title/index.js +2 -2
- package/build/components/post-title/index.js.map +1 -1
- package/build/components/post-title/post-title-raw.js +2 -2
- package/build/components/post-title/post-title-raw.js.map +1 -1
- package/build/components/post-transform-panel/hooks.js +90 -0
- package/build/components/post-transform-panel/hooks.js.map +1 -0
- package/build/components/post-transform-panel/index.js +101 -0
- package/build/components/post-transform-panel/index.js.map +1 -0
- package/build/components/post-trash/panel.js +18 -0
- package/build/components/post-trash/panel.js.map +1 -0
- package/build/components/post-type-support-check/index.js +1 -1
- package/build/components/post-type-support-check/index.js.map +1 -1
- package/build/components/post-url/index.js +2 -1
- package/build/components/post-url/index.js.map +1 -1
- package/build/components/post-url/panel.js +1 -1
- package/build/components/post-url/panel.js.map +1 -1
- package/build/components/preferences-modal/enable-publish-sidebar.js +34 -0
- package/build/components/preferences-modal/enable-publish-sidebar.js.map +1 -0
- package/build/components/preferences-modal/index.js +11 -5
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/preview-dropdown/index.js +3 -1
- package/build/components/preview-dropdown/index.js.map +1 -1
- package/build/components/provider/disable-non-page-content-blocks.js +23 -16
- package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
- package/build/components/provider/index.js +3 -1
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/use-block-editor-settings.js +21 -3
- package/build/components/provider/use-block-editor-settings.js.map +1 -1
- package/build/components/save-publish-panels/index.js +89 -0
- package/build/components/save-publish-panels/index.js.map +1 -0
- package/build/components/sidebar/constants.js +11 -0
- package/build/components/sidebar/constants.js.map +1 -0
- package/build/components/sidebar/header.js +53 -0
- package/build/components/sidebar/header.js.map +1 -0
- package/build/components/sidebar/index.js +157 -0
- package/build/components/sidebar/index.js.map +1 -0
- package/build/components/sidebar/post-summary.js +84 -0
- package/build/components/sidebar/post-summary.js.map +1 -0
- package/build/components/start-page-options/index.js +10 -8
- package/build/components/start-page-options/index.js.map +1 -1
- package/build/components/start-template-options/index.js +192 -0
- package/build/components/start-template-options/index.js.map +1 -0
- package/build/components/template-content-panel/index.js +38 -0
- package/build/components/template-content-panel/index.js.map +1 -0
- package/build/hooks/pattern-overrides.js +10 -5
- package/build/hooks/pattern-overrides.js.map +1 -1
- package/build/private-apis.js +19 -8
- package/build/private-apis.js.map +1 -1
- package/build/private-apis.native.js +72 -0
- package/build/private-apis.native.js.map +1 -0
- package/build/store/private-selectors.js +6 -1
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +15 -0
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +3 -1
- package/build/store/selectors.js.map +1 -1
- package/build-module/bindings/pattern-overrides.js +69 -1
- package/build-module/bindings/pattern-overrides.js.map +1 -1
- package/build-module/components/autosave-monitor/index.js +15 -13
- package/build-module/components/autosave-monitor/index.js.map +1 -1
- package/build-module/components/block-settings-menu/content-only-settings-menu.js +119 -0
- package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -0
- package/build-module/components/block-settings-menu/content-only-settings-menu.native.js +5 -0
- package/build-module/components/block-settings-menu/content-only-settings-menu.native.js.map +1 -0
- package/build-module/components/character-count/index.js +6 -0
- package/build-module/components/character-count/index.js.map +1 -1
- package/build-module/components/collapsible-block-toolbar/index.js +65 -0
- package/build-module/components/collapsible-block-toolbar/index.js.map +1 -0
- package/build-module/components/document-bar/index.js +2 -2
- package/build-module/components/document-bar/index.js.map +1 -1
- package/build-module/components/document-outline/check.js +9 -0
- package/build-module/components/document-outline/check.js.map +1 -1
- package/build-module/components/document-outline/index.js +11 -0
- package/build-module/components/document-outline/index.js.map +1 -1
- package/build-module/components/document-outline/item.js +2 -2
- package/build-module/components/document-outline/item.js.map +1 -1
- package/build-module/components/document-tools/index.js +17 -27
- package/build-module/components/document-tools/index.js.map +1 -1
- package/build-module/components/editor-canvas/edit-template-blocks-notification.js +1 -1
- package/build-module/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
- package/build-module/components/editor-canvas/index.js +19 -8
- package/build-module/components/editor-canvas/index.js.map +1 -1
- package/build-module/components/editor-history/redo.js +11 -0
- package/build-module/components/editor-history/redo.js.map +1 -1
- package/build-module/components/editor-history/undo.js +11 -0
- package/build-module/components/editor-history/undo.js.map +1 -1
- package/build-module/components/editor-snackbars/index.js +6 -0
- package/build-module/components/editor-snackbars/index.js.map +1 -1
- package/build-module/components/global-keyboard-shortcuts/index.js +8 -0
- package/build-module/components/global-keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +36 -1
- package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +1 -1
- package/build-module/components/global-styles-provider/index.js +120 -0
- package/build-module/components/global-styles-provider/index.js.map +1 -0
- package/build-module/components/header/index.js +139 -0
- package/build-module/components/header/index.js.map +1 -0
- package/build-module/components/inserter-sidebar/index.js +59 -37
- package/build-module/components/inserter-sidebar/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js +4 -0
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +2 -2
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/list-view-sidebar/index.js +1 -1
- package/build-module/components/list-view-sidebar/index.js.map +1 -1
- package/build-module/components/more-menu/copy-content-menu-item.js +52 -0
- package/build-module/components/more-menu/copy-content-menu-item.js.map +1 -0
- package/build-module/components/more-menu/index.js +111 -0
- package/build-module/components/more-menu/index.js.map +1 -0
- package/build-module/components/more-menu/tools-more-menu-group.js +16 -0
- package/build-module/components/more-menu/tools-more-menu-group.js.map +1 -0
- package/build-module/components/more-menu/view-more-menu-group.js +17 -0
- package/build-module/components/more-menu/view-more-menu-group.js.map +1 -0
- package/build-module/components/page-attributes/check.js +9 -0
- package/build-module/components/page-attributes/check.js.map +1 -1
- package/build-module/components/page-attributes/order.js +7 -0
- package/build-module/components/page-attributes/order.js.map +1 -1
- package/build-module/components/page-attributes/panel.js +13 -6
- package/build-module/components/page-attributes/panel.js.map +1 -1
- package/build-module/components/page-attributes/parent.js +7 -0
- package/build-module/components/page-attributes/parent.js.map +1 -1
- package/build-module/components/plugin-post-publish-panel/index.js +1 -1
- package/build-module/components/plugin-post-publish-panel/index.js.map +1 -1
- package/build-module/components/plugin-pre-publish-panel/index.js +1 -1
- package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -1
- package/build-module/components/plugin-sidebar/index.js +1 -1
- package/build-module/components/plugin-sidebar/index.js.map +1 -1
- package/build-module/components/post-actions/actions.js +223 -70
- package/build-module/components/post-actions/actions.js.map +1 -1
- package/build-module/components/post-actions/index.js +33 -17
- package/build-module/components/post-actions/index.js.map +1 -1
- package/build-module/components/post-author/check.js +10 -0
- package/build-module/components/post-author/check.js.map +1 -1
- package/build-module/components/post-author/index.js +6 -0
- package/build-module/components/post-author/index.js.map +1 -1
- package/build-module/components/post-author/panel.js +6 -0
- package/build-module/components/post-author/panel.js.map +1 -1
- package/build-module/components/post-card-panel/index.js +9 -67
- package/build-module/components/post-card-panel/index.js.map +1 -1
- package/build-module/components/post-comments/index.js +30 -10
- package/build-module/components/post-comments/index.js.map +1 -1
- package/build-module/components/post-content-information/index.js +66 -0
- package/build-module/components/post-content-information/index.js.map +1 -0
- package/build-module/components/post-discussion/panel.js +105 -21
- package/build-module/components/post-discussion/panel.js.map +1 -1
- package/build-module/components/post-excerpt/check.js +0 -19
- package/build-module/components/post-excerpt/check.js.map +1 -1
- package/build-module/components/post-excerpt/index.js +52 -11
- package/build-module/components/post-excerpt/index.js.map +1 -1
- package/build-module/components/post-excerpt/panel.js +118 -8
- package/build-module/components/post-excerpt/panel.js.map +1 -1
- package/build-module/components/post-excerpt/plugin.js +2 -2
- package/build-module/components/post-excerpt/plugin.js.map +1 -1
- package/build-module/components/post-featured-image/index.js +1 -1
- package/build-module/components/post-featured-image/index.js.map +1 -1
- package/build-module/components/post-format/panel.js +18 -0
- package/build-module/components/post-format/panel.js.map +1 -0
- package/build-module/components/post-last-edited-panel/index.js +26 -0
- package/build-module/components/post-last-edited-panel/index.js.map +1 -0
- package/build-module/components/post-panel-row/index.js +2 -2
- package/build-module/components/post-panel-row/index.js.map +1 -1
- package/build-module/components/post-panel-section/index.js +20 -0
- package/build-module/components/post-panel-section/index.js.map +1 -0
- package/build-module/components/post-pingbacks/index.js +6 -3
- package/build-module/components/post-pingbacks/index.js.map +1 -1
- package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +91 -0
- package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +1 -0
- package/build-module/components/post-saved-state/index.js +2 -2
- package/build-module/components/post-saved-state/index.js.map +1 -1
- package/build-module/components/post-schedule/panel.js +1 -1
- package/build-module/components/post-schedule/panel.js.map +1 -1
- package/build-module/components/post-slug/panel.js +18 -0
- package/build-module/components/post-slug/panel.js.map +1 -0
- package/build-module/components/post-status/index.js +13 -13
- package/build-module/components/post-status/index.js.map +1 -1
- package/build-module/components/post-sticky/panel.js +12 -0
- package/build-module/components/post-sticky/panel.js.map +1 -0
- package/build-module/components/post-template/block-theme.js +2 -2
- package/build-module/components/post-template/block-theme.js.map +1 -1
- package/build-module/components/post-template/classic-theme.js +0 -1
- package/build-module/components/post-template/classic-theme.js.map +1 -1
- package/build-module/components/post-template/swap-template-button.js +3 -6
- package/build-module/components/post-template/swap-template-button.js.map +1 -1
- package/build-module/components/post-title/index.js +2 -2
- package/build-module/components/post-title/index.js.map +1 -1
- package/build-module/components/post-title/post-title-raw.js +2 -2
- package/build-module/components/post-title/post-title-raw.js.map +1 -1
- package/build-module/components/post-transform-panel/hooks.js +83 -0
- package/build-module/components/post-transform-panel/hooks.js.map +1 -0
- package/build-module/components/post-transform-panel/index.js +94 -0
- package/build-module/components/post-transform-panel/index.js.map +1 -0
- package/build-module/components/post-trash/panel.js +10 -0
- package/build-module/components/post-trash/panel.js.map +1 -0
- package/build-module/components/post-type-support-check/index.js +1 -1
- package/build-module/components/post-type-support-check/index.js.map +1 -1
- package/build-module/components/post-url/index.js +2 -1
- package/build-module/components/post-url/index.js.map +1 -1
- package/build-module/components/post-url/panel.js +1 -1
- package/build-module/components/post-url/panel.js.map +1 -1
- package/build-module/components/preferences-modal/enable-publish-sidebar.js +27 -0
- package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +1 -0
- package/build-module/components/preferences-modal/index.js +11 -5
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/preview-dropdown/index.js +3 -1
- package/build-module/components/preview-dropdown/index.js.map +1 -1
- package/build-module/components/provider/disable-non-page-content-blocks.js +24 -17
- package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
- package/build-module/components/provider/index.js +3 -1
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/provider/use-block-editor-settings.js +21 -3
- package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
- package/build-module/components/save-publish-panels/index.js +80 -0
- package/build-module/components/save-publish-panels/index.js.map +1 -0
- package/build-module/components/sidebar/constants.js +5 -0
- package/build-module/components/sidebar/constants.js.map +1 -0
- package/build-module/components/sidebar/header.js +46 -0
- package/build-module/components/sidebar/header.js.map +1 -0
- package/build-module/components/sidebar/index.js +149 -0
- package/build-module/components/sidebar/index.js.map +1 -0
- package/build-module/components/sidebar/post-summary.js +77 -0
- package/build-module/components/sidebar/post-summary.js.map +1 -0
- package/build-module/components/start-page-options/index.js +10 -8
- package/build-module/components/start-page-options/index.js.map +1 -1
- package/build-module/components/start-template-options/index.js +185 -0
- package/build-module/components/start-template-options/index.js.map +1 -0
- package/build-module/components/template-content-panel/index.js +31 -0
- package/build-module/components/template-content-panel/index.js.map +1 -0
- package/build-module/hooks/pattern-overrides.js +10 -5
- package/build-module/hooks/pattern-overrides.js.map +1 -1
- package/build-module/private-apis.js +19 -8
- package/build-module/private-apis.js.map +1 -1
- package/build-module/private-apis.native.js +62 -0
- package/build-module/private-apis.native.js.map +1 -0
- package/build-module/store/private-selectors.js +3 -0
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +14 -0
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +3 -1
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +535 -48
- package/build-style/style.css +535 -48
- package/package.json +38 -36
- package/src/bindings/pattern-overrides.js +83 -1
- package/src/components/autocompleters/style.scss +1 -2
- package/src/components/autosave-monitor/index.js +15 -12
- package/src/components/block-settings-menu/content-only-settings-menu.js +175 -0
- package/src/components/block-settings-menu/content-only-settings-menu.native.js +4 -0
- package/src/components/block-settings-menu/style.scss +4 -0
- package/src/components/character-count/index.js +5 -0
- package/src/components/collapsible-block-toolbar/index.js +77 -0
- package/src/components/collapsible-block-toolbar/style.scss +80 -0
- package/src/components/document-bar/index.js +2 -2
- package/src/components/document-outline/check.js +8 -0
- package/src/components/document-outline/index.js +10 -0
- package/src/components/document-outline/item.js +2 -2
- package/src/components/document-tools/index.js +19 -26
- package/src/components/editor-canvas/edit-template-blocks-notification.js +1 -1
- package/src/components/editor-canvas/index.js +18 -6
- package/src/components/editor-history/redo.js +10 -0
- package/src/components/editor-history/undo.js +10 -0
- package/src/components/editor-snackbars/index.js +5 -0
- package/src/components/entities-saved-states/style.scss +7 -0
- package/src/components/global-keyboard-shortcuts/index.js +7 -0
- package/src/components/global-keyboard-shortcuts/register-shortcuts.js +42 -1
- package/src/components/global-styles-provider/index.js +162 -0
- package/src/components/header/index.js +154 -0
- package/src/components/header/style.scss +231 -0
- package/src/components/inserter-sidebar/index.js +52 -32
- package/src/components/inserter-sidebar/style.scss +10 -3
- package/src/components/keyboard-shortcut-help-modal/config.js +10 -1
- package/src/components/keyboard-shortcut-help-modal/index.js +2 -2
- package/src/components/list-view-sidebar/index.js +1 -1
- package/src/components/list-view-sidebar/style.scss +3 -2
- package/src/components/more-menu/copy-content-menu-item.js +51 -0
- package/src/components/more-menu/index.js +158 -0
- package/src/components/more-menu/tools-more-menu-group.js +11 -0
- package/src/components/more-menu/view-more-menu-group.js +13 -0
- package/src/components/page-attributes/check.js +8 -0
- package/src/components/page-attributes/order.js +6 -0
- package/src/components/page-attributes/panel.js +21 -17
- package/src/components/page-attributes/parent.js +6 -0
- package/src/components/page-attributes/test/order.js +5 -1
- package/src/components/plugin-post-publish-panel/index.js +1 -1
- package/src/components/plugin-pre-publish-panel/index.js +1 -1
- package/src/components/plugin-sidebar/index.js +1 -1
- package/src/components/post-actions/actions.js +373 -152
- package/src/components/post-actions/index.js +34 -33
- package/src/components/post-author/check.js +9 -0
- package/src/components/post-author/index.js +5 -0
- package/src/components/post-author/panel.js +5 -0
- package/src/components/post-card-panel/index.js +40 -141
- package/src/components/post-card-panel/style.scss +2 -6
- package/src/components/post-comments/index.js +47 -9
- package/src/components/post-content-information/index.js +83 -0
- package/src/components/post-content-information/style.scss +6 -0
- package/src/components/post-discussion/panel.js +108 -27
- package/src/components/post-discussion/style.scss +26 -0
- package/src/components/post-excerpt/check.js +0 -18
- package/src/components/post-excerpt/index.js +66 -15
- package/src/components/post-excerpt/panel.js +196 -19
- package/src/components/post-excerpt/plugin.js +2 -2
- package/src/components/post-excerpt/style.scss +24 -0
- package/src/components/post-featured-image/index.js +1 -1
- package/src/components/post-featured-image/style.scss +2 -8
- package/src/components/post-format/panel.js +22 -0
- package/src/components/post-format/style.scss +6 -0
- package/src/components/post-last-edited-panel/index.js +35 -0
- package/src/components/post-last-edited-panel/style.scss +6 -0
- package/src/components/post-last-revision/test/check.js +5 -1
- package/src/components/post-panel-row/index.js +2 -2
- package/src/components/post-panel-row/style.scss +3 -3
- package/src/components/post-panel-section/index.js +19 -0
- package/src/components/post-panel-section/style.scss +3 -0
- package/src/components/post-pingbacks/index.js +11 -2
- package/src/components/post-publish-button/post-publish-button-or-toggle.js +102 -0
- package/src/components/post-publish-button/test/post-publish-button-or-toggle.js +63 -0
- package/src/components/post-publish-panel/style.scss +48 -0
- package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +225 -75
- package/src/components/post-saved-state/index.js +2 -2
- package/src/components/post-schedule/panel.js +1 -1
- package/src/components/post-schedule/style.scss +2 -4
- package/src/components/post-slug/panel.js +22 -0
- package/src/components/post-slug/style.scss +5 -0
- package/src/components/post-slug/test/index.js +5 -1
- package/src/components/post-status/index.js +88 -80
- package/src/components/post-status/style.scss +0 -1
- package/src/components/post-sticky/panel.js +18 -0
- package/src/components/post-template/block-theme.js +2 -2
- package/src/components/post-template/classic-theme.js +0 -1
- package/src/components/post-template/swap-template-button.js +3 -6
- package/src/components/post-text-editor/style.scss +1 -1
- package/src/components/post-title/index.js +2 -2
- package/src/components/post-title/post-title-raw.js +2 -2
- package/src/components/post-title/style.scss +1 -1
- package/src/components/post-transform-panel/hooks.js +114 -0
- package/src/components/post-transform-panel/index.js +99 -0
- package/src/components/post-trash/panel.js +13 -0
- package/src/components/post-type-support-check/index.js +1 -1
- package/src/components/post-type-support-check/test/index.js +2 -2
- package/src/components/post-url/index.js +1 -0
- package/src/components/post-url/panel.js +1 -1
- package/src/components/preferences-modal/enable-publish-sidebar.js +28 -0
- package/src/components/preferences-modal/index.js +17 -3
- package/src/components/preview-dropdown/index.js +3 -1
- package/src/components/provider/disable-non-page-content-blocks.js +23 -21
- package/src/components/provider/index.js +4 -0
- package/src/components/provider/use-block-editor-settings.js +19 -4
- package/src/components/save-publish-panels/index.js +96 -0
- package/src/components/save-publish-panels/style.scss +36 -0
- package/src/components/sidebar/constants.js +4 -0
- package/src/components/sidebar/header.js +49 -0
- package/src/components/sidebar/index.js +200 -0
- package/src/components/sidebar/post-summary.js +104 -0
- package/src/components/sidebar/style.scss +18 -0
- package/src/components/start-page-options/index.js +12 -5
- package/src/components/start-template-options/index.js +219 -0
- package/src/components/start-template-options/style.scss +55 -0
- package/src/components/template-areas/style.scss +0 -1
- package/src/components/template-content-panel/index.js +36 -0
- package/src/hooks/pattern-overrides.js +12 -6
- package/src/private-apis.js +22 -8
- package/src/private-apis.native.js +61 -0
- package/src/store/private-selectors.js +3 -0
- package/src/store/reducer.js +12 -0
- package/src/store/selectors.js +3 -1
- package/src/style.scss +11 -0
- package/src/components/post-slug/test/check.js +0 -17
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
.editor-header {
|
|
2
|
+
height: $header-height;
|
|
3
|
+
background: $white;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-wrap: wrap;
|
|
6
|
+
align-items: center;
|
|
7
|
+
// The header should never be wider than the viewport, or buttons might be hidden. Especially relevant at high zoom levels. Related to https://core.trac.wordpress.org/ticket/47603#ticket.
|
|
8
|
+
max-width: 100vw;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
|
|
11
|
+
// Make toolbar sticky on larger breakpoints
|
|
12
|
+
@include break-zoomed-in {
|
|
13
|
+
flex-wrap: nowrap;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.editor-header__toolbar {
|
|
18
|
+
display: flex;
|
|
19
|
+
// Allow this area to shrink to fit the toolbar buttons.
|
|
20
|
+
flex-shrink: 8;
|
|
21
|
+
// Take up the space of the toolbar so it can be justified to the left side of the toolbar.
|
|
22
|
+
flex-grow: 3;
|
|
23
|
+
// Hide the overflow so flex will limit its width. Block toolbar will allow scrolling on fixed toolbar.
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
// Leave enough room for the focus ring to show.
|
|
26
|
+
padding: 2px 0;
|
|
27
|
+
align-items: center;
|
|
28
|
+
// Allow focus ring to be fully visible on furthest right button.
|
|
29
|
+
@include break-medium() {
|
|
30
|
+
padding-right: var(--wp-admin-border-width-focus);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.table-of-contents {
|
|
34
|
+
display: none;
|
|
35
|
+
|
|
36
|
+
@include break-small() {
|
|
37
|
+
display: block;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.editor-header__center {
|
|
43
|
+
flex-grow: 1;
|
|
44
|
+
display: flex;
|
|
45
|
+
justify-content: center;
|
|
46
|
+
|
|
47
|
+
&.is-collapsed {
|
|
48
|
+
display: none;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Buttons on the right side
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
.editor-header__settings {
|
|
57
|
+
display: inline-flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
flex-wrap: nowrap;
|
|
60
|
+
padding-right: $grid-unit-05;
|
|
61
|
+
|
|
62
|
+
@include break-small () {
|
|
63
|
+
padding-right: $grid-unit-10;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
gap: $grid-unit-10;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Show icon labels.
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
.show-icon-labels.interface-pinned-items,
|
|
74
|
+
.show-icon-labels .editor-header {
|
|
75
|
+
.components-button.has-icon {
|
|
76
|
+
width: auto;
|
|
77
|
+
|
|
78
|
+
// Hide the button icons when labels are set to display...
|
|
79
|
+
svg {
|
|
80
|
+
display: none;
|
|
81
|
+
}
|
|
82
|
+
// ... and display labels.
|
|
83
|
+
&::after {
|
|
84
|
+
content: attr(aria-label);
|
|
85
|
+
}
|
|
86
|
+
&[aria-disabled="true"] {
|
|
87
|
+
background-color: transparent;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
.is-tertiary {
|
|
91
|
+
&:active {
|
|
92
|
+
box-shadow: 0 0 0 1.5px var(--wp-admin-theme-color);
|
|
93
|
+
background-color: transparent;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
// Exception for drodpdown toggle buttons.
|
|
97
|
+
.components-button.has-icon.button-toggle {
|
|
98
|
+
svg {
|
|
99
|
+
display: block;
|
|
100
|
+
}
|
|
101
|
+
&::after {
|
|
102
|
+
content: none;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Don't hide MenuItemsChoice check icons
|
|
107
|
+
.components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon {
|
|
108
|
+
display: block;
|
|
109
|
+
}
|
|
110
|
+
.editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,
|
|
111
|
+
.interface-pinned-items .components-button {
|
|
112
|
+
padding-left: $grid-unit;
|
|
113
|
+
padding-right: $grid-unit;
|
|
114
|
+
|
|
115
|
+
@include break-small {
|
|
116
|
+
padding-left: $grid-unit-15;
|
|
117
|
+
padding-right: $grid-unit-15;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.editor-post-save-draft.editor-post-save-draft,
|
|
122
|
+
.editor-post-saved-state.editor-post-saved-state {
|
|
123
|
+
&::after {
|
|
124
|
+
content: none;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.show-icon-labels {
|
|
130
|
+
.editor-header__toolbar .block-editor-block-mover {
|
|
131
|
+
// Modified group borders.
|
|
132
|
+
border-left: none;
|
|
133
|
+
|
|
134
|
+
&::before {
|
|
135
|
+
content: "";
|
|
136
|
+
width: $border-width;
|
|
137
|
+
height: $grid-unit-30;
|
|
138
|
+
background-color: $gray-300;
|
|
139
|
+
margin-top: $grid-unit-05;
|
|
140
|
+
margin-left: $grid-unit;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Modified block movers horizontal separator.
|
|
144
|
+
.block-editor-block-mover__move-button-container {
|
|
145
|
+
&::before {
|
|
146
|
+
width: calc(100% - #{$grid-unit-30});
|
|
147
|
+
background: $gray-300;
|
|
148
|
+
left: calc(50% + 1px);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.show-icon-labels.interface-pinned-items {
|
|
155
|
+
padding: 6px $grid-unit-15 $grid-unit-15;
|
|
156
|
+
margin-top: 0;
|
|
157
|
+
margin-bottom: 0;
|
|
158
|
+
margin-left: -$grid-unit-15;
|
|
159
|
+
margin-right: -$grid-unit-15;
|
|
160
|
+
border-bottom: 1px solid $gray-400;
|
|
161
|
+
display: block;
|
|
162
|
+
|
|
163
|
+
> .components-button.has-icon {
|
|
164
|
+
margin: 0;
|
|
165
|
+
padding: 6px 6px 6px $grid-unit;
|
|
166
|
+
width: 14.625rem;
|
|
167
|
+
justify-content: flex-start;
|
|
168
|
+
|
|
169
|
+
&[aria-expanded="true"] svg {
|
|
170
|
+
display: block;
|
|
171
|
+
max-width: $grid-unit-30;
|
|
172
|
+
}
|
|
173
|
+
&[aria-expanded="false"] {
|
|
174
|
+
padding-left: $grid-unit-50;
|
|
175
|
+
}
|
|
176
|
+
svg {
|
|
177
|
+
margin-right: 8px;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.editor-header__post-preview-button {
|
|
183
|
+
@include break-small {
|
|
184
|
+
display: none;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.is-distraction-free {
|
|
189
|
+
.interface-interface-skeleton__header {
|
|
190
|
+
border-bottom: none;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.editor-header {
|
|
194
|
+
background-color: $white;
|
|
195
|
+
border-bottom: 1px solid #e0e0e0;
|
|
196
|
+
position: absolute;
|
|
197
|
+
width: 100%;
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
// hide some parts
|
|
201
|
+
& > .edit-post-header__settings > .edit-post-header__post-preview-button {
|
|
202
|
+
visibility: hidden;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
& > .editor-header__toolbar .editor-document-tools__document-overview-toggle,
|
|
206
|
+
& > .editor-header__settings > .editor-preview-dropdown,
|
|
207
|
+
& > .editor-header__settings > .interface-pinned-items {
|
|
208
|
+
display: none;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// We need ! important because we override inline styles
|
|
214
|
+
// set by the motion component.
|
|
215
|
+
.interface-interface-skeleton__header:focus-within {
|
|
216
|
+
opacity: 1 !important;
|
|
217
|
+
div {
|
|
218
|
+
transform: translateX(0) translateZ(0) !important;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.components-editor-notices__dismissible {
|
|
224
|
+
position: absolute;
|
|
225
|
+
z-index: 35;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.components-popover.more-menu-dropdown__content {
|
|
230
|
+
z-index: z-index(".components-popover.more-menu__content");
|
|
231
|
+
}
|
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
5
|
-
import { Button, VisuallyHidden } from '@wordpress/components';
|
|
6
|
-
import { __experimentalLibrary as Library } from '@wordpress/block-editor';
|
|
7
|
-
import { close } from '@wordpress/icons';
|
|
8
5
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} from '@wordpress/
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
6
|
+
__experimentalLibrary as Library,
|
|
7
|
+
store as blockEditorStore,
|
|
8
|
+
} from '@wordpress/block-editor';
|
|
9
|
+
import { useViewportMatch } from '@wordpress/compose';
|
|
10
|
+
import { useCallback, useRef } from '@wordpress/element';
|
|
14
11
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
12
|
+
import { ESCAPE } from '@wordpress/keycodes';
|
|
15
13
|
|
|
16
14
|
/**
|
|
17
15
|
* Internal dependencies
|
|
@@ -23,55 +21,77 @@ export default function InserterSidebar( {
|
|
|
23
21
|
closeGeneralSidebar,
|
|
24
22
|
isRightSidebarOpen,
|
|
25
23
|
} ) {
|
|
26
|
-
const {
|
|
27
|
-
|
|
24
|
+
const {
|
|
25
|
+
blockSectionRootClientId,
|
|
26
|
+
inserterSidebarToggleRef,
|
|
27
|
+
insertionPoint,
|
|
28
|
+
showMostUsedBlocks,
|
|
29
|
+
} = useSelect( ( select ) => {
|
|
30
|
+
const { getInserterSidebarToggleRef, getInsertionPoint } = unlock(
|
|
31
|
+
select( editorStore )
|
|
32
|
+
);
|
|
33
|
+
const { getBlockRootClientId, __unstableGetEditorMode, getSettings } =
|
|
34
|
+
select( blockEditorStore );
|
|
28
35
|
const { get } = select( preferencesStore );
|
|
36
|
+
const getBlockSectionRootClientId = () => {
|
|
37
|
+
if ( __unstableGetEditorMode() === 'zoom-out' ) {
|
|
38
|
+
const { sectionRootClientId } = unlock( getSettings() );
|
|
39
|
+
if ( sectionRootClientId ) {
|
|
40
|
+
return sectionRootClientId;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return getBlockRootClientId();
|
|
44
|
+
};
|
|
29
45
|
return {
|
|
46
|
+
inserterSidebarToggleRef: getInserterSidebarToggleRef(),
|
|
30
47
|
insertionPoint: getInsertionPoint(),
|
|
31
48
|
showMostUsedBlocks: get( 'core', 'mostUsedBlocks' ),
|
|
49
|
+
blockSectionRootClientId: getBlockSectionRootClientId(),
|
|
32
50
|
};
|
|
33
51
|
}, [] );
|
|
34
52
|
const { setIsInserterOpened } = useDispatch( editorStore );
|
|
35
53
|
|
|
36
54
|
const isMobileViewport = useViewportMatch( 'medium', '<' );
|
|
37
|
-
const TagName = ! isMobileViewport ? VisuallyHidden : 'div';
|
|
38
|
-
const [ inserterDialogRef, inserterDialogProps ] = useDialog( {
|
|
39
|
-
onClose: () => setIsInserterOpened( false ),
|
|
40
|
-
focusOnMount: null,
|
|
41
|
-
} );
|
|
42
|
-
|
|
43
55
|
const libraryRef = useRef();
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
56
|
+
|
|
57
|
+
// When closing the inserter, focus should return to the toggle button.
|
|
58
|
+
const closeInserterSidebar = useCallback( () => {
|
|
59
|
+
setIsInserterOpened( false );
|
|
60
|
+
inserterSidebarToggleRef.current?.focus();
|
|
61
|
+
}, [ inserterSidebarToggleRef, setIsInserterOpened ] );
|
|
62
|
+
|
|
63
|
+
const closeOnEscape = useCallback(
|
|
64
|
+
( event ) => {
|
|
65
|
+
if ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {
|
|
66
|
+
event.preventDefault();
|
|
67
|
+
closeInserterSidebar();
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
[ closeInserterSidebar ]
|
|
71
|
+
);
|
|
47
72
|
|
|
48
73
|
return (
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
{ ...inserterDialogProps }
|
|
52
|
-
className="editor-inserter-sidebar"
|
|
53
|
-
>
|
|
54
|
-
<TagName className="editor-inserter-sidebar__header">
|
|
55
|
-
<Button
|
|
56
|
-
icon={ close }
|
|
57
|
-
label={ __( 'Close block inserter' ) }
|
|
58
|
-
onClick={ () => setIsInserterOpened( false ) }
|
|
59
|
-
/>
|
|
60
|
-
</TagName>
|
|
74
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
75
|
+
<div onKeyDown={ closeOnEscape } className="editor-inserter-sidebar">
|
|
61
76
|
<div className="editor-inserter-sidebar__content">
|
|
62
77
|
<Library
|
|
63
78
|
showMostUsedBlocks={ showMostUsedBlocks }
|
|
64
79
|
showInserterHelpPanel
|
|
65
80
|
shouldFocusBlock={ isMobileViewport }
|
|
66
|
-
rootClientId={
|
|
81
|
+
rootClientId={
|
|
82
|
+
blockSectionRootClientId ?? insertionPoint.rootClientId
|
|
83
|
+
}
|
|
67
84
|
__experimentalInsertionIndex={
|
|
68
85
|
insertionPoint.insertionIndex
|
|
69
86
|
}
|
|
87
|
+
__experimentalInitialTab={ insertionPoint.tab }
|
|
88
|
+
__experimentalInitialCategory={ insertionPoint.category }
|
|
70
89
|
__experimentalFilterValue={ insertionPoint.filterValue }
|
|
71
90
|
__experimentalOnPatternCategorySelection={
|
|
72
91
|
isRightSidebarOpen ? closeGeneralSidebar : undefined
|
|
73
92
|
}
|
|
74
93
|
ref={ libraryRef }
|
|
94
|
+
onClose={ closeInserterSidebar }
|
|
75
95
|
/>
|
|
76
96
|
</div>
|
|
77
97
|
</div>
|
|
@@ -6,16 +6,23 @@
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.editor-inserter-sidebar__header {
|
|
10
|
-
|
|
9
|
+
.block-editor-inserter-sidebar__header {
|
|
10
|
+
border-bottom: $border-width solid $gray-300;
|
|
11
11
|
padding-right: $grid-unit-10;
|
|
12
12
|
display: flex;
|
|
13
|
-
justify-content:
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
|
|
15
|
+
.block-editor-inserter-sidebar__close-button {
|
|
16
|
+
/* stylelint-disable-next-line property-disallowed-list -- This should be refactored to avoid order if possible */
|
|
17
|
+
order: 1;
|
|
18
|
+
align-self: center;
|
|
19
|
+
}
|
|
14
20
|
}
|
|
15
21
|
|
|
16
22
|
.editor-inserter-sidebar__content {
|
|
17
23
|
// Leave space for the close button
|
|
18
24
|
height: calc(100% - #{$button-size} - #{$grid-unit-10});
|
|
25
|
+
|
|
19
26
|
@include break-medium() {
|
|
20
27
|
height: 100%;
|
|
21
28
|
}
|
|
@@ -37,7 +37,16 @@ export const textFormattingShortcuts = [
|
|
|
37
37
|
description: __( 'Make the selected text inline code.' ),
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
|
-
keyCombination: {
|
|
40
|
+
keyCombination: {
|
|
41
|
+
modifier: 'access',
|
|
42
|
+
character: '0',
|
|
43
|
+
},
|
|
44
|
+
aliases: [
|
|
45
|
+
{
|
|
46
|
+
modifier: 'access',
|
|
47
|
+
character: '7',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
41
50
|
description: __( 'Convert the current heading to a paragraph.' ),
|
|
42
51
|
},
|
|
43
52
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
4
|
+
import clsx from 'clsx';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -52,7 +52,7 @@ const ShortcutList = ( { shortcuts } ) => (
|
|
|
52
52
|
|
|
53
53
|
const ShortcutSection = ( { title, shortcuts, className } ) => (
|
|
54
54
|
<section
|
|
55
|
-
className={
|
|
55
|
+
className={ clsx(
|
|
56
56
|
'editor-keyboard-shortcut-help-modal__section',
|
|
57
57
|
className
|
|
58
58
|
) }
|
|
@@ -129,7 +129,7 @@ export default function ListViewSidebar() {
|
|
|
129
129
|
// can be rendered internally.
|
|
130
130
|
defaultTabId="list-view"
|
|
131
131
|
>
|
|
132
|
-
<div className="
|
|
132
|
+
<div className="editor-list-view-sidebar__header">
|
|
133
133
|
<Button
|
|
134
134
|
className="editor-list-view-sidebar__close-button"
|
|
135
135
|
icon={ closeSmall }
|
|
@@ -8,12 +8,13 @@
|
|
|
8
8
|
// @see packages/block-editor/src/components/inserter/style.scss
|
|
9
9
|
width: 350px;
|
|
10
10
|
}
|
|
11
|
-
.
|
|
11
|
+
.editor-list-view-sidebar__header {
|
|
12
12
|
display: flex;
|
|
13
13
|
border-bottom: $border-width solid $gray-300;
|
|
14
14
|
}
|
|
15
15
|
.editor-list-view-sidebar__close-button {
|
|
16
16
|
background: $white;
|
|
17
|
+
/* stylelint-disable-next-line property-disallowed-list -- This should be removed when https://github.com/WordPress/gutenberg/issues/59013 is fixed. */
|
|
17
18
|
order: 1;
|
|
18
19
|
align-self: center;
|
|
19
20
|
margin-right: $grid-unit-15;
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
scrollbar-gutter: auto;
|
|
50
51
|
|
|
51
52
|
// The table cells use an extra pixels of space left and right. We compensate for that here.
|
|
52
|
-
padding: $grid-unit-
|
|
53
|
+
padding: $grid-unit-05;
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
.editor-list-view-sidebar__list-view-container {
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { MenuItem } from '@wordpress/components';
|
|
5
|
+
import { useSelect, useDispatch } from '@wordpress/data';
|
|
6
|
+
import { __ } from '@wordpress/i18n';
|
|
7
|
+
import { useCopyToClipboard } from '@wordpress/compose';
|
|
8
|
+
import { store as noticesStore } from '@wordpress/notices';
|
|
9
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
10
|
+
import { __unstableSerializeAndClean } from '@wordpress/blocks';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Internal dependencies
|
|
14
|
+
*/
|
|
15
|
+
import { store as editorStore } from '../../store';
|
|
16
|
+
|
|
17
|
+
export default function CopyContentMenuItem() {
|
|
18
|
+
const { createNotice } = useDispatch( noticesStore );
|
|
19
|
+
const { getCurrentPostId, getCurrentPostType } = useSelect( editorStore );
|
|
20
|
+
const { getEditedEntityRecord } = useSelect( coreStore );
|
|
21
|
+
|
|
22
|
+
function getText() {
|
|
23
|
+
const record = getEditedEntityRecord(
|
|
24
|
+
'postType',
|
|
25
|
+
getCurrentPostType(),
|
|
26
|
+
getCurrentPostId()
|
|
27
|
+
);
|
|
28
|
+
if ( ! record ) {
|
|
29
|
+
return '';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if ( typeof record.content === 'function' ) {
|
|
33
|
+
return record.content( record );
|
|
34
|
+
} else if ( record.blocks ) {
|
|
35
|
+
return __unstableSerializeAndClean( record.blocks );
|
|
36
|
+
} else if ( record.content ) {
|
|
37
|
+
return record.content;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function onSuccess() {
|
|
42
|
+
createNotice( 'info', __( 'All content copied.' ), {
|
|
43
|
+
isDismissible: true,
|
|
44
|
+
type: 'snackbar',
|
|
45
|
+
} );
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const ref = useCopyToClipboard( getText, onSuccess );
|
|
49
|
+
|
|
50
|
+
return <MenuItem ref={ ref }>{ __( 'Copy all blocks' ) }</MenuItem>;
|
|
51
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __, _x } from '@wordpress/i18n';
|
|
5
|
+
import { useSelect, useDispatch } from '@wordpress/data';
|
|
6
|
+
import { displayShortcut } from '@wordpress/keycodes';
|
|
7
|
+
import { external, moreVertical } from '@wordpress/icons';
|
|
8
|
+
import {
|
|
9
|
+
MenuGroup,
|
|
10
|
+
MenuItem,
|
|
11
|
+
VisuallyHidden,
|
|
12
|
+
DropdownMenu,
|
|
13
|
+
} from '@wordpress/components';
|
|
14
|
+
import {
|
|
15
|
+
PreferenceToggleMenuItem,
|
|
16
|
+
store as preferencesStore,
|
|
17
|
+
} from '@wordpress/preferences';
|
|
18
|
+
import { store as interfaceStore, ActionItem } from '@wordpress/interface';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Internal dependencies
|
|
22
|
+
*/
|
|
23
|
+
import CopyContentMenuItem from './copy-content-menu-item';
|
|
24
|
+
import ModeSwitcher from '../mode-switcher';
|
|
25
|
+
import ToolsMoreMenuGroup from './tools-more-menu-group';
|
|
26
|
+
import ViewMoreMenuGroup from './view-more-menu-group';
|
|
27
|
+
import { store as editorStore } from '../../store';
|
|
28
|
+
|
|
29
|
+
export default function MoreMenu() {
|
|
30
|
+
const { openModal } = useDispatch( interfaceStore );
|
|
31
|
+
const { set: setPreference } = useDispatch( preferencesStore );
|
|
32
|
+
const { toggleDistractionFree } = useDispatch( editorStore );
|
|
33
|
+
const showIconLabels = useSelect(
|
|
34
|
+
( select ) =>
|
|
35
|
+
select( preferencesStore ).get( 'core', 'showIconLabels' ),
|
|
36
|
+
[]
|
|
37
|
+
);
|
|
38
|
+
const turnOffDistractionFree = () => {
|
|
39
|
+
setPreference( 'core', 'distractionFree', false );
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<>
|
|
44
|
+
<DropdownMenu
|
|
45
|
+
icon={ moreVertical }
|
|
46
|
+
label={ __( 'Options' ) }
|
|
47
|
+
popoverProps={ {
|
|
48
|
+
placement: 'bottom-end',
|
|
49
|
+
className: 'more-menu-dropdown__content',
|
|
50
|
+
} }
|
|
51
|
+
toggleProps={ {
|
|
52
|
+
showTooltip: ! showIconLabels,
|
|
53
|
+
...( showIconLabels && { variant: 'tertiary' } ),
|
|
54
|
+
tooltipPosition: 'bottom',
|
|
55
|
+
size: 'compact',
|
|
56
|
+
} }
|
|
57
|
+
>
|
|
58
|
+
{ ( { onClose } ) => (
|
|
59
|
+
<>
|
|
60
|
+
<MenuGroup label={ _x( 'View', 'noun' ) }>
|
|
61
|
+
<PreferenceToggleMenuItem
|
|
62
|
+
scope="core"
|
|
63
|
+
name="fixedToolbar"
|
|
64
|
+
onToggle={ turnOffDistractionFree }
|
|
65
|
+
label={ __( 'Top toolbar' ) }
|
|
66
|
+
info={ __(
|
|
67
|
+
'Access all block and document tools in a single place'
|
|
68
|
+
) }
|
|
69
|
+
messageActivated={ __(
|
|
70
|
+
'Top toolbar activated'
|
|
71
|
+
) }
|
|
72
|
+
messageDeactivated={ __(
|
|
73
|
+
'Top toolbar deactivated'
|
|
74
|
+
) }
|
|
75
|
+
/>
|
|
76
|
+
<PreferenceToggleMenuItem
|
|
77
|
+
scope="core"
|
|
78
|
+
name="distractionFree"
|
|
79
|
+
label={ __( 'Distraction free' ) }
|
|
80
|
+
info={ __( 'Write with calmness' ) }
|
|
81
|
+
handleToggling={ false }
|
|
82
|
+
onToggle={ toggleDistractionFree }
|
|
83
|
+
messageActivated={ __(
|
|
84
|
+
'Distraction free mode activated'
|
|
85
|
+
) }
|
|
86
|
+
messageDeactivated={ __(
|
|
87
|
+
'Distraction free mode deactivated'
|
|
88
|
+
) }
|
|
89
|
+
shortcut={ displayShortcut.primaryShift(
|
|
90
|
+
'\\'
|
|
91
|
+
) }
|
|
92
|
+
/>
|
|
93
|
+
<PreferenceToggleMenuItem
|
|
94
|
+
scope="core"
|
|
95
|
+
name="focusMode"
|
|
96
|
+
label={ __( 'Spotlight mode' ) }
|
|
97
|
+
info={ __( 'Focus on one block at a time' ) }
|
|
98
|
+
messageActivated={ __(
|
|
99
|
+
'Spotlight mode activated'
|
|
100
|
+
) }
|
|
101
|
+
messageDeactivated={ __(
|
|
102
|
+
'Spotlight mode deactivated'
|
|
103
|
+
) }
|
|
104
|
+
/>
|
|
105
|
+
<ViewMoreMenuGroup.Slot fillProps={ { onClose } } />
|
|
106
|
+
</MenuGroup>
|
|
107
|
+
<ModeSwitcher />
|
|
108
|
+
<ActionItem.Slot
|
|
109
|
+
name="core/plugin-more-menu"
|
|
110
|
+
label={ __( 'Plugins' ) }
|
|
111
|
+
as={ MenuGroup }
|
|
112
|
+
fillProps={ { onClick: onClose } }
|
|
113
|
+
/>
|
|
114
|
+
<MenuGroup label={ __( 'Tools' ) }>
|
|
115
|
+
<MenuItem
|
|
116
|
+
onClick={ () =>
|
|
117
|
+
openModal( 'editor/keyboard-shortcut-help' )
|
|
118
|
+
}
|
|
119
|
+
shortcut={ displayShortcut.access( 'h' ) }
|
|
120
|
+
>
|
|
121
|
+
{ __( 'Keyboard shortcuts' ) }
|
|
122
|
+
</MenuItem>
|
|
123
|
+
<CopyContentMenuItem />
|
|
124
|
+
<MenuItem
|
|
125
|
+
icon={ external }
|
|
126
|
+
href={ __(
|
|
127
|
+
'https://wordpress.org/documentation/article/wordpress-block-editor/'
|
|
128
|
+
) }
|
|
129
|
+
target="_blank"
|
|
130
|
+
rel="noopener noreferrer"
|
|
131
|
+
>
|
|
132
|
+
{ __( 'Help' ) }
|
|
133
|
+
<VisuallyHidden as="span">
|
|
134
|
+
{
|
|
135
|
+
/* translators: accessibility text */
|
|
136
|
+
__( '(opens in a new tab)' )
|
|
137
|
+
}
|
|
138
|
+
</VisuallyHidden>
|
|
139
|
+
</MenuItem>
|
|
140
|
+
<ToolsMoreMenuGroup.Slot
|
|
141
|
+
fillProps={ { onClose } }
|
|
142
|
+
/>
|
|
143
|
+
</MenuGroup>
|
|
144
|
+
<MenuGroup>
|
|
145
|
+
<MenuItem
|
|
146
|
+
onClick={ () =>
|
|
147
|
+
openModal( 'editor/preferences' )
|
|
148
|
+
}
|
|
149
|
+
>
|
|
150
|
+
{ __( 'Preferences' ) }
|
|
151
|
+
</MenuItem>
|
|
152
|
+
</MenuGroup>
|
|
153
|
+
</>
|
|
154
|
+
) }
|
|
155
|
+
</DropdownMenu>
|
|
156
|
+
</>
|
|
157
|
+
);
|
|
158
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { createSlotFill } from '@wordpress/components';
|
|
5
|
+
|
|
6
|
+
const { Fill: ToolsMoreMenuGroup, Slot } =
|
|
7
|
+
createSlotFill( 'ToolsMoreMenuGroup' );
|
|
8
|
+
|
|
9
|
+
ToolsMoreMenuGroup.Slot = ( { fillProps } ) => <Slot fillProps={ fillProps } />;
|
|
10
|
+
|
|
11
|
+
export default ToolsMoreMenuGroup;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { createSlotFill } from '@wordpress/components';
|
|
5
|
+
import { Platform } from '@wordpress/element';
|
|
6
|
+
|
|
7
|
+
const { Fill: ViewMoreMenuGroup, Slot } = createSlotFill(
|
|
8
|
+
Platform.OS === 'web' ? Symbol( 'ViewMoreMenuGroup' ) : 'ViewMoreMenuGroup'
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
ViewMoreMenuGroup.Slot = ( { fillProps } ) => <Slot fillProps={ fillProps } />;
|
|
12
|
+
|
|
13
|
+
export default ViewMoreMenuGroup;
|