@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
|
@@ -18,10 +18,6 @@ const POPOVER_PROPS = {
|
|
|
18
18
|
/**
|
|
19
19
|
* Internal dependencies
|
|
20
20
|
*/
|
|
21
|
-
import {
|
|
22
|
-
isPreviewingTheme,
|
|
23
|
-
currentlyPreviewingTheme,
|
|
24
|
-
} from '../../utils/is-previewing-theme';
|
|
25
21
|
import { unlock } from '../../lock-unlock';
|
|
26
22
|
|
|
27
23
|
const { useLocation, useHistory } = unlock( routerPrivateApis );
|
|
@@ -68,9 +64,6 @@ export default function LeafMoreMenu( props ) {
|
|
|
68
64
|
{
|
|
69
65
|
postType: attributes.type,
|
|
70
66
|
postId: attributes.id,
|
|
71
|
-
...( isPreviewingTheme() && {
|
|
72
|
-
wp_theme_preview: currentlyPreviewingTheme(),
|
|
73
|
-
} ),
|
|
74
67
|
},
|
|
75
68
|
{
|
|
76
69
|
backPath: params,
|
|
@@ -82,9 +75,6 @@ export default function LeafMoreMenu( props ) {
|
|
|
82
75
|
{
|
|
83
76
|
postType: 'page',
|
|
84
77
|
postId: attributes.id,
|
|
85
|
-
...( isPreviewingTheme() && {
|
|
86
|
-
wp_theme_preview: currentlyPreviewingTheme(),
|
|
87
|
-
} ),
|
|
88
78
|
},
|
|
89
79
|
{
|
|
90
80
|
backPath: params,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { __ } from '@wordpress/i18n';
|
|
4
|
+
import { __, sprintf } from '@wordpress/i18n';
|
|
5
5
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
6
6
|
import {
|
|
7
7
|
__experimentalVStack as VStack,
|
|
@@ -17,6 +17,7 @@ import { safeDecodeURIComponent, filterURLForDisplay } from '@wordpress/url';
|
|
|
17
17
|
import { useEffect, useCallback } from '@wordpress/element';
|
|
18
18
|
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
19
19
|
import { privateApis as editorPrivateApis } from '@wordpress/editor';
|
|
20
|
+
import { store as noticesStore } from '@wordpress/notices';
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* Internal dependencies
|
|
@@ -34,6 +35,7 @@ const { PostActions } = unlock( editorPrivateApis );
|
|
|
34
35
|
export default function SidebarNavigationScreenPage( { backPath } ) {
|
|
35
36
|
const { setCanvasMode } = unlock( useDispatch( editSiteStore ) );
|
|
36
37
|
const history = useHistory();
|
|
38
|
+
const { createSuccessNotice } = useDispatch( noticesStore );
|
|
37
39
|
const {
|
|
38
40
|
params: { postId },
|
|
39
41
|
} = useLocation();
|
|
@@ -83,16 +85,53 @@ export default function SidebarNavigationScreenPage( { backPath } ) {
|
|
|
83
85
|
|
|
84
86
|
const onActionPerformed = useCallback(
|
|
85
87
|
( actionId, items ) => {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
switch ( actionId ) {
|
|
89
|
+
case 'move-to-trash':
|
|
90
|
+
{
|
|
91
|
+
history.push( {
|
|
92
|
+
path: '/' + items[ 0 ].type,
|
|
93
|
+
postId: undefined,
|
|
94
|
+
postType: undefined,
|
|
95
|
+
canvas: 'view',
|
|
96
|
+
} );
|
|
97
|
+
}
|
|
98
|
+
break;
|
|
99
|
+
case 'duplicate-post':
|
|
100
|
+
{
|
|
101
|
+
const newItem = items[ 0 ];
|
|
102
|
+
const title =
|
|
103
|
+
typeof newItem.title === 'string'
|
|
104
|
+
? newItem.title
|
|
105
|
+
: newItem.title?.rendered;
|
|
106
|
+
createSuccessNotice(
|
|
107
|
+
sprintf(
|
|
108
|
+
// translators: %s: Title of the created post e.g: "Post 1".
|
|
109
|
+
__( '"%s" successfully created.' ),
|
|
110
|
+
title
|
|
111
|
+
),
|
|
112
|
+
{
|
|
113
|
+
type: 'snackbar',
|
|
114
|
+
id: 'duplicate-post-action',
|
|
115
|
+
actions: [
|
|
116
|
+
{
|
|
117
|
+
label: __( 'Edit' ),
|
|
118
|
+
onClick: () => {
|
|
119
|
+
history.push( {
|
|
120
|
+
path: undefined,
|
|
121
|
+
postId: newItem.id,
|
|
122
|
+
postType: newItem.type,
|
|
123
|
+
canvas: 'edit',
|
|
124
|
+
} );
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
break;
|
|
93
132
|
}
|
|
94
133
|
},
|
|
95
|
-
[ history ]
|
|
134
|
+
[ history, createSuccessNotice ]
|
|
96
135
|
);
|
|
97
136
|
|
|
98
137
|
const featureImageAltText = featuredMediaAltText
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
4
|
+
import clsx from 'clsx';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -58,7 +58,7 @@ export default function StatusLabel( { status, date, short } ) {
|
|
|
58
58
|
|
|
59
59
|
return (
|
|
60
60
|
<div
|
|
61
|
-
className={
|
|
61
|
+
className={ clsx(
|
|
62
62
|
'edit-site-sidebar-navigation-screen-page__status',
|
|
63
63
|
{
|
|
64
64
|
[ `has-status has-${ status }-status` ]: !! status,
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import { useDispatch } from '@wordpress/data';
|
|
5
5
|
import { __ } from '@wordpress/i18n';
|
|
6
6
|
import { pencil } from '@wordpress/icons';
|
|
7
|
-
import { getQueryArgs } from '@wordpress/url';
|
|
8
7
|
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -17,31 +16,21 @@ import usePatternDetails from './use-pattern-details';
|
|
|
17
16
|
import { store as editSiteStore } from '../../store';
|
|
18
17
|
import { unlock } from '../../lock-unlock';
|
|
19
18
|
import TemplateActions from '../template-actions';
|
|
20
|
-
import { TEMPLATE_PART_POST_TYPE } from '../../utils/constants';
|
|
21
19
|
|
|
22
20
|
const { useLocation, useHistory } = unlock( routerPrivateApis );
|
|
23
21
|
|
|
24
|
-
export default function SidebarNavigationScreenPattern() {
|
|
22
|
+
export default function SidebarNavigationScreenPattern( { backPath } ) {
|
|
25
23
|
const history = useHistory();
|
|
26
24
|
const location = useLocation();
|
|
27
25
|
const {
|
|
28
26
|
params: { postType, postId },
|
|
29
27
|
} = location;
|
|
30
|
-
const { categoryType } = getQueryArgs( window.location.href );
|
|
31
28
|
const { setCanvasMode } = unlock( useDispatch( editSiteStore ) );
|
|
32
29
|
|
|
33
30
|
useInitEditedEntityFromURL();
|
|
34
31
|
|
|
35
32
|
const patternDetails = usePatternDetails( postType, postId );
|
|
36
33
|
|
|
37
|
-
// The absence of a category type in the query params for template parts
|
|
38
|
-
// indicates the user has arrived at the template part via the "manage all"
|
|
39
|
-
// page and the back button should return them to that list page.
|
|
40
|
-
const backPath =
|
|
41
|
-
! categoryType && postType === TEMPLATE_PART_POST_TYPE
|
|
42
|
-
? { path: '/wp_template_part/all' }
|
|
43
|
-
: { path: '/patterns' };
|
|
44
|
-
|
|
45
34
|
return (
|
|
46
35
|
<SidebarNavigationScreen
|
|
47
36
|
actions={
|
|
@@ -10,7 +10,9 @@ import TemplatePartNavigationMenu from './template-part-navigation-menu';
|
|
|
10
10
|
import TemplatePartNavigationMenuList from './template-part-navigation-menu-list';
|
|
11
11
|
|
|
12
12
|
export default function TemplatePartNavigationMenus( { menus } ) {
|
|
13
|
-
if ( ! menus.length )
|
|
13
|
+
if ( ! menus.length ) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
14
16
|
|
|
15
17
|
// if there is a single menu then render TemplatePartNavigationMenu
|
|
16
18
|
if ( menus.length === 1 ) {
|
|
@@ -14,7 +14,7 @@ import { useSelect } from '@wordpress/data';
|
|
|
14
14
|
/**
|
|
15
15
|
* Internal dependencies
|
|
16
16
|
*/
|
|
17
|
-
import { useAddedBy } from '../page-templates
|
|
17
|
+
import { useAddedBy } from '../page-templates/hooks';
|
|
18
18
|
import useEditedEntityRecord from '../use-edited-entity-record';
|
|
19
19
|
import useNavigationMenuContent from './use-navigation-menu-content';
|
|
20
20
|
import SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';
|
|
@@ -5,32 +5,33 @@ import {
|
|
|
5
5
|
__experimentalItemGroup as ItemGroup,
|
|
6
6
|
__experimentalItem as Item,
|
|
7
7
|
} from '@wordpress/components';
|
|
8
|
-
import { useViewportMatch } from '@wordpress/compose';
|
|
9
8
|
import { getTemplatePartIcon } from '@wordpress/editor';
|
|
10
9
|
import { __ } from '@wordpress/i18n';
|
|
11
|
-
import { getQueryArgs } from '@wordpress/url';
|
|
12
10
|
import { store as coreStore } from '@wordpress/core-data';
|
|
13
11
|
import { useSelect } from '@wordpress/data';
|
|
14
12
|
import { file } from '@wordpress/icons';
|
|
13
|
+
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
15
14
|
|
|
16
15
|
/**
|
|
17
16
|
* Internal dependencies
|
|
18
17
|
*/
|
|
19
18
|
import AddNewPattern from '../add-new-pattern';
|
|
20
|
-
import SidebarNavigationItem from '../sidebar-navigation-item';
|
|
21
19
|
import SidebarNavigationScreen from '../sidebar-navigation-screen';
|
|
22
20
|
import CategoryItem from './category-item';
|
|
23
21
|
import {
|
|
24
22
|
PATTERN_DEFAULT_CATEGORY,
|
|
25
23
|
PATTERN_TYPES,
|
|
26
24
|
TEMPLATE_PART_POST_TYPE,
|
|
25
|
+
TEMPLATE_PART_ALL_AREAS_CATEGORY,
|
|
27
26
|
} from '../../utils/constants';
|
|
28
|
-
import { useLink } from '../routes/link';
|
|
29
27
|
import usePatternCategories from './use-pattern-categories';
|
|
30
28
|
import useTemplatePartAreas from './use-template-part-areas';
|
|
31
|
-
import {
|
|
29
|
+
import { unlock } from '../../lock-unlock';
|
|
30
|
+
|
|
31
|
+
const { useLocation } = unlock( routerPrivateApis );
|
|
32
32
|
|
|
33
33
|
function CategoriesGroup( {
|
|
34
|
+
path,
|
|
34
35
|
templatePartAreas,
|
|
35
36
|
patternCategories,
|
|
36
37
|
currentCategory,
|
|
@@ -42,15 +43,16 @@ function CategoriesGroup( {
|
|
|
42
43
|
<ItemGroup className="edit-site-sidebar-navigation-screen-patterns__group">
|
|
43
44
|
<CategoryItem
|
|
44
45
|
key="all"
|
|
46
|
+
path={ path }
|
|
45
47
|
count={ Object.values( templatePartAreas )
|
|
46
48
|
.map( ( { templateParts } ) => templateParts?.length || 0 )
|
|
47
49
|
.reduce( ( acc, val ) => acc + val, 0 ) }
|
|
48
50
|
icon={ getTemplatePartIcon() } /* no name, so it provides the fallback icon */
|
|
49
51
|
label={ __( 'All template parts' ) }
|
|
50
|
-
id={
|
|
52
|
+
id={ TEMPLATE_PART_ALL_AREAS_CATEGORY }
|
|
51
53
|
type={ TEMPLATE_PART_POST_TYPE }
|
|
52
54
|
isActive={
|
|
53
|
-
currentCategory ===
|
|
55
|
+
currentCategory === TEMPLATE_PART_ALL_AREAS_CATEGORY &&
|
|
54
56
|
currentType === TEMPLATE_PART_POST_TYPE
|
|
55
57
|
}
|
|
56
58
|
/>
|
|
@@ -58,6 +60,7 @@ function CategoriesGroup( {
|
|
|
58
60
|
( [ area, { label, templateParts } ] ) => (
|
|
59
61
|
<CategoryItem
|
|
60
62
|
key={ area }
|
|
63
|
+
path={ path }
|
|
61
64
|
count={ templateParts?.length }
|
|
62
65
|
icon={ getTemplatePartIcon( area ) }
|
|
63
66
|
label={ label }
|
|
@@ -74,6 +77,7 @@ function CategoriesGroup( {
|
|
|
74
77
|
{ allPatterns && (
|
|
75
78
|
<CategoryItem
|
|
76
79
|
key={ allPatterns.name }
|
|
80
|
+
path={ path }
|
|
77
81
|
count={ allPatterns.count }
|
|
78
82
|
label={ allPatterns.label }
|
|
79
83
|
icon={ file }
|
|
@@ -89,6 +93,7 @@ function CategoriesGroup( {
|
|
|
89
93
|
{ otherPatterns.map( ( category ) => (
|
|
90
94
|
<CategoryItem
|
|
91
95
|
key={ category.name }
|
|
96
|
+
path={ path }
|
|
92
97
|
count={ category.count }
|
|
93
98
|
label={ category.label }
|
|
94
99
|
icon={ file }
|
|
@@ -105,9 +110,10 @@ function CategoriesGroup( {
|
|
|
105
110
|
);
|
|
106
111
|
}
|
|
107
112
|
|
|
108
|
-
export default function SidebarNavigationScreenPatterns() {
|
|
109
|
-
const
|
|
110
|
-
|
|
113
|
+
export default function SidebarNavigationScreenPatterns( { backPath } ) {
|
|
114
|
+
const {
|
|
115
|
+
params: { categoryType, categoryId, path },
|
|
116
|
+
} = useLocation();
|
|
111
117
|
const currentCategory = categoryId || PATTERN_DEFAULT_CATEGORY;
|
|
112
118
|
const currentType = categoryType || PATTERN_TYPES.theme;
|
|
113
119
|
|
|
@@ -118,28 +124,6 @@ export default function SidebarNavigationScreenPatterns() {
|
|
|
118
124
|
( select ) => select( coreStore ).getCurrentTheme()?.is_block_theme,
|
|
119
125
|
[]
|
|
120
126
|
);
|
|
121
|
-
const isTemplatePartsMode = useSelect( ( select ) => {
|
|
122
|
-
const settings = select( editSiteStore ).getSettings();
|
|
123
|
-
return !! settings.supportsTemplatePartsMode;
|
|
124
|
-
}, [] );
|
|
125
|
-
|
|
126
|
-
const templatePartsLink = useLink( {
|
|
127
|
-
path: '/wp_template_part/all',
|
|
128
|
-
// If a classic theme that supports template parts accessed
|
|
129
|
-
// the Patterns page directly, preserve that state in the URL.
|
|
130
|
-
didAccessPatternsPage:
|
|
131
|
-
! isBlockBasedTheme && isTemplatePartsMode ? 1 : undefined,
|
|
132
|
-
} );
|
|
133
|
-
|
|
134
|
-
const footer = ! isMobileViewport ? (
|
|
135
|
-
<ItemGroup>
|
|
136
|
-
{ ( isBlockBasedTheme || isTemplatePartsMode ) && (
|
|
137
|
-
<SidebarNavigationItem withChevron { ...templatePartsLink }>
|
|
138
|
-
{ __( 'Manage all template parts' ) }
|
|
139
|
-
</SidebarNavigationItem>
|
|
140
|
-
) }
|
|
141
|
-
</ItemGroup>
|
|
142
|
-
) : undefined;
|
|
143
127
|
|
|
144
128
|
return (
|
|
145
129
|
<SidebarNavigationScreen
|
|
@@ -148,23 +132,20 @@ export default function SidebarNavigationScreenPatterns() {
|
|
|
148
132
|
description={ __(
|
|
149
133
|
'Manage what patterns are available when editing the site.'
|
|
150
134
|
) }
|
|
135
|
+
backPath={ backPath }
|
|
151
136
|
actions={ <AddNewPattern /> }
|
|
152
|
-
footer={ footer }
|
|
153
137
|
content={
|
|
154
138
|
<>
|
|
155
|
-
{ isLoading && __( 'Loading
|
|
139
|
+
{ isLoading && __( 'Loading items…' ) }
|
|
156
140
|
{ ! isLoading && (
|
|
157
141
|
<>
|
|
158
142
|
{ ! hasTemplateParts && ! hasPatterns && (
|
|
159
143
|
<ItemGroup className="edit-site-sidebar-navigation-screen-patterns__group">
|
|
160
|
-
<Item>
|
|
161
|
-
{ __(
|
|
162
|
-
'No template parts or patterns found'
|
|
163
|
-
) }
|
|
164
|
-
</Item>
|
|
144
|
+
<Item>{ __( 'No items found' ) }</Item>
|
|
165
145
|
</ItemGroup>
|
|
166
146
|
) }
|
|
167
147
|
<CategoriesGroup
|
|
148
|
+
path={ path }
|
|
168
149
|
templatePartAreas={ templatePartAreas }
|
|
169
150
|
patternCategories={ patternCategories }
|
|
170
151
|
currentCategory={ currentCategory }
|
|
@@ -17,7 +17,7 @@ import useEditedEntityRecord from '../use-edited-entity-record';
|
|
|
17
17
|
import { unlock } from '../../lock-unlock';
|
|
18
18
|
import { store as editSiteStore } from '../../store';
|
|
19
19
|
import SidebarButton from '../sidebar-button';
|
|
20
|
-
import { useAddedBy } from '../page-templates
|
|
20
|
+
import { useAddedBy } from '../page-templates/hooks';
|
|
21
21
|
import TemplateActions from '../template-actions';
|
|
22
22
|
import HomeTemplateDetails from './home-template-details';
|
|
23
23
|
import SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';
|
|
@@ -94,7 +94,7 @@ function useTemplateDetails( postType, postId ) {
|
|
|
94
94
|
return { title, description, content, footer };
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
export default function SidebarNavigationScreenTemplate() {
|
|
97
|
+
export default function SidebarNavigationScreenTemplate( { backPath } ) {
|
|
98
98
|
const history = useHistory();
|
|
99
99
|
const {
|
|
100
100
|
params: { postType, postId },
|
|
@@ -108,6 +108,7 @@ export default function SidebarNavigationScreenTemplate() {
|
|
|
108
108
|
return (
|
|
109
109
|
<SidebarNavigationScreen
|
|
110
110
|
title={ title }
|
|
111
|
+
backPath={ backPath }
|
|
111
112
|
actions={
|
|
112
113
|
<>
|
|
113
114
|
<TemplateActions
|
|
@@ -9,8 +9,9 @@ import { __experimentalItemGroup as ItemGroup } from '@wordpress/components';
|
|
|
9
9
|
* Internal dependencies
|
|
10
10
|
*/
|
|
11
11
|
import DataViewItem from '../sidebar-dataviews/dataview-item';
|
|
12
|
-
import { useAddedBy } from '../page-templates
|
|
12
|
+
import { useAddedBy } from '../page-templates/hooks';
|
|
13
13
|
import { layout } from '@wordpress/icons';
|
|
14
|
+
import { TEMPLATE_POST_TYPE } from '../../utils/constants';
|
|
14
15
|
|
|
15
16
|
const EMPTY_ARRAY = [];
|
|
16
17
|
|
|
@@ -30,10 +31,9 @@ function TemplateDataviewItem( { template, isActive } ) {
|
|
|
30
31
|
|
|
31
32
|
export default function DataviewsTemplatesSidebarContent( {
|
|
32
33
|
activeView,
|
|
33
|
-
postType,
|
|
34
34
|
title,
|
|
35
35
|
} ) {
|
|
36
|
-
const { records } = useEntityRecords( 'postType',
|
|
36
|
+
const { records } = useEntityRecords( 'postType', TEMPLATE_POST_TYPE, {
|
|
37
37
|
per_page: -1,
|
|
38
38
|
} );
|
|
39
39
|
const firstItemPerAuthorText = useMemo( () => {
|
|
@@ -2,64 +2,33 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
|
-
import { useSelect } from '@wordpress/data';
|
|
6
5
|
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* Internal dependencies
|
|
10
9
|
*/
|
|
11
10
|
import SidebarNavigationScreen from '../sidebar-navigation-screen';
|
|
12
|
-
import { store as editSiteStore } from '../../store';
|
|
13
|
-
import {
|
|
14
|
-
TEMPLATE_POST_TYPE,
|
|
15
|
-
TEMPLATE_PART_POST_TYPE,
|
|
16
|
-
} from '../../utils/constants';
|
|
17
11
|
import { unlock } from '../../lock-unlock';
|
|
18
12
|
import DataviewsTemplatesSidebarContent from './content';
|
|
19
13
|
|
|
20
|
-
const config = {
|
|
21
|
-
[ TEMPLATE_POST_TYPE ]: {
|
|
22
|
-
title: __( 'Manage templates' ),
|
|
23
|
-
description: __(
|
|
24
|
-
'Create new templates, or reset any customizations made to the templates supplied by your theme.'
|
|
25
|
-
),
|
|
26
|
-
contentTitle: __( 'All templates' ),
|
|
27
|
-
},
|
|
28
|
-
[ TEMPLATE_PART_POST_TYPE ]: {
|
|
29
|
-
title: __( 'Manage template parts' ),
|
|
30
|
-
description: __(
|
|
31
|
-
'Create new template parts, or reset any customizations made to the template parts supplied by your theme.'
|
|
32
|
-
),
|
|
33
|
-
backPath: { path: '/patterns' },
|
|
34
|
-
contentTitle: __( 'All template parts' ),
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
|
|
38
14
|
const { useLocation } = unlock( routerPrivateApis );
|
|
39
15
|
|
|
40
|
-
export default function SidebarNavigationScreenTemplatesBrowse( {
|
|
16
|
+
export default function SidebarNavigationScreenTemplatesBrowse( { backPath } ) {
|
|
41
17
|
const {
|
|
42
|
-
params: {
|
|
18
|
+
params: { activeView = 'all' },
|
|
43
19
|
} = useLocation();
|
|
44
20
|
|
|
45
|
-
const isTemplatePartsMode = useSelect( ( select ) => {
|
|
46
|
-
return !! select( editSiteStore ).getSettings()
|
|
47
|
-
.supportsTemplatePartsMode;
|
|
48
|
-
}, [] );
|
|
49
|
-
|
|
50
21
|
return (
|
|
51
22
|
<SidebarNavigationScreen
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
backPath={ config[ postType ].backPath }
|
|
23
|
+
title={ __( 'Manage templates' ) }
|
|
24
|
+
description={ __(
|
|
25
|
+
'Create new templates, or reset any customizations made to the templates supplied by your theme.'
|
|
26
|
+
) }
|
|
27
|
+
backPath={ backPath }
|
|
58
28
|
content={
|
|
59
29
|
<DataviewsTemplatesSidebarContent
|
|
60
30
|
activeView={ activeView }
|
|
61
|
-
|
|
62
|
-
title={ config[ postType ].contentTitle }
|
|
31
|
+
title={ __( 'All templates' ) }
|
|
63
32
|
/>
|
|
64
33
|
}
|
|
65
34
|
/>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
4
|
+
import clsx from 'clsx';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -87,7 +87,7 @@ const SiteHub = memo( ( { isTransparent, className } ) => {
|
|
|
87
87
|
|
|
88
88
|
return (
|
|
89
89
|
<motion.div
|
|
90
|
-
className={
|
|
90
|
+
className={ clsx( 'edit-site-site-hub', className ) }
|
|
91
91
|
variants={ {
|
|
92
92
|
isDistractionFree: { x: '-100%' },
|
|
93
93
|
isDistractionFreeHovering: { x: 0 },
|
|
@@ -103,7 +103,7 @@ const SiteHub = memo( ( { isTransparent, className } ) => {
|
|
|
103
103
|
>
|
|
104
104
|
<HStack justify="flex-start" spacing="0">
|
|
105
105
|
<motion.div
|
|
106
|
-
className={
|
|
106
|
+
className={ clsx(
|
|
107
107
|
'edit-site-site-hub__view-mode-toggle-container',
|
|
108
108
|
{
|
|
109
109
|
'has-transparent-background': isTransparent,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
4
|
+
import clsx from 'clsx';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -42,7 +42,7 @@ function SiteIcon( { className } ) {
|
|
|
42
42
|
);
|
|
43
43
|
|
|
44
44
|
return (
|
|
45
|
-
<div className={
|
|
45
|
+
<div className={ clsx( className, 'edit-site-site-icon' ) }>
|
|
46
46
|
{ icon }
|
|
47
47
|
</div>
|
|
48
48
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
4
|
+
import clsx from 'clsx';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
__unstableEditorStyles as EditorStyles,
|
|
25
25
|
__unstableIframe as Iframe,
|
|
26
26
|
} from '@wordpress/block-editor';
|
|
27
|
+
import { privateApis as editorPrivateApis } from '@wordpress/editor';
|
|
27
28
|
import { useSelect } from '@wordpress/data';
|
|
28
29
|
import { useResizeObserver } from '@wordpress/compose';
|
|
29
30
|
import { useMemo, useState, memo, useContext } from '@wordpress/element';
|
|
@@ -34,7 +35,6 @@ import { ENTER, SPACE } from '@wordpress/keycodes';
|
|
|
34
35
|
*/
|
|
35
36
|
import { unlock } from '../../lock-unlock';
|
|
36
37
|
import EditorCanvasContainer from '../editor-canvas-container';
|
|
37
|
-
import { mergeBaseAndUserConfigs } from '../global-styles/global-styles-provider';
|
|
38
38
|
|
|
39
39
|
const {
|
|
40
40
|
ExperimentalBlockEditorProvider,
|
|
@@ -42,6 +42,7 @@ const {
|
|
|
42
42
|
GlobalStylesContext,
|
|
43
43
|
useGlobalStylesOutputWithConfig,
|
|
44
44
|
} = unlock( blockEditorPrivateApis );
|
|
45
|
+
const { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );
|
|
45
46
|
|
|
46
47
|
const {
|
|
47
48
|
CompositeV2: Composite,
|
|
@@ -240,7 +241,7 @@ function StyleBook( {
|
|
|
240
241
|
closeButtonLabel={ showCloseButton ? __( 'Close' ) : null }
|
|
241
242
|
>
|
|
242
243
|
<div
|
|
243
|
-
className={
|
|
244
|
+
className={ clsx( 'edit-site-style-book', {
|
|
244
245
|
'is-wide': sizes.width > 600,
|
|
245
246
|
'is-button': !! onClick,
|
|
246
247
|
} ) }
|
|
@@ -343,7 +344,7 @@ const StyleBookBody = ( {
|
|
|
343
344
|
|
|
344
345
|
return (
|
|
345
346
|
<Iframe
|
|
346
|
-
className={
|
|
347
|
+
className={ clsx( 'edit-site-style-book__iframe', {
|
|
347
348
|
'is-focused': isFocused && !! onClick,
|
|
348
349
|
'is-button': !! onClick,
|
|
349
350
|
} ) }
|
|
@@ -363,7 +364,7 @@ const StyleBookBody = ( {
|
|
|
363
364
|
}
|
|
364
365
|
</style>
|
|
365
366
|
<Examples
|
|
366
|
-
className={
|
|
367
|
+
className={ clsx( 'edit-site-style-book__examples', {
|
|
367
368
|
'is-wide': sizes.width > 600,
|
|
368
369
|
} ) }
|
|
369
370
|
examples={ examples }
|
|
@@ -441,7 +442,7 @@ const Example = ( { id, title, blocks, isSelected, onClick } ) => {
|
|
|
441
442
|
<div role="row">
|
|
442
443
|
<div role="gridcell">
|
|
443
444
|
<CompositeItem
|
|
444
|
-
className={
|
|
445
|
+
className={ clsx( 'edit-site-style-book__example', {
|
|
445
446
|
'is-selected': isSelected,
|
|
446
447
|
} ) }
|
|
447
448
|
id={ id }
|
|
@@ -226,10 +226,6 @@ function useResolveEditedEntityAndContext( { path, postId, postType } ) {
|
|
|
226
226
|
return { isReady: true, postType: 'wp_template', postId, context };
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
if ( path === '/wp_template_part/all' && postId ) {
|
|
230
|
-
return { isReady: true, postType: 'wp_template_part', postId, context };
|
|
231
|
-
}
|
|
232
|
-
|
|
233
229
|
if ( postTypesWithoutParentTemplate.includes( postType ) ) {
|
|
234
230
|
return { isReady: true, postType, postId, context };
|
|
235
231
|
}
|
|
@@ -135,7 +135,7 @@ function ResetMenuItem( { template, onClose } ) {
|
|
|
135
135
|
onCancel={ () => setIsModalOpen( false ) }
|
|
136
136
|
confirmButtonText={ __( 'Reset' ) }
|
|
137
137
|
>
|
|
138
|
-
{ __( '
|
|
138
|
+
{ __( 'Reset to default and clear all customizations?' ) }
|
|
139
139
|
</ConfirmDialog>
|
|
140
140
|
</>
|
|
141
141
|
);
|
|
@@ -27,12 +27,25 @@ export default function TemplatePartConverter() {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
function TemplatePartConverterMenuItem( { clientIds, onClose } ) {
|
|
30
|
-
const blocks = useSelect(
|
|
31
|
-
( select ) =>
|
|
32
|
-
|
|
30
|
+
const { isContentOnly, blocks } = useSelect(
|
|
31
|
+
( select ) => {
|
|
32
|
+
const { getBlocksByClientId, getBlockEditingMode } =
|
|
33
|
+
select( blockEditorStore );
|
|
34
|
+
return {
|
|
35
|
+
blocks: getBlocksByClientId( clientIds ),
|
|
36
|
+
isContentOnly:
|
|
37
|
+
clientIds.length === 1 &&
|
|
38
|
+
getBlockEditingMode( clientIds[ 0 ] ) === 'contentOnly',
|
|
39
|
+
};
|
|
40
|
+
},
|
|
33
41
|
[ clientIds ]
|
|
34
42
|
);
|
|
35
43
|
|
|
44
|
+
// Do not show the convert button if the block is in content-only mode.
|
|
45
|
+
if ( isContentOnly ) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
|
|
36
49
|
// Allow converting a single template part to standard blocks.
|
|
37
50
|
if ( blocks.length === 1 && blocks[ 0 ]?.name === 'core/template-part' ) {
|
|
38
51
|
return (
|