@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,219 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { Modal, Flex, FlexItem, Button } from '@wordpress/components';
|
|
5
|
+
import { __ } from '@wordpress/i18n';
|
|
6
|
+
import { useState, useMemo, useEffect } from '@wordpress/element';
|
|
7
|
+
import { __experimentalBlockPatternsList as BlockPatternsList } from '@wordpress/block-editor';
|
|
8
|
+
import { useSelect } from '@wordpress/data';
|
|
9
|
+
import { useAsyncList } from '@wordpress/compose';
|
|
10
|
+
import { parse } from '@wordpress/blocks';
|
|
11
|
+
import { store as coreStore, useEntityBlockEditor } from '@wordpress/core-data';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Internal dependencies
|
|
15
|
+
*/
|
|
16
|
+
import { store as editorStore } from '../../store';
|
|
17
|
+
import { TEMPLATE_POST_TYPE } from '../../store/constants';
|
|
18
|
+
|
|
19
|
+
function useFallbackTemplateContent( slug, isCustom = false ) {
|
|
20
|
+
return useSelect(
|
|
21
|
+
( select ) => {
|
|
22
|
+
const { getEntityRecord, getDefaultTemplateId } =
|
|
23
|
+
select( coreStore );
|
|
24
|
+
const templateId = getDefaultTemplateId( {
|
|
25
|
+
slug,
|
|
26
|
+
is_custom: isCustom,
|
|
27
|
+
ignore_empty: true,
|
|
28
|
+
} );
|
|
29
|
+
return templateId
|
|
30
|
+
? getEntityRecord( 'postType', TEMPLATE_POST_TYPE, templateId )
|
|
31
|
+
?.content?.raw
|
|
32
|
+
: undefined;
|
|
33
|
+
},
|
|
34
|
+
[ slug, isCustom ]
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function useStartPatterns( fallbackContent ) {
|
|
39
|
+
const { slug, patterns } = useSelect( ( select ) => {
|
|
40
|
+
const { getCurrentPostType, getCurrentPostId } = select( editorStore );
|
|
41
|
+
const { getEntityRecord, getBlockPatterns } = select( coreStore );
|
|
42
|
+
const postId = getCurrentPostId();
|
|
43
|
+
const postType = getCurrentPostType();
|
|
44
|
+
const record = getEntityRecord( 'postType', postType, postId );
|
|
45
|
+
return {
|
|
46
|
+
slug: record.slug,
|
|
47
|
+
patterns: getBlockPatterns(),
|
|
48
|
+
};
|
|
49
|
+
}, [] );
|
|
50
|
+
|
|
51
|
+
const currentThemeStylesheet = useSelect(
|
|
52
|
+
( select ) => select( coreStore ).getCurrentTheme().stylesheet
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
// Duplicated from packages/block-library/src/pattern/edit.js.
|
|
56
|
+
function injectThemeAttributeInBlockTemplateContent( block ) {
|
|
57
|
+
if (
|
|
58
|
+
block.innerBlocks.find(
|
|
59
|
+
( innerBlock ) => innerBlock.name === 'core/template-part'
|
|
60
|
+
)
|
|
61
|
+
) {
|
|
62
|
+
block.innerBlocks = block.innerBlocks.map( ( innerBlock ) => {
|
|
63
|
+
if (
|
|
64
|
+
innerBlock.name === 'core/template-part' &&
|
|
65
|
+
innerBlock.attributes.theme === undefined
|
|
66
|
+
) {
|
|
67
|
+
innerBlock.attributes.theme = currentThemeStylesheet;
|
|
68
|
+
}
|
|
69
|
+
return innerBlock;
|
|
70
|
+
} );
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (
|
|
74
|
+
block.name === 'core/template-part' &&
|
|
75
|
+
block.attributes.theme === undefined
|
|
76
|
+
) {
|
|
77
|
+
block.attributes.theme = currentThemeStylesheet;
|
|
78
|
+
}
|
|
79
|
+
return block;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return useMemo( () => {
|
|
83
|
+
// filter patterns that are supposed to be used in the current template being edited.
|
|
84
|
+
return [
|
|
85
|
+
{
|
|
86
|
+
name: 'fallback',
|
|
87
|
+
blocks: parse( fallbackContent ),
|
|
88
|
+
title: __( 'Fallback content' ),
|
|
89
|
+
},
|
|
90
|
+
...patterns
|
|
91
|
+
.filter( ( pattern ) => {
|
|
92
|
+
return (
|
|
93
|
+
Array.isArray( pattern.templateTypes ) &&
|
|
94
|
+
pattern.templateTypes.some( ( templateType ) =>
|
|
95
|
+
slug.startsWith( templateType )
|
|
96
|
+
)
|
|
97
|
+
);
|
|
98
|
+
} )
|
|
99
|
+
.map( ( pattern ) => {
|
|
100
|
+
return {
|
|
101
|
+
...pattern,
|
|
102
|
+
blocks: parse( pattern.content ).map( ( block ) =>
|
|
103
|
+
injectThemeAttributeInBlockTemplateContent( block )
|
|
104
|
+
),
|
|
105
|
+
};
|
|
106
|
+
} ),
|
|
107
|
+
];
|
|
108
|
+
}, [ fallbackContent, slug, patterns ] );
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function PatternSelection( { fallbackContent, onChoosePattern, postType } ) {
|
|
112
|
+
const [ , , onChange ] = useEntityBlockEditor( 'postType', postType );
|
|
113
|
+
const blockPatterns = useStartPatterns( fallbackContent );
|
|
114
|
+
const shownBlockPatterns = useAsyncList( blockPatterns );
|
|
115
|
+
return (
|
|
116
|
+
<BlockPatternsList
|
|
117
|
+
blockPatterns={ blockPatterns }
|
|
118
|
+
shownPatterns={ shownBlockPatterns }
|
|
119
|
+
onClickPattern={ ( pattern, blocks ) => {
|
|
120
|
+
onChange( blocks, { selection: undefined } );
|
|
121
|
+
onChoosePattern();
|
|
122
|
+
} }
|
|
123
|
+
/>
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function StartModal( { slug, isCustom, onClose, postType } ) {
|
|
128
|
+
const fallbackContent = useFallbackTemplateContent( slug, isCustom );
|
|
129
|
+
if ( ! fallbackContent ) {
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
return (
|
|
133
|
+
<Modal
|
|
134
|
+
className="editor-start-template-options__modal"
|
|
135
|
+
title={ __( 'Choose a pattern' ) }
|
|
136
|
+
closeLabel={ __( 'Cancel' ) }
|
|
137
|
+
focusOnMount="firstElement"
|
|
138
|
+
onRequestClose={ onClose }
|
|
139
|
+
isFullScreen
|
|
140
|
+
>
|
|
141
|
+
<div className="editor-start-template-options__modal-content">
|
|
142
|
+
<PatternSelection
|
|
143
|
+
fallbackContent={ fallbackContent }
|
|
144
|
+
slug={ slug }
|
|
145
|
+
isCustom={ isCustom }
|
|
146
|
+
postType={ postType }
|
|
147
|
+
onChoosePattern={ () => {
|
|
148
|
+
onClose();
|
|
149
|
+
} }
|
|
150
|
+
/>
|
|
151
|
+
</div>
|
|
152
|
+
<Flex
|
|
153
|
+
className="editor-start-template-options__modal__actions"
|
|
154
|
+
justify="flex-end"
|
|
155
|
+
expanded={ false }
|
|
156
|
+
>
|
|
157
|
+
<FlexItem>
|
|
158
|
+
<Button variant="tertiary" onClick={ onClose }>
|
|
159
|
+
{ __( 'Skip' ) }
|
|
160
|
+
</Button>
|
|
161
|
+
</FlexItem>
|
|
162
|
+
</Flex>
|
|
163
|
+
</Modal>
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export default function StartTemplateOptions() {
|
|
168
|
+
const [ isClosed, setIsClosed ] = useState( false );
|
|
169
|
+
const { shouldOpenModal, slug, isCustom, postType, postId } = useSelect(
|
|
170
|
+
( select ) => {
|
|
171
|
+
const { getCurrentPostType, getCurrentPostId } =
|
|
172
|
+
select( editorStore );
|
|
173
|
+
const _postType = getCurrentPostType();
|
|
174
|
+
const _postId = getCurrentPostId();
|
|
175
|
+
const { getEditedEntityRecord, hasEditsForEntityRecord } =
|
|
176
|
+
select( coreStore );
|
|
177
|
+
const templateRecord = getEditedEntityRecord(
|
|
178
|
+
'postType',
|
|
179
|
+
_postType,
|
|
180
|
+
_postId
|
|
181
|
+
);
|
|
182
|
+
const hasEdits = hasEditsForEntityRecord(
|
|
183
|
+
'postType',
|
|
184
|
+
_postType,
|
|
185
|
+
_postId
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
return {
|
|
189
|
+
shouldOpenModal:
|
|
190
|
+
! hasEdits &&
|
|
191
|
+
'' === templateRecord.content &&
|
|
192
|
+
TEMPLATE_POST_TYPE === _postType,
|
|
193
|
+
slug: templateRecord.slug,
|
|
194
|
+
isCustom: templateRecord.is_custom,
|
|
195
|
+
postType: _postType,
|
|
196
|
+
postId: _postId,
|
|
197
|
+
};
|
|
198
|
+
},
|
|
199
|
+
[]
|
|
200
|
+
);
|
|
201
|
+
|
|
202
|
+
useEffect( () => {
|
|
203
|
+
// Should reset the modal state when navigating to a new page/post.
|
|
204
|
+
setIsClosed( false );
|
|
205
|
+
}, [ postType, postId ] );
|
|
206
|
+
|
|
207
|
+
if ( ! shouldOpenModal || isClosed ) {
|
|
208
|
+
return null;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return (
|
|
212
|
+
<StartModal
|
|
213
|
+
slug={ slug }
|
|
214
|
+
isCustom={ isCustom }
|
|
215
|
+
postType={ postType }
|
|
216
|
+
onClose={ () => setIsClosed( true ) }
|
|
217
|
+
/>
|
|
218
|
+
);
|
|
219
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
$actions-height: 92px;
|
|
2
|
+
|
|
3
|
+
.editor-start-template-options__modal {
|
|
4
|
+
.editor-start-template-options__modal__actions {
|
|
5
|
+
position: absolute;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: $actions-height;
|
|
9
|
+
background-color: $white;
|
|
10
|
+
margin-left: - $grid-unit-40;
|
|
11
|
+
margin-right: - $grid-unit-40;
|
|
12
|
+
padding-left: $grid-unit-40;
|
|
13
|
+
padding-right: $grid-unit-40;
|
|
14
|
+
border-top: 1px solid $gray-300;
|
|
15
|
+
z-index: z-index(".editor-start-template-options__modal__actions");
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.block-editor-block-patterns-list {
|
|
19
|
+
// Since the actions container is positioned absolutely,
|
|
20
|
+
// this padding bottom ensures that the content wrapper will properly
|
|
21
|
+
// detect overflowing content and start showing scrollbars at the right
|
|
22
|
+
// moment. Without this padding, the content would render under the actions
|
|
23
|
+
// bar without causing the wrapper to show a scrollbar.
|
|
24
|
+
padding-bottom: $actions-height;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.editor-start-template-options__modal-content .block-editor-block-patterns-list {
|
|
29
|
+
column-count: 2;
|
|
30
|
+
column-gap: $grid-unit-30;
|
|
31
|
+
|
|
32
|
+
@include break-medium() {
|
|
33
|
+
column-count: 3;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@include break-wide() {
|
|
37
|
+
column-count: 4;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.block-editor-block-patterns-list__list-item {
|
|
41
|
+
break-inside: avoid-column;
|
|
42
|
+
|
|
43
|
+
.block-editor-block-patterns-list__item-title {
|
|
44
|
+
display: none;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.block-editor-block-patterns-list__item {
|
|
49
|
+
// Avoid to override the BlockPatternList component
|
|
50
|
+
// default hover and focus styles.
|
|
51
|
+
&:not(:focus):not(:hover) .block-editor-block-preview__container {
|
|
52
|
+
box-shadow: 0 0 0 1px $gray-300;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { useSelect } from '@wordpress/data';
|
|
5
|
+
import {
|
|
6
|
+
store as blockEditorStore,
|
|
7
|
+
privateApis as blockEditorPrivateApis,
|
|
8
|
+
} from '@wordpress/block-editor';
|
|
9
|
+
import { PanelBody } from '@wordpress/components';
|
|
10
|
+
import { __ } from '@wordpress/i18n';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Internal dependencies
|
|
14
|
+
*/
|
|
15
|
+
import { unlock } from '../../lock-unlock';
|
|
16
|
+
|
|
17
|
+
const { BlockQuickNavigation } = unlock( blockEditorPrivateApis );
|
|
18
|
+
|
|
19
|
+
const PAGE_CONTENT_BLOCKS = [
|
|
20
|
+
'core/post-content',
|
|
21
|
+
'core/post-featured-image',
|
|
22
|
+
'core/post-title',
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
export default function TemplateContentPanel() {
|
|
26
|
+
const clientIds = useSelect( ( select ) => {
|
|
27
|
+
const { getBlocksByName } = select( blockEditorStore );
|
|
28
|
+
return getBlocksByName( PAGE_CONTENT_BLOCKS );
|
|
29
|
+
}, [] );
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<PanelBody title={ __( 'Content' ) }>
|
|
33
|
+
<BlockQuickNavigation clientIds={ clientIds } />
|
|
34
|
+
</PanelBody>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -19,6 +19,7 @@ const {
|
|
|
19
19
|
ResetOverridesControl,
|
|
20
20
|
PATTERN_TYPES,
|
|
21
21
|
PARTIAL_SYNCING_SUPPORTED_BLOCKS,
|
|
22
|
+
PATTERN_SYNC_TYPES,
|
|
22
23
|
} = unlock( patternsPrivateApis );
|
|
23
24
|
|
|
24
25
|
/**
|
|
@@ -51,18 +52,23 @@ const withPatternOverrideControls = createHigherOrderComponent(
|
|
|
51
52
|
// on every block.
|
|
52
53
|
function ControlsWithStoreSubscription( props ) {
|
|
53
54
|
const blockEditingMode = useBlockEditingMode();
|
|
54
|
-
const { hasPatternOverridesSource,
|
|
55
|
+
const { hasPatternOverridesSource, isEditingSyncedPattern } = useSelect(
|
|
55
56
|
( select ) => {
|
|
56
57
|
const { getBlockBindingsSource } = unlock( select( blocksStore ) );
|
|
58
|
+
const { getCurrentPostType, getEditedPostAttribute } =
|
|
59
|
+
select( editorStore );
|
|
57
60
|
|
|
58
61
|
return {
|
|
59
62
|
// For editing link to the site editor if the theme and user permissions support it.
|
|
60
63
|
hasPatternOverridesSource: !! getBlockBindingsSource(
|
|
61
64
|
'core/pattern-overrides'
|
|
62
65
|
),
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
isEditingSyncedPattern:
|
|
67
|
+
getCurrentPostType() === PATTERN_TYPES.user &&
|
|
68
|
+
getEditedPostAttribute( 'meta' )?.wp_pattern_sync_status !==
|
|
69
|
+
PATTERN_SYNC_TYPES.unsynced &&
|
|
70
|
+
getEditedPostAttribute( 'wp_pattern_sync_status' ) !==
|
|
71
|
+
PATTERN_SYNC_TYPES.unsynced,
|
|
66
72
|
};
|
|
67
73
|
},
|
|
68
74
|
[]
|
|
@@ -76,9 +82,9 @@ function ControlsWithStoreSubscription( props ) {
|
|
|
76
82
|
);
|
|
77
83
|
|
|
78
84
|
const shouldShowPatternOverridesControls =
|
|
79
|
-
|
|
85
|
+
isEditingSyncedPattern && blockEditingMode === 'default';
|
|
80
86
|
const shouldShowResetOverridesControl =
|
|
81
|
-
!
|
|
87
|
+
! isEditingSyncedPattern &&
|
|
82
88
|
!! props.attributes.metadata?.name &&
|
|
83
89
|
blockEditingMode !== 'disabled' &&
|
|
84
90
|
hasPatternBindings;
|
package/src/private-apis.js
CHANGED
|
@@ -12,42 +12,56 @@ import { lock } from './lock-unlock';
|
|
|
12
12
|
import { EntitiesSavedStatesExtensible } from './components/entities-saved-states';
|
|
13
13
|
import useAutoSwitchEditorSidebars from './components/provider/use-auto-switch-editor-sidebars';
|
|
14
14
|
import useBlockEditorSettings from './components/provider/use-block-editor-settings';
|
|
15
|
-
import
|
|
15
|
+
import Header from './components/header';
|
|
16
16
|
import InserterSidebar from './components/inserter-sidebar';
|
|
17
17
|
import ListViewSidebar from './components/list-view-sidebar';
|
|
18
|
-
import ModeSwitcher from './components/mode-switcher';
|
|
19
18
|
import PatternOverridesPanel from './components/pattern-overrides-panel';
|
|
20
19
|
import PluginPostExcerpt from './components/post-excerpt/plugin';
|
|
21
20
|
import PostPanelRow from './components/post-panel-row';
|
|
22
|
-
import PostViewLink from './components/post-view-link';
|
|
23
|
-
import PreviewDropdown from './components/preview-dropdown';
|
|
24
21
|
import PreferencesModal from './components/preferences-modal';
|
|
25
22
|
import PostActions from './components/post-actions';
|
|
26
23
|
import { usePostActions } from './components/post-actions/actions';
|
|
27
24
|
import PostCardPanel from './components/post-card-panel';
|
|
28
25
|
import PostStatus from './components/post-status';
|
|
26
|
+
import ToolsMoreMenuGroup from './components/more-menu/tools-more-menu-group';
|
|
27
|
+
import ViewMoreMenuGroup from './components/more-menu/view-more-menu-group';
|
|
28
|
+
import { PrivatePostExcerptPanel } from './components/post-excerpt/panel';
|
|
29
|
+
import SavePublishPanels from './components/save-publish-panels';
|
|
30
|
+
import PostContentInformation from './components/post-content-information';
|
|
31
|
+
import PostLastEditedPanel from './components/post-last-edited-panel';
|
|
32
|
+
import Sidebar from './components/sidebar';
|
|
33
|
+
import {
|
|
34
|
+
mergeBaseAndUserConfigs,
|
|
35
|
+
GlobalStylesProvider,
|
|
36
|
+
} from './components/global-styles-provider';
|
|
29
37
|
|
|
30
38
|
const { store: interfaceStore, ...remainingInterfaceApis } = interfaceApis;
|
|
31
39
|
|
|
32
40
|
export const privateApis = {};
|
|
33
41
|
lock( privateApis, {
|
|
34
|
-
DocumentTools,
|
|
35
42
|
EditorCanvas,
|
|
36
43
|
ExperimentalEditorProvider,
|
|
37
44
|
EntitiesSavedStatesExtensible,
|
|
45
|
+
GlobalStylesProvider,
|
|
46
|
+
Header,
|
|
38
47
|
InserterSidebar,
|
|
39
48
|
ListViewSidebar,
|
|
40
|
-
|
|
49
|
+
mergeBaseAndUserConfigs,
|
|
41
50
|
PatternOverridesPanel,
|
|
42
51
|
PluginPostExcerpt,
|
|
43
52
|
PostActions,
|
|
44
53
|
PostPanelRow,
|
|
45
|
-
PostViewLink,
|
|
46
|
-
PreviewDropdown,
|
|
47
54
|
PreferencesModal,
|
|
48
55
|
usePostActions,
|
|
49
56
|
PostCardPanel,
|
|
50
57
|
PostStatus,
|
|
58
|
+
ToolsMoreMenuGroup,
|
|
59
|
+
ViewMoreMenuGroup,
|
|
60
|
+
PrivatePostExcerptPanel,
|
|
61
|
+
SavePublishPanels,
|
|
62
|
+
PostContentInformation,
|
|
63
|
+
PostLastEditedPanel,
|
|
64
|
+
Sidebar,
|
|
51
65
|
|
|
52
66
|
// This is a temporary private API while we're updating the site editor to use EditorProvider.
|
|
53
67
|
useAutoSwitchEditorSidebars,
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import * as interfaceApis from '@wordpress/interface';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import EditorCanvas from './components/editor-canvas';
|
|
10
|
+
import { ExperimentalEditorProvider } from './components/provider';
|
|
11
|
+
import { lock } from './lock-unlock';
|
|
12
|
+
import { EntitiesSavedStatesExtensible } from './components/entities-saved-states';
|
|
13
|
+
import useAutoSwitchEditorSidebars from './components/provider/use-auto-switch-editor-sidebars';
|
|
14
|
+
import useBlockEditorSettings from './components/provider/use-block-editor-settings';
|
|
15
|
+
import InserterSidebar from './components/inserter-sidebar';
|
|
16
|
+
import ListViewSidebar from './components/list-view-sidebar';
|
|
17
|
+
import PatternOverridesPanel from './components/pattern-overrides-panel';
|
|
18
|
+
import PluginPostExcerpt from './components/post-excerpt/plugin';
|
|
19
|
+
import PostPanelRow from './components/post-panel-row';
|
|
20
|
+
import PreferencesModal from './components/preferences-modal';
|
|
21
|
+
import PostActions from './components/post-actions';
|
|
22
|
+
import { usePostActions } from './components/post-actions/actions';
|
|
23
|
+
import PostCardPanel from './components/post-card-panel';
|
|
24
|
+
import PostStatus from './components/post-status';
|
|
25
|
+
import ToolsMoreMenuGroup from './components/more-menu/tools-more-menu-group';
|
|
26
|
+
import ViewMoreMenuGroup from './components/more-menu/view-more-menu-group';
|
|
27
|
+
import { PrivatePostExcerptPanel } from './components/post-excerpt/panel';
|
|
28
|
+
import SavePublishPanels from './components/save-publish-panels';
|
|
29
|
+
import PostContentInformation from './components/post-content-information';
|
|
30
|
+
import PostLastEditedPanel from './components/post-last-edited-panel';
|
|
31
|
+
|
|
32
|
+
const { store: interfaceStore, ...remainingInterfaceApis } = interfaceApis;
|
|
33
|
+
|
|
34
|
+
export const privateApis = {};
|
|
35
|
+
lock( privateApis, {
|
|
36
|
+
EditorCanvas,
|
|
37
|
+
ExperimentalEditorProvider,
|
|
38
|
+
EntitiesSavedStatesExtensible,
|
|
39
|
+
InserterSidebar,
|
|
40
|
+
ListViewSidebar,
|
|
41
|
+
PatternOverridesPanel,
|
|
42
|
+
PluginPostExcerpt,
|
|
43
|
+
PostActions,
|
|
44
|
+
PostPanelRow,
|
|
45
|
+
PreferencesModal,
|
|
46
|
+
usePostActions,
|
|
47
|
+
PostCardPanel,
|
|
48
|
+
PostStatus,
|
|
49
|
+
ToolsMoreMenuGroup,
|
|
50
|
+
ViewMoreMenuGroup,
|
|
51
|
+
PrivatePostExcerptPanel,
|
|
52
|
+
SavePublishPanels,
|
|
53
|
+
PostContentInformation,
|
|
54
|
+
PostLastEditedPanel,
|
|
55
|
+
|
|
56
|
+
// This is a temporary private API while we're updating the site editor to use EditorProvider.
|
|
57
|
+
useAutoSwitchEditorSidebars,
|
|
58
|
+
useBlockEditorSettings,
|
|
59
|
+
interfaceStore,
|
|
60
|
+
...remainingInterfaceApis,
|
|
61
|
+
} );
|
|
@@ -75,6 +75,9 @@ export const getInsertionPoint = createRegistrySelector( ( select ) =>
|
|
|
75
75
|
export function getListViewToggleRef( state ) {
|
|
76
76
|
return state.listViewToggleRef;
|
|
77
77
|
}
|
|
78
|
+
export function getInserterSidebarToggleRef( state ) {
|
|
79
|
+
return state.inserterSidebarToggleRef;
|
|
80
|
+
}
|
|
78
81
|
const CARD_ICONS = {
|
|
79
82
|
wp_block: symbol,
|
|
80
83
|
wp_navigation: navigation,
|
package/src/store/reducer.js
CHANGED
|
@@ -360,6 +360,17 @@ export function listViewToggleRef( state = { current: null } ) {
|
|
|
360
360
|
return state;
|
|
361
361
|
}
|
|
362
362
|
|
|
363
|
+
/**
|
|
364
|
+
* This reducer does nothing aside initializing a ref to the inserter sidebar toggle.
|
|
365
|
+
* We will have a unique ref per "editor" instance.
|
|
366
|
+
*
|
|
367
|
+
* @param {Object} state
|
|
368
|
+
* @return {Object} Reference to the inserter sidebar toggle button.
|
|
369
|
+
*/
|
|
370
|
+
export function inserterSidebarToggleRef( state = { current: null } ) {
|
|
371
|
+
return state;
|
|
372
|
+
}
|
|
373
|
+
|
|
363
374
|
export function publishSidebarActive( state = false, action ) {
|
|
364
375
|
switch ( action.type ) {
|
|
365
376
|
case 'OPEN_PUBLISH_SIDEBAR':
|
|
@@ -387,6 +398,7 @@ export default combineReducers( {
|
|
|
387
398
|
deviceType,
|
|
388
399
|
removedPanels,
|
|
389
400
|
blockInserterPanel,
|
|
401
|
+
inserterSidebarToggleRef,
|
|
390
402
|
listViewPanel,
|
|
391
403
|
listViewToggleRef,
|
|
392
404
|
publishSidebarActive,
|
package/src/store/selectors.js
CHANGED
|
@@ -838,7 +838,9 @@ export const getSuggestedPostFormat = createRegistrySelector(
|
|
|
838
838
|
( select ) => () => {
|
|
839
839
|
const blocks = select( blockEditorStore ).getBlocks();
|
|
840
840
|
|
|
841
|
-
if ( blocks.length > 2 )
|
|
841
|
+
if ( blocks.length > 2 ) {
|
|
842
|
+
return null;
|
|
843
|
+
}
|
|
842
844
|
|
|
843
845
|
let name;
|
|
844
846
|
// If there is only one block in the content of the post grab its name
|
package/src/style.scss
CHANGED
|
@@ -2,27 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
@import "./components/autocompleters/style.scss";
|
|
4
4
|
@import "./components/block-manager/style.scss";
|
|
5
|
+
@import "./components/collapsible-block-toolbar/style.scss";
|
|
6
|
+
@import "./components/block-settings-menu/style.scss";
|
|
5
7
|
@import "./components/document-bar/style.scss";
|
|
6
8
|
@import "./components/document-outline/style.scss";
|
|
7
9
|
@import "./components/document-tools/style.scss";
|
|
8
10
|
@import "./components/editor-notices/style.scss";
|
|
9
11
|
@import "./components/entities-saved-states/style.scss";
|
|
10
12
|
@import "./components/error-boundary/style.scss";
|
|
13
|
+
@import "./components/header/style.scss";
|
|
11
14
|
@import "./components/inserter-sidebar/style.scss";
|
|
12
15
|
@import "./components/keyboard-shortcut-help-modal/style.scss";
|
|
13
16
|
@import "./components/list-view-sidebar/style.scss";
|
|
14
17
|
@import "./components/post-author/style.scss";
|
|
15
18
|
@import "./components/post-actions/style.scss";
|
|
16
19
|
@import "./components/post-card-panel/style.scss";
|
|
20
|
+
@import "./components/post-content-information/style.scss";
|
|
21
|
+
@import "./components/post-discussion/style.scss";
|
|
17
22
|
@import "./components/post-excerpt/style.scss";
|
|
18
23
|
@import "./components/post-featured-image/style.scss";
|
|
19
24
|
@import "./components/post-format/style.scss";
|
|
25
|
+
@import "./components/post-last-edited-panel/style.scss";
|
|
20
26
|
@import "./components/post-last-revision/style.scss";
|
|
21
27
|
@import "./components/post-locked-modal/style.scss";
|
|
22
28
|
@import "./components/post-panel-row/style.scss";
|
|
29
|
+
@import "./components/post-panel-section/style.scss";
|
|
23
30
|
@import "./components/post-publish-panel/style.scss";
|
|
24
31
|
@import "./components/post-saved-state/style.scss";
|
|
25
32
|
@import "./components/post-schedule/style.scss";
|
|
33
|
+
@import "./components/post-slug/style.scss";
|
|
26
34
|
@import "./components/post-status/style.scss";
|
|
27
35
|
@import "./components/post-sync-status/style.scss";
|
|
28
36
|
@import "./components/post-taxonomies/style.scss";
|
|
@@ -33,6 +41,9 @@
|
|
|
33
41
|
@import "./components/post-visibility/style.scss";
|
|
34
42
|
@import "./components/post-trash/style.scss";
|
|
35
43
|
@import "./components/preview-dropdown/style.scss";
|
|
44
|
+
@import "./components/save-publish-panels/style.scss";
|
|
36
45
|
@import "./components/start-page-options/style.scss";
|
|
46
|
+
@import "./components/start-template-options/style.scss";
|
|
47
|
+
@import "./components/sidebar/style.scss";
|
|
37
48
|
@import "./components/table-of-contents/style.scss";
|
|
38
49
|
@import "./components/template-areas/style.scss";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { render, screen } from '@testing-library/react';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Internal dependencies
|
|
8
|
-
*/
|
|
9
|
-
import PostSlugCheck from '../check';
|
|
10
|
-
|
|
11
|
-
describe( 'PostSlugCheck', () => {
|
|
12
|
-
it( 'should render control', () => {
|
|
13
|
-
render( <PostSlugCheck>slug</PostSlugCheck> );
|
|
14
|
-
|
|
15
|
-
expect( screen.getByText( 'slug' ) ).toBeVisible();
|
|
16
|
-
} );
|
|
17
|
-
} );
|