@wordpress/edit-site 3.0.7 → 3.0.11
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/build/components/add-new-template/index.js +49 -0
- package/build/components/add-new-template/index.js.map +1 -0
- package/build/components/add-new-template/new-template-part.js +78 -0
- package/build/components/add-new-template/new-template-part.js.map +1 -0
- package/build/components/add-new-template/new-template.js +114 -0
- package/build/components/add-new-template/new-template.js.map +1 -0
- package/build/components/block-editor/block-inspector-button.js +4 -3
- package/build/components/block-editor/block-inspector-button.js.map +1 -1
- package/build/components/block-editor/index.js +12 -8
- package/build/components/block-editor/index.js.map +1 -1
- package/build/components/block-editor/resizable-editor.js +6 -5
- package/build/components/block-editor/resizable-editor.js.map +1 -1
- package/build/components/block-editor/resize-handle.js +6 -4
- package/build/components/block-editor/resize-handle.js.map +1 -1
- package/build/components/create-template-part-modal/index.js +115 -0
- package/build/components/create-template-part-modal/index.js.map +1 -0
- package/build/components/edit-template-part-menu-button/index.js +15 -11
- package/build/components/edit-template-part-menu-button/index.js.map +1 -1
- package/build/components/editor/index.js +25 -20
- package/build/components/editor/index.js.map +1 -1
- package/build/components/error-boundary/index.js +5 -4
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/global-styles/border-panel.js +5 -4
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-palette-panel.js +33 -9
- package/build/components/global-styles/color-palette-panel.js.map +1 -1
- package/build/components/global-styles/context-menu.js +5 -4
- package/build/components/global-styles/context-menu.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +5 -4
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/global-styles-provider.js +11 -46
- package/build/components/global-styles/global-styles-provider.js.map +1 -1
- package/build/components/global-styles/header.js +6 -5
- package/build/components/global-styles/header.js.map +1 -1
- package/build/components/global-styles/hooks.js +34 -30
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/index.js +6 -6
- package/build/components/global-styles/navigation-button.js +8 -7
- package/build/components/global-styles/navigation-button.js.map +1 -1
- package/build/components/global-styles/palette.js +13 -9
- package/build/components/global-styles/palette.js.map +1 -1
- package/build/components/global-styles/screen-background-color.js +4 -3
- package/build/components/global-styles/screen-background-color.js.map +1 -1
- package/build/components/global-styles/screen-block-list.js +13 -4
- package/build/components/global-styles/screen-block-list.js.map +1 -1
- package/build/components/global-styles/screen-block.js +4 -3
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-color-palette.js +4 -3
- package/build/components/global-styles/screen-color-palette.js.map +1 -1
- package/build/components/global-styles/screen-colors.js +19 -15
- package/build/components/global-styles/screen-colors.js.map +1 -1
- package/build/components/global-styles/screen-layout.js +8 -5
- package/build/components/global-styles/screen-layout.js.map +1 -1
- package/build/components/global-styles/screen-link-color.js +4 -3
- package/build/components/global-styles/screen-link-color.js.map +1 -1
- package/build/components/global-styles/screen-text-color.js +4 -3
- package/build/components/global-styles/screen-text-color.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +4 -3
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/subtitle.js +4 -3
- package/build/components/global-styles/subtitle.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +10 -8
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/ui.js +4 -3
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +61 -44
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/global-styles/utils.js +4 -3
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/header/document-actions/index.js +23 -19
- package/build/components/header/document-actions/index.js.map +1 -1
- package/build/components/header/feature-toggle/index.js +9 -7
- package/build/components/header/feature-toggle/index.js.map +1 -1
- package/build/components/header/index.js +15 -15
- package/build/components/header/index.js.map +1 -1
- package/build/components/header/more-menu/index.js +30 -27
- package/build/components/header/more-menu/index.js.map +1 -1
- package/build/components/header/tools-more-menu-group/index.js +10 -7
- package/build/components/header/tools-more-menu-group/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +30 -3
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/list/header.js +50 -0
- package/build/components/list/header.js.map +1 -0
- package/build/components/list/index.js +87 -0
- package/build/components/list/index.js.map +1 -0
- package/build/components/list/table.js +127 -0
- package/build/components/list/table.js.map +1 -0
- package/build/components/list/use-register-shortcuts.js +52 -0
- package/build/components/list/use-register-shortcuts.js.map +1 -0
- package/build/components/main-dashboard-button/index.js +4 -3
- package/build/components/main-dashboard-button/index.js.map +1 -1
- package/build/components/navigate-to-link/index.js +7 -6
- package/build/components/navigate-to-link/index.js.map +1 -1
- package/build/components/navigation-sidebar/index.js +25 -10
- package/build/components/navigation-sidebar/index.js.map +1 -1
- package/build/components/navigation-sidebar/navigation-panel/constants.js +1 -1
- package/build/components/navigation-sidebar/navigation-panel/content-navigation-item.js +4 -3
- package/build/components/navigation-sidebar/navigation-panel/content-navigation-item.js.map +1 -1
- package/build/components/navigation-sidebar/navigation-panel/index.js +37 -55
- package/build/components/navigation-sidebar/navigation-panel/index.js.map +1 -1
- package/build/components/navigation-sidebar/navigation-panel/menus/template-parts-sub.js +6 -5
- package/build/components/navigation-sidebar/navigation-panel/menus/template-parts-sub.js.map +1 -1
- package/build/components/navigation-sidebar/navigation-panel/menus/template-parts.js +26 -20
- package/build/components/navigation-sidebar/navigation-panel/menus/template-parts.js.map +1 -1
- package/build/components/navigation-sidebar/navigation-panel/menus/templates-sub.js +17 -10
- package/build/components/navigation-sidebar/navigation-panel/menus/templates-sub.js.map +1 -1
- package/build/components/navigation-sidebar/navigation-panel/menus/templates.js +11 -5
- package/build/components/navigation-sidebar/navigation-panel/menus/templates.js.map +1 -1
- package/build/components/navigation-sidebar/navigation-panel/navigation-entity-items.js +13 -11
- package/build/components/navigation-sidebar/navigation-panel/navigation-entity-items.js.map +1 -1
- package/build/components/navigation-sidebar/navigation-panel/new-template-dropdown.js +24 -18
- package/build/components/navigation-sidebar/navigation-panel/new-template-dropdown.js.map +1 -1
- package/build/components/navigation-sidebar/navigation-panel/search-results.js +14 -11
- package/build/components/navigation-sidebar/navigation-panel/search-results.js.map +1 -1
- package/build/components/navigation-sidebar/navigation-panel/template-hierarchy.js +8 -5
- package/build/components/navigation-sidebar/navigation-panel/template-hierarchy.js.map +1 -1
- package/build/components/navigation-sidebar/navigation-panel/template-navigation-item.js +4 -3
- package/build/components/navigation-sidebar/navigation-panel/template-navigation-item.js.map +1 -1
- package/build/components/navigation-sidebar/navigation-panel/template-preview.js +5 -4
- package/build/components/navigation-sidebar/navigation-panel/template-preview.js.map +1 -1
- package/build/components/navigation-sidebar/navigation-toggle/index.js +7 -27
- package/build/components/navigation-sidebar/navigation-toggle/index.js.map +1 -1
- package/build/components/save-button/index.js +5 -4
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/sidebar/constants.js +1 -1
- package/build/components/sidebar/default-sidebar.js +11 -10
- package/build/components/sidebar/default-sidebar.js.map +1 -1
- package/build/components/sidebar/plugin-sidebar/index.js +5 -4
- package/build/components/sidebar/plugin-sidebar/index.js.map +1 -1
- package/build/components/sidebar/settings-header/index.js +4 -3
- package/build/components/sidebar/settings-header/index.js.map +1 -1
- package/build/components/sidebar/template-card/template-areas.js +17 -13
- package/build/components/sidebar/template-card/template-areas.js.map +1 -1
- package/build/components/template-details/index.js +14 -9
- package/build/components/template-details/index.js.map +1 -1
- package/build/components/template-details/template-areas.js +38 -29
- package/build/components/template-details/template-areas.js.map +1 -1
- package/build/components/template-part-converter/convert-to-regular.js +15 -11
- package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
- package/build/components/template-part-converter/convert-to-template-part.js +29 -86
- package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build/components/welcome-guide/editor.js +58 -0
- package/build/components/welcome-guide/editor.js.map +1 -0
- package/build/components/welcome-guide/image.js +27 -0
- package/build/components/welcome-guide/image.js.map +1 -0
- package/build/components/welcome-guide/index.js +49 -0
- package/build/components/welcome-guide/index.js.map +1 -0
- package/build/components/welcome-guide/styles.js +83 -0
- package/build/components/welcome-guide/styles.js.map +1 -0
- package/build/index.js +40 -16
- package/build/index.js.map +1 -1
- package/build/plugins/index.js +4 -2
- package/build/plugins/index.js.map +1 -1
- package/build/plugins/welcome-guide-menu-item.js +39 -0
- package/build/plugins/welcome-guide-menu-item.js.map +1 -0
- package/build/store/actions.js +24 -24
- package/build/store/actions.js.map +1 -1
- package/build/store/constants.js +1 -1
- package/build/store/defaults.js +4 -1
- package/build/store/defaults.js.map +1 -1
- package/build/store/index.js +5 -3
- package/build/store/index.js.map +1 -1
- package/build/store/reducer.js +36 -14
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +27 -19
- package/build/store/selectors.js.map +1 -1
- package/build/utils/is-template-removable.js +21 -0
- package/build/utils/is-template-removable.js.map +1 -0
- package/build-module/components/add-new-template/index.js +36 -0
- package/build-module/components/add-new-template/index.js.map +1 -0
- package/build-module/components/add-new-template/new-template-part.js +65 -0
- package/build-module/components/add-new-template/new-template-part.js.map +1 -0
- package/build-module/components/add-new-template/new-template.js +97 -0
- package/build-module/components/add-new-template/new-template.js.map +1 -0
- package/build-module/components/block-editor/block-inspector-button.js +4 -3
- package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
- package/build-module/components/block-editor/index.js +12 -8
- package/build-module/components/block-editor/index.js.map +1 -1
- package/build-module/components/block-editor/resizable-editor.js +6 -5
- package/build-module/components/block-editor/resizable-editor.js.map +1 -1
- package/build-module/components/block-editor/resize-handle.js +6 -4
- package/build-module/components/block-editor/resize-handle.js.map +1 -1
- package/build-module/components/create-template-part-modal/index.js +102 -0
- package/build-module/components/create-template-part-modal/index.js.map +1 -0
- package/build-module/components/edit-template-part-menu-button/index.js +15 -11
- package/build-module/components/edit-template-part-menu-button/index.js.map +1 -1
- package/build-module/components/editor/index.js +24 -21
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/error-boundary/index.js +5 -4
- package/build-module/components/error-boundary/index.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +4 -3
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-palette-panel.js +33 -10
- package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/context-menu.js +5 -4
- package/build-module/components/global-styles/context-menu.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +4 -3
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/global-styles-provider.js +12 -42
- package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
- package/build-module/components/global-styles/header.js +6 -5
- package/build-module/components/global-styles/header.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +32 -28
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/navigation-button.js +8 -7
- package/build-module/components/global-styles/navigation-button.js.map +1 -1
- package/build-module/components/global-styles/palette.js +13 -9
- package/build-module/components/global-styles/palette.js.map +1 -1
- package/build-module/components/global-styles/screen-background-color.js +4 -3
- package/build-module/components/global-styles/screen-background-color.js.map +1 -1
- package/build-module/components/global-styles/screen-block-list.js +11 -4
- package/build-module/components/global-styles/screen-block-list.js.map +1 -1
- package/build-module/components/global-styles/screen-block.js +4 -3
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-color-palette.js +4 -3
- package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
- package/build-module/components/global-styles/screen-colors.js +19 -15
- package/build-module/components/global-styles/screen-colors.js.map +1 -1
- package/build-module/components/global-styles/screen-layout.js +4 -3
- package/build-module/components/global-styles/screen-layout.js.map +1 -1
- package/build-module/components/global-styles/screen-link-color.js +4 -3
- package/build-module/components/global-styles/screen-link-color.js.map +1 -1
- package/build-module/components/global-styles/screen-text-color.js +4 -3
- package/build-module/components/global-styles/screen-text-color.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js +4 -3
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/subtitle.js +4 -3
- package/build-module/components/global-styles/subtitle.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +9 -7
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/ui.js +4 -3
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +60 -43
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/global-styles/utils.js +3 -2
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/header/document-actions/index.js +23 -19
- package/build-module/components/header/document-actions/index.js.map +1 -1
- package/build-module/components/header/feature-toggle/index.js +9 -7
- package/build-module/components/header/feature-toggle/index.js.map +1 -1
- package/build-module/components/header/index.js +15 -13
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/header/more-menu/index.js +30 -27
- package/build-module/components/header/more-menu/index.js.map +1 -1
- package/build-module/components/header/tools-more-menu-group/index.js +10 -7
- package/build-module/components/header/tools-more-menu-group/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +30 -3
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/list/header.js +37 -0
- package/build-module/components/list/header.js.map +1 -0
- package/build-module/components/list/index.js +69 -0
- package/build-module/components/list/index.js.map +1 -0
- package/build-module/components/list/table.js +111 -0
- package/build-module/components/list/table.js.map +1 -0
- package/build-module/components/list/use-register-shortcuts.js +41 -0
- package/build-module/components/list/use-register-shortcuts.js.map +1 -0
- package/build-module/components/main-dashboard-button/index.js +4 -3
- package/build-module/components/main-dashboard-button/index.js.map +1 -1
- package/build-module/components/navigate-to-link/index.js +7 -6
- package/build-module/components/navigate-to-link/index.js.map +1 -1
- package/build-module/components/navigation-sidebar/index.js +25 -8
- package/build-module/components/navigation-sidebar/index.js.map +1 -1
- package/build-module/components/navigation-sidebar/navigation-panel/content-navigation-item.js +4 -3
- package/build-module/components/navigation-sidebar/navigation-panel/content-navigation-item.js.map +1 -1
- package/build-module/components/navigation-sidebar/navigation-panel/index.js +39 -55
- package/build-module/components/navigation-sidebar/navigation-panel/index.js.map +1 -1
- package/build-module/components/navigation-sidebar/navigation-panel/menus/template-parts-sub.js +6 -5
- package/build-module/components/navigation-sidebar/navigation-panel/menus/template-parts-sub.js.map +1 -1
- package/build-module/components/navigation-sidebar/navigation-panel/menus/template-parts.js +26 -20
- package/build-module/components/navigation-sidebar/navigation-panel/menus/template-parts.js.map +1 -1
- package/build-module/components/navigation-sidebar/navigation-panel/menus/templates-sub.js +17 -10
- package/build-module/components/navigation-sidebar/navigation-panel/menus/templates-sub.js.map +1 -1
- package/build-module/components/navigation-sidebar/navigation-panel/menus/templates.js +11 -5
- package/build-module/components/navigation-sidebar/navigation-panel/menus/templates.js.map +1 -1
- package/build-module/components/navigation-sidebar/navigation-panel/navigation-entity-items.js +13 -11
- package/build-module/components/navigation-sidebar/navigation-panel/navigation-entity-items.js.map +1 -1
- package/build-module/components/navigation-sidebar/navigation-panel/new-template-dropdown.js +24 -18
- package/build-module/components/navigation-sidebar/navigation-panel/new-template-dropdown.js.map +1 -1
- package/build-module/components/navigation-sidebar/navigation-panel/search-results.js +14 -11
- package/build-module/components/navigation-sidebar/navigation-panel/search-results.js.map +1 -1
- package/build-module/components/navigation-sidebar/navigation-panel/template-hierarchy.js +6 -3
- package/build-module/components/navigation-sidebar/navigation-panel/template-hierarchy.js.map +1 -1
- package/build-module/components/navigation-sidebar/navigation-panel/template-navigation-item.js +4 -3
- package/build-module/components/navigation-sidebar/navigation-panel/template-navigation-item.js.map +1 -1
- package/build-module/components/navigation-sidebar/navigation-panel/template-preview.js +5 -4
- package/build-module/components/navigation-sidebar/navigation-panel/template-preview.js.map +1 -1
- package/build-module/components/navigation-sidebar/navigation-toggle/index.js +8 -27
- package/build-module/components/navigation-sidebar/navigation-toggle/index.js.map +1 -1
- package/build-module/components/save-button/index.js +5 -4
- package/build-module/components/save-button/index.js.map +1 -1
- package/build-module/components/sidebar/default-sidebar.js +11 -10
- package/build-module/components/sidebar/default-sidebar.js.map +1 -1
- package/build-module/components/sidebar/plugin-sidebar/index.js +5 -4
- package/build-module/components/sidebar/plugin-sidebar/index.js.map +1 -1
- package/build-module/components/sidebar/settings-header/index.js +4 -3
- package/build-module/components/sidebar/settings-header/index.js.map +1 -1
- package/build-module/components/sidebar/template-card/template-areas.js +17 -13
- package/build-module/components/sidebar/template-card/template-areas.js.map +1 -1
- package/build-module/components/template-details/index.js +14 -9
- package/build-module/components/template-details/index.js.map +1 -1
- package/build-module/components/template-details/template-areas.js +38 -29
- package/build-module/components/template-details/template-areas.js.map +1 -1
- package/build-module/components/template-part-converter/convert-to-regular.js +15 -11
- package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
- package/build-module/components/template-part-converter/convert-to-template-part.js +29 -86
- package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build-module/components/welcome-guide/editor.js +45 -0
- package/build-module/components/welcome-guide/editor.js.map +1 -0
- package/build-module/components/welcome-guide/image.js +19 -0
- package/build-module/components/welcome-guide/image.js.map +1 -0
- package/build-module/components/welcome-guide/index.js +35 -0
- package/build-module/components/welcome-guide/index.js.map +1 -0
- package/build-module/components/welcome-guide/styles.js +69 -0
- package/build-module/components/welcome-guide/styles.js.map +1 -0
- package/build-module/index.js +21 -1
- package/build-module/index.js.map +1 -1
- package/build-module/plugins/index.js +3 -2
- package/build-module/plugins/index.js.map +1 -1
- package/build-module/plugins/welcome-guide-menu-item.js +27 -0
- package/build-module/plugins/welcome-guide-menu-item.js.map +1 -0
- package/build-module/store/actions.js +11 -11
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/defaults.js +4 -1
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/reducer.js +31 -10
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +17 -10
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/is-template-removable.js +14 -0
- package/build-module/utils/is-template-removable.js.map +1 -0
- package/build-style/style-rtl.css +348 -32
- package/build-style/style.css +348 -32
- package/package.json +27 -27
- package/src/components/add-new-template/index.js +30 -0
- package/src/components/add-new-template/new-template-part.js +66 -0
- package/src/components/add-new-template/new-template.js +116 -0
- package/src/components/add-new-template/style.scss +11 -0
- package/src/components/create-template-part-modal/index.js +132 -0
- package/src/components/{template-part-converter → create-template-part-modal}/style.scss +9 -9
- package/src/components/editor/index.js +22 -15
- package/src/components/editor/style.scss +8 -0
- package/src/components/global-styles/color-palette-panel.js +64 -7
- package/src/components/global-styles/global-styles-provider.js +7 -36
- package/src/components/global-styles/hooks.js +58 -26
- package/src/components/global-styles/screen-block-list.js +11 -1
- package/src/components/global-styles/test/use-global-styles-output.js +2 -2
- package/src/components/global-styles/use-global-styles-output.js +2 -2
- package/src/components/global-styles/utils.js +1 -1
- package/src/components/header/index.js +0 -6
- package/src/components/keyboard-shortcuts/index.js +32 -0
- package/src/components/list/header.js +34 -0
- package/src/components/list/index.js +80 -0
- package/src/components/list/style.scss +113 -0
- package/src/components/list/table.js +132 -0
- package/src/components/list/use-register-shortcuts.js +45 -0
- package/src/components/navigation-sidebar/index.js +31 -8
- package/src/components/navigation-sidebar/navigation-panel/index.js +45 -55
- package/src/components/navigation-sidebar/navigation-panel/style.scss +4 -2
- package/src/components/navigation-sidebar/navigation-toggle/index.js +4 -28
- package/src/components/template-details/index.js +3 -2
- package/src/components/template-part-converter/convert-to-template-part.js +20 -140
- package/src/components/welcome-guide/editor.js +63 -0
- package/src/components/welcome-guide/image.js +11 -0
- package/src/components/welcome-guide/index.js +33 -0
- package/src/components/welcome-guide/style.scss +37 -0
- package/src/components/welcome-guide/styles.js +116 -0
- package/src/index.js +21 -1
- package/src/plugins/index.js +3 -1
- package/src/plugins/welcome-guide-menu-item.js +35 -0
- package/src/store/actions.js +11 -9
- package/src/store/defaults.js +4 -1
- package/src/store/test/actions.js +14 -20
- package/src/style.scss +9 -6
- package/src/utils/is-template-removable.js +13 -0
- package/build/components/header/navigation-link/index.js +0 -86
- package/build/components/header/navigation-link/index.js.map +0 -1
- package/build-module/components/header/navigation-link/index.js +0 -73
- package/build-module/components/header/navigation-link/index.js.map +0 -1
- package/src/components/header/navigation-link/index.js +0 -71
- package/src/components/header/navigation-link/style.scss +0 -69
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/store/selectors.js"],"names":["get","map","keyBy","createSelector","store","coreDataStore","createRegistrySelector","uploadMedia","isTemplatePart","MENU_ROOT","MENU_TEMPLATE_PARTS","MENU_TEMPLATES_UNUSED","TEMPLATE_PARTS_SUB_MENUS","getTemplateLocation","isTemplateSuperseded","isFeatureActive","state","feature","preferences","features","__experimentalGetPreviewDeviceType","deviceType","getCanUserCreateMedia","select","canUser","getSettings","setIsInserterOpen","settings","outlineMode","focusMode","hasFixedToolbar","__experimentalSetIsInserterOpened","canUserCreateMedia","mediaUpload","onError","rest","wpAllowedMimeTypes","allowedMimeTypes","message","getHomeTemplateId","homeTemplateId","getCurrentEditedPost","editedPost","length","getPreviousEditedPost","getEditedPostType","type","getEditedPostId","id","getPreviousEditedPostType","getPreviousEditedPostId","getPage","page","getNavigationPanelActiveMenu","navigationPanel","menu","getCurrentTemplateNavigationPanelSubMenu","templateType","templateId","template","getEntityRecord","find","submenu","area","templates","getEntityRecords","showOnFront","getEditedEntityRecord","show_on_front","slug","isNavigationOpened","isOpen","isInserterOpened","blockInserterPanel","__experimentalGetInsertionPoint","rootClientId","insertionIndex","filterValue","isListViewOpened","listViewPanel","getCurrentTemplateTemplateParts","templateParts","templatePartsById","templatePart","blocks","filter","block","attributes","theme","templatePartId"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,GAAT,EAAcC,GAAd,EAAmBC,KAAnB,QAAgC,QAAhC;AACA,OAAOC,cAAP,MAA2B,QAA3B;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,sBAAvC;AACA,SAASC,s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;AACA;;AACA,OAAO,MAAMC,+BAA+B,GAAG1E,sBAAsB,CAClEiB,MAAF,IAAgBP,KAAF,IAAa;AAAA;;AAC1B,QAAMyC,YAAY,GAAGZ,iBAAiB,CAAE7B,KAAF,CAAtC;AACA,QAAM0C,UAAU,GAAGX,eAAe,CAAE/B,KAAF,CAAlC;AACA,QAAM2C,QAAQ,GAAGpC,MAAM,CAAElB,aAAF,CAAN,CAAwB8D,qBAAxB,CAChB,UADgB,EAEhBV,YAFgB,EAGhBC,UAHgB,CAAjB;AAMA,QAAMuB,aAAa,GAAG1D,MAAM,CAAElB,aAAF,CAAN,CAAwB4D,gBAAxB,CACrB,UADqB,EAErB,kBAFqB,CAAtB;AAIA,QAAMiB,iBAAiB,GAAGhF,KAAK,CAC9B+E,aAD8B,EAE5BE,YAAF,IAAoBA,YAAY,CAACnC,EAFH,CAA/B;AAKA,SAAO,qBAAEW,QAAQ,CAACyB,MAAX,+DAAqB,EAArB,EACLC,MADK,CACKC,KAAF,IAAa9E,cAAc,CAAE8E,KAAF,CAD9B,EAELrF,GAFK,CAEEqF,KAAF,IAAa;AAClB,UAAM;AACLC,MAAAA,UAAU,EAAE;AAAEC,QAAAA,KAAF;AAASnB,QAAAA;AAAT;AADP,QAEFiB,KAFJ;AAGA,UAAMG,cAAc,GAAI,GAAGD,KAAO,KAAKnB,IAAM,EAA7C;AACA,UAAMc,YAAY,GAAGD,iBAAiB,CAAEO,cAAF,CAAtC;AAEA,WAAO;AACNN,MAAAA,YADM;AAENG,MAAAA;AAFM,KAAP;AAIA,GAbK,EAcLD,MAdK,CAcG,CAAE;AAAEF,IAAAA;AAAF,GAAF,KAAwB,CAAC,CAAEA,YAd9B,CAAP;AAeA,CAlCmE,CAA9D","sourcesContent":["/**\n * External dependencies\n */\nimport { get, map, keyBy } from 'lodash';\nimport createSelector from 'rememo';\n\n/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { createRegistrySelector } from '@wordpress/data';\nimport { uploadMedia } from '@wordpress/media-utils';\nimport { isTemplatePart } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport {\n\tMENU_ROOT,\n\tMENU_TEMPLATE_PARTS,\n\tMENU_TEMPLATES_UNUSED,\n\tTEMPLATE_PARTS_SUB_MENUS,\n} from '../components/navigation-sidebar/navigation-panel/constants';\nimport {\n\tgetTemplateLocation,\n\tisTemplateSuperseded,\n} from '../components/navigation-sidebar/navigation-panel/template-hierarchy';\n\n/**\n * @typedef {'template'|'template_type'} TemplateType Template type.\n */\n\n/**\n * Returns whether the given feature is enabled or not.\n *\n * @param {Object} state Global application state.\n * @param {string} feature Feature slug.\n *\n * @return {boolean} Is active.\n */\nexport function isFeatureActive( state, feature ) {\n\treturn get( state.preferences.features, [ feature ], false );\n}\n\n/**\n * Returns the current editing canvas device type.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport function __experimentalGetPreviewDeviceType( state ) {\n\treturn state.deviceType;\n}\n\n/**\n * Returns whether the current user can create media or not.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Whether the current user can create media or not.\n */\nexport const getCanUserCreateMedia = createRegistrySelector( ( select ) => () =>\n\tselect( coreDataStore ).canUser( 'create', 'media' )\n);\n\n/**\n * Returns the settings, taking into account active features and permissions.\n *\n * @param {Object} state Global application state.\n * @param {Function} setIsInserterOpen Setter for the open state of the global inserter.\n *\n * @return {Object} Settings.\n */\nexport const getSettings = createSelector(\n\t( state, setIsInserterOpen ) => {\n\t\tconst settings = {\n\t\t\t...state.settings,\n\t\t\toutlineMode: true,\n\t\t\tfocusMode: isFeatureActive( state, 'focusMode' ),\n\t\t\thasFixedToolbar: isFeatureActive( state, 'fixedToolbar' ),\n\t\t\t__experimentalSetIsInserterOpened: setIsInserterOpen,\n\t\t};\n\n\t\tconst canUserCreateMedia = getCanUserCreateMedia( state );\n\t\tif ( ! canUserCreateMedia ) {\n\t\t\treturn settings;\n\t\t}\n\n\t\tsettings.mediaUpload = ( { onError, ...rest } ) => {\n\t\t\tuploadMedia( {\n\t\t\t\twpAllowedMimeTypes: state.settings.allowedMimeTypes,\n\t\t\t\tonError: ( { message } ) => onError( message ),\n\t\t\t\t...rest,\n\t\t\t} );\n\t\t};\n\t\treturn settings;\n\t},\n\t( state ) => [\n\t\tgetCanUserCreateMedia( state ),\n\t\tstate.settings,\n\t\tisFeatureActive( state, 'focusMode' ),\n\t\tisFeatureActive( state, 'fixedToolbar' ),\n\t]\n);\n\n/**\n * Returns the current home template ID.\n *\n * @param {Object} state Global application state.\n *\n * @return {number?} Home template ID.\n */\nexport function getHomeTemplateId( state ) {\n\treturn state.homeTemplateId;\n}\n\nfunction getCurrentEditedPost( state ) {\n\treturn state.editedPost[ state.editedPost.length - 1 ] || {};\n}\n\nfunction getPreviousEditedPost( state ) {\n\treturn state.editedPost[ state.editedPost.length - 2 ] || {};\n}\n\n/**\n * Returns the current edited post type (wp_template or wp_template_part).\n *\n * @param {Object} state Global application state.\n *\n * @return {TemplateType?} Template type.\n */\nexport function getEditedPostType( state ) {\n\treturn getCurrentEditedPost( state ).type;\n}\n\n/**\n * Returns the ID of the currently edited template or template part.\n *\n * @param {Object} state Global application state.\n *\n * @return {string?} Post ID.\n */\nexport function getEditedPostId( state ) {\n\treturn getCurrentEditedPost( state ).id;\n}\n\n/**\n * Returns the previous edited post type (wp_template or wp_template_part).\n *\n * @param {Object} state Global application state.\n *\n * @return {TemplateType?} Template type.\n */\nexport function getPreviousEditedPostType( state ) {\n\treturn getPreviousEditedPost( state ).type;\n}\n\n/**\n * Returns the ID of the previous edited template or template part.\n *\n * @param {Object} state Global application state.\n *\n * @return {string?} Post ID.\n */\nexport function getPreviousEditedPostId( state ) {\n\treturn getPreviousEditedPost( state ).id;\n}\n\n/**\n * Returns the current page object.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Page.\n */\nexport function getPage( state ) {\n\treturn getCurrentEditedPost( state ).page;\n}\n\n/**\n * Returns the active menu in the navigation panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Active menu.\n */\nexport function getNavigationPanelActiveMenu( state ) {\n\treturn state.navigationPanel.menu;\n}\n\n/**\n * Returns the current template or template part's corresponding\n * navigation panel's sub menu, to be used with `openNavigationPanelToMenu`.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} The current template or template part's sub menu.\n */\nexport const getCurrentTemplateNavigationPanelSubMenu = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst templateType = getEditedPostType( state );\n\t\tconst templateId = getEditedPostId( state );\n\t\tconst template = templateId\n\t\t\t? select( coreDataStore ).getEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\ttemplateType,\n\t\t\t\t\ttemplateId\n\t\t\t )\n\t\t\t: null;\n\n\t\tif ( ! template ) {\n\t\t\treturn MENU_ROOT;\n\t\t}\n\n\t\tif ( 'wp_template_part' === templateType ) {\n\t\t\treturn (\n\t\t\t\tTEMPLATE_PARTS_SUB_MENUS.find(\n\t\t\t\t\t( submenu ) => submenu.area === template?.area\n\t\t\t\t)?.menu || MENU_TEMPLATE_PARTS\n\t\t\t);\n\t\t}\n\n\t\tconst templates = select( coreDataStore ).getEntityRecords(\n\t\t\t'postType',\n\t\t\t'wp_template'\n\t\t);\n\t\tconst showOnFront = select( coreDataStore ).getEditedEntityRecord(\n\t\t\t'root',\n\t\t\t'site'\n\t\t).show_on_front;\n\n\t\tif (\n\t\t\tisTemplateSuperseded(\n\t\t\t\ttemplate.slug,\n\t\t\t\tmap( templates, 'slug' ),\n\t\t\t\tshowOnFront\n\t\t\t)\n\t\t) {\n\t\t\treturn MENU_TEMPLATES_UNUSED;\n\t\t}\n\n\t\treturn getTemplateLocation( template.slug );\n\t}\n);\n\n/**\n * Returns the current opened/closed state of the navigation panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the navigation panel should be open; false if closed.\n */\nexport function isNavigationOpened( state ) {\n\treturn state.navigationPanel.isOpen;\n}\n\n/**\n * Returns the current opened/closed state of the inserter panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the inserter panel should be open; false if closed.\n */\nexport function isInserterOpened( state ) {\n\treturn !! state.blockInserterPanel;\n}\n\n/**\n * Get the insertion point for the inserter.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport function __experimentalGetInsertionPoint( state ) {\n\tconst {\n\t\trootClientId,\n\t\tinsertionIndex,\n\t\tfilterValue,\n\t} = state.blockInserterPanel;\n\treturn { rootClientId, insertionIndex, filterValue };\n}\n\n/**\n * Returns the current opened/closed state of the list view panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the list view panel should be open; false if closed.\n */\nexport function isListViewOpened( state ) {\n\treturn state.listViewPanel;\n}\n\n/**\n * Returns the template parts and their blocks for the current edited template.\n *\n * @param {Object} state Global application state.\n * @return {Array} Template parts and their blocks in an array.\n */\nexport const getCurrentTemplateTemplateParts = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst templateType = getEditedPostType( state );\n\t\tconst templateId = getEditedPostId( state );\n\t\tconst template = select( coreDataStore ).getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\ttemplateType,\n\t\t\ttemplateId\n\t\t);\n\n\t\tconst templateParts = select( coreDataStore ).getEntityRecords(\n\t\t\t'postType',\n\t\t\t'wp_template_part'\n\t\t);\n\t\tconst templatePartsById = keyBy(\n\t\t\ttemplateParts,\n\t\t\t( templatePart ) => templatePart.id\n\t\t);\n\n\t\treturn ( template.blocks ?? [] )\n\t\t\t.filter( ( block ) => isTemplatePart( block ) )\n\t\t\t.map( ( block ) => {\n\t\t\t\tconst {\n\t\t\t\t\tattributes: { theme, slug },\n\t\t\t\t} = block;\n\t\t\t\tconst templatePartId = `${ theme }//${ slug }`;\n\t\t\t\tconst templatePart = templatePartsById[ templatePartId ];\n\n\t\t\t\treturn {\n\t\t\t\t\ttemplatePart,\n\t\t\t\t\tblock,\n\t\t\t\t};\n\t\t\t} )\n\t\t\t.filter( ( { templatePart } ) => !! templatePart );\n\t}\n);\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/store/selectors.js"],"names":["get","map","keyBy","createSelector","store","coreDataStore","createRegistrySelector","uploadMedia","isTemplatePart","MENU_ROOT","MENU_TEMPLATE_PARTS","MENU_TEMPLATES_UNUSED","TEMPLATE_PARTS_SUB_MENUS","getTemplateLocation","isTemplateSuperseded","isFeatureActive","state","feature","preferences","features","__experimentalGetPreviewDeviceType","deviceType","getCanUserCreateMedia","select","canUser","getSettings","setIsInserterOpen","settings","outlineMode","focusMode","hasFixedToolbar","__experimentalSetIsInserterOpened","canUserCreateMedia","mediaUpload","onError","rest","wpAllowedMimeTypes","allowedMimeTypes","message","getHomeTemplateId","homeTemplateId","getCurrentEditedPost","editedPost","length","getPreviousEditedPost","getEditedPostType","type","getEditedPostId","id","getPreviousEditedPostType","getPreviousEditedPostId","getPage","page","getNavigationPanelActiveMenu","navigationPanel","menu","getCurrentTemplateNavigationPanelSubMenu","templateType","templateId","template","getEntityRecord","find","submenu","area","templates","getEntityRecords","showOnFront","getEditedEntityRecord","show_on_front","slug","isNavigationOpened","isOpen","isInserterOpened","blockInserterPanel","__experimentalGetInsertionPoint","rootClientId","insertionIndex","filterValue","isListViewOpened","listViewPanel","getCurrentTemplateTemplateParts","templateParts","templatePartsById","templatePart","blocks","filter","block","attributes","theme","templatePartId"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,GAAT,EAAcC,GAAd,EAAmBC,KAAnB,QAAgC,QAAhC;AACA,OAAOC,cAAP,MAA2B,QAA3B;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,sBAAvC;AACA,SAASC,sBAAT,QAAuC,iBAAvC;AACA,SAASC,WAAT,QAA4B,wBAA5B;AACA,SAASC,cAAT,QAA+B,mBAA/B;AAEA;AACA;AACA;;AACA,SACCC,SADD,EAECC,mBAFD,EAGCC,qBAHD,EAICC,wBAJD,QAKO,6DALP;AA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AF,CAAtC;AACA,QAAM0C,UAAU,GAAGX,eAAe,CAAE/B,KAAF,CAAlC;AACA,QAAM2C,QAAQ,GAAGpC,MAAM,CAAElB,aAAF,CAAN,CAAwB8D,qBAAxB,CAChB,UADgB,EAEhBV,YAFgB,EAGhBC,UAHgB,CAAjB;AAMA,QAAMuB,aAAa,GAAG1D,MAAM,CAAElB,aAAF,CAAN,CAAwB4D,gBAAxB,CACrB,UADqB,EAErB,kBAFqB,CAAtB;AAIA,QAAMiB,iBAAiB,GAAGhF,KAAK,CAC9B+E,aAD8B,EAE5BE,YAAF,IAAoBA,YAAY,CAACnC,EAFH,CAA/B;AAKA,SAAO,qBAAEW,QAAQ,CAACyB,MAAX,+DAAqB,EAArB,EACLC,MADK,CACKC,KAAF,IAAa9E,cAAc,CAAE8E,KAAF,CAD9B,EAELrF,GAFK,CAEEqF,KAAF,IAAa;AAClB,UAAM;AACLC,MAAAA,UAAU,EAAE;AAAEC,QAAAA,KAAF;AAASnB,QAAAA;AAAT;AADP,QAEFiB,KAFJ;AAGA,UAAMG,cAAc,GAAI,GAAGD,KAAO,KAAKnB,IAAM,EAA7C;AACA,UAAMc,YAAY,GAAGD,iBAAiB,CAAEO,cAAF,CAAtC;AAEA,WAAO;AACNN,MAAAA,YADM;AAENG,MAAAA;AAFM,KAAP;AAIA,GAbK,EAcLD,MAdK,CAcG;AAAA,QAAE;AAAEF,MAAAA;AAAF,KAAF;AAAA,WAAwB,CAAC,CAAEA,YAA3B;AAAA,GAdH,CAAP;AAeA,CAlCmE,CAA9D","sourcesContent":["/**\n * External dependencies\n */\nimport { get, map, keyBy } from 'lodash';\nimport createSelector from 'rememo';\n\n/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { createRegistrySelector } from '@wordpress/data';\nimport { uploadMedia } from '@wordpress/media-utils';\nimport { isTemplatePart } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport {\n\tMENU_ROOT,\n\tMENU_TEMPLATE_PARTS,\n\tMENU_TEMPLATES_UNUSED,\n\tTEMPLATE_PARTS_SUB_MENUS,\n} from '../components/navigation-sidebar/navigation-panel/constants';\nimport {\n\tgetTemplateLocation,\n\tisTemplateSuperseded,\n} from '../components/navigation-sidebar/navigation-panel/template-hierarchy';\n\n/**\n * @typedef {'template'|'template_type'} TemplateType Template type.\n */\n\n/**\n * Returns whether the given feature is enabled or not.\n *\n * @param {Object} state Global application state.\n * @param {string} feature Feature slug.\n *\n * @return {boolean} Is active.\n */\nexport function isFeatureActive( state, feature ) {\n\treturn get( state.preferences.features, [ feature ], false );\n}\n\n/**\n * Returns the current editing canvas device type.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport function __experimentalGetPreviewDeviceType( state ) {\n\treturn state.deviceType;\n}\n\n/**\n * Returns whether the current user can create media or not.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Whether the current user can create media or not.\n */\nexport const getCanUserCreateMedia = createRegistrySelector( ( select ) => () =>\n\tselect( coreDataStore ).canUser( 'create', 'media' )\n);\n\n/**\n * Returns the settings, taking into account active features and permissions.\n *\n * @param {Object} state Global application state.\n * @param {Function} setIsInserterOpen Setter for the open state of the global inserter.\n *\n * @return {Object} Settings.\n */\nexport const getSettings = createSelector(\n\t( state, setIsInserterOpen ) => {\n\t\tconst settings = {\n\t\t\t...state.settings,\n\t\t\toutlineMode: true,\n\t\t\tfocusMode: isFeatureActive( state, 'focusMode' ),\n\t\t\thasFixedToolbar: isFeatureActive( state, 'fixedToolbar' ),\n\t\t\t__experimentalSetIsInserterOpened: setIsInserterOpen,\n\t\t};\n\n\t\tconst canUserCreateMedia = getCanUserCreateMedia( state );\n\t\tif ( ! canUserCreateMedia ) {\n\t\t\treturn settings;\n\t\t}\n\n\t\tsettings.mediaUpload = ( { onError, ...rest } ) => {\n\t\t\tuploadMedia( {\n\t\t\t\twpAllowedMimeTypes: state.settings.allowedMimeTypes,\n\t\t\t\tonError: ( { message } ) => onError( message ),\n\t\t\t\t...rest,\n\t\t\t} );\n\t\t};\n\t\treturn settings;\n\t},\n\t( state ) => [\n\t\tgetCanUserCreateMedia( state ),\n\t\tstate.settings,\n\t\tisFeatureActive( state, 'focusMode' ),\n\t\tisFeatureActive( state, 'fixedToolbar' ),\n\t]\n);\n\n/**\n * Returns the current home template ID.\n *\n * @param {Object} state Global application state.\n *\n * @return {number?} Home template ID.\n */\nexport function getHomeTemplateId( state ) {\n\treturn state.homeTemplateId;\n}\n\nfunction getCurrentEditedPost( state ) {\n\treturn state.editedPost[ state.editedPost.length - 1 ] || {};\n}\n\nfunction getPreviousEditedPost( state ) {\n\treturn state.editedPost[ state.editedPost.length - 2 ] || {};\n}\n\n/**\n * Returns the current edited post type (wp_template or wp_template_part).\n *\n * @param {Object} state Global application state.\n *\n * @return {TemplateType?} Template type.\n */\nexport function getEditedPostType( state ) {\n\treturn getCurrentEditedPost( state ).type;\n}\n\n/**\n * Returns the ID of the currently edited template or template part.\n *\n * @param {Object} state Global application state.\n *\n * @return {string?} Post ID.\n */\nexport function getEditedPostId( state ) {\n\treturn getCurrentEditedPost( state ).id;\n}\n\n/**\n * Returns the previous edited post type (wp_template or wp_template_part).\n *\n * @param {Object} state Global application state.\n *\n * @return {TemplateType?} Template type.\n */\nexport function getPreviousEditedPostType( state ) {\n\treturn getPreviousEditedPost( state ).type;\n}\n\n/**\n * Returns the ID of the previous edited template or template part.\n *\n * @param {Object} state Global application state.\n *\n * @return {string?} Post ID.\n */\nexport function getPreviousEditedPostId( state ) {\n\treturn getPreviousEditedPost( state ).id;\n}\n\n/**\n * Returns the current page object.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Page.\n */\nexport function getPage( state ) {\n\treturn getCurrentEditedPost( state ).page;\n}\n\n/**\n * Returns the active menu in the navigation panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Active menu.\n */\nexport function getNavigationPanelActiveMenu( state ) {\n\treturn state.navigationPanel.menu;\n}\n\n/**\n * Returns the current template or template part's corresponding\n * navigation panel's sub menu, to be used with `openNavigationPanelToMenu`.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} The current template or template part's sub menu.\n */\nexport const getCurrentTemplateNavigationPanelSubMenu = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst templateType = getEditedPostType( state );\n\t\tconst templateId = getEditedPostId( state );\n\t\tconst template = templateId\n\t\t\t? select( coreDataStore ).getEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\ttemplateType,\n\t\t\t\t\ttemplateId\n\t\t\t )\n\t\t\t: null;\n\n\t\tif ( ! template ) {\n\t\t\treturn MENU_ROOT;\n\t\t}\n\n\t\tif ( 'wp_template_part' === templateType ) {\n\t\t\treturn (\n\t\t\t\tTEMPLATE_PARTS_SUB_MENUS.find(\n\t\t\t\t\t( submenu ) => submenu.area === template?.area\n\t\t\t\t)?.menu || MENU_TEMPLATE_PARTS\n\t\t\t);\n\t\t}\n\n\t\tconst templates = select( coreDataStore ).getEntityRecords(\n\t\t\t'postType',\n\t\t\t'wp_template'\n\t\t);\n\t\tconst showOnFront = select( coreDataStore ).getEditedEntityRecord(\n\t\t\t'root',\n\t\t\t'site'\n\t\t).show_on_front;\n\n\t\tif (\n\t\t\tisTemplateSuperseded(\n\t\t\t\ttemplate.slug,\n\t\t\t\tmap( templates, 'slug' ),\n\t\t\t\tshowOnFront\n\t\t\t)\n\t\t) {\n\t\t\treturn MENU_TEMPLATES_UNUSED;\n\t\t}\n\n\t\treturn getTemplateLocation( template.slug );\n\t}\n);\n\n/**\n * Returns the current opened/closed state of the navigation panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the navigation panel should be open; false if closed.\n */\nexport function isNavigationOpened( state ) {\n\treturn state.navigationPanel.isOpen;\n}\n\n/**\n * Returns the current opened/closed state of the inserter panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the inserter panel should be open; false if closed.\n */\nexport function isInserterOpened( state ) {\n\treturn !! state.blockInserterPanel;\n}\n\n/**\n * Get the insertion point for the inserter.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport function __experimentalGetInsertionPoint( state ) {\n\tconst {\n\t\trootClientId,\n\t\tinsertionIndex,\n\t\tfilterValue,\n\t} = state.blockInserterPanel;\n\treturn { rootClientId, insertionIndex, filterValue };\n}\n\n/**\n * Returns the current opened/closed state of the list view panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the list view panel should be open; false if closed.\n */\nexport function isListViewOpened( state ) {\n\treturn state.listViewPanel;\n}\n\n/**\n * Returns the template parts and their blocks for the current edited template.\n *\n * @param {Object} state Global application state.\n * @return {Array} Template parts and their blocks in an array.\n */\nexport const getCurrentTemplateTemplateParts = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst templateType = getEditedPostType( state );\n\t\tconst templateId = getEditedPostId( state );\n\t\tconst template = select( coreDataStore ).getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\ttemplateType,\n\t\t\ttemplateId\n\t\t);\n\n\t\tconst templateParts = select( coreDataStore ).getEntityRecords(\n\t\t\t'postType',\n\t\t\t'wp_template_part'\n\t\t);\n\t\tconst templatePartsById = keyBy(\n\t\t\ttemplateParts,\n\t\t\t( templatePart ) => templatePart.id\n\t\t);\n\n\t\treturn ( template.blocks ?? [] )\n\t\t\t.filter( ( block ) => isTemplatePart( block ) )\n\t\t\t.map( ( block ) => {\n\t\t\t\tconst {\n\t\t\t\t\tattributes: { theme, slug },\n\t\t\t\t} = block;\n\t\t\t\tconst templatePartId = `${ theme }//${ slug }`;\n\t\t\t\tconst templatePart = templatePartsById[ templatePartId ];\n\n\t\t\t\treturn {\n\t\t\t\t\ttemplatePart,\n\t\t\t\t\tblock,\n\t\t\t\t};\n\t\t\t} )\n\t\t\t.filter( ( { templatePart } ) => !! templatePart );\n\t}\n);\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if a template is removable.
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} template The template entity to check.
|
|
5
|
+
* @return {boolean} Whether the template is revertable.
|
|
6
|
+
*/
|
|
7
|
+
export default function isTemplateRemovable(template) {
|
|
8
|
+
if (!template) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return template.source === 'custom' && !template.has_theme_file;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=is-template-removable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/utils/is-template-removable.js"],"names":["isTemplateRemovable","template","source","has_theme_file"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,mBAAT,CAA8BC,QAA9B,EAAyC;AACvD,MAAK,CAAEA,QAAP,EAAkB;AACjB,WAAO,KAAP;AACA;;AAED,SAAOA,QAAQ,CAACC,MAAT,KAAoB,QAApB,IAAgC,CAAED,QAAQ,CAACE,cAAlD;AACA","sourcesContent":["/**\n * Check if a template is removable.\n *\n * @param {Object} template The template entity to check.\n * @return {boolean} Whether the template is revertable.\n */\nexport default function isTemplateRemovable( template ) {\n\tif ( ! template ) {\n\t\treturn false;\n\t}\n\n\treturn template.source === 'custom' && ! template.has_theme_file;\n}\n"]}
|
|
@@ -815,20 +815,18 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
|
|
|
815
815
|
z-index: 99998;
|
|
816
816
|
}
|
|
817
817
|
|
|
818
|
-
.edit-site-navigation-
|
|
818
|
+
.edit-site-navigation-toggle {
|
|
819
819
|
align-items: center;
|
|
820
820
|
background: #1e1e1e;
|
|
821
821
|
border-radius: 0;
|
|
822
822
|
display: flex;
|
|
823
823
|
position: absolute;
|
|
824
|
-
top: 0;
|
|
825
|
-
right: 0;
|
|
826
824
|
z-index: 31;
|
|
827
825
|
height: 60px;
|
|
828
826
|
width: 60px;
|
|
829
827
|
}
|
|
830
828
|
|
|
831
|
-
.edit-site-navigation-
|
|
829
|
+
.edit-site-navigation-toggle__button {
|
|
832
830
|
align-items: center;
|
|
833
831
|
background: #1e1e1e;
|
|
834
832
|
border-radius: 0;
|
|
@@ -838,16 +836,16 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
|
|
|
838
836
|
z-index: 1;
|
|
839
837
|
margin-bottom: -1px;
|
|
840
838
|
}
|
|
841
|
-
.edit-site-navigation-
|
|
839
|
+
.edit-site-navigation-toggle__button.has-icon {
|
|
842
840
|
min-width: 60px;
|
|
843
841
|
}
|
|
844
|
-
.edit-site-navigation-
|
|
842
|
+
.edit-site-navigation-toggle__button.has-icon:hover, .edit-site-navigation-toggle__button.has-icon:active {
|
|
845
843
|
color: #fff;
|
|
846
844
|
}
|
|
847
|
-
.edit-site-navigation-
|
|
845
|
+
.edit-site-navigation-toggle__button.has-icon:focus {
|
|
848
846
|
box-shadow: none;
|
|
849
847
|
}
|
|
850
|
-
.edit-site-navigation-
|
|
848
|
+
.edit-site-navigation-toggle__button.has-icon::before {
|
|
851
849
|
transition: box-shadow 0.1s ease;
|
|
852
850
|
content: "";
|
|
853
851
|
display: block;
|
|
@@ -860,23 +858,301 @@ body.is-navigation-sidebar-open .edit-site-header .edit-site-header_end .compone
|
|
|
860
858
|
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) #1e1e1e;
|
|
861
859
|
}
|
|
862
860
|
@media (prefers-reduced-motion: reduce) {
|
|
863
|
-
.edit-site-navigation-
|
|
861
|
+
.edit-site-navigation-toggle__button.has-icon::before {
|
|
864
862
|
transition-duration: 0s;
|
|
865
863
|
transition-delay: 0s;
|
|
866
864
|
}
|
|
867
865
|
}
|
|
868
|
-
.edit-site-navigation-
|
|
866
|
+
.edit-site-navigation-toggle__button.has-icon:hover::before {
|
|
869
867
|
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) #757575;
|
|
870
868
|
}
|
|
871
|
-
.edit-site-navigation-
|
|
869
|
+
.edit-site-navigation-toggle__button.has-icon:focus::before {
|
|
872
870
|
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) rgba(255, 255, 255, 0.1), inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
873
871
|
}
|
|
874
872
|
|
|
875
|
-
.edit-site-navigation-
|
|
873
|
+
.edit-site-navigation-toggle__site-icon {
|
|
876
874
|
width: 36px;
|
|
877
875
|
border-radius: 2px;
|
|
878
876
|
}
|
|
879
877
|
|
|
878
|
+
.edit-site-navigation-panel {
|
|
879
|
+
height: 100%;
|
|
880
|
+
position: relative;
|
|
881
|
+
width: 0;
|
|
882
|
+
overflow: hidden;
|
|
883
|
+
background: #1e1e1e;
|
|
884
|
+
color: #fff;
|
|
885
|
+
transition: width 100ms linear;
|
|
886
|
+
}
|
|
887
|
+
@media (prefers-reduced-motion: reduce) {
|
|
888
|
+
.edit-site-navigation-panel {
|
|
889
|
+
transition-duration: 0s;
|
|
890
|
+
transition-delay: 0s;
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
@media (min-width: 782px) {
|
|
894
|
+
.interface-interface-skeleton.has-footer .edit-site-navigation-panel {
|
|
895
|
+
height: calc(100% - 25px);
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
.edit-site-navigation-panel__inner {
|
|
900
|
+
position: relative;
|
|
901
|
+
width: 300px;
|
|
902
|
+
height: 100%;
|
|
903
|
+
overflow: hidden;
|
|
904
|
+
visibility: hidden;
|
|
905
|
+
transition: visibility 100ms linear;
|
|
906
|
+
}
|
|
907
|
+
@media (prefers-reduced-motion: reduce) {
|
|
908
|
+
.edit-site-navigation-panel__inner {
|
|
909
|
+
transition-duration: 0s;
|
|
910
|
+
transition-delay: 0s;
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
.edit-site-navigation-panel.is-open {
|
|
915
|
+
width: 300px;
|
|
916
|
+
}
|
|
917
|
+
.edit-site-navigation-panel.is-open .edit-site-navigation-panel__inner {
|
|
918
|
+
visibility: visible;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
.edit-site-navigation-panel__site-title-container {
|
|
922
|
+
height: 60px;
|
|
923
|
+
padding-right: 60px;
|
|
924
|
+
margin: 0 8px 0 16px;
|
|
925
|
+
display: flex;
|
|
926
|
+
align-items: center;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
.edit-site-navigation-panel__site-title {
|
|
930
|
+
font-style: normal;
|
|
931
|
+
font-weight: 600;
|
|
932
|
+
font-size: 14px;
|
|
933
|
+
/* Matches menu items */
|
|
934
|
+
line-height: 20px;
|
|
935
|
+
color: #ddd;
|
|
936
|
+
display: -webkit-box;
|
|
937
|
+
-webkit-line-clamp: 2;
|
|
938
|
+
-webkit-box-orient: vertical;
|
|
939
|
+
overflow: hidden;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
.edit-site-navigation-panel__scroll-container {
|
|
943
|
+
overflow-x: hidden;
|
|
944
|
+
overflow-y: auto;
|
|
945
|
+
height: calc(100% - 60px);
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
.edit-site-navigation-panel__back-to-dashboard.components-button.is-tertiary {
|
|
949
|
+
height: 36px;
|
|
950
|
+
margin-top: 24px;
|
|
951
|
+
padding: 8px 8px 8px 16px;
|
|
952
|
+
}
|
|
953
|
+
.edit-site-navigation-panel__back-to-dashboard.components-button.is-tertiary:focus:not(:disabled) {
|
|
954
|
+
border-bottom-color: transparent;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
.edit-site-navigation-panel__preview {
|
|
958
|
+
display: none;
|
|
959
|
+
border: 1px solid #ccc;
|
|
960
|
+
width: 300px;
|
|
961
|
+
padding: 16px;
|
|
962
|
+
background: #fff;
|
|
963
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
|
|
964
|
+
border-radius: 2px;
|
|
965
|
+
position: absolute;
|
|
966
|
+
top: 73px;
|
|
967
|
+
right: 312px;
|
|
968
|
+
color: #1e1e1e;
|
|
969
|
+
z-index: 32;
|
|
970
|
+
}
|
|
971
|
+
@media (min-width: 782px) {
|
|
972
|
+
.edit-site-navigation-panel__preview {
|
|
973
|
+
display: block;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
.edit-site-navigation-panel__template-item {
|
|
978
|
+
display: block;
|
|
979
|
+
}
|
|
980
|
+
.edit-site-navigation-panel__template-item .components-button {
|
|
981
|
+
display: flex;
|
|
982
|
+
flex-direction: column;
|
|
983
|
+
align-items: flex-start;
|
|
984
|
+
justify-content: center;
|
|
985
|
+
height: auto;
|
|
986
|
+
min-height: 36px;
|
|
987
|
+
text-align: right;
|
|
988
|
+
padding-right: 16px;
|
|
989
|
+
padding-left: 16px;
|
|
990
|
+
color: inherit;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
.edit-site-navigation-panel__template-item-title {
|
|
994
|
+
font-size: 14px;
|
|
995
|
+
line-height: 20px;
|
|
996
|
+
}
|
|
997
|
+
.edit-site-navigation-panel__template-item-title em {
|
|
998
|
+
margin-left: 1ch;
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
.edit-site-navigation-panel__template-parts .components-navigation__menu-title-heading {
|
|
1002
|
+
text-transform: capitalize;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
.edit-site-navigation-panel__template-part-item .components-navigation__item-title {
|
|
1006
|
+
text-transform: capitalize;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
.components-navigation__item + .edit-site-navigation-panel__template-item {
|
|
1010
|
+
margin-top: 16px;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
.edit-site-navigation-panel__template-item + .edit-site-navigation-panel__template-item {
|
|
1014
|
+
margin-top: 8px;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
.edit-site-navigation-panel__info-wrapper {
|
|
1018
|
+
padding: 4px 0;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
.edit-site-navigation-panel__template-item-description {
|
|
1022
|
+
padding-top: 8px;
|
|
1023
|
+
font-size: 12px;
|
|
1024
|
+
line-height: 16px;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
.edit-site-navigation-panel__new-template-dropdown {
|
|
1028
|
+
margin: 0 12px 0 0;
|
|
1029
|
+
}
|
|
1030
|
+
.edit-site-navigation-panel__new-template-dropdown button {
|
|
1031
|
+
margin: 0;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
@media (min-width: 600px) {
|
|
1035
|
+
.edit-site-navigation-panel__new-template-popover {
|
|
1036
|
+
min-width: 300px;
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
.edit-site-list-header {
|
|
1041
|
+
position: relative;
|
|
1042
|
+
align-items: center;
|
|
1043
|
+
background-color: #fff;
|
|
1044
|
+
display: flex;
|
|
1045
|
+
height: 60px;
|
|
1046
|
+
box-sizing: border-box;
|
|
1047
|
+
width: 100%;
|
|
1048
|
+
justify-content: flex-end;
|
|
1049
|
+
padding-left: 16px;
|
|
1050
|
+
}
|
|
1051
|
+
body.is-fullscreen-mode .edit-site-list-header {
|
|
1052
|
+
padding-right: 60px;
|
|
1053
|
+
transition: padding-right 20ms linear;
|
|
1054
|
+
transition-delay: 80ms;
|
|
1055
|
+
}
|
|
1056
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1057
|
+
body.is-fullscreen-mode .edit-site-list-header {
|
|
1058
|
+
transition-duration: 0s;
|
|
1059
|
+
transition-delay: 0s;
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
.edit-site-list-header .edit-site-list-header__title {
|
|
1063
|
+
position: absolute;
|
|
1064
|
+
right: 0;
|
|
1065
|
+
width: 100%;
|
|
1066
|
+
text-align: center;
|
|
1067
|
+
font-size: 20px;
|
|
1068
|
+
padding: 0;
|
|
1069
|
+
margin: 0;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
.edit-site-list-header__right {
|
|
1073
|
+
position: relative;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
.edit-site .edit-site-list .interface-interface-skeleton__editor {
|
|
1077
|
+
min-width: 100%;
|
|
1078
|
+
}
|
|
1079
|
+
@media (min-width: 782px) {
|
|
1080
|
+
.edit-site .edit-site-list .interface-interface-skeleton__editor {
|
|
1081
|
+
min-width: 0;
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
.edit-site .edit-site-list .interface-interface-skeleton__content {
|
|
1085
|
+
background: #fff;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
.edit-site-list-main {
|
|
1089
|
+
display: flex;
|
|
1090
|
+
align-items: center;
|
|
1091
|
+
justify-content: center;
|
|
1092
|
+
padding: 16px;
|
|
1093
|
+
}
|
|
1094
|
+
@media (min-width: 782px) {
|
|
1095
|
+
.edit-site-list-main {
|
|
1096
|
+
padding: 72px;
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
.edit-site-list-table {
|
|
1101
|
+
width: 100%;
|
|
1102
|
+
border: 1px solid #e0e0e0;
|
|
1103
|
+
border-radius: 2px;
|
|
1104
|
+
margin: 0;
|
|
1105
|
+
overflow: hidden;
|
|
1106
|
+
}
|
|
1107
|
+
.edit-site-list-table li {
|
|
1108
|
+
display: flex;
|
|
1109
|
+
align-items: center;
|
|
1110
|
+
padding: 16px;
|
|
1111
|
+
box-sizing: border-box;
|
|
1112
|
+
border-top: 1px solid #f0f0f0;
|
|
1113
|
+
margin: 0;
|
|
1114
|
+
}
|
|
1115
|
+
@media (min-width: 782px) {
|
|
1116
|
+
.edit-site-list-table li {
|
|
1117
|
+
padding: 24px 32px;
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
.edit-site-list-table li .edit-site-list-table-column:nth-child(1) {
|
|
1121
|
+
width: calc(60% - 36px);
|
|
1122
|
+
}
|
|
1123
|
+
.edit-site-list-table li .edit-site-list-table-column:nth-child(1) a {
|
|
1124
|
+
display: block;
|
|
1125
|
+
text-decoration: none;
|
|
1126
|
+
font-weight: 500;
|
|
1127
|
+
margin-bottom: 4px;
|
|
1128
|
+
}
|
|
1129
|
+
.edit-site-list-table li .edit-site-list-table-column:nth-child(2) {
|
|
1130
|
+
width: calc(40% - 36px);
|
|
1131
|
+
}
|
|
1132
|
+
.edit-site-list-table li .edit-site-list-table-column:nth-child(3) {
|
|
1133
|
+
min-width: 36px;
|
|
1134
|
+
}
|
|
1135
|
+
.edit-site-list-table li.edit-site-list-table-head {
|
|
1136
|
+
border-bottom: 1px solid #e0e0e0;
|
|
1137
|
+
font-size: 16px;
|
|
1138
|
+
font-weight: 500;
|
|
1139
|
+
text-align: right;
|
|
1140
|
+
color: #000;
|
|
1141
|
+
border-top: none;
|
|
1142
|
+
}
|
|
1143
|
+
.edit-site-list-table li.edit-site-list-table-head + li {
|
|
1144
|
+
border-top: 0;
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
.edit-site-new-template-dropdown .components-dropdown-menu__toggle {
|
|
1148
|
+
padding: 6px 12px;
|
|
1149
|
+
}
|
|
1150
|
+
@media (min-width: 600px) {
|
|
1151
|
+
.edit-site-new-template-dropdown .edit-site-new-template-dropdown__popover {
|
|
1152
|
+
min-width: 300px;
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
|
|
880
1156
|
.edit-site-sidebar {
|
|
881
1157
|
width: 280px;
|
|
882
1158
|
}
|
|
@@ -1072,6 +1348,14 @@ h3.edit-site-template-card__template-areas-title {
|
|
|
1072
1348
|
padding: 0;
|
|
1073
1349
|
}
|
|
1074
1350
|
|
|
1351
|
+
html #wpadminbar {
|
|
1352
|
+
display: none;
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
html.wp-toolbar {
|
|
1356
|
+
padding-top: 0;
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1075
1359
|
.edit-site-editor__toggle-save-panel {
|
|
1076
1360
|
z-index: 100000;
|
|
1077
1361
|
position: fixed !important;
|
|
@@ -1208,67 +1492,67 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
1208
1492
|
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 0 0 3px #fff;
|
|
1209
1493
|
}
|
|
1210
1494
|
|
|
1211
|
-
.edit-site-template-part-
|
|
1495
|
+
.edit-site-create-template-part-modal {
|
|
1212
1496
|
z-index: 1000001;
|
|
1213
1497
|
}
|
|
1214
1498
|
@media (min-width: 600px) {
|
|
1215
|
-
.edit-site-template-part-
|
|
1499
|
+
.edit-site-create-template-part-modal .components-modal__frame {
|
|
1216
1500
|
max-width: 500px;
|
|
1217
1501
|
}
|
|
1218
1502
|
}
|
|
1219
1503
|
|
|
1220
|
-
.edit-site-template-part-
|
|
1504
|
+
.edit-site-create-template-part-modal__modal-actions {
|
|
1221
1505
|
padding-top: 12px;
|
|
1222
1506
|
}
|
|
1223
1507
|
|
|
1224
|
-
.edit-site-template-part-
|
|
1508
|
+
.edit-site-create-template-part-modal__area-base-control .components-base-control__label {
|
|
1225
1509
|
margin: 16px 0 8px;
|
|
1226
1510
|
cursor: auto;
|
|
1227
1511
|
}
|
|
1228
1512
|
|
|
1229
|
-
.edit-site-template-part-
|
|
1513
|
+
.edit-site-create-template-part-modal__area-radio-group {
|
|
1230
1514
|
width: 100%;
|
|
1231
1515
|
border: 1px solid #757575;
|
|
1232
1516
|
border-radius: 2px;
|
|
1233
1517
|
}
|
|
1234
|
-
.edit-site-template-part-
|
|
1518
|
+
.edit-site-create-template-part-modal__area-radio-group .components-button.edit-site-create-template-part-modal__area-radio {
|
|
1235
1519
|
display: block;
|
|
1236
1520
|
width: 100%;
|
|
1237
1521
|
height: 100%;
|
|
1238
1522
|
text-align: right;
|
|
1239
1523
|
padding: 12px;
|
|
1240
1524
|
}
|
|
1241
|
-
.edit-site-template-part-
|
|
1525
|
+
.edit-site-create-template-part-modal__area-radio-group .components-button.edit-site-create-template-part-modal__area-radio, .edit-site-create-template-part-modal__area-radio-group .components-button.edit-site-create-template-part-modal__area-radio.is-secondary:hover, .edit-site-create-template-part-modal__area-radio-group .components-button.edit-site-create-template-part-modal__area-radio.is-primary:hover {
|
|
1242
1526
|
margin: 0;
|
|
1243
1527
|
background-color: inherit;
|
|
1244
1528
|
border-bottom: 1px solid #757575;
|
|
1245
1529
|
border-radius: 0;
|
|
1246
1530
|
}
|
|
1247
|
-
.edit-site-template-part-
|
|
1531
|
+
.edit-site-create-template-part-modal__area-radio-group .components-button.edit-site-create-template-part-modal__area-radio:not(:focus), .edit-site-create-template-part-modal__area-radio-group .components-button.edit-site-create-template-part-modal__area-radio.is-secondary:hover:not(:focus), .edit-site-create-template-part-modal__area-radio-group .components-button.edit-site-create-template-part-modal__area-radio.is-primary:hover:not(:focus) {
|
|
1248
1532
|
box-shadow: none;
|
|
1249
1533
|
}
|
|
1250
|
-
.edit-site-template-part-
|
|
1534
|
+
.edit-site-create-template-part-modal__area-radio-group .components-button.edit-site-create-template-part-modal__area-radio:focus, .edit-site-create-template-part-modal__area-radio-group .components-button.edit-site-create-template-part-modal__area-radio.is-secondary:hover:focus, .edit-site-create-template-part-modal__area-radio-group .components-button.edit-site-create-template-part-modal__area-radio.is-primary:hover:focus {
|
|
1251
1535
|
border-bottom: 1px solid #fff;
|
|
1252
1536
|
}
|
|
1253
|
-
.edit-site-template-part-
|
|
1537
|
+
.edit-site-create-template-part-modal__area-radio-group .components-button.edit-site-create-template-part-modal__area-radio:last-of-type, .edit-site-create-template-part-modal__area-radio-group .components-button.edit-site-create-template-part-modal__area-radio.is-secondary:hover:last-of-type, .edit-site-create-template-part-modal__area-radio-group .components-button.edit-site-create-template-part-modal__area-radio.is-primary:hover:last-of-type {
|
|
1254
1538
|
border-bottom: none;
|
|
1255
1539
|
}
|
|
1256
|
-
.edit-site-template-part-
|
|
1540
|
+
.edit-site-create-template-part-modal__area-radio-group .components-button.edit-site-create-template-part-modal__area-radio:not(:hover), .edit-site-create-template-part-modal__area-radio-group .components-button.edit-site-create-template-part-modal__area-radio[aria-checked=true] {
|
|
1257
1541
|
color: #1e1e1e;
|
|
1258
1542
|
cursor: auto;
|
|
1259
1543
|
}
|
|
1260
|
-
.edit-site-template-part-
|
|
1544
|
+
.edit-site-create-template-part-modal__area-radio-group .components-button.edit-site-create-template-part-modal__area-radio:not(:hover) .edit-site-create-template-part-modal__option-label div, .edit-site-create-template-part-modal__area-radio-group .components-button.edit-site-create-template-part-modal__area-radio[aria-checked=true] .edit-site-create-template-part-modal__option-label div {
|
|
1261
1545
|
color: #949494;
|
|
1262
1546
|
}
|
|
1263
|
-
.edit-site-template-part-
|
|
1547
|
+
.edit-site-create-template-part-modal__area-radio-group .components-button.edit-site-create-template-part-modal__area-radio .edit-site-create-template-part-modal__option-label {
|
|
1264
1548
|
padding-top: 4px;
|
|
1265
1549
|
white-space: normal;
|
|
1266
1550
|
}
|
|
1267
|
-
.edit-site-template-part-
|
|
1551
|
+
.edit-site-create-template-part-modal__area-radio-group .components-button.edit-site-create-template-part-modal__area-radio .edit-site-create-template-part-modal__option-label div {
|
|
1268
1552
|
padding-top: 4px;
|
|
1269
1553
|
font-size: 12px;
|
|
1270
1554
|
}
|
|
1271
|
-
.edit-site-template-part-
|
|
1555
|
+
.edit-site-create-template-part-modal__area-radio-group .components-button.edit-site-create-template-part-modal__area-radio .edit-site-create-template-part-modal__checkbox {
|
|
1272
1556
|
margin-right: auto;
|
|
1273
1557
|
min-width: 24px;
|
|
1274
1558
|
}
|
|
@@ -1322,6 +1606,40 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
|
|
|
1322
1606
|
padding: 8px;
|
|
1323
1607
|
}
|
|
1324
1608
|
|
|
1609
|
+
.edit-site-welcome-guide {
|
|
1610
|
+
width: 312px;
|
|
1611
|
+
}
|
|
1612
|
+
.edit-site-welcome-guide__image {
|
|
1613
|
+
background: #00a0d2;
|
|
1614
|
+
margin: 0 0 16px;
|
|
1615
|
+
}
|
|
1616
|
+
.edit-site-welcome-guide__image > img {
|
|
1617
|
+
display: block;
|
|
1618
|
+
max-width: 100%;
|
|
1619
|
+
-o-object-fit: cover;
|
|
1620
|
+
object-fit: cover;
|
|
1621
|
+
}
|
|
1622
|
+
.edit-site-welcome-guide__heading {
|
|
1623
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
1624
|
+
font-size: 24px;
|
|
1625
|
+
line-height: 1.4;
|
|
1626
|
+
margin: 16px 0 16px 0;
|
|
1627
|
+
padding: 0 32px;
|
|
1628
|
+
}
|
|
1629
|
+
.edit-site-welcome-guide__text {
|
|
1630
|
+
font-size: 13px;
|
|
1631
|
+
line-height: 1.4;
|
|
1632
|
+
margin: 0 0 16px 0;
|
|
1633
|
+
padding: 0 32px;
|
|
1634
|
+
}
|
|
1635
|
+
.edit-site-welcome-guide__text img {
|
|
1636
|
+
vertical-align: bottom;
|
|
1637
|
+
}
|
|
1638
|
+
.edit-site-welcome-guide__inserter-icon {
|
|
1639
|
+
margin: 0 4px;
|
|
1640
|
+
vertical-align: text-top;
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1325
1643
|
html.wp-toolbar {
|
|
1326
1644
|
background: #fff;
|
|
1327
1645
|
}
|
|
@@ -1382,16 +1700,14 @@ body.site-editor-php .media-frame select.attachment-filters:last-of-type {
|
|
|
1382
1700
|
.edit-site {
|
|
1383
1701
|
bottom: 0;
|
|
1384
1702
|
right: 0;
|
|
1385
|
-
min-height:
|
|
1703
|
+
min-height: 100vh;
|
|
1386
1704
|
position: absolute;
|
|
1387
1705
|
left: 0;
|
|
1388
1706
|
top: 0;
|
|
1389
1707
|
}
|
|
1390
1708
|
}
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
min-height: calc(100vh - 32px);
|
|
1394
|
-
}
|
|
1709
|
+
.edit-site .interface-interface-skeleton {
|
|
1710
|
+
top: 0;
|
|
1395
1711
|
}
|
|
1396
1712
|
.edit-site .interface-complementary-area__pin-unpin-item.components-button {
|
|
1397
1713
|
display: none;
|