@wordpress/edit-site 7.3.0 → 7.4.1-next.v.202609031004.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 +22 -0
- package/build/components/add-new-pattern/index.cjs +1 -1
- package/build/components/add-new-pattern/index.cjs.map +1 -1
- package/build/components/add-new-post/index.cjs +1 -1
- package/build/components/add-new-post/index.cjs.map +1 -1
- package/build/components/add-new-template/add-custom-generic-template-modal-content.cjs +1 -1
- package/build/components/add-new-template/add-custom-generic-template-modal-content.cjs.map +1 -1
- package/build/components/add-new-template/add-custom-template-modal-content.cjs +4 -2
- package/build/components/add-new-template/add-custom-template-modal-content.cjs.map +3 -3
- package/build/components/add-new-template/index.cjs +7 -5
- package/build/components/add-new-template/index.cjs.map +3 -3
- package/build/components/add-new-template/utils.cjs +84 -9
- package/build/components/add-new-template/utils.cjs.map +2 -2
- package/build/components/app/index.cjs +1 -1
- package/build/components/app/index.cjs.map +1 -1
- package/build/components/canvas-loader/index.cjs +1 -1
- package/build/components/canvas-loader/index.cjs.map +1 -1
- package/build/components/dataviews-actions/index.cjs +2 -55
- package/build/components/dataviews-actions/index.cjs.map +3 -3
- package/build/components/editor/index.cjs +1 -1
- package/build/components/editor/index.cjs.map +1 -1
- package/build/components/editor/site-preview.cjs +1 -1
- package/build/components/editor/site-preview.cjs.map +1 -1
- package/build/components/editor/use-adapt-editor-to-canvas.cjs +0 -11
- package/build/components/editor/use-adapt-editor-to-canvas.cjs.map +3 -3
- package/build/components/layout/index.cjs +2 -2
- package/build/components/layout/index.cjs.map +3 -3
- package/build/components/media/index.cjs +1 -1
- package/build/components/media/index.cjs.map +1 -1
- package/build/components/more-menu/index.cjs +1 -1
- package/build/components/more-menu/index.cjs.map +1 -1
- package/build/components/more-menu/welcome-guide-menu-item.cjs +11 -3
- package/build/components/more-menu/welcome-guide-menu-item.cjs.map +4 -4
- package/build/components/page-patterns/actions.cjs +1 -1
- package/build/components/page-patterns/actions.cjs.map +1 -1
- package/build/components/page-patterns/delete-category-menu-item.cjs +1 -1
- package/build/components/page-patterns/delete-category-menu-item.cjs.map +1 -1
- package/build/components/page-patterns/fields.cjs +1 -1
- package/build/components/page-patterns/fields.cjs.map +1 -1
- package/build/components/page-patterns/index.cjs +1 -1
- package/build/components/page-patterns/index.cjs.map +1 -1
- package/build/components/page-patterns/rename-category-menu-item.cjs +1 -1
- package/build/components/page-patterns/rename-category-menu-item.cjs.map +1 -1
- package/build/components/page-templates/fields.cjs +3 -127
- package/build/components/page-templates/fields.cjs.map +4 -4
- package/build/components/page-templates/index.cjs +47 -231
- package/build/components/page-templates/index.cjs.map +4 -4
- package/build/components/pagination/index.cjs +1 -1
- package/build/components/pagination/index.cjs.map +1 -1
- package/build/components/plugin-template-setting-panel/index.cjs +1 -1
- package/build/components/plugin-template-setting-panel/index.cjs.map +1 -1
- package/build/components/post-list/index.cjs +1 -1
- package/build/components/post-list/index.cjs.map +1 -1
- package/build/components/post-list/quick-edit-modal.cjs +1 -1
- package/build/components/post-list/quick-edit-modal.cjs.map +1 -1
- package/build/components/resizable-frame/index.cjs +1 -1
- package/build/components/resizable-frame/index.cjs.map +1 -1
- package/build/components/save-button/index.cjs +1 -1
- package/build/components/save-button/index.cjs.map +1 -1
- package/build/components/save-hub/index.cjs +1 -1
- package/build/components/save-hub/index.cjs.map +1 -1
- package/build/components/save-panel/index.cjs +1 -1
- package/build/components/save-panel/index.cjs.map +1 -1
- package/build/components/sidebar/index.cjs +1 -1
- package/build/components/sidebar/index.cjs.map +1 -1
- package/build/components/sidebar-button/index.cjs +1 -1
- package/build/components/sidebar-button/index.cjs.map +1 -1
- package/build/components/sidebar-dataviews/index.cjs +1 -1
- package/build/components/sidebar-dataviews/index.cjs.map +1 -1
- package/build/components/sidebar-global-styles/index.cjs +3 -3
- package/build/components/sidebar-global-styles/index.cjs.map +3 -3
- package/build/components/sidebar-identity/index.cjs +8 -16
- package/build/components/sidebar-identity/index.cjs.map +3 -3
- package/build/components/sidebar-navigation-item/index.cjs +2 -9
- package/build/components/sidebar-navigation-item/index.cjs.map +3 -3
- package/build/components/sidebar-navigation-screen/index.cjs +1 -1
- package/build/components/sidebar-navigation-screen/index.cjs.map +1 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.cjs +1 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.cjs.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/content.cjs +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/content.cjs.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.cjs +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.cjs.map +1 -1
- package/build/components/sidebar-navigation-screen-identity/index.cjs +1 -1
- package/build/components/sidebar-navigation-screen-identity/index.cjs.map +1 -1
- package/build/components/sidebar-navigation-screen-main/index.cjs +1 -1
- package/build/components/sidebar-navigation-screen-main/index.cjs.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.cjs +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.cjs.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/index.cjs +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/index.cjs.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.cjs +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.cjs.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.cjs +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.cjs.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.cjs +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.cjs.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.cjs +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.cjs.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.cjs.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.cjs +1 -1
- 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 +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.cjs.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.cjs +1 -1
- 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 +1 -1
- package/build/components/sidebar-navigation-screen-patterns/category-item.cjs.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/index.cjs +1 -1
- package/build/components/sidebar-navigation-screen-patterns/index.cjs.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/content.cjs +35 -73
- package/build/components/sidebar-navigation-screen-templates-browse/content.cjs.map +4 -4
- package/build/components/sidebar-navigation-screen-templates-browse/index.cjs +2 -3
- package/build/components/sidebar-navigation-screen-templates-browse/index.cjs.map +4 -4
- package/build/components/sidebar-navigation-screen-unsupported/index.cjs +1 -1
- package/build/components/sidebar-navigation-screen-unsupported/index.cjs.map +1 -1
- package/build/components/site-editor-routes/home.cjs +1 -1
- package/build/components/site-editor-routes/home.cjs.map +1 -1
- package/build/components/site-editor-routes/identity.cjs +1 -1
- package/build/components/site-editor-routes/identity.cjs.map +1 -1
- package/build/components/site-editor-routes/navigation-item.cjs +1 -1
- package/build/components/site-editor-routes/navigation-item.cjs.map +1 -1
- package/build/components/site-editor-routes/navigation.cjs +1 -1
- package/build/components/site-editor-routes/navigation.cjs.map +1 -1
- package/build/components/site-editor-routes/notfound.cjs +1 -1
- package/build/components/site-editor-routes/notfound.cjs.map +1 -1
- package/build/components/site-editor-routes/page-item.cjs +1 -1
- package/build/components/site-editor-routes/page-item.cjs.map +1 -1
- package/build/components/site-editor-routes/pages.cjs +1 -1
- package/build/components/site-editor-routes/pages.cjs.map +1 -1
- package/build/components/site-editor-routes/pattern-item.cjs +1 -1
- package/build/components/site-editor-routes/pattern-item.cjs.map +1 -1
- package/build/components/site-editor-routes/patterns.cjs +1 -1
- package/build/components/site-editor-routes/patterns.cjs.map +1 -1
- package/build/components/site-editor-routes/stylebook.cjs +1 -1
- package/build/components/site-editor-routes/stylebook.cjs.map +1 -1
- package/build/components/site-editor-routes/styles.cjs +1 -1
- package/build/components/site-editor-routes/styles.cjs.map +1 -1
- package/build/components/site-editor-routes/template-item.cjs +1 -1
- package/build/components/site-editor-routes/template-item.cjs.map +1 -1
- package/build/components/site-editor-routes/template-part-item.cjs +1 -1
- package/build/components/site-editor-routes/template-part-item.cjs.map +1 -1
- package/build/components/site-editor-routes/templates.cjs +3 -5
- package/build/components/site-editor-routes/templates.cjs.map +4 -4
- package/build/components/site-hub/index.cjs +1 -1
- package/build/components/site-hub/index.cjs.map +1 -1
- package/build/components/welcome-guide/editor.cjs +1 -1
- package/build/components/welcome-guide/editor.cjs.map +1 -1
- package/build/components/welcome-guide/image.cjs +1 -1
- package/build/components/welcome-guide/image.cjs.map +1 -1
- package/build/components/welcome-guide/index.cjs +1 -1
- package/build/components/welcome-guide/index.cjs.map +1 -1
- package/build/components/welcome-guide/page.cjs +1 -1
- package/build/components/welcome-guide/page.cjs.map +1 -1
- package/build/components/welcome-guide/template.cjs +1 -1
- package/build/components/welcome-guide/template.cjs.map +1 -1
- package/build/deprecated.cjs +1 -1
- package/build/deprecated.cjs.map +1 -1
- package/build/index.cjs +1 -1
- package/build/index.cjs.map +1 -1
- package/build-module/components/add-new-pattern/index.mjs +1 -1
- package/build-module/components/add-new-pattern/index.mjs.map +1 -1
- package/build-module/components/add-new-post/index.mjs +1 -1
- package/build-module/components/add-new-post/index.mjs.map +1 -1
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.mjs +1 -1
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.mjs.map +1 -1
- package/build-module/components/add-new-template/add-custom-template-modal-content.mjs +4 -2
- package/build-module/components/add-new-template/add-custom-template-modal-content.mjs.map +3 -3
- package/build-module/components/add-new-template/index.mjs +8 -5
- package/build-module/components/add-new-template/index.mjs.map +3 -3
- package/build-module/components/add-new-template/utils.mjs +84 -9
- package/build-module/components/add-new-template/utils.mjs.map +2 -2
- package/build-module/components/app/index.mjs +1 -1
- package/build-module/components/app/index.mjs.map +1 -1
- package/build-module/components/canvas-loader/index.mjs +1 -1
- package/build-module/components/canvas-loader/index.mjs.map +1 -1
- package/build-module/components/dataviews-actions/index.mjs +1 -53
- package/build-module/components/dataviews-actions/index.mjs.map +2 -2
- package/build-module/components/editor/index.mjs +1 -1
- package/build-module/components/editor/index.mjs.map +1 -1
- package/build-module/components/editor/site-preview.mjs +1 -1
- package/build-module/components/editor/site-preview.mjs.map +1 -1
- package/build-module/components/editor/use-adapt-editor-to-canvas.mjs +0 -11
- package/build-module/components/editor/use-adapt-editor-to-canvas.mjs.map +2 -2
- package/build-module/components/layout/index.mjs +2 -2
- package/build-module/components/layout/index.mjs.map +3 -3
- package/build-module/components/media/index.mjs +1 -1
- package/build-module/components/media/index.mjs.map +1 -1
- package/build-module/components/more-menu/index.mjs +1 -1
- package/build-module/components/more-menu/index.mjs.map +1 -1
- package/build-module/components/more-menu/welcome-guide-menu-item.mjs +11 -3
- package/build-module/components/more-menu/welcome-guide-menu-item.mjs.map +3 -3
- package/build-module/components/page-patterns/actions.mjs +1 -1
- package/build-module/components/page-patterns/actions.mjs.map +1 -1
- package/build-module/components/page-patterns/delete-category-menu-item.mjs +1 -1
- package/build-module/components/page-patterns/delete-category-menu-item.mjs.map +1 -1
- package/build-module/components/page-patterns/fields.mjs +1 -1
- package/build-module/components/page-patterns/fields.mjs.map +1 -1
- package/build-module/components/page-patterns/index.mjs +1 -1
- package/build-module/components/page-patterns/index.mjs.map +1 -1
- package/build-module/components/page-patterns/rename-category-menu-item.mjs +1 -1
- package/build-module/components/page-patterns/rename-category-menu-item.mjs.map +1 -1
- package/build-module/components/page-templates/fields.mjs +4 -130
- package/build-module/components/page-templates/fields.mjs.map +4 -4
- package/build-module/components/page-templates/index.mjs +53 -254
- package/build-module/components/page-templates/index.mjs.map +3 -3
- package/build-module/components/pagination/index.mjs +1 -1
- package/build-module/components/pagination/index.mjs.map +1 -1
- package/build-module/components/plugin-template-setting-panel/index.mjs +1 -1
- package/build-module/components/plugin-template-setting-panel/index.mjs.map +1 -1
- package/build-module/components/post-list/index.mjs +1 -1
- package/build-module/components/post-list/index.mjs.map +1 -1
- package/build-module/components/post-list/quick-edit-modal.mjs +1 -1
- package/build-module/components/post-list/quick-edit-modal.mjs.map +1 -1
- package/build-module/components/resizable-frame/index.mjs +1 -1
- package/build-module/components/resizable-frame/index.mjs.map +1 -1
- package/build-module/components/save-button/index.mjs +1 -1
- package/build-module/components/save-button/index.mjs.map +1 -1
- package/build-module/components/save-hub/index.mjs +1 -1
- package/build-module/components/save-hub/index.mjs.map +1 -1
- package/build-module/components/save-panel/index.mjs +1 -1
- package/build-module/components/save-panel/index.mjs.map +1 -1
- package/build-module/components/sidebar/index.mjs +1 -1
- package/build-module/components/sidebar/index.mjs.map +1 -1
- package/build-module/components/sidebar-button/index.mjs +1 -1
- package/build-module/components/sidebar-button/index.mjs.map +1 -1
- package/build-module/components/sidebar-dataviews/index.mjs +1 -1
- package/build-module/components/sidebar-dataviews/index.mjs.map +1 -1
- package/build-module/components/sidebar-global-styles/index.mjs +3 -3
- package/build-module/components/sidebar-global-styles/index.mjs.map +3 -3
- package/build-module/components/sidebar-identity/index.mjs +8 -16
- package/build-module/components/sidebar-identity/index.mjs.map +3 -3
- package/build-module/components/sidebar-navigation-item/index.mjs +2 -9
- package/build-module/components/sidebar-navigation-item/index.mjs.map +3 -3
- package/build-module/components/sidebar-navigation-screen/index.mjs +1 -1
- package/build-module/components/sidebar-navigation-screen/index.mjs.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-footer/index.mjs +1 -1
- package/build-module/components/sidebar-navigation-screen-details-footer/index.mjs.map +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/content.mjs +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/content.mjs.map +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/index.mjs +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/index.mjs.map +1 -1
- package/build-module/components/sidebar-navigation-screen-identity/index.mjs +1 -1
- package/build-module/components/sidebar-navigation-screen-identity/index.mjs.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.mjs +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.mjs.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.mjs +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.mjs.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.mjs +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.mjs.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.mjs +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.mjs.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.mjs +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.mjs.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.mjs +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.mjs.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.mjs +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.mjs.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.mjs.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.mjs +1 -1
- 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 +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.mjs.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.mjs +1 -1
- 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 +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.mjs.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.mjs +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.mjs.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.mjs +43 -76
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.mjs.map +3 -3
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.mjs +2 -3
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.mjs.map +3 -3
- package/build-module/components/sidebar-navigation-screen-unsupported/index.mjs +1 -1
- package/build-module/components/sidebar-navigation-screen-unsupported/index.mjs.map +1 -1
- package/build-module/components/site-editor-routes/home.mjs +1 -1
- package/build-module/components/site-editor-routes/home.mjs.map +1 -1
- package/build-module/components/site-editor-routes/identity.mjs +1 -1
- package/build-module/components/site-editor-routes/identity.mjs.map +1 -1
- package/build-module/components/site-editor-routes/navigation-item.mjs +1 -1
- package/build-module/components/site-editor-routes/navigation-item.mjs.map +1 -1
- package/build-module/components/site-editor-routes/navigation.mjs +1 -1
- package/build-module/components/site-editor-routes/navigation.mjs.map +1 -1
- package/build-module/components/site-editor-routes/notfound.mjs +1 -1
- package/build-module/components/site-editor-routes/notfound.mjs.map +1 -1
- package/build-module/components/site-editor-routes/page-item.mjs +1 -1
- package/build-module/components/site-editor-routes/page-item.mjs.map +1 -1
- package/build-module/components/site-editor-routes/pages.mjs +1 -1
- package/build-module/components/site-editor-routes/pages.mjs.map +1 -1
- package/build-module/components/site-editor-routes/pattern-item.mjs +1 -1
- package/build-module/components/site-editor-routes/pattern-item.mjs.map +1 -1
- package/build-module/components/site-editor-routes/patterns.mjs +1 -1
- package/build-module/components/site-editor-routes/patterns.mjs.map +1 -1
- package/build-module/components/site-editor-routes/stylebook.mjs +1 -1
- package/build-module/components/site-editor-routes/stylebook.mjs.map +1 -1
- package/build-module/components/site-editor-routes/styles.mjs +1 -1
- package/build-module/components/site-editor-routes/styles.mjs.map +1 -1
- package/build-module/components/site-editor-routes/template-item.mjs +1 -1
- package/build-module/components/site-editor-routes/template-item.mjs.map +1 -1
- package/build-module/components/site-editor-routes/template-part-item.mjs +1 -1
- package/build-module/components/site-editor-routes/template-part-item.mjs.map +1 -1
- package/build-module/components/site-editor-routes/templates.mjs +3 -5
- package/build-module/components/site-editor-routes/templates.mjs.map +3 -3
- package/build-module/components/site-hub/index.mjs +1 -1
- package/build-module/components/site-hub/index.mjs.map +1 -1
- package/build-module/components/welcome-guide/editor.mjs +1 -1
- package/build-module/components/welcome-guide/editor.mjs.map +1 -1
- package/build-module/components/welcome-guide/image.mjs +1 -1
- package/build-module/components/welcome-guide/image.mjs.map +1 -1
- package/build-module/components/welcome-guide/index.mjs +1 -1
- package/build-module/components/welcome-guide/index.mjs.map +1 -1
- package/build-module/components/welcome-guide/page.mjs +1 -1
- package/build-module/components/welcome-guide/page.mjs.map +1 -1
- package/build-module/components/welcome-guide/template.mjs +1 -1
- package/build-module/components/welcome-guide/template.mjs.map +1 -1
- package/build-module/deprecated.mjs +1 -1
- package/build-module/deprecated.mjs.map +1 -1
- package/build-module/index.mjs +1 -1
- package/build-module/index.mjs.map +1 -1
- package/build-style/style-rtl.css +31 -64
- package/build-style/style.css +31 -64
- package/package.json +42 -52
- package/src/components/add-new-template/style.scss +8 -21
- package/src/components/add-new-template/utils.js +118 -9
- package/src/components/dataviews-actions/index.js +0 -61
- package/src/components/editor/use-adapt-editor-to-canvas.js +0 -21
- package/src/components/layout/{index.js → index.jsx} +2 -1
- package/src/components/more-menu/{welcome-guide-menu-item.js → welcome-guide-menu-item.jsx} +8 -3
- package/src/components/page-templates/fields.jsx +51 -0
- package/src/components/page-templates/{index-legacy.js → index.jsx} +1 -1
- package/src/components/sidebar-global-styles/{index.js → index.jsx} +7 -5
- package/src/components/sidebar-global-styles/style.scss +6 -0
- package/src/components/sidebar-identity/{index.js → index.jsx} +9 -11
- package/src/components/sidebar-identity/style.scss +7 -0
- package/src/components/sidebar-navigation-item/{index.js → index.jsx} +1 -7
- package/src/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +1 -1
- package/src/components/sidebar-navigation-screen-navigation-menus/{index.js → index.jsx} +1 -1
- package/src/components/sidebar-navigation-screen-navigation-menus/{navigation-menu-content.js → navigation-menu-content.jsx} +1 -1
- package/src/components/sidebar-navigation-screen-templates-browse/{index.js → index.jsx} +1 -8
- package/src/components/site-editor-routes/{templates.js → templates.jsx} +2 -19
- package/src/components/welcome-guide/style.scss +1 -1
- package/src/style.scss +1 -1
- package/src/utils/test/get-filtered-template-parts.js +1 -0
- package/build/components/add-new-template-legacy/add-custom-generic-template-modal-content.cjs +0 -107
- package/build/components/add-new-template-legacy/add-custom-generic-template-modal-content.cjs.map +0 -7
- package/build/components/add-new-template-legacy/add-custom-template-modal-content.cjs +0 -327
- package/build/components/add-new-template-legacy/add-custom-template-modal-content.cjs.map +0 -7
- package/build/components/add-new-template-legacy/index.cjs +0 -390
- package/build/components/add-new-template-legacy/index.cjs.map +0 -7
- package/build/components/add-new-template-legacy/utils.cjs +0 -623
- package/build/components/add-new-template-legacy/utils.cjs.map +0 -7
- package/build/components/page-templates/hooks.cjs +0 -94
- package/build/components/page-templates/hooks.cjs.map +0 -7
- package/build/components/page-templates/index-legacy.cjs +0 -167
- package/build/components/page-templates/index-legacy.cjs.map +0 -7
- package/build/components/page-templates/view-utils.cjs +0 -79
- package/build/components/page-templates/view-utils.cjs.map +0 -7
- package/build/components/sidebar-navigation-screen-templates-browse/content-legacy.cjs +0 -78
- package/build/components/sidebar-navigation-screen-templates-browse/content-legacy.cjs.map +0 -7
- package/build-module/components/add-new-template-legacy/add-custom-generic-template-modal-content.mjs +0 -91
- package/build-module/components/add-new-template-legacy/add-custom-generic-template-modal-content.mjs.map +0 -7
- package/build-module/components/add-new-template-legacy/add-custom-template-modal-content.mjs +0 -315
- package/build-module/components/add-new-template-legacy/add-custom-template-modal-content.mjs.map +0 -7
- package/build-module/components/add-new-template-legacy/index.mjs +0 -391
- package/build-module/components/add-new-template-legacy/index.mjs.map +0 -7
- package/build-module/components/add-new-template-legacy/utils.mjs +0 -592
- package/build-module/components/add-new-template-legacy/utils.mjs.map +0 -7
- package/build-module/components/page-templates/hooks.mjs +0 -74
- package/build-module/components/page-templates/hooks.mjs.map +0 -7
- package/build-module/components/page-templates/index-legacy.mjs +0 -136
- package/build-module/components/page-templates/index-legacy.mjs.map +0 -7
- package/build-module/components/page-templates/view-utils.mjs +0 -52
- package/build-module/components/page-templates/view-utils.mjs.map +0 -7
- package/build-module/components/sidebar-navigation-screen-templates-browse/content-legacy.mjs +0 -52
- package/build-module/components/sidebar-navigation-screen-templates-browse/content-legacy.mjs.map +0 -7
- package/src/components/add-new-template/add-custom-generic-template-modal-content.js +0 -85
- package/src/components/add-new-template/add-custom-template-modal-content.js +0 -304
- package/src/components/add-new-template/index.js +0 -435
- package/src/components/add-new-template-legacy/utils.js +0 -757
- package/src/components/page-templates/fields.js +0 -195
- package/src/components/page-templates/hooks.js +0 -93
- package/src/components/page-templates/index.js +0 -369
- package/src/components/page-templates/view-utils.js +0 -50
- package/src/components/sidebar-navigation-screen-templates-browse/content.js +0 -87
- package/src/components/sidebar-navigation-screen-templates-browse/style.scss +0 -6
- /package/src/components/add-new-pattern/{index.js → index.jsx} +0 -0
- /package/src/components/add-new-post/{index.js → index.jsx} +0 -0
- /package/src/components/{add-new-template-legacy/add-custom-generic-template-modal-content.js → add-new-template/add-custom-generic-template-modal-content.jsx} +0 -0
- /package/src/components/{add-new-template-legacy/add-custom-template-modal-content.js → add-new-template/add-custom-template-modal-content.jsx} +0 -0
- /package/src/components/{add-new-template-legacy/index.js → add-new-template/index.jsx} +0 -0
- /package/src/components/app/{index.js → index.jsx} +0 -0
- /package/src/components/canvas-loader/{index.js → index.jsx} +0 -0
- /package/src/components/editor/{index.js → index.jsx} +0 -0
- /package/src/components/editor/{site-preview.js → site-preview.jsx} +0 -0
- /package/src/components/media/{index.js → index.jsx} +0 -0
- /package/src/components/more-menu/{index.js → index.jsx} +0 -0
- /package/src/components/page-patterns/{actions.js → actions.jsx} +0 -0
- /package/src/components/page-patterns/{delete-category-menu-item.js → delete-category-menu-item.jsx} +0 -0
- /package/src/components/page-patterns/{fields.js → fields.jsx} +0 -0
- /package/src/components/page-patterns/{index.js → index.jsx} +0 -0
- /package/src/components/page-patterns/{rename-category-menu-item.js → rename-category-menu-item.jsx} +0 -0
- /package/src/components/pagination/{index.js → index.jsx} +0 -0
- /package/src/components/plugin-template-setting-panel/{index.js → index.jsx} +0 -0
- /package/src/components/post-list/{index.js → index.jsx} +0 -0
- /package/src/components/post-list/{quick-edit-modal.js → quick-edit-modal.jsx} +0 -0
- /package/src/components/resizable-frame/{index.js → index.jsx} +0 -0
- /package/src/components/save-button/{index.js → index.jsx} +0 -0
- /package/src/components/save-hub/{index.js → index.jsx} +0 -0
- /package/src/components/save-panel/{index.js → index.jsx} +0 -0
- /package/src/components/sidebar/{index.js → index.jsx} +0 -0
- /package/src/components/sidebar-button/{index.js → index.jsx} +0 -0
- /package/src/components/sidebar-dataviews/{index.js → index.jsx} +0 -0
- /package/src/components/sidebar-navigation-screen/{index.js → index.jsx} +0 -0
- /package/src/components/sidebar-navigation-screen-details-footer/{index.js → index.jsx} +0 -0
- /package/src/components/sidebar-navigation-screen-global-styles/{content.js → content.jsx} +0 -0
- /package/src/components/sidebar-navigation-screen-global-styles/{index.js → index.jsx} +0 -0
- /package/src/components/sidebar-navigation-screen-identity/{index.js → index.jsx} +0 -0
- /package/src/components/sidebar-navigation-screen-main/{index.js → index.jsx} +0 -0
- /package/src/components/sidebar-navigation-screen-navigation-menu/{delete-confirm-dialog.js → delete-confirm-dialog.jsx} +0 -0
- /package/src/components/sidebar-navigation-screen-navigation-menu/{index.js → index.jsx} +0 -0
- /package/src/components/sidebar-navigation-screen-navigation-menu/{more-menu.js → more-menu.jsx} +0 -0
- /package/src/components/sidebar-navigation-screen-navigation-menu/{navigation-menu-editor.js → navigation-menu-editor.jsx} +0 -0
- /package/src/components/sidebar-navigation-screen-navigation-menu/{rename-modal.js → rename-modal.jsx} +0 -0
- /package/src/components/sidebar-navigation-screen-navigation-menu/{single-navigation-menu.js → single-navigation-menu.jsx} +0 -0
- /package/src/components/sidebar-navigation-screen-navigation-menus/{leaf-more-menu.js → leaf-more-menu.jsx} +0 -0
- /package/src/components/sidebar-navigation-screen-patterns/{category-item.js → category-item.jsx} +0 -0
- /package/src/components/sidebar-navigation-screen-patterns/{index.js → index.jsx} +0 -0
- /package/src/components/sidebar-navigation-screen-templates-browse/{content-legacy.js → content.jsx} +0 -0
- /package/src/components/sidebar-navigation-screen-unsupported/{index.js → index.jsx} +0 -0
- /package/src/components/site-editor-routes/{home.js → home.jsx} +0 -0
- /package/src/components/site-editor-routes/{identity.js → identity.jsx} +0 -0
- /package/src/components/site-editor-routes/{navigation-item.js → navigation-item.jsx} +0 -0
- /package/src/components/site-editor-routes/{navigation.js → navigation.jsx} +0 -0
- /package/src/components/site-editor-routes/{notfound.js → notfound.jsx} +0 -0
- /package/src/components/site-editor-routes/{page-item.js → page-item.jsx} +0 -0
- /package/src/components/site-editor-routes/{pages.js → pages.jsx} +0 -0
- /package/src/components/site-editor-routes/{pattern-item.js → pattern-item.jsx} +0 -0
- /package/src/components/site-editor-routes/{patterns.js → patterns.jsx} +0 -0
- /package/src/components/site-editor-routes/{stylebook.js → stylebook.jsx} +0 -0
- /package/src/components/site-editor-routes/{styles.js → styles.jsx} +0 -0
- /package/src/components/site-editor-routes/{template-item.js → template-item.jsx} +0 -0
- /package/src/components/site-editor-routes/{template-part-item.js → template-part-item.jsx} +0 -0
- /package/src/components/site-hub/{index.js → index.jsx} +0 -0
- /package/src/components/welcome-guide/{editor.js → editor.jsx} +0 -0
- /package/src/components/welcome-guide/{image.js → image.jsx} +0 -0
- /package/src/components/welcome-guide/{index.js → index.jsx} +0 -0
- /package/src/components/welcome-guide/{page.js → page.jsx} +0 -0
- /package/src/components/welcome-guide/{template.js → template.jsx} +0 -0
- /package/src/{deprecated.js → deprecated.jsx} +0 -0
- /package/src/{index.js → index.jsx} +0 -0
|
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
|
-
// packages/edit-site/src/components/save-button/index.
|
|
20
|
+
// packages/edit-site/src/components/save-button/index.jsx
|
|
21
21
|
var save_button_exports = {};
|
|
22
22
|
__export(save_button_exports, {
|
|
23
23
|
default: () => SaveButton
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/save-button/index.
|
|
3
|
+
"sources": ["../../../src/components/save-button/index.jsx"],
|
|
4
4
|
"sourcesContent": ["import { useSelect, useDispatch } from '@wordpress/data';\nimport { Button } from '@wordpress/components';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport {\n\tstore as coreStore,\n\tprivateApis as coreDataPrivateApis,\n} from '@wordpress/core-data';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { store as editSiteStore } from '../../store';\nimport {\n\tcurrentlyPreviewingTheme,\n\tisPreviewingTheme,\n} from '../../utils/is-previewing-theme';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\nconst { useEntitiesSavedStatesIsDirty } = unlock( coreDataPrivateApis );\n\nexport default function SaveButton( {\n\tclassName = 'edit-site-save-button__button',\n\tvariant = 'primary',\n\tshowTooltip = true,\n\tshowReviewMessage,\n\ticon,\n\tsize,\n\t__next40pxDefaultSize = false,\n} ) {\n\tconst { params } = useLocation();\n\tconst { setIsSaveViewOpened } = useDispatch( editSiteStore );\n\tconst { saveDirtyEntities } = unlock( useDispatch( coreStore ) );\n\tconst { dirtyEntityRecords } = useEntitiesSavedStatesIsDirty();\n\tconst { isSaving, isSaveViewOpen, previewingThemeName } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isSavingEntityRecord, isResolving } = select( coreStore );\n\t\t\tconst { isSaveViewOpened } = select( editSiteStore );\n\t\t\tconst isActivatingTheme = isResolving( 'activateTheme' );\n\t\t\tconst currentlyPreviewingThemeId = currentlyPreviewingTheme();\n\t\t\treturn {\n\t\t\t\tisSaving:\n\t\t\t\t\tdirtyEntityRecords.some( ( record ) =>\n\t\t\t\t\t\tisSavingEntityRecord(\n\t\t\t\t\t\t\trecord.kind,\n\t\t\t\t\t\t\trecord.name,\n\t\t\t\t\t\t\trecord.key\n\t\t\t\t\t\t)\n\t\t\t\t\t) || isActivatingTheme,\n\t\t\t\tisSaveViewOpen: isSaveViewOpened(),\n\t\t\t\t// Do not call `getTheme` with null, it will cause a request to\n\t\t\t\t// the server.\n\t\t\t\tpreviewingThemeName: currentlyPreviewingThemeId\n\t\t\t\t\t? select( coreStore ).getTheme( currentlyPreviewingThemeId )\n\t\t\t\t\t\t\t?.name?.rendered\n\t\t\t\t\t: undefined,\n\t\t\t};\n\t\t},\n\t\t[ dirtyEntityRecords ]\n\t);\n\tconst hasDirtyEntities = !! dirtyEntityRecords.length;\n\tlet isOnlyCurrentEntityDirty;\n\t// Check if the current entity is the only entity with changes.\n\t// We have some extra logic for `wp_global_styles` for now, that\n\t// is used in navigation sidebar.\n\tif ( dirtyEntityRecords.length === 1 ) {\n\t\tif ( params.postId ) {\n\t\t\tisOnlyCurrentEntityDirty =\n\t\t\t\t`${ dirtyEntityRecords[ 0 ].key }` === params.postId &&\n\t\t\t\tdirtyEntityRecords[ 0 ].name === params.postType;\n\t\t} else if ( params.path?.includes( 'wp_global_styles' ) ) {\n\t\t\tisOnlyCurrentEntityDirty =\n\t\t\t\tdirtyEntityRecords[ 0 ].name === 'globalStyles';\n\t\t}\n\t}\n\tconst disabled =\n\t\tisSaving || ( ! hasDirtyEntities && ! isPreviewingTheme() );\n\tconst getLabel = () => {\n\t\tif ( isPreviewingTheme() ) {\n\t\t\tif ( isSaving ) {\n\t\t\t\treturn sprintf(\n\t\t\t\t\t/* translators: %s: The name of theme to be activated. */\n\t\t\t\t\t__( 'Activating %s' ),\n\t\t\t\t\tpreviewingThemeName\n\t\t\t\t);\n\t\t\t} else if ( disabled ) {\n\t\t\t\treturn __( 'Saved' );\n\t\t\t} else if ( hasDirtyEntities ) {\n\t\t\t\treturn sprintf(\n\t\t\t\t\t/* translators: %s: The name of theme to be activated. */\n\t\t\t\t\t__( 'Activate %s & Save' ),\n\t\t\t\t\tpreviewingThemeName\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn sprintf(\n\t\t\t\t/* translators: %s: The name of theme to be activated. */\n\t\t\t\t__( 'Activate %s' ),\n\t\t\t\tpreviewingThemeName\n\t\t\t);\n\t\t}\n\t\tif ( isSaving ) {\n\t\t\treturn __( 'Saving' );\n\t\t}\n\t\tif ( disabled ) {\n\t\t\treturn __( 'Saved' );\n\t\t}\n\t\tif ( ! isOnlyCurrentEntityDirty && showReviewMessage ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: %d: number of unsaved changes (number).\n\t\t\t\t_n(\n\t\t\t\t\t'Review %d change…',\n\t\t\t\t\t'Review %d changes…',\n\t\t\t\t\tdirtyEntityRecords.length\n\t\t\t\t),\n\t\t\t\tdirtyEntityRecords.length\n\t\t\t);\n\t\t}\n\t\treturn __( 'Save' );\n\t};\n\tconst label = getLabel();\n\tconst onClick = isOnlyCurrentEntityDirty\n\t\t? () => saveDirtyEntities( { dirtyEntityRecords } )\n\t\t: () => setIsSaveViewOpened( true );\n\treturn (\n\t\t<Button\n\t\t\tvariant={ variant }\n\t\t\tclassName={ className }\n\t\t\taria-disabled={ disabled }\n\t\t\taria-expanded={ isSaveViewOpen }\n\t\t\tisBusy={ isSaving }\n\t\t\tonClick={ disabled ? undefined : onClick }\n\t\t\tlabel={ label }\n\t\t\t/*\n\t\t\t * We want the tooltip to show the keyboard shortcut only when the\n\t\t\t * button does something, i.e. when it's not disabled.\n\t\t\t */\n\t\t\tshortcut={ disabled ? undefined : displayShortcut.primary( 's' ) }\n\t\t\t/*\n\t\t\t * Displaying the keyboard shortcut conditionally makes the tooltip\n\t\t\t * itself show conditionally. This would trigger a full-rerendering\n\t\t\t * of the button that we want to avoid. By setting `showTooltip`,\n\t\t\t * the tooltip is always rendered even when there's no keyboard shortcut.\n\t\t\t */\n\t\t\tshowTooltip={ showTooltip }\n\t\t\ticon={ icon }\n\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\tsize={ size }\n\t\t>\n\t\t\t{ label }\n\t\t</Button>\n\t);\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAuC;AACvC,wBAAuB;AACvB,kBAAgC;AAChC,uBAGO;AACP,sBAAgC;AAChC,oBAAiD;AACjD,mBAAuC;AACvC,iCAGO;AACP,yBAAuB;AA4GrB;AA1GF,IAAM,EAAE,YAAY,QAAI,2BAAQ,cAAAA,WAAkB;AAClD,IAAM,EAAE,8BAA8B,QAAI,2BAAQ,iBAAAC,WAAoB;AAEvD,SAAR,WAA6B;AAAA,EACnC,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA,wBAAwB;AACzB,GAAI;AACH,QAAM,EAAE,OAAO,IAAI,YAAY;AAC/B,QAAM,EAAE,oBAAoB,QAAI,yBAAa,aAAAC,KAAc;AAC3D,QAAM,EAAE,kBAAkB,QAAI,+BAAQ,yBAAa,iBAAAC,KAAU,CAAE;AAC/D,QAAM,EAAE,mBAA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UACzB;AAAA,QACD;AAAA,MACD;AACA,iBAAO;AAAA;AAAA,YAEN,gBAAI,aAAc;AAAA,QAClB;AAAA,MACD;AAAA,IACD;AACA,QAAK,UAAW;AACf,iBAAO,gBAAI,QAAS;AAAA,IACrB;AACA,QAAK,UAAW;AACf,iBAAO,gBAAI,OAAQ;AAAA,IACpB;AACA,QAAK,CAAE,4BAA4B,mBAAoB;AACtD,iBAAO;AAAA;AAAA,YAEN;AAAA,UACC;AAAA,UACA;AAAA,UACA,mBAAmB;AAAA,QACpB;AAAA,QACA,mBAAmB;AAAA,MACpB;AAAA,IACD;AACA,eAAO,gBAAI,MAAO;AAAA,EACnB;AACA,QAAM,QAAQ,SAAS;AACvB,QAAM,UAAU,2BACb,MAAM,kBAAmB,EAAE,mBAAmB,CAAE,IAChD,MAAM,oBAAqB,IAAK;AACnC,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA,iBAAgB;AAAA,MAChB,iBAAgB;AAAA,MAChB,QAAS;AAAA,MACT,SAAU,WAAW,SAAY;AAAA,MACjC;AAAA,MAKA,UAAW,WAAW,SAAY,gCAAgB,QAAS,GAAI;AAAA,MAO/D;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEE;AAAA;AAAA,EACH;AAEF;",
|
|
6
6
|
"names": ["routerPrivateApis", "coreDataPrivateApis", "editSiteStore", "coreStore"]
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// packages/edit-site/src/components/save-hub/index.
|
|
30
|
+
// packages/edit-site/src/components/save-hub/index.jsx
|
|
31
31
|
var save_hub_exports = {};
|
|
32
32
|
__export(save_hub_exports, {
|
|
33
33
|
default: () => SaveHub
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/save-hub/index.
|
|
3
|
+
"sources": ["../../../src/components/save-hub/index.jsx"],
|
|
4
4
|
"sourcesContent": ["import { useSelect } from '@wordpress/data';\nimport { Stack } from '@wordpress/ui';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { check } from '@wordpress/icons';\nimport SaveButton from '../save-button';\nimport { isPreviewingTheme } from '../../utils/is-previewing-theme';\n\nexport default function SaveHub() {\n\tconst { isDisabled, isSaving } = useSelect( ( select ) => {\n\t\tconst { __experimentalGetDirtyEntityRecords, isSavingEntityRecord } =\n\t\t\tselect( coreStore );\n\t\tconst dirtyEntityRecords = __experimentalGetDirtyEntityRecords();\n\t\tconst _isSaving = dirtyEntityRecords.some( ( record ) =>\n\t\t\tisSavingEntityRecord( record.kind, record.name, record.key )\n\t\t);\n\t\treturn {\n\t\t\tisSaving: _isSaving,\n\t\t\tisDisabled:\n\t\t\t\t_isSaving ||\n\t\t\t\t( ! dirtyEntityRecords.length && ! isPreviewingTheme() ),\n\t\t};\n\t}, [] );\n\treturn (\n\t\t<Stack className=\"edit-site-save-hub\" gap=\"lg\">\n\t\t\t<SaveButton\n\t\t\t\tclassName=\"edit-site-save-hub__button\"\n\t\t\t\tvariant={ isDisabled && ! isSaving ? null : 'primary' }\n\t\t\t\tshowTooltip={ false }\n\t\t\t\ticon={ isDisabled && ! isSaving ? check : null }\n\t\t\t\tshowReviewMessage\n\t\t\t\t__next40pxDefaultSize\n\t\t\t/>\n\t\t</Stack>\n\t);\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA0B;AAC1B,gBAAsB;AACtB,uBAAmC;AACnC,mBAAsB;AACtB,yBAAuB;AACvB,iCAAkC;AAmB/B;AAjBY,SAAR,UAA2B;AACjC,QAAM,EAAE,YAAY,SAAS,QAAI,uBAAW,CAAE,WAAY;AACzD,UAAM,EAAE,qCAAqC,qBAAqB,IACjE,OAAQ,iBAAAA,KAAU;AACnB,UAAM,qBAAqB,oCAAoC;AAC/D,UAAM,YAAY,mBAAmB;AAAA,MAAM,CAAE,WAC5C,qBAAsB,OAAO,MAAM,OAAO,MAAM,OAAO,GAAI;AAAA,IAC5D;AACA,WAAO;AAAA,MACN,UAAU;AAAA,MACV,YACC,aACE,CAAE,mBAAmB,UAAU,KAAE,8CAAkB;AAAA,IACvD;AAAA,EACD,GAAG,CAAC,CAAE;AACN,SACC,4CAAC,mBAAM,WAAU,sBAAqB,KAAI,MACzC;AAAA,IAAC,mBAAAC;AAAA,IAAA;AAAA,MACA,WAAU;AAAA,MACV,SAAU,cAAc,CAAE,WAAW,OAAO;AAAA,MAC5C,aAAc;AAAA,MACd,MAAO,cAAc,CAAE,WAAW,qBAAQ;AAAA,MAC1C,mBAAiB;AAAA,MACjB,uBAAqB;AAAA;AAAA,EACtB,GACD;AAEF;",
|
|
6
6
|
"names": ["coreStore", "SaveButton"]
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// packages/edit-site/src/components/save-panel/index.
|
|
30
|
+
// packages/edit-site/src/components/save-panel/index.jsx
|
|
31
31
|
var save_panel_exports = {};
|
|
32
32
|
__export(save_panel_exports, {
|
|
33
33
|
default: () => SavePanel
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/save-panel/index.
|
|
3
|
+
"sources": ["../../../src/components/save-panel/index.jsx"],
|
|
4
4
|
"sourcesContent": ["import clsx from 'clsx';\nimport { NavigableRegion } from '@wordpress/admin-ui';\nimport { Button, Modal } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tstore as coreStore,\n\tprivateApis as coreDataPrivateApis,\n} from '@wordpress/core-data';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { useEffect } from '@wordpress/element';\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { useActivateTheme } from '../../utils/use-activate-theme';\nimport { useActualCurrentTheme } from '../../utils/use-actual-current-theme';\nimport { isPreviewingTheme } from '../../utils/is-previewing-theme';\n\nconst { useLocation } = unlock( routerPrivateApis );\nconst {\n\tEntitiesSavedStatesExtensible,\n\tEntitiesSavedStates,\n\tuseEntitiesSavedStatesIsDirty,\n} = unlock( coreDataPrivateApis );\n\nconst EntitiesSavedStatesForPreview = ( {\n\tonClose,\n\trenderDialog,\n\tvariant,\n} ) => {\n\tconst isDirtyProps = useEntitiesSavedStatesIsDirty();\n\tlet activateSaveLabel, successNoticeContent;\n\tif ( isDirtyProps.isDirty ) {\n\t\tactivateSaveLabel = __( 'Activate & Save' );\n\t\tsuccessNoticeContent = __( 'Theme activated and site updated.' );\n\t} else {\n\t\tactivateSaveLabel = __( 'Activate' );\n\t\tsuccessNoticeContent = __( 'Theme activated.' );\n\t}\n\n\tconst currentTheme = useActualCurrentTheme();\n\n\tconst previewingTheme = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme(),\n\t\t[]\n\t);\n\n\tconst additionalPrompt = (\n\t\t<p>\n\t\t\t{ sprintf(\n\t\t\t\t/* translators: 1: The name of active theme, 2: The name of theme to be activated. */\n\t\t\t\t__(\n\t\t\t\t\t'Saving your changes will change your active theme from %1$s to %2$s.'\n\t\t\t\t),\n\t\t\t\tcurrentTheme?.name?.rendered ?? '...',\n\t\t\t\tpreviewingTheme?.name?.rendered ?? '...'\n\t\t\t) }\n\t\t</p>\n\t);\n\n\tconst activateTheme = useActivateTheme();\n\tconst onSave = async () => {\n\t\tawait activateTheme();\n\t};\n\n\treturn (\n\t\t<EntitiesSavedStatesExtensible\n\t\t\t{ ...{\n\t\t\t\t...isDirtyProps,\n\t\t\t\tadditionalPrompt,\n\t\t\t\tclose: onClose,\n\t\t\t\tonSave,\n\t\t\t\tsaveEnabled: true,\n\t\t\t\tsaveLabel: activateSaveLabel,\n\t\t\t\trenderDialog,\n\t\t\t\tvariant,\n\t\t\t\tsuccessNoticeContent,\n\t\t\t} }\n\t\t/>\n\t);\n};\n\nconst _EntitiesSavedStates = ( { onClose, renderDialog, variant } ) => {\n\tif ( isPreviewingTheme() ) {\n\t\treturn (\n\t\t\t<EntitiesSavedStatesForPreview\n\t\t\t\tonClose={ onClose }\n\t\t\t\trenderDialog={ renderDialog }\n\t\t\t\tvariant={ variant }\n\t\t\t/>\n\t\t);\n\t}\n\treturn (\n\t\t<EntitiesSavedStates\n\t\t\tclose={ onClose }\n\t\t\trenderDialog={ renderDialog }\n\t\t\tvariant={ variant }\n\t\t/>\n\t);\n};\n\nexport default function SavePanel() {\n\tconst { query } = useLocation();\n\tconst { canvas = 'view' } = query;\n\tconst { isSaveViewOpen, isDirty, isSaving } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\t__experimentalGetDirtyEntityRecords,\n\t\t\tisSavingEntityRecord,\n\t\t\tisResolving,\n\t\t} = select( coreStore );\n\t\tconst dirtyEntityRecords = __experimentalGetDirtyEntityRecords();\n\t\tconst isActivatingTheme = isResolving( 'activateTheme' );\n\t\tconst { isSaveViewOpened } = unlock( select( editSiteStore ) );\n\n\t\t// The currently selected entity to display.\n\t\t// Typically template or template part in the site editor.\n\t\treturn {\n\t\t\tisSaveViewOpen: isSaveViewOpened(),\n\t\t\tisDirty: dirtyEntityRecords.length > 0,\n\t\t\tisSaving:\n\t\t\t\tdirtyEntityRecords.some( ( record ) =>\n\t\t\t\t\tisSavingEntityRecord( record.kind, record.name, record.key )\n\t\t\t\t) || isActivatingTheme,\n\t\t};\n\t}, [] );\n\tconst { setIsSaveViewOpened } = useDispatch( editSiteStore );\n\tconst onClose = () => setIsSaveViewOpened( false );\n\tuseEffect( () => {\n\t\tsetIsSaveViewOpened( false );\n\t}, [ canvas, setIsSaveViewOpened ] );\n\n\tif ( canvas === 'view' ) {\n\t\treturn isSaveViewOpen ? (\n\t\t\t<Modal\n\t\t\t\tclassName=\"edit-site-save-panel__modal\"\n\t\t\t\tonRequestClose={ onClose }\n\t\t\t\ttitle={ __( 'Review changes' ) }\n\t\t\t\tsize=\"small\"\n\t\t\t>\n\t\t\t\t<_EntitiesSavedStates onClose={ onClose } variant=\"inline\" />\n\t\t\t</Modal>\n\t\t) : null;\n\t}\n\tconst activateSaveEnabled = isPreviewingTheme() || isDirty;\n\tconst disabled = isSaving || ! activateSaveEnabled;\n\treturn (\n\t\t<NavigableRegion\n\t\t\tclassName={ clsx( 'edit-site-layout__actions', {\n\t\t\t\t'is-entity-save-view-open': isSaveViewOpen,\n\t\t\t} ) }\n\t\t\tariaLabel={ __( 'Save panel' ) }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'edit-site-editor__toggle-save-panel', {\n\t\t\t\t\t'screen-reader-text': isSaveViewOpen,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tclassName=\"edit-site-editor__toggle-save-panel-button\"\n\t\t\t\t\tonClick={ () => setIsSaveViewOpened( true ) }\n\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Open save panel' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t\t{ isSaveViewOpen && (\n\t\t\t\t<_EntitiesSavedStates onClose={ onClose } renderDialog />\n\t\t\t) }\n\t\t</NavigableRegion>\n\t);\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,sBAAgC;AAChC,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KAAK;AACnD,QAAM,WAAW,YAAY,CAAE;AAC/B,SACC;AAAA,IAAC;AAAA;AAAA,MACA,eAAY,YAAAC,SAAM,6BAA6B;AAAA,QAC9C,4BAA4B;AAAA,MAC7B,CAAE;AAAA,MACF,eAAY,gBAAI,YAAa;AAAA,MAE7B;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,eAAY,YAAAA,SAAM,uCAAuC;AAAA,cACxD,sBAAsB;AAAA,YACvB,CAAE;AAAA,YAEF;AAAA,cAAC;AAAA;AAAA,gBACA,uBAAqB;AAAA,gBACrB,SAAQ;AAAA,gBACR,WAAU;AAAA,gBACV,SAAU,MAAM,oBAAqB,IAAK;AAAA,gBAC1C,iBAAc;AAAA,gBACd;AAAA,gBACA,wBAAsB;AAAA,gBAEpB,8BAAI,iBAAkB;AAAA;AAAA,YACzB;AAAA;AAAA,QACD;AAAA,QACE,kBACD,4CAAC,wBAAqB,SAAoB,cAAY,MAAC;AAAA;AAAA;AAAA,EAEzD;AAEF;",
|
|
6
6
|
"names": ["routerPrivateApis", "coreDataPrivateApis", "coreStore", "editSiteStore", "clsx"]
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// packages/edit-site/src/components/sidebar/index.
|
|
30
|
+
// packages/edit-site/src/components/sidebar/index.jsx
|
|
31
31
|
var sidebar_exports = {};
|
|
32
32
|
__export(sidebar_exports, {
|
|
33
33
|
SidebarContent: () => SidebarContent,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/sidebar/index.
|
|
3
|
+
"sources": ["../../../src/components/sidebar/index.jsx"],
|
|
4
4
|
"sourcesContent": ["import clsx from 'clsx';\nimport {\n\tcreateContext,\n\tuseContext,\n\tuseState,\n\tuseRef,\n\tuseLayoutEffect,\n} from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\n\nexport const SidebarNavigationContext = createContext( () => {} );\nSidebarNavigationContext.displayName = 'SidebarNavigationContext';\n\n// Focus a sidebar element after a navigation. The element to focus is either\n// specified by `focusSelector` (when navigating back) or it is the first\n// tabbable element (usually the \"Back\" button).\nfunction focusSidebarElement( el, direction, focusSelector ) {\n\tlet elementToFocus;\n\tif ( direction === 'back' && focusSelector ) {\n\t\telementToFocus = el.querySelector( focusSelector );\n\t}\n\tif ( direction !== null && ! elementToFocus ) {\n\t\tconst [ firstTabbable ] = focus.tabbable.find( el );\n\t\telementToFocus = firstTabbable ?? el;\n\t}\n\telementToFocus?.focus();\n}\n\n// Navigation state that is updated when navigating back or forward. Helps us\n// manage the animations and also focus.\nfunction createNavState() {\n\tlet state = {\n\t\tdirection: null,\n\t\tfocusSelector: null,\n\t};\n\n\treturn {\n\t\tget() {\n\t\t\treturn state;\n\t\t},\n\t\tnavigate( direction, focusSelector = null ) {\n\t\t\tstate = {\n\t\t\t\tdirection,\n\t\t\t\tfocusSelector:\n\t\t\t\t\tdirection === 'forward' && focusSelector\n\t\t\t\t\t\t? focusSelector\n\t\t\t\t\t\t: state.focusSelector,\n\t\t\t};\n\t\t},\n\t};\n}\n\nfunction SidebarContentWrapper( { children, shouldAnimate } ) {\n\tconst navState = useContext( SidebarNavigationContext );\n\tconst wrapperRef = useRef();\n\tconst [ navAnimation, setNavAnimation ] = useState( null );\n\n\tuseLayoutEffect( () => {\n\t\tconst { direction, focusSelector } = navState.get();\n\t\tfocusSidebarElement( wrapperRef.current, direction, focusSelector );\n\t\tsetNavAnimation( direction );\n\t}, [ navState ] );\n\n\tconst wrapperCls = clsx(\n\t\t'edit-site-sidebar__screen-wrapper',\n\t\t/*\n\t\t * Some panes do not have sub-panes and therefore\n\t\t * should not animate when clicked on.\n\t\t */\n\t\tshouldAnimate\n\t\t\t? {\n\t\t\t\t\t'slide-from-left': navAnimation === 'back',\n\t\t\t\t\t'slide-from-right': navAnimation === 'forward',\n\t\t\t }\n\t\t\t: {}\n\t);\n\n\treturn (\n\t\t<div ref={ wrapperRef } className={ wrapperCls }>\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport function SidebarNavigationProvider( { children } ) {\n\tconst [ navState ] = useState( createNavState );\n\n\treturn (\n\t\t<SidebarNavigationContext.Provider value={ navState }>\n\t\t\t{ children }\n\t\t</SidebarNavigationContext.Provider>\n\t);\n}\n\nexport function SidebarContent( { routeKey, shouldAnimate, children } ) {\n\treturn (\n\t\t<div className=\"edit-site-sidebar__content\">\n\t\t\t<SidebarContentWrapper\n\t\t\t\tshouldAnimate={ shouldAnimate }\n\t\t\t\tkey={ routeKey }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</SidebarContentWrapper>\n\t\t</div>\n\t);\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,qBAMO;AACP,iBAAsB;AAsEpB;AApEK,IAAM,+BAA2B,8BAAe,MAAM;AAAC,CAAE;AAChE,yBAAyB,cAAc;AAKvC,SAAS,oBAAqB,IAAI,WAAW,eAAgB;AAC5D,MAAI;AACJ,MAAK,cAAc,UAAU,eAAgB;AAC5C,qBAAiB,GAAG,cAAe,aAAc;AAAA,EAClD;AACA,MAAK,cAAc,QAAQ,CAAE,gBAAiB;AAC7C,UAAM,CAAE,aAAc,IAAI,iBAAM,SAAS,KAAM,EAAG;AAClD,qBAAiB,iBAAiB;AAAA,EACnC;AACA,kBAAgB,MAAM;AACvB;AAIA,SAAS,iBAAiB;AACzB,MAAI,QAAQ;AAAA,IACX,WAAW;AAAA,IACX,eAAe;AAAA,EAChB;AAEA,SAAO;AAAA,IACN,MAAM;AACL,aAAO;AAAA,IACR;AAAA,IACA,SAAU,WAAW,gBAAgB,MAAO;AAC3C,cAAQ;AAAA,QACP;AAAA,QACA,eACC,cAAc,aAAa,gBACxB,gBACA,MAAM;AAAA,MACX;AAAA,IACD;AAAA,EACD;AACD;AAEA,SAAS,sBAAuB,EAAE,UAAU,cAAc,GAAI;AAC7D,QAAM,eAAW,2BAAY,wBAAyB;AACtD,QAAM,iBAAa,uBAAO;AAC1B,QAAM,CAAE,cAAc,eAAgB,QAAI,yBAAU,IAAK;AAEzD,sCAAiB,MAAM;AACtB,UAAM,EAAE,WAAW,cAAc,IAAI,SAAS,IAAI;AAClD,wBAAqB,WAAW,SAAS,WAAW,aAAc;AAClE,oBAAiB,SAAU;AAAA,EAC5B,GAAG,CAAE,QAAS,CAAE;AAEhB,QAAM,iBAAa,YAAAA;AAAA,IAClB;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,gBACG;AAAA,MACA,mBAAmB,iBAAiB;AAAA,MACpC,oBAAoB,iBAAiB;AAAA,IACrC,IACA,CAAC;AAAA,EACL;AAEA,SACC,4CAAC,SAAI,KAAM,YAAa,WAAY,YACjC,UACH;AAEF;AAEO,SAAS,0BAA2B,EAAE,SAAS,GAAI;AACzD,QAAM,CAAE,QAAS,QAAI,yBAAU,cAAe;AAE9C,SACC,4CAAC,yBAAyB,UAAzB,EAAkC,OAAQ,UACxC,UACH;AAEF;AAEO,SAAS,eAAgB,EAAE,UAAU,eAAe,SAAS,GAAI;AACvE,SACC,4CAAC,SAAI,WAAU,8BACd;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MAGE;AAAA;AAAA,IAFI;AAAA,EAGP,GACD;AAEF;",
|
|
6
6
|
"names": ["clsx"]
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// packages/edit-site/src/components/sidebar-button/index.
|
|
30
|
+
// packages/edit-site/src/components/sidebar-button/index.jsx
|
|
31
31
|
var sidebar_button_exports = {};
|
|
32
32
|
__export(sidebar_button_exports, {
|
|
33
33
|
default: () => SidebarButton
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/sidebar-button/index.
|
|
3
|
+
"sources": ["../../../src/components/sidebar-button/index.jsx"],
|
|
4
4
|
"sourcesContent": ["import clsx from 'clsx';\nimport { Button } from '@wordpress/components';\n\nexport default function SidebarButton( props ) {\n\treturn (\n\t\t<Button\n\t\t\tsize=\"compact\"\n\t\t\t{ ...props }\n\t\t\tclassName={ clsx( 'edit-site-sidebar-button', props.className ) }\n\t\t/>\n\t);\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,wBAAuB;AAIrB;AAFa,SAAR,cAAgC,OAAQ;AAC9C,SACC;AAAA,IAAC;AAAA;AAAA,MACA,MAAK;AAAA,MACH,GAAG;AAAA,MACL,eAAY,YAAAA,SAAM,4BAA4B,MAAM,SAAU;AAAA;AAAA,EAC/D;AAEF;",
|
|
6
6
|
"names": ["clsx"]
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// packages/edit-site/src/components/sidebar-dataviews/index.
|
|
30
|
+
// packages/edit-site/src/components/sidebar-dataviews/index.jsx
|
|
31
31
|
var sidebar_dataviews_exports = {};
|
|
32
32
|
__export(sidebar_dataviews_exports, {
|
|
33
33
|
default: () => DataViewsSidebarContent
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/sidebar-dataviews/index.
|
|
3
|
+
"sources": ["../../../src/components/sidebar-dataviews/index.jsx"],
|
|
4
4
|
"sourcesContent": ["import { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport {\n\ttrash,\n\tpages,\n\tdrafts,\n\tpublished,\n\tscheduled,\n\tpending,\n\tnotAllowed,\n} from '@wordpress/icons';\nimport { useViewConfig } from '@wordpress/views';\nimport { addQueryArgs } from '@wordpress/url';\nimport { unlock } from '../../lock-unlock';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nconst VIEW_CONFIG_FIELDS = [ 'view_list' ];\n\nconst SLUG_TO_ICON = {\n\tall: pages,\n\tpublished,\n\tfuture: scheduled,\n\tdrafts,\n\tpending,\n\tprivate: notAllowed,\n\ttrash,\n};\nconst defaultResolveIcon = ( view ) => {\n\treturn SLUG_TO_ICON[ view.slug ];\n};\n\nexport default function DataViewsSidebarContent( {\n\tpostType,\n\tresolveIcon = defaultResolveIcon,\n} ) {\n\tconst {\n\t\tpath,\n\t\tquery: { activeView = 'all' },\n\t} = useLocation();\n\tconst { view_list: viewList } = useViewConfig( {\n\t\tkind: 'postType',\n\t\tname: postType,\n\t\tfields: VIEW_CONFIG_FIELDS,\n\t} );\n\tif ( ! postType ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<ItemGroup className=\"edit-site-sidebar-dataviews\">\n\t\t\t\t{ viewList?.map( ( view ) => {\n\t\t\t\t\tconst isActive = view.slug === activeView;\n\t\t\t\t\tconst slug = view.slug === 'all' ? undefined : view.slug;\n\t\t\t\t\tconst icon = resolveIcon( view );\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<SidebarNavigationItem\n\t\t\t\t\t\t\tkey={ view.slug }\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tto={ addQueryArgs( path, {\n\t\t\t\t\t\t\t\tactiveView: slug,\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t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;AAAA,UACxB,YAAY;AAAA,QACb,CAAE;AAAA,QACF,gBAAe,WAAW,SAAS;AAAA,QAEjC,eAAK;AAAA;AAAA,MAPD,KAAK;AAAA,IAQZ;AAAA,EAEF,CAAE,GACH,GACD;AAEF;",
|
|
6
6
|
"names": ["routerPrivateApis", "ItemGroup", "SidebarNavigationItem"]
|
|
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
|
-
// packages/edit-site/src/components/sidebar-global-styles/index.
|
|
20
|
+
// packages/edit-site/src/components/sidebar-global-styles/index.jsx
|
|
21
21
|
var sidebar_global_styles_exports = {};
|
|
22
22
|
__export(sidebar_global_styles_exports, {
|
|
23
23
|
default: () => SidebarGlobalStyles,
|
|
@@ -112,14 +112,14 @@ function SidebarGlobalStyles() {
|
|
|
112
112
|
className: "edit-site-styles",
|
|
113
113
|
title: (0, import_i18n.__)("Styles"),
|
|
114
114
|
headingLevel: 2,
|
|
115
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
115
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "edit-site-styles__content", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
116
116
|
GlobalStylesUIWrapper,
|
|
117
117
|
{
|
|
118
118
|
path: section,
|
|
119
119
|
onPathChange: onChangeSection,
|
|
120
120
|
settings
|
|
121
121
|
}
|
|
122
|
-
)
|
|
122
|
+
) })
|
|
123
123
|
}
|
|
124
124
|
);
|
|
125
125
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/sidebar-global-styles/index.
|
|
4
|
-
"sourcesContent": ["import { Page } from '@wordpress/admin-ui';\nimport { __ } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { Button, __experimentalHStack as HStack } from '@wordpress/components';\nimport { addQueryArgs, removeQueryArgs } from '@wordpress/url';\nimport { seen } from '@wordpress/icons';\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { GlobalStylesUIWrapper, GlobalStylesActionMenu } =\n\tunlock( editorPrivateApis );\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nconst GlobalStylesPageActions = ( {\n\tisStyleBookOpened,\n\tsetIsStyleBookOpened,\n\tpath,\n\tonChangeSection,\n} ) => {\n\tconst history = useHistory();\n\n\treturn (\n\t\t<HStack className=\"edit-site-styles__header-actions\">\n\t\t\t<Button\n\t\t\t\tisPressed={ isStyleBookOpened }\n\t\t\t\ticon={ seen }\n\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetIsStyleBookOpened( ! isStyleBookOpened );\n\t\t\t\t\tconst updatedPath = ! isStyleBookOpened\n\t\t\t\t\t\t? addQueryArgs( path, { preview: 'stylebook' } )\n\t\t\t\t\t\t: removeQueryArgs( path, 'preview' );\n\t\t\t\t\t// Navigate to the updated path.\n\t\t\t\t\thistory.navigate( updatedPath );\n\t\t\t\t} }\n\t\t\t\tsize=\"compact\"\n\t\t\t/>\n\t\t\t<GlobalStylesActionMenu\n\t\t\t\thideWelcomeGuide\n\t\t\t\tonChangePath={ onChangeSection }\n\t\t\t/>\n\t\t</HStack>\n\t);\n};\n\n/**\n * Hook to deal with navigation and location state.\n *\n * @return {Array} The current section and a function to update it.\n */\nexport const useSection = () => {\n\tconst { path, query } = useLocation();\n\tconst history = useHistory();\n\treturn useMemo( () => {\n\t\treturn [\n\t\t\tquery.section ?? '/',\n\t\t\t( updatedSection ) => {\n\t\t\t\thistory.navigate(\n\t\t\t\t\taddQueryArgs( path, {\n\t\t\t\t\t\tsection: updatedSection,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t];\n\t}, [ path, query.section, history ] );\n};\n\nexport default function SidebarGlobalStyles() {\n\tconst { path } = useLocation();\n\n\tconst [ isStyleBookOpened, setIsStyleBookOpened ] = useState(\n\t\tpath.includes( 'preview=stylebook' )\n\t);\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst [ section, onChangeSection ] = useSection();\n\tconst settings = useSelect(\n\t\t( select ) => select( editSiteStore ).getSettings(),\n\t\t[]\n\t);\n\n\treturn (\n\t\t<Page\n\t\t\tactions={\n\t\t\t\t! isMobileViewport ? (\n\t\t\t\t\t<GlobalStylesPageActions\n\t\t\t\t\t\tisStyleBookOpened={ isStyleBookOpened }\n\t\t\t\t\t\tsetIsStyleBookOpened={ setIsStyleBookOpened }\n\t\t\t\t\t\tpath={ path }\n\t\t\t\t\t\tonChangeSection={ onChangeSection }\n\t\t\t\t\t/>\n\t\t\t\t) : null\n\t\t\t}\n\t\t\tclassName=\"edit-site-styles\"\n\t\t\ttitle={ __( 'Styles' ) }\n\t\t\theadingLevel={ 2 }\n\t\t>\n\t\t\t<GlobalStylesUIWrapper\n\t\t\t\tpath={ section }\n\t\t\t\tonPathChange={ onChangeSection }\n\t\t\t\tsettings={ settings }\n\t\t\t/>\n\t\t</Page>\n\t);\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqB;AACrB,kBAAmB;AACnB,qBAAkC;AAClC,oBAAiD;AACjD,oBAAiD;AACjD,qBAAiC;AACjC,kBAA0B;AAC1B,wBAAuD;AACvD,iBAA8C;AAC9C,mBAAqB;AACrB,mBAAuC;AACvC,yBAAuB;AAerB;AAbF,IAAM,EAAE,uBAAuB,uBAAuB,QACrD,2BAAQ,cAAAA,WAAkB;AAC3B,IAAM,EAAE,aAAa,WAA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AAC,KAAc,EAAE,YAAY;AAAA,IAClD,CAAC;AAAA,EACF;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,SACC,CAAE,mBACD;AAAA,QAAC;AAAA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA;AAAA,MACD,IACG;AAAA,MAEL,WAAU;AAAA,MACV,WAAQ,gBAAI,QAAS;AAAA,MACrB,cAAe;AAAA,MAEf;AAAA,QAAC;AAAA;AAAA,UACA,MAAO;AAAA,UACP,cAAe;AAAA,UACf;AAAA;AAAA,MACD;AAAA;AAAA,EACD;AAEF;",
|
|
3
|
+
"sources": ["../../../src/components/sidebar-global-styles/index.jsx"],
|
|
4
|
+
"sourcesContent": ["import { Page } from '@wordpress/admin-ui';\nimport { __ } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { Button, __experimentalHStack as HStack } from '@wordpress/components';\nimport { addQueryArgs, removeQueryArgs } from '@wordpress/url';\nimport { seen } from '@wordpress/icons';\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { GlobalStylesUIWrapper, GlobalStylesActionMenu } =\n\tunlock( editorPrivateApis );\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nconst GlobalStylesPageActions = ( {\n\tisStyleBookOpened,\n\tsetIsStyleBookOpened,\n\tpath,\n\tonChangeSection,\n} ) => {\n\tconst history = useHistory();\n\n\treturn (\n\t\t<HStack className=\"edit-site-styles__header-actions\">\n\t\t\t<Button\n\t\t\t\tisPressed={ isStyleBookOpened }\n\t\t\t\ticon={ seen }\n\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetIsStyleBookOpened( ! isStyleBookOpened );\n\t\t\t\t\tconst updatedPath = ! isStyleBookOpened\n\t\t\t\t\t\t? addQueryArgs( path, { preview: 'stylebook' } )\n\t\t\t\t\t\t: removeQueryArgs( path, 'preview' );\n\t\t\t\t\t// Navigate to the updated path.\n\t\t\t\t\thistory.navigate( updatedPath );\n\t\t\t\t} }\n\t\t\t\tsize=\"compact\"\n\t\t\t/>\n\t\t\t<GlobalStylesActionMenu\n\t\t\t\thideWelcomeGuide\n\t\t\t\tonChangePath={ onChangeSection }\n\t\t\t/>\n\t\t</HStack>\n\t);\n};\n\n/**\n * Hook to deal with navigation and location state.\n *\n * @return {Array} The current section and a function to update it.\n */\nexport const useSection = () => {\n\tconst { path, query } = useLocation();\n\tconst history = useHistory();\n\treturn useMemo( () => {\n\t\treturn [\n\t\t\tquery.section ?? '/',\n\t\t\t( updatedSection ) => {\n\t\t\t\thistory.navigate(\n\t\t\t\t\taddQueryArgs( path, {\n\t\t\t\t\t\tsection: updatedSection,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t];\n\t}, [ path, query.section, history ] );\n};\n\nexport default function SidebarGlobalStyles() {\n\tconst { path } = useLocation();\n\n\tconst [ isStyleBookOpened, setIsStyleBookOpened ] = useState(\n\t\tpath.includes( 'preview=stylebook' )\n\t);\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst [ section, onChangeSection ] = useSection();\n\tconst settings = useSelect(\n\t\t( select ) => select( editSiteStore ).getSettings(),\n\t\t[]\n\t);\n\n\treturn (\n\t\t<Page\n\t\t\tactions={\n\t\t\t\t! isMobileViewport ? (\n\t\t\t\t\t<GlobalStylesPageActions\n\t\t\t\t\t\tisStyleBookOpened={ isStyleBookOpened }\n\t\t\t\t\t\tsetIsStyleBookOpened={ setIsStyleBookOpened }\n\t\t\t\t\t\tpath={ path }\n\t\t\t\t\t\tonChangeSection={ onChangeSection }\n\t\t\t\t\t/>\n\t\t\t\t) : null\n\t\t\t}\n\t\t\tclassName=\"edit-site-styles\"\n\t\t\ttitle={ __( 'Styles' ) }\n\t\t\theadingLevel={ 2 }\n\t\t>\n\t\t\t<div className=\"edit-site-styles__content\">\n\t\t\t\t<GlobalStylesUIWrapper\n\t\t\t\t\tpath={ section }\n\t\t\t\t\tonPathChange={ onChangeSection }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</Page>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqB;AACrB,kBAAmB;AACnB,qBAAkC;AAClC,oBAAiD;AACjD,oBAAiD;AACjD,qBAAiC;AACjC,kBAA0B;AAC1B,wBAAuD;AACvD,iBAA8C;AAC9C,mBAAqB;AACrB,mBAAuC;AACvC,yBAAuB;AAerB;AAbF,IAAM,EAAE,uBAAuB,uBAAuB,QACrD,2BAAQ,cAAAA,WAAkB;AAC3B,IAAM,EAAE,aAAa,WAAW,QAAI,2BAAQ,cAAAC,WAAkB;AAE9D,IAAM,0BAA0B,CAAE;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,MAAO;AACN,QAAM,UAAU,WAAW;AAE3B,SACC,6CAAC,kBAAAC,sBAAA,EAAO,WAAU,oCACjB;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,WAAY;AAAA,QACZ,MAAO;AAAA,QACP,WAAQ,gBAAI,YAAa;AAAA,QACzB,SAAU,MAAM;AACf,+BAAsB,CAAE,iBAAkB;AAC1C,gBAAM,cAAc,CAAE,wBACnB,yBAAc,MAAM,EAAE,SAAS,YAAY,CAAE,QAC7C,4BAAiB,MAAM,SAAU;AAEpC,kBAAQ,SAAU,WAAY;AAAA,QAC/B;AAAA,QACA,MAAK;AAAA;AAAA,IACN;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACA,kBAAgB;AAAA,QAChB,cAAe;AAAA;AAAA,IAChB;AAAA,KACD;AAEF;AAOO,IAAM,aAAa,MAAM;AAC/B,QAAM,EAAE,MAAM,MAAM,IAAI,YAAY;AACpC,QAAM,UAAU,WAAW;AAC3B,aAAO,wBAAS,MAAM;AACrB,WAAO;AAAA,MACN,MAAM,WAAW;AAAA,MACjB,CAAE,mBAAoB;AACrB,gBAAQ;AAAA,cACP,yBAAc,MAAM;AAAA,YACnB,SAAS;AAAA,UACV,CAAE;AAAA,QACH;AAAA,MACD;AAAA,IACD;AAAA,EACD,GAAG,CAAE,MAAM,MAAM,SAAS,OAAQ,CAAE;AACrC;AAEe,SAAR,sBAAuC;AAC7C,QAAM,EAAE,KAAK,IAAI,YAAY;AAE7B,QAAM,CAAE,mBAAmB,oBAAqB,QAAI;AAAA,IACnD,KAAK,SAAU,mBAAoB;AAAA,EACpC;AACA,QAAM,uBAAmB,iCAAkB,UAAU,GAAI;AACzD,QAAM,CAAE,SAAS,eAAgB,IAAI,WAAW;AAChD,QAAM,eAAW;AAAA,IAChB,CAAE,WAAY,OAAQ,aAAAC,KAAc,EAAE,YAAY;AAAA,IAClD,CAAC;AAAA,EACF;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,SACC,CAAE,mBACD;AAAA,QAAC;AAAA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA;AAAA,MACD,IACG;AAAA,MAEL,WAAU;AAAA,MACV,WAAQ,gBAAI,QAAS;AAAA,MACrB,cAAe;AAAA,MAEf,sDAAC,SAAI,WAAU,6BACd;AAAA,QAAC;AAAA;AAAA,UACA,MAAO;AAAA,UACP,cAAe;AAAA,UACf;AAAA;AAAA,MACD,GACD;AAAA;AAAA,EACD;AAEF;",
|
|
6
6
|
"names": ["editorPrivateApis", "routerPrivateApis", "HStack", "editSiteStore"]
|
|
7
7
|
}
|
|
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
|
-
// packages/edit-site/src/components/sidebar-identity/index.
|
|
20
|
+
// packages/edit-site/src/components/sidebar-identity/index.jsx
|
|
21
21
|
var sidebar_identity_exports = {};
|
|
22
22
|
__export(sidebar_identity_exports, {
|
|
23
23
|
default: () => SidebarIdentity
|
|
@@ -93,22 +93,14 @@ function SidebarIdentity() {
|
|
|
93
93
|
const onChange = (edits) => {
|
|
94
94
|
editEntityRecord("root", "site", void 0, edits);
|
|
95
95
|
};
|
|
96
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
97
|
-
|
|
96
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_admin_ui.Page, { title: (0, import_i18n._x)("Identity", "site identity"), headingLevel: 2, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "edit-site-sidebar-identity__form", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
97
|
+
import_dataviews.DataForm,
|
|
98
98
|
{
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
import_dataviews.DataForm,
|
|
104
|
-
{
|
|
105
|
-
data,
|
|
106
|
-
fields,
|
|
107
|
-
form,
|
|
108
|
-
onChange
|
|
109
|
-
}
|
|
110
|
-
)
|
|
99
|
+
data,
|
|
100
|
+
fields,
|
|
101
|
+
form,
|
|
102
|
+
onChange
|
|
111
103
|
}
|
|
112
|
-
);
|
|
104
|
+
) }) });
|
|
113
105
|
}
|
|
114
106
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/sidebar-identity/index.
|
|
4
|
-
"sourcesContent": ["import { Page } from '@wordpress/admin-ui';\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { DataForm } from '@wordpress/dataviews';\nimport { MediaEdit } from '@wordpress/fields';\nimport { decodeEntities } from '@wordpress/html-entities';\n\nconst fields = [\n\t{\n\t\tid: 'title',\n\t\ttype: 'text',\n\t\tlabel: __( 'Site Title' ),\n\t\tdescription: __(\n\t\t\t\"Displays in your site's layout via the Site Title block.\"\n\t\t),\n\t\tgetValue: ( { item } ) => decodeEntities( item.title ?? '' ),\n\t},\n\t{\n\t\tid: 'description',\n\t\ttype: 'text',\n\t\tlabel: __( 'Site Tagline' ),\n\t\tdescription: __(\n\t\t\t\"In a few words, explain what this site is about. Displays in your site's layout via the Site Tagline block.\"\n\t\t),\n\t\tgetValue: ( { item } ) => decodeEntities( item.description ?? '' ),\n\t},\n\t{\n\t\tid: 'site_logo',\n\t\ttype: 'media',\n\t\tlabel: __( 'Site Logo' ),\n\t\tdescription: __(\n\t\t\t\"Displays in your site's layout via the Site Logo block.\"\n\t\t),\n\t\tplaceholder: __( 'Choose logo' ),\n\t\tEdit: MediaEdit,\n\t\tsetValue: ( { value } ) => ( {\n\t\t\tsite_logo: value ?? 0,\n\t\t} ),\n\t},\n\t{\n\t\tid: 'site_icon',\n\t\ttype: 'media',\n\t\tlabel: __( 'Site Icon' ),\n\t\tdescription: __(\n\t\t\t'Shown in browser tabs, bookmarks, and mobile apps. It should be square and at least 512 by 512 pixels.'\n\t\t),\n\t\tplaceholder: __( 'Choose icon' ),\n\t\tEdit: MediaEdit,\n\t\tsetValue: ( { value } ) => ( {\n\t\t\tsite_icon: value ?? 0,\n\t\t} ),\n\t},\n];\n\nconst form = {\n\tlayout: {\n\t\ttype: 'regular',\n\t\tlabelPosition: 'top',\n\t},\n\tfields: [ 'title', 'description', 'site_logo', 'site_icon' ],\n};\n\nexport default function SidebarIdentity() {\n\tconst data = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEditedEntityRecord( 'root', 'site' ),\n\t\t[]\n\t);\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\n\tconst onChange = ( edits ) => {\n\t\teditEntityRecord( 'root', 'site', undefined, edits );\n\t};\n\n\treturn (\n\t\t<Page
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqB;AACrB,kBAAuB;AACvB,kBAAuC;AACvC,uBAAmC;AACnC,uBAAyB;AACzB,oBAA0B;AAC1B,2BAA+B;
|
|
3
|
+
"sources": ["../../../src/components/sidebar-identity/index.jsx"],
|
|
4
|
+
"sourcesContent": ["import { Page } from '@wordpress/admin-ui';\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { DataForm } from '@wordpress/dataviews';\nimport { MediaEdit } from '@wordpress/fields';\nimport { decodeEntities } from '@wordpress/html-entities';\n\nconst fields = [\n\t{\n\t\tid: 'title',\n\t\ttype: 'text',\n\t\tlabel: __( 'Site Title' ),\n\t\tdescription: __(\n\t\t\t\"Displays in your site's layout via the Site Title block.\"\n\t\t),\n\t\tgetValue: ( { item } ) => decodeEntities( item.title ?? '' ),\n\t},\n\t{\n\t\tid: 'description',\n\t\ttype: 'text',\n\t\tlabel: __( 'Site Tagline' ),\n\t\tdescription: __(\n\t\t\t\"In a few words, explain what this site is about. Displays in your site's layout via the Site Tagline block.\"\n\t\t),\n\t\tgetValue: ( { item } ) => decodeEntities( item.description ?? '' ),\n\t},\n\t{\n\t\tid: 'site_logo',\n\t\ttype: 'media',\n\t\tlabel: __( 'Site Logo' ),\n\t\tdescription: __(\n\t\t\t\"Displays in your site's layout via the Site Logo block.\"\n\t\t),\n\t\tplaceholder: __( 'Choose logo' ),\n\t\tEdit: MediaEdit,\n\t\tsetValue: ( { value } ) => ( {\n\t\t\tsite_logo: value ?? 0,\n\t\t} ),\n\t},\n\t{\n\t\tid: 'site_icon',\n\t\ttype: 'media',\n\t\tlabel: __( 'Site Icon' ),\n\t\tdescription: __(\n\t\t\t'Shown in browser tabs, bookmarks, and mobile apps. It should be square and at least 512 by 512 pixels.'\n\t\t),\n\t\tplaceholder: __( 'Choose icon' ),\n\t\tEdit: MediaEdit,\n\t\tsetValue: ( { value } ) => ( {\n\t\t\tsite_icon: value ?? 0,\n\t\t} ),\n\t},\n];\n\nconst form = {\n\tlayout: {\n\t\ttype: 'regular',\n\t\tlabelPosition: 'top',\n\t},\n\tfields: [ 'title', 'description', 'site_logo', 'site_icon' ],\n};\n\nexport default function SidebarIdentity() {\n\tconst data = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEditedEntityRecord( 'root', 'site' ),\n\t\t[]\n\t);\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\n\tconst onChange = ( edits ) => {\n\t\teditEntityRecord( 'root', 'site', undefined, edits );\n\t};\n\n\treturn (\n\t\t<Page title={ _x( 'Identity', 'site identity' ) } headingLevel={ 2 }>\n\t\t\t<div className=\"edit-site-sidebar-identity__form\">\n\t\t\t\t<DataForm\n\t\t\t\t\tdata={ data }\n\t\t\t\t\tfields={ fields }\n\t\t\t\t\tform={ form }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</Page>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqB;AACrB,kBAAuB;AACvB,kBAAuC;AACvC,uBAAmC;AACnC,uBAAyB;AACzB,oBAA0B;AAC1B,2BAA+B;AAwE3B;AAtEJ,IAAM,SAAS;AAAA,EACd;AAAA,IACC,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,WAAO,gBAAI,YAAa;AAAA,IACxB,iBAAa;AAAA,MACZ;AAAA,IACD;AAAA,IACA,UAAU,CAAE,EAAE,KAAK,UAAO,qCAAgB,KAAK,SAAS,EAAG;AAAA,EAC5D;AAAA,EACA;AAAA,IACC,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,WAAO,gBAAI,cAAe;AAAA,IAC1B,iBAAa;AAAA,MACZ;AAAA,IACD;AAAA,IACA,UAAU,CAAE,EAAE,KAAK,UAA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@@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// packages/edit-site/src/components/sidebar-navigation-item/index.
|
|
30
|
+
// packages/edit-site/src/components/sidebar-navigation-item/index.jsx
|
|
31
31
|
var sidebar_navigation_item_exports = {};
|
|
32
32
|
__export(sidebar_navigation_item_exports, {
|
|
33
33
|
default: () => SidebarNavigationItem
|
|
@@ -94,14 +94,7 @@ function SidebarNavigationItemContent({
|
|
|
94
94
|
"aria-current": isActive ? true : void 0,
|
|
95
95
|
...props,
|
|
96
96
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ui.Stack, { direction: "row", align: "center", justify: "start", gap: "sm", children: [
|
|
97
|
-
icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
98
|
-
import_icons.Icon,
|
|
99
|
-
{
|
|
100
|
-
style: { fill: "currentcolor" },
|
|
101
|
-
icon,
|
|
102
|
-
size: 24
|
|
103
|
-
}
|
|
104
|
-
),
|
|
97
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.Icon, { icon, size: 24 }),
|
|
105
98
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.FlexBlock, { children }),
|
|
106
99
|
withChevron && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
107
100
|
import_icons.Icon,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/sidebar-navigation-item/index.
|
|
4
|
-
"sourcesContent": ["import clsx from 'clsx';\nimport { __experimentalItem as Item, FlexBlock } from '@wordpress/components';\nimport { Stack } from '@wordpress/ui';\nimport { isRTL } from '@wordpress/i18n';\nimport { chevronRightSmall, chevronLeftSmall, Icon } from '@wordpress/icons';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { useContext } from '@wordpress/element';\nimport { unlock } from '../../lock-unlock';\nimport { SidebarNavigationContext } from '../sidebar';\n\nconst { useHistory, useLink, useLocation } = unlock( routerPrivateApis );\n\nexport default function SidebarNavigationItem( {\n\tisHidden = false,\n\t...props\n} ) {\n\tif ( isHidden ) {\n\t\treturn null;\n\t}\n\n\treturn <SidebarNavigationItemContent { ...props } />;\n}\n\nfunction SidebarNavigationItemContent( {\n\tclassName,\n\ticon,\n\twithChevron = false,\n\tsuffix,\n\tuid,\n\tto,\n\tonClick,\n\tactiveOnRouteName,\n\tchildren,\n\t...props\n} ) {\n\tconst history = useHistory();\n\tconst linkProps = useLink( to );\n\tconst { name } = useLocation();\n\tconst { navigate } = useContext( SidebarNavigationContext );\n\n\tconst isActive = activeOnRouteName && name === activeOnRouteName;\n\t// If there is no custom click handler, create one that navigates to `params`.\n\tfunction handleClick( e ) {\n\t\tif ( onClick ) {\n\t\t\tonClick( e );\n\t\t\tnavigate( 'forward' );\n\t\t} else if ( to ) {\n\t\t\te.preventDefault();\n\t\t\thistory.navigate( to );\n\t\t\tnavigate( 'forward', `[id=\"${ uid }\"]` );\n\t\t}\n\t}\n\n\treturn (\n\t\t<Item\n\t\t\tclassName={ clsx(\n\t\t\t\t'edit-site-sidebar-navigation-item',\n\t\t\t\t{ 'with-suffix': ! withChevron && suffix },\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tid={ uid }\n\t\t\tonClick={ handleClick }\n\t\t\thref={ to ? linkProps.href : undefined }\n\t\t\taria-current={ isActive ? true : undefined }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<Stack direction=\"row\" align=\"center\" justify=\"start\" gap=\"sm\">\n\t\t\t\t{ icon &&
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,wBAAsD;AACtD,gBAAsB;AACtB,kBAAsB;AACtB,mBAA0D;AAC1D,o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x from 'clsx';\nimport { __experimentalItem as Item, FlexBlock } from '@wordpress/components';\nimport { Stack } from '@wordpress/ui';\nimport { isRTL } from '@wordpress/i18n';\nimport { chevronRightSmall, chevronLeftSmall, Icon } from '@wordpress/icons';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { useContext } from '@wordpress/element';\nimport { unlock } from '../../lock-unlock';\nimport { SidebarNavigationContext } from '../sidebar';\n\nconst { useHistory, useLink, useLocation } = unlock( routerPrivateApis );\n\nexport default function SidebarNavigationItem( {\n\tisHidden = false,\n\t...props\n} ) {\n\tif ( isHidden ) {\n\t\treturn null;\n\t}\n\n\treturn <SidebarNavigationItemContent { ...props } />;\n}\n\nfunction SidebarNavigationItemContent( {\n\tclassName,\n\ticon,\n\twithChevron = false,\n\tsuffix,\n\tuid,\n\tto,\n\tonClick,\n\tactiveOnRouteName,\n\tchildren,\n\t...props\n} ) {\n\tconst history = useHistory();\n\tconst linkProps = useLink( to );\n\tconst { name } = useLocation();\n\tconst { navigate } = useContext( SidebarNavigationContext );\n\n\tconst isActive = activeOnRouteName && name === activeOnRouteName;\n\t// If there is no custom click handler, create one that navigates to `params`.\n\tfunction handleClick( e ) {\n\t\tif ( onClick ) {\n\t\t\tonClick( e );\n\t\t\tnavigate( 'forward' );\n\t\t} else if ( to ) {\n\t\t\te.preventDefault();\n\t\t\thistory.navigate( to );\n\t\t\tnavigate( 'forward', `[id=\"${ uid }\"]` );\n\t\t}\n\t}\n\n\treturn (\n\t\t<Item\n\t\t\tclassName={ clsx(\n\t\t\t\t'edit-site-sidebar-navigation-item',\n\t\t\t\t{ 'with-suffix': ! withChevron && suffix },\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tid={ uid }\n\t\t\tonClick={ handleClick }\n\t\t\thref={ to ? linkProps.href : undefined }\n\t\t\taria-current={ isActive ? true : undefined }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<Stack direction=\"row\" align=\"center\" justify=\"start\" gap=\"sm\">\n\t\t\t\t{ icon && <Icon icon={ icon } size={ 24 } /> }\n\t\t\t\t<FlexBlock>{ children }</FlexBlock>\n\t\t\t\t{ withChevron && (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ isRTL() ? chevronLeftSmall : chevronRightSmall }\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-item__drilldown-indicator\"\n\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ! withChevron && suffix }\n\t\t\t</Stack>\n\t\t</Item>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,wBAAsD;AACtD,gBAAsB;AACtB,kBAAsB;AACtB,mBAA0D;AAC1D,oBAAiD;AACjD,qBAA2B;AAC3B,yBAAuB;AACvB,qBAAyC;AAYjC;AAVR,IAAM,EAAE,YAAY,SAAS,YAAY,QAAI,2BAAQ,cAAAA,WAAkB;AAExD,SAAR,sBAAwC;AAAA,EAC9C,WAAW;AAAA,EACX,GAAG;AACJ,GAAI;AACH,MAAK,UAAW;AACf,WAAO;AAAA,EACR;AAEA,SAAO,4CAAC,gCAA+B,GAAG,OAAQ;AACnD;AAEA,SAAS,6BAA8B;AAAA,EACtC;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GAAI;AACH,QAAM,UAAU,WAAW;AAC3B,QAAM,YAAY,QAAS,EAAG;AAC9B,QAAM,EAAE,KAAK,IAAI,YAAY;AAC7B,QAAM,EAAE,SAAS,QAAI,2BAAY,uCAAyB;AAE1D,QAAM,WAAW,qBAAqB,SAAS;AAE/C,WAAS,YAAa,GAAI;AACzB,QAAK,SAAU;AACd,cAAS,CAAE;AACX,eAAU,SAAU;AAAA,IACrB,WAAY,IAAK;AAChB,QAAE,eAAe;AACjB,cAAQ,SAAU,EAAG;AACrB,eAAU,WAAW,QAAS,GAAI,IAAK;AAAA,IACxC;AAAA,EACD;AAEA,SACC;AAAA,IAAC,kBAAAC;AAAA,IAAA;AAAA,MACA,eAAY,YAAAC;AAAA,QACX;AAAA,QACA,EAAE,eAAe,CAAE,eAAe,OAAO;AAAA,QACzC;AAAA,MACD;AAAA,MACA,IAAK;AAAA,MACL,SAAU;AAAA,MACV,MAAO,KAAK,UAAU,OAAO;AAAA,MAC7B,gBAAe,WAAW,OAAO;AAAA,MAC/B,GAAG;AAAA,MAEL,uDAAC,mBAAM,WAAU,OAAM,OAAM,UAAS,SAAQ,SAAQ,KAAI,MACvD;AAAA,gBAAQ,4CAAC,qBAAK,MAAc,MAAO,IAAK;AAAA,QAC1C,4CAAC,+BAAY,UAAU;AAAA,QACrB,eACD;AAAA,UAAC;AAAA;AAAA,YACA,UAAO,mBAAM,IAAI,gCAAmB;AAAA,YACpC,WAAU;AAAA,YACV,MAAO;AAAA;AAAA,QACR;AAAA,QAEC,CAAE,eAAe;AAAA,SACpB;AAAA;AAAA,EACD;AAEF;",
|
|
6
6
|
"names": ["routerPrivateApis", "Item", "clsx"]
|
|
7
7
|
}
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// packages/edit-site/src/components/sidebar-navigation-screen/index.
|
|
30
|
+
// packages/edit-site/src/components/sidebar-navigation-screen/index.jsx
|
|
31
31
|
var sidebar_navigation_screen_exports = {};
|
|
32
32
|
__export(sidebar_navigation_screen_exports, {
|
|
33
33
|
default: () => SidebarNavigationScreen
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/sidebar-navigation-screen/index.
|
|
3
|
+
"sources": ["../../../src/components/sidebar-navigation-screen/index.jsx"],
|
|
4
4
|
"sourcesContent": ["import clsx from 'clsx';\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalHeading as Heading,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { isRTL, __, sprintf } from '@wordpress/i18n';\nimport { chevronRight, chevronLeft } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { useContext } from '@wordpress/element';\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport SidebarButton from '../sidebar-button';\nimport {\n\tisPreviewingTheme,\n\tcurrentlyPreviewingTheme,\n} from '../../utils/is-previewing-theme';\nimport { SidebarNavigationContext } from '../sidebar';\n\nconst { useHistory, useLocation } = unlock( routerPrivateApis );\n\nexport default function SidebarNavigationScreen( {\n\tisRoot,\n\ttitle,\n\tactions,\n\tcontent,\n\tfooter,\n\tdescription,\n\tbackPath: backPathProp,\n} ) {\n\tconst { dashboardLink, dashboardLinkText, previewingThemeName } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\t\tconst currentlyPreviewingThemeId = currentlyPreviewingTheme();\n\t\t\treturn {\n\t\t\t\tdashboardLink: getSettings().__experimentalDashboardLink,\n\t\t\t\tdashboardLinkText:\n\t\t\t\t\tgetSettings().__experimentalDashboardLinkText,\n\t\t\t\t// Do not call `getTheme` with null, it will cause a request to\n\t\t\t\t// the server.\n\t\t\t\tpreviewingThemeName: currentlyPreviewingThemeId\n\t\t\t\t\t? select( coreStore ).getTheme( currentlyPreviewingThemeId )\n\t\t\t\t\t\t\t?.name?.rendered\n\t\t\t\t\t: undefined,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst location = useLocation();\n\tconst history = useHistory();\n\tconst { navigate } = useContext( SidebarNavigationContext );\n\tconst backPath = backPathProp ?? location.state?.backPath;\n\tconst icon = isRTL() ? chevronRight : chevronLeft;\n\n\treturn (\n\t\t<>\n\t\t\t<VStack\n\t\t\t\tclassName={ clsx( 'edit-site-sidebar-navigation-screen__main', {\n\t\t\t\t\t'has-footer': !! footer,\n\t\t\t\t} ) }\n\t\t\t\tspacing={ 0 }\n\t\t\t\tjustify=\"flex-start\"\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tspacing={ 3 }\n\t\t\t\t\talignment=\"flex-start\"\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__title-icon\"\n\t\t\t\t>\n\t\t\t\t\t{ ! isRoot && (\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\thistory.navigate( backPath );\n\t\t\t\t\t\t\t\tnavigate( 'back' );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t\t\tshowTooltip={ false }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isRoot && (\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\tdashboardLinkText || __( 'Go to the Dashboard' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thref={ dashboardLink }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<Heading\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__title\"\n\t\t\t\t\t\tlevel={ 1 }\n\t\t\t\t\t\tsize={ 20 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! isPreviewingTheme()\n\t\t\t\t\t\t\t? title\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t/* translators: 1: theme name. 2: title */\n\t\t\t\t\t\t\t\t\t__( 'Previewing %1$s: %2$s' ),\n\t\t\t\t\t\t\t\t\tpreviewingThemeName,\n\t\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\t ) }\n\t\t\t\t\t</Heading>\n\t\t\t\t\t{ actions && (\n\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__actions\">\n\t\t\t\t\t\t\t{ actions }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__content\">\n\t\t\t\t\t{ description && (\n\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__description\">\n\t\t\t\t\t\t\t{ description }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t\t{ content }\n\t\t\t\t</div>\n\t\t\t</VStack>\n\t\t\t{ footer && (\n\t\t\t\t<footer className=\"edit-site-sidebar-navigation-screen__footer\">\n\t\t\t\t\t{ footer }\n\t\t\t\t</footer>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,wBAIO;AACP,kBAAmC;AACnC,mBAA0C;AAC1C,uBAAmC;AACnC,kBAA0B;AAC1B,oBAAiD;AACjD,qBAA2B;AAC3B,mBAAuC;AACvC,yBAAuB;AACvB,4BAA0B;AAC1B,iCAGO;AACP,qBAAyC;AAsCvC;AApCF,IAAM,EAAE,YAAY,YAAY,QAAI,2BAAQ,cAAAA,WAAkB;AAE/C,SAAR,wBAA0C;AAAA,EAChD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AACX,GAAI;AACH,QAAM,EAAE,eAAe,mBAAmB,oBAAoB,QAAI;AAAA,IACjE,CAAE,WAAY;AACb,YAAM,EAAE,YAAY,QAAI,2BAAQ,OAAQ,aAAAC,KAAc,CAAE;AACxD,YAAM,iCAA6B,qDAAyB;AAC5D,aAAO;AAAA,Q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AA,oBACA;AAAA;AAAA,gBACJ;AAAA,gBACE,WACD,4CAAC,SAAI,WAAU,gDACZ,mBACH;AAAA;AAAA;AAAA,UAEF;AAAA,UACA,6CAAC,SAAI,WAAU,gDACZ;AAAA,2BACD,4CAAC,SAAI,WAAU,oDACZ,uBACH;AAAA,YAEC;AAAA,aACH;AAAA;AAAA;AAAA,IACD;AAAA,IACE,UACD,4CAAC,YAAO,WAAU,+CACf,kBACH;AAAA,KAEF;AAEF;",
|
|
6
6
|
"names": ["routerPrivateApis", "editSiteStore", "coreStore", "VStack", "clsx", "HStack", "SidebarButton", "Heading"]
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// packages/edit-site/src/components/sidebar-navigation-screen-details-footer/index.
|
|
30
|
+
// packages/edit-site/src/components/sidebar-navigation-screen-details-footer/index.jsx
|
|
31
31
|
var sidebar_navigation_screen_details_footer_exports = {};
|
|
32
32
|
__export(sidebar_navigation_screen_details_footer_exports, {
|
|
33
33
|
default: () => SidebarNavigationScreenDetailsFooter
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/sidebar-navigation-screen-details-footer/index.
|
|
3
|
+
"sources": ["../../../src/components/sidebar-navigation-screen-details-footer/index.jsx"],
|
|
4
4
|
"sourcesContent": ["import { _n, sprintf } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\nimport { backup } from '@wordpress/icons';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\n\nexport default function SidebarNavigationScreenDetailsFooter( {\n\trecord,\n\trevisionsCount,\n\t...otherProps\n} ) {\n\t/*\n\t * There might be other items in the future,\n\t * but for now it's just modified date.\n\t * Later we might render a list of items and isolate\n\t * the following logic.\n\t */\n\tconst hrefProps = {};\n\tconst lastRevisionId =\n\t\trecord?._links?.[ 'predecessor-version' ]?.[ 0 ]?.id ?? null;\n\n\t// Use incoming prop first, then the record's version history, if available.\n\trevisionsCount =\n\t\trevisionsCount ||\n\t\trecord?._links?.[ 'version-history' ]?.[ 0 ]?.count ||\n\t\t0;\n\n\t/*\n\t * Enable the revisions link if there is a last revision and there is more than one revision.\n\t * This link is used for theme assets, e.g., templates, which have no database record until they're edited.\n\t * For these files there's only a \"revision\" after they're edited twice,\n\t * which means the revision.php page won't display a proper diff.\n\t * See: https://github.com/WordPress/gutenberg/issues/49164.\n\t */\n\tif ( lastRevisionId && revisionsCount > 1 ) {\n\t\threfProps.href = addQueryArgs( 'revision.php', {\n\t\t\trevision: record?._links[ 'predecessor-version' ][ 0 ].id,\n\t\t} );\n\t\threfProps.as = 'a';\n\t}\n\treturn (\n\t\t<ItemGroup\n\t\t\tsize=\"large\"\n\t\t\tclassName=\"edit-site-sidebar-navigation-screen-details-footer\"\n\t\t>\n\t\t\t<SidebarNavigationItem\n\t\t\t\ticon={ backup }\n\t\t\t\t{ ...hrefProps }\n\t\t\t\t{ ...otherProps }\n\t\t\t>\n\t\t\t\t{ sprintf(\n\t\t\t\t\t/* translators: %d: Number of Styles revisions. */\n\t\t\t\t\t_n( '%d Revision', '%d Revisions', revisionsCount ),\n\t\t\t\t\trevisionsCount\n\t\t\t\t) }\n\t\t\t</SidebarNavigationItem>\n\t\t</ItemGroup>\n\t);\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA4B;AAC5B,iBAA6B;AAC7B,wBAAqD;AACrD,mBAAuB;AACvB,qCAAkC;AAyC/B;AAvCY,SAAR,qCAAuD;AAAA,EAC7D;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GAAI;AAOH,QAAM,YAAY,CAAC;AACnB,QAAM,iBACL,QAAQ,SAAU,qBAAsB,IAAK,CAAE,GAAG,MAAM;AAGzD,mBACC,kBACA,QAAQ,SAAU,iBAAkB,IAAK,CAAE,GAAG,SAC9C;AASD,MAAK,kBAAkB,iBAAiB,GAAI;AAC3C,cAAU,WAAO,yBAAc,gBAAgB;AAAA,MAC9C,UAAU,QAAQ,OAAQ,qBAAsB,EAAG,CAAE,EAAE;AAAA,IACxD,CAAE;AACF,cAAU,KAAK;AAAA,EAChB;AACA,SACC;AAAA,IAAC,kBAAAA;AAAA,IAAA;AAAA,MACA,MAAK;AAAA,MACL,WAAU;AAAA,MAEV;AAAA,QAAC,+BAAAC;AAAA,QAAA;AAAA,UACA,MAAO;AAAA,UACL,GAAG;AAAA,UACH,GAAG;AAAA,UAEH;AAAA;AAAA,gBAED,gBAAI,eAAe,gBAAgB,cAAe;AAAA,YAClD;AAAA,UACD;AAAA;AAAA,MACD;AAAA;AAAA,EACD;AAEF;",
|
|
6
6
|
"names": ["ItemGroup", "SidebarNavigationItem"]
|
|
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
|
-
// packages/edit-site/src/components/sidebar-navigation-screen-global-styles/content.
|
|
20
|
+
// packages/edit-site/src/components/sidebar-navigation-screen-global-styles/content.jsx
|
|
21
21
|
var content_exports = {};
|
|
22
22
|
__export(content_exports, {
|
|
23
23
|
default: () => SidebarNavigationScreenGlobalStylesContent
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/sidebar-navigation-screen-global-styles/content.
|
|
3
|
+
"sources": ["../../../src/components/sidebar-navigation-screen-global-styles/content.jsx"],
|
|
4
4
|
"sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport {\n\tStyleVariations,\n\tColorVariations,\n\tTypographyVariations,\n} from '@wordpress/global-styles-ui';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStyles } = unlock( editorPrivateApis );\n\nexport default function SidebarNavigationScreenGlobalStylesContent() {\n\tconst gap = 3;\n\tconst {\n\t\tuser: userConfig,\n\t\tbase: baseConfig,\n\t\tsetUser: setUserConfig,\n\t} = useGlobalStyles();\n\n\treturn (\n\t\t<VStack\n\t\t\tspacing={ 10 }\n\t\t\tclassName=\"edit-site-global-styles-variation-container\"\n\t\t>\n\t\t\t<StyleVariations\n\t\t\t\tvalue={ userConfig }\n\t\t\t\tbaseValue={ baseConfig || {} }\n\t\t\t\tonChange={ setUserConfig }\n\t\t\t\tgap={ gap }\n\t\t\t/>\n\t\t\t<ColorVariations\n\t\t\t\tvalue={ userConfig }\n\t\t\t\tbaseValue={ baseConfig || {} }\n\t\t\t\tonChange={ setUserConfig }\n\t\t\t\ttitle={ __( 'Palettes' ) }\n\t\t\t\tgap={ gap }\n\t\t\t/>\n\t\t\t<TypographyVariations\n\t\t\t\tvalue={ userConfig }\n\t\t\t\tbaseValue={ baseConfig || {} }\n\t\t\t\tonChange={ setUserConfig }\n\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\tgap={ gap }\n\t\t\t/>\n\t\t</VStack>\n\t);\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAmB;AACnB,wBAA+C;AAC/C,8BAIO;AACP,oBAAiD;AACjD,yBAAuB;AAarB;AAXF,IAAM,EAAE,gBAAgB,QAAI,2BAAQ,cAAAA,WAAkB;AAEvC,SAAR,6CAA8D;AACpE,QAAM,MAAM;AACZ,QAAM;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACV,IAAI,gBAAgB;AAEpB,SACC;AAAA,IAAC,kBAAAC;AAAA,IAAA;AAAA,MACA,SAAU;AAAA,MACV,WAAU;AAAA,MAEV;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,OAAQ;AAAA,YACR,WAAY,cAAc,CAAC;AAAA,YAC3B,UAAW;AAAA,YACX;AAAA;AAAA,QACD;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACA,OAAQ;AAAA,YACR,WAAY,cAAc,CAAC;AAAA,YAC3B,UAAW;AAAA,YACX,WAAQ,gBAAI,UAAW;AAAA,YACvB;AAAA;AAAA,QACD;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACA,OAAQ;AAAA,YACR,WAAY,cAAc,CAAC;AAAA,YAC3B,UAAW;AAAA,YACX,WAAQ,gBAAI,YAAa;AAAA,YACzB;AAAA;AAAA,QACD;AAAA;AAAA;AAAA,EACD;AAEF;",
|
|
6
6
|
"names": ["editorPrivateApis", "VStack"]
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.
|
|
30
|
+
// packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.jsx
|
|
31
31
|
var sidebar_navigation_screen_global_styles_exports = {};
|
|
32
32
|
__export(sidebar_navigation_screen_global_styles_exports, {
|
|
33
33
|
default: () => SidebarNavigationScreenGlobalStyles
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/sidebar-navigation-screen-global-styles/index.
|
|
3
|
+
"sources": ["../../../src/components/sidebar-navigation-screen-global-styles/index.jsx"],
|
|
4
4
|
"sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { useCallback } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as editorStore } from '@wordpress/editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { addQueryArgs } from '@wordpress/url';\nimport { useGlobalStylesRevisions } from '@wordpress/global-styles-ui';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';\nimport { MainSidebarNavigationContent } from '../sidebar-navigation-screen-main';\n\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nexport default function SidebarNavigationScreenGlobalStyles() {\n\tconst history = useHistory();\n\tconst { path } = useLocation();\n\tconst {\n\t\trevisions,\n\t\tisLoading: isLoadingRevisions,\n\t\trevisionsCount,\n\t} = useGlobalStylesRevisions();\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setStylesPath } = unlock( useDispatch( editorStore ) );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\n\tconst openGlobalStyles = useCallback( async () => {\n\t\thistory.navigate( addQueryArgs( path, { canvas: 'edit' } ), {\n\t\t\ttransition: 'canvas-mode-edit-transition',\n\t\t} );\n\t\treturn Promise.all( [\n\t\t\tsetPreference( 'core', 'distractionFree', false ),\n\t\t\topenGeneralSidebar( 'edit-site/global-styles' ),\n\t\t] );\n\t}, [ path, history, openGeneralSidebar, setPreference ] );\n\n\tconst openRevisions = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the global styles revisions once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. Set the path to revisions.\n\t\tsetStylesPath( '/revisions' );\n\t}, [ openGlobalStyles, setStylesPath ] );\n\n\t// If there are no revisions, do not render a footer.\n\tconst shouldShowGlobalStylesFooter =\n\t\t!! revisionsCount && ! isLoadingRevisions;\n\n\treturn (\n\t\t<>\n\t\t\t<SidebarNavigationScreen\n\t\t\t\ttitle={ __( 'Design' ) }\n\t\t\t\tisRoot\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Customize the appearance of your website using the block editor.'\n\t\t\t\t) }\n\t\t\t\tcontent={ <MainSidebarNavigationContent /> }\n\t\t\t\tfooter={\n\t\t\t\t\tshouldShowGlobalStylesFooter && (\n\t\t\t\t\t\t<SidebarNavigationScreenDetailsFooter\n\t\t\t\t\t\t\trecord={ revisions?.[ 0 ] }\n\t\t\t\t\t\t\trevisionsCount={ revisionsCount }\n\t\t\t\t\t\t\tonClick={ openRevisions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t/>\n\t\t</>\n\t);\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAmB;AACnB,kBAA4B;AAC5B,qBAA4B;AAC5B,yBAA0C;AAC1C,oBAAqC;AACrC,oBAAiD;AACjD,iBAA6B;AAC7B,8BAAyC;AACzC,uCAAoC;AACpC,yBAAuB;AACvB,mBAAuC;AACvC,sDAAiD;AACjD,4CAA6C;AAsC3C;AApCF,IAAM,EAAE,aAAa,WAAW,QAAI,2BAAQ,cAAAA,WAAkB;AAE/C,SAAR,sCAAuD;AAC7D,QAAM,UAAU,WAAW;AAC3B,QAAM,EAAE,KAAK,IAAI,YAAY;AAC7B,QAAM;AAAA,IACL;AAAA,IACA,WAAW;AAAA,IACX;AAAA,EACD,QAAI,kDAAyB;AAC7B,QAAM,EAAE,mBAAmB,QAAI,yBAAa,aAAAC,KAAc;AAC1D,QAAM,EAAE,cAAc,QAAI,+BAAQ,yBAAa,cAAAC,KAAY,CAAE;AAC7D,QAAM,EAAE,KAAK,cAAc,QAAI,yBAAa,mBAAAC,KAAiB;AAE7D,QAAM,uBAAmB,4BAAa,YAAY;AACjD,YAAQ,aAAU,yBAAc,MAAM,EAAE,QAAQ,OAAO,CAAE,GAAG;AAAA,MAC3D,YAAY;AAAA,IACb,CAAE;AACF,WAAO,QAAQ,IAAK;AAAA,MACnB,cAAe,QAAQ,mBAAmB,KAAM;AAAA,MAChD,mBAAoB,yBAA0B;AAAA,IAC/C,CAAE;AAAA,EACH,GAAG,CAAE,MAAM,SAAS,oBAAoB,aAAc,CAAE;AAExD,QAAM,oBAAgB,4BAAa,YAAY;AAC9C,UAAM,iBAAiB;AAGvB,kBAAe,YAAa;AAAA,EAC7B,GAAG,CAAE,kBAAkB,aAAc,CAAE;AAGvC,QAAM,+BACL,CAAC,CAAE,kBAAkB,CAAE;AAExB,SACC,2EACC;AAAA,IAAC,iCAAAC;AAAA,IAAA;AAAA,MACA,WAAQ,gBAAI,QAAS;AAAA,MACrB,QAAM;AAAA,MACN,iBAAc;AAAA,QACb;AAAA,MACD;AAAA,MACA,SAAU,4CAAC,sEAA6B;AAAA,MACxC,QACC,gCACC;AAAA,QAAC,gDAAAC;AAAA,QAAA;AAAA,UACA,QAAS,YAAa,CAAE;AAAA,UACxB;AAAA,UACA,SAAU;AAAA;AAAA,MACX;AAAA;AAAA,EAGH,GACD;AAEF;",
|
|
6
6
|
"names": ["routerPrivateApis", "editSiteStore", "editorStore", "preferencesStore", "SidebarNavigationScreen", "SidebarNavigationScreenDetailsFooter"]
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// packages/edit-site/src/components/sidebar-navigation-screen-identity/index.
|
|
30
|
+
// packages/edit-site/src/components/sidebar-navigation-screen-identity/index.jsx
|
|
31
31
|
var sidebar_navigation_screen_identity_exports = {};
|
|
32
32
|
__export(sidebar_navigation_screen_identity_exports, {
|
|
33
33
|
default: () => SidebarNavigationScreenIdentity
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/sidebar-navigation-screen-identity/index.
|
|
3
|
+
"sources": ["../../../src/components/sidebar-navigation-screen-identity/index.jsx"],
|
|
4
4
|
"sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { MainSidebarNavigationContent } from '../sidebar-navigation-screen-main';\n\nexport default function SidebarNavigationScreenIdentity() {\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\tisRoot\n\t\t\ttitle={ __( 'Design' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Customize the appearance of your website using the block editor.'\n\t\t\t) }\n\t\t\tcontent={ <MainSidebarNavigationContent /> }\n\t\t/>\n\t);\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAmB;AACnB,uCAAoC;AACpC,4CAA6C;AAUhC;AARE,SAAR,kCAAmD;AACzD,SACC;AAAA,IAAC,iCAAAA;AAAA,IAAA;AAAA,MACA,QAAM;AAAA,MACN,WAAQ,gBAAI,QAAS;AAAA,MACrB,iBAAc;AAAA,QACb;AAAA,MACD;AAAA,MACA,SAAU,4CAAC,sEAA6B;AAAA;AAAA,EACzC;AAEF;",
|
|
6
6
|
"names": ["SidebarNavigationScreen"]
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// packages/edit-site/src/components/sidebar-navigation-screen-main/index.
|
|
30
|
+
// packages/edit-site/src/components/sidebar-navigation-screen-main/index.jsx
|
|
31
31
|
var sidebar_navigation_screen_main_exports = {};
|
|
32
32
|
__export(sidebar_navigation_screen_main_exports, {
|
|
33
33
|
MainSidebarNavigationContent: () => MainSidebarNavigationContent,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/sidebar-navigation-screen-main/index.
|
|
3
|
+
"sources": ["../../../src/components/sidebar-navigation-screen-main/index.jsx"],
|
|
4
4
|
"sourcesContent": ["import { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tlayout,\n\tsymbol,\n\tnavigation,\n\tstyles,\n\tpage,\n\tsiteLogo,\n} from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\n\nexport function MainSidebarNavigationContent( { isBlockBasedTheme = true } ) {\n\treturn (\n\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-main\">\n\t\t\t<SidebarNavigationItem\n\t\t\t\tto=\"/identity\"\n\t\t\t\tuid=\"identity-navigation-item\"\n\t\t\t\ticon={ siteLogo }\n\t\t\t\tactiveOnRouteName=\"identity\"\n\t\t\t\tisHidden={ ! isBlockBasedTheme }\n\t\t\t>\n\t\t\t\t{ _x( 'Identity', 'site identity' ) }\n\t\t\t</SidebarNavigationItem>\n\t\t\t<SidebarNavigationItem\n\t\t\t\tto={ isBlockBasedTheme ? '/styles' : '/stylebook' }\n\t\t\t\tuid={\n\t\t\t\t\tisBlockBasedTheme\n\t\t\t\t\t\t? 'global-styles-navigation-item'\n\t\t\t\t\t\t: 'stylebook-navigation-item'\n\t\t\t\t}\n\t\t\t\ticon={ styles }\n\t\t\t\tactiveOnRouteName={ isBlockBasedTheme ? 'styles' : undefined }\n\t\t\t\twithChevron={ ! isBlockBasedTheme }\n\t\t\t>\n\t\t\t\t{ __( 'Styles' ) }\n\t\t\t</SidebarNavigationItem>\n\t\t\t<SidebarNavigationItem\n\t\t\t\tuid=\"page-navigation-item\"\n\t\t\t\tto=\"/page\"\n\t\t\t\twithChevron\n\t\t\t\ticon={ page }\n\t\t\t\tisHidden={ ! isBlockBasedTheme }\n\t\t\t>\n\t\t\t\t{ __( 'Pages' ) }\n\t\t\t</SidebarNavigationItem>\n\t\t\t<SidebarNavigationItem\n\t\t\t\tuid=\"navigation-navigation-item\"\n\t\t\t\tto=\"/navigation\"\n\t\t\t\twithChevron\n\t\t\t\ticon={ navigation }\n\t\t\t\tisHidden={ ! isBlockBasedTheme }\n\t\t\t>\n\t\t\t\t{ __( 'Navigation' ) }\n\t\t\t</SidebarNavigationItem>\n\t\t\t<SidebarNavigationItem\n\t\t\t\tuid=\"patterns-navigation-item\"\n\t\t\t\tto=\"/pattern\"\n\t\t\t\twithChevron\n\t\t\t\ticon={ symbol }\n\t\t\t>\n\t\t\t\t{ __( 'Patterns' ) }\n\t\t\t</SidebarNavigationItem>\n\t\t\t<SidebarNavigationItem\n\t\t\t\tuid=\"template-navigation-item\"\n\t\t\t\tto=\"/template\"\n\t\t\t\twithChevron\n\t\t\t\ticon={ layout }\n\t\t\t\tisHidden={ ! isBlockBasedTheme }\n\t\t\t>\n\t\t\t\t{ __( 'Templates' ) }\n\t\t\t</SidebarNavigationItem>\n\t\t</ItemGroup>\n\t);\n}\n\nexport default function SidebarNavigationScreenMain( { customDescription } ) {\n\tconst isBlockBasedTheme = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme()?.is_block_theme,\n\t\t[]\n\t);\n\n\tlet description;\n\tif ( customDescription ) {\n\t\tdescription = customDescription;\n\t} else if ( isBlockBasedTheme ) {\n\t\tdescription = __(\n\t\t\t'Customize the appearance of your website using the block editor.'\n\t\t);\n\t} else {\n\t\tdescription = __(\n\t\t\t'Explore block styles and patterns to refine your site.'\n\t\t);\n\t}\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\tisRoot\n\t\t\ttitle={ __( 'Design' ) }\n\t\t\tdescription={ description }\n\t\t\tcontent={\n\t\t\t\t<MainSidebarNavigationContent\n\t\t\t\t\tisBlockBasedTheme={ isBlockBasedTheme }\n\t\t\t\t/>\n\t\t\t}\n\t\t/>\n\t);\n}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ACA;AAAA,MAAC,+BAAAA;AAAA,MAAA;AAAA,QACA,KAAI;AAAA,QACJ,IAAG;AAAA,QACH,aAAW;AAAA,QACX,MAAO;AAAA,QACP,UAAW,CAAE;AAAA,QAEX,8BAAI,WAAY;AAAA;AAAA,IACnB;AAAA,KACD;AAEF;AAEe,SAAR,4BAA8C,EAAE,kBAAkB,GAAI;AAC5E,QAAM,wBAAoB;AAAA,IACzB,CAAE,WAAY,OAAQ,iBAAAC,KAAU,EAAE,gBAAgB,GAAG;AAAA,IACrD,CAAC;AAAA,EACF;AAEA,MAAI;AACJ,MAAK,mBAAoB;AACxB,kBAAc;AAAA,EACf,WAAY,mBAAoB;AAC/B,sBAAc;AAAA,MACb;AAAA,IACD;AAAA,EACD,OAAO;AACN,sBAAc;AAAA,MACb;AAAA,IACD;AAAA,EACD;AAEA,SACC;AAAA,IAAC,iCAAAC;AAAA,IAAA;AAAA,MACA,QAAM;AAAA,MACN,WAAQ,gBAAI,QAAS;AAAA,MACrB;AAAA,MACA,SACC;AAAA,QAAC;AAAA;AAAA,UACA;AAAA;AAAA,MACD;AAAA;AAAA,EAEF;AAEF;",
|
|
6
6
|
"names": ["ItemGroup", "SidebarNavigationItem", "coreStore", "SidebarNavigationScreen"]
|
package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.cjs
CHANGED
|
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
|
-
// packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.
|
|
20
|
+
// packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.jsx
|
|
21
21
|
var delete_confirm_dialog_exports = {};
|
|
22
22
|
__export(delete_confirm_dialog_exports, {
|
|
23
23
|
default: () => DeleteConfirmDialog
|
package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.cjs.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.
|
|
3
|
+
"sources": ["../../../src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.jsx"],
|
|
4
4
|
"sourcesContent": ["import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function DeleteConfirmDialog( { onClose, onConfirm } ) {\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen\n\t\t\tonConfirm={ () => {\n\t\t\t\tonConfirm();\n\n\t\t\t\t// Immediate close avoids ability to hit delete multiple times.\n\t\t\t\tonClose();\n\t\t\t} }\n\t\t\tonCancel={ onClose }\n\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t\tsize=\"medium\"\n\t\t>\n\t\t\t{ __( 'Are you sure you want to delete this Navigation Menu?' ) }\n\t\t</ConfirmDialog>\n\t);\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAA6D;AAC7D,kBAAmB;AAIjB;AAFa,SAAR,oBAAsC,EAAE,SAAS,UAAU,GAAI;AACrE,SACC;AAAA,IAAC,kBAAAA;AAAA,IAAA;AAAA,MACA,QAAM;AAAA,MACN,WAAY,MAAM;AACjB,kBAAU;AAGV,gBAAQ;AAAA,MACT;AAAA,MACA,UAAW;AAAA,MACX,uBAAoB,gBAAI,QAAS;AAAA,MACjC,MAAK;AAAA,MAEH,8BAAI,uDAAwD;AAAA;AAAA,EAC/D;AAEF;",
|
|
6
6
|
"names": ["ConfirmDialog"]
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/index.
|
|
30
|
+
// packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/index.jsx
|
|
31
31
|
var sidebar_navigation_screen_navigation_menu_exports = {};
|
|
32
32
|
__export(sidebar_navigation_screen_navigation_menu_exports, {
|
|
33
33
|
default: () => SidebarNavigationScreenNavigationMenu,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/sidebar-navigation-screen-navigation-menu/index.
|
|
3
|
+
"sources": ["../../../src/components/sidebar-navigation-screen-navigation-menu/index.jsx"],
|
|
4
4
|
"sourcesContent": ["import { useEntityRecord, store as coreStore } from '@wordpress/core-data';\nimport { Spinner } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { SidebarNavigationScreenWrapper } from '../sidebar-navigation-screen-navigation-menus';\nimport ScreenNavigationMoreMenu from './more-menu';\nimport SingleNavigationMenu from './single-navigation-menu';\nimport useNavigationMenuHandlers from './use-navigation-menu-handlers';\nimport buildNavigationLabel from '../sidebar-navigation-screen-navigation-menus/build-navigation-label';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport const postType = `wp_navigation`;\n\nexport default function SidebarNavigationScreenNavigationMenu( { backPath } ) {\n\tconst {\n\t\tparams: { postId },\n\t} = useLocation();\n\n\tconst { record: navigationMenu, isResolving } = useEntityRecord(\n\t\t'postType',\n\t\tpostType,\n\t\tpostId\n\t);\n\n\tconst { isSaving, isDeleting } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isSavingEntityRecord, isDeletingEntityRecord } =\n\t\t\t\tselect( coreStore );\n\n\t\t\treturn {\n\t\t\t\tisSaving: isSavingEntityRecord( 'postType', postType, postId ),\n\t\t\t\tisDeleting: isDeletingEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ postId ]\n\t);\n\n\tconst isLoading = isResolving || isSaving || isDeleting;\n\n\tconst menuTitle = navigationMenu?.title?.rendered || navigationMenu?.slug;\n\n\tconst { handleSave, handleDelete, handleDuplicate } =\n\t\tuseNavigationMenuHandlers();\n\n\tconst _handleDelete = () => handleDelete( navigationMenu );\n\tconst _handleSave = ( edits ) => handleSave( navigationMenu, edits );\n\tconst _handleDuplicate = () => handleDuplicate( navigationMenu );\n\n\tif ( isLoading ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Navigation Menus are a curated collection of blocks that allow visitors to get around your site.'\n\t\t\t\t) }\n\t\t\t\tbackPath={ backPath }\n\t\t\t>\n\t\t\t\t<Spinner className=\"edit-site-sidebar-navigation-screen-navigation-menus__loading\" />\n\t\t\t</SidebarNavigationScreenWrapper>\n\t\t);\n\t}\n\n\tif ( ! isLoading && ! navigationMenu ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __( 'Navigation Menu missing.' ) }\n\t\t\t\tbackPath={ backPath }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( ! navigationMenu?.content?.raw ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tactions={\n\t\t\t\t\t<ScreenNavigationMoreMenu\n\t\t\t\t\t\tmenuId={ navigationMenu?.id }\n\t\t\t\t\t\tmenuTitle={ decodeEntities( menuTitle ) }\n\t\t\t\t\t\tonDelete={ _handleDelete }\n\t\t\t\t\t\tonSave={ _handleSave }\n\t\t\t\t\t\tonDuplicate={ _handleDuplicate }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tbackPath={ backPath }\n\t\t\t\ttitle={ buildNavigationLabel(\n\t\t\t\t\tnavigationMenu?.title,\n\t\t\t\t\tnavigationMenu?.id,\n\t\t\t\t\tnavigationMenu?.status\n\t\t\t\t) }\n\t\t\t\tdescription={ __( 'This Navigation Menu is empty.' ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<SingleNavigationMenu\n\t\t\tnavigationMenu={ navigationMenu }\n\t\t\tbackPath={ backPath }\n\t\t\thandleDelete={ _handleDelete }\n\t\t\thandleSave={ _handleSave }\n\t\t\thandleDuplicate={ _handleDuplicate }\n\t\t/>\n\t);\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAoD;AACpD,wBAAwB;AACxB,kBAAmB;AACnB,kBAA0B;AAC1B,2BAA+B;AAC/B,oBAAiD;AACjD,wDAA+C;AAC/C,uBAAqC;AACrC,oCAAiC;AACjC,0CAAsC;AACtC,oCAAiC;AACjC,yBAAuB;AAqDnB;AAnDJ,IAAM,EAAE,YAAY,QAAI,2BAAQ,cAAAA,WAAkB;AAE3C,IAAM,WAAW;AAET,SAAR,sCAAwD,EAAE,SAAS,GAAI;AAC7E,QAAM;AAAA,IACL,QAAQ,EAAE,OAAO;AAAA,EAClB,IAAI,YAAY;AAEhB,QAAM,EAAE,QAAQ,gBAAgB,YAAY,QAAI;AAAA,IAC/C;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAEA,QAAM,EAAE,UAAU,WAAW,QAAI;AAAA,IAChC,CAAE,WAAY;AACb,YAAM,EAAE,sBAAsB,uBAAuB,IACpD,OAAQ,iBAAAC,KAAU;AAEnB,aAAO;AAAA,QACN,UAAU,qBAAsB,YAAY,UAAU,MAAO;AAAA,QAC7D,YAAY;AAAA,UACX;AAAA,UACA;AAAA,UACA;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,IACA,CAAE,MAAO;AAAA,EACV;AAEA,QAAM,YAAY,eAAe,YAAY;AAE7C,QAAM,YAAY,gBAAgB,OAAO,YAAY,gBAAgB;AAErE,QAAM,EAAE,YAAY,cAAc,gBAAgB,QACjD,oCAAAC,SAA0B;AAE3B,QAAM,gBAAgB,MAAM,aAAc,cAAe;AACzD,QAAM,cAAc,CAAE,UAAW,WAAY,gBAAgB,KAAM;AACnE,QAAM,mBAAmB,MAAM,gBAAiB,cAAe;AAE/D,MAAK,WAAY;AAChB,WACC;AAAA,MAAC;AAAA;AAAA,QACA,iBAAc;AAAA,UACb;AAAA,QACD;AAAA,QACA;AAAA,QAEA,sDAAC,6BAAQ,WAAU,iEAAgE;AAAA;AAAA,IACpF;AAAA,EAEF;AAEA,MAAK,CAAE,aAAa,CAAE,gBAAiB;AACtC,WACC;AAAA,MAAC;AAAA;AAAA,QACA,iBAAc,gBAAI,0BAA2B;AAAA,QAC7C;AAAA;AAAA,IACD;AAAA,EAEF;AAEA,MAAK,CAAE,gBAAgB,SAAS,KAAM;AACrC,WACC;AAAA,MAAC;AAAA;AAAA,QACA,SACC;AAAA,UAAC,iBAAAC;AAAA,UAAA;AAAA,YACA,QAAS,gBAAgB;AAAA,YACzB,eAAY,qCAAgB,SAAU;AAAA,YACtC,UAAW;AAAA,YACX,QAAS;AAAA,YACT,aAAc;AAAA;AAAA,QACf;AAAA,QAED;AAAA,QACA,WAAQ,8BAAAC;AAAA,UACP,gBAAgB;AAAA,UAChB,gBAAgB;AAAA,UAChB,gBAAgB;AAAA,QACjB;AAAA,QACA,iBAAc,gBAAI,gCAAiC;AAAA;AAAA,IACpD;AAAA,EAEF;AAEA,SACC;AAAA,IAAC,8BAAAC;AAAA,IAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA,cAAe;AAAA,MACf,YAAa;AAAA,MACb,iBAAkB;AAAA;AAAA,EACnB;AAEF;",
|
|
6
6
|
"names": ["routerPrivateApis", "coreStore", "useNavigationMenuHandlers", "ScreenNavigationMoreMenu", "buildNavigationLabel", "SingleNavigationMenu"]
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/more-menu.
|
|
30
|
+
// packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/more-menu.jsx
|
|
31
31
|
var more_menu_exports = {};
|
|
32
32
|
__export(more_menu_exports, {
|
|
33
33
|
default: () => ScreenNavigationMoreMenu
|