@wordpress/edit-site 5.12.5 → 5.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/add-new-template/new-template.js +1 -1
- package/build/components/add-new-template/new-template.js.map +1 -1
- package/build/components/block-editor/editor-canvas.js +1 -1
- package/build/components/block-editor/editor-canvas.js.map +1 -1
- package/build/components/block-editor/use-site-editor-settings.js +10 -5
- package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build/components/create-pattern-modal/index.js +8 -8
- package/build/components/create-pattern-modal/index.js.map +1 -1
- package/build/components/global-styles/palette.js +1 -1
- package/build/components/global-styles/palette.js.map +1 -1
- package/build/components/header-edit-mode/document-actions/index.js +9 -1
- package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
- package/build/components/header-edit-mode/index.js +6 -2
- package/build/components/header-edit-mode/index.js.map +1 -1
- package/build/components/layout/index.js +1 -1
- package/build/components/layout/index.js.map +1 -1
- package/build/components/page/header.js +1 -1
- package/build/components/page/header.js.map +1 -1
- package/build/components/page/index.js +3 -1
- package/build/components/page/index.js.map +1 -1
- package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js +5 -5
- package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -1
- package/build/components/page-main/index.js +8 -4
- package/build/components/page-main/index.js.map +1 -1
- package/build/components/{page-library → page-patterns}/grid-item.js +52 -27
- package/build/components/page-patterns/grid-item.js.map +1 -0
- package/build/components/{page-library → page-patterns}/grid.js +1 -1
- package/build/components/page-patterns/grid.js.map +1 -0
- package/build/components/{page-library → page-patterns}/index.js +6 -6
- package/build/components/page-patterns/index.js.map +1 -0
- package/build/components/{page-library → page-patterns}/no-patterns.js +1 -1
- package/build/components/page-patterns/no-patterns.js.map +1 -0
- package/build/components/{page-library → page-patterns}/patterns-list.js +9 -9
- package/build/components/page-patterns/patterns-list.js.map +1 -0
- package/build/components/page-patterns/search-items.js.map +1 -0
- package/build/components/{page-library/use-library-settings.js → page-patterns/use-pattern-settings.js} +3 -3
- package/build/components/page-patterns/use-pattern-settings.js.map +1 -0
- package/build/components/{page-library → page-patterns}/use-patterns.js +4 -2
- package/build/components/page-patterns/use-patterns.js.map +1 -0
- package/build/components/{page-library → page-patterns}/utils.js +3 -3
- package/build/components/page-patterns/utils.js.map +1 -0
- package/build/components/page-template-parts/index.js +103 -0
- package/build/components/page-template-parts/index.js.map +1 -0
- package/build/components/page-templates/index.js +1 -0
- package/build/components/page-templates/index.js.map +1 -1
- package/build/components/sidebar/index.js +6 -6
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-content.js +4 -3
- package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
- package/build/components/sidebar-edit-mode/settings-header/index.js +7 -1
- package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.js +63 -11
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/index.js +5 -3
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/template-part-hint.js +45 -0
- package/build/components/sidebar-navigation-screen-main/template-part-hint.js.map +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js +10 -11
- package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js +2 -4
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +6 -2
- 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 -4
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/status-label.js +1 -1
- package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pages/index.js +1 -1
- package/build/components/sidebar-navigation-screen-pages/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/index.js +13 -8
- package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +25 -2
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
- package/build/components/{sidebar-navigation-screen-library → sidebar-navigation-screen-patterns}/category-item.js +3 -3
- package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -0
- package/build/components/sidebar-navigation-screen-patterns/index.js +177 -0
- package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -0
- package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -0
- package/build/components/sidebar-navigation-screen-patterns/use-my-patterns.js +30 -0
- package/build/components/sidebar-navigation-screen-patterns/use-my-patterns.js.map +1 -0
- package/build/components/{sidebar-navigation-screen-library → sidebar-navigation-screen-patterns}/use-pattern-categories.js +2 -20
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -0
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +52 -0
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -0
- package/build/components/{sidebar-navigation-screen-library → sidebar-navigation-screen-patterns}/use-theme-patterns.js +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -0
- package/build/components/sidebar-navigation-screen-templates/index.js +11 -63
- package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/index.js +4 -2
- package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build/components/site-hub/index.js +1 -1
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-sync-path-with-url.js +1 -1
- package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
- package/build/components/template-actions/index.js +22 -6
- package/build/components/template-actions/index.js.map +1 -1
- package/build/components/welcome-guide/editor.js +1 -1
- package/build/components/welcome-guide/editor.js.map +1 -1
- package/build/components/welcome-guide/index.js +5 -1
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/components/welcome-guide/page.js +70 -0
- package/build/components/welcome-guide/page.js.map +1 -0
- package/build/components/welcome-guide/styles.js +1 -1
- package/build/components/welcome-guide/styles.js.map +1 -1
- package/build/components/welcome-guide/template.js +71 -0
- package/build/components/welcome-guide/template.js.map +1 -0
- package/build/hooks/commands/use-common-commands.js +17 -2
- package/build/hooks/commands/use-common-commands.js.map +1 -1
- package/build/hooks/commands/use-edit-mode-commands.js +3 -3
- package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
- package/build/index.js +2 -0
- package/build/index.js.map +1 -1
- package/build/store/actions.js +5 -2
- package/build/store/actions.js.map +1 -1
- package/build/store/private-actions.js +7 -1
- package/build/store/private-actions.js.map +1 -1
- package/build/utils/get-is-list-page.js +2 -2
- package/build/utils/get-is-list-page.js.map +1 -1
- package/build-module/components/add-new-template/new-template.js +2 -2
- package/build-module/components/add-new-template/new-template.js.map +1 -1
- package/build-module/components/block-editor/editor-canvas.js +1 -1
- package/build-module/components/block-editor/editor-canvas.js.map +1 -1
- package/build-module/components/block-editor/use-site-editor-settings.js +10 -5
- package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build-module/components/create-pattern-modal/index.js +8 -8
- package/build-module/components/create-pattern-modal/index.js.map +1 -1
- package/build-module/components/global-styles/palette.js +1 -1
- package/build-module/components/global-styles/palette.js.map +1 -1
- package/build-module/components/header-edit-mode/document-actions/index.js +10 -2
- package/build-module/components/header-edit-mode/document-actions/index.js.map +1 -1
- package/build-module/components/header-edit-mode/index.js +6 -2
- package/build-module/components/header-edit-mode/index.js.map +1 -1
- package/build-module/components/layout/index.js +1 -1
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/page/header.js +1 -1
- package/build-module/components/page/header.js.map +1 -1
- package/build-module/components/page/index.js +2 -1
- package/build-module/components/page/index.js.map +1 -1
- package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js +5 -3
- package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -1
- package/build-module/components/page-main/index.js +6 -3
- package/build-module/components/page-main/index.js.map +1 -1
- package/build-module/components/{page-library → page-patterns}/grid-item.js +56 -29
- package/build-module/components/page-patterns/grid-item.js.map +1 -0
- package/build-module/components/{page-library → page-patterns}/grid.js +1 -1
- package/build-module/components/page-patterns/grid.js.map +1 -0
- package/build-module/components/{page-library → page-patterns}/index.js +5 -5
- package/build-module/components/page-patterns/index.js.map +1 -0
- package/build-module/components/{page-library → page-patterns}/no-patterns.js +1 -1
- package/build-module/components/page-patterns/no-patterns.js.map +1 -0
- package/build-module/components/{page-library → page-patterns}/patterns-list.js +9 -9
- package/build-module/components/page-patterns/patterns-list.js.map +1 -0
- package/build-module/components/page-patterns/search-items.js.map +1 -0
- package/build-module/components/{page-library/use-library-settings.js → page-patterns/use-pattern-settings.js} +2 -2
- package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -0
- package/build-module/components/{page-library → page-patterns}/use-patterns.js +4 -2
- package/build-module/components/page-patterns/use-patterns.js.map +1 -0
- package/build-module/components/{page-library → page-patterns}/utils.js +3 -3
- package/build-module/components/page-patterns/utils.js.map +1 -0
- package/build-module/components/page-template-parts/index.js +82 -0
- package/build-module/components/page-template-parts/index.js.map +1 -0
- package/build-module/components/page-templates/index.js +1 -0
- package/build-module/components/page-templates/index.js.map +1 -1
- package/build-module/components/sidebar/index.js +5 -5
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +5 -2
- package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/settings-header/index.js +6 -1
- package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +62 -11
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +5 -4
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js +33 -0
- package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js +10 -9
- package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +2 -4
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +6 -3
- 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 +15 -5
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/status-label.js +1 -1
- package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pages/index.js +2 -2
- package/build-module/components/sidebar-navigation-screen-pages/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/index.js +12 -7
- package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +23 -2
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
- package/build-module/components/{sidebar-navigation-screen-library → sidebar-navigation-screen-patterns}/category-item.js +3 -3
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-patterns/index.js +152 -0
- package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-patterns/use-my-patterns.js +20 -0
- package/build-module/components/sidebar-navigation-screen-patterns/use-my-patterns.js.map +1 -0
- package/build-module/components/{sidebar-navigation-screen-library → sidebar-navigation-screen-patterns}/use-pattern-categories.js +2 -17
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +43 -0
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -0
- package/build-module/components/{sidebar-navigation-screen-library → sidebar-navigation-screen-patterns}/use-theme-patterns.js +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-templates/index.js +12 -62
- package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +4 -2
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build-module/components/site-hub/index.js +1 -1
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +1 -1
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
- package/build-module/components/template-actions/index.js +24 -7
- package/build-module/components/template-actions/index.js.map +1 -1
- package/build-module/components/welcome-guide/editor.js +1 -1
- package/build-module/components/welcome-guide/editor.js.map +1 -1
- package/build-module/components/welcome-guide/index.js +3 -1
- package/build-module/components/welcome-guide/index.js.map +1 -1
- package/build-module/components/welcome-guide/page.js +59 -0
- package/build-module/components/welcome-guide/page.js.map +1 -0
- package/build-module/components/welcome-guide/styles.js +1 -1
- package/build-module/components/welcome-guide/styles.js.map +1 -1
- package/build-module/components/welcome-guide/template.js +60 -0
- package/build-module/components/welcome-guide/template.js.map +1 -0
- package/build-module/hooks/commands/use-common-commands.js +16 -2
- package/build-module/hooks/commands/use-common-commands.js.map +1 -1
- package/build-module/hooks/commands/use-edit-mode-commands.js +3 -3
- package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
- package/build-module/index.js +2 -0
- package/build-module/index.js.map +1 -1
- package/build-module/store/actions.js +5 -2
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/private-actions.js +7 -1
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/utils/get-is-list-page.js +2 -2
- package/build-module/utils/get-is-list-page.js.map +1 -1
- package/build-style/style-rtl.css +90 -32
- package/build-style/style.css +90 -32
- package/package.json +19 -19
- package/src/components/add-new-template/new-template.js +2 -2
- package/src/components/block-editor/editor-canvas.js +3 -1
- package/src/components/block-editor/use-site-editor-settings.js +8 -4
- package/src/components/create-pattern-modal/index.js +10 -11
- package/src/components/global-styles/palette.js +10 -9
- package/src/components/header-edit-mode/document-actions/index.js +9 -1
- package/src/components/header-edit-mode/document-actions/style.scss +8 -0
- package/src/components/header-edit-mode/index.js +17 -9
- package/src/components/layout/index.js +1 -1
- package/src/components/layout/style.scss +0 -11
- package/src/components/page/header.js +1 -1
- package/src/components/page/index.js +5 -1
- package/src/components/page-content-focus-manager/disable-non-page-content-blocks.js +12 -3
- package/src/components/page-main/index.js +6 -3
- package/src/components/{page-library → page-patterns}/grid-item.js +79 -24
- package/src/components/{page-library → page-patterns}/grid.js +1 -1
- package/src/components/{page-library → page-patterns}/index.js +5 -5
- package/src/components/{page-library → page-patterns}/no-patterns.js +1 -1
- package/src/components/{page-library → page-patterns}/patterns-list.js +9 -9
- package/src/components/{page-library → page-patterns}/style.scss +16 -12
- package/src/components/{page-library/use-library-settings.js → page-patterns/use-pattern-settings.js} +1 -1
- package/src/components/{page-library → page-patterns}/use-patterns.js +5 -2
- package/src/components/{page-library → page-patterns}/utils.js +3 -3
- package/src/components/page-template-parts/index.js +105 -0
- package/src/components/page-templates/index.js +1 -1
- package/src/components/sidebar/index.js +6 -6
- package/src/components/sidebar-edit-mode/page-panels/page-content.js +7 -5
- package/src/components/sidebar-edit-mode/settings-header/index.js +7 -2
- package/src/components/sidebar-navigation-screen/style.scss +19 -1
- package/src/components/sidebar-navigation-screen-global-styles/index.js +54 -26
- package/src/components/sidebar-navigation-screen-main/index.js +44 -40
- package/src/components/sidebar-navigation-screen-main/template-part-hint.js +36 -0
- package/src/components/sidebar-navigation-screen-navigation-menu/edit-button.js +8 -11
- package/src/components/sidebar-navigation-screen-navigation-menu/index.js +2 -6
- package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +10 -6
- package/src/components/sidebar-navigation-screen-navigation-menus/index.js +12 -4
- package/src/components/sidebar-navigation-screen-page/status-label.js +1 -1
- package/src/components/sidebar-navigation-screen-pages/index.js +2 -2
- package/src/components/sidebar-navigation-screen-pattern/index.js +13 -6
- package/src/components/sidebar-navigation-screen-pattern/style.scss +4 -0
- package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +45 -3
- package/src/components/{sidebar-navigation-screen-library → sidebar-navigation-screen-patterns}/category-item.js +3 -3
- package/src/components/sidebar-navigation-screen-patterns/index.js +199 -0
- package/src/components/sidebar-navigation-screen-patterns/style.scss +28 -0
- package/src/components/sidebar-navigation-screen-patterns/use-my-patterns.js +23 -0
- package/src/components/{sidebar-navigation-screen-library → sidebar-navigation-screen-patterns}/use-pattern-categories.js +1 -18
- package/src/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +55 -0
- package/src/components/{sidebar-navigation-screen-library → sidebar-navigation-screen-patterns}/use-theme-patterns.js +1 -1
- package/src/components/sidebar-navigation-screen-templates/index.js +15 -82
- package/src/components/sidebar-navigation-screen-templates-browse/index.js +2 -0
- package/src/components/site-hub/index.js +1 -1
- package/src/components/sync-state-with-url/use-sync-path-with-url.js +1 -1
- package/src/components/template-actions/index.js +38 -8
- package/src/components/welcome-guide/editor.js +1 -1
- package/src/components/welcome-guide/index.js +4 -0
- package/src/components/welcome-guide/page.js +75 -0
- package/src/components/welcome-guide/style.scss +15 -1
- package/src/components/welcome-guide/styles.js +1 -1
- package/src/components/welcome-guide/template.js +82 -0
- package/src/hooks/commands/use-common-commands.js +13 -1
- package/src/hooks/commands/use-edit-mode-commands.js +5 -2
- package/src/index.js +2 -0
- package/src/store/actions.js +8 -1
- package/src/store/private-actions.js +5 -1
- package/src/style.scss +2 -2
- package/src/utils/get-is-list-page.js +4 -3
- package/build/components/page-content-focus-manager/constants.js +0 -9
- package/build/components/page-content-focus-manager/constants.js.map +0 -1
- package/build/components/page-library/grid-item.js.map +0 -1
- package/build/components/page-library/grid.js.map +0 -1
- package/build/components/page-library/index.js.map +0 -1
- package/build/components/page-library/no-patterns.js.map +0 -1
- package/build/components/page-library/patterns-list.js.map +0 -1
- package/build/components/page-library/search-items.js.map +0 -1
- package/build/components/page-library/use-library-settings.js.map +0 -1
- package/build/components/page-library/use-patterns.js.map +0 -1
- package/build/components/page-library/utils.js.map +0 -1
- package/build/components/sidebar-navigation-screen-library/category-item.js.map +0 -1
- package/build/components/sidebar-navigation-screen-library/index.js +0 -112
- package/build/components/sidebar-navigation-screen-library/index.js.map +0 -1
- package/build/components/sidebar-navigation-screen-library/use-default-pattern-categories.js.map +0 -1
- package/build/components/sidebar-navigation-screen-library/use-pattern-categories.js.map +0 -1
- package/build/components/sidebar-navigation-screen-library/use-template-part-areas.js +0 -41
- package/build/components/sidebar-navigation-screen-library/use-template-part-areas.js.map +0 -1
- package/build/components/sidebar-navigation-screen-library/use-theme-patterns.js.map +0 -1
- package/build-module/components/page-content-focus-manager/constants.js +0 -2
- package/build-module/components/page-content-focus-manager/constants.js.map +0 -1
- package/build-module/components/page-library/grid-item.js.map +0 -1
- package/build-module/components/page-library/grid.js.map +0 -1
- package/build-module/components/page-library/index.js.map +0 -1
- package/build-module/components/page-library/no-patterns.js.map +0 -1
- package/build-module/components/page-library/patterns-list.js.map +0 -1
- package/build-module/components/page-library/search-items.js.map +0 -1
- package/build-module/components/page-library/use-library-settings.js.map +0 -1
- package/build-module/components/page-library/use-patterns.js.map +0 -1
- package/build-module/components/page-library/utils.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-library/category-item.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-library/index.js +0 -87
- package/build-module/components/sidebar-navigation-screen-library/index.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-library/use-default-pattern-categories.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-library/use-pattern-categories.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-library/use-template-part-areas.js +0 -34
- package/build-module/components/sidebar-navigation-screen-library/use-template-part-areas.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-library/use-theme-patterns.js.map +0 -1
- package/src/components/page-content-focus-manager/constants.js +0 -5
- package/src/components/sidebar-navigation-screen-library/index.js +0 -136
- package/src/components/sidebar-navigation-screen-library/style.scss +0 -3
- package/src/components/sidebar-navigation-screen-library/use-template-part-areas.js +0 -33
- /package/build/components/{page-library → page-patterns}/search-items.js +0 -0
- /package/build/components/{sidebar-navigation-screen-library → sidebar-navigation-screen-patterns}/use-default-pattern-categories.js +0 -0
- /package/build-module/components/{page-library → page-patterns}/search-items.js +0 -0
- /package/build-module/components/{sidebar-navigation-screen-library → sidebar-navigation-screen-patterns}/use-default-pattern-categories.js +0 -0
- /package/src/components/{page-library → page-patterns}/search-items.js +0 -0
- /package/src/components/{sidebar-navigation-screen-library → sidebar-navigation-screen-patterns}/use-default-pattern-categories.js +0 -0
|
@@ -91,15 +91,16 @@ function Palette( { name } ) {
|
|
|
91
91
|
</HStack>
|
|
92
92
|
</NavigationButtonAsItem>
|
|
93
93
|
</ItemGroup>
|
|
94
|
-
{
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
94
|
+
{ window.__experimentalEnableColorRandomizer &&
|
|
95
|
+
themeColors?.length > 0 && (
|
|
96
|
+
<Button
|
|
97
|
+
variant="secondary"
|
|
98
|
+
icon={ shuffle }
|
|
99
|
+
onClick={ randomizeThemeColors }
|
|
100
|
+
>
|
|
101
|
+
{ __( 'Randomize colors' ) }
|
|
102
|
+
</Button>
|
|
103
|
+
) }
|
|
103
104
|
</VStack>
|
|
104
105
|
);
|
|
105
106
|
}
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
chevronLeftSmall as chevronLeftSmallIcon,
|
|
21
21
|
page as pageIcon,
|
|
22
22
|
navigation as navigationIcon,
|
|
23
|
+
symbol,
|
|
23
24
|
} from '@wordpress/icons';
|
|
24
25
|
import { displayShortcut } from '@wordpress/keycodes';
|
|
25
26
|
import { useState, useEffect, useRef } from '@wordpress/element';
|
|
@@ -118,10 +119,17 @@ function TemplateDocumentActions( { className, onBack } ) {
|
|
|
118
119
|
|
|
119
120
|
const entityLabel = getEntityLabel( record.type );
|
|
120
121
|
|
|
122
|
+
let typeIcon = icon;
|
|
123
|
+
if ( record.type === 'wp_navigation' ) {
|
|
124
|
+
typeIcon = navigationIcon;
|
|
125
|
+
} else if ( record.type === 'wp_block' ) {
|
|
126
|
+
typeIcon = symbol;
|
|
127
|
+
}
|
|
128
|
+
|
|
121
129
|
return (
|
|
122
130
|
<BaseDocumentActions
|
|
123
131
|
className={ className }
|
|
124
|
-
icon={
|
|
132
|
+
icon={ typeIcon }
|
|
125
133
|
onBack={ onBack }
|
|
126
134
|
>
|
|
127
135
|
<VisuallyHidden as="span">
|
|
@@ -108,6 +108,9 @@ export default function HeaderEditMode() {
|
|
|
108
108
|
};
|
|
109
109
|
}, [] );
|
|
110
110
|
|
|
111
|
+
const { get: getPreference } = useSelect( preferencesStore );
|
|
112
|
+
const hasFixedToolbar = getPreference( editSiteStore.name, 'fixedToolbar' );
|
|
113
|
+
|
|
111
114
|
const {
|
|
112
115
|
__experimentalSetPreviewDeviceType: setPreviewDeviceType,
|
|
113
116
|
setIsInserterOpened,
|
|
@@ -213,14 +216,18 @@ export default function HeaderEditMode() {
|
|
|
213
216
|
) }
|
|
214
217
|
{ isLargeViewport && (
|
|
215
218
|
<>
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
219
|
+
{ ! hasFixedToolbar && (
|
|
220
|
+
<ToolbarItem
|
|
221
|
+
as={ ToolSelector }
|
|
222
|
+
showTooltip={ ! showIconLabels }
|
|
223
|
+
variant={
|
|
224
|
+
showIconLabels
|
|
225
|
+
? 'tertiary'
|
|
226
|
+
: undefined
|
|
227
|
+
}
|
|
228
|
+
disabled={ ! isVisualMode }
|
|
229
|
+
/>
|
|
230
|
+
) }
|
|
224
231
|
<ToolbarItem
|
|
225
232
|
as={ UndoButton }
|
|
226
233
|
showTooltip={ ! showIconLabels }
|
|
@@ -257,7 +264,8 @@ export default function HeaderEditMode() {
|
|
|
257
264
|
/>
|
|
258
265
|
) }
|
|
259
266
|
{ isZoomedOutViewExperimentEnabled &&
|
|
260
|
-
! isDistractionFree &&
|
|
267
|
+
! isDistractionFree &&
|
|
268
|
+
! hasFixedToolbar && (
|
|
261
269
|
<ToolbarItem
|
|
262
270
|
as={ Button }
|
|
263
271
|
className="edit-site-header-edit-mode__zoom-out-view-toggle"
|
|
@@ -143,7 +143,7 @@ export default function Layout() {
|
|
|
143
143
|
headerAnimationState = canvasMode; // edit, view, init
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
// Sets the right context for the command
|
|
146
|
+
// Sets the right context for the command palette
|
|
147
147
|
const commandContext =
|
|
148
148
|
canvasMode === 'edit' && isEditorPage
|
|
149
149
|
? 'site-editor-edit'
|
|
@@ -4,17 +4,6 @@
|
|
|
4
4
|
color: $gray-400;
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: column;
|
|
7
|
-
|
|
8
|
-
// Expand the fixed block toolbar to cover the document title control.
|
|
9
|
-
.block-editor-block-contextual-toolbar {
|
|
10
|
-
@include break-medium() {
|
|
11
|
-
&.is-fixed {
|
|
12
|
-
// the combined with of the tools at the right of the header and the margin left
|
|
13
|
-
width: calc(100% - 240px - #{$grid-unit-80} - #{$grid-unit-70});
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
7
|
}
|
|
19
8
|
|
|
20
9
|
.edit-site-layout__hub {
|
|
@@ -18,7 +18,7 @@ export default function Header( { title, subTitle, actions } ) {
|
|
|
18
18
|
<HStack as="header" alignment="left" className="edit-site-page-header">
|
|
19
19
|
<FlexBlock className="edit-site-page-header__page-title">
|
|
20
20
|
<Heading
|
|
21
|
-
as="
|
|
21
|
+
as="h2"
|
|
22
22
|
level={ 4 }
|
|
23
23
|
className="edit-site-page-header__title"
|
|
24
24
|
>
|
|
@@ -7,6 +7,7 @@ import classnames from 'classnames';
|
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
9
|
import { NavigableRegion } from '@wordpress/interface';
|
|
10
|
+
import { EditorSnackbars } from '@wordpress/editor';
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Internal dependencies
|
|
@@ -32,7 +33,10 @@ export default function Page( {
|
|
|
32
33
|
actions={ actions }
|
|
33
34
|
/>
|
|
34
35
|
) }
|
|
35
|
-
<div className="edit-site-page-content">
|
|
36
|
+
<div className="edit-site-page-content">
|
|
37
|
+
{ children }
|
|
38
|
+
<EditorSnackbars />
|
|
39
|
+
</div>
|
|
36
40
|
</NavigableRegion>
|
|
37
41
|
);
|
|
38
42
|
}
|
|
@@ -10,16 +10,22 @@ import { useEffect } from '@wordpress/element';
|
|
|
10
10
|
* Internal dependencies
|
|
11
11
|
*/
|
|
12
12
|
import { unlock } from '../../lock-unlock';
|
|
13
|
-
import { PAGE_CONTENT_BLOCK_TYPES } from './constants';
|
|
14
13
|
|
|
15
14
|
const { useBlockEditingMode } = unlock( blockEditorPrivateApis );
|
|
16
15
|
|
|
16
|
+
const PAGE_CONTENT_BLOCK_TYPES = [
|
|
17
|
+
'core/post-title',
|
|
18
|
+
'core/post-featured-image',
|
|
19
|
+
'core/post-content',
|
|
20
|
+
];
|
|
21
|
+
|
|
17
22
|
/**
|
|
18
23
|
* Component that when rendered, makes it so that the site editor allows only
|
|
19
24
|
* page content to be edited.
|
|
20
25
|
*/
|
|
21
26
|
export default function DisableNonPageContentBlocks() {
|
|
22
27
|
useDisableNonPageContentBlocks();
|
|
28
|
+
return null;
|
|
23
29
|
}
|
|
24
30
|
|
|
25
31
|
/**
|
|
@@ -43,8 +49,11 @@ export function useDisableNonPageContentBlocks() {
|
|
|
43
49
|
|
|
44
50
|
const withDisableNonPageContentBlocks = createHigherOrderComponent(
|
|
45
51
|
( BlockEdit ) => ( props ) => {
|
|
46
|
-
const
|
|
47
|
-
const
|
|
52
|
+
const isDescendentOfQueryLoop = !! props.context.queryId;
|
|
53
|
+
const isPageContent =
|
|
54
|
+
PAGE_CONTENT_BLOCK_TYPES.includes( props.name ) &&
|
|
55
|
+
! isDescendentOfQueryLoop;
|
|
56
|
+
const mode = isPageContent ? 'contentOnly' : undefined;
|
|
48
57
|
useBlockEditingMode( mode );
|
|
49
58
|
return <BlockEdit { ...props } />;
|
|
50
59
|
},
|
|
@@ -6,8 +6,9 @@ import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
|
+
import PagePatterns from '../page-patterns';
|
|
10
|
+
import PageTemplateParts from '../page-template-parts';
|
|
9
11
|
import PageTemplates from '../page-templates';
|
|
10
|
-
import PageLibrary from '../page-library';
|
|
11
12
|
import { unlock } from '../../lock-unlock';
|
|
12
13
|
|
|
13
14
|
const { useLocation } = unlock( routerPrivateApis );
|
|
@@ -19,8 +20,10 @@ export default function PageMain() {
|
|
|
19
20
|
|
|
20
21
|
if ( path === '/wp_template/all' ) {
|
|
21
22
|
return <PageTemplates />;
|
|
22
|
-
} else if ( path === '/
|
|
23
|
-
return <
|
|
23
|
+
} else if ( path === '/wp_template_part/all' ) {
|
|
24
|
+
return <PageTemplateParts />;
|
|
25
|
+
} else if ( path === '/patterns' ) {
|
|
26
|
+
return <PagePatterns />;
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
return null;
|
|
@@ -15,12 +15,20 @@ import {
|
|
|
15
15
|
__experimentalHeading as Heading,
|
|
16
16
|
__experimentalHStack as HStack,
|
|
17
17
|
__unstableCompositeItem as CompositeItem,
|
|
18
|
+
Tooltip,
|
|
19
|
+
Flex,
|
|
18
20
|
} from '@wordpress/components';
|
|
19
|
-
import { useInstanceId } from '@wordpress/compose';
|
|
20
21
|
import { useDispatch } from '@wordpress/data';
|
|
21
|
-
import { useState } from '@wordpress/element';
|
|
22
|
+
import { useState, useId } from '@wordpress/element';
|
|
22
23
|
import { __, sprintf } from '@wordpress/i18n';
|
|
23
|
-
import {
|
|
24
|
+
import {
|
|
25
|
+
Icon,
|
|
26
|
+
header,
|
|
27
|
+
footer,
|
|
28
|
+
symbolFilled,
|
|
29
|
+
moreHorizontal,
|
|
30
|
+
lockSmall,
|
|
31
|
+
} from '@wordpress/icons';
|
|
24
32
|
import { store as noticesStore } from '@wordpress/notices';
|
|
25
33
|
import { store as reusableBlocksStore } from '@wordpress/reusable-blocks';
|
|
26
34
|
import { DELETE, BACKSPACE } from '@wordpress/keycodes';
|
|
@@ -31,9 +39,10 @@ import { DELETE, BACKSPACE } from '@wordpress/keycodes';
|
|
|
31
39
|
import { PATTERNS, USER_PATTERNS } from './utils';
|
|
32
40
|
import { useLink } from '../routes/link';
|
|
33
41
|
|
|
42
|
+
const THEME_PATTERN_TOOLTIP = __( 'Theme patterns cannot be edited.' );
|
|
43
|
+
|
|
34
44
|
export default function GridItem( { categoryId, composite, icon, item } ) {
|
|
35
|
-
const
|
|
36
|
-
const descriptionId = `edit-site-library__pattern-description-${ instanceId }`;
|
|
45
|
+
const descriptionId = useId();
|
|
37
46
|
const [ isDeleteDialogOpen, setIsDeleteDialogOpen ] = useState( false );
|
|
38
47
|
|
|
39
48
|
const { __experimentalDeleteReusableBlock } =
|
|
@@ -46,7 +55,6 @@ export default function GridItem( { categoryId, composite, icon, item } ) {
|
|
|
46
55
|
postId: item.type === USER_PATTERNS ? item.id : item.name,
|
|
47
56
|
categoryId,
|
|
48
57
|
categoryType: item.type,
|
|
49
|
-
canvas: 'view',
|
|
50
58
|
} );
|
|
51
59
|
|
|
52
60
|
const onKeyDown = ( event ) => {
|
|
@@ -56,10 +64,10 @@ export default function GridItem( { categoryId, composite, icon, item } ) {
|
|
|
56
64
|
};
|
|
57
65
|
|
|
58
66
|
const isEmpty = ! item.blocks?.length;
|
|
59
|
-
const patternClassNames = classnames( 'edit-site-
|
|
67
|
+
const patternClassNames = classnames( 'edit-site-patterns__pattern', {
|
|
60
68
|
'is-placeholder': isEmpty,
|
|
61
69
|
} );
|
|
62
|
-
const previewClassNames = classnames( 'edit-site-
|
|
70
|
+
const previewClassNames = classnames( 'edit-site-patterns__preview', {
|
|
63
71
|
'is-inactive': item.type === PATTERNS,
|
|
64
72
|
} );
|
|
65
73
|
|
|
@@ -79,14 +87,26 @@ export default function GridItem( { categoryId, composite, icon, item } ) {
|
|
|
79
87
|
};
|
|
80
88
|
|
|
81
89
|
const isUserPattern = item.type === USER_PATTERNS;
|
|
82
|
-
|
|
90
|
+
const ariaDescriptions = [];
|
|
83
91
|
if ( isUserPattern ) {
|
|
84
92
|
// User patterns don't have descriptions, but can be edited and deleted, so include some help text.
|
|
85
|
-
|
|
86
|
-
'Press Enter to edit, or Delete to delete the pattern.'
|
|
93
|
+
ariaDescriptions.push(
|
|
94
|
+
__( 'Press Enter to edit, or Delete to delete the pattern.' )
|
|
87
95
|
);
|
|
88
96
|
} else if ( item.description ) {
|
|
89
|
-
|
|
97
|
+
ariaDescriptions.push( item.description );
|
|
98
|
+
}
|
|
99
|
+
if ( item.type === PATTERNS ) {
|
|
100
|
+
ariaDescriptions.push( THEME_PATTERN_TOOLTIP );
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
let itemIcon = icon;
|
|
104
|
+
if ( categoryId === 'header' ) {
|
|
105
|
+
itemIcon = header;
|
|
106
|
+
} else if ( categoryId === 'footer' ) {
|
|
107
|
+
itemIcon = footer;
|
|
108
|
+
} else if ( categoryId === 'uncategorized' ) {
|
|
109
|
+
itemIcon = symbolFilled;
|
|
90
110
|
}
|
|
91
111
|
|
|
92
112
|
return (
|
|
@@ -101,43 +121,78 @@ export default function GridItem( { categoryId, composite, icon, item } ) {
|
|
|
101
121
|
onKeyDown={ isUserPattern ? onKeyDown : undefined }
|
|
102
122
|
aria-label={ item.title }
|
|
103
123
|
aria-describedby={
|
|
104
|
-
|
|
124
|
+
ariaDescriptions.length
|
|
125
|
+
? ariaDescriptions
|
|
126
|
+
.map(
|
|
127
|
+
( _, index ) =>
|
|
128
|
+
`${ descriptionId }-${ index }`
|
|
129
|
+
)
|
|
130
|
+
.join( ' ' )
|
|
131
|
+
: undefined
|
|
105
132
|
}
|
|
106
133
|
>
|
|
107
134
|
{ isEmpty && __( 'Empty pattern' ) }
|
|
108
135
|
{ ! isEmpty && <BlockPreview blocks={ item.blocks } /> }
|
|
109
136
|
</CompositeItem>
|
|
110
|
-
{ ariaDescription
|
|
137
|
+
{ ariaDescriptions.map( ( ariaDescription, index ) => (
|
|
111
138
|
<div
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
id={ descriptionId }
|
|
139
|
+
key={ index }
|
|
140
|
+
hidden
|
|
141
|
+
id={ `${ descriptionId }-${ index }` }
|
|
115
142
|
>
|
|
116
143
|
{ ariaDescription }
|
|
117
144
|
</div>
|
|
118
|
-
) }
|
|
145
|
+
) ) }
|
|
119
146
|
<HStack
|
|
120
147
|
aria-hidden="true"
|
|
121
|
-
className="edit-site-
|
|
148
|
+
className="edit-site-patterns__footer"
|
|
122
149
|
justify="space-between"
|
|
123
150
|
>
|
|
124
151
|
<HStack
|
|
125
152
|
alignment="center"
|
|
126
153
|
justify="left"
|
|
127
154
|
spacing={ 3 }
|
|
128
|
-
className="edit-site-
|
|
155
|
+
className="edit-site-patterns__pattern-title"
|
|
129
156
|
>
|
|
130
|
-
{ icon &&
|
|
131
|
-
|
|
157
|
+
{ icon && (
|
|
158
|
+
<Icon
|
|
159
|
+
className="edit-site-patterns__pattern-icon"
|
|
160
|
+
icon={ itemIcon }
|
|
161
|
+
/>
|
|
162
|
+
) }
|
|
163
|
+
<Flex
|
|
164
|
+
as={ Heading }
|
|
165
|
+
level={ 5 }
|
|
166
|
+
gap={ 0 }
|
|
167
|
+
justify="left"
|
|
168
|
+
>
|
|
169
|
+
{ item.title }
|
|
170
|
+
{ item.type === PATTERNS && (
|
|
171
|
+
<Tooltip
|
|
172
|
+
position="top center"
|
|
173
|
+
text={ __(
|
|
174
|
+
'Theme patterns cannot be edited.'
|
|
175
|
+
) }
|
|
176
|
+
>
|
|
177
|
+
<span className="edit-site-patterns__pattern-lock-icon">
|
|
178
|
+
<Icon
|
|
179
|
+
style={ { fill: 'currentcolor' } }
|
|
180
|
+
icon={ lockSmall }
|
|
181
|
+
size={ 24 }
|
|
182
|
+
/>
|
|
183
|
+
</span>
|
|
184
|
+
</Tooltip>
|
|
185
|
+
) }
|
|
186
|
+
</Flex>
|
|
132
187
|
</HStack>
|
|
133
188
|
{ item.type === USER_PATTERNS && (
|
|
134
189
|
<DropdownMenu
|
|
135
190
|
icon={ moreHorizontal }
|
|
136
191
|
label={ __( 'Actions' ) }
|
|
137
|
-
className="edit-site-
|
|
192
|
+
className="edit-site-patterns__dropdown"
|
|
138
193
|
popoverProps={ { placement: 'bottom-end' } }
|
|
139
194
|
toggleProps={ {
|
|
140
|
-
className: 'edit-site-
|
|
195
|
+
className: 'edit-site-patterns__button',
|
|
141
196
|
isSmall: true,
|
|
142
197
|
describedBy: sprintf(
|
|
143
198
|
/* translators: %s: pattern name */
|
|
@@ -11,16 +11,16 @@ import { getQueryArgs } from '@wordpress/url';
|
|
|
11
11
|
import { DEFAULT_CATEGORY, DEFAULT_TYPE } from './utils';
|
|
12
12
|
import Page from '../page';
|
|
13
13
|
import PatternsList from './patterns-list';
|
|
14
|
-
import
|
|
14
|
+
import usePatternSettings from './use-pattern-settings';
|
|
15
15
|
import { unlock } from '../../lock-unlock';
|
|
16
16
|
|
|
17
17
|
const { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );
|
|
18
18
|
|
|
19
|
-
export default function
|
|
19
|
+
export default function PagePatterns() {
|
|
20
20
|
const { categoryType, categoryId } = getQueryArgs( window.location.href );
|
|
21
21
|
const type = categoryType || DEFAULT_TYPE;
|
|
22
22
|
const category = categoryId || DEFAULT_CATEGORY;
|
|
23
|
-
const settings =
|
|
23
|
+
const settings = usePatternSettings();
|
|
24
24
|
|
|
25
25
|
// Wrap everything in a block editor provider.
|
|
26
26
|
// This ensures 'styles' that are needed for the previews are synced
|
|
@@ -28,8 +28,8 @@ export default function PageLibrary() {
|
|
|
28
28
|
return (
|
|
29
29
|
<ExperimentalBlockEditorProvider settings={ settings }>
|
|
30
30
|
<Page
|
|
31
|
-
className="edit-site-
|
|
32
|
-
title={ __( '
|
|
31
|
+
className="edit-site-patterns"
|
|
32
|
+
title={ __( 'Patterns content' ) }
|
|
33
33
|
hideTitleFromUI
|
|
34
34
|
>
|
|
35
35
|
<PatternsList type={ type } categoryId={ category } />
|
|
@@ -51,19 +51,19 @@ export default function PatternsList( { categoryId, type } ) {
|
|
|
51
51
|
icon={ isRTL() ? chevronRight : chevronLeft }
|
|
52
52
|
label={ __( 'Back' ) }
|
|
53
53
|
onClick={ () => {
|
|
54
|
-
// Go back in history if we came from the
|
|
54
|
+
// Go back in history if we came from the Patterns page.
|
|
55
55
|
// Otherwise push a stack onto the history.
|
|
56
|
-
if ( location.state?.backPath === '/
|
|
56
|
+
if ( location.state?.backPath === '/patterns' ) {
|
|
57
57
|
history.back();
|
|
58
58
|
} else {
|
|
59
|
-
history.push( { path: '/
|
|
59
|
+
history.push( { path: '/patterns' } );
|
|
60
60
|
}
|
|
61
61
|
} }
|
|
62
62
|
/>
|
|
63
63
|
) }
|
|
64
64
|
<FlexBlock>
|
|
65
65
|
<SearchControl
|
|
66
|
-
className="edit-site-
|
|
66
|
+
className="edit-site-patterns__search"
|
|
67
67
|
onChange={ ( value ) => setFilterValue( value ) }
|
|
68
68
|
placeholder={ __( 'Search patterns' ) }
|
|
69
69
|
label={ __( 'Search patterns' ) }
|
|
@@ -75,29 +75,29 @@ export default function PatternsList( { categoryId, type } ) {
|
|
|
75
75
|
{ isResolving && __( 'Loading' ) }
|
|
76
76
|
{ ! isResolving && !! syncedPatterns.length && (
|
|
77
77
|
<>
|
|
78
|
-
<VStack className="edit-site-
|
|
78
|
+
<VStack className="edit-site-patterns__section-header">
|
|
79
79
|
<Heading level={ 4 }>{ __( 'Synced' ) }</Heading>
|
|
80
80
|
<Text variant="muted" as="p">
|
|
81
81
|
{ __(
|
|
82
|
-
'Patterns that are kept in sync across
|
|
82
|
+
'Patterns that are kept in sync across the site'
|
|
83
83
|
) }
|
|
84
84
|
</Text>
|
|
85
85
|
</VStack>
|
|
86
86
|
<Grid
|
|
87
87
|
icon={ symbol }
|
|
88
88
|
categoryId={ categoryId }
|
|
89
|
-
label={ __( 'Synced
|
|
89
|
+
label={ __( 'Synced' ) }
|
|
90
90
|
items={ syncedPatterns }
|
|
91
91
|
/>
|
|
92
92
|
</>
|
|
93
93
|
) }
|
|
94
94
|
{ ! isResolving && !! unsyncedPatterns.length && (
|
|
95
95
|
<>
|
|
96
|
-
<VStack className="edit-site-
|
|
96
|
+
<VStack className="edit-site-patterns__section-header">
|
|
97
97
|
<Heading level={ 4 }>{ __( 'Standard' ) }</Heading>
|
|
98
98
|
<Text variant="muted" as="p">
|
|
99
99
|
{ __(
|
|
100
|
-
'Patterns that can be changed freely without affecting
|
|
100
|
+
'Patterns that can be changed freely without affecting the site'
|
|
101
101
|
) }
|
|
102
102
|
</Text>
|
|
103
103
|
</VStack>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.edit-site-
|
|
1
|
+
.edit-site-patterns {
|
|
2
2
|
background: rgba(0, 0, 0, 0.05);
|
|
3
3
|
margin: $header-height 0 0;
|
|
4
4
|
.components-text {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.edit-site-
|
|
17
|
+
.edit-site-patterns__grid {
|
|
18
18
|
column-gap: $grid-unit-30;
|
|
19
19
|
@include break-large() {
|
|
20
20
|
column-count: 2;
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
padding-top: $border-width-focus-fallback;
|
|
26
26
|
margin-bottom: $grid-unit-40;
|
|
27
27
|
|
|
28
|
-
.edit-site-
|
|
28
|
+
.edit-site-patterns__pattern {
|
|
29
29
|
break-inside: avoid-column;
|
|
30
30
|
display: flex;
|
|
31
31
|
flex-direction: column;
|
|
32
32
|
margin-bottom: $grid-unit-60;
|
|
33
33
|
|
|
34
|
-
.edit-site-
|
|
34
|
+
.edit-site-patterns__preview {
|
|
35
35
|
border-radius: $radius-block-ui;
|
|
36
36
|
cursor: pointer;
|
|
37
37
|
overflow: hidden;
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
.edit-site-
|
|
52
|
-
.edit-site-
|
|
51
|
+
.edit-site-patterns__footer,
|
|
52
|
+
.edit-site-patterns__button {
|
|
53
53
|
color: $gray-600;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
&.is-placeholder .edit-site-
|
|
56
|
+
&.is-placeholder .edit-site-patterns__preview {
|
|
57
57
|
min-height: $grid-unit-80;
|
|
58
58
|
color: $gray-600;
|
|
59
59
|
border: 1px dashed $gray-800;
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
.edit-site-
|
|
70
|
+
.edit-site-patterns__preview {
|
|
71
71
|
flex: 1;
|
|
72
72
|
margin-bottom: $grid-unit-20;
|
|
73
73
|
}
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
|
|
76
76
|
// The increased specificity here is to overcome component styles
|
|
77
77
|
// without relying on internal component class names.
|
|
78
|
-
.edit-site-
|
|
78
|
+
.edit-site-patterns__search {
|
|
79
79
|
&#{&} input[type="search"] {
|
|
80
80
|
background: $gray-800;
|
|
81
81
|
color: $gray-200;
|
|
@@ -90,16 +90,20 @@
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
.edit-site-
|
|
93
|
+
.edit-site-patterns__pattern-title {
|
|
94
94
|
color: $gray-600;
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
.edit-site-patterns__pattern-icon {
|
|
97
97
|
border-radius: $grid-unit-05;
|
|
98
98
|
background: var(--wp-block-synced-color);
|
|
99
99
|
fill: $white;
|
|
100
100
|
}
|
|
101
|
+
|
|
102
|
+
.edit-site-patterns__pattern-lock-icon {
|
|
103
|
+
display: inline-flex;
|
|
104
|
+
}
|
|
101
105
|
}
|
|
102
106
|
|
|
103
|
-
.edit-site-
|
|
107
|
+
.edit-site-patterns__no-results {
|
|
104
108
|
color: $gray-600;
|
|
105
109
|
}
|
|
@@ -12,7 +12,7 @@ import { unlock } from '../../lock-unlock';
|
|
|
12
12
|
import { store as editSiteStore } from '../../store';
|
|
13
13
|
import { filterOutDuplicatesByName } from './utils';
|
|
14
14
|
|
|
15
|
-
export default function
|
|
15
|
+
export default function usePatternSettings() {
|
|
16
16
|
const storedSettings = useSelect( ( select ) => {
|
|
17
17
|
const { getSettings } = unlock( select( editSiteStore ) );
|
|
18
18
|
return getSettings();
|
|
@@ -38,6 +38,9 @@ const templatePartToPattern = ( templatePart ) => ( {
|
|
|
38
38
|
templatePart,
|
|
39
39
|
} );
|
|
40
40
|
|
|
41
|
+
const templatePartHasCategory = ( item, category ) =>
|
|
42
|
+
item.templatePart.area === category;
|
|
43
|
+
|
|
41
44
|
const useTemplatePartsAsPatterns = (
|
|
42
45
|
categoryId,
|
|
43
46
|
postType = TEMPLATE_PARTS,
|
|
@@ -83,7 +86,7 @@ const useTemplatePartsAsPatterns = (
|
|
|
83
86
|
|
|
84
87
|
return searchItems( templateParts, filterValue, {
|
|
85
88
|
categoryId,
|
|
86
|
-
hasCategory:
|
|
89
|
+
hasCategory: templatePartHasCategory,
|
|
87
90
|
} );
|
|
88
91
|
}, [ templateParts, filterValue, categoryId ] );
|
|
89
92
|
|
|
@@ -145,7 +148,7 @@ const reusableBlockToPattern = ( reusableBlock ) => ( {
|
|
|
145
148
|
categories: reusableBlock.wp_pattern,
|
|
146
149
|
id: reusableBlock.id,
|
|
147
150
|
name: reusableBlock.slug,
|
|
148
|
-
syncStatus: reusableBlock.
|
|
151
|
+
syncStatus: reusableBlock.wp_pattern_sync_status || SYNC_TYPES.full,
|
|
149
152
|
title: reusableBlock.title.raw,
|
|
150
153
|
type: reusableBlock.type,
|
|
151
154
|
reusableBlock,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export const DEFAULT_CATEGORY = '
|
|
2
|
-
export const DEFAULT_TYPE = '
|
|
1
|
+
export const DEFAULT_CATEGORY = 'my-patterns';
|
|
2
|
+
export const DEFAULT_TYPE = 'wp_block';
|
|
3
3
|
export const PATTERNS = 'pattern';
|
|
4
4
|
export const TEMPLATE_PARTS = 'wp_template_part';
|
|
5
5
|
export const USER_PATTERNS = 'wp_block';
|
|
6
|
-
export const USER_PATTERN_CATEGORY = '
|
|
6
|
+
export const USER_PATTERN_CATEGORY = 'my-patterns';
|
|
7
7
|
|
|
8
8
|
export const CORE_PATTERN_SOURCES = [
|
|
9
9
|
'core',
|