@wordpress/edit-site 5.35.0 → 6.0.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 +33 -27
- package/build/components/add-new-page/index.js.map +1 -1
- package/build/components/add-new-pattern/index.js +95 -78
- package/build/components/add-new-pattern/index.js.map +1 -1
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js +35 -30
- 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 +119 -95
- package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build/components/add-new-template/index.js +87 -71
- package/build/components/add-new-template/index.js.map +1 -1
- package/build/components/add-new-template/utils.js +36 -17
- package/build/components/add-new-template/utils.js.map +1 -1
- package/build/components/app/index.js +10 -4
- package/build/components/app/index.js.map +1 -1
- package/build/components/block-editor/block-inspector-button.js +5 -4
- package/build/components/block-editor/block-inspector-button.js.map +1 -1
- package/build/components/block-editor/inserter-media-categories.js +1 -1
- package/build/components/block-editor/inserter-media-categories.js.map +1 -1
- package/build/components/block-editor/use-editor-iframe-props.js +88 -0
- package/build/components/block-editor/use-editor-iframe-props.js.map +1 -0
- package/build/components/canvas-loader/index.js +13 -12
- package/build/components/canvas-loader/index.js.map +1 -1
- package/build/components/dataviews-actions/index.js +7 -4
- package/build/components/dataviews-actions/index.js.map +1 -1
- package/build/components/editor/index.js +86 -182
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor/use-editor-title.js +39 -0
- package/build/components/editor/use-editor-title.js.map +1 -0
- package/build/components/editor-canvas-container/index.js +27 -29
- package/build/components/editor-canvas-container/index.js.map +1 -1
- package/build/components/error-boundary/index.js +2 -2
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/error-boundary/warning.js +13 -11
- package/build/components/error-boundary/warning.js.map +1 -1
- package/build/components/global-styles/background-panel.js +6 -5
- package/build/components/global-styles/background-panel.js.map +1 -1
- package/build/components/global-styles/block-preview-panel.js +19 -17
- package/build/components/global-styles/block-preview-panel.js.map +1 -1
- package/build/components/global-styles/color-indicator-wrapper.js +2 -2
- package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
- package/build/components/global-styles/color-palette-panel.js +30 -29
- package/build/components/global-styles/color-palette-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +2 -2
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/font-families.js +55 -39
- package/build/components/global-styles/font-families.js.map +1 -1
- package/build/components/global-styles/font-family-item.js +17 -13
- package/build/components/global-styles/font-family-item.js.map +1 -1
- package/build/components/global-styles/font-library-modal/collection-font-variant.js +25 -22
- package/build/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
- package/build/components/global-styles/font-library-modal/context.js +7 -30
- package/build/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-card.js +24 -16
- package/build/components/global-styles/font-library-modal/font-card.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-collection.js +195 -152
- package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-demo.js +14 -12
- package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
- package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +29 -20
- package/build/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
- package/build/components/global-styles/font-library-modal/index.js +41 -36
- package/build/components/global-styles/font-library-modal/index.js.map +1 -1
- package/build/components/global-styles/font-library-modal/installed-fonts.js +153 -109
- package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build/components/global-styles/font-library-modal/library-font-details.js +16 -14
- package/build/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
- package/build/components/global-styles/font-library-modal/library-font-variant.js +25 -22
- package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
- package/build/components/global-styles/font-library-modal/upload-fonts.js +40 -34
- package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/index.js +3 -3
- package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
- package/build/components/global-styles/gradients-palette-panel.js +41 -37
- package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build/components/global-styles/header.js +37 -28
- package/build/components/global-styles/header.js.map +1 -1
- package/build/components/global-styles/highlighted-colors.js +3 -4
- package/build/components/global-styles/highlighted-colors.js.map +1 -1
- package/build/components/global-styles/hooks.js +11 -23
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/icon-with-current-color.js +2 -2
- package/build/components/global-styles/icon-with-current-color.js.map +1 -1
- package/build/components/global-styles/navigation-button.js +15 -11
- package/build/components/global-styles/navigation-button.js.map +1 -1
- package/build/components/global-styles/palette.js +39 -32
- package/build/components/global-styles/palette.js.map +1 -1
- package/build/components/global-styles/preset-colors.js +3 -4
- package/build/components/global-styles/preset-colors.js.map +1 -1
- package/build/components/global-styles/preview-colors.js +22 -20
- package/build/components/global-styles/preview-colors.js.map +1 -1
- package/build/components/global-styles/preview-iframe.js +34 -29
- package/build/components/global-styles/preview-iframe.js.map +1 -1
- package/build/components/global-styles/preview-styles.js +95 -90
- package/build/components/global-styles/preview-styles.js.map +1 -1
- package/build/components/global-styles/root-menu.js +28 -21
- package/build/components/global-styles/root-menu.js.map +1 -1
- package/build/components/global-styles/screen-background.js +6 -4
- package/build/components/global-styles/screen-background.js.map +1 -1
- package/build/components/global-styles/screen-block-list.js +33 -27
- package/build/components/global-styles/screen-block-list.js.map +1 -1
- package/build/components/global-styles/screen-block.js +62 -53
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-color-palette.js +29 -19
- package/build/components/global-styles/screen-color-palette.js.map +1 -1
- package/build/components/global-styles/screen-colors.js +18 -14
- package/build/components/global-styles/screen-colors.js.map +1 -1
- package/build/components/global-styles/screen-css.js +20 -14
- package/build/components/global-styles/screen-css.js.map +1 -1
- package/build/components/global-styles/screen-layout.js +9 -4
- package/build/components/global-styles/screen-layout.js.map +1 -1
- package/build/components/global-styles/screen-revisions/index.js +52 -42
- package/build/components/global-styles/screen-revisions/index.js.map +1 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js +81 -70
- 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 +1 -0
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
- package/build/components/global-styles/screen-root.js +76 -42
- package/build/components/global-styles/screen-root.js.map +1 -1
- package/build/components/global-styles/screen-shadows.js +22 -0
- package/build/components/global-styles/screen-shadows.js.map +1 -0
- package/build/components/global-styles/screen-style-variations.js +14 -9
- package/build/components/global-styles/screen-style-variations.js.map +1 -1
- package/build/components/global-styles/screen-typography-element.js +50 -45
- package/build/components/global-styles/screen-typography-element.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +15 -11
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/shadow-utils.js +230 -0
- package/build/components/global-styles/shadow-utils.js.map +1 -0
- package/build/components/global-styles/shadows-edit-panel.js +458 -0
- package/build/components/global-styles/shadows-edit-panel.js.map +1 -0
- package/build/components/global-styles/shadows-panel.js +128 -0
- package/build/components/global-styles/shadows-panel.js.map +1 -0
- package/build/components/global-styles/style-variations-container.js +67 -18
- package/build/components/global-styles/style-variations-container.js.map +1 -1
- package/build/components/global-styles/subtitle.js +5 -4
- package/build/components/global-styles/subtitle.js.map +1 -1
- package/build/components/global-styles/typography-elements.js +53 -45
- package/build/components/global-styles/typography-elements.js.map +1 -1
- package/build/components/global-styles/typography-example.js +11 -8
- package/build/components/global-styles/typography-example.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +2 -2
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/typography-preview.js +5 -4
- package/build/components/global-styles/typography-preview.js.map +1 -1
- package/build/components/global-styles/ui.js +124 -92
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles/utils.js +28 -0
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/global-styles/variations/variation.js +27 -22
- package/build/components/global-styles/variations/variation.js.map +1 -1
- package/build/components/global-styles/variations/variations-color.js +18 -13
- package/build/components/global-styles/variations/variations-color.js.map +1 -1
- package/build/components/global-styles/variations/variations-panel.js +27 -17
- package/build/components/global-styles/variations/variations-panel.js.map +1 -1
- package/build/components/global-styles/variations/variations-typography.js +37 -31
- package/build/components/global-styles/variations/variations-typography.js.map +1 -1
- package/build/components/global-styles-renderer/index.js +5 -1
- package/build/components/global-styles-renderer/index.js.map +1 -1
- package/build/components/global-styles-sidebar/default-sidebar.js +22 -18
- package/build/components/global-styles-sidebar/default-sidebar.js.map +1 -1
- package/build/components/global-styles-sidebar/index.js +36 -26
- package/build/components/global-styles-sidebar/index.js.map +1 -1
- package/build/components/layout/index.js +92 -118
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/router.js +83 -103
- package/build/components/layout/router.js.map +1 -1
- package/build/components/media/index.js +2 -2
- package/build/components/media/index.js.map +1 -1
- package/build/components/{header-edit-mode/more-menu → more-menu}/index.js +7 -3
- package/build/components/more-menu/index.js.map +1 -0
- package/build/components/{header-edit-mode/more-menu → more-menu}/site-export.js +5 -4
- package/build/components/more-menu/site-export.js.map +1 -0
- package/build/components/{header-edit-mode/more-menu → more-menu}/welcome-guide-menu-item.js +5 -4
- package/build/components/more-menu/welcome-guide-menu-item.js.map +1 -0
- package/build/components/page/header.js +24 -20
- package/build/components/page/header.js.map +1 -1
- package/build/components/page/index.js +12 -10
- package/build/components/page/index.js.map +1 -1
- package/build/components/page-pages/index.js +133 -52
- package/build/components/page-pages/index.js.map +1 -1
- package/build/components/page-patterns/delete-category-menu-item.js +23 -20
- package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
- package/build/components/page-patterns/header.js +47 -32
- package/build/components/page-patterns/header.js.map +1 -1
- package/build/components/page-patterns/index.js +116 -110
- package/build/components/page-patterns/index.js.map +1 -1
- package/build/components/page-patterns/rename-category-menu-item.js +14 -11
- package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +7 -6
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/page-templates/index.js +78 -59
- package/build/components/page-templates/index.js.map +1 -1
- package/build/components/pagination/index.js +59 -41
- package/build/components/pagination/index.js.map +1 -1
- package/build/components/plugin-template-setting-panel/index.js +4 -2
- package/build/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build/components/resizable-frame/index.js +38 -32
- package/build/components/resizable-frame/index.js.map +1 -1
- package/build/components/revisions/index.js +26 -20
- package/build/components/revisions/index.js.map +1 -1
- package/build/components/routes/link.js +5 -4
- package/build/components/routes/link.js.map +1 -1
- package/build/components/save-button/index.js +5 -4
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/save-hub/index.js +12 -11
- package/build/components/save-hub/index.js.map +1 -1
- package/build/components/save-panel/index.js +34 -28
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/sidebar/index.js +14 -11
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-button/index.js +2 -2
- package/build/components/sidebar-button/index.js.map +1 -1
- package/build/components/sidebar-dataviews/add-new-view.js +56 -48
- package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
- package/build/components/sidebar-dataviews/custom-dataviews-list.js +106 -89
- package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
- package/build/components/sidebar-dataviews/dataview-item.js +18 -12
- package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build/components/sidebar-dataviews/default-views.js +48 -0
- package/build/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build/components/sidebar-dataviews/index.js +21 -22
- package/build/components/sidebar-dataviews/index.js.map +1 -1
- package/build/components/sidebar-navigation-item/index.js +27 -25
- package/build/components/sidebar-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +51 -39
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.js +24 -17
- package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/index.js +9 -7
- package/build/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +5 -4
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +5 -5
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +5 -4
- package/build/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.js +54 -45
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/index.js +45 -22
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +5 -4
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js +11 -10
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js +53 -42
- package/build/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +10 -8
- package/build/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +43 -36
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +16 -13
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js +27 -23
- 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 +50 -35
- 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 +12 -9
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/category-item.js +12 -10
- package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/index.js +59 -64
- package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/content.js +17 -17
- package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/index.js +4 -4
- package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build/components/site-hub/index.js +52 -133
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/site-icon/index.js +8 -7
- package/build/components/site-icon/index.js.map +1 -1
- package/build/components/style-book/index.js +115 -99
- package/build/components/style-book/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +10 -30
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build/components/table/index.js +23 -15
- package/build/components/table/index.js.map +1 -1
- package/build/components/template-part-converter/convert-to-regular.js +5 -4
- package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
- package/build/components/template-part-converter/convert-to-template-part.js +23 -17
- package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build/components/template-part-converter/index.js +12 -10
- package/build/components/template-part-converter/index.js.map +1 -1
- package/build/components/welcome-guide/editor.js +20 -15
- package/build/components/welcome-guide/editor.js.map +1 -1
- package/build/components/welcome-guide/image.js +13 -12
- package/build/components/welcome-guide/image.js.map +1 -1
- package/build/components/welcome-guide/index.js +4 -2
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/components/welcome-guide/page.js +18 -13
- package/build/components/welcome-guide/page.js.map +1 -1
- package/build/components/welcome-guide/styles.js +45 -28
- package/build/components/welcome-guide/styles.js.map +1 -1
- package/build/components/welcome-guide/template.js +18 -13
- package/build/components/welcome-guide/template.js.map +1 -1
- package/build/deprecated.js +4 -4
- package/build/deprecated.js.map +1 -1
- package/build/hooks/commands/use-common-commands.js +12 -24
- package/build/hooks/commands/use-common-commands.js.map +1 -1
- package/build/hooks/commands/use-edit-mode-commands.js +2 -116
- package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
- package/build/hooks/index.js +0 -1
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/push-changes-to-global-styles/index.js +26 -16
- package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -1
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build/index.js +3 -3
- package/build/index.js.map +1 -1
- package/build/store/private-actions.js +34 -13
- package/build/store/private-actions.js.map +1 -1
- package/build/store/selectors.js +2 -2
- package/build/store/selectors.js.map +1 -1
- package/build/utils/template-part-create.js +0 -62
- package/build/utils/template-part-create.js.map +1 -1
- package/build/utils/use-activate-theme.js +4 -5
- package/build/utils/use-activate-theme.js.map +1 -1
- package/build-module/components/add-new-page/index.js +34 -27
- package/build-module/components/add-new-page/index.js.map +1 -1
- package/build-module/components/add-new-pattern/index.js +98 -78
- package/build-module/components/add-new-pattern/index.js.map +1 -1
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +36 -30
- 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 +121 -95
- 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 +89 -71
- package/build-module/components/add-new-template/index.js.map +1 -1
- package/build-module/components/add-new-template/utils.js +36 -17
- package/build-module/components/add-new-template/utils.js.map +1 -1
- package/build-module/components/app/index.js +11 -4
- package/build-module/components/app/index.js.map +1 -1
- package/build-module/components/block-editor/block-inspector-button.js +5 -4
- package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
- package/build-module/components/block-editor/inserter-media-categories.js +1 -1
- package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
- package/build-module/components/block-editor/use-editor-iframe-props.js +80 -0
- package/build-module/components/block-editor/use-editor-iframe-props.js.map +1 -0
- package/build-module/components/canvas-loader/index.js +14 -13
- package/build-module/components/canvas-loader/index.js.map +1 -1
- package/build-module/components/dataviews-actions/index.js +7 -4
- package/build-module/components/dataviews-actions/index.js.map +1 -1
- package/build-module/components/editor/index.js +91 -185
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor/use-editor-title.js +31 -0
- package/build-module/components/editor/use-editor-title.js.map +1 -0
- package/build-module/components/editor-canvas-container/index.js +29 -30
- package/build-module/components/editor-canvas-container/index.js.map +1 -1
- package/build-module/components/error-boundary/index.js +2 -2
- package/build-module/components/error-boundary/index.js.map +1 -1
- package/build-module/components/error-boundary/warning.js +13 -11
- package/build-module/components/error-boundary/warning.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +6 -5
- package/build-module/components/global-styles/background-panel.js.map +1 -1
- package/build-module/components/global-styles/block-preview-panel.js +19 -17
- package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
- package/build-module/components/global-styles/color-indicator-wrapper.js +2 -2
- package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
- package/build-module/components/global-styles/color-palette-panel.js +31 -29
- package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +2 -2
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/font-families.js +58 -40
- package/build-module/components/global-styles/font-families.js.map +1 -1
- package/build-module/components/global-styles/font-family-item.js +18 -13
- package/build-module/components/global-styles/font-family-item.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/collection-font-variant.js +26 -22
- package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/context.js +7 -30
- package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/font-card.js +25 -16
- package/build-module/components/global-styles/font-library-modal/font-card.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/font-collection.js +198 -153
- package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/font-demo.js +14 -12
- package/build-module/components/global-styles/font-library-modal/font-demo.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js +30 -20
- package/build-module/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/index.js +42 -36
- package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js +157 -111
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/library-font-details.js +18 -14
- package/build-module/components/global-styles/font-library-modal/library-font-details.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/library-font-variant.js +26 -22
- package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/upload-fonts.js +42 -35
- package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/index.js +3 -3
- package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
- package/build-module/components/global-styles/gradients-palette-panel.js +42 -37
- package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/header.js +38 -28
- package/build-module/components/global-styles/header.js.map +1 -1
- package/build-module/components/global-styles/highlighted-colors.js +3 -4
- package/build-module/components/global-styles/highlighted-colors.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +11 -23
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/icon-with-current-color.js +2 -2
- package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
- package/build-module/components/global-styles/navigation-button.js +16 -11
- package/build-module/components/global-styles/navigation-button.js.map +1 -1
- package/build-module/components/global-styles/palette.js +42 -34
- package/build-module/components/global-styles/palette.js.map +1 -1
- package/build-module/components/global-styles/preset-colors.js +3 -4
- package/build-module/components/global-styles/preset-colors.js.map +1 -1
- package/build-module/components/global-styles/preview-colors.js +22 -20
- package/build-module/components/global-styles/preview-colors.js.map +1 -1
- package/build-module/components/global-styles/preview-iframe.js +36 -29
- package/build-module/components/global-styles/preview-iframe.js.map +1 -1
- package/build-module/components/global-styles/preview-styles.js +96 -90
- package/build-module/components/global-styles/preview-styles.js.map +1 -1
- package/build-module/components/global-styles/root-menu.js +31 -22
- package/build-module/components/global-styles/root-menu.js.map +1 -1
- package/build-module/components/global-styles/screen-background.js +8 -4
- package/build-module/components/global-styles/screen-background.js.map +1 -1
- package/build-module/components/global-styles/screen-block-list.js +35 -27
- package/build-module/components/global-styles/screen-block-list.js.map +1 -1
- package/build-module/components/global-styles/screen-block.js +64 -53
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-color-palette.js +31 -19
- package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
- package/build-module/components/global-styles/screen-colors.js +20 -14
- package/build-module/components/global-styles/screen-colors.js.map +1 -1
- package/build-module/components/global-styles/screen-css.js +22 -14
- package/build-module/components/global-styles/screen-css.js.map +1 -1
- package/build-module/components/global-styles/screen-layout.js +11 -4
- package/build-module/components/global-styles/screen-layout.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/index.js +54 -42
- package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +82 -70
- 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 +1 -0
- 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 +78 -42
- package/build-module/components/global-styles/screen-root.js.map +1 -1
- package/build-module/components/global-styles/screen-shadows.js +13 -0
- package/build-module/components/global-styles/screen-shadows.js.map +1 -0
- package/build-module/components/global-styles/screen-style-variations.js +16 -9
- package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
- package/build-module/components/global-styles/screen-typography-element.js +52 -45
- package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js +17 -11
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/shadow-utils.js +221 -0
- package/build-module/components/global-styles/shadow-utils.js.map +1 -0
- package/build-module/components/global-styles/shadows-edit-panel.js +452 -0
- package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -0
- package/build-module/components/global-styles/shadows-panel.js +121 -0
- package/build-module/components/global-styles/shadows-panel.js.map +1 -0
- package/build-module/components/global-styles/style-variations-container.js +68 -19
- package/build-module/components/global-styles/style-variations-container.js.map +1 -1
- package/build-module/components/global-styles/subtitle.js +5 -4
- package/build-module/components/global-styles/subtitle.js.map +1 -1
- package/build-module/components/global-styles/typography-elements.js +54 -45
- package/build-module/components/global-styles/typography-elements.js.map +1 -1
- package/build-module/components/global-styles/typography-example.js +12 -8
- package/build-module/components/global-styles/typography-example.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +2 -2
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-preview.js +5 -4
- package/build-module/components/global-styles/typography-preview.js.map +1 -1
- package/build-module/components/global-styles/ui.js +126 -92
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles/utils.js +27 -0
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/global-styles/variations/variation.js +27 -22
- package/build-module/components/global-styles/variations/variation.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-color.js +20 -14
- package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-panel.js +28 -18
- package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-typography.js +38 -31
- package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
- package/build-module/components/global-styles-renderer/index.js +5 -1
- package/build-module/components/global-styles-renderer/index.js.map +1 -1
- package/build-module/components/global-styles-sidebar/default-sidebar.js +24 -18
- package/build-module/components/global-styles-sidebar/default-sidebar.js.map +1 -1
- package/build-module/components/global-styles-sidebar/index.js +37 -26
- package/build-module/components/global-styles-sidebar/index.js.map +1 -1
- package/build-module/components/layout/index.js +97 -121
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/router.js +83 -103
- package/build-module/components/layout/router.js.map +1 -1
- package/build-module/components/media/index.js +2 -2
- package/build-module/components/media/index.js.map +1 -1
- package/build-module/components/{header-edit-mode/more-menu → more-menu}/index.js +9 -3
- package/build-module/components/more-menu/index.js.map +1 -0
- package/build-module/components/{header-edit-mode/more-menu → more-menu}/site-export.js +5 -4
- package/build-module/components/more-menu/site-export.js.map +1 -0
- package/build-module/components/{header-edit-mode/more-menu → more-menu}/welcome-guide-menu-item.js +5 -4
- package/build-module/components/more-menu/welcome-guide-menu-item.js.map +1 -0
- package/build-module/components/page/header.js +25 -19
- package/build-module/components/page/header.js.map +1 -1
- package/build-module/components/page/index.js +14 -11
- package/build-module/components/page/index.js.map +1 -1
- package/build-module/components/page-pages/index.js +138 -55
- package/build-module/components/page-pages/index.js.map +1 -1
- package/build-module/components/page-patterns/delete-category-menu-item.js +25 -20
- package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
- package/build-module/components/page-patterns/header.js +48 -32
- package/build-module/components/page-patterns/header.js.map +1 -1
- package/build-module/components/page-patterns/index.js +117 -110
- package/build-module/components/page-patterns/index.js.map +1 -1
- package/build-module/components/page-patterns/rename-category-menu-item.js +16 -11
- package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +7 -6
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/page-templates/index.js +80 -59
- package/build-module/components/page-templates/index.js.map +1 -1
- package/build-module/components/pagination/index.js +60 -41
- package/build-module/components/pagination/index.js.map +1 -1
- package/build-module/components/plugin-template-setting-panel/index.js +4 -2
- package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build-module/components/resizable-frame/index.js +40 -32
- package/build-module/components/resizable-frame/index.js.map +1 -1
- package/build-module/components/revisions/index.js +27 -20
- package/build-module/components/revisions/index.js.map +1 -1
- package/build-module/components/routes/link.js +5 -4
- package/build-module/components/routes/link.js.map +1 -1
- package/build-module/components/save-button/index.js +5 -4
- package/build-module/components/save-button/index.js.map +1 -1
- package/build-module/components/save-hub/index.js +12 -11
- package/build-module/components/save-hub/index.js.map +1 -1
- package/build-module/components/save-panel/index.js +35 -28
- package/build-module/components/save-panel/index.js.map +1 -1
- package/build-module/components/sidebar/index.js +14 -11
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-button/index.js +2 -2
- package/build-module/components/sidebar-button/index.js.map +1 -1
- package/build-module/components/sidebar-dataviews/add-new-view.js +58 -48
- package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
- package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +108 -89
- package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
- package/build-module/components/sidebar-dataviews/dataview-item.js +19 -12
- package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build-module/components/sidebar-dataviews/default-views.js +49 -1
- package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build-module/components/sidebar-dataviews/index.js +23 -22
- package/build-module/components/sidebar-dataviews/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-item/index.js +28 -25
- package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +53 -39
- package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js +25 -17
- package/build-module/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/index.js +10 -7
- package/build-module/components/sidebar-navigation-screen-details-panel/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js +5 -4
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js +5 -5
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js +5 -4
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +56 -45
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +47 -22
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +5 -4
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +11 -10
- 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 +55 -42
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js +10 -8
- package/build-module/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +44 -36
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +17 -13
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +27 -23
- 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 +52 -35
- 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 +14 -9
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +12 -10
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.js +61 -64
- package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +18 -17
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +4 -4
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build-module/components/site-hub/index.js +56 -136
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/site-icon/index.js +8 -7
- package/build-module/components/site-icon/index.js.map +1 -1
- package/build-module/components/style-book/index.js +116 -99
- 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 +10 -30
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build-module/components/table/index.js +24 -15
- package/build-module/components/table/index.js.map +1 -1
- package/build-module/components/template-part-converter/convert-to-regular.js +5 -4
- 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 +25 -16
- 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 -10
- package/build-module/components/template-part-converter/index.js.map +1 -1
- package/build-module/components/welcome-guide/editor.js +22 -15
- package/build-module/components/welcome-guide/editor.js.map +1 -1
- package/build-module/components/welcome-guide/image.js +14 -12
- package/build-module/components/welcome-guide/image.js.map +1 -1
- package/build-module/components/welcome-guide/index.js +6 -2
- package/build-module/components/welcome-guide/index.js.map +1 -1
- package/build-module/components/welcome-guide/page.js +20 -13
- package/build-module/components/welcome-guide/page.js.map +1 -1
- package/build-module/components/welcome-guide/styles.js +47 -28
- package/build-module/components/welcome-guide/styles.js.map +1 -1
- package/build-module/components/welcome-guide/template.js +20 -13
- package/build-module/components/welcome-guide/template.js.map +1 -1
- package/build-module/deprecated.js +4 -4
- package/build-module/deprecated.js.map +1 -1
- package/build-module/hooks/commands/use-common-commands.js +12 -23
- package/build-module/hooks/commands/use-common-commands.js.map +1 -1
- package/build-module/hooks/commands/use-edit-mode-commands.js +4 -118
- package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
- package/build-module/hooks/index.js +0 -1
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/push-changes-to-global-styles/index.js +28 -16
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -1
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build-module/index.js +3 -3
- package/build-module/index.js.map +1 -1
- package/build-module/store/private-actions.js +34 -13
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/selectors.js +2 -2
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/template-part-create.js +0 -52
- package/build-module/utils/template-part-create.js.map +1 -1
- package/build-module/utils/use-activate-theme.js +4 -5
- package/build-module/utils/use-activate-theme.js.map +1 -1
- package/build-style/style-rtl.css +327 -634
- package/build-style/style.css +327 -634
- package/package.json +43 -44
- package/src/components/add-new-pattern/index.js +46 -37
- package/src/components/add-new-template/index.js +2 -0
- package/src/components/add-new-template/utils.js +77 -39
- package/src/components/block-editor/inserter-media-categories.js +1 -3
- package/src/components/block-editor/style.scss +12 -136
- package/src/components/block-editor/use-editor-iframe-props.js +79 -0
- package/src/components/canvas-loader/index.js +5 -2
- package/src/components/dataviews-actions/index.js +7 -2
- package/src/components/editor/index.js +116 -290
- package/src/components/editor/style.scss +1 -16
- package/src/components/editor/use-editor-title.js +35 -0
- package/src/components/editor-canvas-container/index.js +30 -35
- package/src/components/editor-canvas-container/style.scss +16 -0
- package/src/components/global-styles/background-panel.js +3 -2
- package/src/components/global-styles/color-palette-panel.js +1 -1
- package/src/components/global-styles/font-families.js +25 -18
- package/src/components/global-styles/font-family-item.js +2 -2
- package/src/components/global-styles/font-library-modal/collection-font-variant.js +2 -1
- package/src/components/global-styles/font-library-modal/context.js +6 -44
- package/src/components/global-styles/font-library-modal/font-collection.js +3 -5
- package/src/components/global-styles/font-library-modal/installed-fonts.js +42 -12
- package/src/components/global-styles/font-library-modal/library-font-variant.js +2 -1
- package/src/components/global-styles/font-library-modal/upload-fonts.js +1 -4
- package/src/components/global-styles/font-library-modal/utils/index.js +1 -1
- package/src/components/global-styles/hooks.js +10 -37
- package/src/components/global-styles/palette.js +9 -18
- package/src/components/global-styles/root-menu.js +16 -12
- package/src/components/global-styles/screen-block.js +1 -1
- package/src/components/global-styles/screen-css.js +1 -1
- package/src/components/global-styles/screen-layout.js +9 -2
- package/src/components/global-styles/screen-revisions/index.js +6 -0
- package/src/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
- package/src/components/global-styles/screen-revisions/style.scss +4 -8
- package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +1 -0
- package/src/components/global-styles/screen-shadows.js +13 -0
- package/src/components/global-styles/screen-typography.js +1 -1
- package/src/components/global-styles/shadow-utils.js +158 -0
- package/src/components/global-styles/shadows-edit-panel.js +555 -0
- package/src/components/global-styles/shadows-panel.js +147 -0
- package/src/components/global-styles/style-variations-container.js +73 -10
- package/src/components/global-styles/style.scss +54 -5
- package/src/components/global-styles/test/shadow-utils.spec.js +251 -0
- package/src/components/global-styles/test/utils.spec.js +59 -0
- package/src/components/global-styles/ui.js +10 -6
- package/src/components/global-styles/utils.js +27 -0
- package/src/components/global-styles/variations/style.scss +7 -4
- package/src/components/global-styles/variations/variation.js +2 -0
- package/src/components/global-styles/variations/variations-color.js +8 -4
- package/src/components/global-styles/variations/variations-panel.js +16 -5
- package/src/components/global-styles/variations/variations-typography.js +2 -1
- package/src/components/global-styles-renderer/index.js +7 -1
- package/src/components/global-styles-sidebar/index.js +2 -0
- package/src/components/layout/index.js +24 -69
- package/src/components/layout/router.js +64 -79
- package/src/components/layout/style.scss +29 -66
- package/src/components/{header-edit-mode/more-menu → more-menu}/index.js +1 -1
- package/src/components/page/header.js +17 -13
- package/src/components/page/index.js +1 -5
- package/src/components/page/style.scss +21 -7
- package/src/components/page-pages/index.js +154 -30
- package/src/components/page-pages/style.scss +15 -0
- package/src/components/page-patterns/delete-category-menu-item.js +1 -2
- package/src/components/page-patterns/header.js +45 -33
- package/src/components/page-patterns/index.js +29 -63
- package/src/components/page-patterns/style.scss +21 -14
- package/src/components/page-patterns/use-patterns.js +13 -6
- package/src/components/pagination/index.js +21 -16
- package/src/components/resizable-frame/index.js +1 -1
- package/src/components/save-panel/index.js +2 -4
- package/src/components/sidebar-dataviews/add-new-view.js +5 -5
- package/src/components/sidebar-dataviews/custom-dataviews-list.js +5 -7
- package/src/components/sidebar-dataviews/dataview-item.js +8 -4
- package/src/components/sidebar-dataviews/default-views.js +61 -1
- package/src/components/sidebar-dataviews/index.js +4 -9
- package/src/components/sidebar-navigation-item/index.js +7 -7
- package/src/components/sidebar-navigation-screen/index.js +1 -1
- package/src/components/sidebar-navigation-screen/style.scss +2 -2
- package/src/components/sidebar-navigation-screen-global-styles/index.js +8 -2
- package/src/components/sidebar-navigation-screen-main/index.js +14 -4
- package/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +1 -0
- package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +1 -1
- package/src/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
- package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +6 -3
- package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +0 -61
- package/src/components/sidebar-navigation-screen-patterns/category-item.js +15 -4
- package/src/components/sidebar-navigation-screen-patterns/index.js +11 -17
- package/src/components/sidebar-navigation-screen-templates-browse/content.js +1 -1
- package/src/components/sidebar-navigation-screen-templates-browse/index.js +1 -1
- package/src/components/site-hub/index.js +56 -148
- package/src/components/site-hub/style.scss +47 -13
- package/src/components/site-icon/style.scss +0 -4
- package/src/components/style-book/index.js +1 -1
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +18 -23
- package/src/components/template-part-converter/convert-to-template-part.js +4 -1
- package/src/hooks/commands/use-common-commands.js +12 -23
- package/src/hooks/commands/use-edit-mode-commands.js +4 -118
- package/src/hooks/index.js +0 -1
- package/src/hooks/push-changes-to-global-styles/index.js +3 -1
- package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +5 -1
- package/src/index.js +1 -1
- package/src/store/private-actions.js +59 -23
- package/src/store/selectors.js +2 -2
- package/src/style.scss +0 -6
- package/src/utils/template-part-create.js +0 -67
- package/src/utils/use-activate-theme.js +2 -2
- package/build/components/block-editor/editor-canvas.js +0 -139
- package/build/components/block-editor/editor-canvas.js.map +0 -1
- package/build/components/block-editor/resizable-editor.js +0 -86
- package/build/components/block-editor/resizable-editor.js.map +0 -1
- package/build/components/block-editor/resize-handle.js +0 -57
- package/build/components/block-editor/resize-handle.js.map +0 -1
- package/build/components/block-editor/site-editor-canvas.js +0 -95
- package/build/components/block-editor/site-editor-canvas.js.map +0 -1
- package/build/components/code-editor/index.js +0 -111
- package/build/components/code-editor/index.js.map +0 -1
- package/build/components/create-template-part-modal/index.js +0 -151
- package/build/components/create-template-part-modal/index.js.map +0 -1
- package/build/components/header-edit-mode/index.js +0 -50
- package/build/components/header-edit-mode/index.js.map +0 -1
- package/build/components/header-edit-mode/more-menu/index.js.map +0 -1
- package/build/components/header-edit-mode/more-menu/site-export.js.map +0 -1
- package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +0 -1
- package/build/components/page-patterns/dataviews-pattern-actions.js +0 -311
- package/build/components/page-patterns/dataviews-pattern-actions.js.map +0 -1
- package/build/components/pattern-modal/duplicate.js +0 -70
- package/build/components/pattern-modal/duplicate.js.map +0 -1
- package/build/components/pattern-modal/index.js +0 -23
- package/build/components/pattern-modal/index.js.map +0 -1
- package/build/components/pattern-modal/rename.js +0 -45
- package/build/components/pattern-modal/rename.js.map +0 -1
- package/build/components/rename-post-menu-item/index.js +0 -109
- package/build/components/rename-post-menu-item/index.js.map +0 -1
- package/build/components/sidebar-navigation-screen-page/index.js +0 -163
- package/build/components/sidebar-navigation-screen-page/index.js.map +0 -1
- package/build/components/sidebar-navigation-screen-page/page-details.js +0 -127
- package/build/components/sidebar-navigation-screen-page/page-details.js.map +0 -1
- package/build/components/sidebar-navigation-screen-page/status-label.js +0 -65
- package/build/components/sidebar-navigation-screen-page/status-label.js.map +0 -1
- package/build/components/sidebar-navigation-screen-pattern/index.js +0 -67
- package/build/components/sidebar-navigation-screen-pattern/index.js.map +0 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +0 -38
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +0 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +0 -29
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +0 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +0 -37
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +0 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +0 -45
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +0 -1
- package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +0 -88
- package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +0 -1
- package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -29
- package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +0 -1
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +0 -138
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +0 -1
- package/build/components/sidebar-navigation-screen-template/home-template-details.js +0 -110
- package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +0 -1
- package/build/components/sidebar-navigation-screen-template/index.js +0 -121
- package/build/components/sidebar-navigation-screen-template/index.js.map +0 -1
- package/build/components/sidebar-navigation-screen-template/template-areas.js +0 -117
- package/build/components/sidebar-navigation-screen-template/template-areas.js.map +0 -1
- package/build/components/template-actions/index.js +0 -131
- package/build/components/template-actions/index.js.map +0 -1
- package/build/hooks/components.js +0 -10
- package/build/hooks/components.js.map +0 -1
- package/build/utils/get-is-list-page.js +0 -28
- package/build/utils/get-is-list-page.js.map +0 -1
- package/build-module/components/block-editor/editor-canvas.js +0 -131
- package/build-module/components/block-editor/editor-canvas.js.map +0 -1
- package/build-module/components/block-editor/resizable-editor.js +0 -79
- package/build-module/components/block-editor/resizable-editor.js.map +0 -1
- package/build-module/components/block-editor/resize-handle.js +0 -50
- package/build-module/components/block-editor/resize-handle.js.map +0 -1
- package/build-module/components/block-editor/site-editor-canvas.js +0 -86
- package/build-module/components/block-editor/site-editor-canvas.js.map +0 -1
- package/build-module/components/code-editor/index.js +0 -103
- package/build-module/components/code-editor/index.js.map +0 -1
- package/build-module/components/create-template-part-modal/index.js +0 -143
- package/build-module/components/create-template-part-modal/index.js.map +0 -1
- package/build-module/components/header-edit-mode/index.js +0 -42
- package/build-module/components/header-edit-mode/index.js.map +0 -1
- package/build-module/components/header-edit-mode/more-menu/index.js.map +0 -1
- package/build-module/components/header-edit-mode/more-menu/site-export.js.map +0 -1
- package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +0 -1
- package/build-module/components/page-patterns/dataviews-pattern-actions.js +0 -304
- package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +0 -1
- package/build-module/components/pattern-modal/duplicate.js +0 -62
- package/build-module/components/pattern-modal/duplicate.js.map +0 -1
- package/build-module/components/pattern-modal/index.js +0 -14
- package/build-module/components/pattern-modal/index.js.map +0 -1
- package/build-module/components/pattern-modal/rename.js +0 -37
- package/build-module/components/pattern-modal/rename.js.map +0 -1
- package/build-module/components/rename-post-menu-item/index.js +0 -102
- package/build-module/components/rename-post-menu-item/index.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-page/index.js +0 -155
- package/build-module/components/sidebar-navigation-screen-page/index.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-page/page-details.js +0 -120
- package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-page/status-label.js +0 -57
- package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-pattern/index.js +0 -59
- package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +0 -30
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +0 -20
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +0 -29
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +0 -36
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +0 -80
- package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -22
- package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +0 -130
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-template/home-template-details.js +0 -103
- package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-template/index.js +0 -113
- package/build-module/components/sidebar-navigation-screen-template/index.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-template/template-areas.js +0 -109
- package/build-module/components/sidebar-navigation-screen-template/template-areas.js.map +0 -1
- package/build-module/components/template-actions/index.js +0 -123
- package/build-module/components/template-actions/index.js.map +0 -1
- package/build-module/hooks/components.js +0 -7
- package/build-module/hooks/components.js.map +0 -1
- package/build-module/utils/get-is-list-page.js +0 -22
- package/build-module/utils/get-is-list-page.js.map +0 -1
- package/src/components/block-editor/editor-canvas.js +0 -158
- package/src/components/block-editor/resizable-editor.js +0 -82
- package/src/components/block-editor/resize-handle.js +0 -66
- package/src/components/block-editor/site-editor-canvas.js +0 -107
- package/src/components/code-editor/index.js +0 -94
- package/src/components/code-editor/style.scss +0 -95
- package/src/components/create-template-part-modal/index.js +0 -199
- package/src/components/create-template-part-modal/style.scss +0 -69
- package/src/components/header-edit-mode/index.js +0 -51
- package/src/components/header-edit-mode/style.scss +0 -3
- package/src/components/page-patterns/dataviews-pattern-actions.js +0 -350
- package/src/components/pattern-modal/duplicate.js +0 -55
- package/src/components/pattern-modal/index.js +0 -19
- package/src/components/pattern-modal/rename.js +0 -30
- package/src/components/rename-post-menu-item/index.js +0 -138
- package/src/components/sidebar-navigation-screen-page/index.js +0 -204
- package/src/components/sidebar-navigation-screen-page/page-details.js +0 -161
- package/src/components/sidebar-navigation-screen-page/status-label.js +0 -71
- package/src/components/sidebar-navigation-screen-page/style.scss +0 -69
- package/src/components/sidebar-navigation-screen-pattern/index.js +0 -57
- package/src/components/sidebar-navigation-screen-pattern/style.scss +0 -26
- package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js +0 -31
- package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js +0 -21
- package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js +0 -33
- package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +0 -36
- package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js +0 -98
- package/src/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js +0 -32
- package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +0 -205
- package/src/components/sidebar-navigation-screen-template/home-template-details.js +0 -144
- package/src/components/sidebar-navigation-screen-template/index.js +0 -134
- package/src/components/sidebar-navigation-screen-template/style.scss +0 -53
- package/src/components/sidebar-navigation-screen-template/template-areas.js +0 -135
- package/src/components/template-actions/index.js +0 -165
- package/src/hooks/components.js +0 -11
- package/src/utils/get-is-list-page.js +0 -23
- package/src/utils/test/template-part-create.js +0 -63
- /package/src/components/{header-edit-mode/more-menu → more-menu}/site-export.js +0 -0
- /package/src/components/{header-edit-mode/more-menu → more-menu}/welcome-guide-menu-item.js +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* WordPress dependencies
|
|
4
3
|
*/
|
|
@@ -18,20 +17,61 @@ import SidebarNavigationScreen from '../sidebar-navigation-screen';
|
|
|
18
17
|
import SidebarNavigationScreenGlobalStyles from '../sidebar-navigation-screen-global-styles';
|
|
19
18
|
import SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';
|
|
20
19
|
import SidebarNavigationScreenNavigationMenus from '../sidebar-navigation-screen-navigation-menus';
|
|
21
|
-
import SidebarNavigationScreenPage from '../sidebar-navigation-screen-page';
|
|
22
20
|
import SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';
|
|
23
|
-
import SidebarNavigationScreenTemplate from '../sidebar-navigation-screen-template';
|
|
24
|
-
import SidebarNavigationScreenPattern from '../sidebar-navigation-screen-pattern';
|
|
25
21
|
import SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';
|
|
26
22
|
import SidebarNavigationScreenNavigationMenu from '../sidebar-navigation-screen-navigation-menu';
|
|
27
23
|
import DataViewsSidebarContent from '../sidebar-dataviews';
|
|
24
|
+
import { NAVIGATION_POST_TYPE, PATTERN_TYPES, TEMPLATE_PART_POST_TYPE, TEMPLATE_POST_TYPE } from '../../utils/constants';
|
|
25
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
28
26
|
const {
|
|
29
27
|
useLocation,
|
|
30
28
|
useHistory
|
|
31
29
|
} = unlock(routerPrivateApis);
|
|
30
|
+
function useRedirectOldPaths() {
|
|
31
|
+
const history = useHistory();
|
|
32
|
+
const {
|
|
33
|
+
params
|
|
34
|
+
} = useLocation();
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
const {
|
|
37
|
+
postType,
|
|
38
|
+
path,
|
|
39
|
+
categoryType,
|
|
40
|
+
...rest
|
|
41
|
+
} = params;
|
|
42
|
+
if (path === '/wp_template_part/all') {
|
|
43
|
+
history.replace({
|
|
44
|
+
postType: TEMPLATE_PART_POST_TYPE
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
if (path === '/page') {
|
|
48
|
+
history.replace({
|
|
49
|
+
postType: 'page',
|
|
50
|
+
...rest
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
if (path === '/wp_template') {
|
|
54
|
+
history.replace({
|
|
55
|
+
postType: TEMPLATE_POST_TYPE,
|
|
56
|
+
...rest
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
if (path === '/patterns') {
|
|
60
|
+
history.replace({
|
|
61
|
+
postType: categoryType === TEMPLATE_PART_POST_TYPE ? TEMPLATE_PART_POST_TYPE : PATTERN_TYPES.user,
|
|
62
|
+
...rest
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
if (path === '/navigation') {
|
|
66
|
+
history.replace({
|
|
67
|
+
postType: NAVIGATION_POST_TYPE,
|
|
68
|
+
...rest
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}, [history, params]);
|
|
72
|
+
}
|
|
32
73
|
export default function useLayoutAreas() {
|
|
33
74
|
const isSiteEditorLoading = useIsSiteEditorLoading();
|
|
34
|
-
const history = useHistory();
|
|
35
75
|
const {
|
|
36
76
|
params
|
|
37
77
|
} = useLocation();
|
|
@@ -43,42 +83,26 @@ export default function useLayoutAreas() {
|
|
|
43
83
|
isCustom,
|
|
44
84
|
canvas
|
|
45
85
|
} = params;
|
|
46
|
-
|
|
47
|
-
// `/wp_template_part/all` path is no longer used and redirects to
|
|
48
|
-
// Patterns page for backward compatibility.
|
|
49
|
-
if (path === '/wp_template_part/all') {
|
|
50
|
-
history.replace({
|
|
51
|
-
path: '/patterns'
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
}, [history, path]);
|
|
55
|
-
|
|
56
|
-
// Note: Since "sidebar" is not yet supported here,
|
|
57
|
-
// returning undefined from "mobile" means show the sidebar.
|
|
86
|
+
useRedirectOldPaths();
|
|
58
87
|
|
|
59
88
|
// Page list
|
|
60
|
-
if (
|
|
89
|
+
if (postType === 'page') {
|
|
61
90
|
const isListLayout = layout === 'list' || !layout;
|
|
62
91
|
return {
|
|
63
|
-
key: 'pages
|
|
92
|
+
key: 'pages',
|
|
64
93
|
areas: {
|
|
65
|
-
sidebar:
|
|
66
|
-
title: __('
|
|
94
|
+
sidebar: /*#__PURE__*/_jsx(SidebarNavigationScreen, {
|
|
95
|
+
title: __('Pages'),
|
|
67
96
|
backPath: {},
|
|
68
|
-
content:
|
|
97
|
+
content: /*#__PURE__*/_jsx(DataViewsSidebarContent, {})
|
|
69
98
|
}),
|
|
70
|
-
content:
|
|
71
|
-
preview: isListLayout &&
|
|
72
|
-
isLoading: isSiteEditorLoading
|
|
73
|
-
onClick: () => history.push({
|
|
74
|
-
postType: 'page',
|
|
75
|
-
postId,
|
|
76
|
-
canvas: 'edit'
|
|
77
|
-
})
|
|
99
|
+
content: /*#__PURE__*/_jsx(PagePages, {}),
|
|
100
|
+
preview: (isListLayout || canvas === 'edit') && /*#__PURE__*/_jsx(Editor, {
|
|
101
|
+
isLoading: isSiteEditorLoading
|
|
78
102
|
}),
|
|
79
|
-
mobile: canvas === 'edit' ?
|
|
103
|
+
mobile: canvas === 'edit' ? /*#__PURE__*/_jsx(Editor, {
|
|
80
104
|
isLoading: isSiteEditorLoading
|
|
81
|
-
}) :
|
|
105
|
+
}) : /*#__PURE__*/_jsx(PagePages, {})
|
|
82
106
|
},
|
|
83
107
|
widths: {
|
|
84
108
|
content: isListLayout ? 380 : undefined
|
|
@@ -86,65 +110,20 @@ export default function useLayoutAreas() {
|
|
|
86
110
|
};
|
|
87
111
|
}
|
|
88
112
|
|
|
89
|
-
// Regular other post types
|
|
90
|
-
if (postType && postId) {
|
|
91
|
-
let sidebar;
|
|
92
|
-
if (postType === 'wp_template_part' || postType === 'wp_block') {
|
|
93
|
-
sidebar = createElement(SidebarNavigationScreenPattern, {
|
|
94
|
-
backPath: {
|
|
95
|
-
path: '/patterns',
|
|
96
|
-
categoryId: params.categoryId,
|
|
97
|
-
categoryType: params.categoryType
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
} else if (postType === 'wp_template') {
|
|
101
|
-
sidebar = createElement(SidebarNavigationScreenTemplate, {
|
|
102
|
-
backPath: {
|
|
103
|
-
path: '/wp_template'
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
} else if (postType === 'page') {
|
|
107
|
-
sidebar = createElement(SidebarNavigationScreenPage, {
|
|
108
|
-
backPath: {
|
|
109
|
-
path: '/page',
|
|
110
|
-
postId
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
} else {
|
|
114
|
-
sidebar = createElement(SidebarNavigationScreenNavigationMenu, {
|
|
115
|
-
backPath: {
|
|
116
|
-
path: '/navigation'
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
return {
|
|
121
|
-
key: 'page',
|
|
122
|
-
areas: {
|
|
123
|
-
sidebar,
|
|
124
|
-
preview: createElement(Editor, {
|
|
125
|
-
isLoading: isSiteEditorLoading
|
|
126
|
-
}),
|
|
127
|
-
mobile: canvas === 'edit' && createElement(Editor, {
|
|
128
|
-
isLoading: isSiteEditorLoading
|
|
129
|
-
})
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
|
|
134
113
|
// Templates
|
|
135
|
-
if (
|
|
114
|
+
if (postType === TEMPLATE_POST_TYPE) {
|
|
136
115
|
const isListLayout = isCustom !== 'true' && layout === 'list';
|
|
137
116
|
return {
|
|
138
|
-
key: 'templates
|
|
117
|
+
key: 'templates',
|
|
139
118
|
areas: {
|
|
140
|
-
sidebar:
|
|
119
|
+
sidebar: /*#__PURE__*/_jsx(SidebarNavigationScreenTemplatesBrowse, {
|
|
141
120
|
backPath: {}
|
|
142
121
|
}),
|
|
143
|
-
content:
|
|
144
|
-
preview: isListLayout &&
|
|
122
|
+
content: /*#__PURE__*/_jsx(PageTemplates, {}),
|
|
123
|
+
preview: (isListLayout || canvas === 'edit') && /*#__PURE__*/_jsx(Editor, {
|
|
145
124
|
isLoading: isSiteEditorLoading
|
|
146
125
|
}),
|
|
147
|
-
mobile:
|
|
126
|
+
mobile: /*#__PURE__*/_jsx(PageTemplates, {})
|
|
148
127
|
},
|
|
149
128
|
widths: {
|
|
150
129
|
content: isListLayout ? 380 : undefined
|
|
@@ -153,17 +132,18 @@ export default function useLayoutAreas() {
|
|
|
153
132
|
}
|
|
154
133
|
|
|
155
134
|
// Patterns
|
|
156
|
-
|
|
157
|
-
// Patterns page for backward compatibility.
|
|
158
|
-
if (path === '/patterns' || path === '/wp_template_part/all') {
|
|
135
|
+
if ([TEMPLATE_PART_POST_TYPE, PATTERN_TYPES.user].includes(postType)) {
|
|
159
136
|
return {
|
|
160
137
|
key: 'patterns',
|
|
161
138
|
areas: {
|
|
162
|
-
sidebar:
|
|
139
|
+
sidebar: /*#__PURE__*/_jsx(SidebarNavigationScreenPatterns, {
|
|
163
140
|
backPath: {}
|
|
164
141
|
}),
|
|
165
|
-
content:
|
|
166
|
-
mobile:
|
|
142
|
+
content: /*#__PURE__*/_jsx(PagePatterns, {}),
|
|
143
|
+
mobile: /*#__PURE__*/_jsx(PagePatterns, {}),
|
|
144
|
+
preview: canvas === 'edit' && /*#__PURE__*/_jsx(Editor, {
|
|
145
|
+
isLoading: isSiteEditorLoading
|
|
146
|
+
})
|
|
167
147
|
}
|
|
168
148
|
};
|
|
169
149
|
}
|
|
@@ -173,13 +153,13 @@ export default function useLayoutAreas() {
|
|
|
173
153
|
return {
|
|
174
154
|
key: 'styles',
|
|
175
155
|
areas: {
|
|
176
|
-
sidebar:
|
|
156
|
+
sidebar: /*#__PURE__*/_jsx(SidebarNavigationScreenGlobalStyles, {
|
|
177
157
|
backPath: {}
|
|
178
158
|
}),
|
|
179
|
-
preview:
|
|
159
|
+
preview: /*#__PURE__*/_jsx(Editor, {
|
|
180
160
|
isLoading: isSiteEditorLoading
|
|
181
161
|
}),
|
|
182
|
-
mobile: canvas === 'edit' &&
|
|
162
|
+
mobile: canvas === 'edit' && /*#__PURE__*/_jsx(Editor, {
|
|
183
163
|
isLoading: isSiteEditorLoading
|
|
184
164
|
})
|
|
185
165
|
}
|
|
@@ -187,20 +167,20 @@ export default function useLayoutAreas() {
|
|
|
187
167
|
}
|
|
188
168
|
|
|
189
169
|
// Navigation
|
|
190
|
-
if (
|
|
170
|
+
if (postType === NAVIGATION_POST_TYPE) {
|
|
191
171
|
if (postId) {
|
|
192
172
|
return {
|
|
193
173
|
key: 'navigation',
|
|
194
174
|
areas: {
|
|
195
|
-
sidebar:
|
|
175
|
+
sidebar: /*#__PURE__*/_jsx(SidebarNavigationScreenNavigationMenu, {
|
|
196
176
|
backPath: {
|
|
197
|
-
|
|
177
|
+
postType: NAVIGATION_POST_TYPE
|
|
198
178
|
}
|
|
199
179
|
}),
|
|
200
|
-
preview:
|
|
180
|
+
preview: /*#__PURE__*/_jsx(Editor, {
|
|
201
181
|
isLoading: isSiteEditorLoading
|
|
202
182
|
}),
|
|
203
|
-
mobile: canvas === 'edit' &&
|
|
183
|
+
mobile: canvas === 'edit' && /*#__PURE__*/_jsx(Editor, {
|
|
204
184
|
isLoading: isSiteEditorLoading
|
|
205
185
|
})
|
|
206
186
|
}
|
|
@@ -209,13 +189,13 @@ export default function useLayoutAreas() {
|
|
|
209
189
|
return {
|
|
210
190
|
key: 'navigation',
|
|
211
191
|
areas: {
|
|
212
|
-
sidebar:
|
|
192
|
+
sidebar: /*#__PURE__*/_jsx(SidebarNavigationScreenNavigationMenus, {
|
|
213
193
|
backPath: {}
|
|
214
194
|
}),
|
|
215
|
-
preview:
|
|
195
|
+
preview: /*#__PURE__*/_jsx(Editor, {
|
|
216
196
|
isLoading: isSiteEditorLoading
|
|
217
197
|
}),
|
|
218
|
-
mobile: canvas === 'edit' &&
|
|
198
|
+
mobile: canvas === 'edit' && /*#__PURE__*/_jsx(Editor, {
|
|
219
199
|
isLoading: isSiteEditorLoading
|
|
220
200
|
})
|
|
221
201
|
}
|
|
@@ -226,11 +206,11 @@ export default function useLayoutAreas() {
|
|
|
226
206
|
return {
|
|
227
207
|
key: 'default',
|
|
228
208
|
areas: {
|
|
229
|
-
sidebar:
|
|
230
|
-
preview:
|
|
209
|
+
sidebar: /*#__PURE__*/_jsx(SidebarNavigationScreenMain, {}),
|
|
210
|
+
preview: /*#__PURE__*/_jsx(Editor, {
|
|
231
211
|
isLoading: isSiteEditorLoading
|
|
232
212
|
}),
|
|
233
|
-
mobile: canvas === 'edit' &&
|
|
213
|
+
mobile: canvas === 'edit' && /*#__PURE__*/_jsx(Editor, {
|
|
234
214
|
isLoading: isSiteEditorLoading
|
|
235
215
|
})
|
|
236
216
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["privateApis","routerPrivateApis","__","useEffect","unlock","useIsSiteEditorLoading","Editor","PagePages","PagePatterns","PageTemplates","SidebarNavigationScreen","SidebarNavigationScreenGlobalStyles","SidebarNavigationScreenMain","SidebarNavigationScreenNavigationMenus","SidebarNavigationScreenPage","SidebarNavigationScreenTemplatesBrowse","SidebarNavigationScreenTemplate","SidebarNavigationScreenPattern","SidebarNavigationScreenPatterns","SidebarNavigationScreenNavigationMenu","DataViewsSidebarContent","useLocation","useHistory","useLayoutAreas","isSiteEditorLoading","history","params","postType","postId","path","layout","isCustom","canvas","replace","isListLayout","key","areas","sidebar","createElement","title","backPath","content","preview","isLoading","onClick","push","mobile","widths","undefined","categoryId","categoryType"],"sources":["@wordpress/edit-site/src/components/layout/router.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { useIsSiteEditorLoading } from './hooks';\nimport Editor from '../editor';\nimport PagePages from '../page-pages';\nimport PagePatterns from '../page-patterns';\nimport PageTemplates from '../page-templates';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationScreenGlobalStyles from '../sidebar-navigation-screen-global-styles';\nimport SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';\nimport SidebarNavigationScreenNavigationMenus from '../sidebar-navigation-screen-navigation-menus';\nimport SidebarNavigationScreenPage from '../sidebar-navigation-screen-page';\nimport SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';\nimport SidebarNavigationScreenTemplate from '../sidebar-navigation-screen-template';\nimport SidebarNavigationScreenPattern from '../sidebar-navigation-screen-pattern';\nimport SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';\nimport SidebarNavigationScreenNavigationMenu from '../sidebar-navigation-screen-navigation-menu';\nimport DataViewsSidebarContent from '../sidebar-dataviews';\n\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nexport default function useLayoutAreas() {\n\tconst isSiteEditorLoading = useIsSiteEditorLoading();\n\tconst history = useHistory();\n\tconst { params } = useLocation();\n\tconst { postType, postId, path, layout, isCustom, canvas } = params;\n\n\tuseEffect( () => {\n\t\t// `/wp_template_part/all` path is no longer used and redirects to\n\t\t// Patterns page for backward compatibility.\n\t\tif ( path === '/wp_template_part/all' ) {\n\t\t\thistory.replace( { path: '/patterns' } );\n\t\t}\n\t}, [ history, path ] );\n\n\t// Note: Since \"sidebar\" is not yet supported here,\n\t// returning undefined from \"mobile\" means show the sidebar.\n\n\t// Page list\n\tif ( path === '/page' ) {\n\t\tconst isListLayout = layout === 'list' || ! layout;\n\t\treturn {\n\t\t\tkey: 'pages-list',\n\t\t\tareas: {\n\t\t\t\tsidebar: (\n\t\t\t\t\t<SidebarNavigationScreen\n\t\t\t\t\t\ttitle={ __( 'Manage pages' ) }\n\t\t\t\t\t\tbackPath={ {} }\n\t\t\t\t\t\tcontent={ <DataViewsSidebarContent /> }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tcontent: <PagePages />,\n\t\t\t\tpreview: isListLayout && (\n\t\t\t\t\t<Editor\n\t\t\t\t\t\tisLoading={ isSiteEditorLoading }\n\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\t\tpostType: 'page',\n\t\t\t\t\t\t\t\tpostId,\n\t\t\t\t\t\t\t\tcanvas: 'edit',\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),\n\t\t\t\tmobile:\n\t\t\t\t\tcanvas === 'edit' ? (\n\t\t\t\t\t\t<Editor isLoading={ isSiteEditorLoading } />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<PagePages />\n\t\t\t\t\t),\n\t\t\t},\n\t\t\twidths: {\n\t\t\t\tcontent: isListLayout ? 380 : undefined,\n\t\t\t},\n\t\t};\n\t}\n\n\t// Regular other post types\n\tif ( postType && postId ) {\n\t\tlet sidebar;\n\t\tif ( postType === 'wp_template_part' || postType === 'wp_block' ) {\n\t\t\tsidebar = (\n\t\t\t\t<SidebarNavigationScreenPattern\n\t\t\t\t\tbackPath={ {\n\t\t\t\t\t\tpath: '/patterns',\n\t\t\t\t\t\tcategoryId: params.categoryId,\n\t\t\t\t\t\tcategoryType: params.categoryType,\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t);\n\t\t} else if ( postType === 'wp_template' ) {\n\t\t\tsidebar = (\n\t\t\t\t<SidebarNavigationScreenTemplate\n\t\t\t\t\tbackPath={ { path: '/wp_template' } }\n\t\t\t\t/>\n\t\t\t);\n\t\t} else if ( postType === 'page' ) {\n\t\t\tsidebar = (\n\t\t\t\t<SidebarNavigationScreenPage\n\t\t\t\t\tbackPath={ { path: '/page', postId } }\n\t\t\t\t/>\n\t\t\t);\n\t\t} else {\n\t\t\tsidebar = (\n\t\t\t\t<SidebarNavigationScreenNavigationMenu\n\t\t\t\t\tbackPath={ { path: '/navigation' } }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t\treturn {\n\t\t\tkey: 'page',\n\t\t\tareas: {\n\t\t\t\tsidebar,\n\t\t\t\tpreview: <Editor isLoading={ isSiteEditorLoading } />,\n\t\t\t\tmobile: canvas === 'edit' && (\n\t\t\t\t\t<Editor isLoading={ isSiteEditorLoading } />\n\t\t\t\t),\n\t\t\t},\n\t\t};\n\t}\n\n\t// Templates\n\tif ( path === '/wp_template' ) {\n\t\tconst isListLayout = isCustom !== 'true' && layout === 'list';\n\t\treturn {\n\t\t\tkey: 'templates-list',\n\t\t\tareas: {\n\t\t\t\tsidebar: (\n\t\t\t\t\t<SidebarNavigationScreenTemplatesBrowse backPath={ {} } />\n\t\t\t\t),\n\t\t\t\tcontent: <PageTemplates />,\n\t\t\t\tpreview: isListLayout && (\n\t\t\t\t\t<Editor isLoading={ isSiteEditorLoading } />\n\t\t\t\t),\n\t\t\t\tmobile: <PageTemplates />,\n\t\t\t},\n\t\t\twidths: {\n\t\t\t\tcontent: isListLayout ? 380 : undefined,\n\t\t\t},\n\t\t};\n\t}\n\n\t// Patterns\n\t// `/wp_template_part/all` path is no longer used and redirects to\n\t// Patterns page for backward compatibility.\n\tif ( path === '/patterns' || path === '/wp_template_part/all' ) {\n\t\treturn {\n\t\t\tkey: 'patterns',\n\t\t\tareas: {\n\t\t\t\tsidebar: <SidebarNavigationScreenPatterns backPath={ {} } />,\n\t\t\t\tcontent: <PagePatterns />,\n\t\t\t\tmobile: <PagePatterns />,\n\t\t\t},\n\t\t};\n\t}\n\n\t// Styles\n\tif ( path === '/wp_global_styles' ) {\n\t\treturn {\n\t\t\tkey: 'styles',\n\t\t\tareas: {\n\t\t\t\tsidebar: (\n\t\t\t\t\t<SidebarNavigationScreenGlobalStyles backPath={ {} } />\n\t\t\t\t),\n\t\t\t\tpreview: <Editor isLoading={ isSiteEditorLoading } />,\n\t\t\t\tmobile: canvas === 'edit' && (\n\t\t\t\t\t<Editor isLoading={ isSiteEditorLoading } />\n\t\t\t\t),\n\t\t\t},\n\t\t};\n\t}\n\n\t// Navigation\n\tif ( path === '/navigation' ) {\n\t\tif ( postId ) {\n\t\t\treturn {\n\t\t\t\tkey: 'navigation',\n\t\t\t\tareas: {\n\t\t\t\t\tsidebar: (\n\t\t\t\t\t\t<SidebarNavigationScreenNavigationMenu\n\t\t\t\t\t\t\tbackPath={ { path: '/navigation' } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tpreview: <Editor isLoading={ isSiteEditorLoading } />,\n\t\t\t\t\tmobile: canvas === 'edit' && (\n\t\t\t\t\t\t<Editor isLoading={ isSiteEditorLoading } />\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tkey: 'navigation',\n\t\t\tareas: {\n\t\t\t\tsidebar: (\n\t\t\t\t\t<SidebarNavigationScreenNavigationMenus backPath={ {} } />\n\t\t\t\t),\n\t\t\t\tpreview: <Editor isLoading={ isSiteEditorLoading } />,\n\t\t\t\tmobile: canvas === 'edit' && (\n\t\t\t\t\t<Editor isLoading={ isSiteEditorLoading } />\n\t\t\t\t),\n\t\t\t},\n\t\t};\n\t}\n\n\t// Fallback shows the home page preview\n\treturn {\n\t\tkey: 'default',\n\t\tareas: {\n\t\t\tsidebar: <SidebarNavigationScreenMain />,\n\t\t\tpreview: <Editor isLoading={ isSiteEditorLoading } />,\n\t\t\tmobile: canvas === 'edit' && (\n\t\t\t\t<Editor isLoading={ isSiteEditorLoading } />\n\t\t\t),\n\t\t},\n\t};\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;AACpE,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,QAAQ,oBAAoB;AAC9C;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SA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AE,CACzD;QACDE,OAAO,EAAEJ,aAAA,CAAChC,MAAM;UAACqC,SAAS,EAAGnB;QAAqB,CAAE,CAAC;QACrDsB,MAAM,EAAEd,MAAM,KAAK,MAAM,IACxBM,aAAA,CAAChC,MAAM;UAACqC,SAAS,EAAGnB;QAAqB,CAAE;MAE7C;IACD,CAAC;EACF;;EAEA;EACA,OAAO;IACNW,GAAG,EAAE,SAAS;IACdC,KAAK,EAAE;MACNC,OAAO,EAAEC,aAAA,CAAC1B,2BAA2B,MAAE,CAAC;MACxC8B,OAAO,EAAEJ,aAAA,CAAChC,MAAM;QAACqC,SAAS,EAAGnB;MAAqB,CAAE,CAAC;MACrDsB,MAAM,EAAEd,MAAM,KAAK,MAAM,IACxBM,aAAA,CAAChC,MAAM;QAACqC,SAAS,EAAGnB;MAAqB,CAAE;IAE7C;EACD,CAAC;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["privateApis","routerPrivateApis","__","useEffect","unlock","useIsSiteEditorLoading","Editor","PagePages","PagePatterns","PageTemplates","SidebarNavigationScreen","SidebarNavigationScreenGlobalStyles","SidebarNavigationScreenMain","SidebarNavigationScreenNavigationMenus","SidebarNavigationScreenTemplatesBrowse","SidebarNavigationScreenPatterns","SidebarNavigationScreenNavigationMenu","DataViewsSidebarContent","NAVIGATION_POST_TYPE","PATTERN_TYPES","TEMPLATE_PART_POST_TYPE","TEMPLATE_POST_TYPE","jsx","_jsx","useLocation","useHistory","useRedirectOldPaths","history","params","postType","path","categoryType","rest","replace","user","useLayoutAreas","isSiteEditorLoading","postId","layout","isCustom","canvas","isListLayout","key","areas","sidebar","title","backPath","content","preview","isLoading","mobile","widths","undefined","includes"],"sources":["@wordpress/edit-site/src/components/layout/router.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { useIsSiteEditorLoading } from './hooks';\nimport Editor from '../editor';\nimport PagePages from '../page-pages';\nimport PagePatterns from '../page-patterns';\nimport PageTemplates from '../page-templates';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationScreenGlobalStyles from '../sidebar-navigation-screen-global-styles';\nimport SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';\nimport SidebarNavigationScreenNavigationMenus from '../sidebar-navigation-screen-navigation-menus';\nimport SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';\nimport SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';\nimport SidebarNavigationScreenNavigationMenu from '../sidebar-navigation-screen-navigation-menu';\nimport DataViewsSidebarContent from '../sidebar-dataviews';\nimport {\n\tNAVIGATION_POST_TYPE,\n\tPATTERN_TYPES,\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_POST_TYPE,\n} from '../../utils/constants';\n\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nfunction useRedirectOldPaths() {\n\tconst history = useHistory();\n\tconst { params } = useLocation();\n\tuseEffect( () => {\n\t\tconst { postType, path, categoryType, ...rest } = params;\n\n\t\tif ( path === '/wp_template_part/all' ) {\n\t\t\thistory.replace( { postType: TEMPLATE_PART_POST_TYPE } );\n\t\t}\n\n\t\tif ( path === '/page' ) {\n\t\t\thistory.replace( {\n\t\t\t\tpostType: 'page',\n\t\t\t\t...rest,\n\t\t\t} );\n\t\t}\n\n\t\tif ( path === '/wp_template' ) {\n\t\t\thistory.replace( {\n\t\t\t\tpostType: TEMPLATE_POST_TYPE,\n\t\t\t\t...rest,\n\t\t\t} );\n\t\t}\n\n\t\tif ( path === '/patterns' ) {\n\t\t\thistory.replace( {\n\t\t\t\tpostType:\n\t\t\t\t\tcategoryType === TEMPLATE_PART_POST_TYPE\n\t\t\t\t\t\t? TEMPLATE_PART_POST_TYPE\n\t\t\t\t\t\t: PATTERN_TYPES.user,\n\t\t\t\t...rest,\n\t\t\t} );\n\t\t}\n\n\t\tif ( path === '/navigation' ) {\n\t\t\thistory.replace( {\n\t\t\t\tpostType: NAVIGATION_POST_TYPE,\n\t\t\t\t...rest,\n\t\t\t} );\n\t\t}\n\t}, [ history, params ] );\n}\n\nexport default function useLayoutAreas() {\n\tconst isSiteEditorLoading = useIsSiteEditorLoading();\n\tconst { params } = useLocation();\n\tconst { postType, postId, path, layout, isCustom, canvas } = params;\n\tuseRedirectOldPaths();\n\n\t// Page list\n\tif ( postType === 'page' ) {\n\t\tconst isListLayout = layout === 'list' || ! layout;\n\t\treturn {\n\t\t\tkey: 'pages',\n\t\t\tareas: {\n\t\t\t\tsidebar: (\n\t\t\t\t\t<SidebarNavigationScreen\n\t\t\t\t\t\ttitle={ __( 'Pages' ) }\n\t\t\t\t\t\tbackPath={ {} }\n\t\t\t\t\t\tcontent={ <DataViewsSidebarContent /> }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tcontent: <PagePages />,\n\t\t\t\tpreview: ( isListLayout || canvas === 'edit' ) && (\n\t\t\t\t\t<Editor isLoading={ isSiteEditorLoading } />\n\t\t\t\t),\n\t\t\t\tmobile:\n\t\t\t\t\tcanvas === 'edit' ? (\n\t\t\t\t\t\t<Editor isLoading={ isSiteEditorLoading } />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<PagePages />\n\t\t\t\t\t),\n\t\t\t},\n\t\t\twidths: {\n\t\t\t\tcontent: isListLayout ? 380 : undefined,\n\t\t\t},\n\t\t};\n\t}\n\n\t// Templates\n\tif ( postType === TEMPLATE_POST_TYPE ) {\n\t\tconst isListLayout = isCustom !== 'true' && layout === 'list';\n\t\treturn {\n\t\t\tkey: 'templates',\n\t\t\tareas: {\n\t\t\t\tsidebar: (\n\t\t\t\t\t<SidebarNavigationScreenTemplatesBrowse backPath={ {} } />\n\t\t\t\t),\n\t\t\t\tcontent: <PageTemplates />,\n\t\t\t\tpreview: ( isListLayout || canvas === 'edit' ) && (\n\t\t\t\t\t<Editor isLoading={ isSiteEditorLoading } />\n\t\t\t\t),\n\t\t\t\tmobile: <PageTemplates />,\n\t\t\t},\n\t\t\twidths: {\n\t\t\t\tcontent: isListLayout ? 380 : undefined,\n\t\t\t},\n\t\t};\n\t}\n\n\t// Patterns\n\tif (\n\t\t[ TEMPLATE_PART_POST_TYPE, PATTERN_TYPES.user ].includes( postType )\n\t) {\n\t\treturn {\n\t\t\tkey: 'patterns',\n\t\t\tareas: {\n\t\t\t\tsidebar: <SidebarNavigationScreenPatterns backPath={ {} } />,\n\t\t\t\tcontent: <PagePatterns />,\n\t\t\t\tmobile: <PagePatterns />,\n\t\t\t\tpreview: canvas === 'edit' && (\n\t\t\t\t\t<Editor isLoading={ isSiteEditorLoading } />\n\t\t\t\t),\n\t\t\t},\n\t\t};\n\t}\n\n\t// Styles\n\tif ( path === '/wp_global_styles' ) {\n\t\treturn {\n\t\t\tkey: 'styles',\n\t\t\tareas: {\n\t\t\t\tsidebar: (\n\t\t\t\t\t<SidebarNavigationScreenGlobalStyles backPath={ {} } />\n\t\t\t\t),\n\t\t\t\tpreview: <Editor isLoading={ isSiteEditorLoading } />,\n\t\t\t\tmobile: canvas === 'edit' && (\n\t\t\t\t\t<Editor isLoading={ isSiteEditorLoading } />\n\t\t\t\t),\n\t\t\t},\n\t\t};\n\t}\n\n\t// Navigation\n\tif ( postType === NAVIGATION_POST_TYPE ) {\n\t\tif ( postId ) {\n\t\t\treturn {\n\t\t\t\tkey: 'navigation',\n\t\t\t\tareas: {\n\t\t\t\t\tsidebar: (\n\t\t\t\t\t\t<SidebarNavigationScreenNavigationMenu\n\t\t\t\t\t\t\tbackPath={ { postType: NAVIGATION_POST_TYPE } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tpreview: <Editor isLoading={ isSiteEditorLoading } />,\n\t\t\t\t\tmobile: canvas === 'edit' && (\n\t\t\t\t\t\t<Editor isLoading={ isSiteEditorLoading } />\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tkey: 'navigation',\n\t\t\tareas: {\n\t\t\t\tsidebar: (\n\t\t\t\t\t<SidebarNavigationScreenNavigationMenus backPath={ {} } />\n\t\t\t\t),\n\t\t\t\tpreview: <Editor isLoading={ isSiteEditorLoading } />,\n\t\t\t\tmobile: canvas === 'edit' && (\n\t\t\t\t\t<Editor isLoading={ isSiteEditorLoading } />\n\t\t\t\t),\n\t\t\t},\n\t\t};\n\t}\n\n\t// Fallback shows the home page preview\n\treturn {\n\t\tkey: 'default',\n\t\tareas: {\n\t\t\tsidebar: <SidebarNavigationScreenMain />,\n\t\t\tpreview: <Editor isLoading={ isSiteEditorLoading } />,\n\t\t\tmobile: canvas === 'edit' && (\n\t\t\t\t<Editor isLoading={ isSiteEditorLoading } />\n\t\t\t),\n\t\t},\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;AACpE,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,QAAQ,oBAAoB;AAC9C;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,sBAAsB,QAAQ,SAAS;AAChD,OAAOC,MAAM,MAAM,WAAW;AAC9B,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAOC,uBAAuB,MAAM,8BAA8B;AAClE,OAAOC,mCAAmC,MAAM,4CAA4C;AAC5F,OAAOC,2BAA2B,MAAM,mCAAmC;AAC3E,OAAOC,sCAAsC,MAAM,+CAA+C;AAClG,OAAOC,sCAAsC,MAAM,+CAA+C;AAClG,OAAOC,+BAA+B,MAAM,uCAAuC;AACnF,OAAOC,qCAAqC,MAAM,8CAA8C;AAChG,OAAOC,uBAAuB,MAAM,sBAAsB;AAC1D,SACCC,oBAAoB,EACpBC,aAAa,EACbC,uBAAuB,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|
|
5
4
|
import { useEntityRecord } from '@wordpress/core-data';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
function Media({
|
|
7
7
|
id,
|
|
8
8
|
size = ['large', 'medium', 'thumbnail'],
|
|
@@ -16,7 +16,7 @@ function Media({
|
|
|
16
16
|
if (!mediaUrl) {
|
|
17
17
|
return null;
|
|
18
18
|
}
|
|
19
|
-
return
|
|
19
|
+
return /*#__PURE__*/_jsx("img", {
|
|
20
20
|
...props,
|
|
21
21
|
src: mediaUrl,
|
|
22
22
|
alt: media.alt_text
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEntityRecord","Media","id","size","props","record","media","currentSize","find","s","media_details","sizes","mediaUrl","source_url","
|
|
1
|
+
{"version":3,"names":["useEntityRecord","jsx","_jsx","Media","id","size","props","record","media","currentSize","find","s","media_details","sizes","mediaUrl","source_url","src","alt","alt_text"],"sources":["@wordpress/edit-site/src/components/media/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEntityRecord } from '@wordpress/core-data';\n\nfunction Media( { id, size = [ 'large', 'medium', 'thumbnail' ], ...props } ) {\n\tconst { record: media } = useEntityRecord( 'root', 'media', id );\n\tconst currentSize = size.find(\n\t\t( s ) => !! media?.media_details?.sizes[ s ]\n\t);\n\n\tconst mediaUrl =\n\t\tmedia?.media_details?.sizes[ currentSize ]?.source_url ||\n\t\tmedia?.source_url;\n\n\tif ( ! mediaUrl ) {\n\t\treturn null;\n\t}\n\n\treturn <img { ...props } src={ mediaUrl } alt={ media.alt_text } />;\n}\n\nexport default Media;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,sBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEvD,SAASC,KAAKA,CAAE;EAAEC,EAAE;EAAEC,IAAI,GAAG,CAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,CAAE;EAAE,GAAGC;AAAM,CAAC,EAAG;EAC7E,MAAM;IAAEC,MAAM,EAAEC;EAAM,CAAC,GAAGR,eAAe,CAAE,MAAM,EAAE,OAAO,EAAEI,EAAG,CAAC;EAChE,MAAMK,WAAW,GAAGJ,IAAI,CAACK,IAAI,CAC1BC,CAAC,IAAM,CAAC,CAAEH,KAAK,EAAEI,aAAa,EAAEC,KAAK,CAAEF,CAAC,CAC3C,CAAC;EAED,MAAMG,QAAQ,GACbN,KAAK,EAAEI,aAAa,EAAEC,KAAK,CAAEJ,WAAW,CAAE,EAAEM,UAAU,IACtDP,KAAK,EAAEO,UAAU;EAElB,IAAK,CAAED,QAAQ,EAAG;IACjB,OAAO,IAAI;EACZ;EAEA,oBAAOZ,IAAA;IAAA,GAAUI,KAAK;IAAGU,GAAG,EAAGF,QAAU;IAACG,GAAG,EAAGT,KAAK,CAACU;EAAU,CAAE,CAAC;AACpE;AAEA,eAAef,KAAK","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement, Fragment } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* WordPress dependencies
|
|
4
3
|
*/
|
|
@@ -11,7 +10,10 @@ import { privateApis as editorPrivateApis } from '@wordpress/editor';
|
|
|
11
10
|
*/
|
|
12
11
|
import SiteExport from './site-export';
|
|
13
12
|
import WelcomeGuideMenuItem from './welcome-guide-menu-item';
|
|
14
|
-
import { unlock } from '
|
|
13
|
+
import { unlock } from '../../lock-unlock';
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
17
|
const {
|
|
16
18
|
ToolsMoreMenuGroup,
|
|
17
19
|
PreferencesModal
|
|
@@ -20,6 +22,10 @@ export default function MoreMenu() {
|
|
|
20
22
|
const isBlockBasedTheme = useSelect(select => {
|
|
21
23
|
return select(coreStore).getCurrentTheme().is_block_theme;
|
|
22
24
|
}, []);
|
|
23
|
-
return
|
|
25
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
26
|
+
children: [/*#__PURE__*/_jsxs(ToolsMoreMenuGroup, {
|
|
27
|
+
children: [isBlockBasedTheme && /*#__PURE__*/_jsx(SiteExport, {}), /*#__PURE__*/_jsx(WelcomeGuideMenuItem, {})]
|
|
28
|
+
}), /*#__PURE__*/_jsx(PreferencesModal, {})]
|
|
29
|
+
});
|
|
24
30
|
}
|
|
25
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useSelect","store","coreStore","privateApis","editorPrivateApis","SiteExport","WelcomeGuideMenuItem","unlock","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","ToolsMoreMenuGroup","PreferencesModal","MoreMenu","isBlockBasedTheme","select","getCurrentTheme","is_block_theme","children"],"sources":["@wordpress/edit-site/src/components/more-menu/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport SiteExport from './site-export';\nimport WelcomeGuideMenuItem from './welcome-guide-menu-item';\nimport { unlock } from '../../lock-unlock';\n\nconst { ToolsMoreMenuGroup, PreferencesModal } = unlock( editorPrivateApis );\n\nexport default function MoreMenu() {\n\tconst isBlockBasedTheme = useSelect( ( select ) => {\n\t\treturn select( coreStore ).getCurrentTheme().is_block_theme;\n\t}, [] );\n\n\treturn (\n\t\t<>\n\t\t\t<ToolsMoreMenuGroup>\n\t\t\t\t{ isBlockBasedTheme && <SiteExport /> }\n\t\t\t\t<WelcomeGuideMenuItem />\n\t\t\t</ToolsMoreMenuGroup>\n\t\t\t<PreferencesModal />\n\t\t</>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;;AAEpE;AACA;AACA;AACA,OAAOC,UAAU,MAAM,eAAe;AACtC,OAAOC,oBAAoB,MAAM,2BAA2B;AAC5D,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAE3C,MAAM;EAAEC,kBAAkB;EAAEC;AAAiB,CAAC,GAAGR,MAAM,CAAEH,iBAAkB,CAAC;AAE5E,eAAe,SAASY,QAAQA,CAAA,EAAG;EAClC,MAAMC,iBAAiB,GAAGjB,SAAS,CAAIkB,MAAM,IAAM;IAClD,OAAOA,MAAM,CAAEhB,SAAU,CAAC,CAACiB,eAAe,CAAC,CAAC,CAACC,cAAc;EAC5D,CAAC,EAAE,EAAG,CAAC;EAEP,oBACCT,KAAA,CAAAE,SAAA;IAAAQ,QAAA,gBACCV,KAAA,CAACG,kBAAkB;MAAAO,QAAA,GAChBJ,iBAAiB,iBAAIR,IAAA,CAACJ,UAAU,IAAE,CAAC,eACrCI,IAAA,CAACH,oBAAoB,IAAE,CAAC;IAAA,CACL,CAAC,eACrBG,IAAA,CAACM,gBAAgB,IAAE,CAAC;EAAA,CACnB,CAAC;AAEL","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* WordPress dependencies
|
|
4
3
|
*/
|
|
@@ -9,6 +8,7 @@ import { download } from '@wordpress/icons';
|
|
|
9
8
|
import { useDispatch } from '@wordpress/data';
|
|
10
9
|
import { downloadBlob } from '@wordpress/blob';
|
|
11
10
|
import { store as noticesStore } from '@wordpress/notices';
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
export default function SiteExport() {
|
|
13
13
|
const {
|
|
14
14
|
createErrorNotice
|
|
@@ -38,11 +38,12 @@ export default function SiteExport() {
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
return
|
|
41
|
+
return /*#__PURE__*/_jsx(MenuItem, {
|
|
42
42
|
role: "menuitem",
|
|
43
43
|
icon: download,
|
|
44
44
|
onClick: handleExport,
|
|
45
|
-
info: __('Download your theme with updated templates and styles.')
|
|
46
|
-
|
|
45
|
+
info: __('Download your theme with updated templates and styles.'),
|
|
46
|
+
children: _x('Export', 'site exporter menu item')
|
|
47
|
+
});
|
|
47
48
|
}
|
|
48
49
|
//# sourceMappingURL=site-export.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__","_x","MenuItem","apiFetch","download","useDispatch","downloadBlob","store","noticesStore","jsx","_jsx","SiteExport","createErrorNotice","handleExport","response","path","parse","headers","Accept","blob","contentDisposition","get","contentDispositionMatches","match","fileName","errorResponse","error","json","e","errorMessage","message","code","type","role","icon","onClick","info","children"],"sources":["@wordpress/edit-site/src/components/more-menu/site-export.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\nimport apiFetch from '@wordpress/api-fetch';\nimport { download } from '@wordpress/icons';\nimport { useDispatch } from '@wordpress/data';\nimport { downloadBlob } from '@wordpress/blob';\nimport { store as noticesStore } from '@wordpress/notices';\n\nexport default function SiteExport() {\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\tasync function handleExport() {\n\t\ttry {\n\t\t\tconst response = await apiFetch( {\n\t\t\t\tpath: '/wp-block-editor/v1/export',\n\t\t\t\tparse: false,\n\t\t\t\theaders: {\n\t\t\t\t\tAccept: 'application/zip',\n\t\t\t\t},\n\t\t\t} );\n\t\t\tconst blob = await response.blob();\n\t\t\tconst contentDisposition = response.headers.get(\n\t\t\t\t'content-disposition'\n\t\t\t);\n\t\t\tconst contentDispositionMatches =\n\t\t\t\tcontentDisposition.match( /=(.+)\\.zip/ );\n\t\t\tconst fileName = contentDispositionMatches[ 1 ]\n\t\t\t\t? contentDispositionMatches[ 1 ]\n\t\t\t\t: 'edit-site-export';\n\n\t\t\tdownloadBlob( fileName + '.zip', blob, 'application/zip' );\n\t\t} catch ( errorResponse ) {\n\t\t\tlet error = {};\n\t\t\ttry {\n\t\t\t\terror = await errorResponse.json();\n\t\t\t} catch ( e ) {}\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'An error occurred while creating the site export.' );\n\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t}\n\n\treturn (\n\t\t<MenuItem\n\t\t\trole=\"menuitem\"\n\t\t\ticon={ download }\n\t\t\tonClick={ handleExport }\n\t\t\tinfo={ __(\n\t\t\t\t'Download your theme with updated templates and styles.'\n\t\t\t) }\n\t\t>\n\t\t\t{ _x( 'Export', 'site exporter menu item' ) }\n\t\t</MenuItem>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,OAAOC,QAAQ,MAAM,sBAAsB;AAC3C,SAASC,QAAQ,QAAQ,kBAAkB;AAC3C,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,KAAK,IAAIC,YAAY,QAAQ,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE3D,eAAe,SAASC,UAAUA,CAAA,EAAG;EACpC,MAAM;IAAEC;EAAkB,CAAC,GAAGP,WAAW,CAAEG,YAAa,CAAC;EAEzD,eAAeK,YAAYA,CAAA,EAAG;IAC7B,IAAI;MACH,MAAMC,QAAQ,GAAG,MAAMX,QAAQ,CAAE;QAChCY,IAAI,EAAE,4BAA4B;QAClCC,KAAK,EAAE,KAAK;QACZC,OAAO,EAAE;UACRC,MAAM,EAAE;QACT;MACD,CAAE,CAAC;MACH,MAAMC,IAAI,GAAG,MAAML,QAAQ,CAACK,IAAI,CAAC,CAAC;MAClC,MAAMC,kBAAkB,GAAGN,QAAQ,CAACG,OAAO,CAACI,GAAG,CAC9C,qBACD,CAAC;MACD,MAAMC,yBAAyB,GAC9BF,kBAAkB,CAACG,KAAK,CAAE,YAAa,CAAC;MACzC,MAAMC,QAAQ,GAAGF,yBAAyB,CAAE,CAAC,CAAE,GAC5CA,yBAAyB,CAAE,CAAC,CAAE,GAC9B,kBAAkB;MAErBhB,YAAY,CAAEkB,QAAQ,GAAG,MAAM,EAAEL,IAAI,EAAE,iBAAkB,CAAC;IAC3D,CAAC,CAAC,OAAQM,aAAa,EAAG;MACzB,IAAIC,KAAK,GAAG,CAAC,CAAC;MACd,IAAI;QACHA,KAAK,GAAG,MAAMD,aAAa,CAACE,IAAI,CAAC,CAAC;MACnC,CAAC,CAAC,OAAQC,CAAC,EAAG,CAAC;MACf,MAAMC,YAAY,GACjBH,KAAK,CAACI,OAAO,IAAIJ,KAAK,CAACK,IAAI,KAAK,eAAe,GAC5CL,KAAK,CAACI,OAAO,GACb9B,EAAE,CAAE,mDAAoD,CAAC;MAE7DY,iBAAiB,CAAEiB,YAAY,EAAE;QAAEG,IAAI,EAAE;MAAW,CAAE,CAAC;IACxD;EACD;EAEA,oBACCtB,IAAA,CAACR,QAAQ;IACR+B,IAAI,EAAC,UAAU;IACfC,IAAI,EAAG9B,QAAU;IACjB+B,OAAO,EAAGtB,YAAc;IACxBuB,IAAI,EAAGpC,EAAE,CACR,wDACD,CAAG;IAAAqC,QAAA,EAEDpC,EAAE,CAAE,QAAQ,EAAE,yBAA0B;EAAC,CAClC,CAAC;AAEb","ignoreList":[]}
|
package/build-module/components/{header-edit-mode/more-menu → more-menu}/welcome-guide-menu-item.js
RENAMED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* WordPress dependencies
|
|
4
3
|
*/
|
|
@@ -6,12 +5,14 @@ import { __ } from '@wordpress/i18n';
|
|
|
6
5
|
import { useDispatch } from '@wordpress/data';
|
|
7
6
|
import { MenuItem } from '@wordpress/components';
|
|
8
7
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
export default function WelcomeGuideMenuItem() {
|
|
10
10
|
const {
|
|
11
11
|
toggle
|
|
12
12
|
} = useDispatch(preferencesStore);
|
|
13
|
-
return
|
|
14
|
-
onClick: () => toggle('core/edit-site', 'welcomeGuide')
|
|
15
|
-
|
|
13
|
+
return /*#__PURE__*/_jsx(MenuItem, {
|
|
14
|
+
onClick: () => toggle('core/edit-site', 'welcomeGuide'),
|
|
15
|
+
children: __('Welcome Guide')
|
|
16
|
+
});
|
|
16
17
|
}
|
|
17
18
|
//# sourceMappingURL=welcome-guide-menu-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__","useDispatch","MenuItem","store","preferencesStore","jsx","_jsx","WelcomeGuideMenuItem","toggle","onClick","children"],"sources":["@wordpress/edit-site/src/components/more-menu/welcome-guide-menu-item.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { MenuItem } from '@wordpress/components';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\nexport default function WelcomeGuideMenuItem() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\treturn (\n\t\t<MenuItem onClick={ () => toggle( 'core/edit-site', 'welcomeGuide' ) }>\n\t\t\t{ __( 'Welcome Guide' ) }\n\t\t</MenuItem>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,wBAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnE,eAAe,SAASC,oBAAoBA,CAAA,EAAG;EAC9C,MAAM;IAAEC;EAAO,CAAC,GAAGP,WAAW,CAAEG,gBAAiB,CAAC;EAElD,oBACCE,IAAA,CAACJ,QAAQ;IAACO,OAAO,EAAGA,CAAA,KAAMD,MAAM,CAAE,gBAAgB,EAAE,cAAe,CAAG;IAAAE,QAAA,EACnEV,EAAE,CAAE,eAAgB;EAAC,CACd,CAAC;AAEb","ignoreList":[]}
|
|
@@ -1,34 +1,40 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* WordPress dependencies
|
|
4
3
|
*/
|
|
5
|
-
import { __experimentalHeading as Heading, __experimentalText as Text, __experimentalHStack as HStack,
|
|
4
|
+
import { __experimentalHeading as Heading, __experimentalText as Text, __experimentalHStack as HStack, __experimentalVStack as VStack, FlexItem } from '@wordpress/components';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* Internal dependencies
|
|
9
8
|
*/
|
|
10
|
-
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
11
|
export default function Header({
|
|
12
12
|
title,
|
|
13
13
|
subTitle,
|
|
14
14
|
actions
|
|
15
15
|
}) {
|
|
16
|
-
return
|
|
16
|
+
return /*#__PURE__*/_jsxs(VStack, {
|
|
17
|
+
className: "edit-site-page-header",
|
|
17
18
|
as: "header",
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
spacing: 0,
|
|
20
|
+
children: [/*#__PURE__*/_jsxs(HStack, {
|
|
21
|
+
className: "edit-site-page-header__page-title",
|
|
22
|
+
children: [/*#__PURE__*/_jsx(Heading, {
|
|
23
|
+
as: "h2",
|
|
24
|
+
level: 3,
|
|
25
|
+
weight: 500,
|
|
26
|
+
className: "edit-site-page-header__title",
|
|
27
|
+
children: title
|
|
28
|
+
}), /*#__PURE__*/_jsx(FlexItem, {
|
|
29
|
+
className: "edit-site-page-header__actions",
|
|
30
|
+
children: actions
|
|
31
|
+
})]
|
|
32
|
+
}), subTitle && /*#__PURE__*/_jsx(Text, {
|
|
33
|
+
variant: "muted",
|
|
34
|
+
as: "p",
|
|
35
|
+
className: "edit-site-page-header__sub-title",
|
|
36
|
+
children: subTitle
|
|
37
|
+
})]
|
|
38
|
+
});
|
|
33
39
|
}
|
|
34
40
|
//# sourceMappingURL=header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__experimentalHeading","Heading","__experimentalText","Text","__experimentalHStack","HStack","
|
|
1
|
+
{"version":3,"names":["__experimentalHeading","Heading","__experimentalText","Text","__experimentalHStack","HStack","__experimentalVStack","VStack","FlexItem","jsx","_jsx","jsxs","_jsxs","Header","title","subTitle","actions","className","as","spacing","children","level","weight","variant"],"sources":["@wordpress/edit-site/src/components/page/header.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHeading as Heading,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tFlexItem,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\n\nexport default function Header( { title, subTitle, actions } ) {\n\treturn (\n\t\t<VStack className=\"edit-site-page-header\" as=\"header\" spacing={ 0 }>\n\t\t\t<HStack className=\"edit-site-page-header__page-title\">\n\t\t\t\t<Heading\n\t\t\t\t\tas=\"h2\"\n\t\t\t\t\tlevel={ 3 }\n\t\t\t\t\tweight={ 500 }\n\t\t\t\t\tclassName=\"edit-site-page-header__title\"\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</Heading>\n\t\t\t\t<FlexItem className=\"edit-site-page-header__actions\">\n\t\t\t\t\t{ actions }\n\t\t\t\t</FlexItem>\n\t\t\t</HStack>\n\t\t\t{ subTitle && (\n\t\t\t\t<Text\n\t\t\t\t\tvariant=\"muted\"\n\t\t\t\t\tas=\"p\"\n\t\t\t\t\tclassName=\"edit-site-page-header__sub-title\"\n\t\t\t\t>\n\t\t\t\t\t{ subTitle }\n\t\t\t\t</Text>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,qBAAqB,IAAIC,OAAO,EAChCC,kBAAkB,IAAIC,IAAI,EAC1BC,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,QAAQ,QACF,uBAAuB;;AAE9B;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAIA,eAAe,SAASC,MAAMA,CAAE;EAAEC,KAAK;EAAEC,QAAQ;EAAEC;AAAQ,CAAC,EAAG;EAC9D,oBACCJ,KAAA,CAACL,MAAM;IAACU,SAAS,EAAC,uBAAuB;IAACC,EAAE,EAAC,QAAQ;IAACC,OAAO,EAAG,CAAG;IAAAC,QAAA,gBAClER,KAAA,CAACP,MAAM;MAACY,SAAS,EAAC,mCAAmC;MAAAG,QAAA,gBACpDV,IAAA,CAACT,OAAO;QACPiB,EAAE,EAAC,IAAI;QACPG,KAAK,EAAG,CAAG;QACXC,MAAM,EAAG,GAAK;QACdL,SAAS,EAAC,8BAA8B;QAAAG,QAAA,EAEtCN;MAAK,CACC,CAAC,eACVJ,IAAA,CAACF,QAAQ;QAACS,SAAS,EAAC,gCAAgC;QAAAG,QAAA,EACjDJ;MAAO,CACA,CAAC;IAAA,CACJ,CAAC,EACPD,QAAQ,iBACTL,IAAA,CAACP,IAAI;MACJoB,OAAO,EAAC,OAAO;MACfL,EAAE,EAAC,GAAG;MACND,SAAS,EAAC,kCAAkC;MAAAG,QAAA,EAE1CL;IAAQ,CACL,CACN;EAAA,CACM,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* External dependencies
|
|
4
3
|
*/
|
|
@@ -7,13 +6,15 @@ import clsx from 'clsx';
|
|
|
7
6
|
/**
|
|
8
7
|
* WordPress dependencies
|
|
9
8
|
*/
|
|
10
|
-
import {
|
|
9
|
+
import { privateApis as editorPrivateApis } from '@wordpress/editor';
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* Internal dependencies
|
|
14
13
|
*/
|
|
15
14
|
import Header from './header';
|
|
16
15
|
import { unlock } from '../../lock-unlock';
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
18
|
const {
|
|
18
19
|
NavigableRegion
|
|
19
20
|
} = unlock(editorPrivateApis);
|
|
@@ -26,15 +27,17 @@ export default function Page({
|
|
|
26
27
|
hideTitleFromUI = false
|
|
27
28
|
}) {
|
|
28
29
|
const classes = clsx('edit-site-page', className);
|
|
29
|
-
return
|
|
30
|
+
return /*#__PURE__*/_jsx(NavigableRegion, {
|
|
30
31
|
className: classes,
|
|
31
|
-
ariaLabel: title
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
ariaLabel: title,
|
|
33
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
34
|
+
className: "edit-site-page-content",
|
|
35
|
+
children: [!hideTitleFromUI && title && /*#__PURE__*/_jsx(Header, {
|
|
36
|
+
title: title,
|
|
37
|
+
subTitle: subTitle,
|
|
38
|
+
actions: actions
|
|
39
|
+
}), children]
|
|
40
|
+
})
|
|
41
|
+
});
|
|
39
42
|
}
|
|
40
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["clsx","
|
|
1
|
+
{"version":3,"names":["clsx","privateApis","editorPrivateApis","Header","unlock","jsx","_jsx","jsxs","_jsxs","NavigableRegion","Page","title","subTitle","actions","children","className","hideTitleFromUI","classes","ariaLabel"],"sources":["@wordpress/edit-site/src/components/page/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport Header from './header';\nimport { unlock } from '../../lock-unlock';\n\nconst { NavigableRegion } = unlock( editorPrivateApis );\n\nexport default function Page( {\n\ttitle,\n\tsubTitle,\n\tactions,\n\tchildren,\n\tclassName,\n\thideTitleFromUI = false,\n} ) {\n\tconst classes = clsx( 'edit-site-page', className );\n\n\treturn (\n\t\t<NavigableRegion className={ classes } ariaLabel={ title }>\n\t\t\t<div className=\"edit-site-page-content\">\n\t\t\t\t{ ! hideTitleFromUI && title && (\n\t\t\t\t\t<Header\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\tsubTitle={ subTitle }\n\t\t\t\t\t\tactions={ actions }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</NavigableRegion>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,WAAW,IAAIC,iBAAiB,QAAQ,mBAAmB;;AAEpE;AACA;AACA;AACA,OAAOC,MAAM,MAAM,UAAU;AAC7B,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE3C,MAAM;EAAEC;AAAgB,CAAC,GAAGL,MAAM,CAAEF,iBAAkB,CAAC;AAEvD,eAAe,SAASQ,IAAIA,CAAE;EAC7BC,KAAK;EACLC,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRC,SAAS;EACTC,eAAe,GAAG;AACnB,CAAC,EAAG;EACH,MAAMC,OAAO,GAAGjB,IAAI,CAAE,gBAAgB,EAAEe,SAAU,CAAC;EAEnD,oBACCT,IAAA,CAACG,eAAe;IAACM,SAAS,EAAGE,OAAS;IAACC,SAAS,EAAGP,KAAO;IAAAG,QAAA,eACzDN,KAAA;MAAKO,SAAS,EAAC,wBAAwB;MAAAD,QAAA,GACpC,CAAEE,eAAe,IAAIL,KAAK,iBAC3BL,IAAA,CAACH,MAAM;QACNQ,KAAK,EAAGA,KAAO;QACfC,QAAQ,EAAGA,QAAU;QACrBC,OAAO,EAAGA;MAAS,CACnB,CACD,EACCC,QAAQ;IAAA,CACN;EAAC,CACU,CAAC;AAEpB","ignoreList":[]}
|