@wordpress/edit-site 6.34.0 → 6.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- 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 +17 -24
- package/build/components/editor/index.js.map +2 -2
- 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 +10 -8
- package/build/components/page-patterns/index.js.map +2 -2
- 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/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 -5
- package/build/index.js.map +2 -2
- package/build/lock-unlock.js +3 -1
- package/build/lock-unlock.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 +16 -24
- package/build-module/components/editor/index.js.map +2 -2
- 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 +9 -8
- package/build-module/components/page-patterns/index.js.map +2 -2
- 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/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 +6 -7
- package/build-module/index.js.map +2 -2
- package/build-module/lock-unlock.js +2 -1
- package/build-module/lock-unlock.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/build-style/style-rtl.css +41 -40
- package/build-style/style.css +41 -40
- package/package.json +46 -46
- package/src/components/editor/index.js +11 -27
- package/src/components/page-patterns/index.js +1 -1
- 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/index.js +0 -4
- package/src/utils/is-template-revertable.js +1 -2
- package/build/components/posts-app/index.js +0 -49
- package/build/components/posts-app/index.js.map +0 -7
- package/build/components/posts-app-routes/index.js +0 -44
- package/build/components/posts-app-routes/index.js.map +0 -7
- package/build/components/posts-app-routes/post-item.js +0 -59
- package/build/components/posts-app-routes/post-item.js.map +0 -7
- package/build/components/posts-app-routes/posts.js +0 -104
- package/build/components/posts-app-routes/posts.js.map +0 -7
- package/build/posts.js +0 -94
- package/build/posts.js.map +0 -7
- package/build-module/components/posts-app/index.js +0 -19
- package/build-module/components/posts-app/index.js.map +0 -7
- package/build-module/components/posts-app-routes/index.js +0 -20
- package/build-module/components/posts-app-routes/index.js.map +0 -7
- package/build-module/components/posts-app-routes/post-item.js +0 -25
- package/build-module/components/posts-app-routes/post-item.js.map +0 -7
- package/build-module/components/posts-app-routes/posts.js +0 -70
- package/build-module/components/posts-app-routes/posts.js.map +0 -7
- package/build-module/posts.js +0 -67
- package/build-module/posts.js.map +0 -7
- package/build-style/posts-rtl.css +0 -3105
- package/build-style/posts.css +0 -3105
- package/src/components/posts-app/index.js +0 -27
- package/src/components/posts-app-routes/index.js +0 -25
- package/src/components/posts-app-routes/post-item.js +0 -27
- package/src/components/posts-app-routes/posts.js +0 -79
- package/src/posts.js +0 -91
- package/src/posts.scss +0 -57
|
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/edit-site/src/hooks/commands/use-common-commands.js
|
|
19
21
|
var use_common_commands_exports = {};
|
|
20
22
|
__export(use_common_commands_exports, {
|
|
21
23
|
useCommonCommands: () => useCommonCommands
|
|
@@ -32,9 +34,9 @@ var import_core_data = require("@wordpress/core-data");
|
|
|
32
34
|
var import_editor = require("@wordpress/editor");
|
|
33
35
|
var import_lock_unlock = require("../../lock-unlock");
|
|
34
36
|
var import_store = require("../../store");
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
var { useHistory, useLocation } = (0, import_lock_unlock.unlock)(import_router.privateApis);
|
|
38
|
+
var { useGlobalStyles } = (0, import_lock_unlock.unlock)(import_editor.privateApis);
|
|
39
|
+
var getGlobalStylesToggleWelcomeGuideCommands = () => function useGlobalStylesToggleWelcomeGuideCommands() {
|
|
38
40
|
const { openGeneralSidebar } = (0, import_lock_unlock.unlock)((0, import_data.useDispatch)(import_store.store));
|
|
39
41
|
const { params } = useLocation();
|
|
40
42
|
const { canvas = "view" } = params;
|
|
@@ -73,7 +75,7 @@ const getGlobalStylesToggleWelcomeGuideCommands = () => function useGlobalStyles
|
|
|
73
75
|
commands
|
|
74
76
|
};
|
|
75
77
|
};
|
|
76
|
-
|
|
78
|
+
var getGlobalStylesResetCommands = () => function useGlobalStylesResetCommands() {
|
|
77
79
|
const { user, setUser } = useGlobalStyles();
|
|
78
80
|
const canReset = !!user && (Object.keys(user?.styles ?? {}).length > 0 || Object.keys(user?.settings ?? {}).length > 0);
|
|
79
81
|
const commands = (0, import_element.useMemo)(() => {
|
|
@@ -97,7 +99,7 @@ const getGlobalStylesResetCommands = () => function useGlobalStylesResetCommands
|
|
|
97
99
|
commands
|
|
98
100
|
};
|
|
99
101
|
};
|
|
100
|
-
|
|
102
|
+
var getGlobalStylesOpenRevisionsCommands = () => function useGlobalStylesOpenRevisionsCommands() {
|
|
101
103
|
const { openGeneralSidebar } = (0, import_lock_unlock.unlock)((0, import_data.useDispatch)(import_store.store));
|
|
102
104
|
const { setStylesPath } = (0, import_lock_unlock.unlock)((0, import_data.useDispatch)(import_editor.store));
|
|
103
105
|
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": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAwB;AACxB,kBAAuC;AACvC,kBAA0B;AAC1B,mBAAsD;AACtD,sBAAiC;AACjC,oBAAiD;AACjD,yBAA0C;AAC1C,uB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cAAe;AACrB,aAAO,CAAC;AAAA,IACT;AAEA,WAAO;AAAA,MACN;AAAA,QACC,MAAM;AAAA,QACN,WAAO,gBAAI,sBAAuB;AAAA,QAClC,MAAM;AAAA,QACN,UAAU,CAAE,EAAE,MAAM,MAAO;AAC1B,gBAAM;AACN,cAAK,WAAW,QAAS;AACxB,oBAAQ,SAAU,uBAAuB;AAAA,cACxC,YAAY;AAAA,YACb,CAAE;AAAA,UACH;AACA,6BAAoB,yBAA0B;AAC9C,wBAAe,YAAa;AAAA,QAC7B;AAAA,MACD;AAAA,IACD;AAAA,EACD,GAAG;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,wCAAkB;AAAA,IACjB,MAAM;AAAA,IACN,MAAM,0CAA0C;AAAA,EACjD,CAAE;AAEF,wCAAkB;AAAA,IACjB,MAAM;AAAA,IACN,MAAM,6BAA6B;AAAA,EACpC,CAAE;AAEF,wCAAkB;AAAA,IACjB,MAAM;AAAA,IACN,MAAM,qCAAqC;AAAA,EAC5C,CAAE;AACH;",
|
|
6
6
|
"names": ["routerPrivateApis", "editorPrivateApis", "editSiteStore", "preferencesStore", "coreStore", "editorStore"]
|
|
7
7
|
}
|
|
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/edit-site/src/hooks/commands/use-set-command-context.js
|
|
19
21
|
var use_set_command_context_exports = {};
|
|
20
22
|
__export(use_set_command_context_exports, {
|
|
21
23
|
default: () => useSetCommandContext
|
|
@@ -26,8 +28,8 @@ var import_commands = require("@wordpress/commands");
|
|
|
26
28
|
var import_block_editor = require("@wordpress/block-editor");
|
|
27
29
|
var import_router = require("@wordpress/router");
|
|
28
30
|
var import_lock_unlock = require("../../lock-unlock");
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
var { useCommandContext } = (0, import_lock_unlock.unlock)(import_commands.privateApis);
|
|
32
|
+
var { useLocation } = (0, import_lock_unlock.unlock)(import_router.privateApis);
|
|
31
33
|
function useSetCommandContext() {
|
|
32
34
|
const { query = {} } = useLocation();
|
|
33
35
|
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": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAA0B;AAC1B,sBAAmD;AACnD,0BAA0C;AAC1C,oBAAiD;AAKjD,yBAAuB;AAEvB,IAAM,EAAE,kBAAkB,QAAI,2BAAQ,gBAAAA,WAAoB;AAC1D,IAAM,EAAE,YAAY,QAAI,2BAAQ,cAAAC,WAAkB;AAKnC,SAAR,uBAAwC;AAC9C,QAAM,EAAE,QAAQ,CAAC,EAAE,IAAI,YAAY;AACnC,QAAM,EAAE,SAAS,OAAO,IAAI;AAC5B,QAAM,uBAAmB,uBAAW,CAAE,WAAY;AACjD,WAAO,OAAQ,oBAAAC,KAAiB,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": ["commandsPrivateApis", "routerPrivateApis", "blockEditorStore"]
|
|
7
7
|
}
|
package/build/index.js
CHANGED
|
@@ -27,16 +27,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
mod
|
|
28
28
|
));
|
|
29
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
|
|
31
|
+
// packages/edit-site/src/index.js
|
|
30
32
|
var index_exports = {};
|
|
31
33
|
__export(index_exports, {
|
|
32
34
|
PluginTemplateSettingPanel: () => import_plugin_template_setting_panel.default,
|
|
33
35
|
initializeEditor: () => initializeEditor,
|
|
34
|
-
initializePostsDashboard: () => import_posts.initializePostsDashboard,
|
|
35
36
|
reinitializeEditor: () => reinitializeEditor,
|
|
36
37
|
store: () => import_store2.store
|
|
37
38
|
});
|
|
38
39
|
module.exports = __toCommonJS(index_exports);
|
|
39
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
40
|
var import_blocks = require("@wordpress/blocks");
|
|
41
41
|
var import_block_library = require("@wordpress/block-library");
|
|
42
42
|
var import_data = require("@wordpress/data");
|
|
@@ -51,8 +51,8 @@ var import_app = __toESM(require("./components/app"));
|
|
|
51
51
|
var import_plugin_template_setting_panel = __toESM(require("./components/plugin-template-setting-panel"));
|
|
52
52
|
var import_store2 = require("./store");
|
|
53
53
|
__reExport(index_exports, require("./deprecated"), module.exports);
|
|
54
|
-
var
|
|
55
|
-
|
|
54
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
55
|
+
var { registerCoreBlockBindingsSources } = (0, import_lock_unlock.unlock)(import_editor.privateApis);
|
|
56
56
|
function initializeEditor(id, settings) {
|
|
57
57
|
const target = document.getElementById(id);
|
|
58
58
|
const root = (0, import_element.createRoot)(target);
|
|
@@ -114,7 +114,6 @@ function reinitializeEditor() {
|
|
|
114
114
|
0 && (module.exports = {
|
|
115
115
|
PluginTemplateSettingPanel,
|
|
116
116
|
initializeEditor,
|
|
117
|
-
initializePostsDashboard,
|
|
118
117
|
reinitializeEditor,
|
|
119
118
|
store,
|
|
120
119
|
...require("./deprecated")
|
package/build/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.js"],
|
|
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
|
|
5
|
-
"mappings": "
|
|
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"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAG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AEF,MAAK,OAAO,+BAAgC;AAC3C,8BAAU,mBAAAA,KAAiB,EAAE,YAAa,cAAc;AAAA,MACvD,iBAAiB;AAAA,MACjB,kBAAkB;AAAA,IACnB,CAAE;AAAA,EACH;AAEA,4BAAU,aAAAC,KAAc,EAAE,eAAgB,QAAS;AAGnD,SAAO,iBAAkB,YAAY,CAAE,MAAO,EAAE,eAAe,GAAG,KAAM;AACxE,SAAO,iBAAkB,QAAQ,CAAE,MAAO,EAAE,eAAe,GAAG,KAAM;AAEpE,OAAK;AAAA,IACJ,4CAAC,6BACA,sDAAC,WAAAC,SAAA,EAAI,GACN;AAAA,EACD;AAEA,SAAO;AACR;AAEO,SAAS,qBAAqB;AACpC,wBAAAC,SAAY,kCAAkC;AAAA,IAC7C,OAAO;AAAA,IACP,SAAS;AAAA,EACV,CAAE;AACH;",
|
|
6
6
|
"names": ["import_store", "editorPrivateApis", "blocksStore", "preferencesStore", "editSiteStore", "App", "deprecated"]
|
|
7
7
|
}
|
package/build/lock-unlock.js
CHANGED
|
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/edit-site/src/lock-unlock.js
|
|
19
21
|
var lock_unlock_exports = {};
|
|
20
22
|
__export(lock_unlock_exports, {
|
|
21
23
|
lock: () => lock,
|
|
@@ -23,7 +25,7 @@ __export(lock_unlock_exports, {
|
|
|
23
25
|
});
|
|
24
26
|
module.exports = __toCommonJS(lock_unlock_exports);
|
|
25
27
|
var import_private_apis = require("@wordpress/private-apis");
|
|
26
|
-
|
|
28
|
+
var { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
|
|
27
29
|
"I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
|
|
28
30
|
"@wordpress/edit-site"
|
|
29
31
|
);
|
package/build/lock-unlock.js.map
CHANGED
|
@@ -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": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,0BAAiE;AAE1D,IAAM,EAAE,MAAM,OAAO,QAC3B;AAAA,EACC;AAAA,EACA;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build/store/actions.js
CHANGED
|
@@ -26,6 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// packages/edit-site/src/store/actions.js
|
|
29
31
|
var actions_exports = {};
|
|
30
32
|
__export(actions_exports, {
|
|
31
33
|
__experimentalSetPreviewDeviceType: () => __experimentalSetPreviewDeviceType,
|
|
@@ -62,7 +64,7 @@ var import_editor = require("@wordpress/editor");
|
|
|
62
64
|
var import_preferences = require("@wordpress/preferences");
|
|
63
65
|
var import_constants = require("../utils/constants");
|
|
64
66
|
var import_lock_unlock = require("../lock-unlock");
|
|
65
|
-
|
|
67
|
+
var { interfaceStore } = (0, import_lock_unlock.unlock)(import_editor.privateApis);
|
|
66
68
|
function toggleFeature(featureName) {
|
|
67
69
|
return function({ registry }) {
|
|
68
70
|
(0, import_deprecated.default)(
|
|
@@ -75,7 +77,7 @@ function toggleFeature(featureName) {
|
|
|
75
77
|
registry.dispatch(import_preferences.store).toggle("core/edit-site", featureName);
|
|
76
78
|
};
|
|
77
79
|
}
|
|
78
|
-
|
|
80
|
+
var __experimentalSetPreviewDeviceType = (deviceType) => ({ registry }) => {
|
|
79
81
|
(0, import_deprecated.default)(
|
|
80
82
|
"dispatch( 'core/edit-site' ).__experimentalSetPreviewDeviceType",
|
|
81
83
|
{
|
|
@@ -96,7 +98,7 @@ function setTemplate() {
|
|
|
96
98
|
type: "NOTHING"
|
|
97
99
|
};
|
|
98
100
|
}
|
|
99
|
-
|
|
101
|
+
var addTemplate = (template) => async ({ dispatch, registry }) => {
|
|
100
102
|
(0, import_deprecated.default)("dispatch( 'core/edit-site' ).addTemplate", {
|
|
101
103
|
since: "6.5",
|
|
102
104
|
version: "6.8",
|
|
@@ -118,7 +120,7 @@ const addTemplate = (template) => async ({ dispatch, registry }) => {
|
|
|
118
120
|
id: newTemplate.id
|
|
119
121
|
});
|
|
120
122
|
};
|
|
121
|
-
|
|
123
|
+
var removeTemplate = (template) => ({ registry }) => {
|
|
122
124
|
return (0, import_lock_unlock.unlock)(registry.dispatch(import_editor.store)).removeTemplates([
|
|
123
125
|
template
|
|
124
126
|
]);
|
|
@@ -198,14 +200,14 @@ function setIsNavigationPanelOpened() {
|
|
|
198
200
|
});
|
|
199
201
|
return { type: "NOTHING" };
|
|
200
202
|
}
|
|
201
|
-
|
|
203
|
+
var setIsInserterOpened = (value) => ({ registry }) => {
|
|
202
204
|
(0, import_deprecated.default)("dispatch( 'core/edit-site' ).setIsInserterOpened", {
|
|
203
205
|
since: "6.5",
|
|
204
206
|
alternative: "dispatch( 'core/editor').setIsInserterOpened"
|
|
205
207
|
});
|
|
206
208
|
registry.dispatch(import_editor.store).setIsInserterOpened(value);
|
|
207
209
|
};
|
|
208
|
-
|
|
210
|
+
var setIsListViewOpened = (isOpen) => ({ registry }) => {
|
|
209
211
|
(0, import_deprecated.default)("dispatch( 'core/edit-site' ).setIsListViewOpened", {
|
|
210
212
|
since: "6.5",
|
|
211
213
|
alternative: "dispatch( 'core/editor').setIsListViewOpened"
|
|
@@ -224,26 +226,26 @@ function setIsSaveViewOpened(isOpen) {
|
|
|
224
226
|
isOpen
|
|
225
227
|
};
|
|
226
228
|
}
|
|
227
|
-
|
|
229
|
+
var revertTemplate = (template, options) => ({ registry }) => {
|
|
228
230
|
return (0, import_lock_unlock.unlock)(registry.dispatch(import_editor.store)).revertTemplate(
|
|
229
231
|
template,
|
|
230
232
|
options
|
|
231
233
|
);
|
|
232
234
|
};
|
|
233
|
-
|
|
235
|
+
var openGeneralSidebar = (name) => ({ registry }) => {
|
|
234
236
|
registry.dispatch(interfaceStore).enableComplementaryArea("core", name);
|
|
235
237
|
};
|
|
236
|
-
|
|
238
|
+
var closeGeneralSidebar = () => ({ registry }) => {
|
|
237
239
|
registry.dispatch(interfaceStore).disableComplementaryArea("core");
|
|
238
240
|
};
|
|
239
|
-
|
|
241
|
+
var switchEditorMode = (mode) => ({ registry }) => {
|
|
240
242
|
(0, import_deprecated.default)("dispatch( 'core/edit-site' ).switchEditorMode", {
|
|
241
243
|
since: "6.6",
|
|
242
244
|
alternative: "dispatch( 'core/editor').switchEditorMode"
|
|
243
245
|
});
|
|
244
246
|
registry.dispatch(import_editor.store).switchEditorMode(mode);
|
|
245
247
|
};
|
|
246
|
-
|
|
248
|
+
var setHasPageContentFocus = (hasPageContentFocus) => ({ dispatch, registry }) => {
|
|
247
249
|
(0, import_deprecated.default)(`dispatch( 'core/edit-site' ).setHasPageContentFocus`, {
|
|
248
250
|
since: "6.5"
|
|
249
251
|
});
|
|
@@ -255,7 +257,7 @@ const setHasPageContentFocus = (hasPageContentFocus) => ({ dispatch, registry })
|
|
|
255
257
|
hasPageContentFocus
|
|
256
258
|
});
|
|
257
259
|
};
|
|
258
|
-
|
|
260
|
+
var toggleDistractionFree = () => ({ registry }) => {
|
|
259
261
|
(0, import_deprecated.default)("dispatch( 'core/edit-site' ).toggleDistractionFree", {
|
|
260
262
|
since: "6.6",
|
|
261
263
|
alternative: "dispatch( 'core/editor').toggleDistractionFree"
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/store/actions.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { parse } from '@wordpress/blocks';\nimport deprecated from '@wordpress/deprecated';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n} from '../utils/constants';\nimport { unlock } from '../lock-unlock';\n\nconst { interfaceStore } = unlock( editorPrivateApis );\n\n/**\n * Dispatches an action that toggles a feature flag.\n *\n * @param {string} featureName Feature name.\n */\nexport function toggleFeature( featureName ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated(\n\t\t\t\"dispatch( 'core/edit-site' ).toggleFeature( featureName )\",\n\t\t\t{\n\t\t\t\tsince: '6.0',\n\t\t\t\talternative:\n\t\t\t\t\t\"dispatch( 'core/preferences').toggle( 'core/edit-site', featureName )\",\n\t\t\t}\n\t\t);\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.toggle( 'core/edit-site', featureName );\n\t};\n}\n\n/**\n * Action that changes the width of the editing canvas.\n *\n * @deprecated\n *\n * @param {string} deviceType\n *\n * @return {Object} Action object.\n */\nexport const __experimentalSetPreviewDeviceType =\n\t( deviceType ) =>\n\t( { registry } ) => {\n\t\tdeprecated(\n\t\t\t\"dispatch( 'core/edit-site' ).__experimentalSetPreviewDeviceType\",\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t\thint: 'registry.dispatch( editorStore ).setDeviceType',\n\t\t\t}\n\t\t);\n\t\tregistry.dispatch( editorStore ).setDeviceType( deviceType );\n\t};\n\n/**\n * Action that sets a template, optionally fetching it from REST API.\n *\n * @return {Object} Action object.\n */\nexport function setTemplate() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setTemplate\", {\n\t\tsince: '6.5',\n\t\tversion: '6.8',\n\t\thint: 'The setTemplate is not needed anymore, the correct entity is resolved from the URL automatically.',\n\t} );\n\n\treturn {\n\t\ttype: 'NOTHING',\n\t};\n}\n\n/**\n * Action that adds a new template and sets it as the current template.\n *\n * @param {Object} template The template.\n *\n * @deprecated\n *\n * @return {Object} Action object used to set the current template.\n */\nexport const addTemplate =\n\t( template ) =>\n\tasync ( { dispatch, registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).addTemplate\", {\n\t\t\tsince: '6.5',\n\t\t\tversion: '6.8',\n\t\t\thint: 'use saveEntityRecord directly',\n\t\t} );\n\n\t\tconst newTemplate = await registry\n\t\t\t.dispatch( coreStore )\n\t\t\t.saveEntityRecord( 'postType', TEMPLATE_POST_TYPE, template );\n\n\t\tif ( template.content ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( coreStore )\n\t\t\t\t.editEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\tnewTemplate.id,\n\t\t\t\t\t{ blocks: parse( template.content ) },\n\t\t\t\t\t{ undoIgnore: true }\n\t\t\t\t);\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_EDITED_POST',\n\t\t\tpostType: TEMPLATE_POST_TYPE,\n\t\t\tid: newTemplate.id,\n\t\t} );\n\t};\n\n/**\n * Action that removes a template.\n *\n * @param {Object} template The template object.\n */\nexport const removeTemplate =\n\t( template ) =>\n\t( { registry } ) => {\n\t\treturn unlock( registry.dispatch( editorStore ) ).removeTemplates( [\n\t\t\ttemplate,\n\t\t] );\n\t};\n\n/**\n * Action that sets a template part.\n *\n * @deprecated\n * @param {string} templatePartId The template part ID.\n *\n * @return {Object} Action object.\n */\nexport function setTemplatePart( templatePartId ) {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setTemplatePart\", {\n\t\tsince: '6.8',\n\t} );\n\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType: TEMPLATE_PART_POST_TYPE,\n\t\tid: templatePartId,\n\t};\n}\n\n/**\n * Action that sets a navigation menu.\n *\n * @deprecated\n * @param {string} navigationMenuId The Navigation Menu Post ID.\n *\n * @return {Object} Action object.\n */\nexport function setNavigationMenu( navigationMenuId ) {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setNavigationMenu\", {\n\t\tsince: '6.8',\n\t} );\n\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType: NAVIGATION_POST_TYPE,\n\t\tid: navigationMenuId,\n\t};\n}\n\n/**\n * Action that sets an edited entity.\n *\n * @deprecated\n * @param {string} postType The entity's post type.\n * @param {string} postId The entity's ID.\n * @param {Object} context The entity's context.\n *\n * @return {Object} Action object.\n */\nexport function setEditedEntity( postType, postId, context ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType,\n\t\tid: postId,\n\t\tcontext,\n\t};\n}\n\n/**\n * @deprecated\n */\nexport function setHomeTemplateId() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setHomeTemplateId\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn {\n\t\ttype: 'NOTHING',\n\t};\n}\n\n/**\n * Set's the current block editor context.\n *\n * @deprecated\n * @param {Object} context The context object.\n *\n * @return {Object} Action object.\n */\nexport function setEditedPostContext( context ) {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setEditedPostContext\", {\n\t\tsince: '6.8',\n\t} );\n\treturn {\n\t\ttype: 'SET_EDITED_POST_CONTEXT',\n\t\tcontext,\n\t};\n}\n\n/**\n * Resolves the template for a page and displays both. If no path is given, attempts\n * to use the postId to generate a path like `?p=${ postId }`.\n *\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport function setPage() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setPage\", {\n\t\tsince: '6.5',\n\t\tversion: '6.8',\n\t\thint: 'The setPage is not needed anymore, the correct entity is resolved from the URL automatically.',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Action that sets the active navigation panel menu.\n *\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport function setNavigationPanelActiveMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setNavigationPanelActiveMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Opens the navigation panel and sets its active menu at the same time.\n *\n * @deprecated\n */\nexport function openNavigationPanelToMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).openNavigationPanelToMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Sets whether the navigation panel should be open.\n *\n * @deprecated\n */\nexport function setIsNavigationPanelOpened() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setIsNavigationPanelOpened\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Returns an action object used to open/close the inserter.\n *\n * @deprecated\n *\n * @param {boolean|Object} value Whether the inserter should be opened (true) or closed (false).\n */\nexport const setIsInserterOpened =\n\t( value ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).setIsInserterOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').setIsInserterOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).setIsInserterOpened( value );\n\t};\n\n/**\n * Returns an action object used to open/close the list view.\n *\n * @deprecated\n *\n * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.\n */\nexport const setIsListViewOpened =\n\t( isOpen ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).setIsListViewOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').setIsListViewOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).setIsListViewOpened( isOpen );\n\t};\n\n/**\n * Returns an action object used to update the settings.\n *\n * @param {Object} settings New settings.\n *\n * @return {Object} Action object.\n */\nexport function updateSettings( settings ) {\n\treturn {\n\t\ttype: 'UPDATE_SETTINGS',\n\t\tsettings,\n\t};\n}\n\n/**\n * Sets whether the save view panel should be open.\n *\n * @param {boolean} isOpen If true, opens the save view. If false, closes it.\n * It does not toggle the state, but sets it directly.\n */\nexport function setIsSaveViewOpened( isOpen ) {\n\treturn {\n\t\ttype: 'SET_IS_SAVE_VIEW_OPENED',\n\t\tisOpen,\n\t};\n}\n\n/**\n * Reverts a template to its original theme-provided file.\n *\n * @param {Object} template The template to revert.\n * @param {Object} [options]\n * @param {boolean} [options.allowUndo] Whether to allow the user to undo\n * reverting the template. Default true.\n */\nexport const revertTemplate =\n\t( template, options ) =>\n\t( { registry } ) => {\n\t\treturn unlock( registry.dispatch( editorStore ) ).revertTemplate(\n\t\t\ttemplate,\n\t\t\toptions\n\t\t);\n\t};\n\n/**\n * Action that opens an editor sidebar.\n *\n * @param {?string} name Sidebar name to be opened.\n */\nexport const openGeneralSidebar =\n\t( name ) =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.enableComplementaryArea( 'core', name );\n\t};\n\n/**\n * Action that closes the sidebar.\n */\nexport const closeGeneralSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( interfaceStore ).disableComplementaryArea( 'core' );\n\t};\n\n/**\n * Triggers an action used to switch editor mode.\n *\n * @deprecated\n *\n * @param {string} mode The editor mode.\n */\nexport const switchEditorMode =\n\t( mode ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).switchEditorMode\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').switchEditorMode\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).switchEditorMode( mode );\n\t};\n\n/**\n * Sets whether or not the editor allows only page content to be edited.\n *\n * @param {boolean} hasPageContentFocus True to allow only page content to be\n * edited, false to allow template to be\n * edited.\n */\nexport const setHasPageContentFocus =\n\t( hasPageContentFocus ) =>\n\t( { dispatch, registry } ) => {\n\t\tdeprecated( `dispatch( 'core/edit-site' ).setHasPageContentFocus`, {\n\t\t\tsince: '6.5',\n\t\t} );\n\n\t\tif ( hasPageContentFocus ) {\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'SET_HAS_PAGE_CONTENT_FOCUS',\n\t\t\thasPageContentFocus,\n\t\t} );\n\t};\n\n/**\n * Action that toggles Distraction free mode.\n * Distraction free mode expects there are no sidebars, as due to the\n * z-index values set, you can't close sidebars.\n *\n * @deprecated\n */\nexport const toggleDistractionFree =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).toggleDistractionFree\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').toggleDistractionFree\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).toggleDistractionFree();\n\t};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAsB;AACtB,wBAAuB;AACvB,uBAAmC;AACnC,0BAA0C;AAC1C,oBAGO;AACP,yBAA0C;AAK1C,uBAIO;AACP,yBAAuB;AAEvB,IAAM,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AA,IACP,aAAa;AAAA,EACd,CAAE;AACF,WAAS,SAAU,cAAAE,KAAY,EAAE,iBAAkB,IAAK;AACzD;AASM,IAAM,yBACZ,CAAE,wBACF,CAAE,EAAE,UAAU,SAAS,MAAO;AAC7B,wBAAAF,SAAY,uDAAuD;AAAA,IAClE,OAAO;AAAA,EACR,CAAE;AAEF,MAAK,qBAAsB;AAC1B,aAAS,SAAU,oBAAAI,KAAiB,EAAE,mBAAmB;AAAA,EAC1D;AACA,WAAU;AAAA,IACT,MAAM;AAAA,IACN;AAAA,EACD,CAAE;AACH;AASM,IAAM,wBACZ,MACA,CAAE,EAAE,SAAS,MAAO;AACnB,wBAAAJ,SAAY,sDAAsD;AAAA,IACjE,OAAO;AAAA,IACP,aAAa;AAAA,EACd,CAAE;AACF,WAAS,SAAU,cAAAE,KAAY,EAAE,sBAAsB;AACxD;",
|
|
6
6
|
"names": ["editorPrivateApis", "deprecated", "preferencesStore", "editorStore", "coreStore", "blockEditorStore"]
|
|
7
7
|
}
|
package/build/store/constants.js
CHANGED
|
@@ -16,12 +16,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/edit-site/src/store/constants.js
|
|
19
21
|
var constants_exports = {};
|
|
20
22
|
__export(constants_exports, {
|
|
21
23
|
STORE_NAME: () => STORE_NAME
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(constants_exports);
|
|
24
|
-
|
|
26
|
+
var STORE_NAME = "core/edit-site";
|
|
25
27
|
// Annotate the CommonJS export names for ESM import in node:
|
|
26
28
|
0 && (module.exports = {
|
|
27
29
|
STORE_NAME
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/store/constants.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * The identifier for the data store.\n *\n * @type {string}\n */\nexport const STORE_NAME = 'core/edit-site';\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,IAAM,aAAa;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build/store/index.js
CHANGED
|
@@ -26,6 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// packages/edit-site/src/store/index.js
|
|
29
31
|
var store_exports = {};
|
|
30
32
|
__export(store_exports, {
|
|
31
33
|
store: () => store,
|
|
@@ -40,12 +42,12 @@ var selectors = __toESM(require("./selectors"));
|
|
|
40
42
|
var privateSelectors = __toESM(require("./private-selectors"));
|
|
41
43
|
var import_constants = require("./constants");
|
|
42
44
|
var import_lock_unlock = require("../lock-unlock");
|
|
43
|
-
|
|
45
|
+
var storeConfig = {
|
|
44
46
|
reducer: import_reducer.default,
|
|
45
47
|
actions,
|
|
46
48
|
selectors
|
|
47
49
|
};
|
|
48
|
-
|
|
50
|
+
var store = (0, import_data.createReduxStore)(import_constants.STORE_NAME, storeConfig);
|
|
49
51
|
(0, import_data.register)(store);
|
|
50
52
|
(0, import_lock_unlock.unlock)(store).registerPrivateSelectors(privateSelectors);
|
|
51
53
|
(0, import_lock_unlock.unlock)(store).registerPrivateActions(privateActions);
|
package/build/store/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/store/index.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as privateActions from './private-actions';\nimport * as selectors from './selectors';\nimport * as privateSelectors from './private-selectors';\nimport { STORE_NAME } from './constants';\nimport { unlock } from '../lock-unlock';\n\nexport const storeConfig = {\n\treducer,\n\tactions,\n\tselectors,\n};\n\nexport const store = createReduxStore( STORE_NAME, storeConfig );\nregister( store );\nunlock( store ).registerPrivateSelectors( privateSelectors );\nunlock( store ).registerPrivateActions( privateActions );\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAA2C;AAK3C,qBAAoB;AACpB,cAAyB;AACzB,qBAAgC;AAChC,gBAA2B;AAC3B,uBAAkC;AAClC,uBAA2B;AAC3B,yBAAuB;AAEhB,IAAM,cAAc;AAAA,EAC1B,wBAAAA;AAAA,EACA;AAAA,EACA;AACD;AAEO,IAAM,YAAQ,8BAAkB,6BAAY,WAAY;AAAA,IAC/D,sBAAU,KAAM;AAAA,IAChB,2BAAQ,KAAM,EAAE,yBAA0B,gBAAiB;AAAA,IAC3D,2BAAQ,KAAM,EAAE,uBAAwB,cAAe;",
|
|
6
6
|
"names": ["reducer"]
|
|
7
7
|
}
|
|
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/edit-site/src/store/private-actions.js
|
|
19
21
|
var private_actions_exports = {};
|
|
20
22
|
__export(private_actions_exports, {
|
|
21
23
|
registerRoute: () => registerRoute,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/store/private-actions.js"],
|
|
4
4
|
"sourcesContent": ["export function registerRoute( route ) {\n\treturn {\n\t\ttype: 'REGISTER_ROUTE',\n\t\troute,\n\t};\n}\n\nexport function unregisterRoute( name ) {\n\treturn {\n\t\ttype: 'UNREGISTER_ROUTE',\n\t\tname,\n\t};\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,SAAS,cAAe,OAAQ;AACtC,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,EACD;AACD;AAEO,SAAS,gBAAiB,MAAO;AACvC,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,EACD;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/edit-site/src/store/private-selectors.js
|
|
19
21
|
var private_selectors_exports = {};
|
|
20
22
|
__export(private_selectors_exports, {
|
|
21
23
|
getRoutes: () => getRoutes
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/store/private-selectors.js"],
|
|
4
4
|
"sourcesContent": ["export function getRoutes( state ) {\n\treturn state.routes;\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,SAAS,UAAW,OAAQ;AAClC,SAAO,MAAM;AACd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build/store/reducer.js
CHANGED
|
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/edit-site/src/store/reducer.js
|
|
19
21
|
var reducer_exports = {};
|
|
20
22
|
__export(reducer_exports, {
|
|
21
23
|
default: () => reducer_default,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/store/reducer.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Reducer returning the settings.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function settings( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_SETTINGS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t...action.settings,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer keeping track of the currently edited Post Type,\n * Post Id and the context provided to fill the content of the block editor.\n *\n * @param {Object} state Current edited post.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function editedPost( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn {\n\t\t\t\tpostType: action.postType,\n\t\t\t\tid: action.id,\n\t\t\t\tcontext: action.context,\n\t\t\t};\n\t\tcase 'SET_EDITED_POST_CONTEXT':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tcontext: action.context,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer to set the save view panel open or closed.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function saveViewPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_SAVE_VIEW_OPENED':\n\t\t\treturn action.isOpen;\n\t}\n\treturn state;\n}\n\nfunction routes( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REGISTER_ROUTE':\n\t\t\treturn [ ...state, action.route ];\n\t\tcase 'UNREGISTER_ROUTE':\n\t\t\treturn state.filter( ( route ) => route.name !== action.name );\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tsettings,\n\teditedPost,\n\tsaveViewPanel,\n\troutes,\n} );\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAgC;AAUzB,SAAS,SAAU,QAAQ,CAAC,GAAG,QAAS;AAC9C,UAAS,OAAO,MAAO;AAAA,IACtB,KAAK;AACJ,aAAO;AAAA,QACN,GAAG;AAAA,QACH,GAAG,OAAO;AAAA,MACX;AAAA,EACF;AAEA,SAAO;AACR;AAWO,SAAS,WAAY,QAAQ,CAAC,GAAG,QAAS;AAChD,UAAS,OAAO,MAAO;AAAA,IACtB,KAAK;AACJ,aAAO;AAAA,QACN,UAAU,OAAO;AAAA,QACjB,IAAI,OAAO;AAAA,QACX,SAAS,OAAO;AAAA,MACjB;AAAA,IACD,KAAK;AACJ,aAAO;AAAA,QACN,GAAG;AAAA,QACH,SAAS,OAAO;AAAA,MACjB;AAAA,EACF;AAEA,SAAO;AACR;AAQO,SAAS,cAAe,QAAQ,OAAO,QAAS;AACtD,UAAS,OAAO,MAAO;AAAA,IACtB,KAAK;AACJ,aAAO,OAAO;AAAA,EAChB;AACA,SAAO;AACR;AAEA,SAAS,OAAQ,QAAQ,CAAC,GAAG,QAAS;AACrC,UAAS,OAAO,MAAO;AAAA,IACtB,KAAK;AACJ,aAAO,CAAE,GAAG,OAAO,OAAO,KAAM;AAAA,IACjC,KAAK;AACJ,aAAO,MAAM,OAAQ,CAAE,UAAW,MAAM,SAAS,OAAO,IAAK;AAAA,EAC/D;AAEA,SAAO;AACR;AAEA,IAAO,sBAAQ,6BAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build/store/selectors.js
CHANGED
|
@@ -26,6 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// packages/edit-site/src/store/selectors.js
|
|
29
31
|
var selectors_exports = {};
|
|
30
32
|
__export(selectors_exports, {
|
|
31
33
|
__experimentalGetInsertionPoint: () => __experimentalGetInsertionPoint,
|
|
@@ -61,7 +63,7 @@ var import_block_editor = require("@wordpress/block-editor");
|
|
|
61
63
|
var import_lock_unlock = require("../lock-unlock");
|
|
62
64
|
var import_constants = require("../utils/constants");
|
|
63
65
|
var import_get_filtered_template_parts = __toESM(require("../utils/get-filtered-template-parts"));
|
|
64
|
-
|
|
66
|
+
var isFeatureActive = (0, import_data.createRegistrySelector)(
|
|
65
67
|
(select) => (_, featureName) => {
|
|
66
68
|
(0, import_deprecated.default)(`select( 'core/edit-site' ).isFeatureActive`, {
|
|
67
69
|
since: "6.0",
|
|
@@ -73,7 +75,7 @@ const isFeatureActive = (0, import_data.createRegistrySelector)(
|
|
|
73
75
|
);
|
|
74
76
|
}
|
|
75
77
|
);
|
|
76
|
-
|
|
78
|
+
var __experimentalGetPreviewDeviceType = (0, import_data.createRegistrySelector)(
|
|
77
79
|
(select) => () => {
|
|
78
80
|
(0, import_deprecated.default)(
|
|
79
81
|
`select( 'core/edit-site' ).__experimentalGetPreviewDeviceType`,
|
|
@@ -86,7 +88,7 @@ const __experimentalGetPreviewDeviceType = (0, import_data.createRegistrySelecto
|
|
|
86
88
|
return select(import_editor.store).getDeviceType();
|
|
87
89
|
}
|
|
88
90
|
);
|
|
89
|
-
|
|
91
|
+
var getCanUserCreateMedia = (0, import_data.createRegistrySelector)(
|
|
90
92
|
(select) => () => {
|
|
91
93
|
(0, import_deprecated.default)(
|
|
92
94
|
`wp.data.select( 'core/edit-site' ).getCanUserCreateMedia()`,
|
|
@@ -98,7 +100,7 @@ const getCanUserCreateMedia = (0, import_data.createRegistrySelector)(
|
|
|
98
100
|
return select(import_core_data.store).canUser("create", "media");
|
|
99
101
|
}
|
|
100
102
|
);
|
|
101
|
-
|
|
103
|
+
var getReusableBlocks = (0, import_data.createRegistrySelector)((select) => () => {
|
|
102
104
|
(0, import_deprecated.default)(`select( 'core/edit-site' ).getReusableBlocks()`, {
|
|
103
105
|
since: "6.5",
|
|
104
106
|
version: "6.8",
|
|
@@ -144,14 +146,14 @@ function getPage(state) {
|
|
|
144
146
|
});
|
|
145
147
|
return { context: state.editedPost.context };
|
|
146
148
|
}
|
|
147
|
-
|
|
149
|
+
var isInserterOpened = (0, import_data.createRegistrySelector)((select) => () => {
|
|
148
150
|
(0, import_deprecated.default)(`select( 'core/edit-site' ).isInserterOpened`, {
|
|
149
151
|
since: "6.5",
|
|
150
152
|
alternative: `select( 'core/editor' ).isInserterOpened`
|
|
151
153
|
});
|
|
152
154
|
return select(import_editor.store).isInserterOpened();
|
|
153
155
|
});
|
|
154
|
-
|
|
156
|
+
var __experimentalGetInsertionPoint = (0, import_data.createRegistrySelector)(
|
|
155
157
|
(select) => () => {
|
|
156
158
|
(0, import_deprecated.default)(
|
|
157
159
|
`select( 'core/edit-site' ).__experimentalGetInsertionPoint`,
|
|
@@ -163,7 +165,7 @@ const __experimentalGetInsertionPoint = (0, import_data.createRegistrySelector)(
|
|
|
163
165
|
return (0, import_lock_unlock.unlock)(select(import_editor.store)).getInserter();
|
|
164
166
|
}
|
|
165
167
|
);
|
|
166
|
-
|
|
168
|
+
var isListViewOpened = (0, import_data.createRegistrySelector)((select) => () => {
|
|
167
169
|
(0, import_deprecated.default)(`select( 'core/edit-site' ).isListViewOpened`, {
|
|
168
170
|
since: "6.5",
|
|
169
171
|
alternative: `select( 'core/editor' ).isListViewOpened`
|
|
@@ -184,7 +186,7 @@ function getBlocksAndTemplateParts(select) {
|
|
|
184
186
|
const blocks = getBlocksByClientId(clientIds);
|
|
185
187
|
return [blocks, templateParts];
|
|
186
188
|
}
|
|
187
|
-
|
|
189
|
+
var getCurrentTemplateTemplateParts = (0, import_data.createRegistrySelector)(
|
|
188
190
|
(select) => (0, import_data.createSelector)(
|
|
189
191
|
() => {
|
|
190
192
|
(0, import_deprecated.default)(
|
|
@@ -202,7 +204,7 @@ const getCurrentTemplateTemplateParts = (0, import_data.createRegistrySelector)(
|
|
|
202
204
|
() => getBlocksAndTemplateParts(select)
|
|
203
205
|
)
|
|
204
206
|
);
|
|
205
|
-
|
|
207
|
+
var getEditorMode = (0, import_data.createRegistrySelector)((select) => () => {
|
|
206
208
|
return select(import_preferences.store).get("core", "editorMode");
|
|
207
209
|
});
|
|
208
210
|
function getCurrentTemplateNavigationPanelSubMenu() {
|