@wordpress/edit-site 5.11.0 → 5.12.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 +7 -0
- package/build/components/add-new-page/index.js +105 -0
- package/build/components/add-new-page/index.js.map +1 -0
- package/build/components/add-new-pattern/index.js +99 -0
- package/build/components/add-new-pattern/index.js.map +1 -0
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js +4 -5
- 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 +27 -44
- package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build/components/add-new-template/index.js +6 -15
- package/build/components/add-new-template/index.js.map +1 -1
- package/build/components/add-new-template/new-template.js +26 -35
- package/build/components/add-new-template/new-template.js.map +1 -1
- package/build/components/add-new-template/utils.js +71 -120
- package/build/components/add-new-template/utils.js.map +1 -1
- package/build/components/app/index.js +2 -2
- package/build/components/app/index.js.map +1 -1
- package/build/components/block-editor/back-button.js +6 -6
- package/build/components/block-editor/back-button.js.map +1 -1
- package/build/components/block-editor/block-inspector-button.js +3 -4
- package/build/components/block-editor/block-inspector-button.js.map +1 -1
- package/build/components/block-editor/constants.js +9 -0
- package/build/components/block-editor/constants.js.map +1 -0
- package/build/components/block-editor/editor-canvas.js +14 -15
- package/build/components/block-editor/editor-canvas.js.map +1 -1
- package/build/components/block-editor/get-block-editor-provider.js +42 -0
- package/build/components/block-editor/get-block-editor-provider.js.map +1 -0
- package/build/components/block-editor/index.js +6 -129
- package/build/components/block-editor/index.js.map +1 -1
- package/build/components/block-editor/inserter-media-categories.js +25 -42
- package/build/components/block-editor/inserter-media-categories.js.map +1 -1
- package/build/components/block-editor/providers/default-block-editor-provider.js +58 -0
- package/build/components/block-editor/providers/default-block-editor-provider.js.map +1 -0
- package/build/components/block-editor/providers/navigation-block-editor-provider.js +117 -0
- package/build/components/block-editor/providers/navigation-block-editor-provider.js.map +1 -0
- package/build/components/block-editor/resizable-editor.js +6 -7
- package/build/components/block-editor/resizable-editor.js.map +1 -1
- package/build/components/block-editor/resize-handle.js +5 -7
- package/build/components/block-editor/resize-handle.js.map +1 -1
- package/build/components/block-editor/site-editor-canvas.js +137 -0
- package/build/components/block-editor/site-editor-canvas.js.map +1 -0
- package/build/components/block-editor/use-site-editor-settings.js +82 -0
- package/build/components/block-editor/use-site-editor-settings.js.map +1 -0
- package/build/components/canvas-spinner/index.js +18 -1
- package/build/components/canvas-spinner/index.js.map +1 -1
- package/build/components/code-editor/code-editor-text-area.js +5 -6
- package/build/components/code-editor/code-editor-text-area.js.map +1 -1
- package/build/components/create-pattern-modal/index.js +125 -0
- package/build/components/create-pattern-modal/index.js.map +1 -0
- package/build/components/create-template-part-modal/index.js +73 -33
- package/build/components/create-template-part-modal/index.js.map +1 -1
- package/build/components/editor/index.js +43 -24
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor-canvas-container/index.js +29 -12
- package/build/components/editor-canvas-container/index.js.map +1 -1
- package/build/components/error-boundary/warning.js +8 -10
- package/build/components/error-boundary/warning.js.map +1 -1
- package/build/components/global-styles/block-preview-panel.js +7 -10
- package/build/components/global-styles/block-preview-panel.js.map +1 -1
- package/build/components/global-styles/color-indicator-wrapper.js +7 -9
- package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
- package/build/components/global-styles/color-palette-panel.js +5 -6
- package/build/components/global-styles/color-palette-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +3 -5
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/global-styles-provider.js +20 -26
- package/build/components/global-styles/global-styles-provider.js.map +1 -1
- package/build/components/global-styles/gradients-palette-panel.js +5 -6
- package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build/components/global-styles/header.js +4 -5
- package/build/components/global-styles/header.js.map +1 -1
- package/build/components/global-styles/hooks.js +3 -3
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/icon-with-current-color.js +7 -9
- package/build/components/global-styles/icon-with-current-color.js.map +1 -1
- package/build/components/global-styles/navigation-button.js +15 -17
- package/build/components/global-styles/navigation-button.js.map +1 -1
- package/build/components/global-styles/palette.js +12 -16
- package/build/components/global-styles/palette.js.map +1 -1
- package/build/components/global-styles/preview.js +43 -53
- package/build/components/global-styles/preview.js.map +1 -1
- package/build/components/global-styles/root-menu.js +2 -2
- package/build/components/global-styles/root-menu.js.map +1 -1
- package/build/components/global-styles/screen-block-list.js +6 -9
- package/build/components/global-styles/screen-block-list.js.map +1 -1
- package/build/components/global-styles/screen-block.js +11 -12
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-color-palette.js +3 -4
- package/build/components/global-styles/screen-color-palette.js.map +1 -1
- package/build/components/global-styles/screen-colors.js +2 -2
- package/build/components/global-styles/screen-colors.js.map +1 -1
- package/build/components/global-styles/screen-css.js +2 -2
- package/build/components/global-styles/screen-css.js.map +1 -1
- package/build/components/global-styles/screen-layout.js +2 -2
- package/build/components/global-styles/screen-layout.js.map +1 -1
- package/build/components/global-styles/screen-revisions/index.js +12 -12
- package/build/components/global-styles/screen-revisions/index.js.map +1 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js +14 -19
- 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 +7 -13
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
- package/build/components/global-styles/screen-root.js +5 -5
- package/build/components/global-styles/screen-root.js.map +1 -1
- package/build/components/global-styles/screen-typography-element.js +3 -4
- package/build/components/global-styles/screen-typography-element.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +8 -9
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/style-variations-container.js +15 -8
- package/build/components/global-styles/style-variations-container.js.map +1 -1
- package/build/components/global-styles/subtitle.js +4 -5
- package/build/components/global-styles/subtitle.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +6 -7
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/typography-preview.js +7 -8
- package/build/components/global-styles/typography-preview.js.map +1 -1
- package/build/components/global-styles/ui.js +123 -50
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles/variations-panel.js +5 -6
- package/build/components/global-styles/variations-panel.js.map +1 -1
- package/build/components/global-styles-renderer/index.js +2 -2
- package/build/components/global-styles-renderer/index.js.map +1 -1
- package/build/components/header-edit-mode/document-actions/index.js +136 -24
- package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
- package/build/components/header-edit-mode/index.js +8 -14
- package/build/components/header-edit-mode/index.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/index.js +49 -53
- package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +4 -7
- 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 +5 -14
- 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 +2 -6
- package/build/components/header-edit-mode/undo-redo/redo.js.map +1 -1
- package/build/components/header-edit-mode/undo-redo/undo.js +2 -6
- package/build/components/header-edit-mode/undo-redo/undo.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +3 -4
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +42 -51
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +10 -12
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build/components/keyboard-shortcuts/edit-mode.js +7 -2
- package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +7 -2
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/register.js +1 -1
- package/build/components/keyboard-shortcuts/register.js.map +1 -1
- package/build/components/layout/hooks.js +21 -0
- package/build/components/layout/hooks.js.map +1 -1
- package/build/components/layout/index.js +44 -34
- package/build/components/layout/index.js.map +1 -1
- package/build/components/list/added-by.js +13 -23
- package/build/components/list/added-by.js.map +1 -1
- package/build/components/list/header.js +4 -7
- package/build/components/list/header.js.map +1 -1
- package/build/components/list/index.js +4 -6
- package/build/components/list/index.js.map +1 -1
- package/build/components/list/table.js +35 -40
- package/build/components/list/table.js.map +1 -1
- package/build/components/page/header.js +41 -0
- package/build/components/page/header.js.map +1 -0
- package/build/components/page/index.js +49 -0
- package/build/components/page/index.js.map +1 -0
- package/build/components/page-actions/delete-page-menu-item.js +70 -0
- package/build/components/page-actions/delete-page-menu-item.js.map +1 -0
- package/build/components/page-actions/index.js +43 -0
- package/build/components/page-actions/index.js.map +1 -0
- package/build/components/page-content-focus-manager/back-to-page-notification.js +67 -0
- package/build/components/page-content-focus-manager/back-to-page-notification.js.map +1 -0
- package/build/components/page-content-focus-manager/constants.js +9 -0
- package/build/components/page-content-focus-manager/constants.js.map +1 -0
- package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js +60 -0
- package/build/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -0
- package/build/components/page-content-focus-manager/edit-template-notification.js +121 -0
- package/build/components/page-content-focus-manager/edit-template-notification.js.map +1 -0
- package/build/components/page-content-focus-manager/index.js +37 -0
- package/build/components/page-content-focus-manager/index.js.map +1 -0
- package/build/components/page-library/grid-item.js +165 -0
- package/build/components/page-library/grid-item.js.map +1 -0
- package/build/components/page-library/grid.js +49 -0
- package/build/components/page-library/grid.js.map +1 -0
- package/build/components/page-library/index.js +61 -0
- package/build/components/page-library/index.js.map +1 -0
- package/build/components/page-library/no-patterns.js +20 -0
- package/build/components/page-library/no-patterns.js.map +1 -0
- package/build/components/page-library/patterns-list.js +108 -0
- package/build/components/page-library/patterns-list.js.map +1 -0
- package/build/components/page-library/search-items.js +172 -0
- package/build/components/page-library/search-items.js.map +1 -0
- package/build/components/page-library/use-library-settings.js +53 -0
- package/build/components/page-library/use-library-settings.js.map +1 -0
- package/build/components/page-library/use-patterns.js +194 -0
- package/build/components/page-library/use-patterns.js.map +1 -0
- package/build/components/page-library/utils.js +30 -0
- package/build/components/page-library/utils.js.map +1 -0
- package/build/components/page-main/index.js +46 -0
- package/build/components/page-main/index.js.map +1 -0
- package/build/components/page-templates/index.js +101 -0
- package/build/components/page-templates/index.js.map +1 -0
- package/build/components/preferences-modal/enable-feature.js +4 -7
- package/build/components/preferences-modal/enable-feature.js.map +1 -1
- package/build/components/preferences-modal/index.js +4 -5
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/resizable-frame/index.js +25 -15
- package/build/components/resizable-frame/index.js.map +1 -1
- package/build/components/revisions/index.js +14 -17
- package/build/components/revisions/index.js.map +1 -1
- package/build/components/routes/link.js +15 -22
- package/build/components/routes/link.js.map +1 -1
- package/build/components/routes/use-title.js +3 -7
- package/build/components/routes/use-title.js.map +1 -1
- package/build/components/save-button/index.js +23 -13
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/save-hub/index.js +97 -5
- package/build/components/save-hub/index.js.map +1 -1
- package/build/components/save-panel/index.js +63 -19
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/secondary-sidebar/inserter-sidebar.js +4 -8
- package/build/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +51 -9
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/index.js +14 -8
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-button/index.js +2 -4
- package/build/components/sidebar-button/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/default-sidebar.js +11 -12
- package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js +22 -8
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build/components/sidebar-edit-mode/index.js +13 -10
- package/build/components/sidebar-edit-mode/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/edit-template.js +84 -0
- package/build/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -0
- package/build/components/sidebar-edit-mode/page-panels/index.js +99 -0
- package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -0
- package/build/components/sidebar-edit-mode/page-panels/page-content.js +35 -0
- package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -0
- package/build/components/sidebar-edit-mode/page-panels/page-status.js +192 -0
- package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -0
- package/build/components/sidebar-edit-mode/page-panels/page-summary.js +45 -0
- package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -0
- package/build/components/sidebar-edit-mode/page-panels/publish-date.js +98 -0
- package/build/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -0
- package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +8 -12
- package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/settings-header/index.js +52 -21
- package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/sidebar-card/index.js +46 -0
- package/build/components/sidebar-edit-mode/sidebar-card/index.js.map +1 -0
- package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js +5 -6
- package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -1
- package/build/components/sidebar-edit-mode/{template-card → template-panel}/index.js +30 -22
- package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -0
- package/build/components/sidebar-edit-mode/{template-revisions/index.js → template-panel/last-revision.js} +7 -8
- package/{build-module/components/sidebar-edit-mode/template-revisions/index.js.map → build/components/sidebar-edit-mode/template-panel/last-revision.js.map} +1 -1
- package/build/components/sidebar-edit-mode/{template-card → template-panel}/template-actions.js +12 -16
- package/build/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -0
- package/build/components/sidebar-edit-mode/{template-card → template-panel}/template-areas.js +15 -19
- package/build/components/sidebar-edit-mode/template-panel/template-areas.js.map +1 -0
- package/build/components/sidebar-navigation-item/index.js +17 -14
- package/build/components/sidebar-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +38 -20
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.js +36 -0
- package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -0
- package/build/components/sidebar-navigation-screen-details-panel/index.js +58 -0
- package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -0
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +22 -0
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -0
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +35 -0
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -0
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +22 -0
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -0
- package/build/components/sidebar-navigation-screen-global-styles/index.js +114 -24
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-library/category-item.js +48 -0
- package/build/components/sidebar-navigation-screen-library/category-item.js.map +1 -0
- package/build/components/sidebar-navigation-screen-library/index.js +112 -0
- package/build/components/sidebar-navigation-screen-library/index.js.map +1 -0
- package/build/components/sidebar-navigation-screen-library/use-default-pattern-categories.js +36 -0
- package/build/components/sidebar-navigation-screen-library/use-default-pattern-categories.js.map +1 -0
- package/build/components/sidebar-navigation-screen-library/use-pattern-categories.js +76 -0
- package/build/components/sidebar-navigation-screen-library/use-pattern-categories.js.map +1 -0
- package/build/components/sidebar-navigation-screen-library/use-template-part-areas.js +41 -0
- package/build/components/sidebar-navigation-screen-library/use-template-part-areas.js.map +1 -0
- package/build/components/sidebar-navigation-screen-library/use-theme-patterns.js +40 -0
- package/build/components/sidebar-navigation-screen-library/use-theme-patterns.js.map +1 -0
- package/build/components/sidebar-navigation-screen-main/index.js +12 -13
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-item/index.js +5 -7
- package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +42 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js +41 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js +49 -97
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +84 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +71 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +54 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +49 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +163 -0
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menus/constants.js +3 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js +59 -26
- 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 +75 -31
- 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 +23 -53
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/index.js +63 -12
- package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/page-details.js +150 -0
- package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -0
- package/build/components/sidebar-navigation-screen-page/status-label.js +111 -0
- package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -0
- package/build/components/sidebar-navigation-screen-pages/index.js +133 -21
- package/build/components/sidebar-navigation-screen-pages/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/index.js +66 -0
- package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -0
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +41 -0
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -0
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +33 -0
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -0
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +40 -0
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -0
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +47 -0
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -0
- package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +82 -0
- package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -0
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +80 -0
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -0
- package/build/components/sidebar-navigation-screen-template/home-template-details.js +212 -0
- package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -0
- package/build/components/sidebar-navigation-screen-template/index.js +43 -23
- package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates/index.js +23 -28
- package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build/components/site-hub/index.js +29 -24
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/site-icon/index.js +4 -5
- package/build/components/site-icon/index.js.map +1 -1
- package/build/components/start-template-options/index.js +15 -21
- package/build/components/start-template-options/index.js.map +1 -1
- package/build/components/style-book/index.js +45 -50
- package/build/components/style-book/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +16 -6
- 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 +4 -4
- 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 +21 -12
- package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
- package/build/components/table/index.js +29 -0
- package/build/components/table/index.js.map +1 -0
- package/build/components/{list/actions → template-actions}/index.js +34 -31
- package/build/components/template-actions/index.js.map +1 -0
- package/build/components/{list/actions → template-actions}/rename-menu-item.js +4 -5
- package/build/components/template-actions/rename-menu-item.js.map +1 -0
- package/build/components/template-part-converter/convert-to-regular.js +4 -5
- 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 -27
- package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build/components/template-part-converter/index.js +12 -18
- package/build/components/template-part-converter/index.js.map +1 -1
- package/build/components/welcome-guide/editor.js +1 -1
- package/build/components/welcome-guide/editor.js.map +1 -1
- package/build/components/welcome-guide/image.js +4 -5
- package/build/components/welcome-guide/image.js.map +1 -1
- package/build/components/welcome-guide/styles.js +4 -3
- package/build/components/welcome-guide/styles.js.map +1 -1
- package/build/hooks/commands/use-common-commands.js +190 -0
- package/build/hooks/commands/use-common-commands.js.map +1 -0
- package/build/hooks/commands/use-edit-mode-commands.js +71 -29
- package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
- package/build/hooks/index.js +2 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/navigation-menu-edit.js +95 -0
- package/build/hooks/navigation-menu-edit.js.map +1 -0
- package/build/hooks/push-changes-to-global-styles/index.js +15 -10
- package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build/hooks/template-part-edit.js +11 -15
- package/build/hooks/template-part-edit.js.map +1 -1
- package/build/index.js +3 -6
- package/build/index.js.map +1 -1
- package/build/{private-apis.js → lock-unlock.js} +1 -1
- package/build/lock-unlock.js.map +1 -0
- package/build/store/actions.js +165 -125
- package/build/store/actions.js.map +1 -1
- package/build/store/index.js +3 -3
- package/build/store/index.js.map +1 -1
- package/build/store/private-actions.js +7 -10
- package/build/store/private-actions.js.map +1 -1
- package/build/store/reducer.js +33 -33
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +70 -22
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils.js +1 -3
- package/build/store/utils.js.map +1 -1
- package/build/utils/get-is-list-page.js +13 -7
- package/build/utils/get-is-list-page.js.map +1 -1
- package/build/utils/is-previewing-theme.js +2 -4
- package/build/utils/is-previewing-theme.js.map +1 -1
- package/build/utils/is-template-revertable.js +1 -1
- package/build/utils/is-template-revertable.js.map +1 -1
- package/build/utils/use-activate-theme.js +3 -3
- package/build/utils/use-activate-theme.js.map +1 -1
- package/build/utils/use-debounced-input.js +26 -0
- package/build/utils/use-debounced-input.js.map +1 -0
- package/build-module/components/add-new-page/index.js +93 -0
- package/build-module/components/add-new-page/index.js.map +1 -0
- package/build-module/components/add-new-pattern/index.js +82 -0
- package/build-module/components/add-new-pattern/index.js.map +1 -0
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +4 -5
- 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 +25 -41
- package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build-module/components/add-new-template/index.js +6 -13
- package/build-module/components/add-new-template/index.js.map +1 -1
- package/build-module/components/add-new-template/new-template.js +22 -31
- package/build-module/components/add-new-template/new-template.js.map +1 -1
- package/build-module/components/add-new-template/utils.js +71 -120
- package/build-module/components/add-new-template/utils.js.map +1 -1
- package/build-module/components/app/index.js +1 -1
- package/build-module/components/app/index.js.map +1 -1
- package/build-module/components/block-editor/back-button.js +5 -5
- package/build-module/components/block-editor/back-button.js.map +1 -1
- package/build-module/components/block-editor/block-inspector-button.js +3 -4
- package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
- package/build-module/components/block-editor/constants.js +2 -0
- package/build-module/components/block-editor/constants.js.map +1 -0
- package/build-module/components/block-editor/editor-canvas.js +12 -12
- package/build-module/components/block-editor/editor-canvas.js.map +1 -1
- package/build-module/components/block-editor/get-block-editor-provider.js +31 -0
- package/build-module/components/block-editor/get-block-editor-provider.js.map +1 -0
- package/build-module/components/block-editor/index.js +9 -125
- package/build-module/components/block-editor/index.js.map +1 -1
- package/build-module/components/block-editor/inserter-media-categories.js +25 -42
- 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 +42 -0
- package/build-module/components/block-editor/providers/default-block-editor-provider.js.map +1 -0
- package/build-module/components/block-editor/providers/navigation-block-editor-provider.js +102 -0
- package/build-module/components/block-editor/providers/navigation-block-editor-provider.js.map +1 -0
- package/build-module/components/block-editor/resizable-editor.js +6 -7
- package/build-module/components/block-editor/resizable-editor.js.map +1 -1
- package/build-module/components/block-editor/resize-handle.js +5 -7
- package/build-module/components/block-editor/resize-handle.js.map +1 -1
- package/build-module/components/block-editor/site-editor-canvas.js +115 -0
- package/build-module/components/block-editor/site-editor-canvas.js.map +1 -0
- package/build-module/components/block-editor/use-site-editor-settings.js +67 -0
- package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -0
- package/build-module/components/canvas-spinner/index.js +15 -1
- package/build-module/components/canvas-spinner/index.js.map +1 -1
- package/build-module/components/code-editor/code-editor-text-area.js +5 -6
- package/build-module/components/code-editor/code-editor-text-area.js.map +1 -1
- package/build-module/components/create-pattern-modal/index.js +113 -0
- package/build-module/components/create-pattern-modal/index.js.map +1 -0
- package/build-module/components/create-template-part-modal/index.js +70 -34
- package/build-module/components/create-template-part-modal/index.js.map +1 -1
- package/build-module/components/editor/index.js +43 -24
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor-canvas-container/index.js +26 -10
- package/build-module/components/editor-canvas-container/index.js.map +1 -1
- package/build-module/components/error-boundary/warning.js +8 -10
- package/build-module/components/error-boundary/warning.js.map +1 -1
- package/build-module/components/global-styles/block-preview-panel.js +7 -10
- package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
- package/build-module/components/global-styles/color-indicator-wrapper.js +7 -8
- package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
- package/build-module/components/global-styles/color-palette-panel.js +4 -5
- package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +2 -4
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/global-styles-provider.js +18 -25
- package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
- package/build-module/components/global-styles/gradients-palette-panel.js +4 -5
- package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/header.js +4 -5
- package/build-module/components/global-styles/header.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +1 -1
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/icon-with-current-color.js +7 -8
- package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
- package/build-module/components/global-styles/navigation-button.js +15 -14
- package/build-module/components/global-styles/navigation-button.js.map +1 -1
- package/build-module/components/global-styles/palette.js +11 -15
- package/build-module/components/global-styles/palette.js.map +1 -1
- package/build-module/components/global-styles/preview.js +42 -52
- package/build-module/components/global-styles/preview.js.map +1 -1
- package/build-module/components/global-styles/root-menu.js +1 -1
- package/build-module/components/global-styles/root-menu.js.map +1 -1
- package/build-module/components/global-styles/screen-block-list.js +5 -8
- package/build-module/components/global-styles/screen-block-list.js.map +1 -1
- package/build-module/components/global-styles/screen-block.js +10 -11
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-color-palette.js +3 -4
- package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
- package/build-module/components/global-styles/screen-colors.js +1 -1
- package/build-module/components/global-styles/screen-colors.js.map +1 -1
- package/build-module/components/global-styles/screen-css.js +1 -1
- package/build-module/components/global-styles/screen-css.js.map +1 -1
- package/build-module/components/global-styles/screen-layout.js +1 -1
- package/build-module/components/global-styles/screen-layout.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/index.js +9 -9
- package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +14 -19
- 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 +6 -11
- 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 +4 -4
- package/build-module/components/global-styles/screen-root.js.map +1 -1
- package/build-module/components/global-styles/screen-typography-element.js +3 -4
- package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js +6 -7
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/style-variations-container.js +15 -8
- package/build-module/components/global-styles/style-variations-container.js.map +1 -1
- package/build-module/components/global-styles/subtitle.js +4 -5
- package/build-module/components/global-styles/subtitle.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +5 -6
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-preview.js +6 -7
- package/build-module/components/global-styles/typography-preview.js.map +1 -1
- package/build-module/components/global-styles/ui.js +123 -50
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles/variations-panel.js +5 -6
- package/build-module/components/global-styles/variations-panel.js.map +1 -1
- package/build-module/components/global-styles-renderer/index.js +1 -1
- package/build-module/components/global-styles-renderer/index.js.map +1 -1
- package/build-module/components/header-edit-mode/document-actions/index.js +136 -25
- package/build-module/components/header-edit-mode/document-actions/index.js.map +1 -1
- package/build-module/components/header-edit-mode/index.js +6 -12
- package/build-module/components/header-edit-mode/index.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/index.js +49 -53
- package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +4 -4
- 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 +5 -13
- 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 +2 -3
- 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 +2 -3
- package/build-module/components/header-edit-mode/undo-redo/undo.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +3 -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 +40 -49
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +10 -12
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/edit-mode.js +7 -2
- package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +7 -2
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/register.js +1 -1
- package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
- package/build-module/components/layout/hooks.js +21 -0
- package/build-module/components/layout/hooks.js.map +1 -1
- package/build-module/components/layout/index.js +37 -28
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/list/added-by.js +13 -23
- package/build-module/components/list/added-by.js.map +1 -1
- package/build-module/components/list/header.js +4 -7
- package/build-module/components/list/header.js.map +1 -1
- package/build-module/components/list/index.js +3 -5
- package/build-module/components/list/index.js.map +1 -1
- package/build-module/components/list/table.js +34 -39
- package/build-module/components/list/table.js.map +1 -1
- package/build-module/components/page/header.js +33 -0
- package/build-module/components/page/header.js.map +1 -0
- package/build-module/components/page/index.js +37 -0
- package/build-module/components/page/index.js.map +1 -0
- package/build-module/components/page-actions/delete-page-menu-item.js +58 -0
- package/build-module/components/page-actions/delete-page-menu-item.js.map +1 -0
- package/build-module/components/page-actions/index.js +30 -0
- package/build-module/components/page-actions/index.js.map +1 -0
- package/build-module/components/page-content-focus-manager/back-to-page-notification.js +53 -0
- package/build-module/components/page-content-focus-manager/back-to-page-notification.js.map +1 -0
- package/build-module/components/page-content-focus-manager/constants.js +2 -0
- package/build-module/components/page-content-focus-manager/constants.js.map +1 -0
- package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js +45 -0
- package/build-module/components/page-content-focus-manager/disable-non-page-content-blocks.js.map +1 -0
- package/build-module/components/page-content-focus-manager/edit-template-notification.js +110 -0
- package/build-module/components/page-content-focus-manager/edit-template-notification.js.map +1 -0
- package/build-module/components/page-content-focus-manager/index.js +23 -0
- package/build-module/components/page-content-focus-manager/index.js.map +1 -0
- package/build-module/components/page-library/grid-item.js +145 -0
- package/build-module/components/page-library/grid-item.js.map +1 -0
- package/build-module/components/page-library/grid.js +38 -0
- package/build-module/components/page-library/grid.js.map +1 -0
- package/build-module/components/page-library/index.js +43 -0
- package/build-module/components/page-library/index.js.map +1 -0
- package/build-module/components/page-library/no-patterns.js +12 -0
- package/build-module/components/page-library/no-patterns.js.map +1 -0
- package/build-module/components/page-library/patterns-list.js +87 -0
- package/build-module/components/page-library/patterns-list.js.map +1 -0
- package/build-module/components/page-library/search-items.js +156 -0
- package/build-module/components/page-library/search-items.js.map +1 -0
- package/build-module/components/page-library/use-library-settings.js +40 -0
- package/build-module/components/page-library/use-library-settings.js.map +1 -0
- package/build-module/components/page-library/use-patterns.js +176 -0
- package/build-module/components/page-library/use-patterns.js.map +1 -0
- package/build-module/components/page-library/utils.js +13 -0
- package/build-module/components/page-library/utils.js.map +1 -0
- package/build-module/components/page-main/index.js +32 -0
- package/build-module/components/page-main/index.js.map +1 -0
- package/build-module/components/page-templates/index.js +80 -0
- package/build-module/components/page-templates/index.js.map +1 -0
- package/build-module/components/preferences-modal/enable-feature.js +4 -4
- package/build-module/components/preferences-modal/enable-feature.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +4 -5
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/resizable-frame/index.js +24 -14
- package/build-module/components/resizable-frame/index.js.map +1 -1
- package/build-module/components/revisions/index.js +12 -14
- package/build-module/components/revisions/index.js.map +1 -1
- package/build-module/components/routes/link.js +14 -18
- package/build-module/components/routes/link.js.map +1 -1
- package/build-module/components/routes/use-title.js +2 -6
- package/build-module/components/routes/use-title.js.map +1 -1
- package/build-module/components/save-button/index.js +23 -13
- package/build-module/components/save-button/index.js.map +1 -1
- package/build-module/components/save-hub/index.js +95 -8
- package/build-module/components/save-hub/index.js.map +1 -1
- package/build-module/components/save-panel/index.js +62 -20
- package/build-module/components/save-panel/index.js.map +1 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.js +4 -5
- package/build-module/components/secondary-sidebar/inserter-sidebar.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +48 -8
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/components/sidebar/index.js +11 -7
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-button/index.js +2 -3
- package/build-module/components/sidebar-button/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/default-sidebar.js +11 -12
- package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +19 -6
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/index.js +14 -11
- package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js +71 -0
- package/build-module/components/sidebar-edit-mode/page-panels/edit-template.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/page-panels/index.js +78 -0
- package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/page-panels/page-content.js +23 -0
- package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/page-panels/page-status.js +176 -0
- package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +33 -0
- package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js +85 -0
- package/build-module/components/sidebar-edit-mode/page-panels/publish-date.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +8 -9
- 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 +50 -23
- 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 +35 -0
- package/build-module/components/sidebar-edit-mode/sidebar-card/index.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js +4 -5
- 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 +72 -0
- package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/{template-revisions/index.js → template-panel/last-revision.js} +7 -8
- package/build-module/components/sidebar-edit-mode/template-panel/last-revision.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/{template-card → template-panel}/template-actions.js +12 -16
- package/build-module/components/sidebar-edit-mode/template-panel/template-actions.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/{template-card → template-panel}/template-areas.js +15 -19
- package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js.map +1 -0
- package/build-module/components/sidebar-navigation-item/index.js +17 -14
- package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +39 -21
- package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js +27 -0
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-details-panel/index.js +30 -0
- package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +14 -0
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +24 -0
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +14 -0
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +112 -21
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-library/category-item.js +37 -0
- package/build-module/components/sidebar-navigation-screen-library/category-item.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-library/index.js +87 -0
- package/build-module/components/sidebar-navigation-screen-library/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-library/use-default-pattern-categories.js +25 -0
- package/build-module/components/sidebar-navigation-screen-library/use-default-pattern-categories.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-library/use-pattern-categories.js +61 -0
- package/build-module/components/sidebar-navigation-screen-library/use-pattern-categories.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-library/use-template-part-areas.js +34 -0
- package/build-module/components/sidebar-navigation-screen-library/use-template-part-areas.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-library/use-theme-patterns.js +27 -0
- package/build-module/components/sidebar-navigation-screen-library/use-theme-patterns.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-main/index.js +13 -13
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +4 -6
- 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 +33 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-modal.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js +26 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/edit-button.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +47 -95
- 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 +70 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +58 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +46 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +35 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +151 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js +3 -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 +58 -26
- 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 +73 -28
- 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 +24 -53
- 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 +59 -14
- package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/page-details.js +131 -0
- package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-page/status-label.js +98 -0
- package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-pages/index.js +130 -22
- package/build-module/components/sidebar-navigation-screen-pages/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/index.js +46 -0
- package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +28 -0
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +22 -0
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +27 -0
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +34 -0
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +71 -0
- package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +64 -0
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-template/home-template-details.js +192 -0
- package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-template/index.js +40 -23
- package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates/index.js +23 -27
- package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build-module/components/site-hub/index.js +28 -22
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/site-icon/index.js +4 -5
- package/build-module/components/site-icon/index.js.map +1 -1
- package/build-module/components/start-template-options/index.js +15 -21
- package/build-module/components/start-template-options/index.js.map +1 -1
- package/build-module/components/style-book/index.js +44 -48
- 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 +15 -5
- 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 +1 -1
- 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 +20 -11
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
- package/build-module/components/table/index.js +21 -0
- package/build-module/components/table/index.js.map +1 -0
- package/build-module/components/{list/actions → template-actions}/index.js +34 -31
- package/build-module/components/template-actions/index.js.map +1 -0
- package/build-module/components/{list/actions → template-actions}/rename-menu-item.js +4 -5
- package/build-module/components/template-actions/rename-menu-item.js.map +1 -0
- package/build-module/components/template-part-converter/convert-to-regular.js +4 -5
- 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 +8 -26
- package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build-module/components/template-part-converter/index.js +12 -18
- package/build-module/components/template-part-converter/index.js.map +1 -1
- package/build-module/components/welcome-guide/editor.js +1 -1
- package/build-module/components/welcome-guide/editor.js.map +1 -1
- package/build-module/components/welcome-guide/image.js +4 -5
- package/build-module/components/welcome-guide/image.js.map +1 -1
- package/build-module/components/welcome-guide/styles.js +5 -3
- package/build-module/components/welcome-guide/styles.js.map +1 -1
- package/build-module/hooks/commands/use-common-commands.js +172 -0
- package/build-module/hooks/commands/use-common-commands.js.map +1 -0
- package/build-module/hooks/commands/use-edit-mode-commands.js +72 -30
- package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
- package/build-module/hooks/index.js +1 -0
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/navigation-menu-edit.js +77 -0
- package/build-module/hooks/navigation-menu-edit.js.map +1 -0
- package/build-module/hooks/push-changes-to-global-styles/index.js +14 -9
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build-module/hooks/template-part-edit.js +10 -11
- package/build-module/hooks/template-part-edit.js.map +1 -1
- package/build-module/index.js +3 -6
- package/build-module/index.js.map +1 -1
- package/build-module/{private-apis.js → lock-unlock.js} +1 -1
- package/build-module/lock-unlock.js.map +1 -0
- package/build-module/store/actions.js +157 -126
- package/build-module/store/actions.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 +7 -10
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/reducer.js +31 -33
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +62 -21
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils.js +1 -3
- package/build-module/store/utils.js.map +1 -1
- package/build-module/utils/get-is-list-page.js +13 -7
- package/build-module/utils/get-is-list-page.js.map +1 -1
- package/build-module/utils/is-previewing-theme.js +2 -4
- package/build-module/utils/is-previewing-theme.js.map +1 -1
- package/build-module/utils/is-template-revertable.js +1 -1
- package/build-module/utils/is-template-revertable.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 +17 -0
- package/build-module/utils/use-debounced-input.js.map +1 -0
- package/build-style/style-rtl.css +587 -71
- package/build-style/style.css +587 -71
- package/package.json +44 -37
- package/src/components/add-new-page/index.js +105 -0
- package/src/components/add-new-pattern/index.js +94 -0
- package/src/components/add-new-template/add-custom-template-modal-content.js +1 -13
- package/src/components/add-new-template/index.js +0 -3
- package/src/components/add-new-template/new-template.js +3 -3
- package/src/components/app/index.js +1 -1
- package/src/components/block-editor/back-button.js +5 -2
- package/src/components/block-editor/constants.js +1 -0
- package/src/components/block-editor/editor-canvas.js +1 -1
- package/src/components/block-editor/get-block-editor-provider.js +29 -0
- package/src/components/block-editor/index.js +15 -188
- package/src/components/block-editor/providers/default-block-editor-provider.js +44 -0
- package/src/components/block-editor/providers/navigation-block-editor-provider.js +114 -0
- package/src/components/block-editor/site-editor-canvas.js +155 -0
- package/src/components/block-editor/style.scss +6 -0
- package/src/components/block-editor/use-site-editor-settings.js +91 -0
- package/src/components/canvas-spinner/index.js +11 -1
- package/src/components/create-pattern-modal/index.js +134 -0
- package/src/components/create-pattern-modal/style.scss +3 -0
- package/src/components/create-template-part-modal/index.js +63 -3
- package/src/components/editor/index.js +32 -17
- package/src/components/editor/style.scss +6 -11
- package/src/components/editor-canvas-container/index.js +21 -4
- package/src/components/global-styles/color-palette-panel.js +1 -1
- package/src/components/global-styles/dimensions-panel.js +1 -1
- package/src/components/global-styles/global-styles-provider.js +10 -14
- package/src/components/global-styles/gradients-palette-panel.js +1 -1
- package/src/components/global-styles/hooks.js +1 -1
- package/src/components/global-styles/palette.js +2 -2
- package/src/components/global-styles/preview.js +1 -1
- package/src/components/global-styles/root-menu.js +1 -1
- package/src/components/global-styles/screen-block-list.js +1 -1
- package/src/components/global-styles/screen-block.js +1 -1
- package/src/components/global-styles/screen-colors.js +1 -1
- package/src/components/global-styles/screen-css.js +1 -1
- package/src/components/global-styles/screen-layout.js +1 -1
- package/src/components/global-styles/screen-revisions/index.js +1 -1
- package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +8 -6
- package/src/components/global-styles/screen-root.js +1 -1
- package/src/components/global-styles/screen-typography.js +1 -1
- package/src/components/global-styles/stories/index.js +1 -1
- package/src/components/global-styles/style-variations-container.js +13 -3
- package/src/components/global-styles/style.scss +11 -0
- package/src/components/global-styles/typography-panel.js +1 -1
- package/src/components/global-styles/typography-preview.js +1 -1
- package/src/components/global-styles/ui.js +132 -45
- package/src/components/global-styles-renderer/index.js +1 -1
- package/src/components/header-edit-mode/document-actions/index.js +155 -36
- package/src/components/header-edit-mode/document-actions/style.scss +72 -13
- package/src/components/header-edit-mode/index.js +4 -4
- package/src/components/header-edit-mode/tools-more-menu-group/index.js +1 -6
- package/src/components/keyboard-shortcuts/edit-mode.js +5 -1
- package/src/components/keyboard-shortcuts/index.js +5 -1
- package/src/components/keyboard-shortcuts/register.js +1 -1
- package/src/components/layout/hooks.js +21 -0
- package/src/components/layout/index.js +92 -70
- package/src/components/layout/style.scss +7 -0
- package/src/components/list/index.js +1 -1
- package/src/components/list/table.js +6 -2
- package/src/components/page/header.js +38 -0
- package/src/components/page/index.js +38 -0
- package/src/components/page/style.scss +38 -0
- package/src/components/page-actions/delete-page-menu-item.js +71 -0
- package/src/components/page-actions/index.js +36 -0
- package/src/components/page-content-focus-manager/back-to-page-notification.js +65 -0
- package/src/components/page-content-focus-manager/constants.js +5 -0
- package/src/components/page-content-focus-manager/disable-non-page-content-blocks.js +52 -0
- package/src/components/page-content-focus-manager/edit-template-notification.js +108 -0
- package/src/components/page-content-focus-manager/index.js +26 -0
- package/src/components/page-library/grid-item.js +179 -0
- package/src/components/page-library/grid.js +39 -0
- package/src/components/page-library/index.js +39 -0
- package/src/components/page-library/no-patterns.js +12 -0
- package/src/components/page-library/patterns-list.js +114 -0
- package/src/components/page-library/search-items.js +171 -0
- package/src/components/page-library/style.scss +105 -0
- package/src/components/page-library/use-library-settings.js +51 -0
- package/src/components/page-library/use-patterns.js +238 -0
- package/src/components/page-library/utils.js +21 -0
- package/src/components/page-main/index.js +27 -0
- package/src/components/page-templates/index.js +104 -0
- package/src/components/resizable-frame/index.js +18 -6
- package/src/components/resizable-frame/style.scss +20 -18
- package/src/components/revisions/index.js +7 -8
- package/src/components/routes/link.js +2 -2
- package/src/components/routes/use-title.js +1 -1
- package/src/components/save-button/index.js +16 -7
- package/src/components/save-hub/index.js +143 -38
- package/src/components/save-hub/style.scss +6 -0
- package/src/components/save-panel/index.js +63 -16
- package/src/components/secondary-sidebar/list-view-sidebar.js +56 -2
- package/src/components/sidebar/index.js +13 -7
- package/src/components/sidebar/style.scss +3 -4
- package/src/components/sidebar-edit-mode/global-styles-sidebar.js +42 -29
- package/src/components/sidebar-edit-mode/index.js +16 -14
- package/src/components/sidebar-edit-mode/page-panels/edit-template.js +69 -0
- package/src/components/sidebar-edit-mode/page-panels/index.js +89 -0
- package/src/components/sidebar-edit-mode/page-panels/page-content.js +27 -0
- package/src/components/sidebar-edit-mode/page-panels/page-status.js +233 -0
- package/src/components/sidebar-edit-mode/page-panels/page-summary.js +35 -0
- package/src/components/sidebar-edit-mode/page-panels/publish-date.js +94 -0
- package/src/components/sidebar-edit-mode/page-panels/style.scss +41 -0
- package/src/components/sidebar-edit-mode/settings-header/index.js +61 -29
- package/src/components/sidebar-edit-mode/sidebar-card/index.js +34 -0
- package/src/components/sidebar-edit-mode/sidebar-card/style.scss +34 -0
- package/src/components/sidebar-edit-mode/sidebar-fixed-bottom.js +1 -1
- package/src/components/sidebar-edit-mode/template-panel/index.js +65 -0
- package/src/components/sidebar-edit-mode/{template-card → template-panel}/style.scss +2 -32
- package/src/components/sidebar-navigation-item/index.js +6 -2
- package/src/components/sidebar-navigation-item/style.scss +7 -0
- package/src/components/sidebar-navigation-screen/index.js +89 -53
- package/src/components/sidebar-navigation-screen/style.scss +66 -5
- package/src/components/sidebar-navigation-screen-details-footer/index.js +45 -0
- package/src/components/sidebar-navigation-screen-details-footer/style.scss +5 -0
- package/src/components/sidebar-navigation-screen-details-panel/index.js +40 -0
- package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +14 -0
- package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +29 -0
- package/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +14 -0
- package/src/components/sidebar-navigation-screen-details-panel/style.scss +25 -0
- package/src/components/sidebar-navigation-screen-global-styles/index.js +126 -14
- package/src/components/sidebar-navigation-screen-global-styles/style.scss +12 -0
- package/src/components/sidebar-navigation-screen-library/category-item.js +43 -0
- package/src/components/sidebar-navigation-screen-library/index.js +136 -0
- package/src/components/sidebar-navigation-screen-library/style.scss +7 -0
- package/src/components/sidebar-navigation-screen-library/use-default-pattern-categories.js +32 -0
- package/src/components/sidebar-navigation-screen-library/use-pattern-categories.js +64 -0
- package/src/components/sidebar-navigation-screen-library/use-template-part-areas.js +33 -0
- package/src/components/sidebar-navigation-screen-library/use-theme-patterns.js +44 -0
- package/src/components/sidebar-navigation-screen-main/index.js +11 -14
- package/src/components/sidebar-navigation-screen-navigation-item/index.js +1 -1
- package/src/components/sidebar-navigation-screen-navigation-menu/delete-modal.js +45 -0
- package/src/components/sidebar-navigation-screen-navigation-menu/edit-button.js +24 -0
- package/src/components/sidebar-navigation-screen-navigation-menu/index.js +50 -96
- package/src/components/sidebar-navigation-screen-navigation-menu/more-menu.js +89 -0
- package/src/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +51 -0
- package/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +51 -0
- package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +39 -0
- package/src/components/sidebar-navigation-screen-navigation-menu/style.scss +15 -0
- package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +175 -0
- package/src/components/sidebar-navigation-screen-navigation-menus/constants.js +3 -1
- package/src/components/sidebar-navigation-screen-navigation-menus/index.js +43 -7
- package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +61 -2
- package/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +25 -47
- package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +5 -1
- package/src/components/sidebar-navigation-screen-page/index.js +98 -24
- package/src/components/sidebar-navigation-screen-page/page-details.js +166 -0
- package/src/components/sidebar-navigation-screen-page/status-label.js +105 -0
- package/src/components/sidebar-navigation-screen-page/style.scss +63 -0
- package/src/components/sidebar-navigation-screen-pages/index.js +181 -44
- package/src/components/sidebar-navigation-screen-pattern/index.js +44 -0
- package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +28 -0
- package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +21 -0
- package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +30 -0
- package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +33 -0
- package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +71 -0
- package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +86 -0
- package/src/components/sidebar-navigation-screen-template/home-template-details.js +230 -0
- package/src/components/sidebar-navigation-screen-template/index.js +44 -27
- package/src/components/sidebar-navigation-screen-template/style.scss +23 -0
- package/src/components/sidebar-navigation-screen-templates/index.js +19 -26
- package/src/components/site-hub/index.js +26 -7
- package/src/components/site-hub/style.scss +26 -0
- package/src/components/style-book/index.js +1 -1
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +16 -3
- package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +1 -1
- package/src/components/sync-state-with-url/use-sync-path-with-url.js +11 -1
- package/src/components/table/index.js +33 -0
- package/src/components/table/style.scss +37 -0
- package/src/components/{list/actions → template-actions}/index.js +19 -6
- package/src/components/template-part-converter/convert-to-template-part.js +4 -27
- package/src/components/welcome-guide/editor.js +1 -1
- package/src/components/welcome-guide/styles.js +5 -3
- package/src/hooks/commands/use-common-commands.js +167 -0
- package/src/hooks/commands/use-edit-mode-commands.js +61 -25
- package/src/hooks/index.js +1 -0
- package/src/hooks/navigation-menu-edit.js +95 -0
- package/src/hooks/push-changes-to-global-styles/index.js +14 -8
- package/src/hooks/template-part-edit.js +1 -1
- package/src/store/actions.js +52 -1
- package/src/store/index.js +1 -1
- package/src/store/reducer.js +21 -0
- package/src/store/selectors.js +54 -5
- package/src/store/test/actions.js +31 -0
- package/src/store/test/reducer.js +44 -0
- package/src/store/test/selectors.js +57 -0
- package/src/style.scss +17 -4
- package/src/utils/get-is-list-page.js +16 -4
- package/src/utils/is-previewing-theme.js +2 -3
- package/src/utils/use-activate-theme.js +3 -2
- package/src/utils/use-debounced-input.js +17 -0
- package/build/components/add-new-template/new-template-part.js +0 -116
- package/build/components/add-new-template/new-template-part.js.map +0 -1
- package/build/components/list/actions/index.js.map +0 -1
- package/build/components/list/actions/rename-menu-item.js.map +0 -1
- package/build/components/sidebar-edit-mode/template-card/index.js.map +0 -1
- package/build/components/sidebar-edit-mode/template-card/template-actions.js.map +0 -1
- package/build/components/sidebar-edit-mode/template-card/template-areas.js.map +0 -1
- package/build/components/sidebar-edit-mode/template-revisions/index.js.map +0 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/navigator-button.js +0 -53
- package/build/components/sidebar-navigation-screen-navigation-menus/navigator-button.js.map +0 -1
- package/build/components/sidebar-navigation-subtitle/index.js +0 -18
- package/build/components/sidebar-navigation-subtitle/index.js.map +0 -1
- package/build/private-apis.js.map +0 -1
- package/build-module/components/add-new-template/new-template-part.js +0 -96
- package/build-module/components/add-new-template/new-template-part.js.map +0 -1
- package/build-module/components/list/actions/index.js.map +0 -1
- package/build-module/components/list/actions/rename-menu-item.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/template-card/index.js +0 -68
- package/build-module/components/sidebar-edit-mode/template-card/index.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/template-card/template-actions.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/template-card/template-areas.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigator-button.js +0 -40
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigator-button.js.map +0 -1
- package/build-module/components/sidebar-navigation-subtitle/index.js +0 -10
- package/build-module/components/sidebar-navigation-subtitle/index.js.map +0 -1
- package/build-module/private-apis.js.map +0 -1
- package/src/components/add-new-template/new-template-part.js +0 -109
- package/src/components/sidebar-edit-mode/template-card/index.js +0 -59
- package/src/components/sidebar-navigation-screen-navigation-menus/navigator-button.js +0 -47
- package/src/components/sidebar-navigation-screen-pages/style.scss +0 -4
- package/src/components/sidebar-navigation-screen-templates/style.scss +0 -4
- package/src/components/sidebar-navigation-subtitle/index.js +0 -5
- package/src/components/sidebar-navigation-subtitle/style.scss +0 -7
- /package/src/components/sidebar-edit-mode/{template-revisions/index.js → template-panel/last-revision.js} +0 -0
- /package/src/components/sidebar-edit-mode/{template-card → template-panel}/template-actions.js +0 -0
- /package/src/components/sidebar-edit-mode/{template-card → template-panel}/template-areas.js +0 -0
- /package/src/components/{list/actions → template-actions}/rename-menu-item.js +0 -0
- /package/src/{private-apis.js → lock-unlock.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createElement } from "@wordpress/element";
|
|
1
|
+
import { createElement, Fragment } from "@wordpress/element";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* WordPress dependencies
|
|
5
5
|
*/
|
|
6
|
-
import { __experimentalHStack as HStack,
|
|
6
|
+
import { __experimentalHStack as HStack, __experimentalHeading as Heading, __experimentalNavigatorToParentButton as NavigatorToParentButton, __experimentalUseNavigator as useNavigator, __experimentalVStack as VStack } from '@wordpress/components';
|
|
7
7
|
import { isRTL, __, sprintf } from '@wordpress/i18n';
|
|
8
8
|
import { chevronRight, chevronLeft } from '@wordpress/icons';
|
|
9
9
|
import { store as coreStore } from '@wordpress/core-data';
|
|
@@ -13,19 +13,19 @@ import { useSelect } from '@wordpress/data';
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { store as editSiteStore } from '../../store';
|
|
16
|
-
import { unlock } from '../../
|
|
16
|
+
import { unlock } from '../../lock-unlock';
|
|
17
17
|
import SidebarButton from '../sidebar-button';
|
|
18
18
|
import { isPreviewingTheme, currentlyPreviewingTheme } from '../../utils/is-previewing-theme';
|
|
19
|
-
export default function SidebarNavigationScreen(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
export default function SidebarNavigationScreen({
|
|
20
|
+
isRoot,
|
|
21
|
+
title,
|
|
22
|
+
actions,
|
|
23
|
+
meta,
|
|
24
|
+
content,
|
|
25
|
+
footer,
|
|
26
|
+
description,
|
|
27
|
+
backPath
|
|
28
|
+
}) {
|
|
29
29
|
const {
|
|
30
30
|
dashboardLink
|
|
31
31
|
} = useSelect(select => {
|
|
@@ -39,30 +39,48 @@ export default function SidebarNavigationScreen(_ref) {
|
|
|
39
39
|
const {
|
|
40
40
|
getTheme
|
|
41
41
|
} = useSelect(coreStore);
|
|
42
|
+
const {
|
|
43
|
+
goTo
|
|
44
|
+
} = useNavigator();
|
|
42
45
|
const theme = getTheme(currentlyPreviewingTheme());
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
const icon = isRTL() ? chevronRight : chevronLeft;
|
|
47
|
+
return createElement(Fragment, null, createElement(VStack, {
|
|
48
|
+
className: "edit-site-sidebar-navigation-screen__main",
|
|
49
|
+
spacing: 0,
|
|
50
|
+
justify: "flex-start"
|
|
45
51
|
}, createElement(HStack, {
|
|
46
52
|
spacing: 4,
|
|
47
53
|
alignment: "flex-start",
|
|
48
54
|
className: "edit-site-sidebar-navigation-screen__title-icon"
|
|
49
|
-
}, !isRoot
|
|
55
|
+
}, !isRoot && !backPath && createElement(NavigatorToParentButton, {
|
|
50
56
|
as: SidebarButton,
|
|
51
57
|
icon: isRTL() ? chevronRight : chevronLeft,
|
|
58
|
+
"aria-label": __('Back')
|
|
59
|
+
}), !isRoot && backPath && createElement(SidebarButton, {
|
|
60
|
+
onClick: () => goTo(backPath, {
|
|
61
|
+
isBack: true
|
|
62
|
+
}),
|
|
63
|
+
icon: icon,
|
|
52
64
|
label: __('Back')
|
|
53
|
-
})
|
|
54
|
-
icon:
|
|
65
|
+
}), isRoot && createElement(SidebarButton, {
|
|
66
|
+
icon: icon,
|
|
55
67
|
label: !isPreviewingTheme() ? __('Go back to the Dashboard') : __('Go back to the theme showcase'),
|
|
56
68
|
href: !isPreviewingTheme() ? dashboardLink || 'index.php' : 'themes.php'
|
|
57
69
|
}), createElement(Heading, {
|
|
58
70
|
className: "edit-site-sidebar-navigation-screen__title",
|
|
59
71
|
color: 'white',
|
|
60
|
-
level:
|
|
72
|
+
level: 1,
|
|
61
73
|
size: 20
|
|
62
|
-
}, !isPreviewingTheme() ? title : sprintf('Previewing %1$s: %2$s', theme
|
|
74
|
+
}, !isPreviewingTheme() ? title : sprintf('Previewing %1$s: %2$s', theme?.name?.rendered, title)), actions && createElement("div", {
|
|
75
|
+
className: "edit-site-sidebar-navigation-screen__actions"
|
|
76
|
+
}, actions)), meta && createElement(Fragment, null, createElement("div", {
|
|
77
|
+
className: "edit-site-sidebar-navigation-screen__meta"
|
|
78
|
+
}, meta)), createElement("div", {
|
|
63
79
|
className: "edit-site-sidebar-navigation-screen__content"
|
|
64
80
|
}, description && createElement("p", {
|
|
65
81
|
className: "edit-site-sidebar-navigation-screen__description"
|
|
66
|
-
}, description), content))
|
|
82
|
+
}, description), content)), footer && createElement("footer", {
|
|
83
|
+
className: "edit-site-sidebar-navigation-screen__footer"
|
|
84
|
+
}, footer));
|
|
67
85
|
}
|
|
68
86
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen/index.js"],"names":["__experimentalHStack","HStack","
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen/index.js"],"names":["__experimentalHStack","HStack","__experimentalHeading","Heading","__experimentalNavigatorToParentButton","NavigatorToParentButton","__experimentalUseNavigator","useNavigator","__experimentalVStack","VStack","isRTL","__","sprintf","chevronRight","chevronLeft","store","coreStore","useSelect","editSiteStore","unlock","SidebarButton","isPreviewingTheme","currentlyPreviewingTheme","SidebarNavigationScreen","isRoot","title","actions","meta","content","footer","description","backPath","dashboardLink","select","getSettings","__experimentalDashboardLink","getTheme","goTo","theme","icon","isBack","name","rendered"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,oBAAoB,IAAIC,MADzB,EAECC,qBAAqB,IAAIC,OAF1B,EAGCC,qCAAqC,IAAIC,uBAH1C,EAICC,0BAA0B,IAAIC,YAJ/B,EAKCC,oBAAoB,IAAIC,MALzB,QAMO,uBANP;AAOA,SAASC,KAAT,EAAgBC,EAAhB,EAAoBC,OAApB,QAAmC,iBAAnC;AACA,SAASC,YAAT,EAAuBC,WAAvB,QAA0C,kBAA1C;AACA,SAASC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A,MADH,CA9EF,CADD;AAqFA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalHeading as Heading,\n\t__experimentalNavigatorToParentButton as NavigatorToParentButton,\n\t__experimentalUseNavigator as useNavigator,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { isRTL, __, sprintf } from '@wordpress/i18n';\nimport { chevronRight, chevronLeft } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport SidebarButton from '../sidebar-button';\nimport {\n\tisPreviewingTheme,\n\tcurrentlyPreviewingTheme,\n} from '../../utils/is-previewing-theme';\n\nexport default function SidebarNavigationScreen( {\n\tisRoot,\n\ttitle,\n\tactions,\n\tmeta,\n\tcontent,\n\tfooter,\n\tdescription,\n\tbackPath,\n} ) {\n\tconst { dashboardLink } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\treturn {\n\t\t\tdashboardLink: getSettings().__experimentalDashboardLink,\n\t\t};\n\t}, [] );\n\tconst { getTheme } = useSelect( coreStore );\n\tconst { goTo } = useNavigator();\n\tconst theme = getTheme( currentlyPreviewingTheme() );\n\tconst icon = isRTL() ? chevronRight : chevronLeft;\n\n\treturn (\n\t\t<>\n\t\t\t<VStack\n\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__main\"\n\t\t\t\tspacing={ 0 }\n\t\t\t\tjustify=\"flex-start\"\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tspacing={ 4 }\n\t\t\t\t\talignment=\"flex-start\"\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__title-icon\"\n\t\t\t\t>\n\t\t\t\t\t{ ! isRoot && ! backPath && (\n\t\t\t\t\t\t<NavigatorToParentButton\n\t\t\t\t\t\t\tas={ SidebarButton }\n\t\t\t\t\t\t\ticon={ isRTL() ? chevronRight : chevronLeft }\n\t\t\t\t\t\t\taria-label={ __( 'Back' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! isRoot && backPath && (\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\tonClick={ () => goTo( backPath, { isBack: true } ) }\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isRoot && (\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t! isPreviewingTheme()\n\t\t\t\t\t\t\t\t\t? __( 'Go back to the Dashboard' )\n\t\t\t\t\t\t\t\t\t: __( 'Go back to the theme showcase' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t! isPreviewingTheme()\n\t\t\t\t\t\t\t\t\t? dashboardLink || 'index.php'\n\t\t\t\t\t\t\t\t\t: 'themes.php'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<Heading\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__title\"\n\t\t\t\t\t\tcolor={ 'white' }\n\t\t\t\t\t\tlevel={ 1 }\n\t\t\t\t\t\tsize={ 20 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! isPreviewingTheme()\n\t\t\t\t\t\t\t? title\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t'Previewing %1$s: %2$s',\n\t\t\t\t\t\t\t\t\ttheme?.name?.rendered,\n\t\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\t ) }\n\t\t\t\t\t</Heading>\n\t\t\t\t\t{ actions && (\n\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__actions\">\n\t\t\t\t\t\t\t{ actions }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t\t{ meta && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__meta\">\n\t\t\t\t\t\t\t{ meta }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\n\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__content\">\n\t\t\t\t\t{ description && (\n\t\t\t\t\t\t<p className=\"edit-site-sidebar-navigation-screen__description\">\n\t\t\t\t\t\t\t{ description }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) }\n\t\t\t\t\t{ content }\n\t\t\t\t</div>\n\t\t\t</VStack>\n\t\t\t{ footer && (\n\t\t\t\t<footer className=\"edit-site-sidebar-navigation-screen__footer\">\n\t\t\t\t\t{ footer }\n\t\t\t\t</footer>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createElement, Fragment } from "@wordpress/element";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* WordPress dependencies
|
|
5
|
+
*/
|
|
6
|
+
import { __, sprintf } from '@wordpress/i18n';
|
|
7
|
+
import { humanTimeDiff } from '@wordpress/date';
|
|
8
|
+
import { createInterpolateElement } from '@wordpress/element';
|
|
9
|
+
/**
|
|
10
|
+
* Internal dependencies
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { SidebarNavigationScreenDetailsPanelRow, SidebarNavigationScreenDetailsPanelLabel, SidebarNavigationScreenDetailsPanelValue } from '../sidebar-navigation-screen-details-panel';
|
|
14
|
+
export default function SidebarNavigationScreenDetailsFooter({
|
|
15
|
+
lastModifiedDateTime
|
|
16
|
+
}) {
|
|
17
|
+
return createElement(Fragment, null, lastModifiedDateTime && createElement(SidebarNavigationScreenDetailsPanelRow, {
|
|
18
|
+
className: "edit-site-sidebar-navigation-screen-details-footer"
|
|
19
|
+
}, createElement(SidebarNavigationScreenDetailsPanelLabel, null, __('Last modified')), createElement(SidebarNavigationScreenDetailsPanelValue, null, createInterpolateElement(sprintf(
|
|
20
|
+
/* translators: %s: is the relative time when the post was last modified. */
|
|
21
|
+
__('<time>%s</time>'), humanTimeDiff(lastModifiedDateTime)), {
|
|
22
|
+
time: createElement("time", {
|
|
23
|
+
dateTime: lastModifiedDateTime
|
|
24
|
+
})
|
|
25
|
+
}))));
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-footer/index.js"],"names":["__","sprintf","humanTimeDiff","createInterpolateElement","SidebarNavigationScreenDetailsPanelRow","SidebarNavigationScreenDetailsPanelLabel","SidebarNavigationScreenDetailsPanelValue","SidebarNavigationScreenDetailsFooter","lastModifiedDateTime","time"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,EAAaC,OAAb,QAA4B,iBAA5B;AACA,SAASC,aAAT,QAA8B,iBAA9B;AACA,SAASC,wBAAT,QAAyC,oBAAzC;AAEA;AACA;AACA;;AACA,SACCC,sCADD,EAECC,wCAFD,EAGCC,wCAHD,QAIO,4CAJP;AAMA,eAAe,SAASC,oCAAT,CAA+C;AAC7DC,EAAAA;AAD6D,CAA/C,EAEX;AACH,SACC,8BACGA,oBAAoB,IACrB,cAAC,sCAAD;AAAwC,IAAA,SAAS,EAAC;AAAlD,KACC,cAAC,wCAAD,QACGR,EAAE,CAAE,eAAF,CADL,CADD,EAIC,cAAC,wCAAD,QACGG,wBAAwB,CACzBF,OAAO;AACN;AACAD,EAAAA,EAAE,CAAE,iBAAF,CAFI,EAGNE,aAAa,CAAEM,oBAAF,CAHP,CADkB,EAMzB;AACCC,IAAAA,IAAI,EACH;AAAM,MAAA,QAAQ,EAAGD;AAAjB;AAFF,GANyB,CAD3B,CAJD,CAFF,CADD;AAyBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { humanTimeDiff } from '@wordpress/date';\nimport { createInterpolateElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tSidebarNavigationScreenDetailsPanelRow,\n\tSidebarNavigationScreenDetailsPanelLabel,\n\tSidebarNavigationScreenDetailsPanelValue,\n} from '../sidebar-navigation-screen-details-panel';\n\nexport default function SidebarNavigationScreenDetailsFooter( {\n\tlastModifiedDateTime,\n} ) {\n\treturn (\n\t\t<>\n\t\t\t{ lastModifiedDateTime && (\n\t\t\t\t<SidebarNavigationScreenDetailsPanelRow className=\"edit-site-sidebar-navigation-screen-details-footer\">\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t\t{ __( 'Last modified' ) }\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: is the relative time when the post was last modified. */\n\t\t\t\t\t\t\t\t__( '<time>%s</time>' ),\n\t\t\t\t\t\t\t\thumanTimeDiff( lastModifiedDateTime )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttime: (\n\t\t\t\t\t\t\t\t\t<time dateTime={ lastModifiedDateTime } />\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { createElement } from "@wordpress/element";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* WordPress dependencies
|
|
5
|
+
*/
|
|
6
|
+
import { __experimentalVStack as VStack, __experimentalHeading as Heading } from '@wordpress/components';
|
|
7
|
+
/**
|
|
8
|
+
* Internal dependencies
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import SidebarNavigationScreenDetailsPanelLabel from './sidebar-navigation-screen-details-panel-label';
|
|
12
|
+
import SidebarNavigationScreenDetailsPanelRow from './sidebar-navigation-screen-details-panel-row';
|
|
13
|
+
import SidebarNavigationScreenDetailsPanelValue from './sidebar-navigation-screen-details-panel-value';
|
|
14
|
+
|
|
15
|
+
function SidebarNavigationScreenDetailsPanel({
|
|
16
|
+
title,
|
|
17
|
+
children,
|
|
18
|
+
spacing
|
|
19
|
+
}) {
|
|
20
|
+
return createElement(VStack, {
|
|
21
|
+
className: "edit-site-sidebar-navigation-details-screen-panel",
|
|
22
|
+
spacing: spacing
|
|
23
|
+
}, title && createElement(Heading, {
|
|
24
|
+
className: "edit-site-sidebar-navigation-details-screen-panel__heading",
|
|
25
|
+
level: 2
|
|
26
|
+
}, title), children);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { SidebarNavigationScreenDetailsPanel, SidebarNavigationScreenDetailsPanelRow, SidebarNavigationScreenDetailsPanelLabel, SidebarNavigationScreenDetailsPanelValue };
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/index.js"],"names":["__experimentalVStack","VStack","__experimentalHeading","Heading","SidebarNavigationScreenDetailsPanelLabel","SidebarNavigationScreenDetailsPanelRow","SidebarNavigationScreenDetailsPanelValue","SidebarNavigationScreenDetailsPanel","title","children","spacing"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,oBAAoB,IAAIC,MADzB,EAECC,qBAAqB,IAAIC,OAF1B,QAGO,uBAHP;AAKA;AACA;AACA;;AACA,OAAOC,wCAAP,MAAqD,iDAArD;AACA,OAAOC,sCAAP,MAAmD,+CAAnD;AACA,OAAOC,wCAAP,MAAqD,iDAArD;;AAEA,SAASC,mCAAT,CAA8C;AAAEC,EAAAA,KAAF;AAASC,EAAAA,QAAT;AAAmBC,EAAAA;AAAnB,CAA9C,EAA6E;AAC5E,SACC,cAAC,MAAD;AACC,IAAA,SAAS,EAAC,mDADX;AAEC,IAAA,OAAO,EAAGA;AAFX,KAIGF,KAAK,IACN,cAAC,OAAD;AACC,IAAA,SAAS,EAAC,4DADX;AAEC,IAAA,KAAK,EAAG;AAFT,KAIGA,KAJH,CALF,EAYGC,QAZH,CADD;AAgBA;;AAED,SACCF,mCADD,EAECF,sCAFD,EAGCD,wCAHD,EAICE,wCAJD","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalHeading as Heading,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreenDetailsPanelLabel from './sidebar-navigation-screen-details-panel-label';\nimport SidebarNavigationScreenDetailsPanelRow from './sidebar-navigation-screen-details-panel-row';\nimport SidebarNavigationScreenDetailsPanelValue from './sidebar-navigation-screen-details-panel-value';\n\nfunction SidebarNavigationScreenDetailsPanel( { title, children, spacing } ) {\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"edit-site-sidebar-navigation-details-screen-panel\"\n\t\t\tspacing={ spacing }\n\t\t>\n\t\t\t{ title && (\n\t\t\t\t<Heading\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-details-screen-panel__heading\"\n\t\t\t\t\tlevel={ 2 }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</Heading>\n\t\t\t) }\n\t\t\t{ children }\n\t\t</VStack>\n\t);\n}\n\nexport {\n\tSidebarNavigationScreenDetailsPanel,\n\tSidebarNavigationScreenDetailsPanelRow,\n\tSidebarNavigationScreenDetailsPanelLabel,\n\tSidebarNavigationScreenDetailsPanelValue,\n};\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement } from "@wordpress/element";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* WordPress dependencies
|
|
5
|
+
*/
|
|
6
|
+
import { __experimentalText as Text } from '@wordpress/components';
|
|
7
|
+
export default function SidebarNavigationScreenDetailsPanelLabel({
|
|
8
|
+
children
|
|
9
|
+
}) {
|
|
10
|
+
return createElement(Text, {
|
|
11
|
+
className: "edit-site-sidebar-navigation-details-screen-panel__label"
|
|
12
|
+
}, children);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=sidebar-navigation-screen-details-panel-label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js"],"names":["__experimentalText","Text","SidebarNavigationScreenDetailsPanelLabel","children"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,kBAAkB,IAAIC,IAA/B,QAA2C,uBAA3C;AAEA,eAAe,SAASC,wCAAT,CAAmD;AACjEC,EAAAA;AADiE,CAAnD,EAEX;AACH,SACC,cAAC,IAAD;AAAM,IAAA,SAAS,EAAC;AAAhB,KACGA,QADH,CADD;AAKA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelLabel( {\n\tchildren,\n} ) {\n\treturn (\n\t\t<Text className=\"edit-site-sidebar-navigation-details-screen-panel__label\">\n\t\t\t{ children }\n\t\t</Text>\n\t);\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createElement } from "@wordpress/element";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* External dependencies
|
|
5
|
+
*/
|
|
6
|
+
import classnames from 'classnames';
|
|
7
|
+
/**
|
|
8
|
+
* WordPress dependencies
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { __experimentalHStack as HStack } from '@wordpress/components';
|
|
12
|
+
export default function SidebarNavigationScreenDetailsPanelRow({
|
|
13
|
+
label,
|
|
14
|
+
children,
|
|
15
|
+
className
|
|
16
|
+
}) {
|
|
17
|
+
return createElement(HStack, {
|
|
18
|
+
key: label,
|
|
19
|
+
spacing: 5,
|
|
20
|
+
alignment: "left",
|
|
21
|
+
className: classnames('edit-site-sidebar-navigation-details-screen-panel__row', className)
|
|
22
|
+
}, children);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=sidebar-navigation-screen-details-panel-row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js"],"names":["classnames","__experimentalHStack","HStack","SidebarNavigationScreenDetailsPanelRow","label","children","className"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,oBAAoB,IAAIC,MAAjC,QAA+C,uBAA/C;AAEA,eAAe,SAASC,sCAAT,CAAiD;AAC/DC,EAAAA,KAD+D;AAE/DC,EAAAA,QAF+D;AAG/DC,EAAAA;AAH+D,CAAjD,EAIX;AACH,SACC,cAAC,MAAD;AACC,IAAA,GAAG,EAAGF,KADP;AAEC,IAAA,OAAO,EAAG,CAFX;AAGC,IAAA,SAAS,EAAC,MAHX;AAIC,IAAA,SAAS,EAAGJ,UAAU,CACrB,wDADqB,EAErBM,SAFqB;AAJvB,KASGD,QATH,CADD;AAaA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelRow( {\n\tlabel,\n\tchildren,\n\tclassName,\n} ) {\n\treturn (\n\t\t<HStack\n\t\t\tkey={ label }\n\t\t\tspacing={ 5 }\n\t\t\talignment=\"left\"\n\t\t\tclassName={ classnames(\n\t\t\t\t'edit-site-sidebar-navigation-details-screen-panel__row',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t{ children }\n\t\t</HStack>\n\t);\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement } from "@wordpress/element";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* WordPress dependencies
|
|
5
|
+
*/
|
|
6
|
+
import { __experimentalText as Text } from '@wordpress/components';
|
|
7
|
+
export default function SidebarNavigationScreenDetailsPanelValue({
|
|
8
|
+
children
|
|
9
|
+
}) {
|
|
10
|
+
return createElement(Text, {
|
|
11
|
+
className: "edit-site-sidebar-navigation-details-screen-panel__value"
|
|
12
|
+
}, children);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=sidebar-navigation-screen-details-panel-value.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js"],"names":["__experimentalText","Text","SidebarNavigationScreenDetailsPanelValue","children"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,kBAAkB,IAAIC,IAA/B,QAA2C,uBAA3C;AAEA,eAAe,SAASC,wCAAT,CAAmD;AACjEC,EAAAA;AADiE,CAAnD,EAEX;AACH,SACC,cAAC,IAAD;AAAM,IAAA,SAAS,EAAC;AAAhB,KACGA,QADH,CADD;AAKA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelValue( {\n\tchildren,\n} ) {\n\treturn (\n\t\t<Text className=\"edit-site-sidebar-navigation-details-screen-panel__value\">\n\t\t\t{ children }\n\t\t</Text>\n\t);\n}\n"]}
|
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import { createElement, Fragment } from "@wordpress/element";
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* WordPress dependencies
|
|
6
5
|
*/
|
|
7
6
|
import { __ } from '@wordpress/i18n';
|
|
8
|
-
import { edit, seen } from '@wordpress/icons';
|
|
7
|
+
import { backup, edit, seen } from '@wordpress/icons';
|
|
9
8
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
10
9
|
import { store as coreStore } from '@wordpress/core-data';
|
|
11
|
-
import { __experimentalNavigatorButton as NavigatorButton } from '@wordpress/components';
|
|
10
|
+
import { Icon, __experimentalNavigatorButton as NavigatorButton, __experimentalVStack as HStack, __experimentalVStack as VStack } from '@wordpress/components';
|
|
12
11
|
import { useViewportMatch } from '@wordpress/compose';
|
|
12
|
+
import { BlockEditorProvider } from '@wordpress/block-editor';
|
|
13
|
+
import { humanTimeDiff } from '@wordpress/date';
|
|
14
|
+
import { useCallback } from '@wordpress/element';
|
|
13
15
|
/**
|
|
14
16
|
* Internal dependencies
|
|
15
17
|
*/
|
|
16
18
|
|
|
17
19
|
import SidebarNavigationScreen from '../sidebar-navigation-screen';
|
|
18
20
|
import StyleVariationsContainer from '../global-styles/style-variations-container';
|
|
19
|
-
import { unlock } from '../../
|
|
21
|
+
import { unlock } from '../../lock-unlock';
|
|
20
22
|
import { store as editSiteStore } from '../../store';
|
|
21
23
|
import SidebarButton from '../sidebar-button';
|
|
22
24
|
import SidebarNavigationItem from '../sidebar-navigation-item';
|
|
23
25
|
import StyleBook from '../style-book';
|
|
26
|
+
import useGlobalStylesRevisions from '../global-styles/screen-revisions/use-global-styles-revisions';
|
|
27
|
+
|
|
28
|
+
const noop = () => {};
|
|
29
|
+
|
|
24
30
|
export function SidebarNavigationItemGlobalStyles(props) {
|
|
25
31
|
const {
|
|
26
32
|
openGeneralSidebar
|
|
@@ -28,31 +34,107 @@ export function SidebarNavigationItemGlobalStyles(props) {
|
|
|
28
34
|
const {
|
|
29
35
|
setCanvasMode
|
|
30
36
|
} = unlock(useDispatch(editSiteStore));
|
|
31
|
-
const hasGlobalStyleVariations = useSelect(select =>
|
|
32
|
-
var _select$__experimenta;
|
|
33
|
-
|
|
34
|
-
return !!((_select$__experimenta = select(coreStore).__experimentalGetCurrentThemeGlobalStylesVariations()) !== null && _select$__experimenta !== void 0 && _select$__experimenta.length);
|
|
35
|
-
}, []);
|
|
37
|
+
const hasGlobalStyleVariations = useSelect(select => !!select(coreStore).__experimentalGetCurrentThemeGlobalStylesVariations()?.length, []);
|
|
36
38
|
|
|
37
39
|
if (hasGlobalStyleVariations) {
|
|
38
|
-
return createElement(NavigatorButton,
|
|
40
|
+
return createElement(NavigatorButton, { ...props,
|
|
39
41
|
as: SidebarNavigationItem,
|
|
40
42
|
path: "/wp_global_styles"
|
|
41
|
-
})
|
|
43
|
+
});
|
|
42
44
|
}
|
|
43
45
|
|
|
44
|
-
return createElement(SidebarNavigationItem,
|
|
46
|
+
return createElement(SidebarNavigationItem, { ...props,
|
|
45
47
|
onClick: () => {
|
|
46
48
|
// switch to edit mode.
|
|
47
49
|
setCanvasMode('edit'); // open global styles sidebar.
|
|
48
50
|
|
|
49
51
|
openGeneralSidebar('edit-site/global-styles');
|
|
50
52
|
}
|
|
51
|
-
})
|
|
53
|
+
});
|
|
52
54
|
}
|
|
55
|
+
|
|
56
|
+
function SidebarNavigationScreenGlobalStylesContent() {
|
|
57
|
+
const {
|
|
58
|
+
storedSettings
|
|
59
|
+
} = useSelect(select => {
|
|
60
|
+
const {
|
|
61
|
+
getSettings
|
|
62
|
+
} = unlock(select(editSiteStore));
|
|
63
|
+
return {
|
|
64
|
+
storedSettings: getSettings(false)
|
|
65
|
+
};
|
|
66
|
+
}, []); // Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are
|
|
67
|
+
// loaded. This is necessary because the Iframe component waits until
|
|
68
|
+
// the block editor store's `__internalIsInitialized` is true before
|
|
69
|
+
// rendering the iframe. Without this, the iframe previews will not render
|
|
70
|
+
// in mobile viewport sizes, where the editor canvas is hidden.
|
|
71
|
+
|
|
72
|
+
return createElement(BlockEditorProvider, {
|
|
73
|
+
settings: storedSettings,
|
|
74
|
+
onChange: noop,
|
|
75
|
+
onInput: noop
|
|
76
|
+
}, createElement(StyleVariationsContainer, null));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function SidebarNavigationScreenGlobalStylesFooter({
|
|
80
|
+
onClickRevisions
|
|
81
|
+
}) {
|
|
82
|
+
const {
|
|
83
|
+
revisions,
|
|
84
|
+
isLoading
|
|
85
|
+
} = useGlobalStylesRevisions();
|
|
86
|
+
const {
|
|
87
|
+
revisionsCount
|
|
88
|
+
} = useSelect(select => {
|
|
89
|
+
var _globalStyles$_links$;
|
|
90
|
+
|
|
91
|
+
const {
|
|
92
|
+
getEntityRecord,
|
|
93
|
+
__experimentalGetCurrentGlobalStylesId
|
|
94
|
+
} = select(coreStore);
|
|
95
|
+
|
|
96
|
+
const globalStylesId = __experimentalGetCurrentGlobalStylesId();
|
|
97
|
+
|
|
98
|
+
const globalStyles = globalStylesId ? getEntityRecord('root', 'globalStyles', globalStylesId) : undefined;
|
|
99
|
+
return {
|
|
100
|
+
revisionsCount: (_globalStyles$_links$ = globalStyles?._links?.['version-history']?.[0]?.count) !== null && _globalStyles$_links$ !== void 0 ? _globalStyles$_links$ : 0
|
|
101
|
+
};
|
|
102
|
+
}, []);
|
|
103
|
+
const hasRevisions = revisionsCount >= 2;
|
|
104
|
+
const modified = revisions?.[0]?.modified;
|
|
105
|
+
|
|
106
|
+
if (!hasRevisions || isLoading || !modified) {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return createElement(VStack, {
|
|
111
|
+
className: "edit-site-sidebar-navigation-screen-global-styles__footer"
|
|
112
|
+
}, createElement(SidebarNavigationItem, {
|
|
113
|
+
className: "edit-site-sidebar-navigation-screen-global-styles__revisions",
|
|
114
|
+
label: __('Revisions'),
|
|
115
|
+
onClick: onClickRevisions
|
|
116
|
+
}, createElement(HStack, {
|
|
117
|
+
as: "span",
|
|
118
|
+
alignment: "center",
|
|
119
|
+
spacing: 5,
|
|
120
|
+
direction: "row",
|
|
121
|
+
justify: "space-between"
|
|
122
|
+
}, createElement("span", {
|
|
123
|
+
className: "edit-site-sidebar-navigation-screen-global-styles__revisions__label"
|
|
124
|
+
}, __('Last modified')), createElement("span", null, createElement("time", {
|
|
125
|
+
dateTime: modified
|
|
126
|
+
}, humanTimeDiff(modified))), createElement(Icon, {
|
|
127
|
+
icon: backup,
|
|
128
|
+
style: {
|
|
129
|
+
fill: 'currentcolor'
|
|
130
|
+
}
|
|
131
|
+
}))));
|
|
132
|
+
}
|
|
133
|
+
|
|
53
134
|
export default function SidebarNavigationScreenGlobalStyles() {
|
|
54
135
|
const {
|
|
55
|
-
openGeneralSidebar
|
|
136
|
+
openGeneralSidebar,
|
|
137
|
+
setIsListViewOpened
|
|
56
138
|
} = useDispatch(editSiteStore);
|
|
57
139
|
const isMobileViewport = useViewportMatch('medium', '<');
|
|
58
140
|
const {
|
|
@@ -60,22 +142,31 @@ export default function SidebarNavigationScreenGlobalStyles() {
|
|
|
60
142
|
setEditorCanvasContainerView
|
|
61
143
|
} = unlock(useDispatch(editSiteStore));
|
|
62
144
|
const isStyleBookOpened = useSelect(select => 'style-book' === unlock(select(editSiteStore)).getEditorCanvasContainerView(), []);
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
const openStyleBook = async () => {
|
|
145
|
+
const openGlobalStyles = useCallback(async () => Promise.all([setCanvasMode('edit'), openGeneralSidebar('edit-site/global-styles')]), [setCanvasMode, openGeneralSidebar]);
|
|
146
|
+
const openStyleBook = useCallback(async () => {
|
|
67
147
|
await openGlobalStyles(); // Open the Style Book once the canvas mode is set to edit,
|
|
68
148
|
// and the global styles sidebar is open. This ensures that
|
|
69
149
|
// the Style Book is not prematurely closed.
|
|
70
150
|
|
|
71
151
|
setEditorCanvasContainerView('style-book');
|
|
72
|
-
|
|
152
|
+
setIsListViewOpened(false);
|
|
153
|
+
}, [openGlobalStyles, setEditorCanvasContainerView, setIsListViewOpened]);
|
|
154
|
+
const openRevisions = useCallback(async () => {
|
|
155
|
+
await openGlobalStyles(); // Open the global styles revisions once the canvas mode is set to edit,
|
|
156
|
+
// and the global styles sidebar is open. The global styles UI is responsible
|
|
157
|
+
// for redirecting to the revisions screen once the editor canvas container
|
|
158
|
+
// has been set to 'global-styles-revisions'.
|
|
73
159
|
|
|
160
|
+
setEditorCanvasContainerView('global-styles-revisions');
|
|
161
|
+
}, [openGlobalStyles, setEditorCanvasContainerView]);
|
|
74
162
|
return createElement(Fragment, null, createElement(SidebarNavigationScreen, {
|
|
75
163
|
title: __('Styles'),
|
|
76
164
|
description: __('Choose a different style combination for the theme styles.'),
|
|
77
|
-
content: createElement(
|
|
78
|
-
|
|
165
|
+
content: createElement(SidebarNavigationScreenGlobalStylesContent, null),
|
|
166
|
+
footer: createElement(SidebarNavigationScreenGlobalStylesFooter, {
|
|
167
|
+
onClickRevisions: openRevisions
|
|
168
|
+
}),
|
|
169
|
+
actions: createElement(Fragment, null, !isMobileViewport && createElement(SidebarButton, {
|
|
79
170
|
icon: seen,
|
|
80
171
|
label: __('Style Book'),
|
|
81
172
|
onClick: () => setEditorCanvasContainerView(!isStyleBookOpened ? 'style-book' : undefined),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js"],"names":["__","edit","seen","useSelect","useDispatch","store","coreStore","__experimentalNavigatorButton","NavigatorButton","useViewportMatch","SidebarNavigationScreen","StyleVariationsContainer","unlock","editSiteStore","SidebarButton","SidebarNavigationItem","StyleBook","SidebarNavigationItemGlobalStyles","props","openGeneralSidebar","setCanvasMode","hasGlobalStyleVariations","select","__experimentalGetCurrentThemeGlobalStylesVariations","length","SidebarNavigationScreenGlobalStyles","isMobileViewport","setEditorCanvasContainerView","isStyleBookOpened","getEditorCanvasContainerView","openGlobalStyles","Promise","all","openStyleBook","undefined"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,IAAT,EAAeC,IAAf,QAA2B,kBAA3B;AACA,SAASC,SAAT,EAAoBC,WAApB,QAA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AvB,IACD,cAAC,SAAD;AACC,IAAA,cAAc,EAAG,KADlB;AAEC,IAAA,UAAU,EAAG,MAAM,KAFpB;AAGC,IAAA,OAAO,EAAGO,aAHX;AAIC,IAAA,QAAQ,EAAGA,aAJZ;AAKC,IAAA,eAAe,EAAG,KALnB;AAMC,IAAA,QAAQ,EAAG;AANZ,IAhCF,CADD;AA4CA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { edit, seen } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalNavigatorButton as NavigatorButton } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport StyleVariationsContainer from '../global-styles/style-variations-container';\nimport { unlock } from '../../private-apis';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport StyleBook from '../style-book';\n\nexport function SidebarNavigationItemGlobalStyles( props ) {\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\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\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\nexport default function SidebarNavigationScreenGlobalStyles() {\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { setCanvasMode, setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\n\tconst isStyleBookOpened = useSelect(\n\t\t( select ) =>\n\t\t\t'style-book' ===\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\n\tconst openGlobalStyles = async () =>\n\t\tPromise.all( [\n\t\t\tsetCanvasMode( 'edit' ),\n\t\t\topenGeneralSidebar( 'edit-site/global-styles' ),\n\t\t] );\n\n\tconst openStyleBook = 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};\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={ <StyleVariationsContainer /> }\n\t\t\t\tactions={\n\t\t\t\t\t<div>\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</div>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ isStyleBookOpened && ! isMobileViewport && (\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,"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","SidebarNavigationScreen","StyleVariationsContainer","unlock","editSiteStore","SidebarButton","SidebarNavigationItem","StyleBook","useGlobalStylesRevisions","noop","SidebarNavigationItemGlobalStyles","props","openGeneralSidebar","setCanvasMode","hasGlobalStyleVariations","select","__experimentalGetCurrentThemeGlobalStylesVariations","length","SidebarNavigationScreenGlobalStylesContent","storedSettings","getSettings","SidebarNavigationScreenGlobalStylesFooter","onClickRevisions","revisions","isLoading","revisionsCount","getEntityRecord","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","undefined","_links","count","hasRevisions","modified","fill","SidebarNavigationScreenGlobalStyles","setIsListViewOpened","isMobileViewport","setEditorCanvasContainerView","isStyleBookOpened","getEditorCanvasContainerView","openGlobalStyles","Promise","all","openStyleBook","openRevisions"],"mappings":";;AAAA;AAC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MAAA,OAAO,EAAG,MACTwD,4BAA4B,CAC3B,CAAEC,iBAAF,GACG,YADH,GAEGV,SAHwB,CAJ9B;AAUC,MAAA,SAAS,EAAGU;AAVb,MAFF,EAeC,cAAC,aAAD;AACC,MAAA,IAAI,EAAGvD,IADR;AAEC,MAAA,KAAK,EAAGF,EAAE,CAAE,aAAF,CAFX;AAGC,MAAA,OAAO,EAAG,YAAY,MAAM2D,gBAAgB;AAH7C,MAfD;AAZF,IADD,EAoCGF,iBAAiB,IAAI,CAAEF,gBAAvB,IACD,cAAC,SAAD;AACC,IAAA,cAAc,EAAG,KADlB;AAEC,IAAA,UAAU,EAAG,MAAM,KAFpB;AAGC,IAAA,OAAO,EAAGO,aAHX;AAIC,IAAA,QAAQ,EAAGA,aAJZ;AAKC,IAAA,eAAe,EAAG,KALnB;AAMC,IAAA,QAAQ,EAAG;AANZ,IArCF,CADD;AAiDA","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';\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 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\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( { onClickRevisions } ) {\n\tconst { revisions, isLoading } = useGlobalStylesRevisions();\n\tconst { revisionsCount } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\trevisionsCount:\n\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0,\n\t\t};\n\t}, [] );\n\n\tconst hasRevisions = revisionsCount >= 2;\n\tconst modified = revisions?.[ 0 ]?.modified;\n\n\tif ( ! hasRevisions || isLoading || ! modified ) {\n\t\treturn null;\n\t}\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={ modified }>\n\t\t\t\t\t\t\t{ humanTimeDiff( modified ) }\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 { openGeneralSidebar, setIsListViewOpened } =\n\t\tuseDispatch( editSiteStore );\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { setCanvasMode, setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\n\tconst isStyleBookOpened = useSelect(\n\t\t( select ) =>\n\t\t\t'style-book' ===\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\n\tconst openGlobalStyles = useCallback(\n\t\tasync () =>\n\t\t\tPromise.all( [\n\t\t\t\tsetCanvasMode( 'edit' ),\n\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' ),\n\t\t\t] ),\n\t\t[ setCanvasMode, openGeneralSidebar ]\n\t);\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\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\t<SidebarNavigationScreenGlobalStylesFooter\n\t\t\t\t\t\tonClickRevisions={ openRevisions }\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 && (\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"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { createElement } from "@wordpress/element";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Internal dependencies
|
|
5
|
+
*/
|
|
6
|
+
import SidebarNavigationItem from '../sidebar-navigation-item';
|
|
7
|
+
import { useLink } from '../routes/link';
|
|
8
|
+
export default function CategoryItem({
|
|
9
|
+
count,
|
|
10
|
+
icon,
|
|
11
|
+
id,
|
|
12
|
+
isActive,
|
|
13
|
+
label,
|
|
14
|
+
type
|
|
15
|
+
}) {
|
|
16
|
+
const linkInfo = useLink({
|
|
17
|
+
path: '/library',
|
|
18
|
+
categoryType: type,
|
|
19
|
+
categoryId: id
|
|
20
|
+
}, {
|
|
21
|
+
// Keep a record of where we came from in state so we can
|
|
22
|
+
// use the browser's back button to go back to the library.
|
|
23
|
+
// See the implementation of the back button in patterns-list.
|
|
24
|
+
backPath: '/library'
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
if (!count) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return createElement(SidebarNavigationItem, { ...linkInfo,
|
|
32
|
+
icon: icon,
|
|
33
|
+
suffix: createElement("span", null, count),
|
|
34
|
+
className: isActive ? 'is-active-category' : undefined
|
|
35
|
+
}, label);
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=category-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/sidebar-navigation-screen-library/category-item.js"],"names":["SidebarNavigationItem","useLink","CategoryItem","count","icon","id","isActive","label","type","linkInfo","path","categoryType","categoryId","backPath","undefined"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,qBAAP,MAAkC,4BAAlC;AACA,SAASC,OAAT,QAAwB,gBAAxB;AAEA,eAAe,SAASC,YAAT,CAAuB;AACrCC,EAAAA,KADqC;AAErCC,EAAAA,IAFqC;AAGrCC,EAAAA,EAHqC;AAIrCC,EAAAA,QAJqC;AAKrCC,EAAAA,KALqC;AAMrCC,EAAAA;AANqC,CAAvB,EAOX;AACH,QAAMC,QAAQ,GAAGR,OAAO,CACvB;AACCS,IAAAA,IAAI,EAAE,UADP;AAECC,IAAAA,YAAY,EAAEH,IAFf;AAGCI,IAAAA,UAAU,EAAEP;AAHb,GADuB,EAMvB;AACC;AACA;AACA;AACAQ,IAAAA,QAAQ,EAAE;AAJX,GANuB,CAAxB;;AAcA,MAAK,CAAEV,KAAP,EAAe;AACd;AACA;;AAED,SACC,cAAC,qBAAD,OACMM,QADN;AAEC,IAAA,IAAI,EAAGL,IAFR;AAGC,IAAA,MAAM,EAAG,4BAAQD,KAAR,CAHV;AAIC,IAAA,SAAS,EAAGG,QAAQ,GAAG,oBAAH,GAA0BQ;AAJ/C,KAMGP,KANH,CADD;AAUA","sourcesContent":["/**\n * Internal dependencies\n */\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { useLink } from '../routes/link';\n\nexport default function CategoryItem( {\n\tcount,\n\ticon,\n\tid,\n\tisActive,\n\tlabel,\n\ttype,\n} ) {\n\tconst linkInfo = useLink(\n\t\t{\n\t\t\tpath: '/library',\n\t\t\tcategoryType: type,\n\t\t\tcategoryId: id,\n\t\t},\n\t\t{\n\t\t\t// Keep a record of where we came from in state so we can\n\t\t\t// use the browser's back button to go back to the library.\n\t\t\t// See the implementation of the back button in patterns-list.\n\t\t\tbackPath: '/library',\n\t\t}\n\t);\n\n\tif ( ! count ) {\n\t\treturn;\n\t}\n\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\t{ ...linkInfo }\n\t\t\ticon={ icon }\n\t\t\tsuffix={ <span>{ count }</span> }\n\t\t\tclassName={ isActive ? 'is-active-category' : undefined }\n\t\t>\n\t\t\t{ label }\n\t\t</SidebarNavigationItem>\n\t);\n}\n"]}
|