@wordpress/edit-site 5.16.0 → 5.17.1
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 +7 -16
- 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 +7 -6
- 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/template-part-converter/convert-to-template-part.js +2 -0
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js"],"names":["__","backup","edit","seen","useSelect","useDispatch","store","coreStore","Icon","__experimentalNavigatorButton","NavigatorButton","__experimentalVStack","HStack","VStack","useViewportMatch","BlockEditorProvider","humanTimeDiff","useCallback","noticesStore","preferencesStore","SidebarNavigationScreen","StyleVariationsContainer","unlock","editSiteStore","SidebarButton","SidebarNavigationItem","StyleBook","useGlobalStylesRevisions","noop","SidebarNavigationItemGlobalStyles","props","openGeneralSidebar","setCanvasMode","createNotice","set","setPreference","get","getPreference","turnOffDistractionFreeMode","isDistractionFree","name","isDismissible","type","hasGlobalStyleVariations","select","__experimentalGetCurrentThemeGlobalStylesVariations","length","SidebarNavigationScreenGlobalStylesContent","storedSettings","getSettings","SidebarNavigationScreenGlobalStylesFooter","modifiedDateTime","onClickRevisions","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"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,MAAT,EAAiBC,IAAjB,EAAuBC,IAAvB,QAAmC,kBAAnC;AACA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AACA,SACCC,IADD,EAECC,6BAA6B,IAAIC,eAFlC,EAGCC,oBAAoB,IAAIC,MAHzB,EAICD,oBAAoB,IAAIE,MAJzB,QAKO,uBALP;AAMA,SAASC,gBAAT,QAAiC,oBAAjC;AACA,SAASC,mBAAT,QAAoC,yBAApC;AACA,SAASC,aAAT,QAA8B,iBAA9B;AACA,SAASC,WAAT,QAA4B,oBAA5B;AACA,SAASX,KAAK,IAAIY,YAAlB,QAAsC,oBAAtC;AACA,SAASZ,KAAK,IAAIa,gBAAlB,QAA0C,wBAA1C;AAEA;AACA;AACA;;AACA,OAAOC,uBAAP,MAAoC,8BAApC;AACA,OAAOC,wBAAP,MAAqC,6CAArC;AACA,SAASC,MAAT,QAAuB,mBAAvB;AACA,SAAShB,KAAK,IAAIiB,aAAlB,QAAuC,aAAvC;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,qBAAP,MAAkC,4BAAlC;AACA,OAAOC,SAAP,MAAsB,eAAtB;AACA,OAAOC,wBAAP,MAAqC,+DAArC;;AAEA,MAAMC,IAAI,GAAG,MAAM,CAAE,CAArB;;AAEA,OAAO,SAASC,iCAAT,CAA4CC,KAA5C,EAAoD;AAC1D,QAAM;AAAEC,IAAAA;AAAF,MAAyB1B,WAAW,CAAEkB,aAAF,CAA1C;AACA,QAAM;AAAES,IAAAA;AAAF,MAAoBV,MAAM,CAAEjB,WAAW,CAAEkB,aAAF,CAAb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AAO,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":["__","backup","edit","seen","useSelect","useDispatch","store","coreStore","Icon","__experimentalNavigatorButton","NavigatorButton","__experimentalVStack","HStack","VStack","useViewportMatch","BlockEditorProvider","humanTimeDiff","useCallback","noticesStore","preferencesStore","SidebarNavigationScreen","StyleVariationsContainer","unlock","editSiteStore","SidebarButton","SidebarNavigationItem","StyleBook","useGlobalStylesRevisions","noop","SidebarNavigationItemGlobalStyles","props","openGeneralSidebar","setCanvasMode","createNotice","set","setPreference","get","getPreference","turnOffDistractionFreeMode","isDistractionFree","name","isDismissible","type","hasGlobalStyleVariations","select","__experimentalGetCurrentThemeGlobalStylesVariations","length","createElement","as","path","onClick","SidebarNavigationScreenGlobalStylesContent","storedSettings","getSettings","settings","onChange","onInput","SidebarNavigationScreenGlobalStylesFooter","modifiedDateTime","onClickRevisions","className","label","alignment","spacing","direction","justify","dateTime","icon","style","fill","SidebarNavigationScreenGlobalStyles","revisions","isLoading","isLoadingRevisions","setIsListViewOpened","isMobileViewport","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","isPressed","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":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,EAAEC,IAAI,EAAEC,IAAI,QAAQ,kBAAkB;AACrD,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SACCC,IAAI,EACJC,6BAA6B,IAAIC,eAAe,EAChDC,oBAAoB,IAAIC,MAAM,EAC9BD,oBAAoB,IAAIE,MAAM,QACxB,uBAAuB;AAC9B,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,WAAW,QAAQ,oBAAoB;AAChD,SAASX,KAAK,IAAIY,YAAY,QAAQ,oBAAoB;AAC1D,SAASZ,KAAK,IAAIa,gBAAgB,QAAQ,wBAAwB;;AAElE;AACA;AACA;AACA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ACb0D,KAAK,EAAG7D,EAAE,CAAE,YAAa,CAAG;MAC5BkD,OAAO,EAAGA,CAAA,KACT0B,4BAA4B,CAC3B,CAAEE,iBAAiB,GAChB,YAAY,GACZS,SACJ,CACA;MACDiB,SAAS,EAAG1B;IAAmB,CAC/B,CACD,EACD/B,aAAA,CAACvB,aAAa;MACb2C,IAAI,EAAGjE,IAAM;MACb2D,KAAK,EAAG7D,EAAE,CAAE,aAAc,CAAG;MAC7BkD,OAAO,EAAG,MAAAA,CAAA,KAAY,MAAMwC,gBAAgB,CAAC;IAAG,CAChD,CACA;EACF,CACD,CAAC,EACAZ,iBAAiB,IAAI,CAAEH,gBAAgB,IAAIE,UAAU,IACtD9B,aAAA,CAACrB,SAAS;IACT+E,cAAc,EAAG,KAAO;IACxBC,UAAU,EAAGA,CAAA,KAAM,KAAO;IAC1BxD,OAAO,EAAG2C,aAAe;IACzBc,QAAQ,EAAGd,aAAe;IAC1Be,eAAe,EAAG,KAAO;IACzBC,QAAQ,EAAG;EAAO,CAClB,CAED,CAAC;AAEL"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createElement, Fragment } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
@@ -8,10 +7,10 @@ import { __ } from '@wordpress/i18n';
|
|
|
8
7
|
import { layout, symbol, navigation, styles, page } from '@wordpress/icons';
|
|
9
8
|
import { useDispatch } from '@wordpress/data';
|
|
10
9
|
import { useEffect } from '@wordpress/element';
|
|
10
|
+
|
|
11
11
|
/**
|
|
12
12
|
* Internal dependencies
|
|
13
13
|
*/
|
|
14
|
-
|
|
15
14
|
import SidebarNavigationScreen from '../sidebar-navigation-screen';
|
|
16
15
|
import SidebarNavigationItem from '../sidebar-navigation-item';
|
|
17
16
|
import { SidebarNavigationItemGlobalStyles } from '../sidebar-navigation-screen-global-styles';
|
|
@@ -24,8 +23,9 @@ export default function SidebarNavigationScreenMain() {
|
|
|
24
23
|
} = useNavigator();
|
|
25
24
|
const {
|
|
26
25
|
setEditorCanvasContainerView
|
|
27
|
-
} = unlock(useDispatch(editSiteStore));
|
|
26
|
+
} = unlock(useDispatch(editSiteStore));
|
|
28
27
|
|
|
28
|
+
// Clear the editor canvas container view when accessing the main navigation screen.
|
|
29
29
|
useEffect(() => {
|
|
30
30
|
if (location?.path === '/') {
|
|
31
31
|
setEditorCanvasContainerView(undefined);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["__experimentalItemGroup","ItemGroup","__experimentalNavigatorButton","NavigatorButton","__experimentalUseNavigator","useNavigator","__","layout","symbol","navigation","styles","page","useDispatch","useEffect","SidebarNavigationScreen","SidebarNavigationItem","SidebarNavigationItemGlobalStyles","unlock","store","editSiteStore","TemplatePartHint","SidebarNavigationScreenMain","location","setEditorCanvasContainerView","path","undefined","createElement","isRoot","title","description","content","Fragment","as","withChevron","icon"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-main/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalNavigatorButton as NavigatorButton,\n\t__experimentalUseNavigator as useNavigator,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { layout, symbol, navigation, styles, page } from '@wordpress/icons';\nimport { useDispatch } from '@wordpress/data';\n\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { SidebarNavigationItemGlobalStyles } from '../sidebar-navigation-screen-global-styles';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport TemplatePartHint from './template-part-hint';\n\nexport default function SidebarNavigationScreenMain() {\n\tconst { location } = useNavigator();\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\n\t// Clear the editor canvas container view when accessing the main navigation screen.\n\tuseEffect( () => {\n\t\tif ( location?.path === '/' ) {\n\t\t\tsetEditorCanvasContainerView( undefined );\n\t\t}\n\t}, [ setEditorCanvasContainerView, location?.path ] );\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\tisRoot\n\t\t\ttitle={ __( 'Design' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Customize the appearance of your website using the block editor.'\n\t\t\t) }\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t<NavigatorButton\n\t\t\t\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\t\t\t\tpath=\"/navigation\"\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ navigation }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Navigation' ) }\n\t\t\t\t\t\t</NavigatorButton>\n\t\t\t\t\t\t<SidebarNavigationItemGlobalStyles\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ styles }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Styles' ) }\n\t\t\t\t\t\t</SidebarNavigationItemGlobalStyles>\n\t\t\t\t\t\t<NavigatorButton\n\t\t\t\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\t\t\t\tpath=\"/page\"\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ page }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Pages' ) }\n\t\t\t\t\t\t</NavigatorButton>\n\t\t\t\t\t\t<NavigatorButton\n\t\t\t\t\t\t\tas={ SidebarNavigationItem }\n\t\t\t\t\t\t\tpath=\"/wp_template\"\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ layout }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Templates' ) }\n\t\t\t\t\t\t</NavigatorButton>\n\t\t\t\t\t\t<NavigatorButton\n\t\t\t\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AAC;EAErD,OACCE,aAAA,CAACZ,uBAAuB;IACvBa,MAAM;IACNC,KAAK,EAAGtB,EAAE,CAAE,QAAS,CAAG;IACxBuB,WAAW,EAAGvB,EAAE,CACf,kEACD,CAAG;IACHwB,OAAO,EACNJ,aAAA,CAAAK,QAAA,QACCL,aAAA,CAACzB,SAAS,QACTyB,aAAA,CAACvB,eAAe;MACf6B,EAAE,EAAGjB,qBAAuB;MAC5BS,IAAI,EAAC,aAAa;MAClBS,WAAW;MACXC,IAAI,EAAGzB;IAAY,GAEjBH,EAAE,CAAE,YAAa,CACH,CAAC,EAClBoB,aAAA,CAACV,iCAAiC;MACjCiB,WAAW;MACXC,IAAI,EAAGxB;IAAQ,GAEbJ,EAAE,CAAE,QAAS,CACmB,CAAC,EACpCoB,aAAA,CAACvB,eAAe;MACf6B,EAAE,EAAGjB,qBAAuB;MAC5BS,IAAI,EAAC,OAAO;MACZS,WAAW;MACXC,IAAI,EAAGvB;IAAM,GAEXL,EAAE,CAAE,OAAQ,CACE,CAAC,EAClBoB,aAAA,CAACvB,eAAe;MACf6B,EAAE,EAAGjB,qBAAuB;MAC5BS,IAAI,EAAC,cAAc;MACnBS,WAAW;MACXC,IAAI,EAAG3B;IAAQ,GAEbD,EAAE,CAAE,WAAY,CACF,CAAC,EAClBoB,aAAA,CAACvB,eAAe;MACf6B,EAAE,EAAGjB,qBAAuB;MAC5BS,IAAI,EAAC,WAAW;MAChBS,WAAW;MACXC,IAAI,EAAG1B;IAAQ,GAEbF,EAAE,CAAE,UAAW,CACD,CACP,CAAC,EACZoB,aAAA,CAACN,gBAAgB,MAAE,CAClB;EACF,CACD,CAAC;AAEJ"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
@@ -11,17 +10,14 @@ const PREFERENCE_NAME = 'isTemplatePartMoveHintVisible';
|
|
|
11
10
|
export default function TemplatePartHint() {
|
|
12
11
|
const showTemplatePartHint = useSelect(select => {
|
|
13
12
|
var _select$get;
|
|
14
|
-
|
|
15
13
|
return (_select$get = select(preferencesStore).get('core', PREFERENCE_NAME)) !== null && _select$get !== void 0 ? _select$get : true;
|
|
16
14
|
}, []);
|
|
17
15
|
const {
|
|
18
16
|
set: setPreference
|
|
19
17
|
} = useDispatch(preferencesStore);
|
|
20
|
-
|
|
21
18
|
if (!showTemplatePartHint) {
|
|
22
19
|
return null;
|
|
23
20
|
}
|
|
24
|
-
|
|
25
21
|
return createElement(Notice, {
|
|
26
22
|
politeness: "polite",
|
|
27
23
|
className: "edit-site-sidebar__notice",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["Notice","useDispatch","useSelect","__","store","preferencesStore","PREFERENCE_NAME","TemplatePartHint","showTemplatePartHint","select","_select$get","get","set","setPreference","createElement","politeness","className","onRemove"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-main/template-part-hint.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Notice } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\nconst PREFERENCE_NAME = 'isTemplatePartMoveHintVisible';\n\nexport default function TemplatePartHint() {\n\tconst showTemplatePartHint = useSelect(\n\t\t( select ) =>\n\t\t\tselect( preferencesStore ).get( 'core', PREFERENCE_NAME ) ?? true,\n\t\t[]\n\t);\n\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tif ( ! showTemplatePartHint ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Notice\n\t\t\tpoliteness=\"polite\"\n\t\t\tclassName=\"edit-site-sidebar__notice\"\n\t\t\tonRemove={ () => {\n\t\t\t\tsetPreference( 'core', PREFERENCE_NAME, false );\n\t\t\t} }\n\t\t>\n\t\t\t{ __( 'Looking for template parts? Find them in \"Patterns\".' ) }\n\t\t</Notice>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,wBAAwB;AAElE,MAAMC,eAAe,GAAG,+BAA+B;AAEvD,eAAe,SAASC,gBAAgBA,CAAA,EAAG;EAC1C,MAAMC,oBAAoB,GAAGN,SAAS,CACnCO,MAAM;IAAA,IAAAC,WAAA;IAAA,QAAAA,WAAA,GACPD,MAAM,CAAEJ,gBAAiB,CAAC,CAACM,GAAG,CAAE,MAAM,EAAEL,eAAgB,CAAC,cAAAI,WAAA,cAAAA,WAAA,GAAI,IAAI;EAAA,GAClE,EACD,CAAC;EAED,MAAM;IAAEE,GAAG,EAAEC;EAAc,CAAC,GAAGZ,WAAW,CAAEI,gBAAiB,CAAC;EAC9D,IAAK,CAAEG,oBAAoB,EAAG;IAC7B,OAAO,IAAI;EACZ;EAEA,OACCM,aAAA,CAACd,MAAM;IACNe,UAAU,EAAC,QAAQ;IACnBC,SAAS,EAAC,2BAA2B;IACrCC,QAAQ,EAAGA,CAAA,KAAM;MAChBJ,aAAa,CAAE,MAAM,EAAEP,eAAe,EAAE,KAAM,CAAC;IAChD;EAAG,GAEDH,EAAE,CAAE,sDAAuD,CACtD,CAAC;AAEX"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createElement, Fragment } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
@@ -9,10 +8,10 @@ import { __experimentalUseNavigator as useNavigator, ExternalLink } from '@wordp
|
|
|
9
8
|
import { useEntityRecord } from '@wordpress/core-data';
|
|
10
9
|
import { decodeEntities } from '@wordpress/html-entities';
|
|
11
10
|
import { pencil } from '@wordpress/icons';
|
|
11
|
+
|
|
12
12
|
/**
|
|
13
13
|
* Internal dependencies
|
|
14
14
|
*/
|
|
15
|
-
|
|
16
15
|
import SidebarNavigationScreen from '../sidebar-navigation-screen';
|
|
17
16
|
import { unlock } from '../../lock-unlock';
|
|
18
17
|
import { store as editSiteStore } from '../../store';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["__","useDispatch","__experimentalUseNavigator","useNavigator","ExternalLink","useEntityRecord","decodeEntities","pencil","SidebarNavigationScreen","unlock","store","editSiteStore","SidebarButton","SidebarNavigationScreenNavigationItem","setCanvasMode","params","postType","postId","record","createElement","title","rendered","actions","onClick","label","icon","description","content","Fragment","link","className","href"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-item/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport {\n\t__experimentalUseNavigator as useNavigator,\n\tExternalLink,\n} from '@wordpress/components';\nimport { useEntityRecord } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { pencil } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\n\nexport default function SidebarNavigationScreenNavigationItem() {\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst {\n\t\tparams: { postType, postId },\n\t} = useNavigator();\n\tconst { record } = useEntityRecord( 'postType', postType, postId );\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ record ? decodeEntities( record?.title?.rendered ) : null }\n\t\t\tactions={\n\t\t\t\t<SidebarButton\n\t\t\t\t\tonClick={ () => setCanvasMode( 'edit' ) }\n\t\t\t\t\tlabel={ __( 'Edit' ) }\n\t\t\t\t\ticon={ pencil }\n\t\t\t\t/>\n\t\t\t}\n\t\t\tdescription={ __(\n\t\t\t\t'Posts are entries listed in reverse chronological order on the site homepage or on the posts page.'\n\t\t\t) }\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ record?.link ? (\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__page-link\"\n\t\t\t\t\t\t\thref={ record.link }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ record.link }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t) : null }\n\t\t\t\t\t{ record\n\t\t\t\t\t\t? decodeEntities( record?.description?.rendered )\n\t\t\t\t\t\t: null }\n\t\t\t\t</>\n\t\t\t}\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SACCC,0BAA0B,IAAIC,YAAY,EAC1CC,YAAY,QACN,uBAAuB;AAC9B,SAASC,eAAe,QAAQ,sBAAsB;AACtD,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,MAAM,QAAQ,kBAAkB;;AAEzC;AACA;AACA;AACA,OAAOC,uBAAuB,MAAM,8BAA8B;AAClE,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,KAAK,IAAIC,aAAa,QAAQ,aAAa;AACpD,OAAOC,aAAa,MAAM,mBAAmB;AAE7C,eAAe,SAASC,qCAAqCA,CAAA,EAAG;EAC/D,MAAM;IAAEC;EAAc,CAAC,GAAGL,MAAM,CAAER,WAAW,CAAEU,aAAc,CAAE,CAAC;EAChE,MAAM;IACLI,MAAM,EAAE;MAAEC,QAAQ;MAAEC;IAAO;EAC5B,CAAC,GAAGd,YAAY,CAAC,CAAC;EAClB,MAAM;IAAEe;EAAO,CAAC,GAAGb,eAAe,CAAE,UAAU,EAAEW,QAAQ,EAAEC,MAAO,CAAC;EAElE,OACCE,aAAA,CAACX,uBAAuB;IACvBY,KAAK,EAAGF,MAAM,GAAGZ,cAAc,CAAEY,MAAM,EAAEE,KAAK,EAAEC,QAAS,CAAC,GAAG,IAAM;IACnEC,OAAO,EACNH,aAAA,CAACP,aAAa;MACbW,OAAO,EAAGA,CAAA,KAAMT,aAAa,CAAE,MAAO,CAAG;MACzCU,KAAK,EAAGxB,EAAE,CAAE,MAAO,CAAG;MACtByB,IAAI,EAAGlB;IAAQ,CACf,CACD;IACDmB,WAAW,EAAG1B,EAAE,CACf,oGACD,CAAG;IACH2B,OAAO,EACNR,aAAA,CAAAS,QAAA,QACGV,MAAM,EAAEW,IAAI,GACbV,aAAA,CAACf,YAAY;MACZ0B,SAAS,EAAC,gDAAgD;MAC1DC,IAAI,EAAGb,MAAM,CAACW;IAAM,GAElBX,MAAM,CAACW,IACI,CAAC,GACZ,IAAI,EACNX,MAAM,GACLZ,cAAc,CAAEY,MAAM,EAAEQ,WAAW,EAAEL,QAAS,CAAC,GAC/C,IACF;EACF,CACD,CAAC;AAEJ"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
@@ -13,8 +12,9 @@ export default function RenameModal({
|
|
|
13
12
|
isOpen: true,
|
|
14
13
|
onConfirm: e => {
|
|
15
14
|
e.preventDefault();
|
|
16
|
-
onConfirm();
|
|
15
|
+
onConfirm();
|
|
17
16
|
|
|
17
|
+
// Immediate close avoids ability to hit delete multiple times.
|
|
18
18
|
onClose();
|
|
19
19
|
},
|
|
20
20
|
onCancel: onClose,
|
package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["__experimentalConfirmDialog","ConfirmDialog","__","RenameModal","onClose","onConfirm","createElement","isOpen","e","preventDefault","onCancel","confirmButtonText"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/delete-modal.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function RenameModal( { onClose, onConfirm } ) {\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen={ true }\n\t\t\tonConfirm={ ( e ) => {\n\t\t\t\te.preventDefault();\n\t\t\t\tonConfirm();\n\n\t\t\t\t// Immediate close avoids ability to hit delete multiple times.\n\t\t\t\tonClose();\n\t\t\t} }\n\t\t\tonCancel={ onClose }\n\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t>\n\t\t\t{ __( 'Are you sure you want to delete this Navigation menu?' ) }\n\t\t</ConfirmDialog>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,2BAA2B,IAAIC,aAAa,QAAQ,uBAAuB;AACpF,SAASC,EAAE,QAAQ,iBAAiB;AAEpC,eAAe,SAASC,WAAWA,CAAE;EAAEC,OAAO;EAAEC;AAAU,CAAC,EAAG;EAC7D,OACCC,aAAA,CAACL,aAAa;IACbM,MAAM,EAAG,IAAM;IACfF,SAAS,EAAKG,CAAC,IAAM;MACpBA,CAAC,CAACC,cAAc,CAAC,CAAC;MAClBJ,SAAS,CAAC,CAAC;;MAEX;MACAD,OAAO,CAAC,CAAC;IACV,CAAG;IACHM,QAAQ,EAAGN,OAAS;IACpBO,iBAAiB,EAAGT,EAAE,CAAE,QAAS;EAAG,GAElCA,EAAE,CAAE,uDAAwD,CAChD,CAAC;AAElB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
@@ -8,7 +7,6 @@ import { pencil } from '@wordpress/icons';
|
|
|
8
7
|
/**
|
|
9
8
|
* Internal dependencies
|
|
10
9
|
*/
|
|
11
|
-
|
|
12
10
|
import SidebarButton from '../sidebar-button';
|
|
13
11
|
import { useLink } from '../routes/link';
|
|
14
12
|
export default function EditButton({
|
|
@@ -19,7 +17,8 @@ export default function EditButton({
|
|
|
19
17
|
postType: 'wp_navigation',
|
|
20
18
|
canvas: 'edit'
|
|
21
19
|
});
|
|
22
|
-
return createElement(SidebarButton, {
|
|
20
|
+
return createElement(SidebarButton, {
|
|
21
|
+
...linkInfo,
|
|
23
22
|
label: __('Edit'),
|
|
24
23
|
icon: pencil
|
|
25
24
|
});
|
package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["__","pencil","SidebarButton","useLink","EditButton","postId","linkInfo","postType","canvas","createElement","label","icon"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/edit-button.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { pencil } from '@wordpress/icons';\n/**\n * Internal dependencies\n */\nimport SidebarButton from '../sidebar-button';\nimport { useLink } from '../routes/link';\n\nexport default function EditButton( { postId } ) {\n\tconst linkInfo = useLink( {\n\t\tpostId,\n\t\tpostType: 'wp_navigation',\n\t\tcanvas: 'edit',\n\t} );\n\treturn (\n\t\t<SidebarButton { ...linkInfo } label={ __( 'Edit' ) } icon={ pencil } />\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,QAAQ,kBAAkB;AACzC;AACA;AACA;AACA,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,SAASC,OAAO,QAAQ,gBAAgB;AAExC,eAAe,SAASC,UAAUA,CAAE;EAAEC;AAAO,CAAC,EAAG;EAChD,MAAMC,QAAQ,GAAGH,OAAO,CAAE;IACzBE,MAAM;IACNE,QAAQ,EAAE,eAAe;IACzBC,MAAM,EAAE;EACT,CAAE,CAAC;EACH,OACCC,aAAA,CAACP,aAAa;IAAA,GAAMI,QAAQ;IAAGI,KAAK,EAAGV,EAAE,CAAE,MAAO,CAAG;IAACW,IAAI,EAAGV;EAAQ,CAAE,CAAC;AAE1E"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
@@ -8,10 +7,10 @@ import { __experimentalUseNavigator as useNavigator, Spinner } from '@wordpress/
|
|
|
8
7
|
import { __ } from '@wordpress/i18n';
|
|
9
8
|
import { useSelect } from '@wordpress/data';
|
|
10
9
|
import { decodeEntities } from '@wordpress/html-entities';
|
|
10
|
+
|
|
11
11
|
/**
|
|
12
12
|
* Internal dependencies
|
|
13
13
|
*/
|
|
14
|
-
|
|
15
14
|
import { SidebarNavigationScreenWrapper } from '../sidebar-navigation-screen-navigation-menus';
|
|
16
15
|
import ScreenNavigationMoreMenu from './more-menu';
|
|
17
16
|
import SingleNavigationMenu from './single-navigation-menu';
|
|
@@ -20,10 +19,10 @@ import buildNavigationLabel from '../sidebar-navigation-screen-navigation-menus/
|
|
|
20
19
|
export const postType = `wp_navigation`;
|
|
21
20
|
export default function SidebarNavigationScreenNavigationMenu() {
|
|
22
21
|
const {
|
|
23
|
-
params
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
params: {
|
|
23
|
+
postId
|
|
24
|
+
}
|
|
25
|
+
} = useNavigator();
|
|
27
26
|
const {
|
|
28
27
|
record: navigationMenu,
|
|
29
28
|
isResolving
|
|
@@ -48,13 +47,9 @@ export default function SidebarNavigationScreenNavigationMenu() {
|
|
|
48
47
|
handleDelete,
|
|
49
48
|
handleDuplicate
|
|
50
49
|
} = useNavigationMenuHandlers();
|
|
51
|
-
|
|
52
50
|
const _handleDelete = () => handleDelete(navigationMenu);
|
|
53
|
-
|
|
54
51
|
const _handleSave = edits => handleSave(navigationMenu, edits);
|
|
55
|
-
|
|
56
52
|
const _handleDuplicate = () => handleDuplicate(navigationMenu);
|
|
57
|
-
|
|
58
53
|
if (isLoading) {
|
|
59
54
|
return createElement(SidebarNavigationScreenWrapper, {
|
|
60
55
|
description: __('Navigation menus are a curated collection of blocks that allow visitors to get around your site.')
|
|
@@ -62,13 +57,11 @@ export default function SidebarNavigationScreenNavigationMenu() {
|
|
|
62
57
|
className: "edit-site-sidebar-navigation-screen-navigation-menus__loading"
|
|
63
58
|
}));
|
|
64
59
|
}
|
|
65
|
-
|
|
66
60
|
if (!isLoading && !navigationMenu) {
|
|
67
61
|
return createElement(SidebarNavigationScreenWrapper, {
|
|
68
62
|
description: __('Navigation Menu missing.')
|
|
69
63
|
});
|
|
70
64
|
}
|
|
71
|
-
|
|
72
65
|
if (!navigationMenu?.content?.raw) {
|
|
73
66
|
return createElement(SidebarNavigationScreenWrapper, {
|
|
74
67
|
actions: createElement(ScreenNavigationMoreMenu, {
|
|
@@ -81,7 +74,6 @@ export default function SidebarNavigationScreenNavigationMenu() {
|
|
|
81
74
|
description: __('This Navigation Menu is empty.')
|
|
82
75
|
});
|
|
83
76
|
}
|
|
84
|
-
|
|
85
77
|
return createElement(SingleNavigationMenu, {
|
|
86
78
|
navigationMenu: navigationMenu,
|
|
87
79
|
handleDelete: _handleDelete,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["useEntityRecord","store","coreStore","__experimentalUseNavigator","useNavigator","Spinner","__","useSelect","decodeEntities","SidebarNavigationScreenWrapper","ScreenNavigationMoreMenu","SingleNavigationMenu","useNavigationMenuHandlers","buildNavigationLabel","postType","SidebarNavigationScreenNavigationMenu","params","postId","record","navigationMenu","isResolving","isSaving","isDeleting","select","isSavingEntityRecord","isDeletingEntityRecord","isLoading","menuTitle","title","rendered","slug","handleSave","handleDelete","handleDuplicate","_handleDelete","_handleSave","edits","_handleDuplicate","createElement","description","className","content","raw","actions","onDelete","onSave","onDuplicate","id","status"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEntityRecord, store as coreStore } from '@wordpress/core-data';\nimport {\n\t__experimentalUseNavigator as useNavigator,\n\tSpinner,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { SidebarNavigationScreenWrapper } from '../sidebar-navigation-screen-navigation-menus';\nimport ScreenNavigationMoreMenu from './more-menu';\nimport SingleNavigationMenu from './single-navigation-menu';\nimport useNavigationMenuHandlers from './use-navigation-menu-handlers';\nimport buildNavigationLabel from '../sidebar-navigation-screen-navigation-menus/build-navigation-label';\n\nexport const postType = `wp_navigation`;\n\nexport default function SidebarNavigationScreenNavigationMenu() {\n\tconst {\n\t\tparams: { postId },\n\t} = useNavigator();\n\n\tconst { record: navigationMenu, isResolving } = useEntityRecord(\n\t\t'postType',\n\t\tpostType,\n\t\tpostId\n\t);\n\n\tconst { isSaving, isDeleting } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isSavingEntityRecord, isDeletingEntityRecord } =\n\t\t\t\tselect( coreStore );\n\n\t\t\treturn {\n\t\t\t\tisSaving: isSavingEntityRecord( 'postType', postType, postId ),\n\t\t\t\tisDeleting: isDeletingEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ postId ]\n\t);\n\n\tconst isLoading = isResolving || isSaving || isDeleting;\n\n\tconst menuTitle = navigationMenu?.title?.rendered || navigationMenu?.slug;\n\n\tconst { handleSave, handleDelete, handleDuplicate } =\n\t\tuseNavigationMenuHandlers();\n\n\tconst _handleDelete = () => handleDelete( navigationMenu );\n\tconst _handleSave = ( edits ) => handleSave( navigationMenu, edits );\n\tconst _handleDuplicate = () => handleDuplicate( navigationMenu );\n\n\tif ( isLoading ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Navigation menus are a curated collection of blocks that allow visitors to get around your site.'\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t<Spinner className=\"edit-site-sidebar-navigation-screen-navigation-menus__loading\" />\n\t\t\t</SidebarNavigationScreenWrapper>\n\t\t);\n\t}\n\n\tif ( ! isLoading && ! navigationMenu ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __( 'Navigation Menu missing.' ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( ! navigationMenu?.content?.raw ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tactions={\n\t\t\t\t\t<ScreenNavigationMoreMenu\n\t\t\t\t\t\tmenuTitle={ decodeEntities( menuTitle ) }\n\t\t\t\t\t\tonDelete={ _handleDelete }\n\t\t\t\t\t\tonSave={ _handleSave }\n\t\t\t\t\t\tonDuplicate={ _handleDuplicate }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\ttitle={ buildNavigationLabel(\n\t\t\t\t\tnavigationMenu?.title,\n\t\t\t\t\tnavigationMenu?.id,\n\t\t\t\t\tnavigationMenu?.status\n\t\t\t\t) }\n\t\t\t\tdescription={ __( 'This Navigation Menu is empty.' ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<SingleNavigationMenu\n\t\t\tnavigationMenu={ navigationMenu }\n\t\t\thandleDelete={ _handleDelete }\n\t\t\thandleSave={ _handleSave }\n\t\t\thandleDuplicate={ _handleDuplicate }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,eAAe,EAAEC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AAC1E,SACCC,0BAA0B,IAAIC,YAAY,EAC1CC,OAAO,QACD,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,QAAQ,iB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 @@ import { DropdownMenu, MenuItem, MenuGroup } from '@wordpress/components';
|
|
|
7
6
|
import { moreVertical } from '@wordpress/icons';
|
|
8
7
|
import { __ } from '@wordpress/i18n';
|
|
9
8
|
import { useState } from '@wordpress/element';
|
|
9
|
+
|
|
10
10
|
/**
|
|
11
11
|
* Internal dependencies
|
|
12
12
|
*/
|
|
13
|
-
|
|
14
13
|
import RenameModal from './rename-modal';
|
|
15
14
|
import DeleteModal from './delete-modal';
|
|
16
15
|
const POPOVER_PROPS = {
|
|
@@ -25,16 +24,12 @@ export default function ScreenNavigationMoreMenu(props) {
|
|
|
25
24
|
} = props;
|
|
26
25
|
const [renameModalOpen, setRenameModalOpen] = useState(false);
|
|
27
26
|
const [deleteModalOpen, setDeleteModalOpen] = useState(false);
|
|
28
|
-
|
|
29
27
|
const closeModals = () => {
|
|
30
28
|
setRenameModalOpen(false);
|
|
31
29
|
setDeleteModalOpen(false);
|
|
32
30
|
};
|
|
33
|
-
|
|
34
31
|
const openRenameModal = () => setRenameModalOpen(true);
|
|
35
|
-
|
|
36
32
|
const openDeleteModal = () => setDeleteModalOpen(true);
|
|
37
|
-
|
|
38
33
|
return createElement(Fragment, null, createElement(DropdownMenu, {
|
|
39
34
|
className: "sidebar-navigation__more-menu",
|
|
40
35
|
label: __('Actions'),
|
|
@@ -44,8 +39,8 @@ export default function ScreenNavigationMoreMenu(props) {
|
|
|
44
39
|
onClose
|
|
45
40
|
}) => createElement("div", null, createElement(MenuGroup, null, createElement(MenuItem, {
|
|
46
41
|
onClick: () => {
|
|
47
|
-
openRenameModal();
|
|
48
|
-
|
|
42
|
+
openRenameModal();
|
|
43
|
+
// Close the dropdown after opening the modal.
|
|
49
44
|
onClose();
|
|
50
45
|
}
|
|
51
46
|
}, __('Rename')), createElement(MenuItem, {
|
|
@@ -55,8 +50,9 @@ export default function ScreenNavigationMoreMenu(props) {
|
|
|
55
50
|
}
|
|
56
51
|
}, __('Duplicate'))), createElement(MenuGroup, null, createElement(MenuItem, {
|
|
57
52
|
onClick: () => {
|
|
58
|
-
openDeleteModal();
|
|
53
|
+
openDeleteModal();
|
|
59
54
|
|
|
55
|
+
// Close the dropdown after opening the modal.
|
|
60
56
|
onClose();
|
|
61
57
|
}
|
|
62
58
|
}, __('Delete'))))), deleteModalOpen && createElement(DeleteModal, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["DropdownMenu","MenuItem","MenuGroup","moreVertical","__","useState","RenameModal","DeleteModal","POPOVER_PROPS","position","ScreenNavigationMoreMenu","props","onDelete","onSave","onDuplicate","menuTitle","renameModalOpen","setRenameModalOpen","deleteModalOpen","setDeleteModalOpen","closeModals","openRenameModal","openDeleteModal","createElement","Fragment","className","label","icon","popoverProps","onClose","onClick","onConfirm"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/more-menu.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { DropdownMenu, MenuItem, MenuGroup } from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport RenameModal from './rename-modal';\nimport DeleteModal from './delete-modal';\n\nconst POPOVER_PROPS = {\n\tposition: 'bottom right',\n};\n\nexport default function ScreenNavigationMoreMenu( props ) {\n\tconst { onDelete, onSave, onDuplicate, menuTitle } = props;\n\n\tconst [ renameModalOpen, setRenameModalOpen ] = useState( false );\n\tconst [ deleteModalOpen, setDeleteModalOpen ] = useState( false );\n\n\tconst closeModals = () => {\n\t\tsetRenameModalOpen( false );\n\t\tsetDeleteModalOpen( false );\n\t};\n\tconst openRenameModal = () => setRenameModalOpen( true );\n\tconst openDeleteModal = () => setDeleteModalOpen( true );\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\tclassName=\"sidebar-navigation__more-menu\"\n\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\topenRenameModal();\n\t\t\t\t\t\t\t\t\t// Close the dropdown after opening the modal.\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Rename' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonDuplicate();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Duplicate' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\topenDeleteModal();\n\n\t\t\t\t\t\t\t\t\t// Close the dropdown after opening the modal.\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Delete' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\n\t\t\t{ deleteModalOpen && (\n\t\t\t\t<DeleteModal onClose={ closeModals } onConfirm={ onDelete } />\n\t\t\t) }\n\n\t\t\t{ renameModalOpen && (\n\t\t\t\t<RenameModal\n\t\t\t\t\tonClose={ closeModals }\n\t\t\t\t\tmenuTitle={ menuTitle }\n\t\t\t\t\tonSave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AAGA,CAAA,KAAM;MACfT,eAAe,CAAC,CAAC;MACjB;MACAQ,OAAO,CAAC,CAAC;IACV;EAAG,GAEDzB,EAAE,CAAE,QAAS,CACN,CAAC,EACXmB,aAAA,CAACtB,QAAQ;IACR6B,OAAO,EAAGA,CAAA,KAAM;MACfhB,WAAW,CAAC,CAAC;MACbe,OAAO,CAAC,CAAC;IACV;EAAG,GAEDzB,EAAE,CAAE,WAAY,CACT,CACA,CAAC,EACZmB,aAAA,CAACrB,SAAS,QACTqB,aAAA,CAACtB,QAAQ;IACR6B,OAAO,EAAGA,CAAA,KAAM;MACfR,eAAe,CAAC,CAAC;;MAEjB;MACAO,OAAO,CAAC,CAAC;IACV;EAAG,GAEDzB,EAAE,CAAE,QAAS,CACN,CACA,CACP,CAEO,CAAC,EAEbc,eAAe,IAChBK,aAAA,CAAChB,WAAW;IAACsB,OAAO,EAAGT,WAAa;IAACW,SAAS,EAAGnB;EAAU,CAAE,CAC7D,EAECI,eAAe,IAChBO,aAAA,CAACjB,WAAW;IACXuB,OAAO,EAAGT,WAAa;IACvBL,SAAS,EAAGA,SAAW;IACvBF,MAAM,EAAGA;EAAQ,CACjB,CAED,CAAC;AAEL"}
|
package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
@@ -7,16 +6,14 @@ import { useMemo } from '@wordpress/element';
|
|
|
7
6
|
import { useSelect } from '@wordpress/data';
|
|
8
7
|
import { BlockEditorProvider } from '@wordpress/block-editor';
|
|
9
8
|
import { createBlock } from '@wordpress/blocks';
|
|
9
|
+
|
|
10
10
|
/**
|
|
11
11
|
* Internal dependencies
|
|
12
12
|
*/
|
|
13
|
-
|
|
14
13
|
import { unlock } from '../../lock-unlock';
|
|
15
14
|
import { store as editSiteStore } from '../../store';
|
|
16
15
|
import NavigationMenuContent from '../sidebar-navigation-screen-navigation-menus/navigation-menu-content';
|
|
17
|
-
|
|
18
16
|
const noop = () => {};
|
|
19
|
-
|
|
20
17
|
export default function NavigationMenuEditor({
|
|
21
18
|
navigationMenuId
|
|
22
19
|
}) {
|
|
@@ -34,16 +31,13 @@ export default function NavigationMenuEditor({
|
|
|
34
31
|
if (!navigationMenuId) {
|
|
35
32
|
return [];
|
|
36
33
|
}
|
|
37
|
-
|
|
38
34
|
return [createBlock('core/navigation', {
|
|
39
35
|
ref: navigationMenuId
|
|
40
36
|
})];
|
|
41
37
|
}, [navigationMenuId]);
|
|
42
|
-
|
|
43
38
|
if (!navigationMenuId || !blocks?.length) {
|
|
44
39
|
return null;
|
|
45
40
|
}
|
|
46
|
-
|
|
47
41
|
return createElement(BlockEditorProvider, {
|
|
48
42
|
settings: storedSettings,
|
|
49
43
|
value: blocks,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["useMemo","useSelect","BlockEditorProvider","createBlock","unlock","store","editSiteStore","NavigationMenuContent","noop","NavigationMenuEditor","navigationMenuId","storedSettings","select","getSettings","blocks","ref","length","createElement","settings","value","onChange","onInput","className","rootClientId","clientId"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { BlockEditorProvider } from '@wordpress/block-editor';\nimport { createBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport NavigationMenuContent from '../sidebar-navigation-screen-navigation-menus/navigation-menu-content';\n\nconst noop = () => {};\n\nexport default function NavigationMenuEditor( { navigationMenuId } ) {\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\tconst blocks = useMemo( () => {\n\t\tif ( ! navigationMenuId ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [ createBlock( 'core/navigation', { ref: navigationMenuId } ) ];\n\t}, [ navigationMenuId ] );\n\n\tif ( ! navigationMenuId || ! blocks?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockEditorProvider\n\t\t\tsettings={ storedSettings }\n\t\t\tvalue={ blocks }\n\t\t\tonChange={ noop }\n\t\t\tonInput={ noop }\n\t\t>\n\t\t\t<div className=\"edit-site-sidebar-navigation-screen-navigation-menus__content\">\n\t\t\t\t<NavigationMenuContent rootClientId={ blocks[ 0 ].clientId } />\n\t\t\t</div>\n\t\t</BlockEditorProvider>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,WAAW,QAAQ,mBAAmB;;AAE/C;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,KAAK,IAAIC,aAAa,QAAQ,aAAa;AACpD,OAAOC,qBAAqB,MAAM,uEAAuE;AAEzG,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAErB,eAAe,SAASC,oBAAoBA,CAAE;EAAEC;AAAiB,CAAC,EAAG;EACpE,MAAM;IAAEC;EAAe,CAAC,GAAGV,SAAS,CAAIW,MAAM,IAAM;IACnD,MAAM;MAAEC;IAAY,CAAC,GAAGT,MAAM,CAAEQ,MAAM,CAAEN,aAAc,CAAE,CAAC;IAEzD,OAAO;MACNK,cAAc,EAAEE,WAAW,CAAE,KAAM;IACpC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMC,MAAM,GAAGd,OAAO,CAAE,MAAM;IAC7B,IAAK,CAAEU,gBAAgB,EAAG;MACzB,OAAO,EAAE;IACV;IAEA,OAAO,CAAEP,WAAW,CAAE,iBAAiB,EAAE;MAAEY,GAAG,EAAEL;IAAiB,CAAE,CAAC,CAAE;EACvE,CAAC,EAAE,CAAEA,gBAAgB,CAAG,CAAC;EAEzB,IAAK,CAAEA,gBAAgB,IAAI,CAAEI,MAAM,EAAEE,MAAM,EAAG;IAC7C,OAAO,IAAI;EACZ;EAEA,OACCC,aAAA,CAACf,mBAAmB;IACnBgB,QAAQ,EAAGP,cAAgB;IAC3BQ,KAAK,EAAGL,MAAQ;IAChBM,QAAQ,EAAGZ,IAAM;IACjBa,OAAO,EAAGb;EAAM,GAEhBS,aAAA;IAAKK,SAAS,EAAC;EAA+D,GAC7EL,aAAA,CAACV,qBAAqB;IAACgB,YAAY,EAAGT,MAAM,CAAE,CAAC,CAAE,CAACU;EAAU,CAAE,CAC1D,CACe,CAAC;AAExB"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
6
5
|
import { __experimentalHStack as HStack, __experimentalVStack as VStack, Button, TextControl, Modal } from '@wordpress/components';
|
|
7
6
|
import { __ } from '@wordpress/i18n';
|
|
8
7
|
import { useState } from '@wordpress/element';
|
|
9
|
-
|
|
10
8
|
const notEmptyString = testString => testString?.trim()?.length > 0;
|
|
11
|
-
|
|
12
9
|
export default function RenameModal({
|
|
13
10
|
menuTitle,
|
|
14
11
|
onClose,
|
|
@@ -40,15 +37,14 @@ export default function RenameModal({
|
|
|
40
37
|
type: "submit",
|
|
41
38
|
onClick: e => {
|
|
42
39
|
e.preventDefault();
|
|
43
|
-
|
|
44
40
|
if (!isEditedMenuTitleValid) {
|
|
45
41
|
return;
|
|
46
42
|
}
|
|
47
|
-
|
|
48
43
|
onSave({
|
|
49
44
|
title: editedMenuTitle
|
|
50
|
-
});
|
|
45
|
+
});
|
|
51
46
|
|
|
47
|
+
// Immediate close avoids ability to hit save multiple times.
|
|
52
48
|
onClose();
|
|
53
49
|
}
|
|
54
50
|
}, __('Save'))))));
|
package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["__experimentalHStack","HStack","__experimentalVStack","VStack","Button","TextControl","Modal","__","useState","notEmptyString","testString","trim","length","RenameModal","menuTitle","onClose","onSave","editedMenuTitle","setEditedMenuTitle","titleHasChanged","isEditedMenuTitleValid","createElement","title","onRequestClose","className","spacing","__nextHasNoMarginBottom","value","placeholder","onChange","justify","variant","onClick","disabled","type","e","preventDefault"],"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tButton,\n\tTextControl,\n\tModal,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n\nconst notEmptyString = ( testString ) => testString?.trim()?.length > 0;\n\nexport default function RenameModal( { menuTitle, onClose, onSave } ) {\n\tconst [ editedMenuTitle, setEditedMenuTitle ] = useState( menuTitle );\n\n\tconst titleHasChanged = editedMenuTitle !== menuTitle;\n\n\tconst isEditedMenuTitleValid =\n\t\ttitleHasChanged && notEmptyString( editedMenuTitle );\n\n\treturn (\n\t\t<Modal title={ __( 'Rename' ) } onRequestClose={ onClose }>\n\t\t\t<form className=\"sidebar-navigation__rename-modal-form\">\n\t\t\t\t<VStack spacing=\"3\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tvalue={ editedMenuTitle }\n\t\t\t\t\t\tplaceholder={ __( 'Navigation title' ) }\n\t\t\t\t\t\tonChange={ setEditedMenuTitle }\n\t\t\t\t\t/>\n\t\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t\t<Button variant=\"tertiary\" onClick={ onClose }>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tdisabled={ ! isEditedMenuTitleValid }\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tonClick={ ( e ) => {\n\t\t\t\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t\t\t\tif ( ! isEditedMenuTitleValid ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonSave( { title: editedMenuTitle } );\n\n\t\t\t\t\t\t\t\t// Immediate close avoids ability to hit save multiple times.\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</VStack>\n\t\t\t</form>\n\t\t</Modal>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,MAAM,EACNC,WAAW,EACXC,KAAK,QACC,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,QAAQ,oBAAoB;AAE7C,MAAMC,cAAc,GAAKC,UAAU,IAAMA,UAAU,EAAEC,IAAI,CAAC,CAAC,EAAEC,MAAM,GAAG,CAAC;AAEvE,eAAe,SAASC,WAAWA,CAAE;EAAEC,SAAS;EAAEC,OAAO;EAAEC;AAAO,CAAC,EAAG;EACrE,MAAM,CAAEC,eAAe,EAAEC,kBAAkB,CAAE,GAAGV,QAAQ,CAAEM,SAAU,CAAC;EAErE,MAAMK,eAAe,GAAGF,eAAe,KAAKH,SAAS;EAErD,MAAMM,sBAAsB,GAC3BD,eAAe,IAAIV,cAAc,CAAEQ,eAAgB,CAAC;EAErD,OACCI,aAAA,CAACf,KAAK;IAACgB,KAAK,EAAGf,EAAE,CAAE,QAAS,CAAG;IAACgB,cAAc,EAAGR;EAAS,GACzDM,aAAA;IAAMG,SAAS,EAAC;EAAuC,GACtDH,aAAA,CAAClB,MAAM;IAACsB,OAAO,EAAC;EAAG,GAClBJ,aAAA,CAAChB,WAAW;IACXqB,uBAAuB;IACvBC,KAAK,EAAGV,eAAiB;IACzBW,WAAW,EAAGrB,EAAE,CAAE,kBAAmB,CAAG;IACxCsB,QAAQ,EAAGX;EAAoB,CAC/B,CAAC,EACFG,aAAA,CAACpB,MAAM;IAAC6B,OAAO,EAAC;EAAO,GACtBT,aAAA,CAACjB,MAAM;IAAC2B,OAAO,EAAC,UAAU;IAACC,OAAO,EAAGjB;EAAS,GAC3CR,EAAE,CAAE,QAAS,CACR,CAAC,EAETc,aAAA,CAACjB,MAAM;IACN6B,QAAQ,EAAG,CAAEb,sBAAwB;IACrCW,OAAO,EAAC,SAAS;IACjBG,IAAI,EAAC,QAAQ;IACbF,OAAO,EAAKG,CAAC,IAAM;MAClBA,CAAC,CAACC,cAAc,CAAC,CAAC;MAElB,IAAK,CAAEhB,sBAAsB,EAAG;QAC/B;MACD;MACAJ,MAAM,CAAE;QAAEM,KAAK,EAAEL;MAAgB,CAAE,CAAC;;MAEpC;MACAF,OAAO,CAAC,CAAC;IACV;EAAG,GAEDR,EAAE,CAAE,MAAO,CACN,CACD,CACD,CACH,CACA,CAAC;AAEV"}
|
package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createElement, Fragment } from "@wordpress/element";
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* WordPress dependencies
|
|
5
4
|
*/
|
|
@@ -8,7 +7,6 @@ import { decodeEntities } from '@wordpress/html-entities';
|
|
|
8
7
|
/**
|
|
9
8
|
* Internal dependencies
|
|
10
9
|
*/
|
|
11
|
-
|
|
12
10
|
import { SidebarNavigationScreenWrapper } from '../sidebar-navigation-screen-navigation-menus';
|
|
13
11
|
import ScreenNavigationMoreMenu from './more-menu';
|
|
14
12
|
import NavigationMenuEditor from './navigation-menu-editor';
|