@wordpress/edit-site 5.33.0 → 5.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -3
- package/build/components/add-new-page/index.js +3 -0
- package/build/components/add-new-page/index.js.map +1 -1
- package/build/components/add-new-pattern/index.js +8 -7
- package/build/components/add-new-pattern/index.js.map +1 -1
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js +3 -0
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
- package/build/components/add-new-template/add-custom-template-modal-content.js +3 -1
- package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build/components/add-new-template/index.js +2 -2
- package/build/components/add-new-template/index.js.map +1 -1
- package/build/components/app/index.js +4 -2
- package/build/components/app/index.js.map +1 -1
- package/build/components/block-editor/editor-canvas.js +4 -18
- package/build/components/block-editor/editor-canvas.js.map +1 -1
- package/build/components/block-editor/resize-handle.js +20 -5
- package/build/components/block-editor/resize-handle.js.map +1 -1
- package/build/components/block-editor/site-editor-canvas.js +2 -2
- package/build/components/block-editor/site-editor-canvas.js.map +1 -1
- package/build/components/create-template-part-modal/index.js +3 -0
- package/build/components/create-template-part-modal/index.js.map +1 -1
- package/build/components/dataviews-actions/index.js +46 -0
- package/build/components/dataviews-actions/index.js.map +1 -0
- package/build/components/editor/index.js +95 -16
- package/build/components/editor/index.js.map +1 -1
- package/build/components/global-styles/background-panel.js +13 -1
- package/build/components/global-styles/background-panel.js.map +1 -1
- package/build/components/global-styles/color-indicator-wrapper.js +2 -2
- package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
- package/build/components/global-styles/color-palette-panel.js +5 -2
- package/build/components/global-styles/color-palette-panel.js.map +1 -1
- package/build/components/global-styles/font-library-modal/context.js +9 -3
- package/build/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-collection.js +7 -2
- package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build/components/global-styles/font-library-modal/installed-fonts.js +22 -20
- package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js +6 -2
- package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
- package/build/components/global-styles/gradients-palette-panel.js +1 -2
- package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build/components/global-styles/hooks.js +5 -2
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/icon-with-current-color.js +2 -2
- package/build/components/global-styles/icon-with-current-color.js.map +1 -1
- package/build/components/global-styles/preset-colors.js +29 -0
- package/build/components/global-styles/preset-colors.js.map +1 -0
- package/build/components/global-styles/preview-colors.js +3 -7
- package/build/components/global-styles/preview-colors.js.map +1 -1
- package/build/components/global-styles/screen-color-palette.js +5 -5
- package/build/components/global-styles/screen-color-palette.js.map +1 -1
- package/build/components/global-styles/screen-colors.js +1 -4
- package/build/components/global-styles/screen-colors.js.map +1 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js +2 -2
- package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build/components/global-styles/style-variations-container.js +8 -2
- package/build/components/global-styles/style-variations-container.js.map +1 -1
- package/build/components/global-styles/typography-example.js +5 -2
- package/build/components/global-styles/typography-example.js.map +1 -1
- package/build/components/global-styles/ui.js +4 -1
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles/variations/variation.js +12 -6
- package/build/components/global-styles/variations/variation.js.map +1 -1
- package/build/components/global-styles/variations/variations-color.js +5 -5
- package/build/components/global-styles/variations/variations-color.js.map +1 -1
- package/build/components/global-styles-sidebar/default-sidebar.js.map +1 -0
- package/build/components/{sidebar-edit-mode/global-styles-sidebar.js → global-styles-sidebar/index.js} +8 -5
- package/build/components/global-styles-sidebar/index.js.map +1 -0
- package/build/components/header-edit-mode/index.js +21 -137
- package/build/components/header-edit-mode/index.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/index.js +3 -97
- package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/register.js +0 -49
- package/build/components/keyboard-shortcuts/register.js.map +1 -1
- package/build/components/layout/index.js +9 -9
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/router.js +70 -44
- package/build/components/layout/router.js.map +1 -1
- package/build/components/page/index.js +2 -2
- package/build/components/page/index.js.map +1 -1
- package/build/components/page-pages/index.js +4 -14
- package/build/components/page-pages/index.js.map +1 -1
- package/build/components/page-patterns/dataviews-pattern-actions.js +15 -87
- package/build/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
- package/build/components/page-patterns/header.js +3 -1
- package/build/components/page-patterns/header.js.map +1 -1
- package/build/components/page-patterns/index.js +28 -68
- package/build/components/page-patterns/index.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +1 -0
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/page-templates/hooks.js.map +1 -0
- package/build/components/{page-templates-template-parts → page-templates}/index.js +73 -94
- package/build/components/page-templates/index.js.map +1 -0
- package/build/components/pagination/index.js +2 -2
- package/build/components/pagination/index.js.map +1 -1
- package/build/components/pattern-modal/duplicate.js +7 -5
- package/build/components/pattern-modal/duplicate.js.map +1 -1
- package/build/components/plugin-template-setting-panel/index.js +9 -0
- package/build/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build/components/resizable-frame/index.js +20 -9
- package/build/components/resizable-frame/index.js.map +1 -1
- package/build/components/revisions/index.js +5 -2
- package/build/components/revisions/index.js.map +1 -1
- package/build/components/save-panel/index.js +4 -4
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/sidebar/index.js +61 -31
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-button/index.js +2 -2
- package/build/components/sidebar-button/index.js.map +1 -1
- package/build/components/sidebar-dataviews/dataview-item.js +2 -2
- package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build/components/sidebar-navigation-item/index.js +5 -3
- package/build/components/sidebar-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +6 -32
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +2 -2
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.js +4 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js +10 -3
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +16 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +3 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js +16 -6
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +2 -9
- package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/index.js +39 -8
- package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/status-label.js +2 -2
- package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/index.js +3 -15
- package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +3 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/category-item.js +3 -2
- package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/index.js +25 -29
- package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-template/index.js +5 -2
- package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/content.js +3 -3
- package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/index.js +6 -33
- package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build/components/site-hub/index.js +3 -3
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/site-icon/index.js +2 -2
- package/build/components/site-icon/index.js.map +1 -1
- package/build/components/style-book/index.js +10 -7
- package/build/components/style-book/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +0 -8
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build/components/template-actions/index.js +1 -1
- package/build/components/template-actions/index.js.map +1 -1
- package/build/components/template-part-converter/index.js +18 -1
- package/build/components/template-part-converter/index.js.map +1 -1
- package/build/deprecated.js +55 -0
- package/build/deprecated.js.map +1 -0
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +40 -6
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build/index.js +18 -18
- package/build/index.js.map +1 -1
- package/build/utils/constants.js +1 -2
- package/build/utils/constants.js.map +1 -1
- package/build/utils/get-is-list-page.js +1 -1
- package/build/utils/get-is-list-page.js.map +1 -1
- package/build/utils/use-activate-theme.js +9 -6
- package/build/utils/use-activate-theme.js.map +1 -1
- package/build-module/components/add-new-page/index.js +3 -0
- package/build-module/components/add-new-page/index.js.map +1 -1
- package/build-module/components/add-new-pattern/index.js +8 -7
- package/build-module/components/add-new-pattern/index.js.map +1 -1
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +3 -0
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
- package/build-module/components/add-new-template/add-custom-template-modal-content.js +3 -1
- package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build-module/components/add-new-template/index.js +2 -2
- package/build-module/components/add-new-template/index.js.map +1 -1
- package/build-module/components/app/index.js +4 -2
- package/build-module/components/app/index.js.map +1 -1
- package/build-module/components/block-editor/editor-canvas.js +4 -18
- package/build-module/components/block-editor/editor-canvas.js.map +1 -1
- package/build-module/components/block-editor/resize-handle.js +21 -6
- package/build-module/components/block-editor/resize-handle.js.map +1 -1
- package/build-module/components/block-editor/site-editor-canvas.js +2 -2
- package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
- package/build-module/components/create-template-part-modal/index.js +3 -0
- package/build-module/components/create-template-part-modal/index.js.map +1 -1
- package/build-module/components/dataviews-actions/index.js +38 -0
- package/build-module/components/dataviews-actions/index.js.map +1 -0
- package/build-module/components/editor/index.js +96 -17
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +12 -1
- package/build-module/components/global-styles/background-panel.js.map +1 -1
- package/build-module/components/global-styles/color-indicator-wrapper.js +2 -2
- package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
- package/build-module/components/global-styles/color-palette-panel.js +4 -2
- package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/context.js +9 -3
- package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/font-collection.js +7 -2
- package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js +22 -20
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js +6 -2
- package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
- package/build-module/components/global-styles/gradients-palette-panel.js +1 -2
- package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +4 -1
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/icon-with-current-color.js +2 -2
- package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
- package/build-module/components/global-styles/preset-colors.js +22 -0
- package/build-module/components/global-styles/preset-colors.js.map +1 -0
- package/build-module/components/global-styles/preview-colors.js +3 -7
- package/build-module/components/global-styles/preview-colors.js.map +1 -1
- package/build-module/components/global-styles/screen-color-palette.js +5 -5
- package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
- package/build-module/components/global-styles/screen-colors.js +1 -4
- package/build-module/components/global-styles/screen-colors.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +2 -2
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build-module/components/global-styles/style-variations-container.js +8 -2
- package/build-module/components/global-styles/style-variations-container.js.map +1 -1
- package/build-module/components/global-styles/typography-example.js +4 -1
- package/build-module/components/global-styles/typography-example.js.map +1 -1
- package/build-module/components/global-styles/ui.js +4 -1
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles/variations/variation.js +11 -5
- package/build-module/components/global-styles/variations/variation.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-color.js +6 -6
- package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
- package/build-module/components/global-styles-sidebar/default-sidebar.js.map +1 -0
- package/build-module/components/{sidebar-edit-mode/global-styles-sidebar.js → global-styles-sidebar/index.js} +8 -5
- package/build-module/components/global-styles-sidebar/index.js.map +1 -0
- package/build-module/components/header-edit-mode/index.js +22 -138
- package/build-module/components/header-edit-mode/index.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/index.js +5 -99
- package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/register.js +0 -49
- package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
- package/build-module/components/layout/index.js +9 -9
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/router.js +70 -45
- package/build-module/components/layout/router.js.map +1 -1
- package/build-module/components/page/index.js +2 -2
- package/build-module/components/page/index.js.map +1 -1
- package/build-module/components/page-pages/index.js +5 -15
- package/build-module/components/page-pages/index.js.map +1 -1
- package/build-module/components/page-patterns/dataviews-pattern-actions.js +15 -87
- package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
- package/build-module/components/page-patterns/header.js +3 -1
- package/build-module/components/page-patterns/header.js.map +1 -1
- package/build-module/components/page-patterns/index.js +31 -71
- package/build-module/components/page-patterns/index.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +1 -0
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/page-templates/hooks.js.map +1 -0
- package/build-module/components/{page-templates-template-parts → page-templates}/index.js +73 -94
- package/build-module/components/page-templates/index.js.map +1 -0
- package/build-module/components/pagination/index.js +2 -2
- package/build-module/components/pagination/index.js.map +1 -1
- package/build-module/components/pattern-modal/duplicate.js +7 -5
- package/build-module/components/pattern-modal/duplicate.js.map +1 -1
- package/build-module/components/plugin-template-setting-panel/index.js +8 -0
- package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build-module/components/resizable-frame/index.js +21 -10
- package/build-module/components/resizable-frame/index.js.map +1 -1
- package/build-module/components/revisions/index.js +4 -1
- package/build-module/components/revisions/index.js.map +1 -1
- package/build-module/components/save-panel/index.js +4 -4
- package/build-module/components/save-panel/index.js.map +1 -1
- package/build-module/components/sidebar/index.js +62 -32
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-button/index.js +2 -2
- package/build-module/components/sidebar-button/index.js.map +1 -1
- package/build-module/components/sidebar-dataviews/dataview-item.js +2 -2
- package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build-module/components/sidebar-navigation-item/index.js +5 -3
- package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +6 -32
- package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +2 -2
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +4 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +10 -3
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +16 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +3 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +16 -6
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +2 -9
- package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/index.js +40 -9
- package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/status-label.js +2 -2
- package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/index.js +3 -15
- package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +3 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +3 -2
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.js +26 -30
- package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-template/index.js +5 -2
- package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +3 -3
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +6 -33
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build-module/components/site-hub/index.js +3 -3
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/site-icon/index.js +2 -2
- package/build-module/components/site-icon/index.js.map +1 -1
- package/build-module/components/style-book/index.js +9 -6
- package/build-module/components/style-book/index.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +0 -8
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build-module/components/template-actions/index.js +1 -1
- package/build-module/components/template-actions/index.js.map +1 -1
- package/build-module/components/template-part-converter/index.js +18 -1
- package/build-module/components/template-part-converter/index.js.map +1 -1
- package/build-module/deprecated.js +45 -0
- package/build-module/deprecated.js.map +1 -0
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +38 -5
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build-module/index.js +2 -4
- package/build-module/index.js.map +1 -1
- package/build-module/utils/constants.js +0 -1
- package/build-module/utils/constants.js.map +1 -1
- package/build-module/utils/get-is-list-page.js +1 -1
- package/build-module/utils/get-is-list-page.js.map +1 -1
- package/build-module/utils/use-activate-theme.js +9 -6
- package/build-module/utils/use-activate-theme.js.map +1 -1
- package/build-style/style-rtl.css +208 -484
- package/build-style/style.css +208 -484
- package/package.json +43 -45
- package/src/components/add-new-page/index.js +7 -1
- package/src/components/add-new-pattern/index.js +15 -12
- package/src/components/add-new-template/add-custom-generic-template-modal-content.js +3 -0
- package/src/components/add-new-template/add-custom-template-modal-content.js +3 -1
- package/src/components/add-new-template/index.js +2 -2
- package/src/components/app/index.js +5 -2
- package/src/components/block-editor/editor-canvas.js +6 -26
- package/src/components/block-editor/resize-handle.js +30 -11
- package/src/components/block-editor/site-editor-canvas.js +2 -2
- package/src/components/block-editor/style.scss +12 -17
- package/src/components/create-template-part-modal/index.js +3 -0
- package/src/components/dataviews-actions/index.js +38 -0
- package/src/components/editor/index.js +117 -18
- package/src/components/editor/style.scss +6 -5
- package/src/components/global-styles/background-panel.js +17 -2
- package/src/components/global-styles/color-indicator-wrapper.js +2 -2
- package/src/components/global-styles/color-palette-panel.js +3 -4
- package/src/components/global-styles/font-library-modal/context.js +9 -3
- package/src/components/global-styles/font-library-modal/font-collection.js +31 -12
- package/src/components/global-styles/font-library-modal/installed-fonts.js +82 -54
- package/src/components/global-styles/font-library-modal/style.scss +17 -0
- package/src/components/global-styles/font-library-modal/utils/sort-font-faces.js +6 -2
- package/src/components/global-styles/gradients-palette-panel.js +1 -4
- package/src/components/global-styles/hooks.js +2 -1
- package/src/components/global-styles/icon-with-current-color.js +2 -2
- package/src/components/global-styles/preset-colors.js +18 -0
- package/src/components/global-styles/preview-colors.js +4 -7
- package/src/components/global-styles/screen-color-palette.js +4 -4
- package/src/components/global-styles/screen-colors.js +0 -2
- package/src/components/global-styles/screen-revisions/revisions-buttons.js +2 -2
- package/src/components/global-styles/stories/index.story.js +2 -1
- package/src/components/global-styles/style-variations-container.js +11 -2
- package/src/components/global-styles/typography-example.js +2 -1
- package/src/components/global-styles/ui.js +5 -1
- package/src/components/global-styles/variations/style.scss +15 -31
- package/src/components/global-styles/variations/variation.js +13 -10
- package/src/components/global-styles/variations/variations-color.js +5 -8
- package/src/components/{sidebar-edit-mode/global-styles-sidebar.js → global-styles-sidebar/index.js} +7 -2
- package/src/components/{sidebar-edit-mode → global-styles-sidebar}/style.scss +0 -11
- package/src/components/header-edit-mode/index.js +25 -184
- package/src/components/header-edit-mode/more-menu/index.js +8 -145
- package/src/components/header-edit-mode/style.scss +1 -271
- package/src/components/keyboard-shortcuts/register.js +0 -58
- package/src/components/layout/index.js +14 -10
- package/src/components/layout/router.js +66 -56
- package/src/components/layout/style.scss +2 -1
- package/src/components/page/index.js +2 -2
- package/src/components/page-pages/index.js +8 -28
- package/src/components/page-patterns/dataviews-pattern-actions.js +11 -101
- package/src/components/page-patterns/header.js +3 -1
- package/src/components/page-patterns/index.js +32 -110
- package/src/components/page-patterns/style.scss +14 -1
- package/src/components/page-patterns/use-patterns.js +1 -0
- package/src/components/{page-templates-template-parts → page-templates}/index.js +33 -75
- package/src/components/{page-templates-template-parts → page-templates}/style.scss +2 -2
- package/src/components/pagination/index.js +2 -2
- package/src/components/pattern-modal/duplicate.js +4 -3
- package/src/components/plugin-template-setting-panel/index.js +8 -0
- package/src/components/resizable-frame/index.js +20 -7
- package/src/components/revisions/index.js +2 -1
- package/src/components/save-panel/index.js +4 -4
- package/src/components/sidebar/index.js +61 -37
- package/src/components/sidebar-button/index.js +2 -5
- package/src/components/sidebar-dataviews/dataview-item.js +4 -7
- package/src/components/sidebar-navigation-item/index.js +3 -3
- package/src/components/sidebar-navigation-screen/index.js +7 -31
- package/src/components/sidebar-navigation-screen/style.scss +11 -9
- package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +2 -2
- package/src/components/sidebar-navigation-screen-global-styles/index.js +2 -1
- package/src/components/sidebar-navigation-screen-navigation-menu/index.js +6 -1
- package/src/components/sidebar-navigation-screen-navigation-menu/more-menu.js +18 -1
- package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +3 -0
- package/src/components/sidebar-navigation-screen-navigation-menus/index.js +8 -4
- package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +0 -10
- package/src/components/sidebar-navigation-screen-page/index.js +48 -9
- package/src/components/sidebar-navigation-screen-page/status-label.js +2 -2
- package/src/components/sidebar-navigation-screen-pattern/index.js +1 -12
- package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +3 -1
- package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
- package/src/components/sidebar-navigation-screen-patterns/category-item.js +2 -1
- package/src/components/sidebar-navigation-screen-patterns/index.js +20 -39
- package/src/components/sidebar-navigation-screen-template/index.js +3 -2
- package/src/components/sidebar-navigation-screen-templates-browse/content.js +3 -3
- package/src/components/sidebar-navigation-screen-templates-browse/index.js +8 -39
- package/src/components/site-hub/index.js +3 -3
- package/src/components/site-icon/index.js +2 -2
- package/src/components/style-book/index.js +7 -6
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +0 -4
- package/src/components/template-actions/index.js +1 -1
- package/src/components/template-part-converter/index.js +16 -3
- package/src/deprecated.js +42 -0
- package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +71 -17
- package/src/index.js +2 -9
- package/src/style.scss +2 -16
- package/src/utils/constants.js +1 -1
- package/src/utils/get-is-list-page.js +1 -3
- package/src/utils/use-activate-theme.js +4 -4
- package/build/components/global-styles/global-styles-provider.js +0 -129
- package/build/components/global-styles/global-styles-provider.js.map +0 -1
- package/build/components/header-edit-mode/document-tools/index.js +0 -68
- package/build/components/header-edit-mode/document-tools/index.js.map +0 -1
- package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js +0 -59
- package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +0 -1
- package/build/components/header-edit-mode/tools-more-menu-group/index.js +0 -23
- package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +0 -1
- package/build/components/keyboard-shortcuts/edit-mode.js +0 -56
- package/build/components/keyboard-shortcuts/edit-mode.js.map +0 -1
- package/build/components/page-templates-template-parts/add-new-template-part.js +0 -65
- package/build/components/page-templates-template-parts/add-new-template-part.js.map +0 -1
- package/build/components/page-templates-template-parts/hooks.js.map +0 -1
- package/build/components/page-templates-template-parts/index.js.map +0 -1
- package/build/components/sidebar-edit-mode/default-sidebar.js.map +0 -1
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +0 -1
- package/build/components/sidebar-edit-mode/index.js +0 -146
- package/build/components/sidebar-edit-mode/index.js.map +0 -1
- package/build/components/sidebar-edit-mode/page-panels/index.js +0 -98
- package/build/components/sidebar-edit-mode/page-panels/index.js.map +0 -1
- package/build/components/sidebar-edit-mode/page-panels/page-content.js +0 -34
- package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +0 -1
- package/build/components/sidebar-edit-mode/page-panels/page-status.js +0 -188
- package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +0 -1
- package/build/components/sidebar-edit-mode/page-panels/page-summary.js +0 -39
- package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +0 -1
- package/build/components/sidebar-edit-mode/settings-header/index.js +0 -42
- package/build/components/sidebar-edit-mode/settings-header/index.js.map +0 -1
- package/build/components/sidebar-edit-mode/template-panel/hooks.js +0 -86
- package/build/components/sidebar-edit-mode/template-panel/hooks.js.map +0 -1
- package/build/components/sidebar-edit-mode/template-panel/index.js +0 -130
- package/build/components/sidebar-edit-mode/template-panel/index.js.map +0 -1
- package/build/components/start-template-options/index.js +0 -191
- package/build/components/start-template-options/index.js.map +0 -1
- package/build/utils/math.js +0 -98
- package/build/utils/math.js.map +0 -1
- package/build-module/components/global-styles/global-styles-provider.js +0 -120
- package/build-module/components/global-styles/global-styles-provider.js.map +0 -1
- package/build-module/components/header-edit-mode/document-tools/index.js +0 -61
- package/build-module/components/header-edit-mode/document-tools/index.js.map +0 -1
- package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js +0 -52
- package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +0 -1
- package/build-module/components/header-edit-mode/tools-more-menu-group/index.js +0 -16
- package/build-module/components/header-edit-mode/tools-more-menu-group/index.js.map +0 -1
- package/build-module/components/keyboard-shortcuts/edit-mode.js +0 -49
- package/build-module/components/keyboard-shortcuts/edit-mode.js.map +0 -1
- package/build-module/components/page-templates-template-parts/add-new-template-part.js +0 -57
- package/build-module/components/page-templates-template-parts/add-new-template-part.js.map +0 -1
- package/build-module/components/page-templates-template-parts/hooks.js.map +0 -1
- package/build-module/components/page-templates-template-parts/index.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/index.js +0 -137
- package/build-module/components/sidebar-edit-mode/index.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/page-panels/index.js +0 -90
- package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +0 -27
- package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-status.js +0 -180
- package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +0 -31
- package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/settings-header/index.js +0 -35
- package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/template-panel/hooks.js +0 -79
- package/build-module/components/sidebar-edit-mode/template-panel/hooks.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/template-panel/index.js +0 -122
- package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +0 -1
- package/build-module/components/start-template-options/index.js +0 -184
- package/build-module/components/start-template-options/index.js.map +0 -1
- package/build-module/utils/math.js +0 -92
- package/build-module/utils/math.js.map +0 -1
- package/src/components/global-styles/global-styles-provider.js +0 -162
- package/src/components/header-edit-mode/document-tools/index.js +0 -68
- package/src/components/header-edit-mode/more-menu/copy-content-menu-item.js +0 -51
- package/src/components/header-edit-mode/tools-more-menu-group/index.js +0 -16
- package/src/components/keyboard-shortcuts/edit-mode.js +0 -59
- package/src/components/page-templates-template-parts/add-new-template-part.js +0 -62
- package/src/components/sidebar-edit-mode/index.js +0 -162
- package/src/components/sidebar-edit-mode/page-panels/index.js +0 -105
- package/src/components/sidebar-edit-mode/page-panels/page-content.js +0 -29
- package/src/components/sidebar-edit-mode/page-panels/page-status.js +0 -249
- package/src/components/sidebar-edit-mode/page-panels/page-summary.js +0 -49
- package/src/components/sidebar-edit-mode/page-panels/style.scss +0 -34
- package/src/components/sidebar-edit-mode/settings-header/index.js +0 -43
- package/src/components/sidebar-edit-mode/settings-header/style.scss +0 -14
- package/src/components/sidebar-edit-mode/template-panel/hooks.js +0 -114
- package/src/components/sidebar-edit-mode/template-panel/index.js +0 -144
- package/src/components/sidebar-edit-mode/template-panel/style.scss +0 -16
- package/src/components/start-template-options/index.js +0 -231
- package/src/components/start-template-options/style.scss +0 -55
- package/src/utils/math.js +0 -93
- /package/build/components/{sidebar-edit-mode → global-styles-sidebar}/default-sidebar.js +0 -0
- /package/build/components/{page-templates-template-parts → page-templates}/hooks.js +0 -0
- /package/build-module/components/{sidebar-edit-mode → global-styles-sidebar}/default-sidebar.js +0 -0
- /package/build-module/components/{page-templates-template-parts → page-templates}/hooks.js +0 -0
- /package/src/components/{sidebar-edit-mode → global-styles-sidebar}/default-sidebar.js +0 -0
- /package/src/components/{page-templates-template-parts → page-templates}/hooks.js +0 -0
|
@@ -7,10 +7,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = ColorVariations;
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _components = require("@wordpress/components");
|
|
10
|
-
var _variation = _interopRequireDefault(require("./variation"));
|
|
11
10
|
var _previewColors = _interopRequireDefault(require("../preview-colors"));
|
|
12
11
|
var _hooks = require("../hooks");
|
|
13
12
|
var _subtitle = _interopRequireDefault(require("../subtitle"));
|
|
13
|
+
var _variation = _interopRequireDefault(require("./variation"));
|
|
14
14
|
/**
|
|
15
15
|
* WordPress dependencies
|
|
16
16
|
*/
|
|
@@ -31,12 +31,12 @@ function ColorVariations({
|
|
|
31
31
|
spacing: 3
|
|
32
32
|
}, title && (0, _react.createElement)(_subtitle.default, {
|
|
33
33
|
level: 3
|
|
34
|
-
}, title), (0, _react.createElement)(_components.
|
|
35
|
-
|
|
36
|
-
gap: gap
|
|
34
|
+
}, title), (0, _react.createElement)(_components.__experimentalVStack, {
|
|
35
|
+
spacing: gap
|
|
37
36
|
}, colorVariations.map((variation, index) => (0, _react.createElement)(_variation.default, {
|
|
38
37
|
key: index,
|
|
39
|
-
variation: variation
|
|
38
|
+
variation: variation,
|
|
39
|
+
isPill: true
|
|
40
40
|
}, () => (0, _react.createElement)(_previewColors.default, null)))));
|
|
41
41
|
}
|
|
42
42
|
//# sourceMappingURL=variations-color.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","
|
|
1
|
+
{"version":3,"names":["_components","require","_previewColors","_interopRequireDefault","_hooks","_subtitle","_variation","ColorVariations","title","gap","colorVariations","useColorVariations","length","_react","createElement","__experimentalVStack","spacing","default","level","map","variation","index","key","isPill"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-color.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalVStack as VStack } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport StylesPreviewColors from '../preview-colors';\nimport { useColorVariations } from '../hooks';\nimport Subtitle from '../subtitle';\nimport Variation from './variation';\n\nexport default function ColorVariations( { title, gap = 2 } ) {\n\tconst colorVariations = useColorVariations();\n\n\tif ( ! colorVariations?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }\n\t\t\t<VStack spacing={ gap }>\n\t\t\t\t{ colorVariations.map( ( variation, index ) => (\n\t\t\t\t\t<Variation key={ index } variation={ variation } isPill>\n\t\t\t\t\t\t{ () => <StylesPreviewColors /> }\n\t\t\t\t\t</Variation>\n\t\t\t\t) ) }\n\t\t\t</VStack>\n\t\t</VStack>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAKA,IAAAC,cAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,UAAA,GAAAH,sBAAA,CAAAF,OAAA;AAXA;AACA;AACA;;AAGA;AACA;AACA;;AAMe,SAASM,eAAeA,CAAE;EAAEC,KAAK;EAAEC,GAAG,GAAG;AAAE,CAAC,EAAG;EAC7D,MAAMC,eAAe,GAAG,IAAAC,yBAAkB,EAAC,CAAC;EAE5C,IAAK,CAAED,eAAe,EAAEE,MAAM,EAAG;IAChC,OAAO,IAAI;EACZ;EAEA,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACd,WAAA,CAAAe,oBAAM;IAACC,OAAO,EAAG;EAAG,GAClBR,KAAK,IAAI,IAAAK,MAAA,CAAAC,aAAA,EAACT,SAAA,CAAAY,OAAQ;IAACC,KAAK,EAAG;EAAG,GAAGV,KAAiB,CAAC,EACrD,IAAAK,MAAA,CAAAC,aAAA,EAACd,WAAA,CAAAe,oBAAM;IAACC,OAAO,EAAGP;EAAK,GACpBC,eAAe,CAACS,GAAG,CAAE,CAAEC,SAAS,EAAEC,KAAK,KACxC,IAAAR,MAAA,CAAAC,aAAA,EAACR,UAAA,CAAAW,OAAS;IAACK,GAAG,EAAGD,KAAO;IAACD,SAAS,EAAGA,SAAW;IAACG,MAAM;EAAA,GACpD,MAAM,IAAAV,MAAA,CAAAC,aAAA,EAACZ,cAAA,CAAAe,OAAmB,MAAE,CACpB,CACV,CACK,CACD,CAAC;AAEX","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_editor","require","_lockUnlock","ComplementaryArea","ComplementaryAreaMoreMenuItem","unlock","editorPrivateApis","DefaultSidebar","className","identifier","title","icon","children","closeLabel","header","headerClassName","panelClassName","isActiveByDefault","_react","createElement","Fragment","scope","smallScreenTitle"],"sources":["@wordpress/edit-site/src/components/global-styles-sidebar/default-sidebar.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { ComplementaryArea, ComplementaryAreaMoreMenuItem } =\n\tunlock( editorPrivateApis );\n\nexport default function DefaultSidebar( {\n\tclassName,\n\tidentifier,\n\ttitle,\n\ticon,\n\tchildren,\n\tcloseLabel,\n\theader,\n\theaderClassName,\n\tpanelClassName,\n\tisActiveByDefault,\n} ) {\n\treturn (\n\t\t<>\n\t\t\t<ComplementaryArea\n\t\t\t\tclassName={ className }\n\t\t\t\tscope=\"core\"\n\t\t\t\tidentifier={ identifier }\n\t\t\t\ttitle={ title }\n\t\t\t\tsmallScreenTitle={ title }\n\t\t\t\ticon={ icon }\n\t\t\t\tcloseLabel={ closeLabel }\n\t\t\t\theader={ header }\n\t\t\t\theaderClassName={ headerClassName }\n\t\t\t\tpanelClassName={ panelClassName }\n\t\t\t\tisActiveByDefault={ isActiveByDefault }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</ComplementaryArea>\n\t\t\t<ComplementaryAreaMoreMenuItem\n\t\t\t\tscope=\"core\"\n\t\t\t\tidentifier={ identifier }\n\t\t\t\ticon={ icon }\n\t\t\t>\n\t\t\t\t{ title }\n\t\t\t</ComplementaryAreaMoreMenuItem>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,MAAM;EAAEE,iBAAiB;EAAEC;AAA8B,CAAC,GACzD,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAEb,SAASC,cAAcA,CAAE;EACvCC,SAAS;EACTC,UAAU;EACVC,KAAK;EACLC,IAAI;EACJC,QAAQ;EACRC,UAAU;EACVC,MAAM;EACNC,eAAe;EACfC,cAAc;EACdC;AACD,CAAC,EAAG;EACH,OACC,IAAAC,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACC,IAAAF,MAAA,CAAAC,aAAA,EAAChB,iBAAiB;IACjBK,SAAS,EAAGA,SAAW;IACvBa,KAAK,EAAC,MAAM;IACZZ,UAAU,EAAGA,UAAY;IACzBC,KAAK,EAAGA,KAAO;IACfY,gBAAgB,EAAGZ,KAAO;IAC1BC,IAAI,EAAGA,IAAM;IACbE,UAAU,EAAGA,UAAY;IACzBC,MAAM,EAAGA,MAAQ;IACjBC,eAAe,EAAGA,eAAiB;IACnCC,cAAc,EAAGA,cAAgB;IACjCC,iBAAiB,EAAGA;EAAmB,GAErCL,QACgB,CAAC,EACpB,IAAAM,MAAA,CAAAC,aAAA,EAACf,6BAA6B;IAC7BiB,KAAK,EAAC,MAAM;IACZZ,UAAU,EAAGA,UAAY;IACzBE,IAAI,EAAGA;EAAM,GAEXD,KAC4B,CAC9B,CAAC;AAEL","ignoreList":[]}
|
|
@@ -13,12 +13,12 @@ var _data = require("@wordpress/data");
|
|
|
13
13
|
var _element = require("@wordpress/element");
|
|
14
14
|
var _preferences = require("@wordpress/preferences");
|
|
15
15
|
var _editor = require("@wordpress/editor");
|
|
16
|
-
var _defaultSidebar = _interopRequireDefault(require("./default-sidebar"));
|
|
17
16
|
var _globalStyles = require("../global-styles");
|
|
18
17
|
var _store = require("../../store");
|
|
19
18
|
var _ui = require("../global-styles/ui");
|
|
20
19
|
var _lockUnlock = require("../../lock-unlock");
|
|
21
20
|
var _coreData = require("@wordpress/core-data");
|
|
21
|
+
var _defaultSidebar = _interopRequireDefault(require("./default-sidebar"));
|
|
22
22
|
/**
|
|
23
23
|
* WordPress dependencies
|
|
24
24
|
*/
|
|
@@ -118,7 +118,8 @@ function GlobalStylesSidebar() {
|
|
|
118
118
|
closeLabel: (0, _i18n.__)('Close Styles'),
|
|
119
119
|
panelClassName: "edit-site-global-styles-sidebar__panel",
|
|
120
120
|
header: (0, _react.createElement)(_components.Flex, {
|
|
121
|
-
className: "edit-site-global-styles-sidebar__header"
|
|
121
|
+
className: "edit-site-global-styles-sidebar__header",
|
|
122
|
+
gap: 1
|
|
122
123
|
}, (0, _react.createElement)(_components.FlexBlock, {
|
|
123
124
|
style: {
|
|
124
125
|
minWidth: 'min-content'
|
|
@@ -130,14 +131,16 @@ function GlobalStylesSidebar() {
|
|
|
130
131
|
label: (0, _i18n.__)('Style Book'),
|
|
131
132
|
isPressed: isStyleBookOpened || isRevisionsStyleBookOpened,
|
|
132
133
|
disabled: shouldClearCanvasContainerView,
|
|
133
|
-
onClick: toggleStyleBook
|
|
134
|
+
onClick: toggleStyleBook,
|
|
135
|
+
size: "compact"
|
|
134
136
|
})), (0, _react.createElement)(_components.FlexItem, null, (0, _react.createElement)(_components.Button, {
|
|
135
137
|
label: (0, _i18n.__)('Revisions'),
|
|
136
138
|
icon: _icons.backup,
|
|
137
139
|
onClick: toggleRevisions,
|
|
138
140
|
disabled: !hasRevisions,
|
|
139
|
-
isPressed: isRevisionsOpened || isRevisionsStyleBookOpened
|
|
141
|
+
isPressed: isRevisionsOpened || isRevisionsStyleBookOpened,
|
|
142
|
+
size: "compact"
|
|
140
143
|
})), (0, _react.createElement)(_ui.GlobalStylesMenuSlot, null))
|
|
141
144
|
}, (0, _react.createElement)(_globalStyles.GlobalStylesUI, null));
|
|
142
145
|
}
|
|
143
|
-
//# sourceMappingURL=
|
|
146
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_components","require","_i18n","_icons","_data","_element","_preferences","_editor","_globalStyles","_store","_ui","_lockUnlock","_coreData","_defaultSidebar","_interopRequireDefault","interfaceStore","unlock","editorPrivateApis","GlobalStylesSidebar","shouldClearCanvasContainerView","isStyleBookOpened","showListViewByDefault","hasRevisions","isRevisionsOpened","isRevisionsStyleBookOpened","useSelect","select","getActiveComplementaryArea","getEditorCanvasContainerView","getCanvasMode","editSiteStore","canvasContainerView","_isVisualEditorMode","editorStore","getEditorMode","_isEditCanvasMode","_showListViewByDefault","preferencesStore","get","getEntityRecord","__experimentalGetCurrentGlobalStylesId","coreStore","globalStylesId","globalStyles","undefined","_links","count","setEditorCanvasContainerView","useDispatch","useEffect","setIsListViewOpened","goTo","useNavigator","toggleRevisions","toggleStyleBook","_react","createElement","default","className","identifier","title","__","icon","styles","closeLabel","panelClassName","header","Flex","gap","FlexBlock","style","minWidth","FlexItem","Button","seen","label","isPressed","disabled","onClick","size","backup","GlobalStylesMenuSlot","GlobalStylesUI"],"sources":["@wordpress/edit-site/src/components/global-styles-sidebar/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tFlexItem,\n\tFlexBlock,\n\tFlex,\n\tButton,\n\t__experimentalUseNavigator as useNavigator,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { styles, seen, backup } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { GlobalStylesUI } from '../global-styles';\nimport { store as editSiteStore } from '../../store';\nimport { GlobalStylesMenuSlot } from '../global-styles/ui';\nimport { unlock } from '../../lock-unlock';\nimport { store as coreStore } from '@wordpress/core-data';\nimport DefaultSidebar from './default-sidebar';\n\nconst { interfaceStore } = unlock( editorPrivateApis );\n\nexport default function GlobalStylesSidebar() {\n\tconst {\n\t\tshouldClearCanvasContainerView,\n\t\tisStyleBookOpened,\n\t\tshowListViewByDefault,\n\t\thasRevisions,\n\t\tisRevisionsOpened,\n\t\tisRevisionsStyleBookOpened,\n\t} = useSelect( ( select ) => {\n\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\t\tconst { getEditorCanvasContainerView, getCanvasMode } = unlock(\n\t\t\tselect( editSiteStore )\n\t\t);\n\t\tconst canvasContainerView = getEditorCanvasContainerView();\n\t\tconst _isVisualEditorMode =\n\t\t\t'visual' === select( editorStore ).getEditorMode();\n\t\tconst _isEditCanvasMode = 'edit' === getCanvasMode();\n\t\tconst _showListViewByDefault = select( preferencesStore ).get(\n\t\t\t'core',\n\t\t\t'showListViewByDefault'\n\t\t);\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tisStyleBookOpened: 'style-book' === canvasContainerView,\n\t\t\tshouldClearCanvasContainerView:\n\t\t\t\t'edit-site/global-styles' !==\n\t\t\t\t\tgetActiveComplementaryArea( 'core' ) ||\n\t\t\t\t! _isVisualEditorMode ||\n\t\t\t\t! _isEditCanvasMode,\n\t\t\tshowListViewByDefault: _showListViewByDefault,\n\t\t\thasRevisions:\n\t\t\t\t!! globalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count,\n\t\t\tisRevisionsStyleBookOpened:\n\t\t\t\t'global-styles-revisions:style-book' === canvasContainerView,\n\t\t\tisRevisionsOpened:\n\t\t\t\t'global-styles-revisions' === canvasContainerView,\n\t\t};\n\t}, [] );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\n\tuseEffect( () => {\n\t\tif ( shouldClearCanvasContainerView ) {\n\t\t\tsetEditorCanvasContainerView( undefined );\n\t\t}\n\t}, [ shouldClearCanvasContainerView ] );\n\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\tconst { goTo } = useNavigator();\n\n\tconst toggleRevisions = () => {\n\t\tsetIsListViewOpened( false );\n\t\tif ( isRevisionsStyleBookOpened ) {\n\t\t\tgoTo( '/' );\n\t\t\tsetEditorCanvasContainerView( 'style-book' );\n\t\t\treturn;\n\t\t}\n\t\tif ( isRevisionsOpened ) {\n\t\t\tgoTo( '/' );\n\t\t\tsetEditorCanvasContainerView( undefined );\n\t\t\treturn;\n\t\t}\n\t\tgoTo( '/revisions' );\n\n\t\tif ( isStyleBookOpened ) {\n\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t'global-styles-revisions:style-book'\n\t\t\t);\n\t\t} else {\n\t\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t\t}\n\t};\n\tconst toggleStyleBook = () => {\n\t\tif ( isRevisionsOpened ) {\n\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t'global-styles-revisions:style-book'\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tif ( isRevisionsStyleBookOpened ) {\n\t\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t\t\treturn;\n\t\t}\n\t\tsetIsListViewOpened( isStyleBookOpened && showListViewByDefault );\n\t\tsetEditorCanvasContainerView(\n\t\t\tisStyleBookOpened ? undefined : 'style-book'\n\t\t);\n\t};\n\n\treturn (\n\t\t<DefaultSidebar\n\t\t\tclassName=\"edit-site-global-styles-sidebar\"\n\t\t\tidentifier=\"edit-site/global-styles\"\n\t\t\ttitle={ __( 'Styles' ) }\n\t\t\ticon={ styles }\n\t\t\tcloseLabel={ __( 'Close Styles' ) }\n\t\t\tpanelClassName=\"edit-site-global-styles-sidebar__panel\"\n\t\t\theader={\n\t\t\t\t<Flex\n\t\t\t\t\tclassName=\"edit-site-global-styles-sidebar__header\"\n\t\t\t\t\tgap={ 1 }\n\t\t\t\t>\n\t\t\t\t\t<FlexBlock style={ { minWidth: 'min-content' } }>\n\t\t\t\t\t\t<h2 className=\"edit-site-global-styles-sidebar__header-title\">\n\t\t\t\t\t\t\t{ __( 'Styles' ) }\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t</FlexBlock>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ticon={ seen }\n\t\t\t\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\t\t\t\tisPressed={\n\t\t\t\t\t\t\t\tisStyleBookOpened || isRevisionsStyleBookOpened\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdisabled={ shouldClearCanvasContainerView }\n\t\t\t\t\t\t\tonClick={ toggleStyleBook }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tlabel={ __( 'Revisions' ) }\n\t\t\t\t\t\t\ticon={ backup }\n\t\t\t\t\t\t\tonClick={ toggleRevisions }\n\t\t\t\t\t\t\tdisabled={ ! hasRevisions }\n\t\t\t\t\t\t\tisPressed={\n\t\t\t\t\t\t\t\tisRevisionsOpened || isRevisionsStyleBookOpened\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<GlobalStylesMenuSlot />\n\t\t\t\t</Flex>\n\t\t\t}\n\t\t>\n\t\t\t<GlobalStylesUI />\n\t\t</DefaultSidebar>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAOA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAQA,IAAAO,aAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA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ACX,IAAAxB,MAAA,CAAAC,aAAA,EAACxD,WAAA,CAAAwE,QAAQ,QACR,IAAAjB,MAAA,CAAAC,aAAA,EAACxD,WAAA,CAAAyE,MAAM;MACNE,KAAK,EAAG,IAAAd,QAAE,EAAE,WAAY,CAAG;MAC3BC,IAAI,EAAGkB,aAAQ;MACfF,OAAO,EAAGzB,eAAiB;MAC3BwB,QAAQ,EAAG,CAAEvD,YAAc;MAC3BsD,SAAS,EACRrD,iBAAiB,IAAIC,0BACrB;MACDuD,IAAI,EAAC;IAAS,CACd,CACQ,CAAC,EACX,IAAAxB,MAAA,CAAAC,aAAA,EAAC9C,GAAA,CAAAuE,oBAAoB,MAAE,CAClB;EACN,GAED,IAAA1B,MAAA,CAAAC,aAAA,EAAChD,aAAA,CAAA0E,cAAc,MAAE,CACF,CAAC;AAEnB","ignoreList":[]}
|
|
@@ -4,29 +4,16 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.default =
|
|
7
|
+
exports.default = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
-
var _compose = require("@wordpress/compose");
|
|
11
|
-
var _blockEditor = require("@wordpress/block-editor");
|
|
12
|
-
var _data = require("@wordpress/data");
|
|
13
|
-
var _element = require("@wordpress/element");
|
|
14
|
-
var _i18n = require("@wordpress/i18n");
|
|
15
|
-
var _icons = require("@wordpress/icons");
|
|
16
|
-
var _components = require("@wordpress/components");
|
|
17
|
-
var _preferences = require("@wordpress/preferences");
|
|
18
9
|
var _editor = require("@wordpress/editor");
|
|
10
|
+
var _data = require("@wordpress/data");
|
|
19
11
|
var _moreMenu = _interopRequireDefault(require("./more-menu"));
|
|
12
|
+
var _lockUnlock = require("../../lock-unlock");
|
|
20
13
|
var _saveButton = _interopRequireDefault(require("../save-button"));
|
|
21
|
-
var
|
|
22
|
-
var _store = require("../../store");
|
|
14
|
+
var _isPreviewingTheme2 = require("../../utils/is-previewing-theme");
|
|
23
15
|
var _editorCanvasContainer = require("../editor-canvas-container");
|
|
24
|
-
var
|
|
25
|
-
var _constants = require("../../utils/constants");
|
|
26
|
-
/**
|
|
27
|
-
* External dependencies
|
|
28
|
-
*/
|
|
29
|
-
|
|
16
|
+
var _store = require("../../store");
|
|
30
17
|
/**
|
|
31
18
|
* WordPress dependencies
|
|
32
19
|
*/
|
|
@@ -36,131 +23,28 @@ var _constants = require("../../utils/constants");
|
|
|
36
23
|
*/
|
|
37
24
|
|
|
38
25
|
const {
|
|
39
|
-
|
|
40
|
-
} = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
|
|
41
|
-
const {
|
|
42
|
-
PostViewLink,
|
|
43
|
-
PreviewDropdown,
|
|
44
|
-
PinnedItems
|
|
26
|
+
Header: EditorHeader
|
|
45
27
|
} = (0, _lockUnlock.unlock)(_editor.privateApis);
|
|
46
|
-
function
|
|
28
|
+
function Header({
|
|
29
|
+
setEntitiesSavedStatesCallback
|
|
30
|
+
}) {
|
|
31
|
+
const _isPreviewingTheme = (0, _isPreviewingTheme2.isPreviewingTheme)();
|
|
32
|
+
const hasDefaultEditorCanvasView = !(0, _editorCanvasContainer.useHasEditorCanvasContainer)();
|
|
47
33
|
const {
|
|
48
|
-
templateType,
|
|
49
|
-
isDistractionFree,
|
|
50
|
-
blockEditorMode,
|
|
51
|
-
blockSelectionStart,
|
|
52
|
-
showIconLabels,
|
|
53
34
|
editorCanvasView
|
|
54
35
|
} = (0, _data.useSelect)(select => {
|
|
55
|
-
const {
|
|
56
|
-
getEditedPostType
|
|
57
|
-
} = select(_store.store);
|
|
58
|
-
const {
|
|
59
|
-
getBlockSelectionStart,
|
|
60
|
-
__unstableGetEditorMode
|
|
61
|
-
} = select(_blockEditor.store);
|
|
62
|
-
const {
|
|
63
|
-
get: getPreference
|
|
64
|
-
} = select(_preferences.store);
|
|
65
|
-
const {
|
|
66
|
-
getDeviceType
|
|
67
|
-
} = select(_editor.store);
|
|
68
36
|
return {
|
|
69
|
-
|
|
70
|
-
templateType: getEditedPostType(),
|
|
71
|
-
blockEditorMode: __unstableGetEditorMode(),
|
|
72
|
-
blockSelectionStart: getBlockSelectionStart(),
|
|
73
|
-
showIconLabels: getPreference('core', 'showIconLabels'),
|
|
74
|
-
editorCanvasView: (0, _lockUnlock.unlock)(select(_store.store)).getEditorCanvasContainerView(),
|
|
75
|
-
isDistractionFree: getPreference('core', 'distractionFree')
|
|
37
|
+
editorCanvasView: (0, _lockUnlock.unlock)(select(_store.store)).getEditorCanvasContainerView()
|
|
76
38
|
};
|
|
77
39
|
}, []);
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const isFocusMode = _constants.FOCUSABLE_ENTITIES.includes(templateType);
|
|
87
|
-
const isZoomedOutView = blockEditorMode === 'zoom-out';
|
|
88
|
-
const [isBlockToolsCollapsed, setIsBlockToolsCollapsed] = (0, _element.useState)(true);
|
|
89
|
-
(0, _element.useEffect)(() => {
|
|
90
|
-
// If we have a new block selection, show the block tools
|
|
91
|
-
if (blockSelectionStart) {
|
|
92
|
-
setIsBlockToolsCollapsed(false);
|
|
93
|
-
}
|
|
94
|
-
}, [blockSelectionStart]);
|
|
95
|
-
const toolbarVariants = {
|
|
96
|
-
isDistractionFree: {
|
|
97
|
-
y: '-50px'
|
|
98
|
-
},
|
|
99
|
-
isDistractionFreeHovering: {
|
|
100
|
-
y: 0
|
|
101
|
-
},
|
|
102
|
-
view: {
|
|
103
|
-
y: 0
|
|
104
|
-
},
|
|
105
|
-
edit: {
|
|
106
|
-
y: 0
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
const toolbarTransition = {
|
|
110
|
-
type: 'tween',
|
|
111
|
-
duration: disableMotion ? 0 : 0.2,
|
|
112
|
-
ease: 'easeOut'
|
|
113
|
-
};
|
|
114
|
-
return (0, _react.createElement)("div", {
|
|
115
|
-
className: (0, _classnames.default)('edit-site-header-edit-mode', {
|
|
116
|
-
'show-icon-labels': showIconLabels
|
|
117
|
-
})
|
|
118
|
-
}, hasDefaultEditorCanvasView && (0, _react.createElement)(_components.__unstableMotion.div, {
|
|
119
|
-
className: "edit-site-header-edit-mode__start",
|
|
120
|
-
variants: toolbarVariants,
|
|
121
|
-
transition: toolbarTransition
|
|
122
|
-
}, (0, _react.createElement)(_documentTools.default, {
|
|
123
|
-
blockEditorMode: blockEditorMode,
|
|
124
|
-
isDistractionFree: isDistractionFree
|
|
125
|
-
}), showTopToolbar && (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)("div", {
|
|
126
|
-
className: (0, _classnames.default)('selected-block-tools-wrapper', {
|
|
127
|
-
'is-collapsed': isBlockToolsCollapsed
|
|
128
|
-
})
|
|
129
|
-
}, (0, _react.createElement)(_blockEditor.BlockToolbar, {
|
|
130
|
-
hideDragHandle: true
|
|
131
|
-
})), (0, _react.createElement)(_components.Popover.Slot, {
|
|
132
|
-
ref: blockToolbarRef,
|
|
133
|
-
name: "block-toolbar"
|
|
134
|
-
}), (0, _react.createElement)(_components.Button, {
|
|
135
|
-
className: "edit-site-header-edit-mode__block-tools-toggle",
|
|
136
|
-
icon: isBlockToolsCollapsed ? _icons.next : _icons.previous,
|
|
137
|
-
onClick: () => {
|
|
138
|
-
setIsBlockToolsCollapsed(collapsed => !collapsed);
|
|
139
|
-
},
|
|
140
|
-
label: isBlockToolsCollapsed ? (0, _i18n.__)('Show block tools') : (0, _i18n.__)('Hide block tools'),
|
|
141
|
-
size: "compact"
|
|
142
|
-
}))), !isDistractionFree && (0, _react.createElement)("div", {
|
|
143
|
-
className: (0, _classnames.default)('edit-site-header-edit-mode__center', {
|
|
144
|
-
'is-collapsed': !isBlockToolsCollapsed && showTopToolbar
|
|
145
|
-
})
|
|
146
|
-
}, !hasDefaultEditorCanvasView ? (0, _editorCanvasContainer.getEditorCanvasContainerTitle)(editorCanvasView) : (0, _react.createElement)(_editor.DocumentBar, null)), (0, _react.createElement)("div", {
|
|
147
|
-
className: "edit-site-header-edit-mode__end"
|
|
148
|
-
}, (0, _react.createElement)(_components.__unstableMotion.div, {
|
|
149
|
-
className: "edit-site-header-edit-mode__actions",
|
|
150
|
-
variants: toolbarVariants,
|
|
151
|
-
transition: toolbarTransition
|
|
152
|
-
}, isLargeViewport && (0, _react.createElement)("div", {
|
|
153
|
-
className: (0, _classnames.default)('edit-site-header-edit-mode__preview-options', {
|
|
154
|
-
'is-zoomed-out': isZoomedOutView
|
|
155
|
-
})
|
|
156
|
-
}, (0, _react.createElement)(PreviewDropdown, {
|
|
157
|
-
disabled: isFocusMode || !hasDefaultEditorCanvasView
|
|
158
|
-
})), (0, _react.createElement)(PostViewLink, null), (0, _react.createElement)(_saveButton.default, {
|
|
159
|
-
size: "compact"
|
|
160
|
-
}), !isDistractionFree && (0, _react.createElement)(PinnedItems.Slot, {
|
|
161
|
-
scope: "core"
|
|
162
|
-
}), (0, _react.createElement)(_moreMenu.default, {
|
|
163
|
-
showIconLabels: showIconLabels
|
|
164
|
-
}))));
|
|
40
|
+
return (0, _react.createElement)(EditorHeader, {
|
|
41
|
+
setEntitiesSavedStatesCallback: setEntitiesSavedStatesCallback,
|
|
42
|
+
customSaveButton: _isPreviewingTheme && (0, _react.createElement)(_saveButton.default, {
|
|
43
|
+
size: "compact"
|
|
44
|
+
}),
|
|
45
|
+
forceDisableBlockTools: !hasDefaultEditorCanvasView,
|
|
46
|
+
title: !hasDefaultEditorCanvasView ? (0, _editorCanvasContainer.getEditorCanvasContainerTitle)(editorCanvasView) : undefined
|
|
47
|
+
}, (0, _react.createElement)(_moreMenu.default, null));
|
|
165
48
|
}
|
|
49
|
+
var _default = exports.default = Header;
|
|
166
50
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_classnames","_interopRequireDefault","require","_compose","_blockEditor","_data","_element","_i18n","_icons","_components","_preferences","_editor","_moreMenu","_saveButton","_documentTools","_store","_editorCanvasContainer","_lockUnlock","_constants","useShowBlockTools","unlock","blockEditorPrivateApis","PostViewLink","PreviewDropdown","PinnedItems","editorPrivateApis","HeaderEditMode","templateType","isDistractionFree","blockEditorMode","blockSelectionStart","showIconLabels","editorCanvasView","useSelect","select","getEditedPostType","editSiteStore","getBlockSelectionStart","__unstableGetEditorMode","blockEditorStore","get","getPreference","preferencesStore","getDeviceType","editorStore","deviceType","getEditorCanvasContainerView","isLargeViewport","useViewportMatch","showFixedToolbar","showTopToolbar","blockToolbarRef","useRef","disableMotion","useReducedMotion","hasDefaultEditorCanvasView","useHasEditorCanvasContainer","isFocusMode","FOCUSABLE_ENTITIES","includes","isZoomedOutView","isBlockToolsCollapsed","setIsBlockToolsCollapsed","useState","useEffect","toolbarVariants","y","isDistractionFreeHovering","view","edit","toolbarTransition","type","duration","ease","_react","createElement","className","classnames","__unstableMotion","div","variants","transition","default","Fragment","BlockToolbar","hideDragHandle","Popover","Slot","ref","name","Button","icon","next","previous","onClick","collapsed","label","__","size","getEditorCanvasContainerTitle","DocumentBar","disabled","scope"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useViewportMatch, useReducedMotion } from '@wordpress/compose';\nimport {\n\tBlockToolbar,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { next, previous } from '@wordpress/icons';\nimport {\n\tButton,\n\t__unstableMotion as motion,\n\tPopover,\n} from '@wordpress/components';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tDocumentBar,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport MoreMenu from './more-menu';\nimport SaveButton from '../save-button';\nimport DocumentTools from './document-tools';\nimport { store as editSiteStore } from '../../store';\nimport {\n\tgetEditorCanvasContainerTitle,\n\tuseHasEditorCanvasContainer,\n} from '../editor-canvas-container';\nimport { unlock } from '../../lock-unlock';\nimport { FOCUSABLE_ENTITIES } from '../../utils/constants';\n\nconst { useShowBlockTools } = unlock( blockEditorPrivateApis );\nconst { PostViewLink, PreviewDropdown, PinnedItems } =\n\tunlock( editorPrivateApis );\n\nexport default function HeaderEditMode() {\n\tconst {\n\t\ttemplateType,\n\t\tisDistractionFree,\n\t\tblockEditorMode,\n\t\tblockSelectionStart,\n\t\tshowIconLabels,\n\t\teditorCanvasView,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditedPostType } = select( editSiteStore );\n\t\tconst { getBlockSelectionStart, __unstableGetEditorMode } =\n\t\t\tselect( blockEditorStore );\n\t\tconst { get: getPreference } = select( preferencesStore );\n\t\tconst { getDeviceType } = select( editorStore );\n\n\t\treturn {\n\t\t\tdeviceType: getDeviceType(),\n\t\t\ttemplateType: getEditedPostType(),\n\t\t\tblockEditorMode: __unstableGetEditorMode(),\n\t\t\tblockSelectionStart: getBlockSelectionStart(),\n\t\t\tshowIconLabels: getPreference( 'core', 'showIconLabels' ),\n\t\t\teditorCanvasView: unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView(),\n\t\t\tisDistractionFree: getPreference( 'core', 'distractionFree' ),\n\t\t};\n\t}, [] );\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst { showFixedToolbar } = useShowBlockTools();\n\tconst showTopToolbar = isLargeViewport && showFixedToolbar;\n\tconst blockToolbarRef = useRef();\n\tconst disableMotion = useReducedMotion();\n\n\tconst hasDefaultEditorCanvasView = ! useHasEditorCanvasContainer();\n\n\tconst isFocusMode = FOCUSABLE_ENTITIES.includes( templateType );\n\n\tconst isZoomedOutView = blockEditorMode === 'zoom-out';\n\n\tconst [ isBlockToolsCollapsed, setIsBlockToolsCollapsed ] =\n\t\tuseState( true );\n\n\tuseEffect( () => {\n\t\t// If we have a new block selection, show the block tools\n\t\tif ( blockSelectionStart ) {\n\t\t\tsetIsBlockToolsCollapsed( false );\n\t\t}\n\t}, [ blockSelectionStart ] );\n\n\tconst toolbarVariants = {\n\t\tisDistractionFree: { y: '-50px' },\n\t\tisDistractionFreeHovering: { y: 0 },\n\t\tview: { y: 0 },\n\t\tedit: { y: 0 },\n\t};\n\n\tconst toolbarTransition = {\n\t\ttype: 'tween',\n\t\tduration: disableMotion ? 0 : 0.2,\n\t\tease: 'easeOut',\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames( 'edit-site-header-edit-mode', {\n\t\t\t\t'show-icon-labels': showIconLabels,\n\t\t\t} ) }\n\t\t>\n\t\t\t{ hasDefaultEditorCanvasView && (\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"edit-site-header-edit-mode__start\"\n\t\t\t\t\tvariants={ toolbarVariants }\n\t\t\t\t\ttransition={ toolbarTransition }\n\t\t\t\t>\n\t\t\t\t\t<DocumentTools\n\t\t\t\t\t\tblockEditorMode={ blockEditorMode }\n\t\t\t\t\t\tisDistractionFree={ isDistractionFree }\n\t\t\t\t\t/>\n\t\t\t\t\t{ showTopToolbar && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\t'selected-block-tools-wrapper',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'is-collapsed': isBlockToolsCollapsed,\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Popover.Slot\n\t\t\t\t\t\t\t\tref={ blockToolbarRef }\n\t\t\t\t\t\t\t\tname=\"block-toolbar\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__block-tools-toggle\"\n\t\t\t\t\t\t\t\ticon={ isBlockToolsCollapsed ? next : previous }\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tsetIsBlockToolsCollapsed(\n\t\t\t\t\t\t\t\t\t\t( collapsed ) => ! collapsed\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\tisBlockToolsCollapsed\n\t\t\t\t\t\t\t\t\t\t? __( 'Show block tools' )\n\t\t\t\t\t\t\t\t\t\t: __( 'Hide block tools' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</motion.div>\n\t\t\t) }\n\n\t\t\t{ ! isDistractionFree && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'edit-site-header-edit-mode__center',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'is-collapsed':\n\t\t\t\t\t\t\t\t! isBlockToolsCollapsed && showTopToolbar,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ ! hasDefaultEditorCanvasView ? (\n\t\t\t\t\t\tgetEditorCanvasContainerTitle( editorCanvasView )\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<DocumentBar />\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t<div className=\"edit-site-header-edit-mode__end\">\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"edit-site-header-edit-mode__actions\"\n\t\t\t\t\tvariants={ toolbarVariants }\n\t\t\t\t\ttransition={ toolbarTransition }\n\t\t\t\t>\n\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'edit-site-header-edit-mode__preview-options',\n\t\t\t\t\t\t\t\t{ 'is-zoomed-out': isZoomedOutView }\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PreviewDropdown\n\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\tisFocusMode || ! hasDefaultEditorCanvasView\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t\t<PostViewLink />\n\t\t\t\t\t<SaveButton size=\"compact\" />\n\t\t\t\t\t{ ! isDistractionFree && <PinnedItems.Slot scope=\"core\" /> }\n\t\t\t\t\t<MoreMenu showIconLabels={ showIconLabels } />\n\t\t\t\t</motion.div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAKA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AASA,IAAAU,SAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,WAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,cAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;AACA,IAAAc,sBAAA,GAAAd,OAAA;AAIA,IAAAe,WAAA,GAAAf,OAAA;AACA,IAAAgB,UAAA,GAAAhB,O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E,gBAAiB,CAAC,GAEjD,IAAA0C,MAAA,CAAAC,aAAA,EAAChE,OAAA,CAAAyF,WAAW,MAAE,CAEX,CACL,EAED,IAAA1B,MAAA,CAAAC,aAAA;IAAKC,SAAS,EAAC;EAAiC,GAC/C,IAAAF,MAAA,CAAAC,aAAA,EAAClE,WAAA,CAAAqE,gBAAM,CAACC,GAAG;IACVH,SAAS,EAAC,qCAAqC;IAC/CI,QAAQ,EAAGf,eAAiB;IAC5BgB,UAAU,EAAGX;EAAmB,GAE9BvB,eAAe,IAChB,IAAA2B,MAAA,CAAAC,aAAA;IACCC,SAAS,EAAG,IAAAC,mBAAU,EACrB,6CAA6C,EAC7C;MAAE,eAAe,EAAEjB;IAAgB,CACpC;EAAG,GAEH,IAAAc,MAAA,CAAAC,aAAA,EAACpD,eAAe;IACf8E,QAAQ,EACP5C,WAAW,IAAI,CAAEF;EACjB,CACD,CACG,CACL,EACD,IAAAmB,MAAA,CAAAC,aAAA,EAACrD,YAAY,MAAE,CAAC,EAChB,IAAAoD,MAAA,CAAAC,aAAA,EAAC9D,WAAA,CAAAqE,OAAU;IAACgB,IAAI,EAAC;EAAS,CAAE,CAAC,EAC3B,CAAEtE,iBAAiB,IAAI,IAAA8C,MAAA,CAAAC,aAAA,EAACnD,WAAW,CAAC+D,IAAI;IAACe,KAAK,EAAC;EAAM,CAAE,CAAC,EAC1D,IAAA5B,MAAA,CAAAC,aAAA,EAAC/D,SAAA,CAAAsE,OAAQ;IAACnD,cAAc,EAAGA;EAAgB,CAAE,CAClC,CACR,CACD,CAAC;AAER","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_editor","require","_data","_moreMenu","_interopRequireDefault","_lockUnlock","_saveButton","_isPreviewingTheme2","_editorCanvasContainer","_store","Header","EditorHeader","unlock","editorPrivateApis","setEntitiesSavedStatesCallback","_isPreviewingTheme","isPreviewingTheme","hasDefaultEditorCanvasView","useHasEditorCanvasContainer","editorCanvasView","useSelect","select","editSiteStore","getEditorCanvasContainerView","_react","createElement","customSaveButton","default","size","forceDisableBlockTools","title","getEditorCanvasContainerTitle","undefined","_default","exports"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport SiteEditorMoreMenu from './more-menu';\nimport { unlock } from '../../lock-unlock';\nimport SaveButton from '../save-button';\nimport { isPreviewingTheme } from '../../utils/is-previewing-theme';\nimport {\n\tgetEditorCanvasContainerTitle,\n\tuseHasEditorCanvasContainer,\n} from '../editor-canvas-container';\nimport { store as editSiteStore } from '../../store';\n\nconst { Header: EditorHeader } = unlock( editorPrivateApis );\n\nfunction Header( { setEntitiesSavedStatesCallback } ) {\n\tconst _isPreviewingTheme = isPreviewingTheme();\n\tconst hasDefaultEditorCanvasView = ! useHasEditorCanvasContainer();\n\tconst { editorCanvasView } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\teditorCanvasView: unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView(),\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<EditorHeader\n\t\t\tsetEntitiesSavedStatesCallback={ setEntitiesSavedStatesCallback }\n\t\t\tcustomSaveButton={\n\t\t\t\t_isPreviewingTheme && <SaveButton size=\"compact\" />\n\t\t\t}\n\t\t\tforceDisableBlockTools={ ! hasDefaultEditorCanvasView }\n\t\t\ttitle={\n\t\t\t\t! hasDefaultEditorCanvasView\n\t\t\t\t\t? getEditorCanvasContainerTitle( editorCanvasView )\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t>\n\t\t\t<SiteEditorMoreMenu />\n\t\t</EditorHeader>\n\t);\n}\n\nexport default Header;\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAKA,IAAAE,SAAA,GAAAC,sBAAA,CAAAH,O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|
|
6
6
|
});
|
|
7
7
|
exports.default = MoreMenu;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var _i18n = require("@wordpress/i18n");
|
|
10
9
|
var _data = require("@wordpress/data");
|
|
11
|
-
var _keycodes = require("@wordpress/keycodes");
|
|
12
|
-
var _icons = require("@wordpress/icons");
|
|
13
|
-
var _components = require("@wordpress/components");
|
|
14
|
-
var _preferences = require("@wordpress/preferences");
|
|
15
10
|
var _coreData = require("@wordpress/core-data");
|
|
16
11
|
var _editor = require("@wordpress/editor");
|
|
17
|
-
var _toolsMoreMenuGroup = _interopRequireDefault(require("../tools-more-menu-group"));
|
|
18
12
|
var _siteExport = _interopRequireDefault(require("./site-export"));
|
|
19
13
|
var _welcomeGuideMenuItem = _interopRequireDefault(require("./welcome-guide-menu-item"));
|
|
20
|
-
var _copyContentMenuItem = _interopRequireDefault(require("./copy-content-menu-item"));
|
|
21
14
|
var _lockUnlock = require("../../../lock-unlock");
|
|
22
15
|
/**
|
|
23
16
|
* WordPress dependencies
|
|
@@ -28,100 +21,13 @@ var _lockUnlock = require("../../../lock-unlock");
|
|
|
28
21
|
*/
|
|
29
22
|
|
|
30
23
|
const {
|
|
31
|
-
|
|
32
|
-
ActionItem,
|
|
33
|
-
interfaceStore,
|
|
24
|
+
ToolsMoreMenuGroup,
|
|
34
25
|
PreferencesModal
|
|
35
26
|
} = (0, _lockUnlock.unlock)(_editor.privateApis);
|
|
36
|
-
function MoreMenu({
|
|
37
|
-
showIconLabels
|
|
38
|
-
}) {
|
|
39
|
-
const {
|
|
40
|
-
openModal
|
|
41
|
-
} = (0, _data.useDispatch)(interfaceStore);
|
|
42
|
-
const {
|
|
43
|
-
set: setPreference
|
|
44
|
-
} = (0, _data.useDispatch)(_preferences.store);
|
|
27
|
+
function MoreMenu() {
|
|
45
28
|
const isBlockBasedTheme = (0, _data.useSelect)(select => {
|
|
46
29
|
return select(_coreData.store).getCurrentTheme().is_block_theme;
|
|
47
30
|
}, []);
|
|
48
|
-
|
|
49
|
-
toggleDistractionFree
|
|
50
|
-
} = (0, _data.useDispatch)(_editor.store);
|
|
51
|
-
const turnOffDistractionFree = () => {
|
|
52
|
-
setPreference('core', 'distractionFree', false);
|
|
53
|
-
};
|
|
54
|
-
return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_components.DropdownMenu, {
|
|
55
|
-
icon: _icons.moreVertical,
|
|
56
|
-
label: (0, _i18n.__)('Options'),
|
|
57
|
-
popoverProps: {
|
|
58
|
-
placement: 'bottom-end',
|
|
59
|
-
className: 'more-menu-dropdown__content'
|
|
60
|
-
},
|
|
61
|
-
toggleProps: {
|
|
62
|
-
showTooltip: !showIconLabels,
|
|
63
|
-
...(showIconLabels && {
|
|
64
|
-
variant: 'tertiary'
|
|
65
|
-
}),
|
|
66
|
-
tooltipPosition: 'bottom',
|
|
67
|
-
size: 'compact'
|
|
68
|
-
}
|
|
69
|
-
}, ({
|
|
70
|
-
onClose
|
|
71
|
-
}) => (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_components.MenuGroup, {
|
|
72
|
-
label: (0, _i18n._x)('View', 'noun')
|
|
73
|
-
}, (0, _react.createElement)(_preferences.PreferenceToggleMenuItem, {
|
|
74
|
-
scope: "core",
|
|
75
|
-
name: "fixedToolbar",
|
|
76
|
-
onToggle: turnOffDistractionFree,
|
|
77
|
-
label: (0, _i18n.__)('Top toolbar'),
|
|
78
|
-
info: (0, _i18n.__)('Access all block and document tools in a single place'),
|
|
79
|
-
messageActivated: (0, _i18n.__)('Top toolbar activated'),
|
|
80
|
-
messageDeactivated: (0, _i18n.__)('Top toolbar deactivated')
|
|
81
|
-
}), (0, _react.createElement)(_preferences.PreferenceToggleMenuItem, {
|
|
82
|
-
scope: "core",
|
|
83
|
-
name: "distractionFree",
|
|
84
|
-
label: (0, _i18n.__)('Distraction free'),
|
|
85
|
-
info: (0, _i18n.__)('Write with calmness'),
|
|
86
|
-
handleToggling: false,
|
|
87
|
-
onToggle: toggleDistractionFree,
|
|
88
|
-
messageActivated: (0, _i18n.__)('Distraction free mode activated'),
|
|
89
|
-
messageDeactivated: (0, _i18n.__)('Distraction free mode deactivated'),
|
|
90
|
-
shortcut: _keycodes.displayShortcut.primaryShift('\\')
|
|
91
|
-
}), (0, _react.createElement)(_preferences.PreferenceToggleMenuItem, {
|
|
92
|
-
scope: "core",
|
|
93
|
-
name: "focusMode",
|
|
94
|
-
label: (0, _i18n.__)('Spotlight mode'),
|
|
95
|
-
info: (0, _i18n.__)('Focus on one block at a time'),
|
|
96
|
-
messageActivated: (0, _i18n.__)('Spotlight mode activated'),
|
|
97
|
-
messageDeactivated: (0, _i18n.__)('Spotlight mode deactivated')
|
|
98
|
-
})), (0, _react.createElement)(ModeSwitcher, null), (0, _react.createElement)(ActionItem.Slot, {
|
|
99
|
-
name: "core/plugin-more-menu",
|
|
100
|
-
label: (0, _i18n.__)('Plugins'),
|
|
101
|
-
as: _components.MenuGroup,
|
|
102
|
-
fillProps: {
|
|
103
|
-
onClick: onClose
|
|
104
|
-
}
|
|
105
|
-
}), (0, _react.createElement)(_components.MenuGroup, {
|
|
106
|
-
label: (0, _i18n.__)('Tools')
|
|
107
|
-
}, isBlockBasedTheme && (0, _react.createElement)(_siteExport.default, null), (0, _react.createElement)(_components.MenuItem, {
|
|
108
|
-
onClick: () => openModal('editor/keyboard-shortcut-help'),
|
|
109
|
-
shortcut: _keycodes.displayShortcut.access('h')
|
|
110
|
-
}, (0, _i18n.__)('Keyboard shortcuts')), (0, _react.createElement)(_welcomeGuideMenuItem.default, null), (0, _react.createElement)(_copyContentMenuItem.default, null), (0, _react.createElement)(_components.MenuItem, {
|
|
111
|
-
icon: _icons.external,
|
|
112
|
-
role: "menuitem",
|
|
113
|
-
href: (0, _i18n.__)('https://wordpress.org/documentation/article/site-editor/'),
|
|
114
|
-
target: "_blank",
|
|
115
|
-
rel: "noopener noreferrer"
|
|
116
|
-
}, (0, _i18n.__)('Help'), (0, _react.createElement)(_components.VisuallyHidden, {
|
|
117
|
-
as: "span"
|
|
118
|
-
}, /* translators: accessibility text */
|
|
119
|
-
(0, _i18n.__)('(opens in a new tab)'))), (0, _react.createElement)(_toolsMoreMenuGroup.default.Slot, {
|
|
120
|
-
fillProps: {
|
|
121
|
-
onClose
|
|
122
|
-
}
|
|
123
|
-
})), (0, _react.createElement)(_components.MenuGroup, null, (0, _react.createElement)(_components.MenuItem, {
|
|
124
|
-
onClick: () => openModal('editor/preferences')
|
|
125
|
-
}, (0, _i18n.__)('Preferences'))))), (0, _react.createElement)(PreferencesModal, null));
|
|
31
|
+
return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(ToolsMoreMenuGroup, null, isBlockBasedTheme && (0, _react.createElement)(_siteExport.default, null), (0, _react.createElement)(_welcomeGuideMenuItem.default, null)), (0, _react.createElement)(PreferencesModal, null));
|
|
126
32
|
}
|
|
127
33
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_data","_keycodes","_icons","_components","_preferences","_coreData","_editor","_toolsMoreMenuGroup","_interopRequireDefault","_siteExport","_welcomeGuideMenuItem","_copyContentMenuItem","_lockUnlock","ModeSwitcher","ActionItem","interfaceStore","PreferencesModal","unlock","editorPrivateApis","MoreMenu","showIconLabels","openModal","useDispatch","set","setPreference","preferencesStore","isBlockBasedTheme","useSelect","select","coreStore","getCurrentTheme","is_block_theme","toggleDistractionFree","editorStore","turnOffDistractionFree","_react","createElement","Fragment","DropdownMenu","icon","moreVertical","label","__","popoverProps","placement","className","toggleProps","showTooltip","variant","tooltipPosition","size","onClose","MenuGroup","_x","PreferenceToggleMenuItem","scope","name","onToggle","info","messageActivated","messageDeactivated","handleToggling","shortcut","displayShortcut","primaryShift","Slot","as","fillProps","onClick","default","MenuItem","access","external","role","href","target","rel","VisuallyHidden"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/more-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { external, moreVertical } from '@wordpress/icons';\nimport {\n\tMenuGroup,\n\tMenuItem,\n\tVisuallyHidden,\n\tDropdownMenu,\n} from '@wordpress/components';\nimport {\n\tPreferenceToggleMenuItem,\n\tstore as preferencesStore,\n} from '@wordpress/preferences';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport ToolsMoreMenuGroup from '../tools-more-menu-group';\nimport SiteExport from './site-export';\nimport WelcomeGuideMenuItem from './welcome-guide-menu-item';\nimport CopyContentMenuItem from './copy-content-menu-item';\nimport { unlock } from '../../../lock-unlock';\n\nconst { ModeSwitcher, ActionItem, interfaceStore, PreferencesModal } =\n\tunlock( editorPrivateApis );\n\nexport default function MoreMenu( { showIconLabels } ) {\n\tconst { openModal } = useDispatch( interfaceStore );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst isBlockBasedTheme = useSelect( ( select ) => {\n\t\treturn select( coreStore ).getCurrentTheme().is_block_theme;\n\t}, [] );\n\n\tconst { toggleDistractionFree } = useDispatch( editorStore );\n\n\tconst turnOffDistractionFree = () => {\n\t\tsetPreference( 'core', 'distractionFree', false );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'Options' ) }\n\t\t\t\tpopoverProps={ {\n\t\t\t\t\tplacement: 'bottom-end',\n\t\t\t\t\tclassName: 'more-menu-dropdown__content',\n\t\t\t\t} }\n\t\t\t\ttoggleProps={ {\n\t\t\t\t\tshowTooltip: ! showIconLabels,\n\t\t\t\t\t...( showIconLabels && { variant: 'tertiary' } ),\n\t\t\t\t\ttooltipPosition: 'bottom',\n\t\t\t\t\tsize: 'compact',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup label={ _x( 'View', 'noun' ) }>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"fixedToolbar\"\n\t\t\t\t\t\t\t\tonToggle={ turnOffDistractionFree }\n\t\t\t\t\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Access all block and document tools in a single place'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Top toolbar activated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Top toolbar deactivated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"distractionFree\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Distraction free' ) }\n\t\t\t\t\t\t\t\tinfo={ __( 'Write with calmness' ) }\n\t\t\t\t\t\t\t\thandleToggling={ false }\n\t\t\t\t\t\t\t\tonToggle={ toggleDistractionFree }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Distraction free mode activated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Distraction free mode deactivated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.primaryShift(\n\t\t\t\t\t\t\t\t\t'\\\\'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"focusMode\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Spotlight mode' ) }\n\t\t\t\t\t\t\t\tinfo={ __( 'Focus on one block at a time' ) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Spotlight mode activated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Spotlight mode deactivated'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<ModeSwitcher />\n\t\t\t\t\t\t<ActionItem.Slot\n\t\t\t\t\t\t\tname=\"core/plugin-more-menu\"\n\t\t\t\t\t\t\tlabel={ __( 'Plugins' ) }\n\t\t\t\t\t\t\tas={ MenuGroup }\n\t\t\t\t\t\t\tfillProps={ { onClick: onClose } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>\n\t\t\t\t\t\t\t{ isBlockBasedTheme && <SiteExport /> }\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\topenModal( 'editor/keyboard-shortcut-help' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.access( 'h' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Keyboard shortcuts' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<WelcomeGuideMenuItem />\n\t\t\t\t\t\t\t<CopyContentMenuItem />\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/site-editor/'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Help' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<ToolsMoreMenuGroup.Slot\n\t\t\t\t\t\t\t\tfillProps={ { onClose } }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\topenModal( 'editor/preferences' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Preferences' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t\t<PreferencesModal />\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAMA,IAAAK,YAAA,GAAAL,OAAA;AAIA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAQA,IAAAQ,mBAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,WAAA,GAAAD,sBAAA,CAAAT,OAAA;AACA,IAAAW,qBAAA,GAAAF,sBAAA,CAA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C,GAAG,EAAC;EAAqB,GAEvB,IAAAlC,QAAE,EAAE,MAAO,CAAC,EACd,IAAAP,MAAA,CAAAC,aAAA,EAACjC,WAAA,CAAA0E,cAAc;IAACX,EAAE,EAAC;EAAM,GAEvB;EACA,IAAAxB,QAAE,EAAE,sBAAuB,CAEb,CACP,CAAC,EACX,IAAAP,MAAA,CAAAC,aAAA,EAAC7B,mBAAA,CAAA8D,OAAkB,CAACJ,IAAI;IACvBE,SAAS,EAAG;MAAEhB;IAAQ;EAAG,CACzB,CACS,CAAC,EACZ,IAAAhB,MAAA,CAAAC,aAAA,EAACjC,WAAA,CAAAiD,SAAS,QACT,IAAAjB,MAAA,CAAAC,aAAA,EAACjC,WAAA,CAAAmE,QAAQ;IACRF,OAAO,EAAGA,CAAA,KACT/C,SAAS,CAAE,oBAAqB;EAChC,GAEC,IAAAqB,QAAE,EAAE,aAAc,CACX,CACA,CACV,CAEU,CAAC,EACf,IAAAP,MAAA,CAAAC,aAAA,EAACpB,gBAAgB,MAAE,CAClB,CAAC;AAEL","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_data","require","_coreData","_editor","_siteExport","_interopRequireDefault","_welcomeGuideMenuItem","_lockUnlock","ToolsMoreMenuGroup","PreferencesModal","unlock","editorPrivateApis","MoreMenu","isBlockBasedTheme","useSelect","select","coreStore","getCurrentTheme","is_block_theme","_react","createElement","Fragment","default"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/more-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport SiteExport from './site-export';\nimport WelcomeGuideMenuItem from './welcome-guide-menu-item';\nimport { unlock } from '../../../lock-unlock';\n\nconst { ToolsMoreMenuGroup, PreferencesModal } = unlock( editorPrivateApis );\n\nexport default function MoreMenu() {\n\tconst isBlockBasedTheme = useSelect( ( select ) => {\n\t\treturn select( coreStore ).getCurrentTheme().is_block_theme;\n\t}, [] );\n\n\treturn (\n\t\t<>\n\t\t\t<ToolsMoreMenuGroup>\n\t\t\t\t{ isBlockBasedTheme && <SiteExport /> }\n\t\t\t\t<WelcomeGuideMenuItem />\n\t\t\t</ToolsMoreMenuGroup>\n\t\t\t<PreferencesModal />\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAKA,IAAAG,WAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,qBAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAZA;AACA;AACA;;AAKA;AACA;AACA;;AAKA,MAAM;EAAEO,kBAAkB;EAAEC;AAAiB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAE7D,SAASC,QAAQA,CAAA,EAAG;EAClC,MAAMC,iBAAiB,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAClD,OAAOA,MAAM,CAAEC,eAAU,CAAC,CAACC,eAAe,CAAC,CAAC,CAACC,cAAc;EAC5D,CAAC,EAAE,EAAG,CAAC;EAEP,OACC,IAAAC,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAE,QAAA,QACC,IAAAF,MAAA,CAAAC,aAAA,EAACZ,kBAAkB,QAChBK,iBAAiB,IAAI,IAAAM,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAkB,OAAU,MAAE,CAAC,EACrC,IAAAH,MAAA,CAAAC,aAAA,EAACd,qBAAA,CAAAgB,OAAoB,MAAE,CACJ,CAAC,EACrB,IAAAH,MAAA,CAAAC,aAAA,EAACX,gBAAgB,MAAE,CAClB,CAAC;AAEL","ignoreList":[]}
|
|
@@ -27,55 +27,6 @@ function KeyboardShortcutsRegister() {
|
|
|
27
27
|
character: 's'
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
registerShortcut({
|
|
31
|
-
name: 'core/edit-site/next-region',
|
|
32
|
-
category: 'global',
|
|
33
|
-
description: (0, _i18n.__)('Navigate to the next part of the editor.'),
|
|
34
|
-
keyCombination: {
|
|
35
|
-
modifier: 'ctrl',
|
|
36
|
-
character: '`'
|
|
37
|
-
},
|
|
38
|
-
aliases: [{
|
|
39
|
-
modifier: 'access',
|
|
40
|
-
character: 'n'
|
|
41
|
-
}]
|
|
42
|
-
});
|
|
43
|
-
registerShortcut({
|
|
44
|
-
name: 'core/edit-site/previous-region',
|
|
45
|
-
category: 'global',
|
|
46
|
-
description: (0, _i18n.__)('Navigate to the previous part of the editor.'),
|
|
47
|
-
keyCombination: {
|
|
48
|
-
modifier: 'ctrlShift',
|
|
49
|
-
character: '`'
|
|
50
|
-
},
|
|
51
|
-
aliases: [{
|
|
52
|
-
modifier: 'access',
|
|
53
|
-
character: 'p'
|
|
54
|
-
}, {
|
|
55
|
-
modifier: 'ctrlShift',
|
|
56
|
-
character: '~'
|
|
57
|
-
}]
|
|
58
|
-
});
|
|
59
|
-
registerShortcut({
|
|
60
|
-
name: 'core/edit-site/transform-heading-to-paragraph',
|
|
61
|
-
category: 'block-library',
|
|
62
|
-
description: (0, _i18n.__)('Transform heading to paragraph.'),
|
|
63
|
-
keyCombination: {
|
|
64
|
-
modifier: 'access',
|
|
65
|
-
character: `0`
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
[1, 2, 3, 4, 5, 6].forEach(level => {
|
|
69
|
-
registerShortcut({
|
|
70
|
-
name: `core/edit-site/transform-paragraph-to-heading-${level}`,
|
|
71
|
-
category: 'block-library',
|
|
72
|
-
description: (0, _i18n.__)('Transform paragraph to heading.'),
|
|
73
|
-
keyCombination: {
|
|
74
|
-
modifier: 'access',
|
|
75
|
-
character: `${level}`
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
30
|
}, [registerShortcut]);
|
|
80
31
|
return null;
|
|
81
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_keyboardShortcuts","_data","_i18n","KeyboardShortcutsRegister","registerShortcut","useDispatch","keyboardShortcutsStore","useEffect","name","category","description","__","keyCombination","modifier","character","
|
|
1
|
+
{"version":3,"names":["_element","require","_keyboardShortcuts","_data","_i18n","KeyboardShortcutsRegister","registerShortcut","useDispatch","keyboardShortcutsStore","useEffect","name","category","description","__","keyCombination","modifier","character","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/keyboard-shortcuts/register.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\nfunction KeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/save',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Save your changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 's',\n\t\t\t},\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn null;\n}\n\nexport default KeyboardShortcutsRegister;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AANA;AACA;AACA;;AAMA,SAASI,yBAAyBA,CAAA,EAAG;EACpC;EACA,MAAM;IAAEC;EAAiB,CAAC,GAAG,IAAAC,iBAAW,EAAEC,wBAAuB,CAAC;EAClE,IAAAC,kBAAS,EAAE,MAAM;IAChBH,gBAAgB,CAAE;MACjBI,IAAI,EAAE,qBAAqB;MAC3BC,QAAQ,EAAE,QAAQ;MAClBC,WAAW,EAAE,IAAAC,QAAE,EAAE,oBAAqB,CAAC;MACvCC,cAAc,EAAE;QACfC,QAAQ,EAAE,SAAS;QACnBC,SAAS,EAAE;MACZ;IACD,CAAE,CAAC;EACJ,CAAC,EAAE,CAAEV,gBAAgB,CAAG,CAAC;EAEzB,OAAO,IAAI;AACZ;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcd,yBAAyB","ignoreList":[]}
|