@wordpress/edit-site 6.34.0 → 6.34.1-next.2f1c7c01b.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/build/components/add-new-pattern/index.js +6 -4
- package/build/components/add-new-pattern/index.js.map +1 -1
- package/build/components/add-new-post/index.js +3 -1
- package/build/components/add-new-post/index.js.map +1 -1
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js +3 -1
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
- package/build/components/add-new-template/add-custom-template-modal-content.js +4 -2
- package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build/components/add-new-template/index.js +7 -5
- package/build/components/add-new-template/index.js.map +1 -1
- package/build/components/add-new-template/utils.js +14 -12
- package/build/components/add-new-template/utils.js.map +1 -1
- package/build/components/app/index.js +4 -2
- package/build/components/app/index.js.map +1 -1
- package/build/components/block-editor/use-editor-iframe-props.js +3 -1
- package/build/components/block-editor/use-editor-iframe-props.js.map +1 -1
- package/build/components/block-editor/use-navigate-to-entity-record.js +3 -1
- package/build/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
- package/build/components/block-editor/use-site-editor-settings.js +3 -1
- package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build/components/canvas-loader/index.js +5 -3
- package/build/components/canvas-loader/index.js.map +1 -1
- package/build/components/dataviews-actions/index.js +5 -3
- package/build/components/dataviews-actions/index.js.map +1 -1
- package/build/components/editor/index.js +8 -6
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor/site-preview.js +3 -1
- package/build/components/editor/site-preview.js.map +1 -1
- package/build/components/editor/use-adapt-editor-to-canvas.js +2 -0
- package/build/components/editor/use-adapt-editor-to-canvas.js.map +1 -1
- package/build/components/editor/use-editor-title.js +3 -1
- package/build/components/editor/use-editor-title.js.map +1 -1
- package/build/components/editor/use-resolve-edited-entity.js +5 -3
- package/build/components/editor/use-resolve-edited-entity.js.map +1 -1
- package/build/components/layout/animation.js +3 -1
- package/build/components/layout/animation.js.map +1 -1
- package/build/components/layout/hooks.js +3 -1
- package/build/components/layout/hooks.js.map +1 -1
- package/build/components/layout/index.js +6 -4
- package/build/components/layout/index.js.map +1 -1
- package/build/components/media/index.js +3 -1
- package/build/components/media/index.js.map +1 -1
- package/build/components/more-menu/index.js +4 -2
- package/build/components/more-menu/index.js.map +1 -1
- package/build/components/more-menu/site-export.js +3 -1
- package/build/components/more-menu/site-export.js.map +1 -1
- package/build/components/more-menu/welcome-guide-menu-item.js +3 -1
- package/build/components/more-menu/welcome-guide-menu-item.js.map +1 -1
- package/build/components/page-patterns/actions.js +3 -1
- package/build/components/page-patterns/actions.js.map +1 -1
- package/build/components/page-patterns/delete-category-menu-item.js +4 -2
- package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
- package/build/components/page-patterns/fields.js +8 -6
- package/build/components/page-patterns/fields.js.map +1 -1
- package/build/components/page-patterns/index.js +9 -7
- package/build/components/page-patterns/index.js.map +1 -1
- package/build/components/page-patterns/rename-category-menu-item.js +4 -2
- package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
- package/build/components/page-patterns/search-items.js +10 -8
- package/build/components/page-patterns/search-items.js.map +1 -1
- package/build/components/page-patterns/use-pattern-settings.js +2 -0
- package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +8 -6
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/page-patterns/utils.js +3 -1
- package/build/components/page-patterns/utils.js.map +1 -1
- package/build/components/page-templates/fields.js +14 -12
- package/build/components/page-templates/fields.js.map +2 -2
- package/build/components/page-templates/hooks.js +2 -0
- package/build/components/page-templates/hooks.js.map +1 -1
- package/build/components/page-templates/index.js +16 -11
- package/build/components/page-templates/index.js.map +2 -2
- package/build/components/page-templates/view-utils.js +8 -2
- package/build/components/page-templates/view-utils.js.map +2 -2
- package/build/components/pagination/index.js +3 -1
- package/build/components/pagination/index.js.map +1 -1
- package/build/components/plugin-template-setting-panel/index.js +5 -3
- package/build/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build/components/post-edit/index.js +5 -3
- package/build/components/post-edit/index.js.map +1 -1
- package/build/components/post-list/index.js +8 -6
- package/build/components/post-list/index.js.map +1 -1
- package/build/components/post-list/view-utils.js +5 -3
- package/build/components/post-list/view-utils.js.map +1 -1
- package/build/components/posts-app/index.js +4 -2
- package/build/components/posts-app/index.js.map +1 -1
- package/build/components/posts-app-routes/index.js +3 -1
- package/build/components/posts-app-routes/index.js.map +1 -1
- package/build/components/posts-app-routes/post-item.js +4 -2
- package/build/components/posts-app-routes/post-item.js.map +1 -1
- package/build/components/posts-app-routes/posts.js +5 -3
- package/build/components/posts-app-routes/posts.js.map +1 -1
- package/build/components/resizable-frame/index.js +10 -8
- package/build/components/resizable-frame/index.js.map +1 -1
- package/build/components/routes/use-title.js +3 -1
- package/build/components/routes/use-title.js.map +1 -1
- package/build/components/save-button/index.js +4 -2
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/save-hub/index.js +3 -1
- package/build/components/save-hub/index.js.map +1 -1
- package/build/components/save-keyboard-shortcut/index.js +3 -1
- package/build/components/save-keyboard-shortcut/index.js.map +1 -1
- package/build/components/save-panel/index.js +7 -5
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/sidebar/index.js +4 -2
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-button/index.js +3 -1
- package/build/components/sidebar-button/index.js.map +1 -1
- package/build/components/sidebar-dataviews/dataview-item.js +4 -2
- package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build/components/sidebar-dataviews/index.js +4 -2
- package/build/components/sidebar-dataviews/index.js.map +1 -1
- package/build/components/sidebar-global-styles/index.js +7 -5
- package/build/components/sidebar-global-styles/index.js.map +1 -1
- package/build/components/sidebar-navigation-item/index.js +4 -2
- package/build/components/sidebar-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +4 -2
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.js +3 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/content.js +4 -2
- package/build/components/sidebar-navigation-screen-global-styles/content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.js +4 -2
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/index.js +3 -1
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +3 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js +5 -3
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +5 -3
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +4 -2
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +4 -2
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +3 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +3 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +2 -0
- package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/constants.js +3 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js +4 -2
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +5 -3
- package/build/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +6 -4
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/category-item.js +3 -1
- package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/index.js +4 -2
- package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +2 -0
- package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +2 -0
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +3 -1
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +2 -0
- package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/content.js +5 -3
- package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/index.js +3 -1
- package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-unsupported/index.js +3 -1
- package/build/components/sidebar-navigation-screen-unsupported/index.js.map +1 -1
- package/build/components/site-editor-routes/home.js +4 -2
- package/build/components/site-editor-routes/home.js.map +1 -1
- package/build/components/site-editor-routes/index.js +3 -1
- package/build/components/site-editor-routes/index.js.map +1 -1
- package/build/components/site-editor-routes/navigation-item.js +5 -3
- package/build/components/site-editor-routes/navigation-item.js.map +1 -1
- package/build/components/site-editor-routes/navigation.js +5 -3
- package/build/components/site-editor-routes/navigation.js.map +1 -1
- package/build/components/site-editor-routes/notfound.js +4 -2
- package/build/components/site-editor-routes/notfound.js.map +1 -1
- package/build/components/site-editor-routes/page-item.js +4 -2
- package/build/components/site-editor-routes/page-item.js.map +1 -1
- package/build/components/site-editor-routes/pages.js +5 -3
- package/build/components/site-editor-routes/pages.js.map +1 -1
- package/build/components/site-editor-routes/pattern-item.js +4 -2
- package/build/components/site-editor-routes/pattern-item.js.map +1 -1
- package/build/components/site-editor-routes/patterns.js +4 -2
- package/build/components/site-editor-routes/patterns.js.map +1 -1
- package/build/components/site-editor-routes/stylebook.js +5 -3
- package/build/components/site-editor-routes/stylebook.js.map +1 -1
- package/build/components/site-editor-routes/styles.js +6 -4
- package/build/components/site-editor-routes/styles.js.map +1 -1
- package/build/components/site-editor-routes/template-item.js +5 -3
- package/build/components/site-editor-routes/template-item.js.map +1 -1
- package/build/components/site-editor-routes/template-part-item.js +4 -2
- package/build/components/site-editor-routes/template-part-item.js.map +1 -1
- package/build/components/site-editor-routes/templates.js +4 -2
- package/build/components/site-editor-routes/templates.js.map +1 -1
- package/build/components/site-editor-routes/utils.js +2 -0
- package/build/components/site-editor-routes/utils.js.map +1 -1
- package/build/components/site-hub/index.js +6 -4
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/site-icon/index.js +3 -1
- package/build/components/site-icon/index.js.map +1 -1
- package/build/components/welcome-guide/editor.js +3 -1
- package/build/components/welcome-guide/editor.js.map +1 -1
- package/build/components/welcome-guide/image.js +2 -0
- package/build/components/welcome-guide/image.js.map +1 -1
- package/build/components/welcome-guide/index.js +3 -1
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/components/welcome-guide/page.js +3 -1
- package/build/components/welcome-guide/page.js.map +1 -1
- package/build/components/welcome-guide/template.js +3 -1
- package/build/components/welcome-guide/template.js.map +1 -1
- package/build/deprecated.js +5 -3
- package/build/deprecated.js.map +1 -1
- package/build/hooks/commands/use-common-commands.js +7 -5
- package/build/hooks/commands/use-common-commands.js.map +1 -1
- package/build/hooks/commands/use-set-command-context.js +4 -2
- package/build/hooks/commands/use-set-command-context.js.map +1 -1
- package/build/index.js +4 -2
- package/build/index.js.map +1 -1
- package/build/lock-unlock.js +3 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/posts.js +3 -1
- package/build/posts.js.map +1 -1
- package/build/store/actions.js +14 -12
- package/build/store/actions.js.map +1 -1
- package/build/store/constants.js +3 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/index.js +4 -2
- package/build/store/index.js.map +1 -1
- package/build/store/private-actions.js +2 -0
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +2 -0
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +2 -0
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +11 -9
- package/build/store/selectors.js.map +1 -1
- package/build/utils/constants.js +18 -16
- package/build/utils/constants.js.map +1 -1
- package/build/utils/get-filtered-template-parts.js +3 -1
- package/build/utils/get-filtered-template-parts.js.map +1 -1
- package/build/utils/is-previewing-theme.js +2 -0
- package/build/utils/is-previewing-theme.js.map +1 -1
- package/build/utils/is-template-removable.js +2 -0
- package/build/utils/is-template-removable.js.map +1 -1
- package/build/utils/is-template-revertable.js +2 -0
- package/build/utils/is-template-revertable.js.map +2 -2
- package/build/utils/use-activate-theme.js +3 -1
- package/build/utils/use-activate-theme.js.map +1 -1
- package/build/utils/use-actual-current-theme.js +3 -1
- package/build/utils/use-actual-current-theme.js.map +1 -1
- package/build-module/components/add-new-pattern/index.js +5 -4
- package/build-module/components/add-new-pattern/index.js.map +1 -1
- package/build-module/components/add-new-post/index.js +2 -1
- package/build-module/components/add-new-post/index.js.map +1 -1
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +2 -1
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
- package/build-module/components/add-new-template/add-custom-template-modal-content.js +3 -2
- package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build-module/components/add-new-template/index.js +6 -5
- package/build-module/components/add-new-template/index.js.map +1 -1
- package/build-module/components/add-new-template/utils.js +13 -12
- package/build-module/components/add-new-template/utils.js.map +1 -1
- package/build-module/components/app/index.js +3 -2
- package/build-module/components/app/index.js.map +1 -1
- package/build-module/components/block-editor/use-editor-iframe-props.js +2 -1
- package/build-module/components/block-editor/use-editor-iframe-props.js.map +1 -1
- package/build-module/components/block-editor/use-navigate-to-entity-record.js +2 -1
- package/build-module/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
- package/build-module/components/block-editor/use-site-editor-settings.js +2 -1
- package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build-module/components/canvas-loader/index.js +4 -3
- package/build-module/components/canvas-loader/index.js.map +1 -1
- package/build-module/components/dataviews-actions/index.js +4 -3
- package/build-module/components/dataviews-actions/index.js.map +1 -1
- package/build-module/components/editor/index.js +7 -6
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor/site-preview.js +2 -1
- package/build-module/components/editor/site-preview.js.map +1 -1
- package/build-module/components/editor/use-adapt-editor-to-canvas.js +1 -0
- package/build-module/components/editor/use-adapt-editor-to-canvas.js.map +1 -1
- package/build-module/components/editor/use-editor-title.js +2 -1
- package/build-module/components/editor/use-editor-title.js.map +1 -1
- package/build-module/components/editor/use-resolve-edited-entity.js +4 -3
- package/build-module/components/editor/use-resolve-edited-entity.js.map +1 -1
- package/build-module/components/layout/animation.js +2 -1
- package/build-module/components/layout/animation.js.map +1 -1
- package/build-module/components/layout/hooks.js +2 -1
- package/build-module/components/layout/hooks.js.map +1 -1
- package/build-module/components/layout/index.js +5 -4
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/media/index.js +2 -1
- package/build-module/components/media/index.js.map +1 -1
- package/build-module/components/more-menu/index.js +3 -2
- package/build-module/components/more-menu/index.js.map +1 -1
- package/build-module/components/more-menu/site-export.js +2 -1
- package/build-module/components/more-menu/site-export.js.map +1 -1
- package/build-module/components/more-menu/welcome-guide-menu-item.js +2 -1
- package/build-module/components/more-menu/welcome-guide-menu-item.js.map +1 -1
- package/build-module/components/page-patterns/actions.js +2 -1
- package/build-module/components/page-patterns/actions.js.map +1 -1
- package/build-module/components/page-patterns/delete-category-menu-item.js +3 -2
- package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
- package/build-module/components/page-patterns/fields.js +7 -6
- package/build-module/components/page-patterns/fields.js.map +1 -1
- package/build-module/components/page-patterns/index.js +8 -7
- package/build-module/components/page-patterns/index.js.map +1 -1
- package/build-module/components/page-patterns/rename-category-menu-item.js +3 -2
- package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
- package/build-module/components/page-patterns/search-items.js +11 -10
- package/build-module/components/page-patterns/search-items.js.map +1 -1
- package/build-module/components/page-patterns/use-pattern-settings.js +1 -0
- package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +7 -6
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/page-patterns/utils.js +2 -1
- package/build-module/components/page-patterns/utils.js.map +1 -1
- package/build-module/components/page-templates/fields.js +13 -12
- package/build-module/components/page-templates/fields.js.map +2 -2
- package/build-module/components/page-templates/hooks.js +1 -0
- package/build-module/components/page-templates/hooks.js.map +1 -1
- package/build-module/components/page-templates/index.js +15 -11
- package/build-module/components/page-templates/index.js.map +2 -2
- package/build-module/components/page-templates/view-utils.js +7 -2
- package/build-module/components/page-templates/view-utils.js.map +2 -2
- package/build-module/components/pagination/index.js +2 -1
- package/build-module/components/pagination/index.js.map +1 -1
- package/build-module/components/plugin-template-setting-panel/index.js +4 -3
- package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build-module/components/post-edit/index.js +4 -3
- package/build-module/components/post-edit/index.js.map +1 -1
- package/build-module/components/post-list/index.js +7 -6
- package/build-module/components/post-list/index.js.map +1 -1
- package/build-module/components/post-list/view-utils.js +4 -3
- package/build-module/components/post-list/view-utils.js.map +1 -1
- package/build-module/components/posts-app/index.js +3 -2
- package/build-module/components/posts-app/index.js.map +1 -1
- package/build-module/components/posts-app-routes/index.js +2 -1
- package/build-module/components/posts-app-routes/index.js.map +1 -1
- package/build-module/components/posts-app-routes/post-item.js +3 -2
- package/build-module/components/posts-app-routes/post-item.js.map +1 -1
- package/build-module/components/posts-app-routes/posts.js +4 -3
- package/build-module/components/posts-app-routes/posts.js.map +1 -1
- package/build-module/components/resizable-frame/index.js +9 -8
- package/build-module/components/resizable-frame/index.js.map +1 -1
- package/build-module/components/routes/use-title.js +2 -1
- package/build-module/components/routes/use-title.js.map +1 -1
- package/build-module/components/save-button/index.js +3 -2
- package/build-module/components/save-button/index.js.map +1 -1
- package/build-module/components/save-hub/index.js +2 -1
- package/build-module/components/save-hub/index.js.map +1 -1
- package/build-module/components/save-keyboard-shortcut/index.js +2 -1
- package/build-module/components/save-keyboard-shortcut/index.js.map +1 -1
- package/build-module/components/save-panel/index.js +6 -5
- package/build-module/components/save-panel/index.js.map +1 -1
- package/build-module/components/sidebar/index.js +3 -2
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-button/index.js +2 -1
- package/build-module/components/sidebar-button/index.js.map +1 -1
- package/build-module/components/sidebar-dataviews/dataview-item.js +3 -2
- package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build-module/components/sidebar-dataviews/index.js +3 -2
- package/build-module/components/sidebar-dataviews/index.js.map +1 -1
- package/build-module/components/sidebar-global-styles/index.js +6 -5
- package/build-module/components/sidebar-global-styles/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-item/index.js +3 -2
- package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +3 -2
- package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js +2 -1
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/content.js +3 -2
- package/build-module/components/sidebar-navigation-screen-global-styles/content.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +3 -2
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +2 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +2 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +4 -3
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js +4 -3
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +3 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +3 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +2 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +2 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js +2 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +3 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +5 -4
- package/build-module/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +5 -4
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +2 -1
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.js +3 -2
- package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +1 -0
- package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +1 -0
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js +2 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js +1 -0
- package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +4 -3
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +2 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-unsupported/index.js +2 -1
- package/build-module/components/sidebar-navigation-screen-unsupported/index.js.map +1 -1
- package/build-module/components/site-editor-routes/home.js +3 -2
- package/build-module/components/site-editor-routes/home.js.map +1 -1
- package/build-module/components/site-editor-routes/index.js +2 -1
- package/build-module/components/site-editor-routes/index.js.map +1 -1
- package/build-module/components/site-editor-routes/navigation-item.js +4 -3
- package/build-module/components/site-editor-routes/navigation-item.js.map +1 -1
- package/build-module/components/site-editor-routes/navigation.js +4 -3
- package/build-module/components/site-editor-routes/navigation.js.map +1 -1
- package/build-module/components/site-editor-routes/notfound.js +3 -2
- package/build-module/components/site-editor-routes/notfound.js.map +1 -1
- package/build-module/components/site-editor-routes/page-item.js +3 -2
- package/build-module/components/site-editor-routes/page-item.js.map +1 -1
- package/build-module/components/site-editor-routes/pages.js +4 -3
- package/build-module/components/site-editor-routes/pages.js.map +1 -1
- package/build-module/components/site-editor-routes/pattern-item.js +3 -2
- package/build-module/components/site-editor-routes/pattern-item.js.map +1 -1
- package/build-module/components/site-editor-routes/patterns.js +3 -2
- package/build-module/components/site-editor-routes/patterns.js.map +1 -1
- package/build-module/components/site-editor-routes/stylebook.js +4 -3
- package/build-module/components/site-editor-routes/stylebook.js.map +1 -1
- package/build-module/components/site-editor-routes/styles.js +5 -4
- package/build-module/components/site-editor-routes/styles.js.map +1 -1
- package/build-module/components/site-editor-routes/template-item.js +4 -3
- package/build-module/components/site-editor-routes/template-item.js.map +1 -1
- package/build-module/components/site-editor-routes/template-part-item.js +3 -2
- package/build-module/components/site-editor-routes/template-part-item.js.map +1 -1
- package/build-module/components/site-editor-routes/templates.js +3 -2
- package/build-module/components/site-editor-routes/templates.js.map +1 -1
- package/build-module/components/site-editor-routes/utils.js +1 -0
- package/build-module/components/site-editor-routes/utils.js.map +1 -1
- package/build-module/components/site-hub/index.js +5 -4
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/site-icon/index.js +2 -1
- package/build-module/components/site-icon/index.js.map +1 -1
- package/build-module/components/welcome-guide/editor.js +2 -1
- package/build-module/components/welcome-guide/editor.js.map +1 -1
- package/build-module/components/welcome-guide/image.js +1 -0
- package/build-module/components/welcome-guide/image.js.map +1 -1
- package/build-module/components/welcome-guide/index.js +2 -1
- package/build-module/components/welcome-guide/index.js.map +1 -1
- package/build-module/components/welcome-guide/page.js +2 -1
- package/build-module/components/welcome-guide/page.js.map +1 -1
- package/build-module/components/welcome-guide/template.js +2 -1
- package/build-module/components/welcome-guide/template.js.map +1 -1
- package/build-module/deprecated.js +4 -3
- package/build-module/deprecated.js.map +1 -1
- package/build-module/hooks/commands/use-common-commands.js +6 -5
- package/build-module/hooks/commands/use-common-commands.js.map +1 -1
- package/build-module/hooks/commands/use-set-command-context.js +3 -2
- package/build-module/hooks/commands/use-set-command-context.js.map +1 -1
- package/build-module/index.js +7 -6
- package/build-module/index.js.map +1 -1
- package/build-module/lock-unlock.js +2 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/posts.js +2 -1
- package/build-module/posts.js.map +1 -1
- package/build-module/store/actions.js +13 -12
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/constants.js +2 -1
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/index.js +3 -2
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/private-actions.js +1 -0
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +1 -0
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +1 -0
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +10 -9
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/constants.js +17 -16
- package/build-module/utils/constants.js.map +1 -1
- package/build-module/utils/get-filtered-template-parts.js +2 -1
- package/build-module/utils/get-filtered-template-parts.js.map +1 -1
- package/build-module/utils/is-previewing-theme.js +1 -0
- package/build-module/utils/is-previewing-theme.js.map +1 -1
- package/build-module/utils/is-template-removable.js +1 -0
- package/build-module/utils/is-template-removable.js.map +1 -1
- package/build-module/utils/is-template-revertable.js +1 -0
- package/build-module/utils/is-template-revertable.js.map +2 -2
- package/build-module/utils/use-activate-theme.js +2 -1
- package/build-module/utils/use-activate-theme.js.map +1 -1
- package/build-module/utils/use-actual-current-theme.js +2 -1
- package/build-module/utils/use-actual-current-theme.js.map +1 -1
- package/package.json +46 -46
- package/src/components/page-templates/fields.js +3 -3
- package/src/components/page-templates/index.js +11 -7
- package/src/components/page-templates/view-utils.js +7 -0
- package/src/utils/is-template-revertable.js +1 -2
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
// packages/edit-site/src/components/site-editor-routes/template-part-item.js
|
|
2
2
|
import Editor from "../editor";
|
|
3
3
|
import SidebarNavigationScreenPatterns from "../sidebar-navigation-screen-patterns";
|
|
4
|
-
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
var templatePartItemRoute = {
|
|
5
6
|
name: "template-part-item",
|
|
6
7
|
path: "/wp_template_part/*postId",
|
|
7
8
|
areas: {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/template-part-item.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';\n\nexport const templatePartItemRoute = {\n\tname: 'template-part-item',\n\tpath: '/wp_template_part/*postId',\n\tareas: {\n\t\tsidebar: <SidebarNavigationScreenPatterns backPath=\"/\" />,\n\t\tmobile: <Editor />,\n\t\tpreview: <Editor />,\n\t},\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAGA,OAAO,YAAY;AACnB,OAAO,qCAAqC;AAMjC;AAJJ,IAAM,wBAAwB;AAAA,EACpC,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,SAAS,oBAAC,mCAAgC,UAAS,KAAI;AAAA,IACvD,QAAQ,oBAAC,UAAO;AAAA,IAChB,SAAS,oBAAC,UAAO;AAAA,EAClB;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
// packages/edit-site/src/components/site-editor-routes/templates.js
|
|
2
2
|
import { loadView } from "@wordpress/views";
|
|
3
3
|
import Editor from "../editor";
|
|
4
4
|
import SidebarNavigationScreenTemplatesBrowse from "../sidebar-navigation-screen-templates-browse";
|
|
5
5
|
import SidebarNavigationScreenUnsupported from "../sidebar-navigation-screen-unsupported";
|
|
6
6
|
import PageTemplates from "../page-templates";
|
|
7
7
|
import { getDefaultView } from "../page-templates/view-utils";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
9
|
async function isTemplateListView(query) {
|
|
9
10
|
const { activeView = "active" } = query;
|
|
10
11
|
const view = await loadView({
|
|
@@ -15,7 +16,7 @@ async function isTemplateListView(query) {
|
|
|
15
16
|
});
|
|
16
17
|
return view.type === "list";
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
+
var templatesRoute = {
|
|
19
20
|
name: "templates",
|
|
20
21
|
path: "/template",
|
|
21
22
|
areas: {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/templates.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { loadView } from '@wordpress/views';\n\n/**\n * Internal dependencies\n */\nimport Editor from '../editor';\nimport SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';\nimport SidebarNavigationScreenUnsupported from '../sidebar-navigation-screen-unsupported';\nimport PageTemplates from '../page-templates';\nimport { getDefaultView } from '../page-templates/view-utils';\n\nasync function isTemplateListView( query ) {\n\tconst { activeView = 'active' } = query;\n\tconst view = await loadView( {\n\t\tkind: 'postType',\n\t\tname: 'wp_template',\n\t\tslug: activeView,\n\t\tdefaultView: getDefaultView( activeView ),\n\t} );\n\treturn view.type === 'list';\n}\n\nexport const templatesRoute = {\n\tname: 'templates',\n\tpath: '/template',\n\tareas: {\n\t\tsidebar( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? (\n\t\t\t\t<SidebarNavigationScreenTemplatesBrowse backPath=\"/\" />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t\tcontent( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? <PageTemplates /> : undefined;\n\t\t},\n\t\tasync preview( { query, siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\tif ( ! isBlockTheme ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tconst isListView = await isTemplateListView( query );\n\t\t\treturn isListView ? <Editor /> : undefined;\n\t\t},\n\t\tmobile( { siteData } ) {\n\t\t\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\t\t\treturn isBlockTheme ? (\n\t\t\t\t<PageTemplates />\n\t\t\t) : (\n\t\t\t\t<SidebarNavigationScreenUnsupported />\n\t\t\t);\n\t\t},\n\t},\n\twidths: {\n\t\tasync content( { query } ) {\n\t\t\tconst isListView = await isTemplateListView( query );\n\t\t\treturn isListView ? 380 : undefined;\n\t\t},\n\t},\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAGA,SAAS,gBAAgB;AAKzB,OAAO,YAAY;AACnB,OAAO,4CAA4C;AACnD,OAAO,wCAAwC;AAC/C,OAAO,mBAAmB;AAC1B,SAAS,sBAAsB;AAoB3B;AAlBJ,eAAe,mBAAoB,OAAQ;AAC1C,QAAM,EAAE,aAAa,SAAS,IAAI;AAClC,QAAM,OAAO,MAAM,SAAU;AAAA,IAC5B,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,aAAa,eAAgB,UAAW;AAAA,EACzC,CAAE;AACF,SAAO,KAAK,SAAS;AACtB;AAEO,IAAM,iBAAiB;AAAA,EAC7B,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,IACN,QAAS,EAAE,SAAS,GAAI;AACvB,YAAM,eAAe,SAAS,cAAc;AAC5C,aAAO,eACN,oBAAC,0CAAuC,UAAS,KAAI,IAErD,oBAAC,sCAAmC;AAAA,IAEtC;AAAA,IACA,QAAS,EAAE,SAAS,GAAI;AACvB,YAAM,eAAe,SAAS,cAAc;AAC5C,aAAO,eAAe,oBAAC,iBAAc,IAAK;AAAA,IAC3C;AAAA,IACA,MAAM,QAAS,EAAE,OAAO,SAAS,GAAI;AACpC,YAAM,eAAe,SAAS,cAAc;AAC5C,UAAK,CAAE,cAAe;AACrB,eAAO;AAAA,MACR;AACA,YAAM,aAAa,MAAM,mBAAoB,KAAM;AACnD,aAAO,aAAa,oBAAC,UAAO,IAAK;AAAA,IAClC;AAAA,IACA,OAAQ,EAAE,SAAS,GAAI;AACtB,YAAM,eAAe,SAAS,cAAc;AAC5C,aAAO,eACN,oBAAC,iBAAc,IAEf,oBAAC,sCAAmC;AAAA,IAEtC;AAAA,EACD;AAAA,EACA,QAAQ;AAAA,IACP,MAAM,QAAS,EAAE,MAAM,GAAI;AAC1B,YAAM,aAAa,MAAM,mBAAoB,KAAM;AACnD,aAAO,aAAa,MAAM;AAAA,IAC3B;AAAA,EACD;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-editor-routes/utils.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * Check if the classic theme supports the stylebook.\n *\n * @param {Object} siteData - The site data provided by the site editor route area resolvers.\n * @return {boolean} True if the stylebook is supported, false otherwise.\n */\nexport function isClassicThemeWithStyleBookSupport( siteData ) {\n\tconst isBlockTheme = siteData.currentTheme?.is_block_theme;\n\tconst supportsEditorStyles =\n\t\tsiteData.currentTheme?.theme_supports[ 'editor-styles' ];\n\t// This is a temp solution until the has_theme_json value is available for the current theme.\n\tconst hasThemeJson = siteData.editorSettings?.supportsLayout;\n\treturn ! isBlockTheme && ( supportsEditorStyles || hasThemeJson );\n}\n"],
|
|
5
|
-
"mappings": "AAMO,SAAS,mCAAoC,UAAW;AAC9D,QAAM,eAAe,SAAS,cAAc;AAC5C,QAAM,uBACL,SAAS,cAAc,eAAgB,eAAgB;AAExD,QAAM,eAAe,SAAS,gBAAgB;AAC9C,SAAO,CAAE,iBAAkB,wBAAwB;AACpD;",
|
|
5
|
+
"mappings": ";AAMO,SAAS,mCAAoC,UAAW;AAC9D,QAAM,eAAe,SAAS,cAAc;AAC5C,QAAM,uBACL,SAAS,cAAc,eAAgB,eAAgB;AAExD,QAAM,eAAe,SAAS,gBAAgB;AAC9C,SAAO,CAAE,iBAAkB,wBAAwB;AACpD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// packages/edit-site/src/components/site-hub/index.js
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { useSelect, useDispatch } from "@wordpress/data";
|
|
4
4
|
import {
|
|
@@ -19,8 +19,9 @@ import { store as editSiteStore } from "../../store";
|
|
|
19
19
|
import SiteIcon from "../site-icon";
|
|
20
20
|
import { unlock } from "../../lock-unlock";
|
|
21
21
|
import { SidebarNavigationContext } from "../sidebar";
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
23
|
+
var { useLocation, useHistory } = unlock(routerPrivateApis);
|
|
24
|
+
var SiteHub = memo(
|
|
24
25
|
forwardRef(({ isTransparent }, ref) => {
|
|
25
26
|
const { dashboardLink, homeUrl, siteTitle } = useSelect((select) => {
|
|
26
27
|
const { getSettings } = unlock(select(editSiteStore));
|
|
@@ -103,7 +104,7 @@ const SiteHub = memo(
|
|
|
103
104
|
})
|
|
104
105
|
);
|
|
105
106
|
var site_hub_default = SiteHub;
|
|
106
|
-
|
|
107
|
+
var SiteHubMobile = memo(
|
|
107
108
|
forwardRef(({ isTransparent }, ref) => {
|
|
108
109
|
const { path } = useLocation();
|
|
109
110
|
const history = useHistory();
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-hub/index.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\t__experimentalHStack as HStack,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { memo, forwardRef, useContext } from '@wordpress/element';\nimport { search } from '@wordpress/icons';\nimport { store as commandsStore } from '@wordpress/commands';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { filterURLForDisplay } from '@wordpress/url';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport SiteIcon from '../site-icon';\nimport { unlock } from '../../lock-unlock';\nimport { SidebarNavigationContext } from '../sidebar';\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nconst SiteHub = memo(\n\tforwardRef( ( { isTransparent }, ref ) => {\n\t\tconst { dashboardLink, homeUrl, siteTitle } = useSelect( ( select ) => {\n\t\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\tconst _site = getEntityRecord( 'root', 'site' );\n\t\t\treturn {\n\t\t\t\tdashboardLink: getSettings().__experimentalDashboardLink,\n\t\t\t\thomeUrl: getEntityRecord( 'root', '__unstableBase' )?.home,\n\t\t\t\tsiteTitle:\n\t\t\t\t\t! _site?.title && !! _site?.url\n\t\t\t\t\t\t? filterURLForDisplay( _site?.url )\n\t\t\t\t\t\t: _site?.title,\n\t\t\t};\n\t\t}, [] );\n\t\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\n\t\treturn (\n\t\t\t<div className=\"edit-site-site-hub\">\n\t\t\t\t<HStack justify=\"flex-start\" spacing=\"0\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'edit-site-site-hub__view-mode-toggle-container',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'has-transparent-background': isTransparent,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\thref={ dashboardLink }\n\t\t\t\t\t\t\tlabel={ __( 'Go to the Dashboard' ) }\n\t\t\t\t\t\t\tclassName=\"edit-site-layout__view-mode-toggle\"\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\ttransform: 'scale(0.5333) translateX(-4px)', // Offset to position the icon 12px from viewport edge\n\t\t\t\t\t\t\t\tborderRadius: 4,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SiteIcon className=\"edit-site-layout__view-mode-toggle-icon\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<HStack>\n\t\t\t\t\t\t<div className=\"edit-site-site-hub__title\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\t\thref={ homeUrl }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ decodeEntities( siteTitle ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\t\tclassName=\"edit-site-site-hub__actions\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\tclassName=\"edit-site-site-hub_toggle-command-center\"\n\t\t\t\t\t\t\t\ticon={ search }\n\t\t\t\t\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t\t\t\t\t\tlabel={ __( 'Open command palette' ) }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</HStack>\n\t\t\t\t</HStack>\n\t\t\t</div>\n\t\t);\n\t} )\n);\n\nexport default SiteHub;\n\nexport const SiteHubMobile = memo(\n\tforwardRef( ( { isTransparent }, ref ) => {\n\t\tconst { path } = useLocation();\n\t\tconst history = useHistory();\n\t\tconst { navigate } = useContext( SidebarNavigationContext );\n\n\t\tconst {\n\t\t\tdashboardLink,\n\t\t\thomeUrl,\n\t\t\tsiteTitle,\n\t\t\tisBlockTheme,\n\t\t\tisClassicThemeWithStyleBookSupport,\n\t\t} = useSelect( ( select ) => {\n\t\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\t\tconst { getEntityRecord, getCurrentTheme } = select( coreStore );\n\t\t\tconst _site = getEntityRecord( 'root', 'site' );\n\t\t\tconst currentTheme = getCurrentTheme();\n\t\t\tconst settings = getSettings();\n\t\t\tconst supportsEditorStyles =\n\t\t\t\tcurrentTheme.theme_supports[ 'editor-styles' ];\n\t\t\t// This is a temp solution until the has_theme_json value is available for the current theme.\n\t\t\tconst hasThemeJson = settings.supportsLayout;\n\n\t\t\treturn {\n\t\t\t\tdashboardLink: settings.__experimentalDashboardLink,\n\t\t\t\thomeUrl: getEntityRecord( 'root', '__unstableBase' )?.home,\n\t\t\t\tsiteTitle:\n\t\t\t\t\t! _site?.title && !! _site?.url\n\t\t\t\t\t\t? filterURLForDisplay( _site?.url )\n\t\t\t\t\t\t: _site?.title,\n\t\t\t\tisBlockTheme: currentTheme?.is_block_theme,\n\t\t\t\tisClassicThemeWithStyleBookSupport:\n\t\t\t\t\t! currentTheme?.is_block_theme &&\n\t\t\t\t\t( supportsEditorStyles || hasThemeJson ),\n\t\t\t};\n\t\t}, [] );\n\t\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\n\t\tlet backPath;\n\n\t\t// If the current path is not the root page, find a page to back to.\n\t\tif ( path !== '/' ) {\n\t\t\tif ( isBlockTheme || isClassicThemeWithStyleBookSupport ) {\n\t\t\t\t// If the current theme is a block theme or a classic theme that supports StyleBook,\n\t\t\t\t// back to the Design screen.\n\t\t\t\tbackPath = '/';\n\t\t\t} else if ( path !== '/pattern' ) {\n\t\t\t\t// If the current theme is a classic theme that does not support StyleBook,\n\t\t\t\t// back to the Patterns page.\n\t\t\t\tbackPath = '/pattern';\n\t\t\t}\n\t\t}\n\n\t\tconst backButtonProps = {\n\t\t\thref: !! backPath ? undefined : dashboardLink,\n\t\t\tlabel: !! backPath\n\t\t\t\t? __( 'Go to Site Editor' )\n\t\t\t\t: __( 'Go to the Dashboard' ),\n\t\t\tonClick: !! backPath\n\t\t\t\t? () => {\n\t\t\t\t\t\thistory.navigate( backPath );\n\t\t\t\t\t\tnavigate( 'back' );\n\t\t\t\t }\n\t\t\t\t: undefined,\n\t\t};\n\n\t\treturn (\n\t\t\t<div className=\"edit-site-site-hub\">\n\t\t\t\t<HStack justify=\"flex-start\" spacing=\"0\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'edit-site-site-hub__view-mode-toggle-container',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'has-transparent-background': isTransparent,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\tclassName=\"edit-site-layout__view-mode-toggle\"\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\ttransform: 'scale(0.5)',\n\t\t\t\t\t\t\t\tborderRadius: 4,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t{ ...backButtonProps }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SiteIcon className=\"edit-site-layout__view-mode-toggle-icon\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<HStack>\n\t\t\t\t\t\t<div className=\"edit-site-site-hub__title\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\t\thref={ homeUrl }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\tlabel={ __( 'View site (opens in a new tab)' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ decodeEntities( siteTitle ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\t\tclassName=\"edit-site-site-hub__actions\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tclassName=\"edit-site-site-hub_toggle-command-center\"\n\t\t\t\t\t\t\t\ticon={ search }\n\t\t\t\t\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t\t\t\t\t\tlabel={ __( 'Open command palette' ) }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut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AAA;AAAA,UACA,WAAY;AAAA,YACX;AAAA,YACA;AAAA,cACC,8BAA8B;AAAA,YAC/B;AAAA,UACD;AAAA,UAEA;AAAA,YAAC;AAAA;AAAA,cACA,uBAAqB;AAAA,cACrB;AAAA,cACA,WAAU;AAAA,cACV,OAAQ;AAAA,gBACP,WAAW;AAAA,gBACX,cAAc;AAAA,cACf;AAAA,cACE,GAAG;AAAA,cAEL,8BAAC,YAAS,WAAU,2CAA0C;AAAA;AAAA,UAC/D;AAAA;AAAA,MACD;AAAA,MAEA,qBAAC,UACA;AAAA,4BAAC,SAAI,WAAU,6BACd;AAAA,UAAC;AAAA;AAAA,YACA,uBAAqB;AAAA,YACrB,SAAQ;AAAA,YACR,MAAO;AAAA,YACP,QAAO;AAAA,YACP,OAAQ,GAAI,gCAAiC;AAAA,YAE3C,yBAAgB,SAAU;AAAA;AAAA,QAC7B,GACD;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACA,SAAU;AAAA,YACV,UAAW;AAAA,YACX,WAAU;AAAA,YAEV;AAAA,cAAC;AAAA;AAAA,gBACA,uBAAqB;AAAA,gBACrB,WAAU;AAAA,gBACV,MAAO;AAAA,gBACP,SAAU,MAAM,kBAAkB;AAAA,gBAClC,OAAQ,GAAI,sBAAuB;AAAA,gBACnC,UAAW,gBAAgB,QAAS,GAAI;AAAA;AAAA,YACzC;AAAA;AAAA,QACD;AAAA,SACD;AAAA,OACD,GACD;AAAA,EAEF,CAAE;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
// packages/edit-site/src/components/site-icon/index.js
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { useSelect } from "@wordpress/data";
|
|
4
4
|
import { Icon } from "@wordpress/components";
|
|
5
5
|
import { __ } from "@wordpress/i18n";
|
|
6
6
|
import { wordpress } from "@wordpress/icons";
|
|
7
7
|
import { store as coreDataStore } from "@wordpress/core-data";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
9
|
function SiteIcon({ className }) {
|
|
9
10
|
const { isRequestingSite, siteIconUrl } = useSelect((select) => {
|
|
10
11
|
const { getEntityRecord } = select(coreDataStore);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/site-icon/index.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { Icon } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { wordpress } from '@wordpress/icons';\nimport { store as coreDataStore } from '@wordpress/core-data';\n\nfunction SiteIcon( { className } ) {\n\tconst { isRequestingSite, siteIconUrl } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord } = select( coreDataStore );\n\t\tconst siteData = getEntityRecord( 'root', '__unstableBase', undefined );\n\n\t\treturn {\n\t\t\tisRequestingSite: ! siteData,\n\t\t\tsiteIconUrl: siteData?.site_icon_url,\n\t\t};\n\t}, [] );\n\n\tif ( isRequestingSite && ! siteIconUrl ) {\n\t\treturn <div className=\"edit-site-site-icon__image\" />;\n\t}\n\n\tconst icon = siteIconUrl ? (\n\t\t<img\n\t\t\tclassName=\"edit-site-site-icon__image\"\n\t\t\talt={ __( 'Site Icon' ) }\n\t\t\tsrc={ siteIconUrl }\n\t\t/>\n\t) : (\n\t\t<Icon\n\t\t\tclassName=\"edit-site-site-icon__icon\"\n\t\t\ticon={ wordpress }\n\t\t\tsize={ 48 }\n\t\t/>\n\t);\n\n\treturn (\n\t\t<div className={ clsx( className, 'edit-site-site-icon' ) }>\n\t\t\t{ icon }\n\t\t</div>\n\t);\n}\n\nexport default SiteIcon;\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AACrB,SAAS,UAAU;AACnB,SAAS,iBAAiB;AAC1B,SAAS,SAAS,qBAAqB;AAc9B;AAZT,SAAS,SAAU,EAAE,UAAU,GAAI;AAClC,QAAM,EAAE,kBAAkB,YAAY,IAAI,UAAW,CAAE,WAAY;AAClE,UAAM,EAAE,gBAAgB,IAAI,OAAQ,aAAc;AAClD,UAAM,WAAW,gBAAiB,QAAQ,kBAAkB,MAAU;AAEtE,WAAO;AAAA,MACN,kBAAkB,CAAE;AAAA,MACpB,aAAa,UAAU;AAAA,IACxB;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,MAAK,oBAAoB,CAAE,aAAc;AACxC,WAAO,oBAAC,SAAI,WAAU,8BAA6B;AAAA,EACpD;AAEA,QAAM,OAAO,cACZ;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,KAAM,GAAI,WAAY;AAAA,MACtB,KAAM;AAAA;AAAA,EACP,IAEA;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,MAAO;AAAA,MACP,MAAO;AAAA;AAAA,EACR;AAGD,SACC,oBAAC,SAAI,WAAY,KAAM,WAAW,qBAAsB,GACrD,gBACH;AAEF;AAEA,IAAO,oBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// packages/edit-site/src/components/welcome-guide/editor.js
|
|
2
2
|
import { useDispatch, useSelect } from "@wordpress/data";
|
|
3
3
|
import { Guide } from "@wordpress/components";
|
|
4
4
|
import { __ } from "@wordpress/i18n";
|
|
@@ -6,6 +6,7 @@ import { createInterpolateElement } from "@wordpress/element";
|
|
|
6
6
|
import { store as preferencesStore } from "@wordpress/preferences";
|
|
7
7
|
import { store as coreStore } from "@wordpress/core-data";
|
|
8
8
|
import WelcomeGuideImage from "./image";
|
|
9
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
function WelcomeGuideEditor() {
|
|
10
11
|
const { toggle } = useDispatch(preferencesStore);
|
|
11
12
|
const { isActive, isBlockBasedTheme } = useSelect((select) => {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/welcome-guide/editor.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport WelcomeGuideImage from './image';\n\nexport default function WelcomeGuideEditor() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst { isActive, isBlockBasedTheme } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tisActive: !! select( preferencesStore ).get(\n\t\t\t\t'core/edit-site',\n\t\t\t\t'welcomeGuide'\n\t\t\t),\n\t\t\tisBlockBasedTheme:\n\t\t\t\tselect( coreStore ).getCurrentTheme()?.is_block_theme,\n\t\t};\n\t}, [] );\n\n\tif ( ! isActive || ! isBlockBasedTheme ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-site-welcome-guide guide-editor\"\n\t\t\tcontentLabel={ __( 'Welcome to the site editor' ) }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-site', 'welcomeGuide' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/edit-your-site.svg?1\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/edit-your-site.gif?1\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Edit your site' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Design everything on your site \u2014 from the header right down to the footer \u2014 using blocks.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'Click <StylesIconImage /> to start designing your blocks, and choose your typography, layout, and colors.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tStylesIconImage: (\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\talt={ __( 'styles' ) }\n\t\t\t\t\t\t\t\t\t\t\t\tsrc=\"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z' fill='%231E1E1E'/%3E%3C/svg%3E%0A\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\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
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAGA,SAAS,aAAa,iBAAiB;AACvC,SAAS,aAAa;AACtB,SAAS,UAAU;AACnB,SAAS,gCAAgC;AACz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3,
|
|
3
3
|
"sources": ["../../../src/components/welcome-guide/image.js"],
|
|
4
4
|
"sourcesContent": ["export default function WelcomeGuideImage( { nonAnimatedSrc, animatedSrc } ) {\n\treturn (\n\t\t<picture className=\"edit-site-welcome-guide__image\">\n\t\t\t<source\n\t\t\t\tsrcSet={ nonAnimatedSrc }\n\t\t\t\tmedia=\"(prefers-reduced-motion: reduce)\"\n\t\t\t/>\n\t\t\t<img src={ animatedSrc } width=\"312\" height=\"240\" alt=\"\" />\n\t\t</picture>\n\t);\n}\n"],
|
|
5
|
-
"mappings": "AAEE,SACC,KADD;AAFa,SAAR,kBAAoC,EAAE,gBAAgB,YAAY,GAAI;AAC5E,SACC,qBAAC,aAAQ,WAAU,kCAClB;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,QAAS;AAAA,QACT,OAAM;AAAA;AAAA,IACP;AAAA,IACA,oBAAC,SAAI,KAAM,aAAc,OAAM,OAAM,QAAO,OAAM,KAAI,IAAG;AAAA,KAC1D;AAEF;",
|
|
5
|
+
"mappings": ";AAEE,SACC,KADD;AAFa,SAAR,kBAAoC,EAAE,gBAAgB,YAAY,GAAI;AAC5E,SACC,qBAAC,aAAQ,WAAU,kCAClB;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,QAAS;AAAA,QACT,OAAM;AAAA;AAAA,IACP;AAAA,IACA,oBAAC,SAAI,KAAM,aAAc,OAAM,OAAM,QAAO,OAAM,KAAI,IAAG;AAAA,KAC1D;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
// packages/edit-site/src/components/welcome-guide/index.js
|
|
2
2
|
import WelcomeGuideEditor from "./editor";
|
|
3
3
|
import WelcomeGuidePage from "./page";
|
|
4
4
|
import WelcomeGuideTemplate from "./template";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
function WelcomeGuide({ postType }) {
|
|
6
7
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7
8
|
/* @__PURE__ */ jsx(WelcomeGuideEditor, {}),
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/welcome-guide/index.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport WelcomeGuideEditor from './editor';\nimport WelcomeGuidePage from './page';\nimport WelcomeGuideTemplate from './template';\n\nexport default function WelcomeGuide( { postType } ) {\n\treturn (\n\t\t<>\n\t\t\t<WelcomeGuideEditor />\n\t\t\t{ postType === 'page' && <WelcomeGuidePage /> }\n\t\t\t{ postType === 'wp_template' && <WelcomeGuideTemplate /> }\n\t\t</>\n\t);\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAGA,OAAO,wBAAwB;AAC/B,OAAO,sBAAsB;AAC7B,OAAO,0BAA0B;AAI/B,mBACC,KADD;AAFa,SAAR,aAA+B,EAAE,SAAS,GAAI;AACpD,SACC,iCACC;AAAA,wBAAC,sBAAmB;AAAA,IAClB,aAAa,UAAU,oBAAC,oBAAiB;AAAA,IACzC,aAAa,iBAAiB,oBAAC,wBAAqB;AAAA,KACvD;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
// packages/edit-site/src/components/welcome-guide/page.js
|
|
2
2
|
import { useDispatch, useSelect } from "@wordpress/data";
|
|
3
3
|
import { Guide } from "@wordpress/components";
|
|
4
4
|
import { __ } from "@wordpress/i18n";
|
|
5
5
|
import { store as preferencesStore } from "@wordpress/preferences";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
function WelcomeGuidePage() {
|
|
7
8
|
const { toggle } = useDispatch(preferencesStore);
|
|
8
9
|
const isVisible = useSelect((select) => {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/welcome-guide/page.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\nexport default function WelcomeGuidePage() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst isPageActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuidePage'\n\t\t);\n\t\tconst isEditorActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuide'\n\t\t);\n\t\treturn isPageActive && ! isEditorActive;\n\t}, [] );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst heading = __( 'Editing a page' );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-site-welcome-guide guide-page\"\n\t\t\tcontentLabel={ heading }\n\t\t\tfinishButtonText={ __( 'Continue' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-site', 'welcomeGuidePage' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<video\n\t\t\t\t\t\t\tclassName=\"edit-site-welcome-guide__video\"\n\t\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\t\tloop\n\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\twidth=\"312\"\n\t\t\t\t\t\t\theight=\"240\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<source\n\t\t\t\t\t\t\t\tsrc=\"https://s.w.org/images/block-editor/editing-your-page.mp4\"\n\t\t\t\t\t\t\t\ttype=\"video/mp4\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</video>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ heading }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t// eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts\n\t\t\t\t\t\t\t\t\t'It\u2019s now possible to edit page content in the site editor. To customise other parts of the page like the header and footer switch to editing the template using the settings sidebar.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\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
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAGA,SAAS,aAAa,iBAAiB;AACvC,SAAS,aAAa;AACtB,SAAS,UAAU;AACnB,SAAS,SAAS,wBAAwB;AAwCnC,SAOD,UAPC,KAOD,YAPC;AAtCQ,SAAR,mBAAoC;AAC1C,QAAM,EAAE,OAAO,IAAI,YAAa,gBAAiB;AAEjD,QAAM,YAAY,UAAW,CAAE,WAAY;AAC1C,UAAM,eAAe,CAAC,CAAE,OAAQ,gBAAiB,EAAE;AAAA,MAClD;AAAA,MACA;AAAA,IACD;AACA,UAAM,iBAAiB,CAAC,CAAE,OAAQ,gBAAiB,EAAE;AAAA,MACpD;AAAA,MACA;AAAA,IACD;AACA,WAAO,gBAAgB,CAAE;AAAA,EAC1B,GAAG,CAAC,CAAE;AAEN,MAAK,CAAE,WAAY;AAClB,WAAO;AAAA,EACR;AAEA,QAAM,UAAU,GAAI,gBAAiB;AAErC,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,cAAe;AAAA,MACf,kBAAmB,GAAI,UAAW;AAAA,MAClC,UAAW,MAAM,OAAQ,kBAAkB,kBAAmB;AAAA,MAC9D,OAAQ;AAAA,QACP;AAAA,UACC,OACC;AAAA,YAAC;AAAA;AAAA,cACA,WAAU;AAAA,cACV,UAAQ;AAAA,cACR,MAAI;AAAA,cACJ,OAAK;AAAA,cACL,OAAM;AAAA,cACN,QAAO;AAAA,cAEP;AAAA,gBAAC;AAAA;AAAA,kBACA,KAAI;AAAA,kBACJ,MAAK;AAAA;AAAA,cACN;AAAA;AAAA,UACD;AAAA,UAED,SACC,iCACC;AAAA,gCAAC,QAAG,WAAU,oCACX,mBACH;AAAA,YACA,oBAAC,OAAE,WAAU,iCACV;AAAA;AAAA,cAED;AAAA,YACD,GACD;AAAA,aACD;AAAA,QAEF;AAAA,MACD;AAAA;AAAA,EACD;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
// packages/edit-site/src/components/welcome-guide/template.js
|
|
2
2
|
import { useDispatch, useSelect } from "@wordpress/data";
|
|
3
3
|
import { Guide } from "@wordpress/components";
|
|
4
4
|
import { __ } from "@wordpress/i18n";
|
|
5
5
|
import { store as preferencesStore } from "@wordpress/preferences";
|
|
6
6
|
import { store as editorStore } from "@wordpress/editor";
|
|
7
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
function WelcomeGuideTemplate() {
|
|
8
9
|
const { toggle } = useDispatch(preferencesStore);
|
|
9
10
|
const { isActive, hasPreviousEntity } = useSelect((select) => {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/welcome-guide/template.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as editorStore } from '@wordpress/editor';\n\nexport default function WelcomeGuideTemplate() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst { isActive, hasPreviousEntity } = useSelect( ( select ) => {\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst { get } = select( preferencesStore );\n\t\treturn {\n\t\t\tisActive: get( 'core/edit-site', 'welcomeGuideTemplate' ),\n\t\t\thasPreviousEntity:\n\t\t\t\t!! getEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t};\n\t}, [] );\n\tconst isVisible = isActive && hasPreviousEntity;\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst heading = __( 'Editing a template' );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-site-welcome-guide guide-template\"\n\t\t\tcontentLabel={ heading }\n\t\t\tfinishButtonText={ __( 'Continue' ) }\n\t\t\tonFinish={ () =>\n\t\t\t\ttoggle( 'core/edit-site', 'welcomeGuideTemplate' )\n\t\t\t}\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<video\n\t\t\t\t\t\t\tclassName=\"edit-site-welcome-guide__video\"\n\t\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\t\tloop\n\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\twidth=\"312\"\n\t\t\t\t\t\t\theight=\"240\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<source\n\t\t\t\t\t\t\t\tsrc=\"https://s.w.org/images/block-editor/editing-your-template.mp4\"\n\t\t\t\t\t\t\t\ttype=\"video/mp4\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</video>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ heading }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Note that the same template can be used by multiple pages, so any changes made here may affect other pages on the site. To switch back to editing the page content click the \u2018Back\u2019 button in the toolbar.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\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ACD;AAAA,YACD,GACD;AAAA,aACD;AAAA,QAEF;AAAA,MACD;AAAA;AAAA,EACD;AAEF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// packages/edit-site/src/deprecated.js
|
|
2
2
|
import {
|
|
3
3
|
PluginMoreMenuItem as EditorPluginMoreMenuItem,
|
|
4
4
|
PluginSidebar as EditorPluginSidebar,
|
|
@@ -6,10 +6,11 @@ import {
|
|
|
6
6
|
} from "@wordpress/editor";
|
|
7
7
|
import { getPath } from "@wordpress/url";
|
|
8
8
|
import deprecated from "@wordpress/deprecated";
|
|
9
|
-
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var isSiteEditor = getPath(window.location.href)?.includes(
|
|
10
11
|
"site-editor.php"
|
|
11
12
|
);
|
|
12
|
-
|
|
13
|
+
var deprecateSlot = (name) => {
|
|
13
14
|
deprecated(`wp.editPost.${name}`, {
|
|
14
15
|
since: "6.6",
|
|
15
16
|
alternative: `wp.editor.${name}`
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/deprecated.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tPluginMoreMenuItem as EditorPluginMoreMenuItem,\n\tPluginSidebar as EditorPluginSidebar,\n\tPluginSidebarMoreMenuItem as EditorPluginSidebarMoreMenuItem,\n} from '@wordpress/editor';\nimport { getPath } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\nconst isSiteEditor = getPath( window.location.href )?.includes(\n\t'site-editor.php'\n);\n\nconst deprecateSlot = ( name ) => {\n\tdeprecated( `wp.editPost.${ name }`, {\n\t\tsince: '6.6',\n\t\talternative: `wp.editor.${ name }`,\n\t} );\n};\n\n/* eslint-disable jsdoc/require-param */\n/**\n * @see PluginMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginMoreMenuItem( props ) {\n\tif ( ! isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginMoreMenuItem' );\n\treturn <EditorPluginMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginSidebar in @wordpress/editor package.\n */\nexport function PluginSidebar( props ) {\n\tif ( ! isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginSidebar' );\n\treturn <EditorPluginSidebar { ...props } />;\n}\n\n/**\n * @see PluginSidebarMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginSidebarMoreMenuItem( props ) {\n\tif ( ! isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginSidebarMoreMenuItem' );\n\treturn <EditorPluginSidebarMoreMenuItem { ...props } />;\n}\n/* eslint-enable jsdoc/require-param */\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAGA;AAAA,EACC,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,6BAA6B;AAAA,OACvB;AACP,SAAS,eAAe;AACxB,OAAO,gBAAgB;AAsBf;AApBR,IAAM,eAAe,QAAS,OAAO,SAAS,IAAK,GAAG;AAAA,EACrD;AACD;AAEA,IAAM,gBAAgB,CAAE,SAAU;AACjC,aAAY,eAAgB,IAAK,IAAI;AAAA,IACpC,OAAO;AAAA,IACP,aAAa,aAAc,IAAK;AAAA,EACjC,CAAE;AACH;AAMO,SAAS,mBAAoB,OAAQ;AAC3C,MAAK,CAAE,cAAe;AACrB,WAAO;AAAA,EACR;AACA,gBAAe,oBAAqB;AACpC,SAAO,oBAAC,4BAA2B,GAAG,OAAQ;AAC/C;AAKO,SAAS,cAAe,OAAQ;AACtC,MAAK,CAAE,cAAe;AACrB,WAAO;AAAA,EACR;AACA,gBAAe,eAAgB;AAC/B,SAAO,oBAAC,uBAAsB,GAAG,OAAQ;AAC1C;AAKO,SAAS,0BAA2B,OAAQ;AAClD,MAAK,CAAE,cAAe;AACrB,WAAO;AAAA,EACR;AACA,gBAAe,2BAA4B;AAC3C,SAAO,oBAAC,mCAAkC,GAAG,OAAQ;AACtD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// packages/edit-site/src/hooks/commands/use-common-commands.js
|
|
1
2
|
import { useMemo } from "@wordpress/element";
|
|
2
3
|
import { useDispatch, useSelect } from "@wordpress/data";
|
|
3
4
|
import { __, isRTL } from "@wordpress/i18n";
|
|
@@ -12,9 +13,9 @@ import {
|
|
|
12
13
|
} from "@wordpress/editor";
|
|
13
14
|
import { unlock } from "../../lock-unlock";
|
|
14
15
|
import { store as editSiteStore } from "../../store";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
var { useHistory, useLocation } = unlock(routerPrivateApis);
|
|
17
|
+
var { useGlobalStyles } = unlock(editorPrivateApis);
|
|
18
|
+
var getGlobalStylesToggleWelcomeGuideCommands = () => function useGlobalStylesToggleWelcomeGuideCommands() {
|
|
18
19
|
const { openGeneralSidebar } = unlock(useDispatch(editSiteStore));
|
|
19
20
|
const { params } = useLocation();
|
|
20
21
|
const { canvas = "view" } = params;
|
|
@@ -53,7 +54,7 @@ const getGlobalStylesToggleWelcomeGuideCommands = () => function useGlobalStyles
|
|
|
53
54
|
commands
|
|
54
55
|
};
|
|
55
56
|
};
|
|
56
|
-
|
|
57
|
+
var getGlobalStylesResetCommands = () => function useGlobalStylesResetCommands() {
|
|
57
58
|
const { user, setUser } = useGlobalStyles();
|
|
58
59
|
const canReset = !!user && (Object.keys(user?.styles ?? {}).length > 0 || Object.keys(user?.settings ?? {}).length > 0);
|
|
59
60
|
const commands = useMemo(() => {
|
|
@@ -77,7 +78,7 @@ const getGlobalStylesResetCommands = () => function useGlobalStylesResetCommands
|
|
|
77
78
|
commands
|
|
78
79
|
};
|
|
79
80
|
};
|
|
80
|
-
|
|
81
|
+
var getGlobalStylesOpenRevisionsCommands = () => function useGlobalStylesOpenRevisionsCommands() {
|
|
81
82
|
const { openGeneralSidebar } = unlock(useDispatch(editSiteStore));
|
|
82
83
|
const { setStylesPath } = unlock(useDispatch(editorStore));
|
|
83
84
|
const { params } = useLocation();
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/commands/use-common-commands.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { rotateLeft, rotateRight, help, backup } from '@wordpress/icons';\nimport { useCommandLoader } from '@wordpress/commands';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst { useHistory, useLocation } = unlock( routerPrivateApis );\nconst { useGlobalStyles } = unlock( editorPrivateApis );\n\nconst getGlobalStylesToggleWelcomeGuideCommands = () =>\n\tfunction useGlobalStylesToggleWelcomeGuideCommands() {\n\t\tconst { openGeneralSidebar } = unlock( useDispatch( editSiteStore ) );\n\t\tconst { params } = useLocation();\n\t\tconst { canvas = 'view' } = params;\n\t\tconst { set } = useDispatch( preferencesStore );\n\n\t\tconst history = useHistory();\n\t\tconst isBlockBasedTheme = useSelect( ( select ) => {\n\t\t\treturn select( coreStore ).getCurrentTheme().is_block_theme;\n\t\t}, [] );\n\n\t\tconst commands = useMemo( () => {\n\t\t\tif ( ! isBlockBasedTheme ) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tname: 'core/edit-site/toggle-styles-welcome-guide',\n\t\t\t\t\tlabel: __( 'Learn about styles' ),\n\t\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\t\tclose();\n\t\t\t\t\t\tif ( canvas !== 'edit' ) {\n\t\t\t\t\t\t\thistory.navigate( '/styles?canvas=edit', {\n\t\t\t\t\t\t\t\ttransition: 'canvas-mode-edit-transition',\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t\t\tset( 'core/edit-site', 'welcomeGuideStyles', true );\n\t\t\t\t\t\t// sometimes there's a focus loss that happens after some time\n\t\t\t\t\t\t// that closes the modal, we need to force reopening it.\n\t\t\t\t\t\tsetTimeout( () => {\n\t\t\t\t\t\t\tset( 'core/edit-site', 'welcomeGuideStyles', true );\n\t\t\t\t\t\t}, 500 );\n\t\t\t\t\t},\n\t\t\t\t\ticon: help,\n\t\t\t\t},\n\t\t\t];\n\t\t}, [ history, openGeneralSidebar, canvas, isBlockBasedTheme, set ] );\n\n\t\treturn {\n\t\t\tisLoading: false,\n\t\t\tcommands,\n\t\t};\n\t};\n\nconst getGlobalStylesResetCommands = () =>\n\tfunction useGlobalStylesResetCommands() {\n\t\tconst { user, setUser } = useGlobalStyles();\n\n\t\t// Check if there are user customizations that can be reset\n\t\tconst canReset =\n\t\t\t!! user &&\n\t\t\t( Object.keys( user?.styles ?? {} ).length > 0 ||\n\t\t\t\tObject.keys( user?.settings ?? {} ).length > 0 );\n\n\t\tconst commands = useMemo( () => {\n\t\t\tif ( ! canReset ) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tname: 'core/edit-site/reset-global-styles',\n\t\t\t\t\tlabel: __( 'Reset styles' ),\n\t\t\t\t\ticon: isRTL() ? rotateRight : rotateLeft,\n\t\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\t\tclose();\n\t\t\t\t\t\tsetUser( { styles: {}, settings: {} } );\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t];\n\t\t}, [ canReset, setUser ] );\n\n\t\treturn {\n\t\t\tisLoading: false,\n\t\t\tcommands,\n\t\t};\n\t};\n\nconst getGlobalStylesOpenRevisionsCommands = () =>\n\tfunction useGlobalStylesOpenRevisionsCommands() {\n\t\tconst { openGeneralSidebar } = unlock( useDispatch( editSiteStore ) );\n\t\tconst { setStylesPath } = unlock( useDispatch( editorStore ) );\n\t\tconst { params } = useLocation();\n\t\tconst { canvas = 'view' } = params;\n\t\tconst history = useHistory();\n\t\tconst hasRevisions = useSelect( ( select ) => {\n\t\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\t\tconst globalStyles = globalStylesId\n\t\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t\t: undefined;\n\n\t\t\treturn !! globalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count;\n\t\t}, [] );\n\n\t\tconst commands = useMemo( () => {\n\t\t\tif ( ! hasRevisions ) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tname: 'core/edit-site/open-styles-revisions',\n\t\t\t\t\tlabel: __( 'Open style revisions' ),\n\t\t\t\t\ticon: backup,\n\t\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\t\tclose();\n\t\t\t\t\t\tif ( canvas !== 'edit' ) {\n\t\t\t\t\t\t\thistory.navigate( '/styles?canvas=edit', {\n\t\t\t\t\t\t\t\ttransition: 'canvas-mode-edit-transition',\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t\t\tsetStylesPath( '/revisions' );\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t];\n\t\t}, [\n\t\t\thistory,\n\t\t\topenGeneralSidebar,\n\t\t\tsetStylesPath,\n\t\t\thasRevisions,\n\t\t\tcanvas,\n\t\t] );\n\n\t\treturn {\n\t\t\tisLoading: false,\n\t\t\tcommands,\n\t\t};\n\t};\n\nexport function useCommonCommands() {\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/toggle-styles-welcome-guide',\n\t\thook: getGlobalStylesToggleWelcomeGuideCommands(),\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/reset-global-styles',\n\t\thook: getGlobalStylesResetCommands(),\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/open-styles-revisions',\n\t\thook: getGlobalStylesOpenRevisionsCommands(),\n\t} );\n}\n"],
|
|
5
|
-
"mappings": "AAGA,SAAS,eAAe;AACxB,SAAS,aAAa,iBAAiB;AACvC,SAAS,IAAI,aAAa;AAC1B,SAAS,YAAY,aAAa,MAAM,cAAc;AACtD,SAAS,wBAAwB;AACjC,SAAS,eAAe,yBAAyB;AACjD,SAAS,SAAS,wBAAwB;AAC1C,SAAS,SAAS,iBAAiB;AACnC;AAAA,EACC,SAAS;AAAA,EACT,eAAe;AAAA,OACT;AAKP,SAAS,cAAc;AACvB,SAAS,SAAS,qBAAqB;AAEvC,
|
|
5
|
+
"mappings": ";AAGA,SAAS,eAAe;AACxB,SAAS,aAAa,iBAAiB;AACvC,SAAS,IAAI,aAAa;AAC1B,SAAS,YAAY,aAAa,MAAM,cAAc;AACtD,SAAS,wBAAwB;AACjC,SAAS,eAAe,yBAAyB;AACjD,SAAS,SAAS,wBAAwB;AAC1C,SAAS,SAAS,iBAAiB;AACnC;AAAA,EACC,SAAS;AAAA,EACT,eAAe;AAAA,OACT;AAKP,SAAS,cAAc;AACvB,SAAS,SAAS,qBAAqB;AAEvC,IAAM,EAAE,YAAY,YAAY,IAAI,OAAQ,iBAAkB;AAC9D,IAAM,EAAE,gBAAgB,IAAI,OAAQ,iBAAkB;AAEtD,IAAM,4CAA4C,MACjD,SAAS,4CAA4C;AACpD,QAAM,EAAE,mBAAmB,IAAI,OAAQ,YAAa,aAAc,CAAE;AACpE,QAAM,EAAE,OAAO,IAAI,YAAY;AA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;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,CAAE;AAEF,SAAO;AAAA,IACN,WAAW;AAAA,IACX;AAAA,EACD;AACD;AAEM,SAAS,oBAAoB;AACnC,mBAAkB;AAAA,IACjB,MAAM;AAAA,IACN,MAAM,0CAA0C;AAAA,EACjD,CAAE;AAEF,mBAAkB;AAAA,IACjB,MAAM;AAAA,IACN,MAAM,6BAA6B;AAAA,EACpC,CAAE;AAEF,mBAAkB;AAAA,IACjB,MAAM;AAAA,IACN,MAAM,qCAAqC;AAAA,EAC5C,CAAE;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
// packages/edit-site/src/hooks/commands/use-set-command-context.js
|
|
1
2
|
import { useSelect } from "@wordpress/data";
|
|
2
3
|
import { privateApis as commandsPrivateApis } from "@wordpress/commands";
|
|
3
4
|
import { store as blockEditorStore } from "@wordpress/block-editor";
|
|
4
5
|
import { privateApis as routerPrivateApis } from "@wordpress/router";
|
|
5
6
|
import { unlock } from "../../lock-unlock";
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
var { useCommandContext } = unlock(commandsPrivateApis);
|
|
8
|
+
var { useLocation } = unlock(routerPrivateApis);
|
|
8
9
|
function useSetCommandContext() {
|
|
9
10
|
const { query = {} } = useLocation();
|
|
10
11
|
const { canvas = "view" } = query;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/hooks/commands/use-set-command-context.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { privateApis as commandsPrivateApis } from '@wordpress/commands';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useCommandContext } = unlock( commandsPrivateApis );\nconst { useLocation } = unlock( routerPrivateApis );\n\n/**\n * React hook used to set the correct command context based on the current state.\n */\nexport default function useSetCommandContext() {\n\tconst { query = {} } = useLocation();\n\tconst { canvas = 'view' } = query;\n\tconst hasBlockSelected = useSelect( ( select ) => {\n\t\treturn select( blockEditorStore ).getBlockSelectionStart();\n\t}, [] );\n\n\t// Sets the right context for the command palette\n\tlet commandContext = 'site-editor';\n\tif ( canvas === 'edit' ) {\n\t\tcommandContext = 'entity-edit';\n\t}\n\tif ( hasBlockSelected ) {\n\t\tcommandContext = 'block-selection-edit';\n\t}\n\tuseCommandContext( commandContext );\n}\n"],
|
|
5
|
-
"mappings": "AAGA,SAAS,iBAAiB;AAC1B,SAAS,eAAe,2BAA2B;AACnD,SAAS,SAAS,wBAAwB;AAC1C,SAAS,eAAe,yBAAyB;AAKjD,SAAS,cAAc;AAEvB,
|
|
5
|
+
"mappings": ";AAGA,SAAS,iBAAiB;AAC1B,SAAS,eAAe,2BAA2B;AACnD,SAAS,SAAS,wBAAwB;AAC1C,SAAS,eAAe,yBAAyB;AAKjD,SAAS,cAAc;AAEvB,IAAM,EAAE,kBAAkB,IAAI,OAAQ,mBAAoB;AAC1D,IAAM,EAAE,YAAY,IAAI,OAAQ,iBAAkB;AAKnC,SAAR,uBAAwC;AAC9C,QAAM,EAAE,QAAQ,CAAC,EAAE,IAAI,YAAY;AACnC,QAAM,EAAE,SAAS,OAAO,IAAI;AAC5B,QAAM,mBAAmB,UAAW,CAAE,WAAY;AACjD,WAAO,OAAQ,gBAAiB,EAAE,uBAAuB;AAAA,EAC1D,GAAG,CAAC,CAAE;AAGN,MAAI,iBAAiB;AACrB,MAAK,WAAW,QAAS;AACxB,qBAAiB;AAAA,EAClB;AACA,MAAK,kBAAmB;AACvB,qBAAiB;AAAA,EAClB;AACA,oBAAmB,cAAe;AACnC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build-module/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// packages/edit-site/src/index.js
|
|
2
2
|
import { store as blocksStore } from "@wordpress/blocks";
|
|
3
3
|
import {
|
|
4
4
|
registerCoreBlocks,
|
|
@@ -17,7 +17,12 @@ import {
|
|
|
17
17
|
import { store as editSiteStore } from "./store";
|
|
18
18
|
import { unlock } from "./lock-unlock";
|
|
19
19
|
import App from "./components/app";
|
|
20
|
-
|
|
20
|
+
import { default as default2 } from "./components/plugin-template-setting-panel";
|
|
21
|
+
import { store } from "./store";
|
|
22
|
+
export * from "./deprecated";
|
|
23
|
+
import { initializePostsDashboard } from "./posts";
|
|
24
|
+
import { jsx } from "react/jsx-runtime";
|
|
25
|
+
var { registerCoreBlockBindingsSources } = unlock(editorPrivateApis);
|
|
21
26
|
function initializeEditor(id, settings) {
|
|
22
27
|
const target = document.getElementById(id);
|
|
23
28
|
const root = createRoot(target);
|
|
@@ -75,10 +80,6 @@ function reinitializeEditor() {
|
|
|
75
80
|
version: "6.3"
|
|
76
81
|
});
|
|
77
82
|
}
|
|
78
|
-
import { default as default2 } from "./components/plugin-template-setting-panel";
|
|
79
|
-
import { store } from "./store";
|
|
80
|
-
export * from "./deprecated";
|
|
81
|
-
import { initializePostsDashboard } from "./posts";
|
|
82
83
|
export {
|
|
83
84
|
default2 as PluginTemplateSettingPanel,
|
|
84
85
|
initializeEditor,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from './store';\nimport { unlock } from './lock-unlock';\nimport App from './components/app';\n\nconst { registerCoreBlockBindingsSources } = unlock( editorPrivateApis );\n\n/**\n * Initializes the site editor screen.\n *\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializeEditor( id, settings ) {\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tregisterCoreBlockBindingsSources();\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\teditorTool: 'edit',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t} );\n\n\tif ( window.__experimentalMediaProcessing ) {\n\t\tdispatch( preferencesStore ).setDefaults( 'core/media', {\n\t\t\trequireApproval: true,\n\t\t\toptimizeOnUpload: true,\n\t\t} );\n\t}\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<App />\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editSite.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as PluginTemplateSettingPanel } from './components/plugin-template-setting-panel';\nexport { store } from './store';\nexport * from './deprecated';\n\n// Temporary: While the posts dashboard is being iterated on\n// it's being built in the same package as the site editor.\nexport { initializePostsDashboard } from './posts';\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAGA,SAAS,SAAS,mBAAmB;AACrC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,gBAAgB;AACzB,OAAO,gBAAgB;AACvB,SAAS,YAAY,kBAAkB;AACvC,SAAS,eAAe,yBAAyB;AACjD,SAAS,SAAS,wBAAwB;AAC1C;AAAA,EACC;AAAA,EACA;AAAA,OACM;AAKP,SAAS,SAAS,qBAAqB;AACvC,SAAS,cAAc;AACvB,OAAO,SAAS;AAkFhB,SAAoB,WAAXA,gBAA6C;AACtD,SAAS,aAAa;AACtB,cAAc;AAId,SAAS,gCAAgC;AApBtC;AAlEH,IAAM,EAAE,iCAAiC,IAAI,OAAQ,iBAAkB;AAQhE,SAAS,iBAAkB,IAAI,UAAW;AAChD,QAAM,SAAS,SAAS,eAAgB,EAAG;AAC3C,QAAM,OAAO,WAAY,MAAO;AAEhC,WAAU,WAAY,EAAE,wBAAwB;AAChD,QAAM,aAAa,4BAA4B,EAAE;AAAA,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6
6
|
"names": ["default"]
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
// packages/edit-site/src/lock-unlock.js
|
|
1
2
|
import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from "@wordpress/private-apis";
|
|
2
|
-
|
|
3
|
+
var { lock, unlock } = __dangerousOptInToUnstableAPIsOnlyForCoreModules(
|
|
3
4
|
"I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
|
|
4
5
|
"@wordpress/edit-site"
|
|
5
6
|
);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/lock-unlock.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/edit-site'\n\t);\n"],
|
|
5
|
-
"mappings": "AAGA,SAAS,wDAAwD;AAE1D,
|
|
5
|
+
"mappings": ";AAGA,SAAS,wDAAwD;AAE1D,IAAM,EAAE,MAAM,OAAO,IAC3B;AAAA,EACC;AAAA,EACA;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build-module/posts.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// packages/edit-site/src/posts.js
|
|
2
2
|
import { store as blocksStore } from "@wordpress/blocks";
|
|
3
3
|
import {
|
|
4
4
|
registerCoreBlocks,
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
} from "@wordpress/widgets";
|
|
15
15
|
import { store as editSiteStore } from "./store";
|
|
16
16
|
import PostsApp from "./components/posts-app";
|
|
17
|
+
import { jsx } from "react/jsx-runtime";
|
|
17
18
|
function initializePostsDashboard(id, settings) {
|
|
18
19
|
if (!globalThis.IS_GUTENBERG_PLUGIN) {
|
|
19
20
|
return;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/posts.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from './store';\n\n/**\n * Internal dependencies\n */\nimport PostsApp from './components/posts-app';\n\n/**\n * Initializes the \"Posts Dashboard\"\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializePostsDashboard( id, settings ) {\n\tif ( ! globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\treturn;\n\t}\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\teditorTool: 'edit',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t} );\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<PostsApp />\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";AAGA,SAAS,SAAS,mBAAmB;AACrC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,gBAAgB;AACzB,SAAS,YAAY,kBAAkB;AACvC,SAAS,SAAS,wBAAwB;AAC1C;AAAA,EACC;AAAA,EACA;AAAA,OACM;AAKP,SAAS,SAAS,qBAAqB;AAKvC,OAAO,cAAc;AA4DlB;AArDI,SAAS,yBAA0B,IAAI,UAAW;AACxD,MAAK,CAAE,WAAW,qBAAsB;AACvC;AAAA,EACD;AACA,QAAM,SAAS,SAAS,eAAgB,EAAG;AAC3C,QAAM,OAAO,WAAY,MAAO;AAEhC,WAAU,WAAY,EAAE,wBAAwB;AAChD,QAAM,aAAa,4BAA4B,EAAE;AAAA,IAChD,CAAE,EAAE,KAAK,MAAO,SAAS;AAAA,EAC1B;AACA,qBAAoB,UAAW;AAC/B,WAAU,WAAY,EAAE,6BAA8B,WAAY;AAClE,4BAA2B,EAA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