@wordpress/edit-site 5.9.0 → 5.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/components/add-new-template/add-custom-template-modal.js +21 -6
- package/build/components/add-new-template/add-custom-template-modal.js.map +1 -1
- package/build/components/add-new-template/new-template-part.js +8 -2
- package/build/components/add-new-template/new-template-part.js.map +1 -1
- package/build/components/add-new-template/new-template.js +6 -3
- package/build/components/add-new-template/new-template.js.map +1 -1
- package/build/components/app/index.js +8 -2
- package/build/components/app/index.js.map +1 -1
- package/build/components/block-editor/back-button.js +10 -3
- package/build/components/block-editor/back-button.js.map +1 -1
- package/build/components/block-editor/editor-canvas.js +39 -6
- package/build/components/block-editor/editor-canvas.js.map +1 -1
- package/build/components/editor/index.js +43 -9
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor-canvas-container/index.js +18 -4
- package/build/components/editor-canvas-container/index.js.map +1 -1
- package/build/components/global-styles/block-preview-panel.js +1 -1
- package/build/components/global-styles/block-preview-panel.js.map +1 -1
- package/build/components/global-styles/border-panel.js +3 -1
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-palette-panel.js +14 -3
- package/build/components/global-styles/color-palette-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +17 -18
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/gradients-palette-panel.js +14 -3
- package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build/components/global-styles/root-menu.js +61 -0
- package/build/components/global-styles/root-menu.js.map +1 -0
- package/build/components/global-styles/screen-block-list.js +3 -1
- package/build/components/global-styles/screen-block-list.js.map +1 -1
- package/build/components/global-styles/screen-block.js +158 -7
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-colors.js +9 -26
- package/build/components/global-styles/screen-colors.js.map +1 -1
- package/build/components/global-styles/screen-css.js +20 -15
- package/build/components/global-styles/screen-css.js.map +1 -1
- package/build/components/global-styles/screen-layout.js +4 -17
- package/build/components/global-styles/screen-layout.js.map +1 -1
- package/build/components/global-styles/screen-revisions/index.js +148 -0
- package/build/components/global-styles/screen-revisions/index.js.map +1 -0
- package/build/components/global-styles/screen-revisions/revisions-buttons.js +132 -0
- package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -0
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +130 -0
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -0
- package/build/components/global-styles/screen-root.js +2 -2
- package/build/components/global-styles/screen-root.js.map +1 -1
- package/build/components/global-styles/screen-typography-element.js +0 -3
- package/build/components/global-styles/screen-typography-element.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +11 -39
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/style-variations-container.js +3 -8
- package/build/components/global-styles/style-variations-container.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +7 -11
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/ui.js +61 -108
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles/variations-panel.js +4 -28
- package/build/components/global-styles/variations-panel.js.map +1 -1
- package/build/components/header-edit-mode/index.js +1 -1
- package/build/components/header-edit-mode/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/register.js +1 -1
- package/build/components/keyboard-shortcuts/register.js.map +1 -1
- package/build/components/layout/index.js +13 -7
- package/build/components/layout/index.js.map +1 -1
- package/build/components/list/index.js +9 -3
- package/build/components/list/index.js.map +1 -1
- package/build/components/list/table.js +1 -1
- package/build/components/list/table.js.map +1 -1
- package/build/components/plugin-template-setting-panel/index.js +44 -0
- package/build/components/plugin-template-setting-panel/index.js.map +1 -0
- package/build/components/revisions/index.js +95 -0
- package/build/components/revisions/index.js.map +1 -0
- package/build/components/routes/link.js +17 -2
- package/build/components/routes/link.js.map +1 -1
- package/build/components/routes/use-title.js +8 -2
- package/build/components/routes/use-title.js.map +1 -1
- package/build/components/save-button/index.js +31 -6
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/save-hub/index.js +14 -31
- package/build/components/save-hub/index.js.map +1 -1
- package/build/components/save-panel/index.js +20 -7
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +2 -7
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/index.js +16 -2
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js +9 -3
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build/components/sidebar-edit-mode/index.js +9 -2
- package/build/components/sidebar-edit-mode/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js +40 -0
- package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -0
- package/build/components/sidebar-edit-mode/template-card/index.js +1 -8
- package/build/components/sidebar-edit-mode/template-card/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/{template-card/last-revision.js → template-revisions/index.js} +1 -1
- package/build/components/sidebar-edit-mode/template-revisions/index.js.map +1 -0
- package/build/components/sidebar-navigation-item/index.js +5 -7
- package/build/components/sidebar-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +14 -4
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/index.js +24 -7
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-item/index.js +1 -1
- package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js +17 -5
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +3 -3
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/index.js +67 -0
- package/build/components/sidebar-navigation-screen-page/index.js.map +1 -0
- package/build/components/sidebar-navigation-screen-pages/index.js +74 -0
- package/build/components/sidebar-navigation-screen-pages/index.js.map +1 -0
- package/build/components/sidebar-navigation-screen-templates/index.js +5 -3
- package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build/components/sidebar-navigation-subtitle/index.js +18 -0
- package/build/components/sidebar-navigation-subtitle/index.js.map +1 -0
- package/build/components/site-hub/index.js +36 -6
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/start-template-options/index.js +12 -16
- package/build/components/start-template-options/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +8 -2
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +9 -4
- package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
- package/build/components/sync-state-with-url/use-sync-path-with-url.js +17 -3
- package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
- package/build/components/template-details/template-areas.js +9 -3
- package/build/components/template-details/template-areas.js.map +1 -1
- package/build/hooks/template-part-edit.js +8 -2
- package/build/hooks/template-part-edit.js.map +1 -1
- package/build/index.js +8 -0
- package/build/index.js.map +1 -1
- package/build/utils/is-previewing-theme.js +27 -0
- package/build/utils/is-previewing-theme.js.map +1 -0
- package/build/utils/use-activate-theme.js +46 -0
- package/build/utils/use-activate-theme.js.map +1 -0
- package/build-module/components/add-new-template/add-custom-template-modal.js +21 -6
- package/build-module/components/add-new-template/add-custom-template-modal.js.map +1 -1
- package/build-module/components/add-new-template/new-template-part.js +5 -1
- package/build-module/components/add-new-template/new-template-part.js.map +1 -1
- package/build-module/components/add-new-template/new-template.js +4 -1
- package/build-module/components/add-new-template/new-template.js.map +1 -1
- package/build-module/components/app/index.js +6 -2
- package/build-module/components/app/index.js.map +1 -1
- package/build-module/components/block-editor/back-button.js +6 -1
- package/build-module/components/block-editor/back-button.js.map +1 -1
- package/build-module/components/block-editor/editor-canvas.js +37 -6
- package/build-module/components/block-editor/editor-canvas.js.map +1 -1
- package/build-module/components/editor/index.js +45 -11
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor-canvas-container/index.js +21 -6
- package/build-module/components/editor-canvas-container/index.js.map +1 -1
- package/build-module/components/global-styles/block-preview-panel.js +1 -1
- package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +3 -1
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-palette-panel.js +13 -3
- package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +17 -18
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/gradients-palette-panel.js +13 -3
- package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/root-menu.js +47 -0
- package/build-module/components/global-styles/root-menu.js.map +1 -0
- package/build-module/components/global-styles/screen-block-list.js +4 -2
- package/build-module/components/global-styles/screen-block-list.js.map +1 -1
- package/build-module/components/global-styles/screen-block.js +151 -7
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-colors.js +9 -25
- package/build-module/components/global-styles/screen-colors.js.map +1 -1
- package/build-module/components/global-styles/screen-css.js +20 -15
- package/build-module/components/global-styles/screen-css.js.map +1 -1
- package/build-module/components/global-styles/screen-layout.js +4 -16
- package/build-module/components/global-styles/screen-layout.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/index.js +128 -0
- package/build-module/components/global-styles/screen-revisions/index.js.map +1 -0
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +121 -0
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -0
- package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +116 -0
- package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -0
- package/build-module/components/global-styles/screen-root.js +2 -2
- package/build-module/components/global-styles/screen-root.js.map +1 -1
- package/build-module/components/global-styles/screen-typography-element.js +0 -3
- package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js +11 -37
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/style-variations-container.js +3 -7
- package/build-module/components/global-styles/style-variations-container.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +7 -11
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/ui.js +61 -105
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles/variations-panel.js +3 -22
- package/build-module/components/global-styles/variations-panel.js.map +1 -1
- package/build-module/components/header-edit-mode/index.js +2 -2
- package/build-module/components/header-edit-mode/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/register.js +1 -1
- package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
- package/build-module/components/layout/index.js +9 -3
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/list/index.js +5 -1
- package/build-module/components/list/index.js.map +1 -1
- package/build-module/components/list/table.js +1 -1
- package/build-module/components/list/table.js.map +1 -1
- package/build-module/components/plugin-template-setting-panel/index.js +35 -0
- package/build-module/components/plugin-template-setting-panel/index.js.map +1 -0
- package/build-module/components/revisions/index.js +77 -0
- package/build-module/components/revisions/index.js.map +1 -0
- package/build-module/components/routes/link.js +13 -1
- package/build-module/components/routes/link.js.map +1 -1
- package/build-module/components/routes/use-title.js +5 -1
- package/build-module/components/routes/use-title.js.map +1 -1
- package/build-module/components/save-button/index.js +28 -6
- package/build-module/components/save-button/index.js.map +1 -1
- package/build-module/components/save-hub/index.js +13 -32
- package/build-module/components/save-hub/index.js.map +1 -1
- package/build-module/components/save-panel/index.js +19 -7
- package/build-module/components/save-panel/index.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +3 -8
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/components/sidebar/index.js +11 -1
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +9 -3
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/index.js +10 -5
- package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js +29 -0
- package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/template-card/index.js +2 -7
- package/build-module/components/sidebar-edit-mode/template-card/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/{template-card/last-revision.js → template-revisions/index.js} +1 -1
- package/build-module/components/sidebar-edit-mode/template-revisions/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-item/index.js +6 -8
- package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +13 -5
- package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +25 -8
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +13 -3
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +3 -3
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/index.js +48 -0
- package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-pages/index.js +57 -0
- package/build-module/components/sidebar-navigation-screen-pages/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-templates/index.js +5 -3
- package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-subtitle/index.js +10 -0
- package/build-module/components/sidebar-navigation-subtitle/index.js.map +1 -0
- package/build-module/components/site-hub/index.js +34 -6
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/start-template-options/index.js +13 -17
- package/build-module/components/start-template-options/index.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +5 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +5 -1
- package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +13 -1
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
- package/build-module/components/template-details/template-areas.js +5 -1
- package/build-module/components/template-details/template-areas.js.map +1 -1
- package/build-module/hooks/template-part-edit.js +5 -1
- package/build-module/hooks/template-part-edit.js.map +1 -1
- package/build-module/index.js +1 -0
- package/build-module/index.js.map +1 -1
- package/build-module/utils/is-previewing-theme.js +17 -0
- package/build-module/utils/is-previewing-theme.js.map +1 -0
- package/build-module/utils/use-activate-theme.js +36 -0
- package/build-module/utils/use-activate-theme.js.map +1 -0
- package/build-style/style-rtl.css +199 -78
- package/build-style/style.css +199 -78
- package/package.json +36 -34
- package/src/components/add-new-template/add-custom-template-modal.js +31 -8
- package/src/components/add-new-template/new-template-part.js +4 -1
- package/src/components/add-new-template/new-template.js +3 -1
- package/src/components/add-new-template/style.scss +52 -48
- package/src/components/app/index.js +6 -3
- package/src/components/block-editor/back-button.js +4 -1
- package/src/components/block-editor/editor-canvas.js +36 -8
- package/src/components/block-editor/style.scss +15 -8
- package/src/components/editor/index.js +48 -7
- package/src/components/editor-canvas-container/index.js +30 -17
- package/src/components/global-styles/block-preview-panel.js +1 -1
- package/src/components/global-styles/border-panel.js +3 -1
- package/src/components/global-styles/color-palette-panel.js +9 -0
- package/src/components/global-styles/dimensions-panel.js +15 -15
- package/src/components/global-styles/gradients-palette-panel.js +8 -0
- package/src/components/global-styles/root-menu.js +66 -0
- package/src/components/global-styles/screen-block-list.js +2 -2
- package/src/components/global-styles/screen-block.js +184 -7
- package/src/components/global-styles/screen-colors.js +9 -16
- package/src/components/global-styles/screen-css.js +21 -21
- package/src/components/global-styles/screen-layout.js +5 -9
- package/src/components/global-styles/screen-revisions/index.js +177 -0
- package/src/components/global-styles/screen-revisions/revisions-buttons.js +131 -0
- package/src/components/global-styles/screen-revisions/style.scss +99 -0
- package/src/components/global-styles/screen-revisions/test/use-global-styles-revisions.js +125 -0
- package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +103 -0
- package/src/components/global-styles/screen-root.js +2 -2
- package/src/components/global-styles/screen-typography-element.js +1 -3
- package/src/components/global-styles/screen-typography.js +44 -79
- package/src/components/global-styles/style-variations-container.js +4 -10
- package/src/components/global-styles/style.scss +1 -23
- package/src/components/global-styles/typography-panel.js +12 -13
- package/src/components/global-styles/ui.js +72 -101
- package/src/components/global-styles/variations-panel.js +3 -26
- package/src/components/header-edit-mode/index.js +5 -2
- package/src/components/keyboard-shortcuts/register.js +1 -1
- package/src/components/layout/index.js +7 -3
- package/src/components/layout/style.scss +2 -4
- package/src/components/list/index.js +4 -1
- package/src/components/list/style.scss +4 -0
- package/src/components/list/table.js +3 -1
- package/src/components/plugin-template-setting-panel/index.js +33 -0
- package/src/components/revisions/index.js +104 -0
- package/src/components/routes/link.js +16 -1
- package/src/components/routes/use-title.js +4 -1
- package/src/components/save-button/index.js +27 -6
- package/src/components/save-hub/index.js +17 -35
- package/src/components/save-panel/index.js +15 -3
- package/src/components/secondary-sidebar/list-view-sidebar.js +2 -6
- package/src/components/sidebar/index.js +12 -1
- package/src/components/sidebar-edit-mode/global-styles-sidebar.js +9 -7
- package/src/components/sidebar-edit-mode/index.js +17 -6
- package/src/components/sidebar-edit-mode/sidebar-fixed-bottom.js +26 -0
- package/src/components/sidebar-edit-mode/style.scss +10 -0
- package/src/components/sidebar-edit-mode/template-card/index.js +1 -9
- package/src/components/sidebar-navigation-item/index.js +13 -14
- package/src/components/sidebar-navigation-item/style.scss +8 -1
- package/src/components/sidebar-navigation-screen/index.js +26 -5
- package/src/components/sidebar-navigation-screen-main/index.js +43 -22
- package/src/components/sidebar-navigation-screen-navigation-item/index.js +3 -9
- package/src/components/sidebar-navigation-screen-navigation-menus/index.js +13 -1
- package/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +3 -3
- package/src/components/sidebar-navigation-screen-page/index.js +59 -0
- package/src/components/sidebar-navigation-screen-pages/index.js +82 -0
- package/src/components/sidebar-navigation-screen-pages/style.scss +4 -0
- package/src/components/sidebar-navigation-screen-templates/index.js +5 -1
- package/src/components/sidebar-navigation-subtitle/index.js +5 -0
- package/src/components/sidebar-navigation-subtitle/style.scss +7 -0
- package/src/components/site-hub/index.js +89 -58
- package/src/components/site-hub/style.scss +8 -0
- package/src/components/start-template-options/index.js +19 -27
- package/src/components/start-template-options/style.scss +29 -21
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +4 -1
- package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +3 -1
- package/src/components/sync-state-with-url/use-sync-path-with-url.js +14 -1
- package/src/components/template-details/template-areas.js +4 -1
- package/src/hooks/template-part-edit.js +4 -1
- package/src/index.js +1 -0
- package/src/store/test/actions.js +6 -14
- package/src/style.scss +4 -1
- package/src/utils/is-previewing-theme.js +18 -0
- package/src/utils/use-activate-theme.js +38 -0
- package/build/components/global-styles/context-menu.js +0 -126
- package/build/components/global-styles/context-menu.js.map +0 -1
- package/build/components/global-styles/custom-css.js +0 -113
- package/build/components/global-styles/custom-css.js.map +0 -1
- package/build/components/global-styles/effects-panel.js +0 -53
- package/build/components/global-styles/effects-panel.js.map +0 -1
- package/build/components/global-styles/filters-panel.js +0 -50
- package/build/components/global-styles/filters-panel.js.map +0 -1
- package/build/components/global-styles/screen-border.js +0 -61
- package/build/components/global-styles/screen-border.js.map +0 -1
- package/build/components/global-styles/screen-effects.js +0 -61
- package/build/components/global-styles/screen-effects.js.map +0 -1
- package/build/components/global-styles/screen-filters.js +0 -46
- package/build/components/global-styles/screen-filters.js.map +0 -1
- package/build/components/global-styles/screen-variations.js +0 -71
- package/build/components/global-styles/screen-variations.js.map +0 -1
- package/build/components/routes/index.js +0 -60
- package/build/components/routes/index.js.map +0 -1
- package/build/components/sidebar-edit-mode/template-card/last-revision.js.map +0 -1
- package/build/hooks/commands/index.js +0 -19
- package/build/hooks/commands/index.js.map +0 -1
- package/build/hooks/commands/use-navigation-commands.js +0 -126
- package/build/hooks/commands/use-navigation-commands.js.map +0 -1
- package/build/hooks/commands/use-wp-admin-commands.js +0 -97
- package/build/hooks/commands/use-wp-admin-commands.js.map +0 -1
- package/build/utils/history.js +0 -41
- package/build/utils/history.js.map +0 -1
- package/build-module/components/global-styles/context-menu.js +0 -107
- package/build-module/components/global-styles/context-menu.js.map +0 -1
- package/build-module/components/global-styles/custom-css.js +0 -98
- package/build-module/components/global-styles/custom-css.js.map +0 -1
- package/build-module/components/global-styles/effects-panel.js +0 -43
- package/build-module/components/global-styles/effects-panel.js.map +0 -1
- package/build-module/components/global-styles/filters-panel.js +0 -40
- package/build-module/components/global-styles/filters-panel.js.map +0 -1
- package/build-module/components/global-styles/screen-border.js +0 -44
- package/build-module/components/global-styles/screen-border.js.map +0 -1
- package/build-module/components/global-styles/screen-effects.js +0 -44
- package/build-module/components/global-styles/screen-effects.js.map +0 -1
- package/build-module/components/global-styles/screen-filters.js +0 -33
- package/build-module/components/global-styles/screen-filters.js.map +0 -1
- package/build-module/components/global-styles/screen-variations.js +0 -54
- package/build-module/components/global-styles/screen-variations.js.map +0 -1
- package/build-module/components/routes/index.js +0 -47
- package/build-module/components/routes/index.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/template-card/last-revision.js.map +0 -1
- package/build-module/hooks/commands/index.js +0 -10
- package/build-module/hooks/commands/index.js.map +0 -1
- package/build-module/hooks/commands/use-navigation-commands.js +0 -109
- package/build-module/hooks/commands/use-navigation-commands.js.map +0 -1
- package/build-module/hooks/commands/use-wp-admin-commands.js +0 -81
- package/build-module/hooks/commands/use-wp-admin-commands.js.map +0 -1
- package/build-module/utils/history.js +0 -31
- package/build-module/utils/history.js.map +0 -1
- package/src/components/global-styles/context-menu.js +0 -175
- package/src/components/global-styles/custom-css.js +0 -131
- package/src/components/global-styles/effects-panel.js +0 -40
- package/src/components/global-styles/filters-panel.js +0 -39
- package/src/components/global-styles/screen-border.js +0 -35
- package/src/components/global-styles/screen-effects.js +0 -35
- package/src/components/global-styles/screen-filters.js +0 -27
- package/src/components/global-styles/screen-variations.js +0 -46
- package/src/components/routes/index.js +0 -53
- package/src/hooks/commands/index.js +0 -10
- package/src/hooks/commands/use-navigation-commands.js +0 -112
- package/src/hooks/commands/use-wp-admin-commands.js +0 -79
- package/src/utils/history.js +0 -39
- /package/src/components/sidebar-edit-mode/{template-card/last-revision.js → template-revisions/index.js} +0 -0
|
@@ -2,11 +2,18 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { addQueryArgs, getQueryArgs, removeQueryArgs } from '@wordpress/url';
|
|
5
|
+
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Internal dependencies
|
|
8
9
|
*/
|
|
9
|
-
import {
|
|
10
|
+
import { unlock } from '../../private-apis';
|
|
11
|
+
import {
|
|
12
|
+
isPreviewingTheme,
|
|
13
|
+
currentlyPreviewingTheme,
|
|
14
|
+
} from '../../utils/is-previewing-theme';
|
|
15
|
+
|
|
16
|
+
const { useHistory } = unlock( routerPrivateApis );
|
|
10
17
|
|
|
11
18
|
export function useLink( params = {}, state, shouldReplace = false ) {
|
|
12
19
|
const history = useHistory();
|
|
@@ -26,6 +33,14 @@ export function useLink( params = {}, state, shouldReplace = false ) {
|
|
|
26
33
|
window.location.href,
|
|
27
34
|
...Object.keys( currentArgs )
|
|
28
35
|
);
|
|
36
|
+
|
|
37
|
+
if ( isPreviewingTheme() ) {
|
|
38
|
+
params = {
|
|
39
|
+
...params,
|
|
40
|
+
theme_preview: currentlyPreviewingTheme(),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
29
44
|
const newUrl = addQueryArgs( currentUrlWithoutArgs, params );
|
|
30
45
|
|
|
31
46
|
return {
|
|
@@ -7,11 +7,14 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
7
7
|
import { __, sprintf } from '@wordpress/i18n';
|
|
8
8
|
import { speak } from '@wordpress/a11y';
|
|
9
9
|
import { decodeEntities } from '@wordpress/html-entities';
|
|
10
|
+
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Internal dependencies
|
|
13
14
|
*/
|
|
14
|
-
import {
|
|
15
|
+
import { unlock } from '../../private-apis';
|
|
16
|
+
|
|
17
|
+
const { useLocation } = unlock( routerPrivateApis );
|
|
15
18
|
|
|
16
19
|
export default function useTitle( title ) {
|
|
17
20
|
const location = useLocation();
|
|
@@ -11,8 +11,14 @@ import { displayShortcut } from '@wordpress/keycodes';
|
|
|
11
11
|
* Internal dependencies
|
|
12
12
|
*/
|
|
13
13
|
import { store as editSiteStore } from '../../store';
|
|
14
|
+
import { isPreviewingTheme } from '../../utils/is-previewing-theme';
|
|
14
15
|
|
|
15
|
-
export default function SaveButton(
|
|
16
|
+
export default function SaveButton( {
|
|
17
|
+
className = 'edit-site-save-button__button',
|
|
18
|
+
variant = 'primary',
|
|
19
|
+
showTooltip = true,
|
|
20
|
+
icon,
|
|
21
|
+
} ) {
|
|
16
22
|
const { isDirty, isSaving, isSaveViewOpen } = useSelect( ( select ) => {
|
|
17
23
|
const { __experimentalGetDirtyEntityRecords, isSavingEntityRecord } =
|
|
18
24
|
select( coreStore );
|
|
@@ -28,14 +34,28 @@ export default function SaveButton() {
|
|
|
28
34
|
}, [] );
|
|
29
35
|
const { setIsSaveViewOpened } = useDispatch( editSiteStore );
|
|
30
36
|
|
|
31
|
-
const
|
|
37
|
+
const activateSaveEnabled = isPreviewingTheme() || isDirty;
|
|
38
|
+
const disabled = isSaving || ! activateSaveEnabled;
|
|
32
39
|
|
|
33
|
-
const
|
|
40
|
+
const getLabel = () => {
|
|
41
|
+
if ( disabled ) {
|
|
42
|
+
return __( 'Saved' );
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if ( isPreviewingTheme() && isDirty ) {
|
|
46
|
+
return __( 'Activate & Save' );
|
|
47
|
+
} else if ( isPreviewingTheme() ) {
|
|
48
|
+
return __( 'Activate' );
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return __( 'Save' );
|
|
52
|
+
};
|
|
53
|
+
const label = getLabel();
|
|
34
54
|
|
|
35
55
|
return (
|
|
36
56
|
<Button
|
|
37
|
-
variant=
|
|
38
|
-
className=
|
|
57
|
+
variant={ variant }
|
|
58
|
+
className={ className }
|
|
39
59
|
aria-disabled={ disabled }
|
|
40
60
|
aria-expanded={ isSaveViewOpen }
|
|
41
61
|
isBusy={ isSaving }
|
|
@@ -52,7 +72,8 @@ export default function SaveButton() {
|
|
|
52
72
|
* of the button that we want to avoid. By setting `showTooltip`,
|
|
53
73
|
& the tooltip is always rendered even when there's no keyboard shortcut.
|
|
54
74
|
*/
|
|
55
|
-
showTooltip
|
|
75
|
+
showTooltip={ showTooltip }
|
|
76
|
+
icon={ icon }
|
|
56
77
|
>
|
|
57
78
|
{ label }
|
|
58
79
|
</Button>
|
|
@@ -1,41 +1,38 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { useSelect
|
|
5
|
-
import {
|
|
6
|
-
import { sprintf,
|
|
4
|
+
import { useSelect } from '@wordpress/data';
|
|
5
|
+
import { __experimentalHStack as HStack } from '@wordpress/components';
|
|
6
|
+
import { sprintf, _n } from '@wordpress/i18n';
|
|
7
7
|
import { store as coreStore } from '@wordpress/core-data';
|
|
8
|
-
import { displayShortcut } from '@wordpress/keycodes';
|
|
9
8
|
import { check } from '@wordpress/icons';
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Internal dependencies
|
|
13
12
|
*/
|
|
14
|
-
import
|
|
13
|
+
import SaveButton from '../save-button';
|
|
14
|
+
import { isPreviewingTheme } from '../../utils/is-previewing-theme';
|
|
15
15
|
|
|
16
|
-
export default function
|
|
17
|
-
const { countUnsavedChanges, isDirty, isSaving
|
|
18
|
-
|
|
16
|
+
export default function SaveHub() {
|
|
17
|
+
const { countUnsavedChanges, isDirty, isSaving } = useSelect(
|
|
18
|
+
( select ) => {
|
|
19
19
|
const {
|
|
20
20
|
__experimentalGetDirtyEntityRecords,
|
|
21
21
|
isSavingEntityRecord,
|
|
22
22
|
} = select( coreStore );
|
|
23
23
|
const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
|
|
24
|
-
const { isSaveViewOpened } = select( editSiteStore );
|
|
25
24
|
return {
|
|
26
25
|
isDirty: dirtyEntityRecords.length > 0,
|
|
27
26
|
isSaving: dirtyEntityRecords.some( ( record ) =>
|
|
28
27
|
isSavingEntityRecord( record.kind, record.name, record.key )
|
|
29
28
|
),
|
|
30
|
-
isSaveViewOpen: isSaveViewOpened(),
|
|
31
29
|
countUnsavedChanges: dirtyEntityRecords.length,
|
|
32
30
|
};
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const disabled = ! isDirty || isSaving;
|
|
31
|
+
},
|
|
32
|
+
[]
|
|
33
|
+
);
|
|
37
34
|
|
|
38
|
-
const
|
|
35
|
+
const disabled = isSaving || ( ! isDirty && ! isPreviewingTheme() );
|
|
39
36
|
|
|
40
37
|
return (
|
|
41
38
|
<HStack className="edit-site-save-hub" alignment="right" spacing={ 4 }>
|
|
@@ -52,27 +49,12 @@ export default function SaveButton() {
|
|
|
52
49
|
) }
|
|
53
50
|
</span>
|
|
54
51
|
) }
|
|
55
|
-
<
|
|
52
|
+
<SaveButton
|
|
56
53
|
className="edit-site-save-hub__button"
|
|
57
|
-
variant={ disabled ?
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
onClick={
|
|
62
|
-
disabled ? undefined : () => setIsSaveViewOpened( true )
|
|
63
|
-
}
|
|
64
|
-
label={ label }
|
|
65
|
-
/*
|
|
66
|
-
* We want the tooltip to show the keyboard shortcut only when the
|
|
67
|
-
* button does something, i.e. when it's not disabled.
|
|
68
|
-
*/
|
|
69
|
-
shortcut={
|
|
70
|
-
disabled ? undefined : displayShortcut.primary( 's' )
|
|
71
|
-
}
|
|
72
|
-
icon={ disabled ? check : undefined }
|
|
73
|
-
>
|
|
74
|
-
{ label }
|
|
75
|
-
</Button>
|
|
54
|
+
variant={ disabled ? null : 'primary' }
|
|
55
|
+
showTooltip={ false }
|
|
56
|
+
icon={ disabled ? check : null }
|
|
57
|
+
/>
|
|
76
58
|
</HStack>
|
|
77
59
|
);
|
|
78
60
|
}
|
|
@@ -17,6 +17,7 @@ import { NavigableRegion } from '@wordpress/interface';
|
|
|
17
17
|
*/
|
|
18
18
|
import { store as editSiteStore } from '../../store';
|
|
19
19
|
import { unlock } from '../../private-apis';
|
|
20
|
+
import { useActivateTheme } from '../../utils/use-activate-theme';
|
|
20
21
|
|
|
21
22
|
export default function SavePanel() {
|
|
22
23
|
const { isSaveViewOpen, canvasMode } = useSelect( ( select ) => {
|
|
@@ -32,7 +33,18 @@ export default function SavePanel() {
|
|
|
32
33
|
};
|
|
33
34
|
}, [] );
|
|
34
35
|
const { setIsSaveViewOpened } = useDispatch( editSiteStore );
|
|
36
|
+
const activateTheme = useActivateTheme();
|
|
35
37
|
const onClose = () => setIsSaveViewOpened( false );
|
|
38
|
+
const onSave = async ( values ) => {
|
|
39
|
+
await activateTheme();
|
|
40
|
+
return values;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const entitySavedStates = window?.__experimentalEnableThemePreviews ? (
|
|
44
|
+
<EntitiesSavedStates close={ onClose } onSave={ onSave } />
|
|
45
|
+
) : (
|
|
46
|
+
<EntitiesSavedStates close={ onClose } />
|
|
47
|
+
);
|
|
36
48
|
|
|
37
49
|
if ( canvasMode === 'view' ) {
|
|
38
50
|
return isSaveViewOpen ? (
|
|
@@ -44,7 +56,7 @@ export default function SavePanel() {
|
|
|
44
56
|
'Save site, content, and template changes'
|
|
45
57
|
) }
|
|
46
58
|
>
|
|
47
|
-
|
|
59
|
+
{ entitySavedStates }
|
|
48
60
|
</Modal>
|
|
49
61
|
) : null;
|
|
50
62
|
}
|
|
@@ -54,10 +66,10 @@ export default function SavePanel() {
|
|
|
54
66
|
className={ classnames( 'edit-site-layout__actions', {
|
|
55
67
|
'is-entity-save-view-open': isSaveViewOpen,
|
|
56
68
|
} ) }
|
|
57
|
-
ariaLabel={ __( 'Save
|
|
69
|
+
ariaLabel={ __( 'Save panel' ) }
|
|
58
70
|
>
|
|
59
71
|
{ isSaveViewOpen ? (
|
|
60
|
-
|
|
72
|
+
entitySavedStates
|
|
61
73
|
) : (
|
|
62
74
|
<div className="edit-site-editor__toggle-save-panel">
|
|
63
75
|
<Button
|
|
@@ -6,7 +6,6 @@ import { Button } from '@wordpress/components';
|
|
|
6
6
|
import {
|
|
7
7
|
useFocusOnMount,
|
|
8
8
|
useFocusReturn,
|
|
9
|
-
useInstanceId,
|
|
10
9
|
useMergeRefs,
|
|
11
10
|
} from '@wordpress/compose';
|
|
12
11
|
import { useDispatch } from '@wordpress/data';
|
|
@@ -32,13 +31,10 @@ export default function ListViewSidebar() {
|
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
33
|
|
|
35
|
-
const instanceId = useInstanceId( ListViewSidebar );
|
|
36
|
-
const labelId = `edit-site-editor__list-view-panel-label-${ instanceId }`;
|
|
37
34
|
const { PrivateListView } = unlock( blockEditorPrivateApis );
|
|
38
35
|
return (
|
|
39
36
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
40
37
|
<div
|
|
41
|
-
aria-labelledby={ labelId }
|
|
42
38
|
className="edit-site-editor__list-view-panel"
|
|
43
39
|
onKeyDown={ closeOnEscape }
|
|
44
40
|
>
|
|
@@ -46,10 +42,10 @@ export default function ListViewSidebar() {
|
|
|
46
42
|
className="edit-site-editor__list-view-panel-header"
|
|
47
43
|
ref={ headerFocusReturnRef }
|
|
48
44
|
>
|
|
49
|
-
<strong
|
|
45
|
+
<strong>{ __( 'List View' ) }</strong>
|
|
50
46
|
<Button
|
|
51
47
|
icon={ closeSmall }
|
|
52
|
-
label={ __( 'Close
|
|
48
|
+
label={ __( 'Close' ) }
|
|
53
49
|
onClick={ () => setIsListViewOpened( false ) }
|
|
54
50
|
/>
|
|
55
51
|
</div>
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
__experimentalNavigatorProvider as NavigatorProvider,
|
|
7
7
|
__experimentalNavigatorScreen as NavigatorScreen,
|
|
8
8
|
} from '@wordpress/components';
|
|
9
|
+
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* Internal dependencies
|
|
@@ -21,7 +22,11 @@ import SidebarNavigationScreenGlobalStyles from '../sidebar-navigation-screen-gl
|
|
|
21
22
|
import SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';
|
|
22
23
|
import SaveHub from '../save-hub';
|
|
23
24
|
import SidebarNavigationScreenNavigationItem from '../sidebar-navigation-screen-navigation-item';
|
|
24
|
-
import {
|
|
25
|
+
import { unlock } from '../../private-apis';
|
|
26
|
+
import SidebarNavigationScreenPages from '../sidebar-navigation-screen-pages';
|
|
27
|
+
import SidebarNavigationScreenPage from '../sidebar-navigation-screen-page';
|
|
28
|
+
|
|
29
|
+
const { useLocation } = unlock( routerPrivateApis );
|
|
25
30
|
|
|
26
31
|
function SidebarScreens() {
|
|
27
32
|
useSyncPathWithURL();
|
|
@@ -40,6 +45,12 @@ function SidebarScreens() {
|
|
|
40
45
|
<NavigatorScreen path="/navigation/:postType/:postId">
|
|
41
46
|
<SidebarNavigationScreenNavigationItem />
|
|
42
47
|
</NavigatorScreen>
|
|
48
|
+
<NavigatorScreen path="/page">
|
|
49
|
+
<SidebarNavigationScreenPages />
|
|
50
|
+
</NavigatorScreen>
|
|
51
|
+
<NavigatorScreen path="/page/:postId">
|
|
52
|
+
<SidebarNavigationScreenPage />
|
|
53
|
+
</NavigatorScreen>
|
|
43
54
|
<NavigatorScreen path="/:postType(wp_template|wp_template_part)">
|
|
44
55
|
<SidebarNavigationScreenTemplates />
|
|
45
56
|
</NavigatorScreen>
|
|
@@ -21,27 +21,29 @@ export default function GlobalStylesSidebar() {
|
|
|
21
21
|
const { shouldClearCanvasContainerView, isStyleBookOpened } = useSelect(
|
|
22
22
|
( select ) => {
|
|
23
23
|
const { getActiveComplementaryArea } = select( interfaceStore );
|
|
24
|
+
const { getEditorCanvasContainerView, getCanvasMode } = unlock(
|
|
25
|
+
select( editSiteStore )
|
|
26
|
+
);
|
|
24
27
|
const _isVisualEditorMode =
|
|
25
28
|
'visual' === select( editSiteStore ).getEditorMode();
|
|
29
|
+
const _isEditCanvasMode = 'edit' === getCanvasMode();
|
|
26
30
|
|
|
27
31
|
return {
|
|
28
32
|
isStyleBookOpened:
|
|
29
|
-
'style-book' ===
|
|
30
|
-
unlock(
|
|
31
|
-
select( editSiteStore )
|
|
32
|
-
).getEditorCanvasContainerView(),
|
|
33
|
+
'style-book' === getEditorCanvasContainerView(),
|
|
33
34
|
shouldClearCanvasContainerView:
|
|
34
35
|
'edit-site/global-styles' !==
|
|
35
36
|
getActiveComplementaryArea( 'core/edit-site' ) ||
|
|
36
|
-
! _isVisualEditorMode
|
|
37
|
+
! _isVisualEditorMode ||
|
|
38
|
+
! _isEditCanvasMode,
|
|
37
39
|
};
|
|
38
40
|
},
|
|
39
41
|
[]
|
|
40
42
|
);
|
|
41
|
-
|
|
42
43
|
const { setEditorCanvasContainerView } = unlock(
|
|
43
44
|
useDispatch( editSiteStore )
|
|
44
45
|
);
|
|
46
|
+
|
|
45
47
|
useEffect( () => {
|
|
46
48
|
if ( shouldClearCanvasContainerView ) {
|
|
47
49
|
setEditorCanvasContainerView( undefined );
|
|
@@ -54,7 +56,7 @@ export default function GlobalStylesSidebar() {
|
|
|
54
56
|
identifier="edit-site/global-styles"
|
|
55
57
|
title={ __( 'Styles' ) }
|
|
56
58
|
icon={ styles }
|
|
57
|
-
closeLabel={ __( 'Close Styles
|
|
59
|
+
closeLabel={ __( 'Close Styles' ) }
|
|
58
60
|
panelClassName="edit-site-global-styles-sidebar__panel"
|
|
59
61
|
header={
|
|
60
62
|
<Flex className="edit-site-global-styles-sidebar__header">
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { createSlotFill, PanelBody } from '@wordpress/components';
|
|
4
|
+
import { createSlotFill, PanelBody, PanelRow } from '@wordpress/components';
|
|
5
5
|
import { isRTL, __ } from '@wordpress/i18n';
|
|
6
6
|
import { drawerLeft, drawerRight } from '@wordpress/icons';
|
|
7
|
-
import { useEffect
|
|
7
|
+
import { useEffect } from '@wordpress/element';
|
|
8
8
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
9
9
|
import { store as interfaceStore } from '@wordpress/interface';
|
|
10
10
|
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
@@ -16,7 +16,9 @@ import DefaultSidebar from './default-sidebar';
|
|
|
16
16
|
import GlobalStylesSidebar from './global-styles-sidebar';
|
|
17
17
|
import { STORE_NAME } from '../../store/constants';
|
|
18
18
|
import SettingsHeader from './settings-header';
|
|
19
|
+
import LastRevision from './template-revisions';
|
|
19
20
|
import TemplateCard from './template-card';
|
|
21
|
+
import PluginTemplateSettingPanel from '../plugin-template-setting-panel';
|
|
20
22
|
import { SIDEBAR_BLOCK, SIDEBAR_TEMPLATE } from './constants';
|
|
21
23
|
import { store as editSiteStore } from '../../store';
|
|
22
24
|
|
|
@@ -69,14 +71,23 @@ export function SidebarComplementaryAreaFills() {
|
|
|
69
71
|
identifier={ sidebarName }
|
|
70
72
|
title={ __( 'Settings' ) }
|
|
71
73
|
icon={ isRTL() ? drawerLeft : drawerRight }
|
|
72
|
-
closeLabel={ __( 'Close
|
|
74
|
+
closeLabel={ __( 'Close Settings' ) }
|
|
73
75
|
header={ <SettingsHeader sidebarName={ sidebarName } /> }
|
|
74
76
|
headerClassName="edit-site-sidebar-edit-mode__panel-tabs"
|
|
75
77
|
>
|
|
76
78
|
{ sidebarName === SIDEBAR_TEMPLATE && (
|
|
77
|
-
|
|
78
|
-
<
|
|
79
|
-
|
|
79
|
+
<>
|
|
80
|
+
<PanelBody>
|
|
81
|
+
<TemplateCard />
|
|
82
|
+
<PanelRow
|
|
83
|
+
header={ __( 'Editing history' ) }
|
|
84
|
+
className="edit-site-template-revisions"
|
|
85
|
+
>
|
|
86
|
+
<LastRevision />
|
|
87
|
+
</PanelRow>
|
|
88
|
+
</PanelBody>
|
|
89
|
+
<PluginTemplateSettingPanel.Slot />
|
|
90
|
+
</>
|
|
80
91
|
) }
|
|
81
92
|
{ sidebarName === SIDEBAR_BLOCK && (
|
|
82
93
|
<InspectorSlot bubblesVirtually />
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { privateApis as componentsPrivateApis } from '@wordpress/components';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { unlock } from '../../private-apis';
|
|
10
|
+
|
|
11
|
+
const { createPrivateSlotFill } = unlock( componentsPrivateApis );
|
|
12
|
+
const SIDEBAR_FIXED_BOTTOM_SLOT_FILL_NAME = 'SidebarFixedBottom';
|
|
13
|
+
const { Slot: SidebarFixedBottomSlot, Fill: SidebarFixedBottomFill } =
|
|
14
|
+
createPrivateSlotFill( SIDEBAR_FIXED_BOTTOM_SLOT_FILL_NAME );
|
|
15
|
+
|
|
16
|
+
export default function SidebarFixedBottom( { children } ) {
|
|
17
|
+
return (
|
|
18
|
+
<SidebarFixedBottomFill>
|
|
19
|
+
<div className="edit-site-sidebar-fixed-bottom-slot">
|
|
20
|
+
{ children }
|
|
21
|
+
</div>
|
|
22
|
+
</SidebarFixedBottomFill>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { SidebarFixedBottomSlot };
|
|
@@ -99,3 +99,13 @@
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
+
|
|
103
|
+
.edit-site-sidebar-fixed-bottom-slot {
|
|
104
|
+
position: sticky;
|
|
105
|
+
bottom: 0;
|
|
106
|
+
background: $white;
|
|
107
|
+
display: flex;
|
|
108
|
+
padding: $grid-unit-20;
|
|
109
|
+
border-top: $border-width solid $gray-300;
|
|
110
|
+
box-sizing: content-box;
|
|
111
|
+
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { __ } from '@wordpress/i18n';
|
|
5
4
|
import { useSelect } from '@wordpress/data';
|
|
6
|
-
import {
|
|
5
|
+
import { Icon } from '@wordpress/components';
|
|
7
6
|
import { store as editorStore } from '@wordpress/editor';
|
|
8
7
|
import { store as coreStore } from '@wordpress/core-data';
|
|
9
8
|
import { decodeEntities } from '@wordpress/html-entities';
|
|
@@ -14,7 +13,6 @@ import { decodeEntities } from '@wordpress/html-entities';
|
|
|
14
13
|
import { store as editSiteStore } from '../../../store';
|
|
15
14
|
import TemplateActions from './template-actions';
|
|
16
15
|
import TemplateAreas from './template-areas';
|
|
17
|
-
import LastRevision from './last-revision';
|
|
18
16
|
|
|
19
17
|
export default function TemplateCard() {
|
|
20
18
|
const {
|
|
@@ -56,12 +54,6 @@ export default function TemplateCard() {
|
|
|
56
54
|
<TemplateAreas />
|
|
57
55
|
</div>
|
|
58
56
|
</div>
|
|
59
|
-
<PanelRow
|
|
60
|
-
header={ __( 'Editing history' ) }
|
|
61
|
-
className="edit-site-template-revisions"
|
|
62
|
-
>
|
|
63
|
-
<LastRevision />
|
|
64
|
-
</PanelRow>
|
|
65
57
|
</>
|
|
66
58
|
);
|
|
67
59
|
}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
__experimentalHStack as HStack,
|
|
12
12
|
FlexBlock,
|
|
13
13
|
} from '@wordpress/components';
|
|
14
|
-
import {
|
|
14
|
+
import { chevronRightSmall, Icon } from '@wordpress/icons';
|
|
15
15
|
|
|
16
16
|
export default function SidebarNavigationItem( {
|
|
17
17
|
className,
|
|
@@ -28,24 +28,23 @@ export default function SidebarNavigationItem( {
|
|
|
28
28
|
) }
|
|
29
29
|
{ ...props }
|
|
30
30
|
>
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
<HStack justify="flex-start">
|
|
32
|
+
{ icon && (
|
|
33
33
|
<Icon
|
|
34
34
|
style={ { fill: 'currentcolor' } }
|
|
35
35
|
icon={ icon }
|
|
36
36
|
size={ 24 }
|
|
37
37
|
/>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
{ ! icon && children }
|
|
38
|
+
) }
|
|
39
|
+
<FlexBlock>{ children }</FlexBlock>
|
|
40
|
+
{ withChevron && (
|
|
41
|
+
<Icon
|
|
42
|
+
icon={ chevronRightSmall }
|
|
43
|
+
className="edit-site-sidebar-navigation-item__drilldown-indicator"
|
|
44
|
+
size={ 24 }
|
|
45
|
+
/>
|
|
46
|
+
) }
|
|
47
|
+
</HStack>
|
|
49
48
|
</Item>
|
|
50
49
|
);
|
|
51
50
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
.edit-site-sidebar-navigation-item.components-item {
|
|
2
2
|
color: $gray-600;
|
|
3
|
-
|
|
3
|
+
// 6px right padding to align with + button
|
|
4
|
+
padding: $grid-unit-10 6px $grid-unit-10 $grid-unit-20;
|
|
5
|
+
border: none;
|
|
6
|
+
min-height: $grid-unit-50;
|
|
4
7
|
|
|
5
8
|
&:hover,
|
|
6
9
|
&:focus,
|
|
@@ -12,6 +15,10 @@
|
|
|
12
15
|
&[aria-current] {
|
|
13
16
|
background: var(--wp-admin-theme-color);
|
|
14
17
|
}
|
|
18
|
+
|
|
19
|
+
.edit-site-sidebar-navigation-item__drilldown-indicator {
|
|
20
|
+
fill: $gray-700;
|
|
21
|
+
}
|
|
15
22
|
}
|
|
16
23
|
|
|
17
24
|
.edit-site-sidebar-navigation-screen__content .block-editor-list-view-block-select-button {
|
|
@@ -7,8 +7,9 @@ import {
|
|
|
7
7
|
__experimentalNavigatorToParentButton as NavigatorToParentButton,
|
|
8
8
|
__experimentalHeading as Heading,
|
|
9
9
|
} from '@wordpress/components';
|
|
10
|
-
import { isRTL, __ } from '@wordpress/i18n';
|
|
10
|
+
import { isRTL, __, sprintf } from '@wordpress/i18n';
|
|
11
11
|
import { chevronRight, chevronLeft } from '@wordpress/icons';
|
|
12
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
12
13
|
import { useSelect } from '@wordpress/data';
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -17,6 +18,10 @@ import { useSelect } from '@wordpress/data';
|
|
|
17
18
|
import { store as editSiteStore } from '../../store';
|
|
18
19
|
import { unlock } from '../../private-apis';
|
|
19
20
|
import SidebarButton from '../sidebar-button';
|
|
21
|
+
import {
|
|
22
|
+
isPreviewingTheme,
|
|
23
|
+
currentlyPreviewingTheme,
|
|
24
|
+
} from '../../utils/is-previewing-theme';
|
|
20
25
|
|
|
21
26
|
export default function SidebarNavigationScreen( {
|
|
22
27
|
isRoot,
|
|
@@ -31,6 +36,8 @@ export default function SidebarNavigationScreen( {
|
|
|
31
36
|
dashboardLink: getSettings().__experimentalDashboardLink,
|
|
32
37
|
};
|
|
33
38
|
}, [] );
|
|
39
|
+
const { getTheme } = useSelect( coreStore );
|
|
40
|
+
const theme = getTheme( currentlyPreviewingTheme() );
|
|
34
41
|
|
|
35
42
|
return (
|
|
36
43
|
<VStack spacing={ 2 }>
|
|
@@ -43,13 +50,21 @@ export default function SidebarNavigationScreen( {
|
|
|
43
50
|
<NavigatorToParentButton
|
|
44
51
|
as={ SidebarButton }
|
|
45
52
|
icon={ isRTL() ? chevronRight : chevronLeft }
|
|
46
|
-
|
|
53
|
+
label={ __( 'Back' ) }
|
|
47
54
|
/>
|
|
48
55
|
) : (
|
|
49
56
|
<SidebarButton
|
|
50
57
|
icon={ isRTL() ? chevronRight : chevronLeft }
|
|
51
|
-
label={
|
|
52
|
-
|
|
58
|
+
label={
|
|
59
|
+
! isPreviewingTheme()
|
|
60
|
+
? __( 'Go back to the Dashboard' )
|
|
61
|
+
: __( 'Go back to the theme showcase' )
|
|
62
|
+
}
|
|
63
|
+
href={
|
|
64
|
+
! isPreviewingTheme()
|
|
65
|
+
? dashboardLink || 'index.php'
|
|
66
|
+
: 'themes.php'
|
|
67
|
+
}
|
|
53
68
|
/>
|
|
54
69
|
) }
|
|
55
70
|
<Heading
|
|
@@ -58,7 +73,13 @@ export default function SidebarNavigationScreen( {
|
|
|
58
73
|
level={ 2 }
|
|
59
74
|
size={ 20 }
|
|
60
75
|
>
|
|
61
|
-
{
|
|
76
|
+
{ ! isPreviewingTheme()
|
|
77
|
+
? title
|
|
78
|
+
: sprintf(
|
|
79
|
+
'Previewing %1$s: %2$s',
|
|
80
|
+
theme?.name?.rendered,
|
|
81
|
+
title
|
|
82
|
+
) }
|
|
62
83
|
</Heading>
|
|
63
84
|
{ actions }
|
|
64
85
|
</HStack>
|