@wordpress/edit-site 7.0.0 → 7.2.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 +8 -0
- package/README.md +0 -7
- package/build/components/add-new-pattern/index.cjs.map +2 -2
- package/build/components/add-new-post/index.cjs.map +2 -2
- package/build/components/add-new-template/add-custom-generic-template-modal-content.cjs.map +2 -2
- package/build/components/add-new-template/add-custom-template-modal-content.cjs.map +2 -2
- package/build/components/add-new-template/index.cjs.map +2 -2
- package/build/components/add-new-template/utils.cjs.map +2 -2
- package/build/components/add-new-template-legacy/add-custom-generic-template-modal-content.cjs.map +2 -2
- package/build/components/add-new-template-legacy/add-custom-template-modal-content.cjs.map +2 -2
- package/build/components/add-new-template-legacy/index.cjs.map +2 -2
- package/build/components/add-new-template-legacy/utils.cjs.map +2 -2
- package/build/components/app/index.cjs.map +2 -2
- package/build/components/block-editor/use-editor-iframe-props.cjs.map +2 -2
- package/build/components/block-editor/use-navigate-to-entity-record.cjs.map +2 -2
- package/build/components/block-editor/use-site-editor-settings.cjs.map +2 -2
- package/build/components/block-editor/use-viewport-sync.cjs.map +2 -2
- package/build/components/canvas-loader/index.cjs +8 -3
- package/build/components/canvas-loader/index.cjs.map +3 -3
- package/build/components/dataviews-actions/index.cjs.map +2 -2
- package/build/components/editor/index.cjs +6 -5
- package/build/components/editor/index.cjs.map +3 -3
- package/build/components/editor/site-preview.cjs.map +2 -2
- package/build/components/editor/use-adapt-editor-to-canvas.cjs.map +2 -2
- package/build/components/editor/use-editor-title.cjs +1 -2
- package/build/components/editor/use-editor-title.cjs.map +3 -3
- package/build/components/editor/use-resolve-edited-entity.cjs.map +2 -2
- package/build/components/editor/use-revisions-url-sync.cjs +122 -0
- package/build/components/editor/use-revisions-url-sync.cjs.map +7 -0
- package/build/components/layout/animation.cjs.map +2 -2
- package/build/components/layout/hooks.cjs.map +2 -2
- package/build/components/layout/index.cjs +0 -1
- package/build/components/layout/index.cjs.map +2 -2
- package/build/components/media/index.cjs.map +2 -2
- package/build/components/more-menu/index.cjs.map +2 -2
- package/build/components/more-menu/site-export.cjs.map +2 -2
- package/build/components/more-menu/welcome-guide-menu-item.cjs.map +2 -2
- package/build/components/page-patterns/actions.cjs.map +2 -2
- package/build/components/page-patterns/delete-category-menu-item.cjs.map +2 -2
- package/build/components/page-patterns/fields.cjs.map +2 -2
- package/build/components/page-patterns/index.cjs.map +2 -2
- package/build/components/page-patterns/rename-category-menu-item.cjs.map +2 -2
- package/build/components/page-patterns/search-items.cjs.map +2 -2
- package/build/components/page-patterns/use-pattern-settings.cjs.map +2 -2
- package/build/components/page-patterns/use-patterns.cjs.map +2 -2
- package/build/components/page-templates/fields.cjs.map +2 -2
- package/build/components/page-templates/hooks.cjs.map +2 -2
- package/build/components/page-templates/index-legacy.cjs.map +2 -2
- package/build/components/page-templates/index.cjs.map +2 -2
- package/build/components/pagination/index.cjs.map +2 -2
- package/build/components/plugin-template-setting-panel/index.cjs.map +2 -2
- package/build/components/post-list/index.cjs.map +2 -2
- package/build/components/post-list/quick-edit-modal.cjs.map +2 -2
- package/build/components/post-list/use-notes-count.cjs.map +2 -2
- package/build/components/resizable-frame/index.cjs.map +2 -2
- package/build/components/routes/use-title.cjs.map +2 -2
- package/build/components/save-button/index.cjs +3 -3
- package/build/components/save-button/index.cjs.map +3 -3
- package/build/components/save-hub/index.cjs.map +2 -2
- package/build/components/save-keyboard-shortcut/index.cjs.map +2 -2
- package/build/components/save-panel/index.cjs +7 -4
- package/build/components/save-panel/index.cjs.map +3 -3
- package/build/components/sidebar/index.cjs.map +2 -2
- package/build/components/sidebar-button/index.cjs.map +2 -2
- package/build/components/sidebar-dataviews/index.cjs.map +2 -2
- package/build/components/sidebar-global-styles/index.cjs.map +2 -2
- package/build/components/sidebar-identity/index.cjs +5 -2
- package/build/components/sidebar-identity/index.cjs.map +2 -2
- package/build/components/sidebar-navigation-item/index.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen/index.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-details-footer/index.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-global-styles/content.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-global-styles/index.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-identity/index.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-main/index.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-navigation-menu/index.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-navigation-menus/index.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.cjs +24 -25
- package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-patterns/category-item.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-patterns/index.cjs +3 -2
- package/build/components/sidebar-navigation-screen-patterns/index.cjs.map +3 -3
- package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-templates-browse/content-legacy.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-templates-browse/content.cjs +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/content.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-templates-browse/index.cjs.map +2 -2
- package/build/components/sidebar-navigation-screen-unsupported/index.cjs.map +2 -2
- package/build/components/site-editor-routes/home.cjs.map +2 -2
- package/build/components/site-editor-routes/identity.cjs.map +2 -2
- package/build/components/site-editor-routes/index.cjs.map +2 -2
- package/build/components/site-editor-routes/navigation-item.cjs.map +2 -2
- package/build/components/site-editor-routes/navigation.cjs.map +2 -2
- package/build/components/site-editor-routes/notfound.cjs.map +2 -2
- package/build/components/site-editor-routes/page-item.cjs.map +2 -2
- package/build/components/site-editor-routes/pages.cjs.map +2 -2
- package/build/components/site-editor-routes/pattern-item.cjs.map +2 -2
- package/build/components/site-editor-routes/patterns.cjs.map +2 -2
- package/build/components/site-editor-routes/stylebook.cjs.map +2 -2
- package/build/components/site-editor-routes/styles.cjs +17 -12
- package/build/components/site-editor-routes/styles.cjs.map +2 -2
- package/build/components/site-editor-routes/template-item.cjs.map +2 -2
- package/build/components/site-editor-routes/template-part-item.cjs.map +2 -2
- package/build/components/site-editor-routes/templates.cjs.map +2 -2
- package/build/components/site-hub/index.cjs.map +2 -2
- package/build/components/welcome-guide/editor.cjs.map +2 -2
- package/build/components/welcome-guide/index.cjs.map +2 -2
- package/build/components/welcome-guide/page.cjs.map +2 -2
- package/build/components/welcome-guide/template.cjs.map +2 -2
- package/build/deprecated.cjs.map +2 -2
- package/build/hooks/commands/use-common-commands.cjs.map +2 -2
- package/build/hooks/commands/use-set-command-context.cjs.map +2 -2
- package/build/index.cjs.map +2 -2
- package/build/lock-unlock.cjs.map +2 -2
- package/build/store/actions.cjs.map +2 -2
- package/build/store/index.cjs.map +2 -2
- package/build/store/reducer.cjs.map +2 -2
- package/build/store/selectors.cjs.map +2 -2
- package/build/utils/constants.cjs.map +2 -2
- package/build/utils/get-filtered-template-parts.cjs.map +2 -2
- package/build/utils/is-previewing-theme.cjs.map +2 -2
- package/build/utils/is-template-removable.cjs.map +2 -2
- package/build/utils/is-template-revertable.cjs.map +2 -2
- package/build/utils/use-activate-theme.cjs.map +2 -2
- package/build/utils/use-actual-current-theme.cjs.map +2 -2
- package/build-module/components/add-new-pattern/index.mjs.map +2 -2
- package/build-module/components/add-new-post/index.mjs.map +2 -2
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.mjs.map +2 -2
- package/build-module/components/add-new-template/add-custom-template-modal-content.mjs.map +2 -2
- package/build-module/components/add-new-template/index.mjs.map +2 -2
- package/build-module/components/add-new-template/utils.mjs.map +2 -2
- package/build-module/components/add-new-template-legacy/add-custom-generic-template-modal-content.mjs.map +2 -2
- package/build-module/components/add-new-template-legacy/add-custom-template-modal-content.mjs.map +2 -2
- package/build-module/components/add-new-template-legacy/index.mjs.map +2 -2
- package/build-module/components/add-new-template-legacy/utils.mjs.map +2 -2
- package/build-module/components/app/index.mjs.map +2 -2
- package/build-module/components/block-editor/use-editor-iframe-props.mjs.map +2 -2
- package/build-module/components/block-editor/use-navigate-to-entity-record.mjs.map +2 -2
- package/build-module/components/block-editor/use-site-editor-settings.mjs.map +2 -2
- package/build-module/components/block-editor/use-viewport-sync.mjs.map +2 -2
- package/build-module/components/canvas-loader/index.mjs +9 -7
- package/build-module/components/canvas-loader/index.mjs.map +2 -2
- package/build-module/components/dataviews-actions/index.mjs.map +2 -2
- package/build-module/components/editor/index.mjs +6 -5
- package/build-module/components/editor/index.mjs.map +2 -2
- package/build-module/components/editor/site-preview.mjs.map +2 -2
- package/build-module/components/editor/use-adapt-editor-to-canvas.mjs.map +2 -2
- package/build-module/components/editor/use-editor-title.mjs +5 -3
- package/build-module/components/editor/use-editor-title.mjs.map +2 -2
- package/build-module/components/editor/use-resolve-edited-entity.mjs.map +2 -2
- package/build-module/components/editor/use-revisions-url-sync.mjs +101 -0
- package/build-module/components/editor/use-revisions-url-sync.mjs.map +7 -0
- package/build-module/components/layout/animation.mjs.map +2 -2
- package/build-module/components/layout/hooks.mjs.map +2 -2
- package/build-module/components/layout/index.mjs +0 -1
- package/build-module/components/layout/index.mjs.map +2 -2
- package/build-module/components/media/index.mjs.map +2 -2
- package/build-module/components/more-menu/index.mjs.map +2 -2
- package/build-module/components/more-menu/site-export.mjs.map +2 -2
- package/build-module/components/more-menu/welcome-guide-menu-item.mjs.map +2 -2
- package/build-module/components/page-patterns/actions.mjs.map +2 -2
- package/build-module/components/page-patterns/delete-category-menu-item.mjs.map +2 -2
- package/build-module/components/page-patterns/fields.mjs.map +2 -2
- package/build-module/components/page-patterns/index.mjs.map +2 -2
- package/build-module/components/page-patterns/rename-category-menu-item.mjs.map +2 -2
- package/build-module/components/page-patterns/search-items.mjs.map +2 -2
- package/build-module/components/page-patterns/use-pattern-settings.mjs.map +2 -2
- package/build-module/components/page-patterns/use-patterns.mjs.map +2 -2
- package/build-module/components/page-templates/fields.mjs.map +2 -2
- package/build-module/components/page-templates/hooks.mjs.map +2 -2
- package/build-module/components/page-templates/index-legacy.mjs.map +2 -2
- package/build-module/components/page-templates/index.mjs.map +2 -2
- package/build-module/components/pagination/index.mjs.map +2 -2
- package/build-module/components/plugin-template-setting-panel/index.mjs.map +2 -2
- package/build-module/components/post-list/index.mjs.map +2 -2
- package/build-module/components/post-list/quick-edit-modal.mjs.map +2 -2
- package/build-module/components/post-list/use-notes-count.mjs.map +2 -2
- package/build-module/components/resizable-frame/index.mjs.map +2 -2
- package/build-module/components/routes/use-title.mjs.map +2 -2
- package/build-module/components/save-button/index.mjs +6 -6
- package/build-module/components/save-button/index.mjs.map +2 -2
- package/build-module/components/save-hub/index.mjs.map +2 -2
- package/build-module/components/save-keyboard-shortcut/index.mjs.map +2 -2
- package/build-module/components/save-panel/index.mjs +9 -7
- package/build-module/components/save-panel/index.mjs.map +2 -2
- package/build-module/components/sidebar/index.mjs.map +2 -2
- package/build-module/components/sidebar-button/index.mjs.map +2 -2
- package/build-module/components/sidebar-dataviews/index.mjs.map +2 -2
- package/build-module/components/sidebar-global-styles/index.mjs.map +2 -2
- package/build-module/components/sidebar-identity/index.mjs +5 -2
- package/build-module/components/sidebar-identity/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-item/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-details-footer/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-global-styles/content.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-global-styles/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-identity/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-main/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.mjs +24 -25
- package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-patterns/index.mjs +2 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-templates-browse/content-legacy.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.mjs +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.mjs.map +2 -2
- package/build-module/components/sidebar-navigation-screen-unsupported/index.mjs.map +2 -2
- package/build-module/components/site-editor-routes/home.mjs.map +2 -2
- package/build-module/components/site-editor-routes/identity.mjs.map +2 -2
- package/build-module/components/site-editor-routes/index.mjs.map +2 -2
- package/build-module/components/site-editor-routes/navigation-item.mjs.map +2 -2
- package/build-module/components/site-editor-routes/navigation.mjs.map +2 -2
- package/build-module/components/site-editor-routes/notfound.mjs.map +2 -2
- package/build-module/components/site-editor-routes/page-item.mjs.map +2 -2
- package/build-module/components/site-editor-routes/pages.mjs.map +2 -2
- package/build-module/components/site-editor-routes/pattern-item.mjs.map +2 -2
- package/build-module/components/site-editor-routes/patterns.mjs.map +2 -2
- package/build-module/components/site-editor-routes/stylebook.mjs.map +2 -2
- package/build-module/components/site-editor-routes/styles.mjs +17 -12
- package/build-module/components/site-editor-routes/styles.mjs.map +2 -2
- package/build-module/components/site-editor-routes/template-item.mjs.map +2 -2
- package/build-module/components/site-editor-routes/template-part-item.mjs.map +2 -2
- package/build-module/components/site-editor-routes/templates.mjs.map +2 -2
- package/build-module/components/site-hub/index.mjs.map +2 -2
- package/build-module/components/welcome-guide/editor.mjs.map +2 -2
- package/build-module/components/welcome-guide/index.mjs.map +2 -2
- package/build-module/components/welcome-guide/page.mjs.map +2 -2
- package/build-module/components/welcome-guide/template.mjs.map +2 -2
- package/build-module/deprecated.mjs.map +2 -2
- package/build-module/hooks/commands/use-common-commands.mjs.map +2 -2
- package/build-module/hooks/commands/use-set-command-context.mjs.map +2 -2
- package/build-module/index.mjs.map +2 -2
- package/build-module/lock-unlock.mjs.map +2 -2
- package/build-module/store/actions.mjs.map +2 -2
- package/build-module/store/index.mjs.map +2 -2
- package/build-module/store/reducer.mjs.map +2 -2
- package/build-module/store/selectors.mjs.map +2 -2
- package/build-module/utils/constants.mjs.map +2 -2
- package/build-module/utils/get-filtered-template-parts.mjs.map +2 -2
- package/build-module/utils/is-previewing-theme.mjs.map +2 -2
- package/build-module/utils/is-template-removable.mjs.map +2 -2
- package/build-module/utils/is-template-revertable.mjs.map +2 -2
- package/build-module/utils/use-activate-theme.mjs.map +2 -2
- package/build-module/utils/use-actual-current-theme.mjs.map +2 -2
- package/build-style/style-rtl.css +79 -22
- package/build-style/style.css +79 -22
- package/package.json +48 -49
- package/src/components/add-new-pattern/index.js +0 -7
- package/src/components/add-new-post/index.js +0 -3
- package/src/components/add-new-template/add-custom-generic-template-modal-content.js +0 -7
- package/src/components/add-new-template/add-custom-template-modal-content.js +0 -7
- package/src/components/add-new-template/index.js +0 -15
- package/src/components/add-new-template/utils.js +0 -7
- package/src/components/add-new-template-legacy/add-custom-generic-template-modal-content.js +0 -7
- package/src/components/add-new-template-legacy/add-custom-template-modal-content.js +0 -7
- package/src/components/add-new-template-legacy/index.js +0 -15
- package/src/components/add-new-template-legacy/utils.js +0 -7
- package/src/components/app/index.js +0 -7
- package/src/components/block-editor/use-editor-iframe-props.js +0 -11
- package/src/components/block-editor/use-navigate-to-entity-record.js +0 -7
- package/src/components/block-editor/use-site-editor-settings.js +0 -7
- package/src/components/block-editor/use-viewport-sync.js +0 -7
- package/src/components/canvas-loader/index.js +6 -17
- package/src/components/canvas-loader/style.scss +3 -4
- package/src/components/dataviews-actions/index.js +0 -7
- package/src/components/editor/index.js +6 -12
- package/src/components/editor/site-preview.js +0 -3
- package/src/components/editor/use-adapt-editor-to-canvas.js +0 -7
- package/src/components/editor/use-editor-title.js +5 -10
- package/src/components/editor/use-resolve-edited-entity.js +0 -7
- package/src/components/editor/use-revisions-url-sync.js +132 -0
- package/src/components/layout/animation.js +0 -7
- package/src/components/layout/hooks.js +0 -3
- package/src/components/layout/index.js +0 -12
- package/src/components/media/index.js +0 -3
- package/src/components/more-menu/index.js +0 -7
- package/src/components/more-menu/site-export.js +0 -3
- package/src/components/more-menu/welcome-guide-menu-item.js +0 -3
- package/src/components/page-patterns/actions.js +0 -7
- package/src/components/page-patterns/delete-category-menu-item.js +0 -7
- package/src/components/page-patterns/fields.js +0 -7
- package/src/components/page-patterns/index.js +0 -7
- package/src/components/page-patterns/rename-category-menu-item.js +0 -10
- package/src/components/page-patterns/search-items.js +0 -12
- package/src/components/page-patterns/style.scss +3 -0
- package/src/components/page-patterns/use-pattern-settings.js +0 -7
- package/src/components/page-patterns/use-patterns.js +0 -7
- package/src/components/page-templates/fields.js +0 -11
- package/src/components/page-templates/hooks.js +0 -7
- package/src/components/page-templates/index-legacy.js +0 -7
- package/src/components/page-templates/index.js +0 -7
- package/src/components/pagination/index.js +0 -7
- package/src/components/plugin-template-setting-panel/index.js +0 -4
- package/src/components/post-list/index.js +0 -9
- package/src/components/post-list/quick-edit-modal.js +0 -7
- package/src/components/post-list/use-notes-count.js +0 -3
- package/src/components/resizable-frame/index.js +0 -11
- package/src/components/routes/use-title.js +0 -7
- package/src/components/save-button/index.js +6 -13
- package/src/components/save-hub/index.js +0 -7
- package/src/components/save-keyboard-shortcut/index.js +0 -7
- package/src/components/save-panel/index.js +9 -18
- package/src/components/sidebar/index.js +0 -7
- package/src/components/sidebar-button/index.js +0 -7
- package/src/components/sidebar-dataviews/index.js +0 -7
- package/src/components/sidebar-global-styles/index.js +0 -7
- package/src/components/sidebar-identity/index.js +3 -3
- package/src/components/sidebar-navigation-item/index.js +0 -11
- package/src/components/sidebar-navigation-item/style.scss +3 -10
- package/src/components/sidebar-navigation-screen/index.js +0 -11
- package/src/components/sidebar-navigation-screen-details-footer/index.js +0 -7
- package/src/components/sidebar-navigation-screen-global-styles/content.js +0 -7
- package/src/components/sidebar-navigation-screen-global-styles/index.js +0 -7
- package/src/components/sidebar-navigation-screen-identity/index.js +0 -7
- package/src/components/sidebar-navigation-screen-main/index.js +0 -7
- package/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +0 -3
- package/src/components/sidebar-navigation-screen-navigation-menu/index.js +0 -7
- package/src/components/sidebar-navigation-screen-navigation-menu/more-menu.js +0 -7
- package/src/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +0 -7
- package/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +0 -3
- package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +0 -6
- package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +0 -7
- package/src/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +0 -3
- package/src/components/sidebar-navigation-screen-navigation-menus/index.js +0 -8
- package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +38 -48
- package/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +0 -7
- package/src/components/sidebar-navigation-screen-patterns/category-item.js +0 -3
- package/src/components/sidebar-navigation-screen-patterns/index.js +2 -8
- package/src/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +0 -7
- package/src/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +0 -7
- package/src/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +0 -7
- package/src/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +0 -7
- package/src/components/sidebar-navigation-screen-templates-browse/content-legacy.js +0 -7
- package/src/components/sidebar-navigation-screen-templates-browse/content.js +1 -8
- package/src/components/sidebar-navigation-screen-templates-browse/index.js +0 -7
- package/src/components/sidebar-navigation-screen-unsupported/index.js +0 -3
- package/src/components/site-editor-routes/home.js +0 -3
- package/src/components/site-editor-routes/identity.js +0 -3
- package/src/components/site-editor-routes/index.js +0 -7
- package/src/components/site-editor-routes/navigation-item.js +0 -3
- package/src/components/site-editor-routes/navigation.js +0 -3
- package/src/components/site-editor-routes/notfound.js +0 -7
- package/src/components/site-editor-routes/page-item.js +0 -7
- package/src/components/site-editor-routes/pages.js +0 -7
- package/src/components/site-editor-routes/pattern-item.js +0 -3
- package/src/components/site-editor-routes/patterns.js +0 -3
- package/src/components/site-editor-routes/stylebook.js +0 -7
- package/src/components/site-editor-routes/styles.js +19 -18
- package/src/components/site-editor-routes/template-item.js +0 -3
- package/src/components/site-editor-routes/template-part-item.js +0 -3
- package/src/components/site-editor-routes/templates.js +0 -7
- package/src/components/site-hub/index.js +0 -7
- package/src/components/welcome-guide/editor.js +0 -7
- package/src/components/welcome-guide/index.js +0 -3
- package/src/components/welcome-guide/page.js +0 -3
- package/src/components/welcome-guide/template.js +0 -3
- package/src/deprecated.js +0 -3
- package/src/hooks/commands/use-common-commands.js +0 -7
- package/src/hooks/commands/use-set-command-context.js +0 -7
- package/src/index.js +0 -7
- package/src/lock-unlock.js +0 -3
- package/src/store/actions.js +0 -7
- package/src/store/index.js +0 -7
- package/src/store/reducer.js +0 -3
- package/src/store/selectors.js +0 -7
- package/src/utils/constants.js +0 -7
- package/src/utils/get-filtered-template-parts.js +0 -3
- package/src/utils/is-previewing-theme.js +0 -3
- package/src/utils/is-template-removable.js +0 -3
- package/src/utils/is-template-revertable.js +0 -3
- package/src/utils/test/get-filtered-template-parts.js +0 -3
- package/src/utils/use-activate-theme.js +0 -7
- package/src/utils/use-actual-current-theme.js +0 -3
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { __ } from '@wordpress/i18n';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Internal dependencies
|
|
8
|
-
*/
|
|
9
2
|
import SidebarNavigationScreen from '../sidebar-navigation-screen';
|
|
10
3
|
import { MainSidebarNavigationContent } from '../sidebar-navigation-screen-main';
|
|
11
4
|
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { __experimentalItemGroup as ItemGroup } from '@wordpress/components';
|
|
5
2
|
import { __, _x } from '@wordpress/i18n';
|
|
6
3
|
import {
|
|
@@ -13,10 +10,6 @@ import {
|
|
|
13
10
|
} from '@wordpress/icons';
|
|
14
11
|
import { useSelect } from '@wordpress/data';
|
|
15
12
|
import { store as coreStore } from '@wordpress/core-data';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Internal dependencies
|
|
19
|
-
*/
|
|
20
13
|
import SidebarNavigationScreen from '../sidebar-navigation-screen';
|
|
21
14
|
import SidebarNavigationItem from '../sidebar-navigation-item';
|
|
22
15
|
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { useEntityRecord, store as coreStore } from '@wordpress/core-data';
|
|
5
2
|
import { Spinner } from '@wordpress/components';
|
|
6
3
|
import { __ } from '@wordpress/i18n';
|
|
7
4
|
import { useSelect } from '@wordpress/data';
|
|
8
5
|
import { decodeEntities } from '@wordpress/html-entities';
|
|
9
6
|
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Internal dependencies
|
|
13
|
-
*/
|
|
14
7
|
import { SidebarNavigationScreenWrapper } from '../sidebar-navigation-screen-navigation-menus';
|
|
15
8
|
import ScreenNavigationMoreMenu from './more-menu';
|
|
16
9
|
import SingleNavigationMenu from './single-navigation-menu';
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { DropdownMenu, MenuItem, MenuGroup } from '@wordpress/components';
|
|
5
2
|
import { moreVertical } from '@wordpress/icons';
|
|
6
3
|
import { __ } from '@wordpress/i18n';
|
|
7
4
|
import { useState } from '@wordpress/element';
|
|
8
5
|
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Internal dependencies
|
|
12
|
-
*/
|
|
13
6
|
import RenameModal from './rename-modal';
|
|
14
7
|
import DeleteConfirmDialog from './delete-confirm-dialog';
|
|
15
8
|
import { unlock } from '../../lock-unlock';
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { useMemo } from '@wordpress/element';
|
|
5
2
|
import { useSelect } from '@wordpress/data';
|
|
6
3
|
import { BlockEditorProvider } from '@wordpress/block-editor';
|
|
7
4
|
import { createBlock } from '@wordpress/blocks';
|
|
8
5
|
import { __experimentalFetchLinkSuggestions as fetchLinkSuggestions } from '@wordpress/core-data';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Internal dependencies
|
|
12
|
-
*/
|
|
13
6
|
import { unlock } from '../../lock-unlock';
|
|
14
7
|
import { store as editSiteStore } from '../../store';
|
|
15
8
|
import NavigationMenuContent from '../sidebar-navigation-screen-navigation-menus/navigation-menu-content';
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { __ } from '@wordpress/i18n';
|
|
5
2
|
import { decodeEntities } from '@wordpress/html-entities';
|
|
6
|
-
/**
|
|
7
|
-
* Internal dependencies
|
|
8
|
-
*/
|
|
9
3
|
import { SidebarNavigationScreenWrapper } from '../sidebar-navigation-screen-navigation-menus';
|
|
10
4
|
import ScreenNavigationMoreMenu from './more-menu';
|
|
11
5
|
import NavigationMenuEditor from './navigation-menu-editor';
|
package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { store as coreStore } from '@wordpress/core-data';
|
|
5
2
|
import { __, _x, sprintf } from '@wordpress/i18n';
|
|
6
3
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
7
4
|
import { store as noticesStore } from '@wordpress/notices';
|
|
8
5
|
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Internal dependencies
|
|
12
|
-
*/
|
|
13
6
|
import { postType } from '.';
|
|
14
7
|
import { NAVIGATION_POST_TYPE } from '../../utils/constants';
|
|
15
8
|
import { unlock } from '../../lock-unlock';
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { __, _x, sprintf } from '@wordpress/i18n';
|
|
5
2
|
import { useEntityRecords, store as coreStore } from '@wordpress/core-data';
|
|
6
3
|
import { useSelect } from '@wordpress/data';
|
|
7
|
-
|
|
8
4
|
import { decodeEntities } from '@wordpress/html-entities';
|
|
9
5
|
import {
|
|
10
6
|
__experimentalItemGroup as ItemGroup,
|
|
11
7
|
Spinner,
|
|
12
8
|
} from '@wordpress/components';
|
|
13
9
|
import { navigation } from '@wordpress/icons';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Internal dependencies
|
|
17
|
-
*/
|
|
18
10
|
import SidebarNavigationScreen from '../sidebar-navigation-screen';
|
|
19
11
|
import SidebarNavigationItem from '../sidebar-navigation-item';
|
|
20
12
|
import { PRELOADED_NAVIGATION_MENUS_QUERY } from './constants';
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
1
|
import { chevronUp, chevronDown, moreVertical } from '@wordpress/icons';
|
|
6
2
|
import { DropdownMenu, MenuItem, MenuGroup } from '@wordpress/components';
|
|
7
3
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
@@ -9,15 +5,10 @@ import { useCallback } from '@wordpress/element';
|
|
|
9
5
|
import { __, sprintf } from '@wordpress/i18n';
|
|
10
6
|
import { BlockTitle, store as blockEditorStore } from '@wordpress/block-editor';
|
|
11
7
|
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
12
|
-
|
|
13
8
|
const POPOVER_PROPS = {
|
|
14
9
|
className: 'block-editor-block-settings-menu__popover',
|
|
15
10
|
placement: 'bottom-start',
|
|
16
11
|
};
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Internal dependencies
|
|
20
|
-
*/
|
|
21
12
|
import { unlock } from '../../lock-unlock';
|
|
22
13
|
|
|
23
14
|
const { useHistory, useLocation } = unlock( routerPrivateApis );
|
|
@@ -25,8 +16,7 @@ const { useHistory, useLocation } = unlock( routerPrivateApis );
|
|
|
25
16
|
export default function LeafMoreMenu( props ) {
|
|
26
17
|
const history = useHistory();
|
|
27
18
|
const { path } = useLocation();
|
|
28
|
-
const {
|
|
29
|
-
const { clientId } = block;
|
|
19
|
+
const { clientId } = props;
|
|
30
20
|
const { moveBlocksDown, moveBlocksUp, removeBlocks } =
|
|
31
21
|
useDispatch( blockEditorStore );
|
|
32
22
|
|
|
@@ -42,39 +32,40 @@ export default function LeafMoreMenu( props ) {
|
|
|
42
32
|
BlockTitle( { clientId, maximumLength: 25 } )
|
|
43
33
|
);
|
|
44
34
|
|
|
45
|
-
const rootClientId = useSelect(
|
|
35
|
+
const { rootClientId, blockName, attributes } = useSelect(
|
|
46
36
|
( select ) => {
|
|
47
|
-
const { getBlockRootClientId } =
|
|
37
|
+
const { getBlockRootClientId, getBlockName, getBlockAttributes } =
|
|
38
|
+
select( blockEditorStore );
|
|
48
39
|
|
|
49
|
-
return
|
|
40
|
+
return {
|
|
41
|
+
rootClientId: getBlockRootClientId( clientId ),
|
|
42
|
+
blockName: getBlockName( clientId ),
|
|
43
|
+
attributes: getBlockAttributes( clientId ),
|
|
44
|
+
};
|
|
50
45
|
},
|
|
51
46
|
[ clientId ]
|
|
52
47
|
);
|
|
53
48
|
|
|
54
|
-
const onGoToPage = useCallback(
|
|
55
|
-
(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
`/${ attributes.type }/${ attributes.id }?canvas=edit`,
|
|
65
|
-
{
|
|
66
|
-
state: { backPath: path },
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
if ( name === 'core/page-list-item' && attributes.id && history ) {
|
|
71
|
-
history.navigate( `/page/${ attributes.id }?canvas=edit`, {
|
|
49
|
+
const onGoToPage = useCallback( () => {
|
|
50
|
+
if (
|
|
51
|
+
attributes.kind === 'post-type' &&
|
|
52
|
+
attributes.id &&
|
|
53
|
+
attributes.type &&
|
|
54
|
+
history
|
|
55
|
+
) {
|
|
56
|
+
history.navigate(
|
|
57
|
+
`/${ attributes.type }/${ attributes.id }?canvas=edit`,
|
|
58
|
+
{
|
|
72
59
|
state: { backPath: path },
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
if ( blockName === 'core/page-list-item' && attributes.id && history ) {
|
|
64
|
+
history.navigate( `/page/${ attributes.id }?canvas=edit`, {
|
|
65
|
+
state: { backPath: path },
|
|
66
|
+
} );
|
|
67
|
+
}
|
|
68
|
+
}, [ path, history, attributes, blockName ] );
|
|
78
69
|
|
|
79
70
|
return (
|
|
80
71
|
<DropdownMenu
|
|
@@ -106,17 +97,16 @@ export default function LeafMoreMenu( props ) {
|
|
|
106
97
|
>
|
|
107
98
|
{ __( 'Move down' ) }
|
|
108
99
|
</MenuItem>
|
|
109
|
-
{
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
) }
|
|
100
|
+
{ attributes?.type === 'page' && attributes?.id && (
|
|
101
|
+
<MenuItem
|
|
102
|
+
onClick={ () => {
|
|
103
|
+
onGoToPage();
|
|
104
|
+
onClose();
|
|
105
|
+
} }
|
|
106
|
+
>
|
|
107
|
+
{ goToLabel }
|
|
108
|
+
</MenuItem>
|
|
109
|
+
) }
|
|
120
110
|
</MenuGroup>
|
|
121
111
|
<MenuGroup>
|
|
122
112
|
<MenuItem
|
package/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import {
|
|
5
2
|
privateApis as blockEditorPrivateApis,
|
|
6
3
|
store as blockEditorStore,
|
|
@@ -11,10 +8,6 @@ import { createBlock } from '@wordpress/blocks';
|
|
|
11
8
|
import { useCallback } from '@wordpress/element';
|
|
12
9
|
import { store as coreStore } from '@wordpress/core-data';
|
|
13
10
|
import { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Internal dependencies
|
|
17
|
-
*/
|
|
18
11
|
import { unlock } from '../../lock-unlock';
|
|
19
12
|
import LeafMoreMenu from './leaf-more-menu';
|
|
20
13
|
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import {
|
|
5
2
|
__experimentalItemGroup as ItemGroup,
|
|
6
3
|
__experimentalItem as Item,
|
|
7
4
|
} from '@wordpress/components';
|
|
8
|
-
import { getTemplatePartIcon } from '@wordpress/editor';
|
|
9
5
|
import { useMemo } from '@wordpress/element';
|
|
10
6
|
import { __ } from '@wordpress/i18n';
|
|
11
7
|
import { file } from '@wordpress/icons';
|
|
12
8
|
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
9
|
+
import { privateApis as coreDataPrivateApis } from '@wordpress/core-data';
|
|
13
10
|
import { useViewConfig } from '@wordpress/views';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Internal dependencies
|
|
17
|
-
*/
|
|
18
11
|
import SidebarNavigationScreen from '../sidebar-navigation-screen';
|
|
19
12
|
import CategoryItem from './category-item';
|
|
20
13
|
import {
|
|
@@ -30,6 +23,7 @@ import { unlock } from '../../lock-unlock';
|
|
|
30
23
|
const VIEW_CONFIG_FIELDS = [ 'view_list' ];
|
|
31
24
|
|
|
32
25
|
const { useLocation } = unlock( routerPrivateApis );
|
|
26
|
+
const { getTemplatePartIcon } = unlock( coreDataPrivateApis );
|
|
33
27
|
|
|
34
28
|
function CategoriesGroup( {
|
|
35
29
|
templatePartViews,
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { store as coreStore } from '@wordpress/core-data';
|
|
5
2
|
import { useSelect } from '@wordpress/data';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Internal dependencies
|
|
9
|
-
*/
|
|
10
3
|
import { unlock } from '../../lock-unlock';
|
|
11
4
|
import { store as editSiteStore } from '../../store';
|
|
12
5
|
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { useMemo } from '@wordpress/element';
|
|
5
2
|
import { __ } from '@wordpress/i18n';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Internal dependencies
|
|
9
|
-
*/
|
|
10
3
|
import useDefaultPatternCategories from './use-default-pattern-categories';
|
|
11
4
|
import useThemePatterns from './use-theme-patterns';
|
|
12
5
|
import usePatterns from '../page-patterns/use-patterns';
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { useEntityRecords, store as coreStore } from '@wordpress/core-data';
|
|
5
2
|
import { useSelect } from '@wordpress/data';
|
|
6
3
|
import { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Internal dependencies
|
|
10
|
-
*/
|
|
11
4
|
import {
|
|
12
5
|
TEMPLATE_PART_AREA_DEFAULT_CATEGORY,
|
|
13
6
|
TEMPLATE_PART_POST_TYPE,
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { store as coreStore } from '@wordpress/core-data';
|
|
5
2
|
import { useSelect } from '@wordpress/data';
|
|
6
3
|
import { useMemo } from '@wordpress/element';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Internal dependencies
|
|
10
|
-
*/
|
|
11
4
|
import { filterOutDuplicatesByName } from '../page-patterns/utils';
|
|
12
5
|
import { EXCLUDED_PATTERN_SOURCES } from '../../utils/constants';
|
|
13
6
|
import { unlock } from '../../lock-unlock';
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { store as coreStore } from '@wordpress/core-data';
|
|
5
2
|
import { useSelect } from '@wordpress/data';
|
|
6
3
|
import {
|
|
@@ -9,10 +6,6 @@ import {
|
|
|
9
6
|
plugins as pluginIcon,
|
|
10
7
|
globe,
|
|
11
8
|
} from '@wordpress/icons';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Internal dependencies
|
|
15
|
-
*/
|
|
16
9
|
import { TEMPLATE_POST_TYPE } from '../../utils/constants';
|
|
17
10
|
import DataViewsSidebarContent from '../sidebar-dataviews';
|
|
18
11
|
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { useEntityRecords } from '@wordpress/core-data';
|
|
5
2
|
import { useMemo } from '@wordpress/element';
|
|
6
3
|
import { __experimentalItemGroup as ItemGroup } from '@wordpress/components';
|
|
7
4
|
import { __ } from '@wordpress/i18n';
|
|
8
5
|
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
9
6
|
import { addQueryArgs } from '@wordpress/url';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Internal dependencies
|
|
13
|
-
*/
|
|
7
|
+
import { commentAuthorAvatar, published } from '@wordpress/icons';
|
|
14
8
|
import SidebarNavigationItem from '../sidebar-navigation-item';
|
|
15
9
|
import { useAddedBy } from '../page-templates/hooks';
|
|
16
|
-
import { commentAuthorAvatar, published } from '@wordpress/icons';
|
|
17
10
|
import { unlock } from '../../lock-unlock';
|
|
18
11
|
|
|
19
12
|
const { useLocation } = unlock( routerPrivateApis );
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { __ } from '@wordpress/i18n';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Internal dependencies
|
|
8
|
-
*/
|
|
9
2
|
import SidebarNavigationScreen from '../sidebar-navigation-screen';
|
|
10
3
|
import DataviewsTemplatesSidebarContent from './content';
|
|
11
4
|
import DataviewsTemplatesSidebarContentLegacy from './content-legacy';
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { useRegistry, useDispatch } from '@wordpress/data';
|
|
5
2
|
import { useEffect } from '@wordpress/element';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Internal dependencies
|
|
9
|
-
*/
|
|
10
3
|
import { unlock } from '../../lock-unlock';
|
|
11
4
|
import { store as siteEditorStore } from '../../store';
|
|
12
5
|
import { homeRoute } from './home';
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { __ } from '@wordpress/i18n';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Internal dependencies
|
|
8
|
-
*/
|
|
9
2
|
import { Notice, __experimentalSpacer as Spacer } from '@wordpress/components';
|
|
10
3
|
import SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';
|
|
11
4
|
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { __ } from '@wordpress/i18n';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Internal dependencies
|
|
8
|
-
*/
|
|
9
2
|
import Editor from '../editor';
|
|
10
3
|
import DataViewsSidebarContent from '../sidebar-dataviews';
|
|
11
4
|
import SidebarNavigationScreen from '../sidebar-navigation-screen';
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { __ } from '@wordpress/i18n';
|
|
5
2
|
import { resolveSelect } from '@wordpress/data';
|
|
6
3
|
import { store as coreStore } from '@wordpress/core-data';
|
|
7
4
|
import { loadView } from '@wordpress/views';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Internal dependencies
|
|
11
|
-
*/
|
|
12
5
|
import Editor from '../editor';
|
|
13
6
|
import SidebarNavigationScreen from '../sidebar-navigation-screen';
|
|
14
7
|
import SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { __ } from '@wordpress/i18n';
|
|
5
2
|
import { privateApis as editorPrivateApis } from '@wordpress/editor';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Internal dependencies
|
|
9
|
-
*/
|
|
10
3
|
import SidebarNavigationScreen from '../sidebar-navigation-screen';
|
|
11
4
|
import SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';
|
|
12
5
|
import { unlock } from '../../lock-unlock';
|
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
1
|
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
5
2
|
import { privateApis as editorPrivateApis } from '@wordpress/editor';
|
|
6
3
|
import { addQueryArgs } from '@wordpress/url';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Internal dependencies
|
|
10
|
-
*/
|
|
11
4
|
import Editor from '../editor';
|
|
12
5
|
import { unlock } from '../../lock-unlock';
|
|
13
6
|
import SidebarNavigationScreenGlobalStyles from '../sidebar-navigation-screen-global-styles';
|
|
14
7
|
import SidebarGlobalStyles from '../sidebar-global-styles';
|
|
15
8
|
|
|
16
9
|
const { useLocation, useHistory } = unlock( routerPrivateApis );
|
|
17
|
-
const { StyleBookPreview } = unlock( editorPrivateApis );
|
|
10
|
+
const { StyleBookPreview, useGlobalStyles } = unlock( editorPrivateApis );
|
|
18
11
|
|
|
19
|
-
function
|
|
12
|
+
function StyleBookPreviewArea( { siteData } ) {
|
|
20
13
|
const { path, query } = useLocation();
|
|
21
14
|
const history = useHistory();
|
|
22
|
-
const
|
|
15
|
+
const { user: userConfig } = useGlobalStyles();
|
|
23
16
|
|
|
24
17
|
// Get section from URL query params
|
|
25
18
|
const section = query.section ?? '/';
|
|
@@ -31,14 +24,22 @@ function StylesPreviewArea( { siteData } ) {
|
|
|
31
24
|
);
|
|
32
25
|
};
|
|
33
26
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
27
|
+
return (
|
|
28
|
+
<StyleBookPreview
|
|
29
|
+
path={ section }
|
|
30
|
+
onPathChange={ onChangeSection }
|
|
31
|
+
settings={ siteData.editorSettings }
|
|
32
|
+
// Without userConfig the preview falls back to the static `settings` styles and unsaved global styles edits are not shown.
|
|
33
|
+
userConfig={ userConfig }
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function StylesPreviewArea( { siteData } ) {
|
|
39
|
+
const { query } = useLocation();
|
|
40
|
+
|
|
41
|
+
if ( query.preview === 'stylebook' ) {
|
|
42
|
+
return <StyleBookPreviewArea siteData={ siteData } />;
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
return <Editor />;
|