@wordpress/edit-site 5.16.0 → 5.17.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-page/index.js +3 -13
- package/build/components/add-new-page/index.js.map +1 -1
- package/build/components/add-new-pattern/index.js +13 -26
- package/build/components/add-new-pattern/index.js.map +1 -1
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js +1 -11
- 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 +9 -28
- package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build/components/add-new-template/index.js +3 -10
- package/build/components/add-new-template/index.js.map +1 -1
- package/build/components/add-new-template/new-template.js +19 -49
- package/build/components/add-new-template/new-template.js.map +1 -1
- package/build/components/add-new-template/template-actions-loading-screen.js +1 -3
- package/build/components/add-new-template/template-actions-loading-screen.js.map +1 -1
- package/build/components/add-new-template/utils.js +52 -102
- package/build/components/add-new-template/utils.js.map +1 -1
- package/build/components/app/index.js +2 -19
- package/build/components/app/index.js.map +1 -1
- package/build/components/block-editor/back-button.js +1 -11
- package/build/components/block-editor/back-button.js.map +1 -1
- package/build/components/block-editor/block-inspector-button.js +3 -14
- package/build/components/block-editor/block-inspector-button.js.map +1 -1
- package/build/components/block-editor/constants.js.map +1 -1
- package/build/components/block-editor/editor-canvas.js +5 -14
- package/build/components/block-editor/editor-canvas.js.map +1 -1
- package/build/components/block-editor/get-block-editor-provider.js +0 -7
- package/build/components/block-editor/get-block-editor-provider.js.map +1 -1
- package/build/components/block-editor/index.js +10 -15
- package/build/components/block-editor/index.js.map +1 -1
- package/build/components/block-editor/inserter-media-categories.js +30 -45
- package/build/components/block-editor/inserter-media-categories.js.map +1 -1
- package/build/components/block-editor/providers/default-block-editor-provider.js +1 -10
- package/build/components/block-editor/providers/default-block-editor-provider.js.map +1 -1
- package/build/components/block-editor/providers/navigation-block-editor-provider.js +10 -19
- package/build/components/block-editor/providers/navigation-block-editor-provider.js.map +1 -1
- package/build/components/block-editor/resizable-editor.js +3 -8
- package/build/components/block-editor/resizable-editor.js.map +1 -1
- package/build/components/block-editor/resize-handle.js +1 -7
- package/build/components/block-editor/resize-handle.js.map +1 -1
- package/build/components/block-editor/site-editor-canvas.js +6 -22
- package/build/components/block-editor/site-editor-canvas.js.map +1 -1
- package/build/components/block-editor/use-site-editor-settings.js +11 -29
- package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build/components/canvas-spinner/index.js +31 -5
- package/build/components/canvas-spinner/index.js.map +1 -1
- package/build/components/code-editor/index.js +3 -18
- package/build/components/code-editor/index.js.map +1 -1
- package/build/components/create-template-part-modal/index.js +4 -19
- package/build/components/create-template-part-modal/index.js.map +1 -1
- package/build/components/editor/index.js +30 -46
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor-canvas-container/index.js +2 -28
- package/build/components/editor-canvas-container/index.js.map +1 -1
- package/build/components/error-boundary/index.js +1 -12
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/error-boundary/warning.js +1 -7
- package/build/components/error-boundary/warning.js.map +1 -1
- package/build/components/global-styles/block-preview-panel.js +22 -13
- package/build/components/global-styles/block-preview-panel.js.map +1 -1
- package/build/components/global-styles/color-indicator-wrapper.js +1 -6
- package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
- package/build/components/global-styles/color-palette-panel.js +1 -8
- package/build/components/global-styles/color-palette-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +14 -16
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/global-styles-provider.js +1 -22
- package/build/components/global-styles/global-styles-provider.js.map +1 -1
- package/build/components/global-styles/gradients-palette-panel.js +1 -11
- package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build/components/global-styles/header.js +3 -7
- package/build/components/global-styles/header.js.map +1 -1
- package/build/components/global-styles/hooks.js +26 -15
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/icon-with-current-color.js +1 -5
- package/build/components/global-styles/icon-with-current-color.js.map +1 -1
- package/build/components/global-styles/index.js +0 -2
- package/build/components/global-styles/index.js.map +1 -1
- package/build/components/global-styles/navigation-button.js +3 -7
- package/build/components/global-styles/navigation-button.js.map +1 -1
- package/build/components/global-styles/palette.js +3 -15
- package/build/components/global-styles/palette.js.map +1 -1
- package/build/components/global-styles/preview.js +7 -18
- package/build/components/global-styles/preview.js.map +1 -1
- package/build/components/global-styles/root-menu.js +1 -10
- package/build/components/global-styles/root-menu.js.map +1 -1
- package/build/components/global-styles/screen-block-list.js +10 -32
- package/build/components/global-styles/screen-block-list.js.map +1 -1
- package/build/components/global-styles/screen-block.js +28 -49
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-color-palette.js +1 -9
- package/build/components/global-styles/screen-color-palette.js.map +1 -1
- package/build/components/global-styles/screen-colors.js +2 -14
- package/build/components/global-styles/screen-colors.js.map +1 -1
- package/build/components/global-styles/screen-css.js +1 -10
- package/build/components/global-styles/screen-css.js.map +1 -1
- package/build/components/global-styles/screen-layout.js +2 -13
- package/build/components/global-styles/screen-layout.js.map +1 -1
- package/build/components/global-styles/screen-revisions/index.js +7 -25
- package/build/components/global-styles/screen-revisions/index.js.map +1 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js +20 -24
- package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +12 -22
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
- package/build/components/global-styles/screen-root.js +2 -20
- package/build/components/global-styles/screen-root.js.map +1 -1
- package/build/components/global-styles/screen-style-variations.js +6 -15
- package/build/components/global-styles/screen-style-variations.js.map +1 -1
- package/build/components/global-styles/screen-typography-element.js +2 -12
- package/build/components/global-styles/screen-typography-element.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +4 -17
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/style-variations-container.js +4 -25
- package/build/components/global-styles/style-variations-container.js.map +1 -1
- package/build/components/global-styles/subtitle.js +1 -4
- package/build/components/global-styles/subtitle.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +1 -7
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/typography-preview.js +1 -7
- package/build/components/global-styles/typography-preview.js.map +1 -1
- package/build/components/global-styles/ui.js +14 -62
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles/utils.js +0 -2
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/global-styles/variations-panel.js +1 -9
- package/build/components/global-styles/variations-panel.js.map +1 -1
- package/build/components/global-styles-renderer/index.js +3 -11
- package/build/components/global-styles-renderer/index.js.map +1 -1
- package/build/components/header-edit-mode/document-actions/index.js +10 -51
- package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
- package/build/components/header-edit-mode/index.js +8 -36
- package/build/components/header-edit-mode/index.js.map +1 -1
- package/build/components/header-edit-mode/mode-switcher/index.js +2 -11
- package/build/components/header-edit-mode/mode-switcher/index.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js +1 -14
- package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/index.js +2 -24
- package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/site-export.js +1 -14
- package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js +1 -6
- package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
- package/build/components/header-edit-mode/plugin-more-menu-item/index.js +0 -8
- package/build/components/header-edit-mode/plugin-more-menu-item/index.js.map +1 -1
- package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +3 -4
- package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
- package/build/components/header-edit-mode/tools-more-menu-group/index.js +1 -5
- package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
- package/build/components/header-edit-mode/undo-redo/redo.js +5 -12
- package/build/components/header-edit-mode/undo-redo/redo.js.map +1 -1
- package/build/components/header-edit-mode/undo-redo/undo.js +5 -12
- package/build/components/header-edit-mode/undo-redo/undo.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +1 -2
- package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -8
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +4 -24
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +1 -5
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build/components/keyboard-shortcuts/edit-mode.js +3 -24
- package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
- package/build/components/keyboard-shortcuts/global.js +1 -9
- package/build/components/keyboard-shortcuts/global.js.map +1 -1
- package/build/components/keyboard-shortcuts/register.js +1 -7
- package/build/components/keyboard-shortcuts/register.js.map +1 -1
- package/build/components/layout/hooks.js +2 -9
- package/build/components/layout/hooks.js.map +1 -1
- package/build/components/layout/index.js +17 -50
- package/build/components/layout/index.js.map +1 -1
- package/build/components/list/added-by.js +10 -23
- package/build/components/list/added-by.js.map +1 -1
- package/build/components/list/header.js +1 -10
- package/build/components/list/header.js.map +1 -1
- package/build/components/list/index.js +8 -20
- package/build/components/list/index.js.map +1 -1
- package/build/components/list/table.js +5 -16
- package/build/components/list/table.js.map +1 -1
- package/build/components/list/use-register-shortcuts.js +1 -5
- package/build/components/list/use-register-shortcuts.js.map +1 -1
- package/build/components/page/header.js +1 -3
- package/build/components/page/header.js.map +1 -1
- package/build/components/page/index.js +1 -7
- package/build/components/page/index.js.map +1 -1
- package/build/components/page-actions/index.js +1 -7
- package/build/components/page-actions/index.js.map +1 -1
- package/build/components/page-actions/trash-page-menu-item.js +4 -13
- package/build/components/page-actions/trash-page-menu-item.js.map +1 -1
- package/build/components/page-content-focus-manager/back-to-page-notification.js +1 -9
- package/build/components/page-content-focus-manager/back-to-page-notification.js.map +1 -1
- package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js +7 -17
- package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -1
- package/build/components/page-content-focus-manager/edit-template-notification.js +0 -16
- package/build/components/page-content-focus-manager/edit-template-notification.js.map +1 -1
- package/build/components/page-content-focus-manager/index.js +1 -8
- package/build/components/page-content-focus-manager/index.js.map +1 -1
- package/build/components/page-main/index.js +1 -11
- package/build/components/page-main/index.js.map +1 -1
- package/build/components/page-patterns/duplicate-menu-item.js +22 -49
- package/build/components/page-patterns/duplicate-menu-item.js.map +1 -1
- package/build/components/page-patterns/grid-item.js +12 -32
- package/build/components/page-patterns/grid-item.js.map +1 -1
- package/build/components/page-patterns/grid.js +1 -5
- package/build/components/page-patterns/grid.js.map +1 -1
- package/build/components/page-patterns/header.js +1 -11
- package/build/components/page-patterns/header.js.map +1 -1
- package/build/components/page-patterns/index.js +6 -15
- package/build/components/page-patterns/index.js.map +1 -1
- package/build/components/page-patterns/no-patterns.js +1 -3
- package/build/components/page-patterns/no-patterns.js.map +1 -1
- package/build/components/page-patterns/pagination.js +7 -7
- package/build/components/page-patterns/pagination.js.map +1 -1
- package/build/components/page-patterns/patterns-list.js +1 -23
- package/build/components/page-patterns/patterns-list.js.map +1 -1
- package/build/components/page-patterns/rename-menu-item.js +5 -14
- package/build/components/page-patterns/rename-menu-item.js.map +1 -1
- package/build/components/page-patterns/search-items.js +27 -38
- package/build/components/page-patterns/search-items.js.map +1 -1
- package/build/components/page-patterns/use-pattern-settings.js +5 -10
- package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +15 -34
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/page-patterns/utils.js +0 -2
- package/build/components/page-patterns/utils.js.map +1 -1
- package/build/components/page-template-parts/add-new-template-part.js +1 -13
- package/build/components/page-template-parts/add-new-template-part.js.map +1 -1
- package/build/components/page-template-parts/index.js +1 -13
- package/build/components/page-template-parts/index.js.map +1 -1
- package/build/components/page-templates/index.js +1 -13
- package/build/components/page-templates/index.js.map +1 -1
- package/build/components/plugin-template-setting-panel/index.js +2 -3
- package/build/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build/components/preferences-modal/enable-feature.js +1 -7
- package/build/components/preferences-modal/enable-feature.js.map +1 -1
- package/build/components/preferences-modal/index.js +1 -16
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/resizable-frame/index.js +24 -44
- package/build/components/resizable-frame/index.js.map +1 -1
- package/build/components/revisions/index.js +5 -17
- package/build/components/revisions/index.js.map +1 -1
- package/build/components/routes/link.js +3 -14
- package/build/components/routes/link.js.map +1 -1
- package/build/components/routes/use-title.js +5 -16
- package/build/components/routes/use-title.js.map +1 -1
- package/build/components/save-button/index.js +3 -20
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/save-hub/index.js +7 -29
- package/build/components/save-hub/index.js.map +1 -1
- package/build/components/save-panel/index.js +6 -28
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js +1 -9
- package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +21 -32
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/index.js +1 -25
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-button/index.js +3 -6
- package/build/components/sidebar-button/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/constants.js.map +1 -1
- package/build/components/sidebar-edit-mode/default-sidebar.js +2 -5
- package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js +1 -18
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build/components/sidebar-edit-mode/index.js +1 -24
- package/build/components/sidebar-edit-mode/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/edit-template.js +11 -20
- package/build/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/index.js +3 -18
- package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-content.js +1 -6
- package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-status.js +3 -20
- package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-summary.js +1 -6
- package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/publish-date.js +3 -15
- package/build/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -1
- package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -5
- package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/settings-header/index.js +14 -25
- package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/sidebar-card/index.js +1 -5
- package/build/components/sidebar-edit-mode/sidebar-card/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -5
- package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/index.js +1 -21
- package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/last-revision.js +2 -17
- package/build/components/sidebar-edit-mode/template-panel/last-revision.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/template-actions.js +1 -11
- package/build/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/template-areas.js +1 -15
- package/build/components/sidebar-edit-mode/template-panel/template-areas.js.map +1 -1
- package/build/components/sidebar-navigation-item/index.js +1 -7
- package/build/components/sidebar-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +2 -19
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.js +2 -7
- package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/index.js +1 -7
- package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +1 -3
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +1 -5
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +1 -3
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.js +19 -48
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/index.js +3 -14
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/template-part-hint.js +1 -10
- package/build/components/sidebar-navigation-screen-main/template-part-hint.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-item/index.js +1 -13
- package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +3 -5
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js +3 -8
- package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js +5 -25
- 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 -16
- 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 +1 -13
- 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 +3 -8
- 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 +1 -10
- 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 +12 -33
- 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 +3 -6
- 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.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js +14 -35
- 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 -19
- 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 -14
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/index.js +6 -23
- package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/page-details.js +9 -32
- package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/status-label.js +3 -17
- package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pages/index.js +6 -31
- package/build/components/sidebar-navigation-screen-pages/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/index.js +11 -25
- package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +1 -7
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +1 -5
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +1 -7
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +5 -10
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +5 -22
- package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +7 -29
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/category-item.js +3 -8
- package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/index.js +4 -22
- package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js +1 -6
- package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-my-patterns.js +1 -5
- package/build/components/sidebar-navigation-screen-patterns/use-my-patterns.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +11 -12
- 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 +6 -8
- 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 +1 -8
- package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
- package/build/components/sidebar-navigation-screen-template/home-template-details.js +7 -31
- package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
- package/build/components/sidebar-navigation-screen-template/index.js +1 -20
- package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates/index.js +4 -16
- package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/index.js +1 -9
- package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build/components/site-hub/index.js +4 -21
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/site-icon/index.js +1 -12
- package/build/components/site-icon/index.js.map +1 -1
- package/build/components/start-template-options/index.js +3 -26
- package/build/components/start-template-options/index.js.map +1 -1
- package/build/components/style-book/index.js +23 -34
- package/build/components/style-book/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +8 -25
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +5 -13
- package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
- package/build/components/sync-state-with-url/use-sync-path-with-url.js +9 -19
- package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
- package/build/components/table/index.js +0 -2
- package/build/components/table/index.js.map +1 -1
- package/build/components/template-actions/index.js +2 -21
- package/build/components/template-actions/index.js.map +1 -1
- package/build/components/template-actions/rename-menu-item.js +7 -15
- package/build/components/template-actions/rename-menu-item.js.map +1 -1
- package/build/components/template-part-converter/convert-to-regular.js +1 -8
- package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
- package/build/components/template-part-converter/convert-to-template-part.js +4 -15
- package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build/components/template-part-converter/index.js +3 -10
- package/build/components/template-part-converter/index.js.map +1 -1
- package/build/components/use-edited-entity-record/index.js +2 -15
- package/build/components/use-edited-entity-record/index.js.map +1 -1
- package/build/components/welcome-guide/editor.js +1 -10
- package/build/components/welcome-guide/editor.js.map +1 -1
- package/build/components/welcome-guide/image.js +0 -2
- package/build/components/welcome-guide/image.js.map +1 -1
- package/build/components/welcome-guide/index.js +1 -7
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/components/welcome-guide/page.js +1 -9
- package/build/components/welcome-guide/page.js.map +1 -1
- package/build/components/welcome-guide/styles.js +1 -12
- package/build/components/welcome-guide/styles.js.map +1 -1
- package/build/components/welcome-guide/template.js +1 -9
- package/build/components/welcome-guide/template.js.map +1 -1
- package/build/hooks/commands/use-common-commands.js +132 -122
- package/build/hooks/commands/use-common-commands.js.map +1 -1
- package/build/hooks/commands/use-edit-mode-commands.js +68 -65
- package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
- package/build/hooks/components.js +1 -2
- package/build/hooks/components.js.map +1 -1
- package/build/hooks/index.js +0 -3
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/navigation-menu-edit.js +11 -24
- package/build/hooks/navigation-menu-edit.js.map +1 -1
- package/build/hooks/push-changes-to-global-styles/index.js +161 -69
- package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build/hooks/template-part-edit.js +7 -19
- package/build/hooks/template-part-edit.js.map +1 -1
- package/build/index.js +8 -31
- package/build/index.js.map +1 -1
- package/build/lock-unlock.js +1 -2
- package/build/lock-unlock.js.map +1 -1
- package/build/store/actions.js +33 -98
- package/build/store/actions.js.map +1 -1
- package/build/store/constants.js +0 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/index.js +1 -12
- package/build/store/index.js.map +1 -1
- package/build/store/private-actions.js +5 -13
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +1 -3
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +12 -38
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +23 -60
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils.js +13 -16
- package/build/store/utils.js.map +1 -1
- package/build/utils/get-is-list-page.js +2 -2
- package/build/utils/get-is-list-page.js.map +1 -1
- package/build/utils/is-previewing-theme.js +1 -4
- package/build/utils/is-previewing-theme.js.map +1 -1
- package/build/utils/is-template-removable.js +0 -2
- package/build/utils/is-template-removable.js.map +1 -1
- package/build/utils/is-template-revertable.js +0 -3
- package/build/utils/is-template-revertable.js.map +1 -1
- package/build/utils/template-part-create.js +3 -15
- package/build/utils/template-part-create.js.map +1 -1
- package/build/utils/use-activate-theme.js +2 -5
- package/build/utils/use-activate-theme.js.map +1 -1
- package/build/utils/use-debounced-input.js +1 -3
- package/build/utils/use-debounced-input.js.map +1 -1
- package/build-module/components/add-new-page/index.js +2 -7
- package/build-module/components/add-new-page/index.js.map +1 -1
- package/build-module/components/add-new-pattern/index.js +12 -13
- package/build-module/components/add-new-pattern/index.js.map +1 -1
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +1 -11
- 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 +9 -21
- 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 +3 -6
- package/build-module/components/add-new-template/index.js.map +1 -1
- package/build-module/components/add-new-template/new-template.js +20 -34
- package/build-module/components/add-new-template/new-template.js.map +1 -1
- package/build-module/components/add-new-template/template-actions-loading-screen.js +0 -1
- package/build-module/components/add-new-template/template-actions-loading-screen.js.map +1 -1
- package/build-module/components/add-new-template/utils.js +52 -82
- package/build-module/components/add-new-template/utils.js.map +1 -1
- package/build-module/components/app/index.js +2 -6
- package/build-module/components/app/index.js.map +1 -1
- package/build-module/components/block-editor/back-button.js +1 -6
- package/build-module/components/block-editor/back-button.js.map +1 -1
- package/build-module/components/block-editor/block-inspector-button.js +3 -5
- package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
- package/build-module/components/block-editor/constants.js.map +1 -1
- package/build-module/components/block-editor/editor-canvas.js +6 -8
- package/build-module/components/block-editor/editor-canvas.js.map +1 -1
- package/build-module/components/block-editor/get-block-editor-provider.js +1 -4
- package/build-module/components/block-editor/get-block-editor-provider.js.map +1 -1
- package/build-module/components/block-editor/index.js +10 -6
- package/build-module/components/block-editor/index.js.map +1 -1
- package/build-module/components/block-editor/inserter-media-categories.js +31 -41
- package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
- package/build-module/components/block-editor/providers/default-block-editor-provider.js +1 -2
- package/build-module/components/block-editor/providers/default-block-editor-provider.js.map +1 -1
- package/build-module/components/block-editor/providers/navigation-block-editor-provider.js +10 -11
- package/build-module/components/block-editor/providers/navigation-block-editor-provider.js.map +1 -1
- package/build-module/components/block-editor/resizable-editor.js +5 -6
- package/build-module/components/block-editor/resizable-editor.js.map +1 -1
- package/build-module/components/block-editor/resize-handle.js +0 -3
- package/build-module/components/block-editor/resize-handle.js.map +1 -1
- package/build-module/components/block-editor/site-editor-canvas.js +5 -8
- package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
- package/build-module/components/block-editor/use-site-editor-settings.js +10 -23
- package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build-module/components/canvas-spinner/index.js +31 -4
- package/build-module/components/canvas-spinner/index.js.map +1 -1
- package/build-module/components/code-editor/index.js +4 -9
- package/build-module/components/code-editor/index.js.map +1 -1
- package/build-module/components/create-template-part-modal/index.js +4 -8
- package/build-module/components/create-template-part-modal/index.js.map +1 -1
- package/build-module/components/editor/index.js +31 -21
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor-canvas-container/index.js +4 -18
- package/build-module/components/editor-canvas-container/index.js.map +1 -1
- package/build-module/components/error-boundary/index.js +1 -7
- package/build-module/components/error-boundary/index.js.map +1 -1
- package/build-module/components/error-boundary/warning.js +0 -3
- package/build-module/components/error-boundary/warning.js.map +1 -1
- package/build-module/components/global-styles/block-preview-panel.js +22 -10
- package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
- package/build-module/components/global-styles/color-indicator-wrapper.js +1 -4
- package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
- package/build-module/components/global-styles/color-palette-panel.js +1 -2
- package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +14 -13
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/global-styles-provider.js +2 -15
- package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
- package/build-module/components/global-styles/gradients-palette-panel.js +1 -4
- package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/header.js +2 -4
- package/build-module/components/global-styles/header.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +26 -7
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/icon-with-current-color.js +1 -2
- package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
- package/build-module/components/global-styles/index.js.map +1 -1
- package/build-module/components/global-styles/navigation-button.js +3 -7
- package/build-module/components/global-styles/navigation-button.js.map +1 -1
- package/build-module/components/global-styles/palette.js +3 -5
- package/build-module/components/global-styles/palette.js.map +1 -1
- package/build-module/components/global-styles/preview.js +7 -14
- package/build-module/components/global-styles/preview.js.map +1 -1
- package/build-module/components/global-styles/root-menu.js +1 -4
- package/build-module/components/global-styles/root-menu.js.map +1 -1
- package/build-module/components/global-styles/screen-block-list.js +10 -20
- package/build-module/components/global-styles/screen-block-list.js.map +1 -1
- package/build-module/components/global-styles/screen-block.js +28 -38
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-color-palette.js +1 -4
- package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
- package/build-module/components/global-styles/screen-colors.js +2 -6
- package/build-module/components/global-styles/screen-colors.js.map +1 -1
- package/build-module/components/global-styles/screen-css.js +1 -5
- package/build-module/components/global-styles/screen-css.js.map +1 -1
- package/build-module/components/global-styles/screen-layout.js +2 -6
- package/build-module/components/global-styles/screen-layout.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/index.js +7 -13
- package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +22 -22
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +12 -16
- package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
- package/build-module/components/global-styles/screen-root.js +2 -9
- package/build-module/components/global-styles/screen-root.js.map +1 -1
- package/build-module/components/global-styles/screen-style-variations.js +6 -9
- package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
- package/build-module/components/global-styles/screen-typography-element.js +2 -6
- package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js +4 -8
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/style-variations-container.js +5 -15
- package/build-module/components/global-styles/style-variations-container.js.map +1 -1
- package/build-module/components/global-styles/subtitle.js +0 -3
- package/build-module/components/global-styles/subtitle.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +1 -4
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-preview.js +1 -4
- package/build-module/components/global-styles/typography-preview.js.map +1 -1
- package/build-module/components/global-styles/ui.js +15 -37
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles/utils.js +0 -1
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/global-styles/variations-panel.js +0 -4
- package/build-module/components/global-styles/variations-panel.js.map +1 -1
- package/build-module/components/global-styles-renderer/index.js +3 -6
- package/build-module/components/global-styles-renderer/index.js.map +1 -1
- package/build-module/components/header-edit-mode/document-actions/index.js +12 -41
- package/build-module/components/header-edit-mode/document-actions/index.js.map +1 -1
- package/build-module/components/header-edit-mode/index.js +9 -18
- package/build-module/components/header-edit-mode/index.js.map +1 -1
- package/build-module/components/header-edit-mode/mode-switcher/index.js +4 -7
- package/build-module/components/header-edit-mode/mode-switcher/index.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js +1 -6
- package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/index.js +2 -6
- package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/site-export.js +1 -6
- package/build-module/components/header-edit-mode/more-menu/site-export.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js +0 -1
- package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
- package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js +1 -2
- package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js.map +1 -1
- package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +3 -2
- package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +1 -1
- package/build-module/components/header-edit-mode/tools-more-menu-group/index.js +0 -3
- package/build-module/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
- package/build-module/components/header-edit-mode/undo-redo/redo.js +4 -5
- package/build-module/components/header-edit-mode/undo-redo/redo.js.map +1 -1
- package/build-module/components/header-edit-mode/undo-redo/undo.js +4 -5
- package/build-module/components/header-edit-mode/undo-redo/undo.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +1 -4
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +5 -15
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -4
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/edit-mode.js +3 -13
- package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/global.js +1 -6
- package/build-module/components/keyboard-shortcuts/global.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/register.js +0 -2
- package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
- package/build-module/components/layout/hooks.js +2 -4
- package/build-module/components/layout/hooks.js.map +1 -1
- package/build-module/components/layout/index.js +19 -20
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/list/added-by.js +12 -15
- package/build-module/components/list/added-by.js.map +1 -1
- package/build-module/components/list/header.js +1 -4
- package/build-module/components/list/header.js.map +1 -1
- package/build-module/components/list/index.js +8 -6
- package/build-module/components/list/index.js.map +1 -1
- package/build-module/components/list/table.js +5 -7
- package/build-module/components/list/table.js.map +1 -1
- package/build-module/components/list/use-register-shortcuts.js +1 -0
- package/build-module/components/list/use-register-shortcuts.js.map +1 -1
- package/build-module/components/page/header.js +1 -1
- package/build-module/components/page/header.js.map +1 -1
- package/build-module/components/page/index.js +2 -3
- package/build-module/components/page/index.js.map +1 -1
- package/build-module/components/page-actions/index.js +1 -2
- package/build-module/components/page-actions/index.js.map +1 -1
- package/build-module/components/page-actions/trash-page-menu-item.js +3 -6
- package/build-module/components/page-actions/trash-page-menu-item.js.map +1 -1
- package/build-module/components/page-content-focus-manager/back-to-page-notification.js +3 -4
- package/build-module/components/page-content-focus-manager/back-to-page-notification.js.map +1 -1
- package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js +6 -9
- package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -1
- package/build-module/components/page-content-focus-manager/edit-template-notification.js +2 -12
- package/build-module/components/page-content-focus-manager/edit-template-notification.js.map +1 -1
- package/build-module/components/page-content-focus-manager/index.js +1 -2
- package/build-module/components/page-content-focus-manager/index.js.map +1 -1
- package/build-module/components/page-main/index.js +1 -4
- package/build-module/components/page-main/index.js.map +1 -1
- package/build-module/components/page-patterns/duplicate-menu-item.js +22 -40
- package/build-module/components/page-patterns/duplicate-menu-item.js.map +1 -1
- package/build-module/components/page-patterns/grid-item.js +13 -18
- package/build-module/components/page-patterns/grid-item.js.map +1 -1
- package/build-module/components/page-patterns/grid.js +0 -2
- package/build-module/components/page-patterns/grid.js.map +1 -1
- package/build-module/components/page-patterns/header.js +1 -4
- package/build-module/components/page-patterns/header.js.map +1 -1
- package/build-module/components/page-patterns/index.js +6 -5
- package/build-module/components/page-patterns/index.js.map +1 -1
- package/build-module/components/page-patterns/no-patterns.js +0 -1
- package/build-module/components/page-patterns/no-patterns.js.map +1 -1
- package/build-module/components/page-patterns/pagination.js +6 -4
- package/build-module/components/page-patterns/pagination.js.map +1 -1
- package/build-module/components/page-patterns/patterns-list.js +1 -7
- package/build-module/components/page-patterns/patterns-list.js.map +1 -1
- package/build-module/components/page-patterns/rename-menu-item.js +5 -8
- package/build-module/components/page-patterns/rename-menu-item.js.map +1 -1
- package/build-module/components/page-patterns/search-items.js +28 -32
- package/build-module/components/page-patterns/search-items.js.map +1 -1
- package/build-module/components/page-patterns/use-pattern-settings.js +5 -4
- package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +15 -24
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/page-patterns/utils.js.map +1 -1
- package/build-module/components/page-template-parts/add-new-template-part.js +1 -4
- package/build-module/components/page-template-parts/add-new-template-part.js.map +1 -1
- package/build-module/components/page-template-parts/index.js +1 -2
- package/build-module/components/page-template-parts/index.js.map +1 -1
- package/build-module/components/page-templates/index.js +1 -2
- package/build-module/components/page-templates/index.js.map +1 -1
- package/build-module/components/plugin-template-setting-panel/index.js +1 -1
- package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build-module/components/preferences-modal/enable-feature.js +0 -3
- package/build-module/components/preferences-modal/enable-feature.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +1 -8
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/resizable-frame/index.js +27 -38
- package/build-module/components/resizable-frame/index.js.map +1 -1
- package/build-module/components/revisions/index.js +5 -7
- package/build-module/components/revisions/index.js.map +1 -1
- package/build-module/components/routes/link.js +3 -8
- package/build-module/components/routes/link.js.map +1 -1
- package/build-module/components/routes/use-title.js +5 -7
- package/build-module/components/routes/use-title.js.map +1 -1
- package/build-module/components/save-button/index.js +3 -13
- package/build-module/components/save-button/index.js.map +1 -1
- package/build-module/components/save-hub/index.js +7 -16
- package/build-module/components/save-hub/index.js.map +1 -1
- package/build-module/components/save-panel/index.js +7 -17
- package/build-module/components/save-panel/index.js.map +1 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js +1 -2
- package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +21 -19
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/components/sidebar/index.js +1 -5
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-button/index.js +3 -3
- package/build-module/components/sidebar-button/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/constants.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/default-sidebar.js +2 -2
- package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +1 -6
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/index.js +1 -7
- package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js +11 -13
- package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/index.js +3 -5
- package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +1 -2
- package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-status.js +2 -11
- package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +0 -2
- package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js +2 -7
- package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +2 -3
- package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/settings-header/index.js +15 -17
- package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/sidebar-card/index.js +1 -2
- package/build-module/components/sidebar-edit-mode/sidebar-card/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -2
- package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/index.js +1 -7
- package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/last-revision.js +2 -11
- package/build-module/components/sidebar-edit-mode/template-panel/last-revision.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js +1 -4
- package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js +1 -10
- package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js.map +1 -1
- package/build-module/components/sidebar-navigation-item/index.js +1 -2
- package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +3 -7
- package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js +2 -4
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/index.js +1 -4
- package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +0 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +1 -2
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +0 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +19 -30
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +3 -3
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js +0 -4
- package/build-module/components/sidebar-navigation-screen-main/template-part-hint.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +1 -2
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +2 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js +2 -3
- package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +5 -13
- 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 +5 -9
- 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 +1 -7
- 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 +2 -6
- 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 +0 -2
- 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 +11 -28
- 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 +4 -4
- 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.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +16 -20
- 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 -9
- 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 +6 -6
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/index.js +6 -6
- package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/page-details.js +11 -22
- package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/status-label.js +3 -13
- package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pages/index.js +6 -17
- package/build-module/components/sidebar-navigation-screen-pages/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/index.js +11 -12
- package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +1 -2
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +0 -2
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +1 -2
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +4 -5
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +7 -19
- package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +8 -18
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +2 -4
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.js +4 -7
- 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 -2
- 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-my-patterns.js +0 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-my-patterns.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +11 -7
- 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 +5 -5
- 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 -2
- package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-template/home-template-details.js +7 -18
- package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-template/index.js +0 -6
- package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates/index.js +4 -6
- package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +1 -2
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build-module/components/site-hub/index.js +5 -7
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/site-icon/index.js +1 -6
- package/build-module/components/site-icon/index.js.map +1 -1
- package/build-module/components/start-template-options/index.js +3 -14
- package/build-module/components/start-template-options/index.js.map +1 -1
- package/build-module/components/style-book/index.js +24 -24
- package/build-module/components/style-book/index.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +8 -15
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +5 -7
- package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +9 -14
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
- package/build-module/components/table/index.js.map +1 -1
- package/build-module/components/template-actions/index.js +2 -9
- package/build-module/components/template-actions/index.js.map +1 -1
- package/build-module/components/template-actions/rename-menu-item.js +6 -8
- package/build-module/components/template-actions/rename-menu-item.js.map +1 -1
- package/build-module/components/template-part-converter/convert-to-regular.js +0 -3
- package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
- package/build-module/components/template-part-converter/convert-to-template-part.js +4 -5
- package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build-module/components/template-part-converter/index.js +3 -5
- package/build-module/components/template-part-converter/index.js.map +1 -1
- package/build-module/components/use-edited-entity-record/index.js +2 -7
- package/build-module/components/use-edited-entity-record/index.js.map +1 -1
- package/build-module/components/welcome-guide/editor.js +1 -4
- package/build-module/components/welcome-guide/editor.js.map +1 -1
- package/build-module/components/welcome-guide/image.js.map +1 -1
- package/build-module/components/welcome-guide/index.js +0 -1
- package/build-module/components/welcome-guide/index.js.map +1 -1
- package/build-module/components/welcome-guide/page.js +1 -5
- package/build-module/components/welcome-guide/page.js.map +1 -1
- package/build-module/components/welcome-guide/styles.js +1 -5
- package/build-module/components/welcome-guide/styles.js.map +1 -1
- package/build-module/components/welcome-guide/template.js +1 -5
- package/build-module/components/welcome-guide/template.js.map +1 -1
- package/build-module/hooks/commands/use-common-commands.js +133 -108
- package/build-module/hooks/commands/use-common-commands.js.map +1 -1
- package/build-module/hooks/commands/use-edit-mode-commands.js +69 -49
- package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
- package/build-module/hooks/components.js.map +1 -1
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/navigation-menu-edit.js +11 -14
- package/build-module/hooks/navigation-menu-edit.js.map +1 -1
- package/build-module/hooks/push-changes-to-global-styles/index.js +162 -61
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build-module/hooks/template-part-edit.js +7 -9
- package/build-module/hooks/template-part-edit.js.map +1 -1
- package/build-module/index.js +10 -15
- package/build-module/index.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/store/actions.js +35 -53
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/index.js +1 -1
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/private-actions.js +6 -8
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +1 -1
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +13 -29
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +26 -31
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils.js +13 -13
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/get-is-list-page.js +2 -1
- package/build-module/utils/get-is-list-page.js.map +1 -1
- package/build-module/utils/is-previewing-theme.js +0 -1
- package/build-module/utils/is-previewing-theme.js.map +1 -1
- package/build-module/utils/is-template-removable.js +0 -1
- package/build-module/utils/is-template-removable.js.map +1 -1
- package/build-module/utils/is-template-revertable.js +0 -2
- package/build-module/utils/is-template-revertable.js.map +1 -1
- package/build-module/utils/template-part-create.js +3 -7
- package/build-module/utils/template-part-create.js.map +1 -1
- package/build-module/utils/use-activate-theme.js +2 -2
- package/build-module/utils/use-activate-theme.js.map +1 -1
- package/build-module/utils/use-debounced-input.js.map +1 -1
- package/build-style/style-rtl.css +37 -27
- package/build-style/style.css +37 -27
- package/package.json +41 -40
- package/src/components/add-new-pattern/index.js +4 -3
- package/src/components/block-editor/index.js +4 -3
- package/src/components/block-editor/providers/navigation-block-editor-provider.js +2 -3
- package/src/components/canvas-spinner/index.js +21 -3
- package/src/components/canvas-spinner/style.scss +5 -2
- package/src/components/editor/index.js +15 -1
- package/src/components/global-styles/block-preview-panel.js +26 -15
- package/src/components/global-styles/hooks.js +27 -1
- package/src/components/global-styles/preview.js +3 -13
- package/src/components/global-styles/screen-colors.js +0 -4
- package/src/components/global-styles/screen-layout.js +0 -2
- package/src/components/global-styles/screen-revisions/index.js +6 -4
- package/src/components/global-styles/screen-revisions/revisions-buttons.js +46 -21
- package/src/components/global-styles/screen-revisions/test/use-global-styles-revisions.js +10 -0
- package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +6 -0
- package/src/components/global-styles/screen-typography.js +0 -4
- package/src/components/global-styles/ui.js +1 -1
- package/src/components/header-edit-mode/document-actions/index.js +13 -26
- package/src/components/header-edit-mode/document-actions/style.scss +17 -4
- package/src/components/header-edit-mode/index.js +1 -1
- package/src/components/header-edit-mode/style.scss +0 -9
- package/src/components/layout/index.js +5 -2
- package/src/components/page-actions/trash-page-menu-item.js +5 -1
- package/src/components/page-content-focus-manager/disable-non-page-content-blocks.js +1 -4
- package/src/components/page-patterns/duplicate-menu-item.js +18 -39
- package/src/components/page-patterns/use-patterns.js +9 -3
- package/src/components/sidebar-edit-mode/default-sidebar.js +1 -0
- package/src/components/sidebar-edit-mode/page-panels/edit-template.js +13 -5
- package/src/components/sidebar-navigation-screen-global-styles/index.js +1 -1
- package/src/components/sidebar-navigation-screen-navigation-menu/index.js +3 -4
- package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +2 -1
- package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +11 -10
- package/src/components/sidebar-navigation-screen-page/index.js +3 -3
- package/src/components/sidebar-navigation-screen-pages/index.js +1 -1
- package/src/components/sidebar-navigation-screen-pattern/index.js +2 -5
- package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +0 -3
- package/src/components/sidebar-navigation-screen-patterns/index.js +1 -1
- package/src/components/sidebar-navigation-screen-template/home-template-details.js +4 -2
- package/src/components/sidebar-navigation-screen-templates/index.js +1 -1
- package/src/components/site-hub/index.js +1 -1
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +2 -8
- package/src/components/template-actions/index.js +1 -5
- package/src/components/use-edited-entity-record/index.js +1 -6
- package/src/hooks/commands/use-common-commands.js +153 -72
- package/src/hooks/commands/use-edit-mode-commands.js +61 -19
- package/src/hooks/navigation-menu-edit.js +1 -5
- package/src/hooks/push-changes-to-global-styles/index.js +163 -28
- package/src/style.scss +0 -1
- package/build/components/create-pattern-modal/index.js +0 -129
- package/build/components/create-pattern-modal/index.js.map +0 -1
- package/build/utils/normalize-record-key.js +0 -19
- package/build/utils/normalize-record-key.js.map +0 -1
- package/build-module/components/create-pattern-modal/index.js +0 -116
- package/build-module/components/create-pattern-modal/index.js.map +0 -1
- package/build-module/utils/normalize-record-key.js +0 -12
- package/build-module/utils/normalize-record-key.js.map +0 -1
- package/src/components/create-pattern-modal/index.js +0 -136
- package/src/components/create-pattern-modal/style.scss +0 -3
- package/src/utils/normalize-record-key.js +0 -11
- /package/src/components/global-styles/stories/{index.js → index.story.js} +0 -0
|
@@ -1,36 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = SidebarNavigationScreen;
|
|
9
|
-
|
|
10
8
|
var _element = require("@wordpress/element");
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _components = require("@wordpress/components");
|
|
15
|
-
|
|
16
11
|
var _i18n = require("@wordpress/i18n");
|
|
17
|
-
|
|
18
12
|
var _icons = require("@wordpress/icons");
|
|
19
|
-
|
|
20
13
|
var _coreData = require("@wordpress/core-data");
|
|
21
|
-
|
|
22
14
|
var _data = require("@wordpress/data");
|
|
23
|
-
|
|
24
15
|
var _router = require("@wordpress/router");
|
|
25
|
-
|
|
26
16
|
var _store = require("../../store");
|
|
27
|
-
|
|
28
17
|
var _lockUnlock = require("../../lock-unlock");
|
|
29
|
-
|
|
30
18
|
var _sidebarButton = _interopRequireDefault(require("../sidebar-button"));
|
|
31
|
-
|
|
32
19
|
var _isPreviewingTheme = require("../../utils/is-previewing-theme");
|
|
33
|
-
|
|
34
20
|
/**
|
|
35
21
|
* External dependencies
|
|
36
22
|
*/
|
|
@@ -42,10 +28,10 @@ var _isPreviewingTheme = require("../../utils/is-previewing-theme");
|
|
|
42
28
|
/**
|
|
43
29
|
* Internal dependencies
|
|
44
30
|
*/
|
|
31
|
+
|
|
45
32
|
const {
|
|
46
33
|
useLocation
|
|
47
34
|
} = (0, _lockUnlock.unlock)(_router.privateApis);
|
|
48
|
-
|
|
49
35
|
function SidebarNavigationScreen({
|
|
50
36
|
isRoot,
|
|
51
37
|
title,
|
|
@@ -86,7 +72,6 @@ function SidebarNavigationScreen({
|
|
|
86
72
|
}, !isRoot && (0, _element.createElement)(_sidebarButton.default, {
|
|
87
73
|
onClick: () => {
|
|
88
74
|
const backPath = backPathProp !== null && backPathProp !== void 0 ? backPathProp : location.state?.backPath;
|
|
89
|
-
|
|
90
75
|
if (backPath) {
|
|
91
76
|
navigator.goTo(backPath, {
|
|
92
77
|
isBack: true
|
|
@@ -104,9 +89,7 @@ function SidebarNavigationScreen({
|
|
|
104
89
|
href: !(0, _isPreviewingTheme.isPreviewingTheme)() ? dashboardLink || 'index.php' : 'themes.php'
|
|
105
90
|
}), (0, _element.createElement)(_components.__experimentalHeading, {
|
|
106
91
|
className: "edit-site-sidebar-navigation-screen__title",
|
|
107
|
-
color: '#e0e0e0'
|
|
108
|
-
/* $gray-200 */
|
|
109
|
-
,
|
|
92
|
+
color: '#e0e0e0' /* $gray-200 */,
|
|
110
93
|
level: 1,
|
|
111
94
|
size: 20
|
|
112
95
|
}, !(0, _isPreviewingTheme.isPreviewingTheme)() ? title : (0, _i18n.sprintf)('Previewing %1$s: %2$s', theme?.name?.rendered, title)), actions && (0, _element.createElement)("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_classnames","_interopRequireDefault","require","_components","_i18n","_icons","_coreData","_data","_router","_store","_lockUnlock","_sidebarButton","_isPreviewingTheme","useLocation","unlock","routerPrivateApis","SidebarNavigationScreen","isRoot","title","actions","meta","content","footer","description","backPath","backPathProp","dashboardLink","useSelect","select","getSettings","editSiteStore","__experimentalDashboardLink","getTheme","coreStore","location","navigator","useNavigator","theme","currentlyPreviewingTheme","icon","isRTL","chevronRight","chevronLeft","_element","createElement","Fragment","__experimentalVStack","className","classnames","spacing","justify","__experimentalHStack","alignment","default","onClick","state","goTo","isBack","goToParent","label","__","showTooltip","isPreviewingTheme","href","__experimentalHeading","color","level","size","sprintf","name","rendered"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalHeading as Heading,\n\t__experimentalUseNavigator as useNavigator,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { isRTL, __, sprintf } from '@wordpress/i18n';\nimport { chevronRight, chevronLeft } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport SidebarButton from '../sidebar-button';\nimport {\n\tisPreviewingTheme,\n\tcurrentlyPreviewingTheme,\n} from '../../utils/is-previewing-theme';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function SidebarNavigationScreen( {\n\tisRoot,\n\ttitle,\n\tactions,\n\tmeta,\n\tcontent,\n\tfooter,\n\tdescription,\n\tbackPath: backPathProp,\n} ) {\n\tconst { dashboardLink } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\treturn {\n\t\t\tdashboardLink: getSettings().__experimentalDashboardLink,\n\t\t};\n\t}, [] );\n\tconst { getTheme } = useSelect( coreStore );\n\tconst location = useLocation();\n\tconst navigator = useNavigator();\n\tconst theme = getTheme( currentlyPreviewingTheme() );\n\tconst icon = isRTL() ? chevronRight : chevronLeft;\n\n\treturn (\n\t\t<>\n\t\t\t<VStack\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'edit-site-sidebar-navigation-screen__main',\n\t\t\t\t\t{\n\t\t\t\t\t\t'has-footer': !! footer,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\tspacing={ 0 }\n\t\t\t\tjustify=\"flex-start\"\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tspacing={ 4 }\n\t\t\t\t\talignment=\"flex-start\"\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__title-icon\"\n\t\t\t\t>\n\t\t\t\t\t{ ! isRoot && (\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tconst backPath =\n\t\t\t\t\t\t\t\t\tbackPathProp ?? location.state?.backPath;\n\t\t\t\t\t\t\t\tif ( backPath ) {\n\t\t\t\t\t\t\t\t\tnavigator.goTo( backPath, {\n\t\t\t\t\t\t\t\t\t\tisBack: true,\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnavigator.goToParent();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t\t\tshowTooltip={ false }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isRoot && (\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t! isPreviewingTheme()\n\t\t\t\t\t\t\t\t\t? __( 'Go to the Dashboard' )\n\t\t\t\t\t\t\t\t\t: __( 'Go back to the theme showcase' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t! isPreviewingTheme()\n\t\t\t\t\t\t\t\t\t? dashboardLink || 'index.php'\n\t\t\t\t\t\t\t\t\t: 'themes.php'\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<Heading\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__title\"\n\t\t\t\t\t\tcolor={ '#e0e0e0' /* $gray-200 */ }\n\t\t\t\t\t\tlevel={ 1 }\n\t\t\t\t\t\tsize={ 20 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! isPreviewingTheme()\n\t\t\t\t\t\t\t? title\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t'Previewing %1$s: %2$s',\n\t\t\t\t\t\t\t\t\ttheme?.name?.rendered,\n\t\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\t ) }\n\t\t\t\t\t</Heading>\n\t\t\t\t\t{ actions && (\n\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__actions\">\n\t\t\t\t\t\t\t{ actions }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t\t{ meta && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__meta\">\n\t\t\t\t\t\t\t{ meta }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\n\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__content\">\n\t\t\t\t\t{ description && (\n\t\t\t\t\t\t<p className=\"edit-site-sidebar-navigation-screen__description\">\n\t\t\t\t\t\t\t{ description }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) }\n\t\t\t\t\t{ content }\n\t\t\t\t</div>\n\t\t\t</VStack>\n\t\t\t{ footer && (\n\t\t\t\t<footer className=\"edit-site-sidebar-navigation-screen__footer\">\n\t\t\t\t\t{ footer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IACDG,IAAI,EACH,CAAE,IAAAD,oCAAiB,EAAC,CAAC,GAClBpC,aAAa,IAAI,WAAW,GAC5B;EACH,CACD,CACD,EACD,IAAAiB,QAAA,CAAAC,aAAA,EAACzC,WAAA,CAAA6D,qBAAO;IACPjB,SAAS,EAAC,4CAA4C;IACtDkB,KAAK,EAAG,SAAS,CAAC,eAAiB;IACnCC,KAAK,EAAG,CAAG;IACXC,IAAI,EAAG;EAAI,GAET,CAAE,IAAAL,oCAAiB,EAAC,CAAC,GACpB5C,KAAK,GACL,IAAAkD,aAAO,EACP,uBAAuB,EACvB/B,KAAK,EAAEgC,IAAI,EAAEC,QAAQ,EACrBpD,KACA,CACK,CAAC,EACRC,OAAO,IACR,IAAAwB,QAAA,CAAAC,aAAA;IAAKG,SAAS,EAAC;EAA8C,GAC1D5B,OACE,CAEC,CAAC,EACPC,IAAI,IACL,IAAAuB,QAAA,CAAAC,aAAA,EAAAD,QAAA,CAAAE,QAAA,QACC,IAAAF,QAAA,CAAAC,aAAA;IAAKG,SAAS,EAAC;EAA2C,GACvD3B,IACE,CACJ,CACF,EAED,IAAAuB,QAAA,CAAAC,aAAA;IAAKG,SAAS,EAAC;EAA8C,GAC1DxB,WAAW,IACZ,IAAAoB,QAAA,CAAAC,aAAA;IAAGG,SAAS,EAAC;EAAkD,GAC5DxB,WACA,CACH,EACCF,OACE,CACE,CAAC,EACPC,MAAM,IACP,IAAAqB,QAAA,CAAAC,aAAA;IAAQG,SAAS,EAAC;EAA6C,GAC5DzB,MACK,CAER,CAAC;AAEL"}
|
|
@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = SidebarNavigationScreenDetailsFooter;
|
|
7
|
-
|
|
8
7
|
var _element = require("@wordpress/element");
|
|
9
|
-
|
|
10
8
|
var _i18n = require("@wordpress/i18n");
|
|
11
|
-
|
|
12
9
|
var _date = require("@wordpress/date");
|
|
13
|
-
|
|
14
10
|
var _sidebarNavigationScreenDetailsPanel = require("../sidebar-navigation-screen-details-panel");
|
|
15
|
-
|
|
16
11
|
/**
|
|
17
12
|
* WordPress dependencies
|
|
18
13
|
*/
|
|
@@ -20,13 +15,13 @@ var _sidebarNavigationScreenDetailsPanel = require("../sidebar-navigation-screen
|
|
|
20
15
|
/**
|
|
21
16
|
* Internal dependencies
|
|
22
17
|
*/
|
|
18
|
+
|
|
23
19
|
function SidebarNavigationScreenDetailsFooter({
|
|
24
20
|
lastModifiedDateTime
|
|
25
21
|
}) {
|
|
26
22
|
return (0, _element.createElement)(_element.Fragment, null, lastModifiedDateTime && (0, _element.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanelRow, {
|
|
27
23
|
className: "edit-site-sidebar-navigation-screen-details-footer"
|
|
28
|
-
}, (0, _element.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanelLabel, null, (0, _i18n.__)('Last modified')), (0, _element.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanelValue, null, (0, _element.createInterpolateElement)((0, _i18n.sprintf)(
|
|
29
|
-
/* translators: %s: is the relative time when the post was last modified. */
|
|
24
|
+
}, (0, _element.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanelLabel, null, (0, _i18n.__)('Last modified')), (0, _element.createElement)(_sidebarNavigationScreenDetailsPanel.SidebarNavigationScreenDetailsPanelValue, null, (0, _element.createInterpolateElement)((0, _i18n.sprintf)( /* translators: %s: is the relative time when the post was last modified. */
|
|
30
25
|
(0, _i18n.__)('<time>%s</time>'), (0, _date.humanTimeDiff)(lastModifiedDateTime)), {
|
|
31
26
|
time: (0, _element.createElement)("time", {
|
|
32
27
|
dateTime: lastModifiedDateTime
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_element","require","_i18n","_date","_sidebarNavigationScreenDetailsPanel","SidebarNavigationScreenDetailsFooter","lastModifiedDateTime","createElement","Fragment","SidebarNavigationScreenDetailsPanelRow","className","SidebarNavigationScreenDetailsPanelLabel","__","SidebarNavigationScreenDetailsPanelValue","createInterpolateElement","sprintf","humanTimeDiff","time","dateTime"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-footer/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { humanTimeDiff } from '@wordpress/date';\nimport { createInterpolateElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tSidebarNavigationScreenDetailsPanelRow,\n\tSidebarNavigationScreenDetailsPanelLabel,\n\tSidebarNavigationScreenDetailsPanelValue,\n} from '../sidebar-navigation-screen-details-panel';\n\nexport default function SidebarNavigationScreenDetailsFooter( {\n\tlastModifiedDateTime,\n} ) {\n\treturn (\n\t\t<>\n\t\t\t{ lastModifiedDateTime && (\n\t\t\t\t<SidebarNavigationScreenDetailsPanelRow className=\"edit-site-sidebar-navigation-screen-details-footer\">\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t\t{ __( 'Last modified' ) }\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: is the relative time when the post was last modified. */\n\t\t\t\t\t\t\t\t__( '<time>%s</time>' ),\n\t\t\t\t\t\t\t\thumanTimeDiff( lastModifiedDateTime )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttime: (\n\t\t\t\t\t\t\t\t\t<time dateTime={ lastModifiedDateTime } />\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;AAKA,IAAAA,QAAA,GAAAC,OAAA;AAFA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAMA,IAAAG,oCAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAKA;AACA;AACA;;AAOe,SAASI,oCAAoCA,CAAE;EAC7DC;AACD,CAAC,EAAG;EACH,OACC,IAAAN,QAAA,CAAAO,aAAA,EAAAP,QAAA,CAAAQ,QAAA,QACGF,oBAAoB,IACrB,IAAAN,QAAA,CAAAO,aAAA,EAACH,oCAAA,CAAAK,sCAAsC;IAACC,SAAS,EAAC;EAAoD,GACrG,IAAAV,QAAA,CAAAO,aAAA,EAACH,oCAAA,CAAAO,wCAAwC,QACtC,IAAAC,QAAE,EAAE,eAAgB,CACmB,CAAC,EAC3C,IAAAZ,QAAA,CAAAO,aAAA,EAACH,oCAAA,CAAAS,wCAAwC,QACtC,IAAAC,iCAAwB,EACzB,IAAAC,aAAO,GACN;EACA,IAAAH,QAAE,EAAE,iBAAkB,CAAC,EACvB,IAAAI,mBAAa,EAAEV,oBAAqB,CACrC,CAAC,EACD;IACCW,IAAI,EACH,IAAAjB,QAAA,CAAAO,aAAA;MAAMW,QAAQ,EAAGZ;IAAsB,CAAE;EAE3C,CACD,CACyC,CACH,CAExC,CAAC;AAEL"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -24,17 +23,11 @@ Object.defineProperty(exports, "SidebarNavigationScreenDetailsPanelValue", {
|
|
|
24
23
|
return _sidebarNavigationScreenDetailsPanelValue.default;
|
|
25
24
|
}
|
|
26
25
|
});
|
|
27
|
-
|
|
28
26
|
var _element = require("@wordpress/element");
|
|
29
|
-
|
|
30
27
|
var _components = require("@wordpress/components");
|
|
31
|
-
|
|
32
28
|
var _sidebarNavigationScreenDetailsPanelLabel = _interopRequireDefault(require("./sidebar-navigation-screen-details-panel-label"));
|
|
33
|
-
|
|
34
29
|
var _sidebarNavigationScreenDetailsPanelRow = _interopRequireDefault(require("./sidebar-navigation-screen-details-panel-row"));
|
|
35
|
-
|
|
36
30
|
var _sidebarNavigationScreenDetailsPanelValue = _interopRequireDefault(require("./sidebar-navigation-screen-details-panel-value"));
|
|
37
|
-
|
|
38
31
|
/**
|
|
39
32
|
* WordPress dependencies
|
|
40
33
|
*/
|
|
@@ -42,6 +35,7 @@ var _sidebarNavigationScreenDetailsPanelValue = _interopRequireDefault(require("
|
|
|
42
35
|
/**
|
|
43
36
|
* Internal dependencies
|
|
44
37
|
*/
|
|
38
|
+
|
|
45
39
|
function SidebarNavigationScreenDetailsPanel({
|
|
46
40
|
title,
|
|
47
41
|
children,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_components","require","_sidebarNavigationScreenDetailsPanelLabel","_interopRequireDefault","_sidebarNavigationScreenDetailsPanelRow","_sidebarNavigationScreenDetailsPanelValue","SidebarNavigationScreenDetailsPanel","title","children","spacing","_element","createElement","__experimentalVStack","className","__experimentalHeading","level"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalHeading as Heading,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreenDetailsPanelLabel from './sidebar-navigation-screen-details-panel-label';\nimport SidebarNavigationScreenDetailsPanelRow from './sidebar-navigation-screen-details-panel-row';\nimport SidebarNavigationScreenDetailsPanelValue from './sidebar-navigation-screen-details-panel-value';\n\nfunction SidebarNavigationScreenDetailsPanel( { title, children, spacing } ) {\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"edit-site-sidebar-navigation-details-screen-panel\"\n\t\t\tspacing={ spacing }\n\t\t>\n\t\t\t{ title && (\n\t\t\t\t<Heading\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-details-screen-panel__heading\"\n\t\t\t\t\tlevel={ 2 }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</Heading>\n\t\t\t) }\n\t\t\t{ children }\n\t\t</VStack>\n\t);\n}\n\nexport {\n\tSidebarNavigationScreenDetailsPanel,\n\tSidebarNavigationScreenDetailsPanelRow,\n\tSidebarNavigationScreenDetailsPanelLabel,\n\tSidebarNavigationScreenDetailsPanelValue,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,yCAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,uCAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,yCAAA,GAAAF,sBAAA,CAAAF,OAAA;AAbA;AACA;AACA;;AAMA;AACA;AACA;;AAKA,SAASK,mCAAmCA,CAAE;EAAEC,KAAK;EAAEC,QAAQ;EAAEC;AAAQ,CAAC,EAAG;EAC5E,OACC,IAAAC,QAAA,CAAAC,aAAA,EAACX,WAAA,CAAAY,oBAAM;IACNC,SAAS,EAAC,mDAAmD;IAC7DJ,OAAO,EAAGA;EAAS,GAEjBF,KAAK,IACN,IAAAG,QAAA,CAAAC,aAAA,EAACX,WAAA,CAAAc,qBAAO;IACPD,SAAS,EAAC,4DAA4D;IACtEE,KAAK,EAAG;EAAG,GAETR,KACM,CACT,EACCC,QACK,CAAC;AAEX"}
|
|
@@ -4,14 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = SidebarNavigationScreenDetailsPanelLabel;
|
|
7
|
-
|
|
8
7
|
var _element = require("@wordpress/element");
|
|
9
|
-
|
|
10
8
|
var _components = require("@wordpress/components");
|
|
11
|
-
|
|
12
9
|
/**
|
|
13
10
|
* WordPress dependencies
|
|
14
11
|
*/
|
|
12
|
+
|
|
15
13
|
function SidebarNavigationScreenDetailsPanelLabel({
|
|
16
14
|
children
|
|
17
15
|
}) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js"],"
|
|
1
|
+
{"version":3,"names":["_components","require","SidebarNavigationScreenDetailsPanelLabel","children","_element","createElement","__experimentalText","className"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelLabel( {\n\tchildren,\n} ) {\n\treturn (\n\t\t<Text className=\"edit-site-sidebar-navigation-details-screen-panel__label\">\n\t\t\t{ children }\n\t\t</Text>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGe,SAASC,wCAAwCA,CAAE;EACjEC;AACD,CAAC,EAAG;EACH,OACC,IAAAC,QAAA,CAAAC,aAAA,EAACL,WAAA,CAAAM,kBAAI;IAACC,SAAS,EAAC;EAA0D,GACvEJ,QACG,CAAC;AAET"}
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = SidebarNavigationScreenDetailsPanelRow;
|
|
9
|
-
|
|
10
8
|
var _element = require("@wordpress/element");
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _components = require("@wordpress/components");
|
|
15
|
-
|
|
16
11
|
/**
|
|
17
12
|
* External dependencies
|
|
18
13
|
*/
|
|
@@ -20,6 +15,7 @@ var _components = require("@wordpress/components");
|
|
|
20
15
|
/**
|
|
21
16
|
* WordPress dependencies
|
|
22
17
|
*/
|
|
18
|
+
|
|
23
19
|
function SidebarNavigationScreenDetailsPanelRow({
|
|
24
20
|
label,
|
|
25
21
|
children,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js"],"
|
|
1
|
+
{"version":3,"names":["_classnames","_interopRequireDefault","require","_components","SidebarNavigationScreenDetailsPanelRow","label","children","className","_element","createElement","__experimentalHStack","key","spacing","alignment","classnames"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelRow( {\n\tlabel,\n\tchildren,\n\tclassName,\n} ) {\n\treturn (\n\t\t<HStack\n\t\t\tkey={ label }\n\t\t\tspacing={ 5 }\n\t\t\talignment=\"left\"\n\t\t\tclassName={ classnames(\n\t\t\t\t'edit-site-sidebar-navigation-details-screen-panel__row',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t{ children }\n\t\t</HStack>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGe,SAASE,sCAAsCA,CAAE;EAC/DC,KAAK;EACLC,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,OACC,IAAAC,QAAA,CAAAC,aAAA,EAACN,WAAA,CAAAO,oBAAM;IACNC,GAAG,EAAGN,KAAO;IACbO,OAAO,EAAG,CAAG;IACbC,SAAS,EAAC,MAAM;IAChBN,SAAS,EAAG,IAAAO,mBAAU,EACrB,wDAAwD,EACxDP,SACD;EAAG,GAEDD,QACK,CAAC;AAEX"}
|
|
@@ -4,14 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = SidebarNavigationScreenDetailsPanelValue;
|
|
7
|
-
|
|
8
7
|
var _element = require("@wordpress/element");
|
|
9
|
-
|
|
10
8
|
var _components = require("@wordpress/components");
|
|
11
|
-
|
|
12
9
|
/**
|
|
13
10
|
* WordPress dependencies
|
|
14
11
|
*/
|
|
12
|
+
|
|
15
13
|
function SidebarNavigationScreenDetailsPanelValue({
|
|
16
14
|
children
|
|
17
15
|
}) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js"],"
|
|
1
|
+
{"version":3,"names":["_components","require","SidebarNavigationScreenDetailsPanelValue","children","_element","createElement","__experimentalText","className"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelValue( {\n\tchildren,\n} ) {\n\treturn (\n\t\t<Text className=\"edit-site-sidebar-navigation-details-screen-panel__value\">\n\t\t\t{ children }\n\t\t</Text>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGe,SAASC,wCAAwCA,CAAE;EACjEC;AACD,CAAC,EAAG;EACH,OACC,IAAAC,QAAA,CAAAC,aAAA,EAACL,WAAA,CAAAM,kBAAI;IAACC,SAAS,EAAC;EAA0D,GACvEJ,QACG,CAAC;AAET"}
|
|
@@ -1,51 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.SidebarNavigationItemGlobalStyles = SidebarNavigationItemGlobalStyles;
|
|
9
8
|
exports.default = SidebarNavigationScreenGlobalStyles;
|
|
10
|
-
|
|
11
9
|
var _element = require("@wordpress/element");
|
|
12
|
-
|
|
13
10
|
var _i18n = require("@wordpress/i18n");
|
|
14
|
-
|
|
15
11
|
var _icons = require("@wordpress/icons");
|
|
16
|
-
|
|
17
12
|
var _data = require("@wordpress/data");
|
|
18
|
-
|
|
19
13
|
var _coreData = require("@wordpress/core-data");
|
|
20
|
-
|
|
21
14
|
var _components = require("@wordpress/components");
|
|
22
|
-
|
|
23
15
|
var _compose = require("@wordpress/compose");
|
|
24
|
-
|
|
25
16
|
var _blockEditor = require("@wordpress/block-editor");
|
|
26
|
-
|
|
27
17
|
var _date = require("@wordpress/date");
|
|
28
|
-
|
|
29
18
|
var _notices = require("@wordpress/notices");
|
|
30
|
-
|
|
31
19
|
var _preferences = require("@wordpress/preferences");
|
|
32
|
-
|
|
33
20
|
var _sidebarNavigationScreen = _interopRequireDefault(require("../sidebar-navigation-screen"));
|
|
34
|
-
|
|
35
21
|
var _styleVariationsContainer = _interopRequireDefault(require("../global-styles/style-variations-container"));
|
|
36
|
-
|
|
37
22
|
var _lockUnlock = require("../../lock-unlock");
|
|
38
|
-
|
|
39
23
|
var _store = require("../../store");
|
|
40
|
-
|
|
41
24
|
var _sidebarButton = _interopRequireDefault(require("../sidebar-button"));
|
|
42
|
-
|
|
43
25
|
var _sidebarNavigationItem = _interopRequireDefault(require("../sidebar-navigation-item"));
|
|
44
|
-
|
|
45
26
|
var _styleBook = _interopRequireDefault(require("../style-book"));
|
|
46
|
-
|
|
47
27
|
var _useGlobalStylesRevisions = _interopRequireDefault(require("../global-styles/screen-revisions/use-global-styles-revisions"));
|
|
48
|
-
|
|
49
28
|
/**
|
|
50
29
|
* WordPress dependencies
|
|
51
30
|
*/
|
|
@@ -53,8 +32,8 @@ var _useGlobalStylesRevisions = _interopRequireDefault(require("../global-styles
|
|
|
53
32
|
/**
|
|
54
33
|
* Internal dependencies
|
|
55
34
|
*/
|
|
56
|
-
const noop = () => {};
|
|
57
35
|
|
|
36
|
+
const noop = () => {};
|
|
58
37
|
function SidebarNavigationItemGlobalStyles(props) {
|
|
59
38
|
const {
|
|
60
39
|
openGeneralSidebar
|
|
@@ -73,11 +52,9 @@ function SidebarNavigationItemGlobalStyles(props) {
|
|
|
73
52
|
} = (0, _data.useSelect)(_preferences.store);
|
|
74
53
|
const turnOffDistractionFreeMode = (0, _element.useCallback)(() => {
|
|
75
54
|
const isDistractionFree = getPreference(_store.store.name, 'distractionFree');
|
|
76
|
-
|
|
77
55
|
if (!isDistractionFree) {
|
|
78
56
|
return;
|
|
79
57
|
}
|
|
80
|
-
|
|
81
58
|
setPreference(_store.store.name, 'distractionFree', false);
|
|
82
59
|
createNotice('info', (0, _i18n.__)('Distraction free mode turned off'), {
|
|
83
60
|
isDismissible: true,
|
|
@@ -85,25 +62,24 @@ function SidebarNavigationItemGlobalStyles(props) {
|
|
|
85
62
|
});
|
|
86
63
|
}, [createNotice, setPreference, getPreference]);
|
|
87
64
|
const hasGlobalStyleVariations = (0, _data.useSelect)(select => !!select(_coreData.store).__experimentalGetCurrentThemeGlobalStylesVariations()?.length, []);
|
|
88
|
-
|
|
89
65
|
if (hasGlobalStyleVariations) {
|
|
90
|
-
return (0, _element.createElement)(_components.__experimentalNavigatorButton, {
|
|
66
|
+
return (0, _element.createElement)(_components.__experimentalNavigatorButton, {
|
|
67
|
+
...props,
|
|
91
68
|
as: _sidebarNavigationItem.default,
|
|
92
69
|
path: "/wp_global_styles"
|
|
93
70
|
});
|
|
94
71
|
}
|
|
95
|
-
|
|
96
|
-
|
|
72
|
+
return (0, _element.createElement)(_sidebarNavigationItem.default, {
|
|
73
|
+
...props,
|
|
97
74
|
onClick: () => {
|
|
98
|
-
turnOffDistractionFreeMode();
|
|
99
|
-
|
|
100
|
-
setCanvasMode('edit');
|
|
101
|
-
|
|
75
|
+
turnOffDistractionFreeMode();
|
|
76
|
+
// Switch to edit mode.
|
|
77
|
+
setCanvasMode('edit');
|
|
78
|
+
// Open global styles sidebar.
|
|
102
79
|
openGeneralSidebar('edit-site/global-styles');
|
|
103
80
|
}
|
|
104
81
|
});
|
|
105
82
|
}
|
|
106
|
-
|
|
107
83
|
function SidebarNavigationScreenGlobalStylesContent() {
|
|
108
84
|
const {
|
|
109
85
|
storedSettings
|
|
@@ -114,19 +90,19 @@ function SidebarNavigationScreenGlobalStylesContent() {
|
|
|
114
90
|
return {
|
|
115
91
|
storedSettings: getSettings(false)
|
|
116
92
|
};
|
|
117
|
-
}, []);
|
|
93
|
+
}, []);
|
|
94
|
+
|
|
95
|
+
// Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are
|
|
118
96
|
// loaded. This is necessary because the Iframe component waits until
|
|
119
97
|
// the block editor store's `__internalIsInitialized` is true before
|
|
120
98
|
// rendering the iframe. Without this, the iframe previews will not render
|
|
121
99
|
// in mobile viewport sizes, where the editor canvas is hidden.
|
|
122
|
-
|
|
123
100
|
return (0, _element.createElement)(_blockEditor.BlockEditorProvider, {
|
|
124
101
|
settings: storedSettings,
|
|
125
102
|
onChange: noop,
|
|
126
103
|
onInput: noop
|
|
127
104
|
}, (0, _element.createElement)(_styleVariationsContainer.default, null));
|
|
128
105
|
}
|
|
129
|
-
|
|
130
106
|
function SidebarNavigationScreenGlobalStylesFooter({
|
|
131
107
|
modifiedDateTime,
|
|
132
108
|
onClickRevisions
|
|
@@ -154,7 +130,6 @@ function SidebarNavigationScreenGlobalStylesFooter({
|
|
|
154
130
|
}
|
|
155
131
|
}))));
|
|
156
132
|
}
|
|
157
|
-
|
|
158
133
|
function SidebarNavigationScreenGlobalStyles() {
|
|
159
134
|
const {
|
|
160
135
|
revisions,
|
|
@@ -184,7 +159,6 @@ function SidebarNavigationScreenGlobalStyles() {
|
|
|
184
159
|
revisionsCount
|
|
185
160
|
} = (0, _data.useSelect)(select => {
|
|
186
161
|
var _globalStyles$_links$;
|
|
187
|
-
|
|
188
162
|
const {
|
|
189
163
|
getCanvasMode,
|
|
190
164
|
getEditorCanvasContainerView
|
|
@@ -193,9 +167,7 @@ function SidebarNavigationScreenGlobalStyles() {
|
|
|
193
167
|
getEntityRecord,
|
|
194
168
|
__experimentalGetCurrentGlobalStylesId
|
|
195
169
|
} = select(_coreData.store);
|
|
196
|
-
|
|
197
170
|
const globalStylesId = __experimentalGetCurrentGlobalStylesId();
|
|
198
|
-
|
|
199
171
|
const globalStyles = globalStylesId ? getEntityRecord('root', 'globalStyles', globalStylesId) : undefined;
|
|
200
172
|
return {
|
|
201
173
|
isViewMode: 'view' === getCanvasMode(),
|
|
@@ -205,11 +177,9 @@ function SidebarNavigationScreenGlobalStyles() {
|
|
|
205
177
|
}, []);
|
|
206
178
|
const turnOffDistractionFreeMode = (0, _element.useCallback)(() => {
|
|
207
179
|
const isDistractionFree = getPreference(_store.store.name, 'distractionFree');
|
|
208
|
-
|
|
209
180
|
if (!isDistractionFree) {
|
|
210
181
|
return;
|
|
211
182
|
}
|
|
212
|
-
|
|
213
183
|
setPreference(_store.store.name, 'distractionFree', false);
|
|
214
184
|
createNotice('info', (0, _i18n.__)('Distraction free mode turned off'), {
|
|
215
185
|
isDismissible: true,
|
|
@@ -221,23 +191,24 @@ function SidebarNavigationScreenGlobalStyles() {
|
|
|
221
191
|
return Promise.all([setCanvasMode('edit'), openGeneralSidebar('edit-site/global-styles')]);
|
|
222
192
|
}, [setCanvasMode, openGeneralSidebar, turnOffDistractionFreeMode]);
|
|
223
193
|
const openStyleBook = (0, _element.useCallback)(async () => {
|
|
224
|
-
await openGlobalStyles();
|
|
194
|
+
await openGlobalStyles();
|
|
195
|
+
// Open the Style Book once the canvas mode is set to edit,
|
|
225
196
|
// and the global styles sidebar is open. This ensures that
|
|
226
197
|
// the Style Book is not prematurely closed.
|
|
227
|
-
|
|
228
198
|
setEditorCanvasContainerView('style-book');
|
|
229
199
|
setIsListViewOpened(false);
|
|
230
200
|
}, [openGlobalStyles, setEditorCanvasContainerView, setIsListViewOpened]);
|
|
231
201
|
const openRevisions = (0, _element.useCallback)(async () => {
|
|
232
|
-
await openGlobalStyles();
|
|
202
|
+
await openGlobalStyles();
|
|
203
|
+
// Open the global styles revisions once the canvas mode is set to edit,
|
|
233
204
|
// and the global styles sidebar is open. The global styles UI is responsible
|
|
234
205
|
// for redirecting to the revisions screen once the editor canvas container
|
|
235
206
|
// has been set to 'global-styles-revisions'.
|
|
236
|
-
|
|
237
207
|
setEditorCanvasContainerView('global-styles-revisions');
|
|
238
|
-
}, [openGlobalStyles, setEditorCanvasContainerView]);
|
|
208
|
+
}, [openGlobalStyles, setEditorCanvasContainerView]);
|
|
239
209
|
|
|
240
|
-
|
|
210
|
+
// If there are no revisions, do not render a footer.
|
|
211
|
+
const hasRevisions = revisionsCount > 0;
|
|
241
212
|
const modifiedDateTime = revisions?.[0]?.modified;
|
|
242
213
|
const shouldShowGlobalStylesFooter = hasRevisions && !isLoadingRevisions && modifiedDateTime;
|
|
243
214
|
return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_sidebarNavigationScreen.default, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js"],"names":["noop","SidebarNavigationItemGlobalStyles","props","openGeneralSidebar","editSiteStore","setCanvasMode","createNotice","noticesStore","set","setPreference","preferencesStore","get","getPreference","turnOffDistractionFreeMode","isDistractionFree","name","isDismissible","type","hasGlobalStyleVariations","select","coreStore","__experimentalGetCurrentThemeGlobalStylesVariations","length","SidebarNavigationItem","SidebarNavigationScreenGlobalStylesContent","storedSettings","getSettings","SidebarNavigationScreenGlobalStylesFooter","modifiedDateTime","onClickRevisions","backup","fill","SidebarNavigationScreenGlobalStyles","revisions","isLoading","isLoadingRevisions","setIsListViewOpened","isMobileViewport","setEditorCanvasContainerView","isViewMode","isStyleBookOpened","revisionsCount","getCanvasMode","getEditorCanvasContainerView","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","undefined","_links","count","openGlobalStyles","Promise","all","openStyleBook","openRevisions","hasRevisions","modified","shouldShowGlobalStylesFooter","seen","edit"],"mappings":";;;;;;;;;;AAgBA;;AAbA;;AACA;;AACA;;AACA;;AACA;;AAMA;;AACA;;AACA;;AAEA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AA9BA;AACA;AACA;;AAkBA;AACA;AACA;AAUA,MAAMA,IAAI,GAAG,MAAM,CAAE,CAArB;;AAEO,SAASC,iCAAT,CAA4CC,KAA5C,EAAoD;AAC1D,QAAM;AAAEC,IAAAA;AAAF,MAAyB,uBAAaC,YAAb,CAA/B;AACA,QAAM;AAAEC,IAAAA;AAAF,MAAoB,wBAAQ,uBAAaD,YAAb,CAAR,CAA1B;AACA,QAAM;AAAEE,IAAAA;AAAF,MAAmB,uBAAaC,cAAb,CAAzB;AACA,QAAM;AAAEC,IAAAA,GAAG,EAAEC;AAAP,MAAyB,uBAAaC,kBAAb,CAA/B;AACA,QAAM;AAAEC,IAAAA,GAAG,EAAEC;AAAP,MAAyB,qBAAWF,kBAAX,CAA/B;AAEA,QAAMG,0BAA0B,GAAG,0BAAa,MAAM;AACrD,UAAMC,iBAAiB,GAAGF,aAAa,CACtCR,aAAcW,IADwB,EAEtC,iBAFsC,CAAvC;;AAIA,QAAK,CAAED,iBAAP,EAA2B;AAC1B;AACA;;AACDL,IAAAA,aAAa,CAAEL,aAAcW,IAAhB,EAAsB,iBAAtB,EAAyC,KAAzC,CAAb;AACAT,IAAAA,YAAY,CAAE,MAAF,EAAU,cAAI,kCAAJ,CAAV,EAAoD;A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,CAFT;AAGC,MAAA,OAAO,EAAG,MACTrB,4BAA4B,CAC3B,CAAEE,iBAAF,GACG,YADH,GAEGQ,SAHwB,CAJ9B;AAUC,MAAA,SAAS,EAAGR;AAVb,MAFF,EAeC,4BAAC,sBAAD;AACC,MAAA,IAAI,EAAGoB,WADR;AAEC,MAAA,KAAK,EAAG,cAAI,aAAJ,CAFT;AAGC,MAAA,OAAO,EAAG,YAAY,MAAMT,gBAAgB;AAH7C,MAfD;AAfF,IADD,EAuCGX,iBAAiB,IAAI,CAAEH,gBAAvB,IAA2CE,UAA3C,IACD,4BAAC,kBAAD;AACC,IAAA,cAAc,EAAG,KADlB;AAEC,IAAA,UAAU,EAAG,MAAM,KAFpB;AAGC,IAAA,OAAO,EAAGe,aAHX;AAIC,IAAA,QAAQ,EAAGA,aAJZ;AAKC,IAAA,eAAe,EAAG,KALnB;AAMC,IAAA,QAAQ,EAAG;AANZ,IAxCF,CADD;AAoDA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { backup, edit, seen } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tIcon,\n\t__experimentalNavigatorButton as NavigatorButton,\n\t__experimentalVStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { BlockEditorProvider } from '@wordpress/block-editor';\nimport { humanTimeDiff } from '@wordpress/date';\nimport { useCallback } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport StyleVariationsContainer from '../global-styles/style-variations-container';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport StyleBook from '../style-book';\nimport useGlobalStylesRevisions from '../global-styles/screen-revisions/use-global-styles-revisions';\n\nconst noop = () => {};\n\nexport function SidebarNavigationItemGlobalStyles( props ) {\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst { get: getPreference } = useSelect( preferencesStore );\n\n\tconst turnOffDistractionFreeMode = useCallback( () => {\n\t\tconst isDistractionFree = getPreference(\n\t\t\teditSiteStore.name,\n\t\t\t'distractionFree'\n\t\t);\n\t\tif ( ! isDistractionFree ) {\n\t\t\treturn;\n\t\t}\n\t\tsetPreference( editSiteStore.name, 'distractionFree', false );\n\t\tcreateNotice( 'info', __( 'Distraction free mode turned off' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t}, [ createNotice, setPreference, getPreference ] );\n\tconst hasGlobalStyleVariations = useSelect(\n\t\t( select ) =>\n\t\t\t!! select(\n\t\t\t\tcoreStore\n\t\t\t).__experimentalGetCurrentThemeGlobalStylesVariations()?.length,\n\t\t[]\n\t);\n\tif ( hasGlobalStyleVariations ) {\n\t\treturn (\n\t\t\t<NavigatorButton\n\t\t\t\t{ ...props }\n\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\tpath=\"/wp_global_styles\"\n\t\t\t/>\n\t\t);\n\t}\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\t{ ...props }\n\t\t\tonClick={ () => {\n\t\t\t\tturnOffDistractionFreeMode();\n\t\t\t\t// Switch to edit mode.\n\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t// Open global styles sidebar.\n\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction SidebarNavigationScreenGlobalStylesContent() {\n\tconst { storedSettings } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\tstoredSettings: getSettings( false ),\n\t\t};\n\t}, [] );\n\n\t// Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are\n\t// loaded. This is necessary because the Iframe component waits until\n\t// the block editor store's `__internalIsInitialized` is true before\n\t// rendering the iframe. Without this, the iframe previews will not render\n\t// in mobile viewport sizes, where the editor canvas is hidden.\n\treturn (\n\t\t<BlockEditorProvider\n\t\t\tsettings={ storedSettings }\n\t\t\tonChange={ noop }\n\t\t\tonInput={ noop }\n\t\t>\n\t\t\t<StyleVariationsContainer />\n\t\t</BlockEditorProvider>\n\t);\n}\n\nfunction SidebarNavigationScreenGlobalStylesFooter( {\n\tmodifiedDateTime,\n\tonClickRevisions,\n} ) {\n\treturn (\n\t\t<VStack className=\"edit-site-sidebar-navigation-screen-global-styles__footer\">\n\t\t\t<SidebarNavigationItem\n\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-global-styles__revisions\"\n\t\t\t\tlabel={ __( 'Revisions' ) }\n\t\t\t\tonClick={ onClickRevisions }\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tas=\"span\"\n\t\t\t\t\talignment=\"center\"\n\t\t\t\t\tspacing={ 5 }\n\t\t\t\t\tdirection=\"row\"\n\t\t\t\t\tjustify=\"space-between\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-global-styles__revisions__label\">\n\t\t\t\t\t\t{ __( 'Last modified' ) }\n\t\t\t\t\t</span>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<time dateTime={ modifiedDateTime }>\n\t\t\t\t\t\t\t{ humanTimeDiff( modifiedDateTime ) }\n\t\t\t\t\t\t</time>\n\t\t\t\t\t</span>\n\t\t\t\t\t<Icon icon={ backup } style={ { fill: 'currentcolor' } } />\n\t\t\t\t</HStack>\n\t\t\t</SidebarNavigationItem>\n\t\t</VStack>\n\t);\n}\n\nexport default function SidebarNavigationScreenGlobalStyles() {\n\tconst { revisions, isLoading: isLoadingRevisions } =\n\t\tuseGlobalStylesRevisions();\n\tconst { openGeneralSidebar, setIsListViewOpened } =\n\t\tuseDispatch( editSiteStore );\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { setCanvasMode, setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst { get: getPreference } = useSelect( preferencesStore );\n\tconst { isViewMode, isStyleBookOpened, revisionsCount } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCanvasMode, getEditorCanvasContainerView } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\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\t\t\treturn {\n\t\t\t\tisViewMode: 'view' === getCanvasMode(),\n\t\t\t\tisStyleBookOpened:\n\t\t\t\t\t'style-book' === getEditorCanvasContainerView(),\n\t\t\t\trevisionsCount:\n\t\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ??\n\t\t\t\t\t0,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst turnOffDistractionFreeMode = useCallback( () => {\n\t\tconst isDistractionFree = getPreference(\n\t\t\teditSiteStore.name,\n\t\t\t'distractionFree'\n\t\t);\n\t\tif ( ! isDistractionFree ) {\n\t\t\treturn;\n\t\t}\n\t\tsetPreference( editSiteStore.name, 'distractionFree', false );\n\t\tcreateNotice( 'info', __( 'Distraction free mode turned off' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t}, [ createNotice, setPreference, getPreference ] );\n\n\tconst openGlobalStyles = useCallback( async () => {\n\t\tturnOffDistractionFreeMode();\n\t\treturn Promise.all( [\n\t\t\tsetCanvasMode( 'edit' ),\n\t\t\topenGeneralSidebar( 'edit-site/global-styles' ),\n\t\t] );\n\t}, [ setCanvasMode, openGeneralSidebar, turnOffDistractionFreeMode ] );\n\n\tconst openStyleBook = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the Style Book once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. This ensures that\n\t\t// the Style Book is not prematurely closed.\n\t\tsetEditorCanvasContainerView( 'style-book' );\n\t\tsetIsListViewOpened( false );\n\t}, [\n\t\topenGlobalStyles,\n\t\tsetEditorCanvasContainerView,\n\t\tsetIsListViewOpened,\n\t] );\n\n\tconst openRevisions = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the global styles revisions once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. The global styles UI is responsible\n\t\t// for redirecting to the revisions screen once the editor canvas container\n\t\t// has been set to 'global-styles-revisions'.\n\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t}, [ openGlobalStyles, setEditorCanvasContainerView ] );\n\n\t// If there are no revisions, do not render a footer.\n\tconst hasRevisions = revisionsCount >= 2;\n\tconst modifiedDateTime = revisions?.[ 0 ]?.modified;\n\tconst shouldShowGlobalStylesFooter =\n\t\thasRevisions && ! isLoadingRevisions && modifiedDateTime;\n\n\treturn (\n\t\t<>\n\t\t\t<SidebarNavigationScreen\n\t\t\t\ttitle={ __( 'Styles' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Choose a different style combination for the theme styles.'\n\t\t\t\t) }\n\t\t\t\tcontent={ <SidebarNavigationScreenGlobalStylesContent /> }\n\t\t\t\tfooter={\n\t\t\t\t\tshouldShowGlobalStylesFooter && (\n\t\t\t\t\t\t<SidebarNavigationScreenGlobalStylesFooter\n\t\t\t\t\t\t\tmodifiedDateTime={ modifiedDateTime }\n\t\t\t\t\t\t\tonClickRevisions={ openRevisions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isMobileViewport && (\n\t\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\t\ticon={ seen }\n\t\t\t\t\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t\t\t\t\t\t\t! isStyleBookOpened\n\t\t\t\t\t\t\t\t\t\t\t? 'style-book'\n\t\t\t\t\t\t\t\t\t\t\t: undefined\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\tisPressed={ isStyleBookOpened }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ edit }\n\t\t\t\t\t\t\tlabel={ __( 'Edit styles' ) }\n\t\t\t\t\t\t\tonClick={ async () => await openGlobalStyles() }\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\t{ isStyleBookOpened && ! isMobileViewport && isViewMode && (\n\t\t\t\t<StyleBook\n\t\t\t\t\tenableResizing={ false }\n\t\t\t\t\tisSelected={ () => false }\n\t\t\t\t\tonClick={ openStyleBook }\n\t\t\t\t\tonSelect={ openStyleBook }\n\t\t\t\t\tshowCloseButton={ false }\n\t\t\t\t\tshowTabs={ false }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"]}
|
|
1
|
+
{"version":3,"names":["_element","require","_i18n","_icons","_data","_coreData","_components","_compose","_blockEditor","_date","_notices","_preferences","_sidebarNavigationScreen","_interopRequireDefault","_styleVariationsContainer","_lockUnlock","_store","_sidebarButton","_sidebarNavigationItem","_styleBook","_useGlobalStylesRevisions","noop","SidebarNavigationItemGlobalStyles","props","openGeneralSidebar","useDispatch","editSiteStore","setCanvasMode","unlock","createNotice","noticesStore","set","setPreference","preferencesStore","get","getPreference","useSelect","turnOffDistractionFreeMode","useCallback","isDistractionFree","name","__","isDismissible","type","hasGlobalStyleVariations","select","coreStore","__experimentalGetCurrentThemeGlobalStylesVariations","length","createElement","__experimentalNavigatorButton","as","SidebarNavigationItem","path","default","onClick","SidebarNavigationScreenGlobalStylesContent","storedSettings","getSettings","BlockEditorProvider","settings","onChange","onInput","SidebarNavigationScreenGlobalStylesFooter","modifiedDateTime","onClickRevisions","__experimentalVStack","className","label","alignment","spacing","direction","justify","dateTime","humanTimeDiff","Icon","icon","backup","style","fill","SidebarNavigationScreenGlobalStyles","revisions","isLoading","isLoadingRevisions","useGlobalStylesRevisions","setIsListViewOpened","isMobileViewport","useViewportMatch","setEditorCanvasContainerView","isViewMode","isStyleBookOpened","revisionsCount","_globalStyles$_links$","getCanvasMode","getEditorCanvasContainerView","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","undefined","_links","count","openGlobalStyles","Promise","all","openStyleBook","openRevisions","hasRevisions","modified","shouldShowGlobalStylesFooter","Fragment","title","description","content","footer","actions","seen","isPressed","edit","enableResizing","isSelected","onSelect","showCloseButton","showTabs"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { backup, edit, seen } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tIcon,\n\t__experimentalNavigatorButton as NavigatorButton,\n\t__experimentalVStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { BlockEditorProvider } from '@wordpress/block-editor';\nimport { humanTimeDiff } from '@wordpress/date';\nimport { useCallback } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport StyleVariationsContainer from '../global-styles/style-variations-container';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport StyleBook from '../style-book';\nimport useGlobalStylesRevisions from '../global-styles/screen-revisions/use-global-styles-revisions';\n\nconst noop = () => {};\n\nexport function SidebarNavigationItemGlobalStyles( props ) {\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst { get: getPreference } = useSelect( preferencesStore );\n\n\tconst turnOffDistractionFreeMode = useCallback( () => {\n\t\tconst isDistractionFree = getPreference(\n\t\t\teditSiteStore.name,\n\t\t\t'distractionFree'\n\t\t);\n\t\tif ( ! isDistractionFree ) {\n\t\t\treturn;\n\t\t}\n\t\tsetPreference( editSiteStore.name, 'distractionFree', false );\n\t\tcreateNotice( 'info', __( 'Distraction free mode turned off' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t}, [ createNotice, setPreference, getPreference ] );\n\tconst hasGlobalStyleVariations = useSelect(\n\t\t( select ) =>\n\t\t\t!! select(\n\t\t\t\tcoreStore\n\t\t\t).__experimentalGetCurrentThemeGlobalStylesVariations()?.length,\n\t\t[]\n\t);\n\tif ( hasGlobalStyleVariations ) {\n\t\treturn (\n\t\t\t<NavigatorButton\n\t\t\t\t{ ...props }\n\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\tpath=\"/wp_global_styles\"\n\t\t\t/>\n\t\t);\n\t}\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\t{ ...props }\n\t\t\tonClick={ () => {\n\t\t\t\tturnOffDistractionFreeMode();\n\t\t\t\t// Switch to edit mode.\n\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t// Open global styles sidebar.\n\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction SidebarNavigationScreenGlobalStylesContent() {\n\tconst { storedSettings } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\tstoredSettings: getSettings( false ),\n\t\t};\n\t}, [] );\n\n\t// Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are\n\t// loaded. This is necessary because the Iframe component waits until\n\t// the block editor store's `__internalIsInitialized` is true before\n\t// rendering the iframe. Without this, the iframe previews will not render\n\t// in mobile viewport sizes, where the editor canvas is hidden.\n\treturn (\n\t\t<BlockEditorProvider\n\t\t\tsettings={ storedSettings }\n\t\t\tonChange={ noop }\n\t\t\tonInput={ noop }\n\t\t>\n\t\t\t<StyleVariationsContainer />\n\t\t</BlockEditorProvider>\n\t);\n}\n\nfunction SidebarNavigationScreenGlobalStylesFooter( {\n\tmodifiedDateTime,\n\tonClickRevisions,\n} ) {\n\treturn (\n\t\t<VStack className=\"edit-site-sidebar-navigation-screen-global-styles__footer\">\n\t\t\t<SidebarNavigationItem\n\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-global-styles__revisions\"\n\t\t\t\tlabel={ __( 'Revisions' ) }\n\t\t\t\tonClick={ onClickRevisions }\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tas=\"span\"\n\t\t\t\t\talignment=\"center\"\n\t\t\t\t\tspacing={ 5 }\n\t\t\t\t\tdirection=\"row\"\n\t\t\t\t\tjustify=\"space-between\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"edit-site-sidebar-navigation-screen-global-styles__revisions__label\">\n\t\t\t\t\t\t{ __( 'Last modified' ) }\n\t\t\t\t\t</span>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<time dateTime={ modifiedDateTime }>\n\t\t\t\t\t\t\t{ humanTimeDiff( modifiedDateTime ) }\n\t\t\t\t\t\t</time>\n\t\t\t\t\t</span>\n\t\t\t\t\t<Icon icon={ backup } style={ { fill: 'currentcolor' } } />\n\t\t\t\t</HStack>\n\t\t\t</SidebarNavigationItem>\n\t\t</VStack>\n\t);\n}\n\nexport default function SidebarNavigationScreenGlobalStyles() {\n\tconst { revisions, isLoading: isLoadingRevisions } =\n\t\tuseGlobalStylesRevisions();\n\tconst { openGeneralSidebar, setIsListViewOpened } =\n\t\tuseDispatch( editSiteStore );\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { setCanvasMode, setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst { get: getPreference } = useSelect( preferencesStore );\n\tconst { isViewMode, isStyleBookOpened, revisionsCount } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCanvasMode, getEditorCanvasContainerView } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\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\t\t\treturn {\n\t\t\t\tisViewMode: 'view' === getCanvasMode(),\n\t\t\t\tisStyleBookOpened:\n\t\t\t\t\t'style-book' === getEditorCanvasContainerView(),\n\t\t\t\trevisionsCount:\n\t\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ??\n\t\t\t\t\t0,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst turnOffDistractionFreeMode = useCallback( () => {\n\t\tconst isDistractionFree = getPreference(\n\t\t\teditSiteStore.name,\n\t\t\t'distractionFree'\n\t\t);\n\t\tif ( ! isDistractionFree ) {\n\t\t\treturn;\n\t\t}\n\t\tsetPreference( editSiteStore.name, 'distractionFree', false );\n\t\tcreateNotice( 'info', __( 'Distraction free mode turned off' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t}, [ createNotice, setPreference, getPreference ] );\n\n\tconst openGlobalStyles = useCallback( async () => {\n\t\tturnOffDistractionFreeMode();\n\t\treturn Promise.all( [\n\t\t\tsetCanvasMode( 'edit' ),\n\t\t\topenGeneralSidebar( 'edit-site/global-styles' ),\n\t\t] );\n\t}, [ setCanvasMode, openGeneralSidebar, turnOffDistractionFreeMode ] );\n\n\tconst openStyleBook = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the Style Book once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. This ensures that\n\t\t// the Style Book is not prematurely closed.\n\t\tsetEditorCanvasContainerView( 'style-book' );\n\t\tsetIsListViewOpened( false );\n\t}, [\n\t\topenGlobalStyles,\n\t\tsetEditorCanvasContainerView,\n\t\tsetIsListViewOpened,\n\t] );\n\n\tconst openRevisions = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the global styles revisions once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. The global styles UI is responsible\n\t\t// for redirecting to the revisions screen once the editor canvas container\n\t\t// has been set to 'global-styles-revisions'.\n\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t}, [ openGlobalStyles, setEditorCanvasContainerView ] );\n\n\t// If there are no revisions, do not render a footer.\n\tconst hasRevisions = revisionsCount > 0;\n\tconst modifiedDateTime = revisions?.[ 0 ]?.modified;\n\tconst shouldShowGlobalStylesFooter =\n\t\thasRevisions && ! isLoadingRevisions && modifiedDateTime;\n\n\treturn (\n\t\t<>\n\t\t\t<SidebarNavigationScreen\n\t\t\t\ttitle={ __( 'Styles' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Choose a different style combination for the theme styles.'\n\t\t\t\t) }\n\t\t\t\tcontent={ <SidebarNavigationScreenGlobalStylesContent /> }\n\t\t\t\tfooter={\n\t\t\t\t\tshouldShowGlobalStylesFooter && (\n\t\t\t\t\t\t<SidebarNavigationScreenGlobalStylesFooter\n\t\t\t\t\t\t\tmodifiedDateTime={ modifiedDateTime }\n\t\t\t\t\t\t\tonClickRevisions={ openRevisions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isMobileViewport && (\n\t\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\t\ticon={ seen }\n\t\t\t\t\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t\t\t\t\t\t\t! isStyleBookOpened\n\t\t\t\t\t\t\t\t\t\t\t? 'style-book'\n\t\t\t\t\t\t\t\t\t\t\t: undefined\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\tisPressed={ isStyleBookOpened }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ edit }\n\t\t\t\t\t\t\tlabel={ __( 'Edit styles' ) }\n\t\t\t\t\t\t\tonClick={ async () => await openGlobalStyles() }\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\t{ isStyleBookOpened && ! isMobileViewport && isViewMode && (\n\t\t\t\t<StyleBook\n\t\t\t\t\tenableResizing={ false }\n\t\t\t\t\tisSelected={ () => false }\n\t\t\t\t\tonClick={ openStyleBook }\n\t\t\t\t\tonSelect={ openStyleBook }\n\t\t\t\t\tshowCloseButton={ false }\n\t\t\t\t\tshowTabs={ false }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;;AAgBA,IAAAA,QAAA,G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ChB,YAAY,GACZS,SACJ,CACA;MACDkB,SAAS,EAAG3B;IAAmB,CAC/B,CACD,EACD,IAAA1F,QAAA,CAAAiD,aAAA,EAAChC,cAAA,CAAAqC,OAAa;MACbsB,IAAI,EAAG0C,WAAM;MACblD,KAAK,EAAG,IAAA3B,QAAE,EAAE,aAAc,CAAG;MAC7Bc,OAAO,EAAG,MAAAA,CAAA,KAAY,MAAM+C,gBAAgB,CAAC;IAAG,CAChD,CACA;EACF,CACD,CAAC,EACAZ,iBAAiB,IAAI,CAAEJ,gBAAgB,IAAIG,UAAU,IACtD,IAAAzF,QAAA,CAAAiD,aAAA,EAAC9B,UAAA,CAAAmC,OAAS;IACTiE,cAAc,EAAG,KAAO;IACxBC,UAAU,EAAGA,CAAA,KAAM,KAAO;IAC1BjE,OAAO,EAAGkD,aAAe;IACzBgB,QAAQ,EAAGhB,aAAe;IAC1BiB,eAAe,EAAG,KAAO;IACzBC,QAAQ,EAAG;EAAO,CAClB,CAED,CAAC;AAEL"}
|
|
@@ -1,34 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = SidebarNavigationScreenMain;
|
|
9
|
-
|
|
10
8
|
var _element = require("@wordpress/element");
|
|
11
|
-
|
|
12
9
|
var _components = require("@wordpress/components");
|
|
13
|
-
|
|
14
10
|
var _i18n = require("@wordpress/i18n");
|
|
15
|
-
|
|
16
11
|
var _icons = require("@wordpress/icons");
|
|
17
|
-
|
|
18
12
|
var _data = require("@wordpress/data");
|
|
19
|
-
|
|
20
13
|
var _sidebarNavigationScreen = _interopRequireDefault(require("../sidebar-navigation-screen"));
|
|
21
|
-
|
|
22
14
|
var _sidebarNavigationItem = _interopRequireDefault(require("../sidebar-navigation-item"));
|
|
23
|
-
|
|
24
15
|
var _sidebarNavigationScreenGlobalStyles = require("../sidebar-navigation-screen-global-styles");
|
|
25
|
-
|
|
26
16
|
var _lockUnlock = require("../../lock-unlock");
|
|
27
|
-
|
|
28
17
|
var _store = require("../../store");
|
|
29
|
-
|
|
30
18
|
var _templatePartHint = _interopRequireDefault(require("./template-part-hint"));
|
|
31
|
-
|
|
32
19
|
/**
|
|
33
20
|
* WordPress dependencies
|
|
34
21
|
*/
|
|
@@ -36,14 +23,16 @@ var _templatePartHint = _interopRequireDefault(require("./template-part-hint"));
|
|
|
36
23
|
/**
|
|
37
24
|
* Internal dependencies
|
|
38
25
|
*/
|
|
26
|
+
|
|
39
27
|
function SidebarNavigationScreenMain() {
|
|
40
28
|
const {
|
|
41
29
|
location
|
|
42
30
|
} = (0, _components.__experimentalUseNavigator)();
|
|
43
31
|
const {
|
|
44
32
|
setEditorCanvasContainerView
|
|
45
|
-
} = (0, _lockUnlock.unlock)((0, _data.useDispatch)(_store.store));
|
|
33
|
+
} = (0, _lockUnlock.unlock)((0, _data.useDispatch)(_store.store));
|
|
46
34
|
|
|
35
|
+
// Clear the editor canvas container view when accessing the main navigation screen.
|
|
47
36
|
(0, _element.useEffect)(() => {
|
|
48
37
|
if (location?.path === '/') {
|
|
49
38
|
setEditorCanvasContainerView(undefined);
|