@wordpress/edit-site 5.32.0 → 5.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/components/add-new-page/index.js.map +1 -1
- package/build/components/add-new-pattern/index.js.map +1 -1
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
- package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build/components/add-new-template/index.js +282 -13
- package/build/components/add-new-template/index.js.map +1 -1
- package/build/components/add-new-template/utils.js +22 -11
- package/build/components/add-new-template/utils.js.map +1 -1
- package/build/components/app/index.js.map +1 -1
- package/build/components/async/index.js +51 -0
- package/build/components/async/index.js.map +1 -0
- package/build/components/block-editor/block-inspector-button.js +10 -9
- package/build/components/block-editor/block-inspector-button.js.map +1 -1
- package/build/components/block-editor/editor-canvas.js +15 -6
- package/build/components/block-editor/editor-canvas.js.map +1 -1
- package/build/components/block-editor/inserter-media-categories.js.map +1 -1
- package/build/components/block-editor/resizable-editor.js.map +1 -1
- package/build/components/block-editor/resize-handle.js.map +1 -1
- package/build/components/block-editor/site-editor-canvas.js +5 -1
- package/build/components/block-editor/site-editor-canvas.js.map +1 -1
- package/build/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
- package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build/components/canvas-loader/index.js.map +1 -1
- package/build/components/code-editor/index.js.map +1 -1
- package/build/components/create-template-part-modal/index.js.map +1 -1
- package/build/components/editor/index.js +35 -8
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor-canvas-container/index.js.map +1 -1
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/error-boundary/warning.js.map +1 -1
- package/build/components/global-styles/background-panel.js +13 -1
- package/build/components/global-styles/background-panel.js.map +1 -1
- package/build/components/global-styles/block-preview-panel.js +6 -1
- package/build/components/global-styles/block-preview-panel.js.map +1 -1
- package/build/components/global-styles/color-indicator-wrapper.js.map +1 -1
- package/build/components/global-styles/color-palette-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/font-families.js +1 -1
- package/build/components/global-styles/font-families.js.map +1 -1
- package/build/components/global-styles/font-family-item.js.map +1 -1
- 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 +60 -32
- package/build/components/global-styles/font-library-modal/context.js.map +1 -1
- 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 +11 -4
- 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.map +1 -1
- 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 +1 -1
- package/build/components/global-styles/font-library-modal/index.js.map +1 -1
- package/build/components/global-styles/font-library-modal/installed-fonts.js +10 -9
- 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.map +1 -1
- package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
- package/build/components/global-styles/font-library-modal/resolvers.js.map +1 -1
- package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/constants.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
- package/build/components/global-styles/global-styles-provider.js.map +1 -1
- package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build/components/global-styles/header.js.map +1 -1
- package/build/components/global-styles/highlighted-colors.js +1 -1
- package/build/components/global-styles/highlighted-colors.js.map +1 -1
- package/build/components/global-styles/hooks.js +11 -3
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/icon-with-current-color.js.map +1 -1
- package/build/components/global-styles/index.js.map +1 -1
- package/build/components/global-styles/navigation-button.js.map +1 -1
- package/build/components/global-styles/palette.js.map +1 -1
- package/build/components/global-styles/preview-colors.js.map +1 -1
- package/build/components/global-styles/preview-iframe.js.map +1 -1
- package/build/components/global-styles/preview-styles.js.map +1 -1
- package/build/components/global-styles/root-menu.js +2 -2
- package/build/components/global-styles/root-menu.js.map +1 -1
- package/build/components/global-styles/screen-background.js +1 -1
- package/build/components/global-styles/screen-background.js.map +1 -1
- package/build/components/global-styles/screen-block-list.js.map +1 -1
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-color-palette.js.map +1 -1
- package/build/components/global-styles/screen-colors.js.map +1 -1
- package/build/components/global-styles/screen-css.js.map +1 -1
- package/build/components/global-styles/screen-layout.js.map +1 -1
- package/build/components/global-styles/screen-revisions/index.js +1 -1
- package/build/components/global-styles/screen-revisions/index.js.map +1 -1
- 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.map +1 -1
- package/build/components/global-styles/screen-root.js.map +1 -1
- package/build/components/global-styles/screen-style-variations.js.map +1 -1
- package/build/components/global-styles/screen-typography-element.js.map +1 -1
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/style-variations-container.js.map +1 -1
- package/build/components/global-styles/subtitle.js.map +1 -1
- package/build/components/global-styles/typography-elements.js.map +1 -1
- package/build/components/global-styles/typography-example.js.map +1 -1
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/typography-preview.js.map +1 -1
- package/build/components/global-styles/ui.js +1 -1
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/global-styles/variations/variation.js.map +1 -1
- package/build/components/global-styles/variations/variations-color.js.map +1 -1
- package/build/components/global-styles/variations/variations-panel.js.map +1 -1
- package/build/components/global-styles/variations/variations-typography.js.map +1 -1
- package/build/components/global-styles-renderer/index.js.map +1 -1
- package/build/components/header-edit-mode/document-tools/index.js.map +1 -1
- package/build/components/header-edit-mode/index.js +4 -4
- package/build/components/header-edit-mode/index.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/index.js +10 -12
- package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/site-export.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
- package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/edit-mode.js +0 -23
- package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -1
- package/build/components/keyboard-shortcuts/global.js.map +1 -1
- package/build/components/keyboard-shortcuts/register.js +0 -18
- package/build/components/keyboard-shortcuts/register.js.map +1 -1
- package/build/components/layout/animation.js +3 -2
- package/build/components/layout/animation.js.map +1 -1
- package/build/components/layout/hooks.js.map +1 -1
- package/build/components/layout/index.js +13 -48
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/router.js +73 -7
- package/build/components/layout/router.js.map +1 -1
- package/build/components/media/index.js.map +1 -1
- package/build/components/page/header.js.map +1 -1
- package/build/components/page/index.js +5 -2
- package/build/components/page/index.js.map +1 -1
- package/build/components/page-pages/index.js +15 -17
- package/build/components/page-pages/index.js.map +1 -1
- package/build/components/page-patterns/dataviews-pattern-actions.js +5 -4
- package/build/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
- package/build/components/page-patterns/delete-category-menu-item.js.map +1 -1
- package/build/components/page-patterns/header.js +2 -2
- package/build/components/page-patterns/header.js.map +1 -1
- package/build/components/page-patterns/index.js +124 -17
- package/build/components/page-patterns/index.js.map +1 -1
- package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
- package/build/components/page-patterns/search-items.js +2 -1
- package/build/components/page-patterns/search-items.js.map +1 -1
- package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +5 -10
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/page-patterns/utils.js.map +1 -1
- package/build/components/page-templates-template-parts/add-new-template-part.js +2 -1
- package/build/components/page-templates-template-parts/add-new-template-part.js.map +1 -1
- package/build/components/page-templates-template-parts/hooks.js.map +1 -1
- package/build/components/page-templates-template-parts/index.js +13 -25
- package/build/components/page-templates-template-parts/index.js.map +1 -1
- package/build/components/pagination/index.js.map +1 -1
- package/build/components/pattern-modal/duplicate.js +6 -3
- package/build/components/pattern-modal/duplicate.js.map +1 -1
- package/build/components/pattern-modal/index.js.map +1 -1
- package/build/components/pattern-modal/rename.js +6 -3
- package/build/components/pattern-modal/rename.js.map +1 -1
- package/build/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +18 -16
- package/build/components/rename-post-menu-item/index.js.map +1 -0
- package/build/components/resizable-frame/index.js +1 -5
- package/build/components/resizable-frame/index.js.map +1 -1
- package/build/components/revisions/index.js.map +1 -1
- package/build/components/routes/link.js.map +1 -1
- package/build/components/routes/use-title.js.map +1 -1
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/save-hub/index.js.map +1 -1
- package/build/components/save-panel/index.js +3 -3
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/sidebar/index.js +41 -75
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-button/index.js.map +1 -1
- package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
- package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
- package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build/components/sidebar-dataviews/default-views.js +1 -1
- package/build/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build/components/sidebar-dataviews/index.js +1 -1
- package/build/components/sidebar-dataviews/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/default-sidebar.js +18 -7
- package/build/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js +5 -3
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build/components/sidebar-edit-mode/index.js +29 -54
- package/build/components/sidebar-edit-mode/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/index.js +23 -2
- package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-summary.js +2 -2
- package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
- package/build/components/sidebar-edit-mode/settings-header/index.js +4 -5
- package/build/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/index.js +1 -1
- package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
- package/build/components/sidebar-navigation-item/index.js +31 -0
- package/build/components/sidebar-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +36 -9
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-details-footer/index.js.map +1 -1
- 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.map +1 -1
- 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.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.js +1 -2
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/index.js +6 -15
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js +7 -2
- package/build/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
- 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.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +20 -15
- package/build/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
- 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 +6 -5
- 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.map +1 -1
- package/build/components/sidebar-navigation-screen-page/index.js +22 -12
- package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/index.js +14 -5
- package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/index.js +33 -27
- package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
- package/build/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
- package/build/components/sidebar-navigation-screen-template/index.js +10 -7
- package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-template/template-areas.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/index.js +6 -8
- package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build/components/site-hub/index.js +22 -21
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/site-icon/index.js.map +1 -1
- package/build/components/start-template-options/index.js.map +1 -1
- package/build/components/style-book/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +14 -5
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
- package/build/components/table/index.js.map +1 -1
- package/build/components/template-actions/index.js +7 -8
- package/build/components/template-actions/index.js.map +1 -1
- package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
- package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build/components/template-part-converter/index.js.map +1 -1
- package/build/components/use-edited-entity-record/index.js.map +1 -1
- package/build/components/welcome-guide/editor.js.map +1 -1
- package/build/components/welcome-guide/image.js.map +1 -1
- package/build/components/welcome-guide/index.js.map +1 -1
- package/build/components/welcome-guide/page.js.map +1 -1
- package/build/components/welcome-guide/styles.js +6 -3
- package/build/components/welcome-guide/styles.js.map +1 -1
- package/build/components/welcome-guide/template.js.map +1 -1
- package/build/hooks/commands/use-common-commands.js.map +1 -1
- package/build/hooks/commands/use-edit-mode-commands.js +10 -28
- package/build/hooks/commands/use-edit-mode-commands.js.map +1 -1
- package/build/hooks/components.js.map +1 -1
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/push-changes-to-global-styles/index.js +3 -40
- 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 +1 -1
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build/index.js +3 -8
- package/build/index.js.map +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/store/actions.js +21 -96
- package/build/store/actions.js.map +1 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/index.js +1 -1
- package/build/store/index.js.map +1 -1
- package/build/store/private-actions.js +1 -85
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js.map +1 -1
- package/build/utils/clone-deep.js.map +1 -1
- package/build/utils/constants.js +2 -1
- package/build/utils/constants.js.map +1 -1
- package/build/utils/get-is-list-page.js.map +1 -1
- package/build/utils/is-previewing-theme.js.map +1 -1
- package/build/utils/is-template-removable.js.map +1 -1
- package/build/utils/is-template-revertable.js.map +1 -1
- package/build/utils/math.js.map +1 -1
- package/build/utils/set-nested-value.js +44 -0
- package/build/utils/set-nested-value.js.map +1 -0
- package/build/utils/template-part-create.js.map +1 -1
- package/build/utils/use-activate-theme.js.map +1 -1
- package/build/utils/use-actual-current-theme.js.map +1 -1
- package/build-module/components/add-new-page/index.js.map +1 -1
- 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.map +1 -1
- 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 +283 -14
- package/build-module/components/add-new-template/index.js.map +1 -1
- package/build-module/components/add-new-template/utils.js +21 -11
- package/build-module/components/add-new-template/utils.js.map +1 -1
- package/build-module/components/app/index.js.map +1 -1
- package/build-module/components/async/index.js +44 -0
- package/build-module/components/async/index.js.map +1 -0
- package/build-module/components/block-editor/block-inspector-button.js +9 -8
- package/build-module/components/block-editor/block-inspector-button.js.map +1 -1
- package/build-module/components/block-editor/editor-canvas.js +16 -7
- package/build-module/components/block-editor/editor-canvas.js.map +1 -1
- package/build-module/components/block-editor/inserter-media-categories.js.map +1 -1
- package/build-module/components/block-editor/resizable-editor.js.map +1 -1
- package/build-module/components/block-editor/resize-handle.js.map +1 -1
- package/build-module/components/block-editor/site-editor-canvas.js +5 -1
- package/build-module/components/block-editor/site-editor-canvas.js.map +1 -1
- package/build-module/components/block-editor/use-navigate-to-entity-record.js.map +1 -1
- package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build-module/components/canvas-loader/index.js.map +1 -1
- package/build-module/components/code-editor/index.js.map +1 -1
- package/build-module/components/create-template-part-modal/index.js.map +1 -1
- package/build-module/components/editor/index.js +35 -8
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor-canvas-container/index.js.map +1 -1
- package/build-module/components/error-boundary/index.js.map +1 -1
- package/build-module/components/error-boundary/warning.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +14 -1
- package/build-module/components/global-styles/background-panel.js.map +1 -1
- package/build-module/components/global-styles/block-preview-panel.js +6 -1
- package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
- package/build-module/components/global-styles/color-indicator-wrapper.js.map +1 -1
- package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/font-families.js.map +1 -1
- 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.map +1 -1
- package/build-module/components/global-styles/font-library-modal/context.js +59 -32
- 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.map +1 -1
- package/build-module/components/global-styles/font-library-modal/font-collection.js +12 -5
- 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.map +1 -1
- 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 +2 -2
- 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 +11 -10
- 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.map +1 -1
- 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/resolvers.js.map +1 -1
- 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/constants.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/filter-fonts.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/fonts-outline.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/preview-styles.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
- package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
- package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/header.js.map +1 -1
- package/build-module/components/global-styles/highlighted-colors.js +1 -1
- package/build-module/components/global-styles/highlighted-colors.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +11 -3
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/icon-with-current-color.js.map +1 -1
- package/build-module/components/global-styles/index.js.map +1 -1
- package/build-module/components/global-styles/navigation-button.js.map +1 -1
- package/build-module/components/global-styles/palette.js.map +1 -1
- package/build-module/components/global-styles/preview-colors.js.map +1 -1
- package/build-module/components/global-styles/preview-iframe.js.map +1 -1
- package/build-module/components/global-styles/preview-styles.js.map +1 -1
- package/build-module/components/global-styles/root-menu.js +2 -2
- package/build-module/components/global-styles/root-menu.js.map +1 -1
- package/build-module/components/global-styles/screen-background.js +1 -1
- package/build-module/components/global-styles/screen-background.js.map +1 -1
- package/build-module/components/global-styles/screen-block-list.js.map +1 -1
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
- package/build-module/components/global-styles/screen-colors.js.map +1 -1
- package/build-module/components/global-styles/screen-css.js.map +1 -1
- package/build-module/components/global-styles/screen-layout.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/index.js +1 -1
- package/build-module/components/global-styles/screen-revisions/index.js.map +1 -1
- 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.map +1 -1
- package/build-module/components/global-styles/screen-root.js.map +1 -1
- package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
- package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/style-variations-container.js.map +1 -1
- package/build-module/components/global-styles/subtitle.js.map +1 -1
- package/build-module/components/global-styles/typography-elements.js.map +1 -1
- package/build-module/components/global-styles/typography-example.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-preview.js.map +1 -1
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/global-styles/variations/variation.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
- package/build-module/components/global-styles-renderer/index.js.map +1 -1
- package/build-module/components/header-edit-mode/document-tools/index.js.map +1 -1
- package/build-module/components/header-edit-mode/index.js +3 -3
- package/build-module/components/header-edit-mode/index.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/index.js +8 -8
- package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/site-export.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/welcome-guide-menu-item.js.map +1 -1
- package/build-module/components/header-edit-mode/tools-more-menu-group/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/edit-mode.js +0 -23
- package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/global.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/register.js +0 -18
- package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
- package/build-module/components/layout/animation.js +4 -3
- package/build-module/components/layout/animation.js.map +1 -1
- package/build-module/components/layout/hooks.js.map +1 -1
- package/build-module/components/layout/index.js +13 -48
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/router.js +73 -7
- package/build-module/components/layout/router.js.map +1 -1
- package/build-module/components/media/index.js.map +1 -1
- package/build-module/components/page/header.js.map +1 -1
- package/build-module/components/page/index.js +5 -2
- package/build-module/components/page/index.js.map +1 -1
- package/build-module/components/page-pages/index.js +14 -16
- package/build-module/components/page-pages/index.js.map +1 -1
- package/build-module/components/page-patterns/dataviews-pattern-actions.js +5 -4
- package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
- package/build-module/components/page-patterns/delete-category-menu-item.js.map +1 -1
- package/build-module/components/page-patterns/header.js +2 -2
- package/build-module/components/page-patterns/header.js.map +1 -1
- package/build-module/components/page-patterns/index.js +126 -19
- package/build-module/components/page-patterns/index.js.map +1 -1
- package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
- package/build-module/components/page-patterns/search-items.js +3 -2
- package/build-module/components/page-patterns/search-items.js.map +1 -1
- package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +2 -6
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/page-patterns/utils.js.map +1 -1
- package/build-module/components/page-templates-template-parts/add-new-template-part.js +3 -2
- package/build-module/components/page-templates-template-parts/add-new-template-part.js.map +1 -1
- package/build-module/components/page-templates-template-parts/hooks.js.map +1 -1
- package/build-module/components/page-templates-template-parts/index.js +13 -25
- package/build-module/components/page-templates-template-parts/index.js.map +1 -1
- package/build-module/components/pagination/index.js.map +1 -1
- package/build-module/components/pattern-modal/duplicate.js +4 -1
- package/build-module/components/pattern-modal/duplicate.js.map +1 -1
- package/build-module/components/pattern-modal/index.js.map +1 -1
- package/build-module/components/pattern-modal/rename.js +4 -1
- package/build-module/components/pattern-modal/rename.js.map +1 -1
- package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build-module/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +17 -15
- package/build-module/components/rename-post-menu-item/index.js.map +1 -0
- package/build-module/components/resizable-frame/index.js +1 -5
- package/build-module/components/resizable-frame/index.js.map +1 -1
- package/build-module/components/revisions/index.js.map +1 -1
- package/build-module/components/routes/link.js.map +1 -1
- package/build-module/components/routes/use-title.js.map +1 -1
- package/build-module/components/save-button/index.js.map +1 -1
- package/build-module/components/save-hub/index.js.map +1 -1
- package/build-module/components/save-panel/index.js +2 -2
- package/build-module/components/save-panel/index.js.map +1 -1
- package/build-module/components/sidebar/index.js +42 -75
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-button/index.js.map +1 -1
- package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
- package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
- package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build-module/components/sidebar-dataviews/default-views.js +1 -1
- package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build-module/components/sidebar-dataviews/index.js +1 -1
- package/build-module/components/sidebar-dataviews/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/default-sidebar.js +16 -5
- package/build-module/components/sidebar-edit-mode/default-sidebar.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +5 -3
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/index.js +28 -53
- package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/index.js +23 -2
- package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-content.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +4 -4
- package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/settings-header/index.js +4 -5
- package/build-module/components/sidebar-edit-mode/settings-header/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/hooks.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/index.js +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-item/index.js +31 -0
- package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +37 -10
- package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
- 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.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +2 -3
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +7 -16
- 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 +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js +8 -3
- package/build-module/components/sidebar-navigation-screen-navigation-menu/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/more-menu.js.map +1 -1
- 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.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +20 -15
- package/build-module/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/constants.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
- 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 +6 -5
- 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.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/index.js +24 -14
- package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/page-details.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/status-label.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/index.js +14 -5
- package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list-item.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu-list.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menu.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-content.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-navigation-menu-title.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.js +34 -28
- package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-template-part-areas.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-template/home-template-details.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-template/index.js +12 -8
- package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-template/template-areas.js.map +1 -1
- 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 +6 -8
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build-module/components/site-hub/index.js +22 -21
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/site-icon/index.js.map +1 -1
- package/build-module/components/start-template-options/index.js.map +1 -1
- 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 +14 -5
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
- package/build-module/components/table/index.js.map +1 -1
- package/build-module/components/template-actions/index.js +7 -8
- package/build-module/components/template-actions/index.js.map +1 -1
- 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.map +1 -1
- package/build-module/components/template-part-converter/index.js.map +1 -1
- package/build-module/components/use-edited-entity-record/index.js.map +1 -1
- package/build-module/components/welcome-guide/editor.js.map +1 -1
- package/build-module/components/welcome-guide/image.js.map +1 -1
- package/build-module/components/welcome-guide/index.js.map +1 -1
- package/build-module/components/welcome-guide/page.js.map +1 -1
- package/build-module/components/welcome-guide/styles.js +6 -3
- package/build-module/components/welcome-guide/styles.js.map +1 -1
- package/build-module/components/welcome-guide/template.js.map +1 -1
- package/build-module/hooks/commands/use-common-commands.js.map +1 -1
- package/build-module/hooks/commands/use-edit-mode-commands.js +11 -29
- package/build-module/hooks/commands/use-edit-mode-commands.js.map +1 -1
- package/build-module/hooks/components.js.map +1 -1
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/push-changes-to-global-styles/index.js +1 -38
- 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 +1 -1
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build-module/index.js +4 -6
- package/build-module/index.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/store/actions.js +16 -92
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/index.js.map +1 -1
- package/build-module/store/private-actions.js +0 -83
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/clone-deep.js.map +1 -1
- package/build-module/utils/constants.js +1 -0
- package/build-module/utils/constants.js.map +1 -1
- package/build-module/utils/get-is-list-page.js.map +1 -1
- package/build-module/utils/is-previewing-theme.js.map +1 -1
- package/build-module/utils/is-template-removable.js.map +1 -1
- package/build-module/utils/is-template-revertable.js.map +1 -1
- package/build-module/utils/math.js.map +1 -1
- package/build-module/utils/set-nested-value.js +38 -0
- package/build-module/utils/set-nested-value.js.map +1 -0
- package/build-module/utils/template-part-create.js.map +1 -1
- package/build-module/utils/use-activate-theme.js.map +1 -1
- package/build-module/utils/use-actual-current-theme.js.map +1 -1
- package/build-style/style-rtl.css +172 -585
- package/build-style/style.css +172 -585
- package/package.json +43 -44
- package/src/components/add-new-template/index.js +412 -12
- package/src/components/add-new-template/style.scss +0 -22
- package/src/components/add-new-template/utils.js +44 -24
- package/src/components/async/index.js +43 -0
- package/src/components/block-editor/block-inspector-button.js +9 -11
- package/src/components/block-editor/editor-canvas.js +45 -21
- package/src/components/block-editor/site-editor-canvas.js +6 -1
- package/src/components/editor/index.js +50 -13
- package/src/components/global-styles/background-panel.js +16 -0
- package/src/components/global-styles/block-preview-panel.js +6 -1
- package/src/components/global-styles/font-library-modal/context.js +76 -51
- package/src/components/global-styles/font-library-modal/font-collection.js +247 -223
- package/src/components/global-styles/font-library-modal/index.js +2 -2
- package/src/components/global-styles/font-library-modal/installed-fonts.js +156 -147
- package/src/components/global-styles/font-library-modal/style.scss +31 -13
- package/src/components/global-styles/highlighted-colors.js +1 -1
- package/src/components/global-styles/hooks.js +20 -3
- package/src/components/global-styles/root-menu.js +2 -2
- package/src/components/global-styles/screen-background.js +1 -1
- package/src/components/global-styles/screen-revisions/index.js +1 -1
- package/src/components/header-edit-mode/index.js +3 -5
- package/src/components/header-edit-mode/more-menu/index.js +6 -17
- package/src/components/header-edit-mode/style.scss +1 -1
- package/src/components/keyboard-shortcuts/edit-mode.js +0 -29
- package/src/components/keyboard-shortcuts/register.js +0 -20
- package/src/components/layout/animation.js +6 -3
- package/src/components/layout/index.js +12 -50
- package/src/components/layout/router.js +75 -12
- package/src/components/layout/style.scss +15 -37
- package/src/components/page/index.js +7 -2
- package/src/components/page-pages/index.js +33 -23
- package/src/components/page-pages/style.scss +29 -22
- package/src/components/page-patterns/dataviews-pattern-actions.js +5 -6
- package/src/components/page-patterns/header.js +4 -2
- package/src/components/page-patterns/index.js +168 -56
- package/src/components/page-patterns/search-items.js +3 -0
- package/src/components/page-patterns/style.scss +7 -6
- package/src/components/page-patterns/use-patterns.js +2 -6
- package/src/components/page-templates-template-parts/add-new-template-part.js +4 -2
- package/src/components/page-templates-template-parts/index.js +24 -39
- package/src/components/pattern-modal/duplicate.js +2 -1
- package/src/components/pattern-modal/rename.js +2 -1
- package/src/components/{template-actions/rename-menu-item.js → rename-post-menu-item/index.js} +20 -24
- package/src/components/resizable-frame/index.js +2 -6
- package/src/components/save-panel/index.js +2 -2
- package/src/components/sidebar/index.js +52 -100
- package/src/components/sidebar/style.scss +41 -6
- package/src/components/sidebar-dataviews/default-views.js +1 -1
- package/src/components/sidebar-dataviews/index.js +1 -1
- package/src/components/sidebar-edit-mode/default-sidebar.js +13 -6
- package/src/components/sidebar-edit-mode/global-styles-sidebar.js +7 -3
- package/src/components/sidebar-edit-mode/index.js +39 -75
- package/src/components/sidebar-edit-mode/page-panels/index.js +25 -2
- package/src/components/sidebar-edit-mode/page-panels/page-summary.js +20 -12
- package/src/components/sidebar-edit-mode/page-panels/style.scss +0 -6
- package/src/components/sidebar-edit-mode/settings-header/index.js +4 -5
- package/src/components/sidebar-edit-mode/style.scss +1 -1
- package/src/components/sidebar-edit-mode/template-panel/index.js +1 -1
- package/src/components/sidebar-navigation-item/index.js +29 -0
- package/src/components/sidebar-navigation-screen/index.js +29 -12
- package/src/components/sidebar-navigation-screen/style.scss +1 -21
- package/src/components/sidebar-navigation-screen-global-styles/index.js +2 -11
- package/src/components/sidebar-navigation-screen-main/index.js +11 -23
- package/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js +1 -1
- package/src/components/sidebar-navigation-screen-navigation-menu/index.js +7 -6
- package/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js +1 -1
- package/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js +14 -14
- package/src/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
- package/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js +4 -5
- package/src/components/sidebar-navigation-screen-page/index.js +23 -13
- package/src/components/sidebar-navigation-screen-page/style.scss +8 -2
- package/src/components/sidebar-navigation-screen-pattern/index.js +9 -6
- package/src/components/sidebar-navigation-screen-patterns/index.js +70 -60
- package/src/components/sidebar-navigation-screen-patterns/style.scss +5 -0
- package/src/components/sidebar-navigation-screen-template/index.js +8 -12
- package/src/components/sidebar-navigation-screen-templates-browse/index.js +2 -7
- package/src/components/site-hub/index.js +80 -90
- package/src/components/site-hub/style.scss +14 -34
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +50 -35
- package/src/components/template-actions/index.js +8 -11
- package/src/components/welcome-guide/style.scss +1 -1
- package/src/components/welcome-guide/styles.js +6 -5
- package/src/hooks/commands/use-edit-mode-commands.js +12 -33
- package/src/hooks/push-changes-to-global-styles/index.js +1 -40
- package/src/hooks/use-theme-style-variations/test/use-theme-style-variations-by-property.js +4 -0
- package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +5 -1
- package/src/index.js +9 -10
- package/src/store/actions.js +25 -141
- package/src/store/private-actions.js +0 -133
- package/src/store/test/actions.js +7 -2
- package/src/style.scss +0 -2
- package/src/utils/constants.js +1 -0
- package/src/utils/set-nested-value.js +39 -0
- package/build/components/add-new-template/new-template.js +0 -298
- package/build/components/add-new-template/new-template.js.map +0 -1
- package/build/components/add-new-template/template-actions-loading-screen.js +0 -27
- package/build/components/add-new-template/template-actions-loading-screen.js.map +0 -1
- package/build/components/header-edit-mode/plugin-more-menu-item/index.js +0 -78
- package/build/components/header-edit-mode/plugin-more-menu-item/index.js.map +0 -1
- package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -71
- package/build/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +0 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +0 -78
- package/build/components/keyboard-shortcut-help-modal/config.js.map +0 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -48
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +0 -119
- package/build/components/keyboard-shortcut-help-modal/index.js.map +0 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +0 -54
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
- package/build/components/page-actions/index.js +0 -35
- package/build/components/page-actions/index.js.map +0 -1
- package/build/components/page-actions/trash-page-menu-item.js +0 -54
- package/build/components/page-actions/trash-page-menu-item.js.map +0 -1
- package/build/components/page-templates-template-parts/actions.js +0 -207
- package/build/components/page-templates-template-parts/actions.js.map +0 -1
- package/build/components/preferences-modal/index.js +0 -38
- package/build/components/preferences-modal/index.js.map +0 -1
- package/build/components/sidebar-edit-mode/constants.js +0 -9
- package/build/components/sidebar-edit-mode/constants.js.map +0 -1
- package/build/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -89
- package/build/components/sidebar-edit-mode/plugin-sidebar/index.js.map +0 -1
- package/build/components/sidebar-navigation-screen-navigation-item/index.js +0 -54
- package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +0 -1
- package/build/components/sync-state-with-url/use-sync-path-with-url.js +0 -132
- package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +0 -1
- package/build/components/template-actions/rename-menu-item.js.map +0 -1
- package/build-module/components/add-new-template/new-template.js +0 -290
- package/build-module/components/add-new-template/new-template.js.map +0 -1
- package/build-module/components/add-new-template/template-actions-loading-screen.js +0 -20
- package/build-module/components/add-new-template/template-actions-loading-screen.js.map +0 -1
- package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js +0 -73
- package/build-module/components/header-edit-mode/plugin-more-menu-item/index.js.map +0 -1
- package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -65
- package/build-module/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js.map +0 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js +0 -71
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +0 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -40
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -110
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +0 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -47
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
- package/build-module/components/page-actions/index.js +0 -27
- package/build-module/components/page-actions/index.js.map +0 -1
- package/build-module/components/page-actions/trash-page-menu-item.js +0 -47
- package/build-module/components/page-actions/trash-page-menu-item.js.map +0 -1
- package/build-module/components/page-templates-template-parts/actions.js +0 -199
- package/build-module/components/page-templates-template-parts/actions.js.map +0 -1
- package/build-module/components/preferences-modal/index.js +0 -30
- package/build-module/components/preferences-modal/index.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/constants.js +0 -3
- package/build-module/components/sidebar-edit-mode/constants.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -83
- package/build-module/components/sidebar-edit-mode/plugin-sidebar/index.js.map +0 -1
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +0 -46
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +0 -1
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +0 -124
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +0 -1
- package/build-module/components/template-actions/rename-menu-item.js.map +0 -1
- package/src/components/add-new-template/new-template.js +0 -429
- package/src/components/add-new-template/template-actions-loading-screen.js +0 -23
- package/src/components/header-edit-mode/plugin-more-menu-item/index.js +0 -73
- package/src/components/header-edit-mode/plugin-sidebar-more-menu-item/index.js +0 -64
- package/src/components/keyboard-shortcut-help-modal/config.js +0 -53
- package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -41
- package/src/components/keyboard-shortcut-help-modal/index.js +0 -151
- package/src/components/keyboard-shortcut-help-modal/shortcut.js +0 -70
- package/src/components/keyboard-shortcut-help-modal/style.scss +0 -61
- package/src/components/page-actions/index.js +0 -30
- package/src/components/page-actions/trash-page-menu-item.js +0 -63
- package/src/components/page-templates-template-parts/actions.js +0 -277
- package/src/components/preferences-modal/index.js +0 -29
- package/src/components/sidebar-edit-mode/constants.js +0 -2
- package/src/components/sidebar-edit-mode/plugin-sidebar/index.js +0 -80
- package/src/components/sidebar-navigation-screen-navigation-item/index.js +0 -59
- package/src/components/sync-state-with-url/use-sync-path-with-url.js +0 -147
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_components","_blockEditor","_navigationButton","_subtitle","_interopRequireDefault","_lockUnlock","useGlobalStyle","unlock","blockEditorPrivateApis","ElementItem","parentMenu","element","label","_ref","prefix","extraStyles","textDecoration","fontFamily","fontStyle","fontWeight","letterSpacing","backgroundColor","fallbackBackgroundColor","gradientValue","color","navigationButtonLabel","sprintf","__","_react","createElement","NavigationButtonAsItem","path","__experimentalHStack","justify","FlexItem","className","style","background","TypographyElements","__experimentalVStack","spacing","default","level","__experimentalItemGroup","isBordered","isSeparated","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/typography-elements.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tFlexItem,\n} from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { NavigationButtonAsItem } from './navigation-button';\nimport Subtitle from './subtitle';\n\nimport { unlock } from '../../lock-unlock';\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction ElementItem( { parentMenu, element, label } ) {\n\tconst prefix =\n\t\telement === 'text' || ! element ? '' : `elements.${ element }.`;\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\tconst [ fontFamily ] = useGlobalStyle( prefix + 'typography.fontFamily' );\n\tconst [ fontStyle ] = useGlobalStyle( prefix + 'typography.fontStyle' );\n\tconst [ fontWeight ] = useGlobalStyle( prefix + 'typography.fontWeight' );\n\tconst [ letterSpacing ] = useGlobalStyle(\n\t\tprefix + 'typography.letterSpacing'\n\t);\n\tconst [ backgroundColor ] = useGlobalStyle( prefix + 'color.background' );\n\tconst [ fallbackBackgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient' );\n\tconst [ color ] = useGlobalStyle( prefix + 'color.text' );\n\n\tconst navigationButtonLabel = sprintf(\n\t\t// translators: %s: is a subset of Typography, e.g., 'text' or 'links'.\n\t\t__( 'Typography %s styles' ),\n\t\tlabel\n\t);\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ parentMenu + '/typography/' + element }\n\t\t\taria-label={ navigationButtonLabel }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem\n\t\t\t\t\tclassName=\"edit-site-global-styles-screen-typography__indicator\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\t\t\tbackground:\n\t\t\t\t\t\t\tgradientValue ??\n\t\t\t\t\t\t\tbackgroundColor ??\n\t\t\t\t\t\t\tfallbackBackgroundColor,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tfontStyle,\n\t\t\t\t\t\tfontWeight,\n\t\t\t\t\t\tletterSpacing,\n\t\t\t\t\t\t...extraStyles,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Aa' ) }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>{ label }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction TypographyElements() {\n\tconst parentMenu = '';\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<Subtitle level={ 3 }>{ __( 'Elements' ) }</Subtitle>\n\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"text\"\n\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"link\"\n\t\t\t\t\tlabel={ __( 'Links' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"heading\"\n\t\t\t\t\tlabel={ __( 'Headings' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"caption\"\n\t\t\t\t\tlabel={ __( 'Captions' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"button\"\n\t\t\t\t\tlabel={ __( 'Buttons' ) }\n\t\t\t\t/>\n\t\t\t</ItemGroup>\n\t\t</VStack>\n\t);\n}\n\nexport default TypographyElements;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAMA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAC,sBAAA,CAAAL,OAAA;AAEA,IAAAM,WAAA,GAAAN,OAAA;AAlBA;AACA;AACA;;AAUA;AACA;AACA;;AAKA,MAAM;EAAEO;AAAe,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAE3D,SAASC,WAAWA,CAAE;EAAEC,UAAU;EAAEC,OAAO;EAAEC;AAAM,CAAC,EAAG;EAAA,IAAAC,IAAA;EACtD,MAAMC,MAAM,GACXH,OAAO,KAAK,MAAM,IAAI,CAAEA,OAAO,GAAG,EAAE,GAAI,YAAYA,OAAS,GAAE;EAChE,MAAMI,WAAW,GAChBJ,OAAO,KAAK,MAAM,GACf;IACAK,cAAc,EAAE;EAChB,CAAC,GACD,CAAC,CAAC;EACN,MAAM,CAAEC,UAAU,CAAE,GAAGX,cAAc,CAAEQ,MAAM,GAAG,uBAAwB,CAAC;EACzE,MAAM,CAAEI,SAAS,CAAE,GAAGZ,cAAc,CAAEQ,MAAM,GAAG,sBAAuB,CAA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EAAE,SAAU;EAAG,CACzB,CACS,CACJ,CAAC;AAEX;AAAC,IAAAmB,QAAA,GAAAC,OAAA,CAAAN,OAAA,GAEcH,kBAAkB"}
|
|
1
|
+
{"version":3,"names":["_i18n","require","_components","_blockEditor","_navigationButton","_subtitle","_interopRequireDefault","_lockUnlock","useGlobalStyle","unlock","blockEditorPrivateApis","ElementItem","parentMenu","element","label","_ref","prefix","extraStyles","textDecoration","fontFamily","fontStyle","fontWeight","letterSpacing","backgroundColor","fallbackBackgroundColor","gradientValue","color","navigationButtonLabel","sprintf","__","_react","createElement","NavigationButtonAsItem","path","__experimentalHStack","justify","FlexItem","className","style","background","TypographyElements","__experimentalVStack","spacing","default","level","__experimentalItemGroup","isBordered","isSeparated","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/typography-elements.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tFlexItem,\n} from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { NavigationButtonAsItem } from './navigation-button';\nimport Subtitle from './subtitle';\n\nimport { unlock } from '../../lock-unlock';\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction ElementItem( { parentMenu, element, label } ) {\n\tconst prefix =\n\t\telement === 'text' || ! element ? '' : `elements.${ element }.`;\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\tconst [ fontFamily ] = useGlobalStyle( prefix + 'typography.fontFamily' );\n\tconst [ fontStyle ] = useGlobalStyle( prefix + 'typography.fontStyle' );\n\tconst [ fontWeight ] = useGlobalStyle( prefix + 'typography.fontWeight' );\n\tconst [ letterSpacing ] = useGlobalStyle(\n\t\tprefix + 'typography.letterSpacing'\n\t);\n\tconst [ backgroundColor ] = useGlobalStyle( prefix + 'color.background' );\n\tconst [ fallbackBackgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient' );\n\tconst [ color ] = useGlobalStyle( prefix + 'color.text' );\n\n\tconst navigationButtonLabel = sprintf(\n\t\t// translators: %s: is a subset of Typography, e.g., 'text' or 'links'.\n\t\t__( 'Typography %s styles' ),\n\t\tlabel\n\t);\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ parentMenu + '/typography/' + element }\n\t\t\taria-label={ navigationButtonLabel }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem\n\t\t\t\t\tclassName=\"edit-site-global-styles-screen-typography__indicator\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\t\t\tbackground:\n\t\t\t\t\t\t\tgradientValue ??\n\t\t\t\t\t\t\tbackgroundColor ??\n\t\t\t\t\t\t\tfallbackBackgroundColor,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tfontStyle,\n\t\t\t\t\t\tfontWeight,\n\t\t\t\t\t\tletterSpacing,\n\t\t\t\t\t\t...extraStyles,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Aa' ) }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>{ label }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction TypographyElements() {\n\tconst parentMenu = '';\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<Subtitle level={ 3 }>{ __( 'Elements' ) }</Subtitle>\n\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"text\"\n\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"link\"\n\t\t\t\t\tlabel={ __( 'Links' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"heading\"\n\t\t\t\t\tlabel={ __( 'Headings' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"caption\"\n\t\t\t\t\tlabel={ __( 'Captions' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"button\"\n\t\t\t\t\tlabel={ __( 'Buttons' ) }\n\t\t\t\t/>\n\t\t\t</ItemGroup>\n\t\t</VStack>\n\t);\n}\n\nexport default TypographyElements;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAMA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAC,sBAAA,CAAAL,OAAA;AAEA,IAAAM,WAAA,GAAAN,OAAA;AAlBA;AACA;AACA;;AAUA;AACA;AACA;;AAKA,MAAM;EAAEO;AAAe,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAE3D,SAASC,WAAWA,CAAE;EAAEC,UAAU;EAAEC,OAAO;EAAEC;AAAM,CAAC,EAAG;EAAA,IAAAC,IAAA;EACtD,MAAMC,MAAM,GACXH,OAAO,KAAK,MAAM,IAAI,CAAEA,OAAO,GAAG,EAAE,GAAI,YAAYA,OAAS,GAAE;EAChE,MAAMI,WAAW,GAChBJ,OAAO,KAAK,MAAM,GACf;IACAK,cAAc,EAAE;EAChB,CAAC,GACD,CAAC,CAAC;EACN,MAAM,CAAEC,UAAU,CAAE,GAAGX,cAAc,CAAEQ,MAAM,GAAG,uBAAwB,CAAC;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UAAU,EAAGA,UAAY;IACzBC,OAAO,EAAC,QAAQ;IAChBC,KAAK,EAAG,IAAAe,QAAE,EAAE,SAAU;EAAG,CACzB,CACS,CACJ,CAAC;AAEX;AAAC,IAAAmB,QAAA,GAAAC,OAAA,CAAAN,OAAA,GAEcH,kBAAkB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_components","_i18n","_blockEditor","_globalStylesProvider","_lockUnlock","_previewStyles","_utils","GlobalStylesContext","unlock","blockEditorPrivateApis","PreviewTypography","fontSize","variation","base","useContext","config","mergeBaseAndUserConfigs","bodyFontFamilies","headingFontFamilies","getFontFamilies","bodyPreviewStyle","getFamilyPreviewStyle","headingPreviewStyle","_react","createElement","__unstableMotion","div","animate","scale","opacity","initial","transition","delay","type","style","textAlign","_x"],"sources":["@wordpress/edit-site/src/components/global-styles/typography-example.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { __unstableMotion as motion } from '@wordpress/components';\nimport { _x } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from './global-styles-provider';\nimport { unlock } from '../../lock-unlock';\nimport { getFamilyPreviewStyle } from './font-library-modal/utils/preview-styles';\nimport { getFontFamilies } from './utils';\n\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\n\nexport default function PreviewTypography( { fontSize, variation } ) {\n\tconst { base } = useContext( GlobalStylesContext );\n\tlet config = base;\n\tif ( variation ) {\n\t\tconfig = mergeBaseAndUserConfigs( base, variation );\n\t}\n\tconst [ bodyFontFamilies, headingFontFamilies ] = getFontFamilies( config );\n\tconst bodyPreviewStyle = bodyFontFamilies\n\t\t? getFamilyPreviewStyle( bodyFontFamilies )\n\t\t: {};\n\tconst headingPreviewStyle = headingFontFamilies\n\t\t? getFamilyPreviewStyle( headingFontFamilies )\n\t\t: {};\n\n\tif ( fontSize ) {\n\t\tbodyPreviewStyle.fontSize = fontSize;\n\t\theadingPreviewStyle.fontSize = fontSize;\n\t}\n\n\treturn (\n\t\t<motion.div\n\t\t\tanimate={ {\n\t\t\t\tscale: 1,\n\t\t\t\topacity: 1,\n\t\t\t} }\n\t\t\tinitial={ {\n\t\t\t\tscale: 0.1,\n\t\t\t\topacity: 0,\n\t\t\t} }\n\t\t\ttransition={ {\n\t\t\t\tdelay: 0.3,\n\t\t\t\ttype: 'tween',\n\t\t\t} }\n\t\t\tstyle={ {\n\t\t\t\ttextAlign: 'center',\n\t\t\t} }\n\t\t>\n\t\t\t<span style={ headingPreviewStyle }>\n\t\t\t\t{ _x( 'A', 'Uppercase letter A' ) }\n\t\t\t</span>\n\t\t\t<span style={ bodyPreviewStyle }>\n\t\t\t\t{ _x( 'a', 'Lowercase letter A' ) }\n\t\t\t</span>\n\t\t</motion.div>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAKA,IAAAI,qBAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAdA;AACA;AACA;;AAMA;AACA;AACA;;AAMA,MAAM;EAAEQ;AAAoB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAEjD,SAASC,iBAAiBA,CAAE;EAAEC,QAAQ;EAAEC;AAAU,CAAC,EAAG;EACpE,MAAM;IAAEC;EAAK,CAAC,GAAG,IAAAC,mBAAU,EAAEP,mBAAoB,CAAC;EAClD,IAAIQ,MAAM,GAAGF,IAAI;EACjB,IAAKD,SAAS,EAAG;IAChBG,MAAM,GAAG,IAAAC,6CAAuB,EAAEH,IAAI,EAAED,SAAU,CAAC;EACpD;EACA,MAAM,CAAEK,gBAAgB,EAAEC,mBAAmB,CAAE,GAAG,IAAAC,sBAAe,EAAEJ,MAAO,CAAC;EAC3E,MAAMK,gBAAgB,GAAGH,gBAAgB,GACtC,IAAAI,oCAAqB,EAAEJ,gBAAiB,CAAC,GACzC,CAAC,CAAC;EACL,MAAMK,mBAAmB,GAAGJ,mBAAmB,GAC5C,IAAAG,oCAAqB,EAAEH,mBAAoB,CAAC,GAC5C,CAAC,CAAC;EAEL,IAAKP,QAAQ,EAAG;IACfS,gBAAgB,CAACT,QAAQ,GAAGA,QAAQ;IACpCW,mBAAmB,CAACX,QAAQ,GAAGA,QAAQ;EACxC;EAEA,OACC,IAAAY,MAAA,CAAAC,aAAA,EAACxB,WAAA,CAAAyB,gBAAM,CAACC,GAAG;IACVC,OAAO,EAAG;MACTC,KAAK,EAAE,CAAC;MACRC,OAAO,EAAE;IACV,CAAG;IACHC,OAAO,EAAG;MACTF,KAAK,EAAE,GAAG;MACVC,OAAO,EAAE;IACV,CAAG;IACHE,UAAU,EAAG;MACZC,KAAK,EAAE,GAAG;MACVC,IAAI,EAAE;IACP,CAAG;IACHC,KAAK,EAAG;MACPC,SAAS,EAAE;IACZ;EAAG,GAEH,IAAAZ,MAAA,CAAAC,aAAA;IAAMU,KAAK,EAAGZ;EAAqB,GAChC,IAAAc,QAAE,EAAE,GAAG,EAAE,oBAAqB,CAC3B,CAAC,EACP,IAAAb,MAAA,CAAAC,aAAA;IAAMU,KAAK,EAAGd;EAAkB,GAC7B,IAAAgB,QAAE,EAAE,GAAG,EAAE,oBAAqB,CAC3B,CACK,CAAC;AAEf"}
|
|
1
|
+
{"version":3,"names":["_element","require","_components","_i18n","_blockEditor","_globalStylesProvider","_lockUnlock","_previewStyles","_utils","GlobalStylesContext","unlock","blockEditorPrivateApis","PreviewTypography","fontSize","variation","base","useContext","config","mergeBaseAndUserConfigs","bodyFontFamilies","headingFontFamilies","getFontFamilies","bodyPreviewStyle","getFamilyPreviewStyle","headingPreviewStyle","_react","createElement","__unstableMotion","div","animate","scale","opacity","initial","transition","delay","type","style","textAlign","_x"],"sources":["@wordpress/edit-site/src/components/global-styles/typography-example.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { __unstableMotion as motion } from '@wordpress/components';\nimport { _x } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from './global-styles-provider';\nimport { unlock } from '../../lock-unlock';\nimport { getFamilyPreviewStyle } from './font-library-modal/utils/preview-styles';\nimport { getFontFamilies } from './utils';\n\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\n\nexport default function PreviewTypography( { fontSize, variation } ) {\n\tconst { base } = useContext( GlobalStylesContext );\n\tlet config = base;\n\tif ( variation ) {\n\t\tconfig = mergeBaseAndUserConfigs( base, variation );\n\t}\n\tconst [ bodyFontFamilies, headingFontFamilies ] = getFontFamilies( config );\n\tconst bodyPreviewStyle = bodyFontFamilies\n\t\t? getFamilyPreviewStyle( bodyFontFamilies )\n\t\t: {};\n\tconst headingPreviewStyle = headingFontFamilies\n\t\t? getFamilyPreviewStyle( headingFontFamilies )\n\t\t: {};\n\n\tif ( fontSize ) {\n\t\tbodyPreviewStyle.fontSize = fontSize;\n\t\theadingPreviewStyle.fontSize = fontSize;\n\t}\n\n\treturn (\n\t\t<motion.div\n\t\t\tanimate={ {\n\t\t\t\tscale: 1,\n\t\t\t\topacity: 1,\n\t\t\t} }\n\t\t\tinitial={ {\n\t\t\t\tscale: 0.1,\n\t\t\t\topacity: 0,\n\t\t\t} }\n\t\t\ttransition={ {\n\t\t\t\tdelay: 0.3,\n\t\t\t\ttype: 'tween',\n\t\t\t} }\n\t\t\tstyle={ {\n\t\t\t\ttextAlign: 'center',\n\t\t\t} }\n\t\t>\n\t\t\t<span style={ headingPreviewStyle }>\n\t\t\t\t{ _x( 'A', 'Uppercase letter A' ) }\n\t\t\t</span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,gBAAM,CAACC,GAAG;IACVC,OAAO,EAAG;MACTC,KAAK,EAAE,CAAC;MACRC,OAAO,EAAE;IACV,CAAG;IACHC,OAAO,EAAG;MACTF,KAAK,EAAE,GAAG;MACVC,OAAO,EAAE;IACV,CAAG;IACHE,UAAU,EAAG;MACZC,KAAK,EAAE,GAAG;MACVC,IAAI,EAAE;IACP,CAAG;IACHC,KAAK,EAAG;MACPC,SAAS,EAAE;IACZ;EAAG,GAEH,IAAAZ,MAAA,CAAAC,aAAA;IAAMU,KAAK,EAAGZ;EAAqB,GAChC,IAAAc,QAAE,EAAE,GAAG,EAAE,oBAAqB,CAC3B,CAAC,EACP,IAAAb,MAAA,CAAAC,aAAA;IAAMU,KAAK,EAAGd;EAAkB,GAC7B,IAAAgB,QAAE,EAAE,GAAG,EAAE,oBAAqB,CAC3B,CACK,CAAC;AAEf","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_blockEditor","require","_lockUnlock","useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","TypographyPanel","StylesTypographyPanel","unlock","blockEditorPrivateApis","element","headingLevel","prefixParts","concat","prefix","join","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","usedElement","settings","_react","createElement","inheritedValue","value","onChange"],"sources":["@wordpress/edit-site/src/components/global-styles/typography-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tTypographyPanel: StylesTypographyPanel,\n} = unlock( blockEditorPrivateApis );\n\nexport default function TypographyPanel( { element, headingLevel } ) {\n\tlet prefixParts = [];\n\tif ( element === 'heading' ) {\n\t\tprefixParts = prefixParts.concat( [ 'elements', headingLevel ] );\n\t} else if ( element && element !== 'text' ) {\n\t\tprefixParts = prefixParts.concat( [ 'elements', element ] );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle(\n\t\tprefix,\n\t\tundefined,\n\t\t'all',\n\t\t{\n\t\t\tshouldDecodeEncode: false,\n\t\t}\n\t);\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst usedElement = element === 'heading' ? headingLevel : element;\n\tconst settings = useSettingsForBlockElement(\n\t\trawSettings,\n\t\tundefined,\n\t\tusedElement\n\t);\n\n\treturn (\n\t\t<StylesTypographyPanel\n\t\t\tinheritedValue={ inheritedStyle }\n\t\t\tvalue={ style }\n\t\t\tonChange={ setStyle }\n\t\t\tsettings={ settings }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,MAAM;EACLE,cAAc;EACdC,gBAAgB;EAChBC,0BAA0B;EAC1BC,eAAe,EAAEC;AAClB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAErB,SAASH,eAAeA,CAAE;EAAEI,OAAO;EAAEC;AAAa,CAAC,EAAG;EACpE,IAAIC,WAAW,GAAG,EAAE;EACpB,IAAKF,OAAO,KAAK,SAAS,EAAG;IAC5BE,WAAW,GAAGA,WAAW,CAACC,MAAM,CAAE,CAAE,UAAU,EAAEF,YAAY,CAAG,CAAC;EACjE,CAAC,MAAM,IAAKD,OAAO,IAAIA,OAAO,KAAK,MAAM,EAAG;IAC3CE,WAAW,GAAGA,WAAW,CAACC,MAAM,CAAE,CAAE,UAAU,EAAEH,OAAO,CAAG,CAAC;EAC5D;EACA,MAAMI,MAAM,GAAGF,WAAW,CAACG,IAAI,CAAE,GAAI,CAAC;EAEtC,MAAM,CAAEC,KAAK,CAAE,GAAGb,cAAc,CAAEW,MAAM,EAAEG,SAAS,EAAE,MAAM,EAAE;IAC5DC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEC,cAAc,EAAEC,QAAQ,CAAE,GAAGjB,cAAc,CAClDW,MAAM,EACNG,SAAS,EACT,KAAK,EACL;IACCC,kBAAkB,EAAE;EACrB,CACD,CAAC;EACD,MAAM,CAAEG,WAAW,CAAE,GAAGjB,gBAAgB,CAAE,EAAG,CAAC;EAC9C,MAAMkB,WAAW,GAAGZ,OAAO,KAAK,SAAS,GAAGC,YAAY,GAAGD,OAAO;EAClE,MAAMa,QAAQ,GAAGlB,0BAA0B,CAC1CgB,WAAW,EACXJ,SAAS,EACTK,WACD,CAAC;EAED,OACC,IAAAE,MAAA,CAAAC,aAAA,EAAClB,qBAAqB;IACrBmB,cAAc,EAAGP,cAAgB;IACjCQ,KAAK,EAAGX,KAAO;IACfY,QAAQ,EAAGR,QAAU;IACrBG,QAAQ,EAAGA;EAAU,CACrB,CAAC;AAEJ"}
|
|
1
|
+
{"version":3,"names":["_blockEditor","require","_lockUnlock","useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","TypographyPanel","StylesTypographyPanel","unlock","blockEditorPrivateApis","element","headingLevel","prefixParts","concat","prefix","join","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","usedElement","settings","_react","createElement","inheritedValue","value","onChange"],"sources":["@wordpress/edit-site/src/components/global-styles/typography-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tTypographyPanel: StylesTypographyPanel,\n} = unlock( blockEditorPrivateApis );\n\nexport default function TypographyPanel( { element, headingLevel } ) {\n\tlet prefixParts = [];\n\tif ( element === 'heading' ) {\n\t\tprefixParts = prefixParts.concat( [ 'elements', headingLevel ] );\n\t} else if ( element && element !== 'text' ) {\n\t\tprefixParts = prefixParts.concat( [ 'elements', element ] );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle(\n\t\tprefix,\n\t\tundefined,\n\t\t'all',\n\t\t{\n\t\t\tshouldDecodeEncode: false,\n\t\t}\n\t);\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst usedElement = element === 'heading' ? headingLevel : element;\n\tconst settings = useSettingsForBlockElement(\n\t\trawSettings,\n\t\tundefined,\n\t\tusedElement\n\t);\n\n\treturn (\n\t\t<StylesTypographyPanel\n\t\t\tinheritedValue={ inheritedStyle }\n\t\t\tvalue={ style }\n\t\t\tonChange={ setStyle }\n\t\t\tsettings={ settings }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,MAAM;EACLE,cAAc;EACdC,gBAAgB;EAChBC,0BAA0B;EAC1BC,eAAe,EAAEC;AAClB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAErB,SAASH,eAAeA,CAAE;EAAEI,OAAO;EAAEC;AAAa,CAAC,EAAG;EACpE,IAAIC,WAAW,GAAG,EAAE;EACpB,IAAKF,OAAO,KAAK,SAAS,EAAG;IAC5BE,WAAW,GAAGA,WAAW,CAACC,MAAM,CAAE,CAAE,UAAU,EAAEF,YAAY,CAAG,CAAC;EACjE,CAAC,MAAM,IAAKD,OAAO,IAAIA,OAAO,KAAK,MAAM,EAAG;IAC3CE,WAAW,GAAGA,WAAW,CAACC,MAAM,CAAE,CAAE,UAAU,EAAEH,OAAO,CAAG,CAAC;EAC5D;EACA,MAAMI,MAAM,GAAGF,WAAW,CAACG,IAAI,CAAE,GAAI,CAAC;EAEtC,MAAM,CAAEC,KAAK,CAAE,GAAGb,cAAc,CAAEW,MAAM,EAAEG,SAAS,EAAE,MAAM,EAAE;IAC5DC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEC,cAAc,EAAEC,QAAQ,CAAE,GAAGjB,cAAc,CAClDW,MAAM,EACNG,SAAS,EACT,KAAK,EACL;IACCC,kBAAkB,EAAE;EACrB,CACD,CAAC;EACD,MAAM,CAAEG,WAAW,CAAE,GAAGjB,gBAAgB,CAAE,EAAG,CAAC;EAC9C,MAAMkB,WAAW,GAAGZ,OAAO,KAAK,SAAS,GAAGC,YAAY,GAAGD,OAAO;EAClE,MAAMa,QAAQ,GAAGlB,0BAA0B,CAC1CgB,WAAW,EACXJ,SAAS,EACTK,WACD,CAAC;EAED,OACC,IAAAE,MAAA,CAAAC,aAAA,EAAClB,qBAAqB;IACrBmB,cAAc,EAAGP,cAAgB;IACjCQ,KAAK,EAAGX,KAAO;IACfY,QAAQ,EAAGR,QAAU;IACrBG,QAAQ,EAAGA;EAAU,CACrB,CAAC;AAEJ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_blockEditor","require","_lockUnlock","useGlobalStyle","unlock","blockEditorPrivateApis","TypographyPreview","name","element","headingLevel","_ref","prefix","fontFamily","gradientValue","backgroundColor","fallbackBackgroundColor","color","fontSize","fontStyle","fontWeight","letterSpacing","extraStyles","textDecoration","_react","createElement","className","style","background"],"sources":["@wordpress/edit-site/src/components/global-styles/typography-preview.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nexport default function TypographyPreview( { name, element, headingLevel } ) {\n\tlet prefix = '';\n\tif ( element === 'heading' ) {\n\t\tprefix = `elements.${ headingLevel }.`;\n\t} else if ( element && element !== 'text' ) {\n\t\tprefix = `elements.${ element }.`;\n\t}\n\n\tconst [ fontFamily ] = useGlobalStyle(\n\t\tprefix + 'typography.fontFamily',\n\t\tname\n\t);\n\tconst [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient', name );\n\tconst [ backgroundColor ] = useGlobalStyle(\n\t\tprefix + 'color.background',\n\t\tname\n\t);\n\tconst [ fallbackBackgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst [ color ] = useGlobalStyle( prefix + 'color.text', name );\n\tconst [ fontSize ] = useGlobalStyle( prefix + 'typography.fontSize', name );\n\tconst [ fontStyle ] = useGlobalStyle(\n\t\tprefix + 'typography.fontStyle',\n\t\tname\n\t);\n\tconst [ fontWeight ] = useGlobalStyle(\n\t\tprefix + 'typography.fontWeight',\n\t\tname\n\t);\n\tconst [ letterSpacing ] = useGlobalStyle(\n\t\tprefix + 'typography.letterSpacing',\n\t\tname\n\t);\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"edit-site-typography-preview\"\n\t\t\tstyle={ {\n\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\tbackground:\n\t\t\t\t\tgradientValue ?? backgroundColor ?? fallbackBackgroundColor,\n\t\t\t\tcolor,\n\t\t\t\tfontSize,\n\t\t\t\tfontStyle,\n\t\t\t\tfontWeight,\n\t\t\t\tletterSpacing,\n\t\t\t\t...extraStyles,\n\t\t\t} }\n\t\t>\n\t\t\tAa\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,MAAM;EAAEE;AAAe,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAE5C,SAASC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C,MAAA,CAAAC,aAAA;IACCC,SAAS,EAAC,8BAA8B;IACxCC,KAAK,EAAG;MACPd,UAAU,EAAEA,UAAU,aAAVA,UAAU,cAAVA,UAAU,GAAI,OAAO;MACjCe,UAAU,GAAAjB,IAAA,GACTG,aAAa,aAAbA,aAAa,cAAbA,aAAa,GAAIC,eAAe,cAAAJ,IAAA,cAAAA,IAAA,GAAIK,uBAAuB;MAC5DC,KAAK;MACLC,QAAQ;MACRC,SAAS;MACTC,UAAU;MACVC,aAAa;MACb,GAAGC;IACJ;EAAG,GACH,IAEI,CAAC;AAER"}
|
|
1
|
+
{"version":3,"names":["_blockEditor","require","_lockUnlock","useGlobalStyle","unlock","blockEditorPrivateApis","TypographyPreview","name","element","headingLevel","_ref","prefix","fontFamily","gradientValue","backgroundColor","fallbackBackgroundColor","color","fontSize","fontStyle","fontWeight","letterSpacing","extraStyles","textDecoration","_react","createElement","className","style","background"],"sources":["@wordpress/edit-site/src/components/global-styles/typography-preview.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nexport default function TypographyPreview( { name, element, headingLevel } ) {\n\tlet prefix = '';\n\tif ( element === 'heading' ) {\n\t\tprefix = `elements.${ headingLevel }.`;\n\t} else if ( element && element !== 'text' ) {\n\t\tprefix = `elements.${ element }.`;\n\t}\n\n\tconst [ fontFamily ] = useGlobalStyle(\n\t\tprefix + 'typography.fontFamily',\n\t\tname\n\t);\n\tconst [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient', name );\n\tconst [ backgroundColor ] = useGlobalStyle(\n\t\tprefix + 'color.background',\n\t\tname\n\t);\n\tconst [ fallbackBackgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst [ color ] = useGlobalStyle( prefix + 'color.text', name );\n\tconst [ fontSize ] = useGlobalStyle( prefix + 'typography.fontSize', name );\n\tconst [ fontStyle ] = useGlobalStyle(\n\t\tprefix + 'typography.fontStyle',\n\t\tname\n\t);\n\tconst [ fontWeight ] = useGlobalStyle(\n\t\tprefix + 'typography.fontWeight',\n\t\tname\n\t);\n\tconst [ letterSpacing ] = useGlobalStyle(\n\t\tprefix + 'typography.letterSpacing',\n\t\tname\n\t);\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"edit-site-typography-preview\"\n\t\t\tstyle={ {\n\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\tbackground:\n\t\t\t\t\tgradientValue ?? backgroundColor ?? fallbackBackgroundColor,\n\t\t\t\tcolor,\n\t\t\t\tfontSize,\n\t\t\t\tfontStyle,\n\t\t\t\tfontWeight,\n\t\t\t\tletterSpacing,\n\t\t\t\t...extraStyles,\n\t\t\t} }\n\t\t>\n\t\t\tAa\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,MAAM;EAAEE;AAAe,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAE5C,SAASC,iBAAiBA,CAAE;EAAEC,IAAI;EAAEC,OAAO;EAAEC;AAAa,CAAC,EAAG;EAAA,IAAAC,IAAA;EAC5E,IAAIC,MAAM,GAAG,EAAE;EACf,IAAKH,OAAO,KAAK,SAAS,EAAG;IAC5BG,MAAM,GAAI,YAAYF,YAAc,GAAE;EACvC,CAAC,MAAM,IAAKD,OAAO,IAAIA,OAAO,KAAK,MAAM,EAAG;IAC3CG,MAAM,GAAI,YAAYH,OAAS,GAAE;EAClC;EAEA,MAAM,CAAEI,UAAU,CAAE,GAAGT,cAAc,CACpCQ,MAAM,GAAG,uBA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}
|
|
@@ -31,7 +31,7 @@ var _screenBackground = _interopRequireDefault(require("./screen-background"));
|
|
|
31
31
|
var _lockUnlock = require("../../lock-unlock");
|
|
32
32
|
var _store = require("../../store");
|
|
33
33
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
34
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
34
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
35
35
|
/**
|
|
36
36
|
* WordPress dependencies
|
|
37
37
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_blocks","_data","_blockEditor","_i18n","_preferences","_icons","_coreData","_element","_screenRoot","_interopRequireDefault","_screenBlockList","_interopRequireWildcard","_screenBlock","_screenTypography","_screenTypographyElement","_screenColors","_screenColorPalette","_screenLayout","_screenStyleVariations","_styleBook","_screenCss","_screenRevisions","_screenBackground","_lockUnlock","_store","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","SLOT_FILL_NAME","useGlobalStylesReset","unlock","blockEditorPrivateApis","Slot","GlobalStylesMenuSlot","Fill","GlobalStylesMenuFill","createSlotFill","exports","GlobalStylesActionMenu","canReset","onReset","toggle","useDispatch","preferencesStore","canEditCSS","useSelect","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","coreStore","globalStylesId","globalStyles","undefined","_links","setEditorCanvasContainerView","editSiteStore","goTo","useNavigator","loadCustomCSS","_react","createElement","DropdownMenu","icon","moreVertical","label","__","onClose","Fragment","MenuGroup","MenuItem","onClick","disabled","GlobalStylesNavigationScreen","className","props","__experimentalNavigatorScreen","filter","Boolean","join","BlockStylesNavigationScreens","parentMenu","blockStyles","blockName","map","style","index","key","path","name","variation","ContextScreens","blockStyleVariations","getBlockStyles","blocksStore","length","GlobalStylesStyleBook","navigator","location","isSelected","encodeURIComponent","startsWith","onSelect","GlobalStylesBlockLink","selectedBlockName","selectedBlockClientId","getSelectedBlockClientId","getBlockName","blockEditorStore","clientId","blockHasGlobalStyles","useBlockHasGlobalStyles","useEffect","currentPath","newPath","skipFocus","GlobalStylesEditorCanvasContainerLink","editorCanvasContainerView","getEditorCanvasContainerView","isRevisionsOpen","GlobalStylesUI","blocks","getBlockTypes","__experimentalNavigatorProvider","initialPath","element","block","_default"],"sources":["@wordpress/edit-site/src/components/global-styles/ui.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n\t__experimentalUseNavigator as useNavigator,\n\tcreateSlotFill,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n} from '@wordpress/components';\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ScreenRoot from './screen-root';\nimport {\n\tuseBlockHasGlobalStyles,\n\tdefault as ScreenBlockList,\n} from './screen-block-list';\nimport ScreenBlock from './screen-block';\nimport ScreenTypography from './screen-typography';\nimport ScreenTypographyElement from './screen-typography-element';\nimport ScreenColors from './screen-colors';\nimport ScreenColorPalette from './screen-color-palette';\nimport ScreenLayout from './screen-layout';\nimport ScreenStyleVariations from './screen-style-variations';\nimport StyleBook from '../style-book';\nimport ScreenCSS from './screen-css';\nimport ScreenRevisions from './screen-revisions';\nimport ScreenBackground from './screen-background';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst SLOT_FILL_NAME = 'GlobalStylesMenu';\nconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\nconst { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =\n\tcreateSlotFill( SLOT_FILL_NAME );\n\nfunction GlobalStylesActionMenu() {\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { goTo } = useNavigator();\n\tconst loadCustomCSS = () => {\n\t\tsetEditorCanvasContainerView( 'global-styles-css' );\n\t\tgoTo( '/css' );\n\t};\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t<DropdownMenu icon={ moreVertical } label={ __( 'More' ) }>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ canEditCSS && (\n\t\t\t\t\t\t\t\t<MenuItem onClick={ loadCustomCSS }>\n\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\ttoggle(\n\t\t\t\t\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t\t\t\t\t'welcomeGuideStyles'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tdisabled={ ! canReset }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset styles' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction GlobalStylesNavigationScreen( { className, ...props } ) {\n\treturn (\n\t\t<NavigatorScreen\n\t\t\tclassName={ [\n\t\t\t\t'edit-site-global-styles-sidebar__navigator-screen',\n\t\t\t\tclassName,\n\t\t\t]\n\t\t\t\t.filter( Boolean )\n\t\t\t\t.join( ' ' ) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction BlockStylesNavigationScreens( {\n\tparentMenu,\n\tblockStyles,\n\tblockName,\n} ) {\n\treturn blockStyles.map( ( style, index ) => (\n\t\t<GlobalStylesNavigationScreen\n\t\t\tkey={ index }\n\t\t\tpath={ parentMenu + '/variations/' + style.name }\n\t\t>\n\t\t\t<ScreenBlock name={ blockName } variation={ style.name } />\n\t\t</GlobalStylesNavigationScreen>\n\t) );\n}\n\nfunction ContextScreens( { name, parentMenu = '' } ) {\n\tconst blockStyleVariations = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\tpath={ parentMenu + '/colors/palette' }\n\t\t\t>\n\t\t\t\t<ScreenColorPalette name={ name } />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ !! blockStyleVariations?.length && (\n\t\t\t\t<BlockStylesNavigationScreens\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\tblockStyles={ blockStyleVariations }\n\t\t\t\t\tblockName={ name }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction GlobalStylesStyleBook() {\n\tconst navigator = useNavigator();\n\tconst { path } = navigator.location;\n\treturn (\n\t\t<StyleBook\n\t\t\tisSelected={ ( blockName ) =>\n\t\t\t\t// Match '/blocks/core%2Fbutton' and\n\t\t\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t\t\t// '/blocks/core%2Fbuttons'.\n\t\t\t\tpath === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\t\tpath.startsWith(\n\t\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t\t)\n\t\t\t}\n\t\t\tonSelect={ ( blockName ) => {\n\t\t\t\t// Now go to the selected block.\n\t\t\t\tnavigator.goTo( '/blocks/' + encodeURIComponent( blockName ) );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction GlobalStylesBlockLink() {\n\tconst navigator = useNavigator();\n\tconst { selectedBlockName, selectedBlockClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSelectedBlockClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tselectedBlockName: getBlockName( clientId ),\n\t\t\t\tselectedBlockClientId: clientId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst blockHasGlobalStyles = useBlockHasGlobalStyles( selectedBlockName );\n\t// When we're in the `Blocks` screen enable deep linking to the selected block.\n\tuseEffect( () => {\n\t\tif ( ! selectedBlockClientId || ! blockHasGlobalStyles ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentPath = navigator.location.path;\n\t\tif (\n\t\t\tcurrentPath !== '/blocks' &&\n\t\t\t! currentPath.startsWith( '/blocks/' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst newPath = '/blocks/' + encodeURIComponent( selectedBlockName );\n\t\t// Avoid navigating to the same path. This can happen when selecting\n\t\t// a new block of the same type.\n\t\tif ( newPath !== currentPath ) {\n\t\t\tnavigator.goTo( newPath, { skipFocus: true } );\n\t\t}\n\t}, [ selectedBlockClientId, selectedBlockName, blockHasGlobalStyles ] );\n}\n\nfunction GlobalStylesEditorCanvasContainerLink() {\n\tconst { goTo, location } = useNavigator();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\tconst path = location?.path;\n\tconst isRevisionsOpen = path === '/revisions';\n\n\t// If the user switches the editor canvas container view, redirect\n\t// to the appropriate screen. This effectively allows deep linking to the\n\t// desired screens from outside the global styles navigation provider.\n\tuseEffect( () => {\n\t\tswitch ( editorCanvasContainerView ) {\n\t\t\tcase 'global-styles-revisions':\n\t\t\tcase 'global-styles-revisions:style-book':\n\t\t\t\tgoTo( '/revisions' );\n\t\t\t\tbreak;\n\t\t\tcase 'global-styles-css':\n\t\t\t\tgoTo( '/css' );\n\t\t\t\tbreak;\n\t\t\tcase 'style-book':\n\t\t\t\t/*\n\t\t\t\t * The stand-alone style book is open\n\t\t\t\t * and the revisions panel is open,\n\t\t\t\t * close the revisions panel.\n\t\t\t\t * Otherwise keep the style book open while\n\t\t\t\t * browsing global styles panel.\n\t\t\t\t */\n\t\t\t\tif ( isRevisionsOpen ) {\n\t\t\t\t\tgoTo( '/' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t/*\n\t\t\t\t * Example: the user has navigated to \"Browse styles\" or elsewhere\n\t\t\t\t * and changes the editorCanvasContainerView, e.g., closes the style book.\n\t\t\t\t * The panel should not be affected.\n\t\t\t\t * Exclude revisions panel from this behavior,\n\t\t\t\t * as it should close when the editorCanvasContainerView doesn't correspond.\n\t\t\t\t */\n\t\t\t\tif ( path !== '/' && ! isRevisionsOpen ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgoTo( '/' );\n\t\t\t\tbreak;\n\t\t}\n\t}, [ editorCanvasContainerView, isRevisionsOpen, goTo ] );\n}\n\nfunction GlobalStylesUI() {\n\tconst blocks = getBlockTypes();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\treturn (\n\t\t<NavigatorProvider\n\t\t\tclassName=\"edit-site-global-styles-sidebar__navigator-provider\"\n\t\t\tinitialPath=\"/\"\n\t\t>\n\t\t\t<GlobalStylesNavigationScreen path=\"/\">\n\t\t\t\t<ScreenRoot />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/variations\">\n\t\t\t\t<ScreenStyleVariations />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/blocks\">\n\t\t\t\t<ScreenBlockList />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography\">\n\t\t\t\t<ScreenTypography />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/text\">\n\t\t\t\t<ScreenTypographyElement element=\"text\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/link\">\n\t\t\t\t<ScreenTypographyElement element=\"link\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/heading\">\n\t\t\t\t<ScreenTypographyElement element=\"heading\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/caption\">\n\t\t\t\t<ScreenTypographyElement element=\"caption\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/button\">\n\t\t\t\t<ScreenTypographyElement element=\"button\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/colors\">\n\t\t\t\t<ScreenColors />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/layout\">\n\t\t\t\t<ScreenLayout />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/css\">\n\t\t\t\t<ScreenCSS />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path={ '/revisions' }>\n\t\t\t\t<ScreenRevisions />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path={ '/background' }>\n\t\t\t\t<ScreenBackground />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\t\tkey={ 'menu-block-' + block.name }\n\t\t\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t>\n\t\t\t\t\t<ScreenBlock name={ block.name } />\n\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t) ) }\n\n\t\t\t<ContextScreens />\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<ContextScreens\n\t\t\t\t\tkey={ 'screens-block-' + block.name }\n\t\t\t\t\tname={ block.name }\n\t\t\t\t\tparentMenu={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t/>\n\t\t\t) ) }\n\n\t\t\t{ 'style-book' === editorCanvasContainerView && (\n\t\t\t\t<GlobalStylesStyleBook />\n\t\t\t) }\n\n\t\t\t<GlobalStylesActionMenu />\n\t\t\t<GlobalStylesBlockLink />\n\t\t\t<GlobalStylesEditorCanvasContainerLink />\n\t\t</NavigatorProvider>\n\t);\n}\nexport { GlobalStylesMenuSlot };\nexport default GlobalStylesUI;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AASA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAIA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAKA,IAAAS,WAAA,GAAAC,sBAAA,CAAAV,OAAA;AACA,IAAAW,gBAAA,GAAAC,uBAAA,CAAAZ,OAAA;AAIA,IAAAa,YAAA,GAAAH,sBAAA,CAAAV,OAAA;AACA,IAAAc,iBAAA,GAAAJ,sBAAA,CAAAV,OAAA;AACA,IAAAe,wBAAA,GAAAL,sBAAA,CAAAV,OAAA;AACA,IAAAgB,aAAA,GAAAN,sBAAA,CAAAV,OAAA;AACA,IAAAiB,mBA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D,MAAA,CAAAC,aAAA,EAACmC,qBAAqB,MAAE,CACxB,EAED,IAAApC,MAAA,CAAAC,aAAA,EAACtB,sBAAsB,MAAE,CAAC,EAC1B,IAAAqB,MAAA,CAAAC,aAAA,EAAC0C,qBAAqB,MAAE,CAAC,EACzB,IAAA3C,MAAA,CAAAC,aAAA,EAACuD,qCAAqC,MAAE,CACtB,CAAC;AAEtB;AAAC,IAAAW,QAAA,GAAAzF,OAAA,CAAAxB,OAAA,GAEc0G,cAAc"}
|
|
1
|
+
{"version":3,"names":["_components","require","_blocks","_data","_blockEditor","_i18n","_preferences","_icons","_coreData","_element","_screenRoot","_interopRequireDefault","_screenBlockList","_interopRequireWildcard","_screenBlock","_screenTypography","_screenTypographyElement","_screenColors","_screenColorPalette","_screenLayout","_screenStyleVariations","_styleBook","_screenCss","_screenRevisions","_screenBackground","_lockUnlock","_store","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","SLOT_FILL_NAME","useGlobalStylesReset","unlock","blockEditorPrivateApis","Slot","GlobalStylesMenuSlot","Fill","GlobalStylesMenuFill","createSlotFill","exports","GlobalStylesActionMenu","canReset","onReset","toggle","useDispatch","preferencesStore","canEditCSS","useSelect","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","coreStore","globalStylesId","globalStyles","undefined","_links","setEditorCanvasContainerView","editSiteStore","goTo","useNavigator","loadCustomCSS","_react","createElement","DropdownMenu","icon","moreVertical","label","__","onClose","Fragment","MenuGroup","MenuItem","onClick","disabled","GlobalStylesNavigationScreen","className","props","__experimentalNavigatorScreen","filter","Boolean","join","BlockStylesNavigationScreens","parentMenu","blockStyles","blockName","map","style","index","key","path","name","variation","ContextScreens","blockStyleVariations","getBlockStyles","blocksStore","length","GlobalStylesStyleBook","navigator","location","isSelected","encodeURIComponent","startsWith","onSelect","GlobalStylesBlockLink","selectedBlockName","selectedBlockClientId","getSelectedBlockClientId","getBlockName","blockEditorStore","clientId","blockHasGlobalStyles","useBlockHasGlobalStyles","useEffect","currentPath","newPath","skipFocus","GlobalStylesEditorCanvasContainerLink","editorCanvasContainerView","getEditorCanvasContainerView","isRevisionsOpen","GlobalStylesUI","blocks","getBlockTypes","__experimentalNavigatorProvider","initialPath","element","block","_default"],"sources":["@wordpress/edit-site/src/components/global-styles/ui.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n\t__experimentalUseNavigator as useNavigator,\n\tcreateSlotFill,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n} from '@wordpress/components';\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ScreenRoot from './screen-root';\nimport {\n\tuseBlockHasGlobalStyles,\n\tdefault as ScreenBlockList,\n} from './screen-block-list';\nimport ScreenBlock from './screen-block';\nimport ScreenTypography from './screen-typography';\nimport ScreenTypographyElement from './screen-typography-element';\nimport ScreenColors from './screen-colors';\nimport ScreenColorPalette from './screen-color-palette';\nimport ScreenLayout from './screen-layout';\nimport ScreenStyleVariations from './screen-style-variations';\nimport StyleBook from '../style-book';\nimport ScreenCSS from './screen-css';\nimport ScreenRevisions from './screen-revisions';\nimport ScreenBackground from './screen-background';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst SLOT_FILL_NAME = 'GlobalStylesMenu';\nconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\nconst { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =\n\tcreateSlotFill( SLOT_FILL_NAME );\n\nfunction GlobalStylesActionMenu() {\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { goTo } = useNavigator();\n\tconst loadCustomCSS = () => {\n\t\tsetEditorCanvasContainerView( 'global-styles-css' );\n\t\tgoTo( '/css' );\n\t};\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t<DropdownMenu icon={ moreVertical } label={ __( 'More' ) }>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ canEditCSS && (\n\t\t\t\t\t\t\t\t<MenuItem onClick={ loadCustomCSS }>\n\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\ttoggle(\n\t\t\t\t\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t\t\t\t\t'welcomeGuideStyles'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tdisabled={ ! canReset }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset styles' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction GlobalStylesNavigationScreen( { className, ...props } ) {\n\treturn (\n\t\t<NavigatorScreen\n\t\t\tclassName={ [\n\t\t\t\t'edit-site-global-styles-sidebar__navigator-screen',\n\t\t\t\tclassName,\n\t\t\t]\n\t\t\t\t.filter( Boolean )\n\t\t\t\t.join( ' ' ) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction BlockStylesNavigationScreens( {\n\tparentMenu,\n\tblockStyles,\n\tblockName,\n} ) {\n\treturn blockStyles.map( ( style, index ) => (\n\t\t<GlobalStylesNavigationScreen\n\t\t\tkey={ index }\n\t\t\tpath={ parentMenu + '/variations/' + style.name }\n\t\t>\n\t\t\t<ScreenBlock name={ blockName } variation={ style.name } />\n\t\t</GlobalStylesNavigationScreen>\n\t) );\n}\n\nfunction ContextScreens( { name, parentMenu = '' } ) {\n\tconst blockStyleVariations = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\tpath={ parentMenu + '/colors/palette' }\n\t\t\t>\n\t\t\t\t<ScreenColorPalette name={ name } />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ !! blockStyleVariations?.length && (\n\t\t\t\t<BlockStylesNavigationScreens\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\tblockStyles={ blockStyleVariations }\n\t\t\t\t\tblockName={ name }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction GlobalStylesStyleBook() {\n\tconst navigator = useNavigator();\n\tconst { path } = navigator.location;\n\treturn (\n\t\t<StyleBook\n\t\t\tisSelected={ ( blockName ) =>\n\t\t\t\t// Match '/blocks/core%2Fbutton' and\n\t\t\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t\t\t// '/blocks/core%2Fbuttons'.\n\t\t\t\tpath === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\t\tpath.startsWith(\n\t\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t\t)\n\t\t\t}\n\t\t\tonSelect={ ( blockName ) => {\n\t\t\t\t// Now go to the selected block.\n\t\t\t\tnavigator.goTo( '/blocks/' + encodeURIComponent( blockName ) );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction GlobalStylesBlockLink() {\n\tconst navigator = useNavigator();\n\tconst { selectedBlockName, selectedBlockClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSelectedBlockClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tselectedBlockName: getBlockName( clientId ),\n\t\t\t\tselectedBlockClientId: clientId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst blockHasGlobalStyles = useBlockHasGlobalStyles( selectedBlockName );\n\t// When we're in the `Blocks` screen enable deep linking to the selected block.\n\tuseEffect( () => {\n\t\tif ( ! selectedBlockClientId || ! blockHasGlobalStyles ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentPath = navigator.location.path;\n\t\tif (\n\t\t\tcurrentPath !== '/blocks' &&\n\t\t\t! currentPath.startsWith( '/blocks/' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst newPath = '/blocks/' + encodeURIComponent( selectedBlockName );\n\t\t// Avoid navigating to the same path. This can happen when selecting\n\t\t// a new block of the same type.\n\t\tif ( newPath !== currentPath ) {\n\t\t\tnavigator.goTo( newPath, { skipFocus: true } );\n\t\t}\n\t}, [ selectedBlockClientId, selectedBlockName, blockHasGlobalStyles ] );\n}\n\nfunction GlobalStylesEditorCanvasContainerLink() {\n\tconst { goTo, location } = useNavigator();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\tconst path = location?.path;\n\tconst isRevisionsOpen = path === '/revisions';\n\n\t// If the user switches the editor canvas container view, redirect\n\t// to the appropriate screen. This effectively allows deep linking to the\n\t// desired screens from outside the global styles navigation provider.\n\tuseEffect( () => {\n\t\tswitch ( editorCanvasContainerView ) {\n\t\t\tcase 'global-styles-revisions':\n\t\t\tcase 'global-styles-revisions:style-book':\n\t\t\t\tgoTo( '/revisions' );\n\t\t\t\tbreak;\n\t\t\tcase 'global-styles-css':\n\t\t\t\tgoTo( '/css' );\n\t\t\t\tbreak;\n\t\t\tcase 'style-book':\n\t\t\t\t/*\n\t\t\t\t * The stand-alone style book is open\n\t\t\t\t * and the revisions panel is open,\n\t\t\t\t * close the revisions panel.\n\t\t\t\t * Otherwise keep the style book open while\n\t\t\t\t * browsing global styles panel.\n\t\t\t\t */\n\t\t\t\tif ( isRevisionsOpen ) {\n\t\t\t\t\tgoTo( '/' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t/*\n\t\t\t\t * Example: the user has navigated to \"Browse styles\" or elsewhere\n\t\t\t\t * and changes the editorCanvasContainerView, e.g., closes the style book.\n\t\t\t\t * The panel should not be affected.\n\t\t\t\t * Exclude revisions panel from this behavior,\n\t\t\t\t * as it should close when the editorCanvasContainerView doesn't correspond.\n\t\t\t\t */\n\t\t\t\tif ( path !== '/' && ! isRevisionsOpen ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgoTo( '/' );\n\t\t\t\tbreak;\n\t\t}\n\t}, [ editorCanvasContainerView, isRevisionsOpen, goTo ] );\n}\n\nfunction GlobalStylesUI() {\n\tconst blocks = getBlockTypes();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\treturn (\n\t\t<NavigatorProvider\n\t\t\tclassName=\"edit-site-global-styles-sidebar__navigator-provider\"\n\t\t\tinitialPath=\"/\"\n\t\t>\n\t\t\t<GlobalStylesNavigationScreen path=\"/\">\n\t\t\t\t<ScreenRoot />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/variations\">\n\t\t\t\t<ScreenStyleVariations />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/blocks\">\n\t\t\t\t<ScreenBlockList />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography\">\n\t\t\t\t<ScreenTypography />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/text\">\n\t\t\t\t<ScreenTypographyElement element=\"text\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/link\">\n\t\t\t\t<ScreenTypographyElement element=\"link\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/heading\">\n\t\t\t\t<ScreenTypographyElement element=\"heading\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/caption\">\n\t\t\t\t<ScreenTypographyElement element=\"caption\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/button\">\n\t\t\t\t<ScreenTypographyElement element=\"button\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/colors\">\n\t\t\t\t<ScreenColors />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/layout\">\n\t\t\t\t<ScreenLayout />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/css\">\n\t\t\t\t<ScreenCSS />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path={ '/revisions' }>\n\t\t\t\t<ScreenRevisions />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path={ '/background' }>\n\t\t\t\t<ScreenBackground />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\t\tkey={ 'menu-block-' + block.name }\n\t\t\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t>\n\t\t\t\t\t<ScreenBlock name={ block.name } />\n\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t) ) }\n\n\t\t\t<ContextScreens />\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<ContextScreens\n\t\t\t\t\tkey={ 'screens-block-' + block.name }\n\t\t\t\t\tname={ block.name }\n\t\t\t\t\tparentMenu={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t/>\n\t\t\t) ) }\n\n\t\t\t{ 'style-book' === editorCanvasContainerView && (\n\t\t\t\t<GlobalStylesStyleBook />\n\t\t\t) }\n\n\t\t\t<GlobalStylesActionMenu />\n\t\t\t<GlobalStylesBlockLink />\n\t\t\t<GlobalStylesEditorCanvasCont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CAAAC,aAAA,EAACY,4BAA4B;IAC5Bc,GAAG,EAAG,aAAa,GAAGuC,KAAK,CAACrC,IAAM;IAClCD,IAAI,EAAG,UAAU,GAAGY,kBAAkB,CAAE0B,KAAK,CAACrC,IAAK;EAAG,GAEtD,IAAA7B,MAAA,CAAAC,aAAA,EAACjE,YAAA,CAAAmB,OAAW;IAAC0E,IAAI,EAAGqC,KAAK,CAACrC;EAAM,CAAE,CACL,CAC7B,CAAC,EAEH,IAAA7B,MAAA,CAAAC,aAAA,EAAC8B,cAAc,MAAE,CAAC,EAEhB8B,MAAM,CAACrC,GAAG,CAAI0C,KAAK,IACpB,IAAAlE,MAAA,CAAAC,aAAA,EAAC8B,cAAc;IACdJ,GAAG,EAAG,gBAAgB,GAAGuC,KAAK,CAACrC,IAAM;IACrCA,IAAI,EAAGqC,KAAK,CAACrC,IAAM;IACnBR,UAAU,EAAG,UAAU,GAAGmB,kBAAkB,CAAE0B,KAAK,CAACrC,IAAK;EAAG,CAC5D,CACA,CAAC,EAED,YAAY,KAAK4B,yBAAyB,IAC3C,IAAAzD,MAAA,CAAAC,aAAA,EAACmC,qBAAqB,MAAE,CACxB,EAED,IAAApC,MAAA,CAAAC,aAAA,EAACtB,sBAAsB,MAAE,CAAC,EAC1B,IAAAqB,MAAA,CAAAC,aAAA,EAAC0C,qBAAqB,MAAE,CAAC,EACzB,IAAA3C,MAAA,CAAAC,aAAA,EAACuD,qCAAqC,MAAE,CACtB,CAAC;AAEtB;AAAC,IAAAW,QAAA,GAAAzF,OAAA,CAAAvB,OAAA,GAEcyG,cAAc","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getVariationClassName","variation","getFontFamilyFromSetting","fontFamilies","setting","Array","isArray","fontFamilyVariable","replace","fontFamilySlug","split","slice","find","fontFamily","slug","getFontFamilies","themeJson","settings","typography","theme","bodyFontFamilySetting","styles","bodyFontFamily","headingFontFamilySetting","elements","heading","headingFontFamily"],"sources":["@wordpress/edit-site/src/components/global-styles/utils.js"],"sourcesContent":["/**\n *\n * @param {string} variation The variation name.\n *\n * @return {string} The variation class name.\n */\nexport function getVariationClassName( variation ) {\n\tif ( ! variation ) {\n\t\treturn '';\n\t}\n\treturn `is-style-${ variation }`;\n}\n\nfunction getFontFamilyFromSetting( fontFamilies, setting ) {\n\tif ( ! Array.isArray( fontFamilies ) || ! setting ) {\n\t\treturn null;\n\t}\n\n\tconst fontFamilyVariable = setting.replace( 'var(', '' ).replace( ')', '' );\n\tconst fontFamilySlug = fontFamilyVariable?.split( '--' ).slice( -1 )[ 0 ];\n\n\treturn fontFamilies.find(\n\t\t( fontFamily ) => fontFamily.slug === fontFamilySlug\n\t);\n}\n\nexport function getFontFamilies( themeJson ) {\n\tconst fontFamilies = themeJson?.settings?.typography?.fontFamilies?.theme; // TODO this could not be under theme.\n\tconst bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily;\n\tconst bodyFontFamily = getFontFamilyFromSetting(\n\t\tfontFamilies,\n\t\tbodyFontFamilySetting\n\t);\n\n\tconst headingFontFamilySetting =\n\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily;\n\n\tlet headingFontFamily;\n\tif ( ! headingFontFamilySetting ) {\n\t\theadingFontFamily = bodyFontFamily;\n\t} else {\n\t\theadingFontFamily = getFontFamilyFromSetting(\n\t\t\tfontFamilies,\n\t\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily\n\t\t);\n\t}\n\n\treturn [ bodyFontFamily, headingFontFamily ];\n}\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,qBAAqBA,CAAEC,SAAS,EAAG;EAClD,IAAK,CAAEA,SAAS,EAAG;IAClB,OAAO,EAAE;EACV;EACA,OAAQ,YAAYA,SAAW,EAAC;AACjC;AAEA,SAASC,wBAAwBA,CAAEC,YAAY,EAAEC,OAAO,EAAG;EAC1D,IAAK,CAAEC,KAAK,CAACC,OAAO,CAAEH,YAAa,CAAC,IAAI,CAAEC,OAAO,EAAG;IACnD,OAAO,IAAI;EACZ;EAEA,MAAMG,kBAAkB,GAAGH,OAAO,CAACI,OAAO,CAAE,MAAM,EAAE,EAAG,CAAC,CAACA,OAAO,CAAE,GAAG,EAAE,EAAG,CAAC;EAC3E,MAAMC,cAAc,GAAGF,kBAAkB,EAAEG,KAAK,CAAE,IAAK,CAAC,CAACC,KAAK,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE;EAEzE,OAAOR,YAAY,CAACS,IAAI,CACrBC,UAAU,IAAMA,UAAU,CAACC,IAAI,KAAKL,cACvC,CAAC;AACF;AAEO,SAASM,eAAeA,CAAEC,SAAS,EAAG;EAC5C,MAAMb,YAAY,GAAGa,SAAS,EAAEC,QAAQ,EAAEC,UAAU,EAAEf,YAAY,EAAEgB,KAAK,CAAC,CAAC;EAC3E,MAAMC,qBAAqB,GAAGJ,SAAS,EAAEK,MAAM,EAAEH,UAAU,EAAEL,UAAU;EACvE,MAAMS,cAAc,GAAGpB,wBAAwB,CAC9CC,YAAY,EACZiB,qBACD,CAAC;EAED,MAAMG,wBAAwB,GAC7BP,SAAS,EAAEK,MAAM,EAAEG,QAAQ,EAAEC,OAAO,EAAEP,UAAU,EAAEL,UAAU;EAE7D,IAAIa,iBAAiB;EACrB,IAAK,CAAEH,wBAAwB,EAAG;IACjCG,iBAAiB,GAAGJ,cAAc;EACnC,CAAC,MAAM;IACNI,iBAAiB,GAAGxB,wBAAwB,CAC3CC,YAAY,EACZa,SAAS,EAAEK,MAAM,EAAEG,QAAQ,EAAEC,OAAO,EAAEP,UAAU,EAAEL,UACnD,CAAC;EACF;EAEA,OAAO,CAAES,cAAc,EAAEI,iBAAiB,CAAE;AAC7C"}
|
|
1
|
+
{"version":3,"names":["getVariationClassName","variation","getFontFamilyFromSetting","fontFamilies","setting","Array","isArray","fontFamilyVariable","replace","fontFamilySlug","split","slice","find","fontFamily","slug","getFontFamilies","themeJson","settings","typography","theme","bodyFontFamilySetting","styles","bodyFontFamily","headingFontFamilySetting","elements","heading","headingFontFamily"],"sources":["@wordpress/edit-site/src/components/global-styles/utils.js"],"sourcesContent":["/**\n *\n * @param {string} variation The variation name.\n *\n * @return {string} The variation class name.\n */\nexport function getVariationClassName( variation ) {\n\tif ( ! variation ) {\n\t\treturn '';\n\t}\n\treturn `is-style-${ variation }`;\n}\n\nfunction getFontFamilyFromSetting( fontFamilies, setting ) {\n\tif ( ! Array.isArray( fontFamilies ) || ! setting ) {\n\t\treturn null;\n\t}\n\n\tconst fontFamilyVariable = setting.replace( 'var(', '' ).replace( ')', '' );\n\tconst fontFamilySlug = fontFamilyVariable?.split( '--' ).slice( -1 )[ 0 ];\n\n\treturn fontFamilies.find(\n\t\t( fontFamily ) => fontFamily.slug === fontFamilySlug\n\t);\n}\n\nexport function getFontFamilies( themeJson ) {\n\tconst fontFamilies = themeJson?.settings?.typography?.fontFamilies?.theme; // TODO this could not be under theme.\n\tconst bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily;\n\tconst bodyFontFamily = getFontFamilyFromSetting(\n\t\tfontFamilies,\n\t\tbodyFontFamilySetting\n\t);\n\n\tconst headingFontFamilySetting =\n\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily;\n\n\tlet headingFontFamily;\n\tif ( ! headingFontFamilySetting ) {\n\t\theadingFontFamily = bodyFontFamily;\n\t} else {\n\t\theadingFontFamily = getFontFamilyFromSetting(\n\t\t\tfontFamilies,\n\t\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily\n\t\t);\n\t}\n\n\treturn [ bodyFontFamily, headingFontFamily ];\n}\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,qBAAqBA,CAAEC,SAAS,EAAG;EAClD,IAAK,CAAEA,SAAS,EAAG;IAClB,OAAO,EAAE;EACV;EACA,OAAQ,YAAYA,SAAW,EAAC;AACjC;AAEA,SAASC,wBAAwBA,CAAEC,YAAY,EAAEC,OAAO,EAAG;EAC1D,IAAK,CAAEC,KAAK,CAACC,OAAO,CAAEH,YAAa,CAAC,IAAI,CAAEC,OAAO,EAAG;IACnD,OAAO,IAAI;EACZ;EAEA,MAAMG,kBAAkB,GAAGH,OAAO,CAACI,OAAO,CAAE,MAAM,EAAE,EAAG,CAAC,CAACA,OAAO,CAAE,GAAG,EAAE,EAAG,CAAC;EAC3E,MAAMC,cAAc,GAAGF,kBAAkB,EAAEG,KAAK,CAAE,IAAK,CAAC,CAACC,KAAK,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE;EAEzE,OAAOR,YAAY,CAACS,IAAI,CACrBC,UAAU,IAAMA,UAAU,CAACC,IAAI,KAAKL,cACvC,CAAC;AACF;AAEO,SAASM,eAAeA,CAAEC,SAAS,EAAG;EAC5C,MAAMb,YAAY,GAAGa,SAAS,EAAEC,QAAQ,EAAEC,UAAU,EAAEf,YAAY,EAAEgB,KAAK,CAAC,CAAC;EAC3E,MAAMC,qBAAqB,GAAGJ,SAAS,EAAEK,MAAM,EAAEH,UAAU,EAAEL,UAAU;EACvE,MAAMS,cAAc,GAAGpB,wBAAwB,CAC9CC,YAAY,EACZiB,qBACD,CAAC;EAED,MAAMG,wBAAwB,GAC7BP,SAAS,EAAEK,MAAM,EAAEG,QAAQ,EAAEC,OAAO,EAAEP,UAAU,EAAEL,UAAU;EAE7D,IAAIa,iBAAiB;EACrB,IAAK,CAAEH,wBAAwB,EAAG;IACjCG,iBAAiB,GAAGJ,cAAc;EACnC,CAAC,MAAM;IACNI,iBAAiB,GAAGxB,wBAAwB,CAC3CC,YAAY,EACZa,SAAS,EAAEK,MAAM,EAAEG,QAAQ,EAAEC,OAAO,EAAEP,UAAU,EAAEL,UACnD,CAAC;EACF;EAEA,OAAO,CAAES,cAAc,EAAEI,iBAAiB,CAAE;AAC7C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_classnames","_interopRequireDefault","require","_element","_keycodes","_i18n","_blockEditor","_globalStylesProvider","_lockUnlock","GlobalStylesContext","areGlobalStyleConfigsEqual","unlock","blockEditorPrivateApis","Variation","variation","children","isFocused","setIsFocused","useState","base","user","setUserConfig","useContext","context","useMemo","_variation$settings","_variation$styles","settings","styles","merged","mergeBaseAndUserConfigs","selectVariation","selectOnEnter","event","keyCode","ENTER","preventDefault","isActive","label","title","description","sprintf","__","_react","createElement","Provider","value","className","classnames","role","onClick","onKeyDown","tabIndex","onFocus","onBlur"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variation.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, useContext, useState } from '@wordpress/element';\nimport { ENTER } from '@wordpress/keycodes';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from '../global-styles-provider';\nimport { unlock } from '../../../lock-unlock';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nexport default function Variation( { variation, children } ) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst { base, user, setUserConfig } = useContext( GlobalStylesContext );\n\tconst context = useMemo(\n\t\t() => ( {\n\t\t\tuser: {\n\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\tstyles: variation.styles ?? {},\n\t\t\t},\n\t\t\tbase,\n\t\t\tmerged: mergeBaseAndUserConfigs( base, variation ),\n\t\t\tsetUserConfig: () => {},\n\t\t} ),\n\t\t[ variation, base ]\n\t);\n\n\tconst selectVariation = () => {\n\t\tsetUserConfig( () => ( {\n\t\t\tsettings: variation.settings,\n\t\t\tstyles: variation.styles,\n\t\t} ) );\n\t};\n\n\tconst selectOnEnter = ( event ) => {\n\t\tif ( event.keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\t\t\tselectVariation();\n\t\t}\n\t};\n\n\tconst isActive = useMemo(\n\t\t() => areGlobalStyleConfigsEqual( user, variation ),\n\t\t[ user, variation ]\n\t);\n\n\tlet label = variation?.title;\n\tif ( variation?.description ) {\n\t\tlabel = sprintf(\n\t\t\t/* translators: %1$s: variation title. %2$s variation description. */\n\t\t\t__( '%1$s (%2$s)' ),\n\t\t\tvariation?.title,\n\t\t\tvariation?.description\n\t\t);\n\t}\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ context }>\n\t\t\t<div\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'edit-site-global-styles-variations_item',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-active': isActive,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\trole=\"button\"\n\t\t\t\tonClick={ selectVariation }\n\t\t\t\tonKeyDown={ selectOnEnter }\n\t\t\t\ttabIndex=\"0\"\n\t\t\t\taria-label={ label }\n\t\t\t\taria-current={ isActive }\n\t\t\t\tonFocus={ () => setIsFocused( true ) }\n\t\t\t\tonBlur={ () => setIsFocused( false ) }\n\t\t\t>\n\t\t\t\t<div className=\"edit-site-global-styles-variations_item-preview\">\n\t\t\t\t\t{ children( isFocused ) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAKA,IAAAK,qBAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAjBA;AACA;AACA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;;AAIA,MAAM;EAAEO,mBAAmB;EAAEC;AAA2B,CAAC,GAAG,IAAAC,kBAAM,EACjEC,wBACD,CAAC;AAEc,SAASC,SAASA,CAAE;EAAEC,SAAS;EAAEC;AAAS,CAAC,EAAG;EAC5D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AS,EAAE0B,WAAW,EAAG;IAC7BF,KAAK,GAAG,IAAAG,aAAO,GACd;IACA,IAAAC,QAAE,EAAE,aAAc,CAAC,EACnB5B,SAAS,EAAEyB,KAAK,EAChBzB,SAAS,EAAE0B,WACZ,CAAC;EACF;EAEA,OACC,IAAAG,MAAA,CAAAC,aAAA,EAACnC,mBAAmB,CAACoC,QAAQ;IAACC,KAAK,EAAGvB;EAAS,GAC9C,IAAAoB,MAAA,CAAAC,aAAA;IACCG,SAAS,EAAG,IAAAC,mBAAU,EACrB,yCAAyC,EACzC;MACC,WAAW,EAAEX;IACd,CACD,CAAG;IACHY,IAAI,EAAC,QAAQ;IACbC,OAAO,EAAGnB,eAAiB;IAC3BoB,SAAS,EAAGnB,aAAe;IAC3BoB,QAAQ,EAAC,GAAG;IACZ,cAAad,KAAO;IACpB,gBAAeD,QAAU;IACzBgB,OAAO,EAAGA,CAAA,KAAMpC,YAAY,CAAE,IAAK,CAAG;IACtCqC,MAAM,EAAGA,CAAA,KAAMrC,YAAY,CAAE,KAAM;EAAG,GAEtC,IAAA0B,MAAA,CAAAC,aAAA;IAAKG,SAAS,EAAC;EAAiD,GAC7DhC,QAAQ,CAAEC,SAAU,CAClB,CACD,CACwB,CAAC;AAEjC"}
|
|
1
|
+
{"version":3,"names":["_classnames","_interopRequireDefault","require","_element","_keycodes","_i18n","_blockEditor","_globalStylesProvider","_lockUnlock","GlobalStylesContext","areGlobalStyleConfigsEqual","unlock","blockEditorPrivateApis","Variation","variation","children","isFocused","setIsFocused","useState","base","user","setUserConfig","useContext","context","useMemo","_variation$settings","_variation$styles","settings","styles","merged","mergeBaseAndUserConfigs","selectVariation","selectOnEnter","event","keyCode","ENTER","preventDefault","isActive","label","title","description","sprintf","__","_react","createElement","Provider","value","className","classnames","role","onClick","onKeyDown","tabIndex","onFocus","onBlur"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variation.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, useContext, useState } from '@wordpress/element';\nimport { ENTER } from '@wordpress/keycodes';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from '../global-styles-provider';\nimport { unlock } from '../../../lock-unlock';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nexport default function Variation( { variation, children } ) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst { base, user, setUserConfig } = useContext( GlobalStylesContext );\n\tconst context = useMemo(\n\t\t() => ( {\n\t\t\tuser: {\n\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\tstyles: variation.styles ?? {},\n\t\t\t},\n\t\t\tbase,\n\t\t\tmerged: mergeBaseAndUserConfigs( base, variation ),\n\t\t\tsetUserConfig: () => {},\n\t\t} ),\n\t\t[ variation, base ]\n\t);\n\n\tconst selectVariation = () => {\n\t\tsetUserConfig( () => ( {\n\t\t\tsettings: variation.settings,\n\t\t\tstyles: variation.styles,\n\t\t} ) );\n\t};\n\n\tconst selectOnEnter = ( event ) => {\n\t\tif ( event.keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\t\t\tselectVariation();\n\t\t}\n\t};\n\n\tconst isActive = useMemo(\n\t\t() => areGlobalStyleConfigsEqual( user, variation ),\n\t\t[ user, variation ]\n\t);\n\n\tlet label = variation?.title;\n\tif ( variation?.description ) {\n\t\tlabel = sprintf(\n\t\t\t/* translators: %1$s: variation title. %2$s variation description. */\n\t\t\t__( '%1$s (%2$s)' ),\n\t\t\tvariation?.title,\n\t\t\tvariation?.description\n\t\t);\n\t}\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ context }>\n\t\t\t<div\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'edit-site-global-styles-variations_item',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-active': isActive,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\trole=\"button\"\n\t\t\t\tonClick={ selectVariation }\n\t\t\t\tonKeyDown={ selectOnEnter }\n\t\t\t\ttabIndex=\"0\"\n\t\t\t\taria-label={ label }\n\t\t\t\taria-current={ isActive }\n\t\t\t\tonFocus={ () => setIsFocused( true ) }\n\t\t\t\tonBlur={ () => setIsFocused( false ) }\n\t\t\t>\n\t\t\t\t<div className=\"edit-site-global-styles-variations_item-preview\">\n\t\t\t\t\t{ children( isFocused ) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAKA,IAAAK,qBAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAjBA;AACA;AACA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;;AAIA,MAAM;EAAEO,mBAAmB;EAAEC;AAA2B,CAAC,GAAG,IAAAC,kBAAM,EACjEC,wBACD,CAAC;AAEc,SAASC,SAASA,CAAE;EAAEC,SAAS;EAAEC;AAAS,CAAC,EAAG;EAC5D,MAAM,CAAEC,SAAS,EAAEC,YAAY,CAAE,GAAG,IAAAC,iBAAQ,EAAE,KAAM,CAAC;EACrD,MAAM;IAAEC,IAAI;IAAEC,IAAI;IAAEC;EAAc,CAAC,GAAG,IAAAC,mBAAU,EAAEb,mBAAoB,CAAC;EACvE,MAAMc,OAAO,GAAG,IAAAC,gBAAO,EACtB;IAAA,IAAAC,mBAAA,EAAAC,iBAAA;IAAA,OAAQ;MACPN,IAAI,EAAE;QACLO,QAAQ,GAAAF,mBAAA,GAAEX,SAAS,CAACa,QAAQ,cAAAF,mBAAA,cAAAA,mBAA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CACD,CAAG;IACHY,IAAI,EAAC,QAAQ;IACbC,OAAO,EAAGnB,eAAiB;IAC3BoB,SAAS,EAAGnB,aAAe;IAC3BoB,QAAQ,EAAC,GAAG;IACZ,cAAad,KAAO;IACpB,gBAAeD,QAAU;IACzBgB,OAAO,EAAGA,CAAA,KAAMpC,YAAY,CAAE,IAAK,CAAG;IACtCqC,MAAM,EAAGA,CAAA,KAAMrC,YAAY,CAAE,KAAM;EAAG,GAEtC,IAAA0B,MAAA,CAAAC,aAAA;IAAKG,SAAS,EAAC;EAAiD,GAC7DhC,QAAQ,CAAEC,SAAU,CAClB,CACD,CACwB,CAAC;AAEjC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_variation","_interopRequireDefault","_previewColors","_hooks","_subtitle","ColorVariations","title","gap","colorVariations","useColorVariations","length","_react","createElement","__experimentalVStack","spacing","default","level","__experimentalGrid","columns","map","variation","index","key"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-color.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport Variation from './variation';\nimport StylesPreviewColors from '../preview-colors';\nimport { useColorVariations } from '../hooks';\nimport Subtitle from '../subtitle';\n\nexport default function ColorVariations( { title, gap = 2 } ) {\n\tconst colorVariations = useColorVariations();\n\n\tif ( ! colorVariations?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }\n\t\t\t<Grid columns={ 3 } gap={ gap }>\n\t\t\t\t{ colorVariations.map( ( variation, index ) => (\n\t\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t\t{ () => <StylesPreviewColors /> }\n\t\t\t\t\t</Variation>\n\t\t\t\t) ) }\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAH,sBAAA,CAAAF,OAAA;AAdA;AACA;AACA;;AAMA;AACA;AACA;;AAMe,SAASM,eAAeA,CAAE;EAAEC,KAAK;EAAEC,GAAG,GAAG;AAAE,CAAC,EAAG;EAC7D,MAAMC,eAAe,GAAG,IAAAC,yBAAkB,EAAC,CAAC;EAE5C,IAAK,CAAED,eAAe,EAAEE,MAAM,EAAG;IAChC,OAAO,IAAI;EACZ;EAEA,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACd,WAAA,CAAAe,oBAAM;IAACC,OAAO,EAAG;EAAG,GAClBR,KAAK,IAAI,IAAAK,MAAA,CAAAC,aAAA,EAACR,SAAA,CAAAW,OAAQ;IAACC,KAAK,EAAG;EAAG,GAAGV,KAAiB,CAAC,EACrD,IAAAK,MAAA,CAAAC,aAAA,EAACd,WAAA,CAAAmB,kBAAI;IAACC,OAAO,EAAG,CAAG;IAACX,GAAG,EAAGA;EAAK,GAC5BC,eAAe,CAACW,GAAG,CAAE,CAAEC,SAAS,EAAEC,KAAK,KACxC,IAAAV,MAAA,CAAAC,aAAA,EAACZ,UAAA,CAAAe,OAAS;IAACO,GAAG,EAAGD,KAAO;IAACD,SAAS,EAAGA;EAAW,GAC7C,MAAM,IAAAT,MAAA,CAAAC,aAAA,EAACV,cAAA,CAAAa,OAAmB,MAAE,CACpB,CACV,CACG,CACC,CAAC;AAEX"}
|
|
1
|
+
{"version":3,"names":["_components","require","_variation","_interopRequireDefault","_previewColors","_hooks","_subtitle","ColorVariations","title","gap","colorVariations","useColorVariations","length","_react","createElement","__experimentalVStack","spacing","default","level","__experimentalGrid","columns","map","variation","index","key"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-color.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport Variation from './variation';\nimport StylesPreviewColors from '../preview-colors';\nimport { useColorVariations } from '../hooks';\nimport Subtitle from '../subtitle';\n\nexport default function ColorVariations( { title, gap = 2 } ) {\n\tconst colorVariations = useColorVariations();\n\n\tif ( ! colorVariations?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }\n\t\t\t<Grid columns={ 3 } gap={ gap }>\n\t\t\t\t{ colorVariations.map( ( variation, index ) => (\n\t\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t\t{ () => <StylesPreviewColors /> }\n\t\t\t\t\t</Variation>\n\t\t\t\t) ) }\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAH,sBAAA,CAAAF,OAAA;AAdA;AACA;AACA;;AAMA;AACA;AACA;;AAMe,SAASM,eAAeA,CAAE;EAAEC,KAAK;EAAEC,GAAG,GAAG;AAAE,CAAC,EAAG;EAC7D,MAAMC,eAAe,GAAG,IAAAC,yBAAkB,EAAC,CAAC;EAE5C,IAAK,CAAED,eAAe,EAAEE,MAAM,EAAG;IAChC,OAAO,IAAI;EACZ;EAEA,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACd,WAAA,CAAAe,oBAAM;IAACC,OAAO,EAAG;EAAG,GAClBR,KAAK,IAAI,IAAAK,MAAA,CAAAC,aAAA,EAACR,SAAA,CAAAW,OAAQ;IAACC,KAAK,EAAG;EAAG,GAAGV,KAAiB,CAAC,EACrD,IAAAK,MAAA,CAAAC,aAAA,EAACd,WAAA,CAAAmB,kBAAI;IAACC,OAAO,EAAG,CAAG;IAACX,GAAG,EAAGA;EAAK,GAC5BC,eAAe,CAACW,GAAG,CAAE,CAAEC,SAAS,EAAEC,KAAK,KACxC,IAAAV,MAAA,CAAAC,aAAA,EAACZ,UAAA,CAAAe,OAAS;IAACO,GAAG,EAAGD,KAAO;IAACD,SAAS,EAAGA;EAAW,GAC7C,MAAM,IAAAT,MAAA,CAAAC,aAAA,EAACV,cAAA,CAAAa,OAAmB,MAAE,CACpB,CACV,CACG,CACC,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_blocks","require","_data","_components","_navigationButton","getCoreBlockStyles","blockStyles","filter","style","source","useBlockVariations","name","useSelect","select","getBlockStyles","blocksStore","coreBlockStyles","VariationsPanel","_react","createElement","__experimentalItemGroup","isBordered","isSeparated","map","index","isDefault","NavigationButtonAsItem","key","path","encodeURIComponent","label"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\n/**\n * Internal dependencies\n */\n\nimport { NavigationButtonAsItem } from '../navigation-button';\n\nfunction getCoreBlockStyles( blockStyles ) {\n\treturn blockStyles?.filter( ( style ) => style.source === 'block' );\n}\n\nexport function useBlockVariations( name ) {\n\tconst blockStyles = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\tconst coreBlockStyles = getCoreBlockStyles( blockStyles );\n\treturn coreBlockStyles;\n}\n\nexport function VariationsPanel( { name } ) {\n\tconst coreBlockStyles = useBlockVariations( name );\n\n\treturn (\n\t\t<ItemGroup isBordered isSeparated>\n\t\t\t{ coreBlockStyles.map( ( style, index ) => {\n\t\t\t\tif ( style?.isDefault ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tpath={\n\t\t\t\t\t\t\t'/blocks/' +\n\t\t\t\t\t\t\tencodeURIComponent( name ) +\n\t\t\t\t\t\t\t'/variations/' +\n\t\t\t\t\t\t\tencodeURIComponent( style.name )\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ style.label }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ style.label }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ItemGroup>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,iBAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAIA;AACA;AACA;;AAIA,SAASI,kBAAkBA,CAAEC,WAAW,EAAG;EAC1C,OAAOA,WAAW,EAAEC,MAAM,CAAIC,KAAK,IAAMA,KAAK,CAACC,MAAM,KAAK,OAAQ,CAAC;AACpE;AAEO,SAASC,kBAAkBA,CAAEC,IAAI,EAAG;EAC1C,MAAML,WAAW,GAAG,IAAAM,eAAS,EAC1BC,MAAM,IAAM;IACb,MAAM;MAAEC;IAAe,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;IAChD,OAAOD,cAAc,CAAEH,IAAK,CAAC;EAC9B,CAAC,EACD,CAAEA,IAAI,CACP,CAAC;EACD,MAAMK,eAAe,GAAGX,kBAAkB,CAAEC,WAAY,CAAC;EACzD,OAAOU,eAAe;AACvB;AAEO,SAASC,eAAeA,CAAE;EAAEN;AAAK,CAAC,EAAG;EAC3C,MAAMK,eAAe,GAAGN,kBAAkB,CAAEC,IAAK,CAAC;EAElD,OACC,IAAAO,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAiB,uBAAS;IAACC,UAAU;IAACC,WAAW;EAAA,GAC9BN,eAAe,CAACO,GAAG,CAAE,CAAEf,KAAK,EAAEgB,KAAK,KAAM;IAC1C,IAAKhB,KAAK,EAAEiB,SAAS,EAAG;MACvB,OAAO,IAAI;IACZ;IACA,OACC,IAAAP,MAAA,CAAAC,aAAA,EAACf,iBAAA,CAAAsB,sBAAsB;MACtBC,GAAG,EAAGH,KAAO;MACbI,IAAI,EACH,UAAU,GACVC,kBAAkB,CAAElB,IAAK,CAAC,GAC1B,cAAc,GACdkB,kBAAkB,CAAErB,KAAK,CAACG,IAAK,CAC/B;MACD,cAAaH,KAAK,CAACsB;IAAO,GAExBtB,KAAK,CAACsB,KACe,CAAC;EAE3B,CAAE,CACQ,CAAC;AAEd"}
|
|
1
|
+
{"version":3,"names":["_blocks","require","_data","_components","_navigationButton","getCoreBlockStyles","blockStyles","filter","style","source","useBlockVariations","name","useSelect","select","getBlockStyles","blocksStore","coreBlockStyles","VariationsPanel","_react","createElement","__experimentalItemGroup","isBordered","isSeparated","map","index","isDefault","NavigationButtonAsItem","key","path","encodeURIComponent","label"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\n/**\n * Internal dependencies\n */\n\nimport { NavigationButtonAsItem } from '../navigation-button';\n\nfunction getCoreBlockStyles( blockStyles ) {\n\treturn blockStyles?.filter( ( style ) => style.source === 'block' );\n}\n\nexport function useBlockVariations( name ) {\n\tconst blockStyles = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\tconst coreBlockStyles = getCoreBlockStyles( blockStyles );\n\treturn coreBlockStyles;\n}\n\nexport function VariationsPanel( { name } ) {\n\tconst coreBlockStyles = useBlockVariations( name );\n\n\treturn (\n\t\t<ItemGroup isBordered isSeparated>\n\t\t\t{ coreBlockStyles.map( ( style, index ) => {\n\t\t\t\tif ( style?.isDefault ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tpath={\n\t\t\t\t\t\t\t'/blocks/' +\n\t\t\t\t\t\t\tencodeURIComponent( name ) +\n\t\t\t\t\t\t\t'/variations/' +\n\t\t\t\t\t\t\tencodeURIComponent( style.name )\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ style.label }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ style.label }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ItemGroup>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,iBAAA,GAAAH,OAAA;AAVA;AACA;AACA;;AAIA;AACA;AACA;;AAIA,SAASI,kBAAkBA,CAAEC,WAAW,EAAG;EAC1C,OAAOA,WAAW,EAAEC,MAAM,CAAIC,KAAK,IAAMA,KAAK,CAACC,MAAM,KAAK,OAAQ,CAAC;AACpE;AAEO,SAASC,kBAAkBA,CAAEC,IAAI,EAAG;EAC1C,MAAML,WAAW,GAAG,IAAAM,eAAS,EAC1BC,MAAM,IAAM;IACb,MAAM;MAAEC;IAAe,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;IAChD,OAAOD,cAAc,CAAEH,IAAK,CAAC;EAC9B,CAAC,EACD,CAAEA,IAAI,CACP,CAAC;EACD,MAAMK,eAAe,GAAGX,kBAAkB,CAAEC,WAAY,CAAC;EACzD,OAAOU,eAAe;AACvB;AAEO,SAASC,eAAeA,CAAE;EAAEN;AAAK,CAAC,EAAG;EAC3C,MAAMK,eAAe,GAAGN,kBAAkB,CAAEC,IAAK,CAAC;EAElD,OACC,IAAAO,MAAA,CAAAC,aAAA,EAAChB,WAAA,CAAAiB,uBAAS;IAACC,UAAU;IAACC,WAAW;EAAA,GAC9BN,eAAe,CAACO,GAAG,CAAE,CAAEf,KAAK,EAAEgB,KAAK,KAAM;IAC1C,IAAKhB,KAAK,EAAEiB,SAAS,EAAG;MACvB,OAAO,IAAI;IACZ;IACA,OACC,IAAAP,MAAA,CAAAC,aAAA,EAACf,iBAAA,CAAAsB,sBAAsB;MACtBC,GAAG,EAAGH,KAAO;MACbI,IAAI,EACH,UAAU,GACVC,kBAAkB,CAAElB,IAAK,CAAC,GAC1B,cAAc,GACdkB,kBAAkB,CAAErB,KAAK,CAACG,IAAK,CAC/B;MACD,cAAaH,KAAK,CAACsB;IAAO,GAExBtB,KAAK,CAACsB,KACe,CAAC;EAE3B,CAAE,CACQ,CAAC;AAEd","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_hooks","_typographyExample","_interopRequireDefault","_previewIframe","_variation","_subtitle","TypographyVariations","title","gap","typographyVariations","useTypographyVariations","length","_react","createElement","__experimentalVStack","spacing","default","level","__experimentalGrid","columns","className","map","variation","index","key","isFocused","label","ratio","justify","style","height","overflow","fontSize"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-typography.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { useTypographyVariations } from '../hooks';\nimport TypographyExample from '../typography-example';\nimport PreviewIframe from '../preview-iframe';\nimport Variation from './variation';\nimport Subtitle from '../subtitle';\n\nexport default function TypographyVariations( { title, gap = 2 } ) {\n\tconst typographyVariations = useTypographyVariations();\n\n\tif ( ! typographyVariations?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }\n\t\t\t<Grid\n\t\t\t\tcolumns={ 3 }\n\t\t\t\tgap={ gap }\n\t\t\t\tclassName=\"edit-site-global-styles-style-variations-container\"\n\t\t\t>\n\t\t\t\t{ typographyVariations &&\n\t\t\t\t\ttypographyVariations.length &&\n\t\t\t\t\ttypographyVariations.map( ( variation, index ) => (\n\t\t\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t\t\t{ ( isFocused ) => (\n\t\t\t\t\t\t\t\t<PreviewIframe\n\t\t\t\t\t\t\t\t\tlabel={ variation?.title }\n\t\t\t\t\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ ( { ratio, key } ) => (\n\t\t\t\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\t\t\t\tkey={ key }\n\t\t\t\t\t\t\t\t\t\t\tspacing={ 10 * ratio }\n\t\t\t\t\t\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<TypographyExample\n\t\t\t\t\t\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t\t\t\t\t\t\tfontSize={ 85 * ratio }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</PreviewIframe>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Variation>\n\t\t\t\t\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AAS,EAAGA;EAAW,GAErB,CAAE;IAAEE,KAAK;IAAEH;EAAI,CAAC,KACjB,IAAAZ,MAAA,CAAAC,aAAA,EAACf,WAAA,CAAAgB,oBAAM;IACNU,GAAG,EAAGA,GAAK;IACXT,OAAO,EAAG,EAAE,GAAGY,KAAO;IACtBC,OAAO,EAAC,QAAQ;IAChBC,KAAK,EAAG;MACPC,MAAM,EAAE,MAAM;MACdC,QAAQ,EAAE;IACX;EAAG,GAEH,IAAAnB,MAAA,CAAAC,aAAA,EAACZ,kBAAA,CAAAe,OAAiB;IACjBM,SAAS,EAAGA,SAAW;IACvBU,QAAQ,EAAG,EAAE,GAAGL;EAAO,CACvB,CACM,CAEK,CAEN,CACV,CACE,CACC,CAAC;AAEX"}
|
|
1
|
+
{"version":3,"names":["_components","require","_hooks","_typographyExample","_interopRequireDefault","_previewIframe","_variation","_subtitle","TypographyVariations","title","gap","typographyVariations","useTypographyVariations","length","_react","createElement","__experimentalVStack","spacing","default","level","__experimentalGrid","columns","className","map","variation","index","key","isFocused","label","ratio","justify","style","height","overflow","fontSize"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-typography.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { useTypographyVariations } from '../hooks';\nimport TypographyExample from '../typography-example';\nimport PreviewIframe from '../preview-iframe';\nimport Variation from './variation';\nimport Subtitle from '../subtitle';\n\nexport default function TypographyVariations( { title, gap = 2 } ) {\n\tconst typographyVariations = useTypographyVariations();\n\n\tif ( ! typographyVariations?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }\n\t\t\t<Grid\n\t\t\t\tcolumns={ 3 }\n\t\t\t\tgap={ gap }\n\t\t\t\tclassName=\"edit-site-global-styles-style-variations-container\"\n\t\t\t>\n\t\t\t\t{ typographyVariations &&\n\t\t\t\t\ttypographyVariations.length &&\n\t\t\t\t\ttypographyVariations.map( ( variation, index ) => (\n\t\t\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t\t\t{ ( isFocused ) => (\n\t\t\t\t\t\t\t\t<PreviewIframe\n\t\t\t\t\t\t\t\t\tlabel={ variation?.title }\n\t\t\t\t\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ ( { ratio, key } ) => (\n\t\t\t\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\t\t\t\tkey={ key }\n\t\t\t\t\t\t\t\t\t\t\tspacing={ 10 * ratio }\n\t\t\t\t\t\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<TypographyExample\n\t\t\t\t\t\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t\t\t\t\t\t\tfontSize={ 85 * ratio }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</PreviewIframe>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Variation>\n\t\t\t\t\t) ) }\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AASA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,cAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,UAAA,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AAM,EAAE,MAAM;MACdC,QAAQ,EAAE;IACX;EAAG,GAEH,IAAAnB,MAAA,CAAAC,aAAA,EAACZ,kBAAA,CAAAe,OAAiB;IACjBM,SAAS,EAAGA,SAAW;IACvBU,QAAQ,EAAG,EAAE,GAAGL;EAAO,CACvB,CACM,CAEK,CAEN,CACV,CACE,CACC,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_data","_blockEditor","_store","_lockUnlock","useGlobalStylesOutput","unlock","blockEditorPrivateApis","useGlobalStylesRenderer","styles","settings","getSettings","useSelect","editSiteStore","updateSettings","useDispatch","useEffect","_currentStoreSettings","currentStoreSettings","nonGlobalStyles","Object","values","filter","style","isGlobalStyles","__experimentalFeatures","GlobalStylesRenderer"],"sources":["@wordpress/edit-site/src/components/global-styles-renderer/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStylesOutput } = unlock( blockEditorPrivateApis );\n\nfunction useGlobalStylesRenderer() {\n\tconst [ styles, settings ] = useGlobalStylesOutput();\n\tconst { getSettings } = useSelect( editSiteStore );\n\tconst { updateSettings } = useDispatch( editSiteStore );\n\n\tuseEffect( () => {\n\t\tif ( ! styles || ! settings ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentStoreSettings = getSettings();\n\t\tconst nonGlobalStyles = Object.values(\n\t\t\tcurrentStoreSettings.styles ?? []\n\t\t).filter( ( style ) => ! style.isGlobalStyles );\n\t\tupdateSettings( {\n\t\t\t...currentStoreSettings,\n\t\t\tstyles: [ ...nonGlobalStyles, ...styles ],\n\t\t\t__experimentalFeatures: settings,\n\t\t} );\n\t}, [ styles, settings, updateSettings, getSettings ] );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G;EACtClB,uBAAuB,CAAC,CAAC;EAEzB,OAAO,IAAI;AACZ"}
|
|
1
|
+
{"version":3,"names":["_element","require","_data","_blockEditor","_store","_lockUnlock","useGlobalStylesOutput","unlock","blockEditorPrivateApis","useGlobalStylesRenderer","styles","settings","getSettings","useSelect","editSiteStore","updateSettings","useDispatch","useEffect","_currentStoreSettings","currentStoreSettings","nonGlobalStyles","Object","values","filter","style","isGlobalStyles","__experimentalFeatures","GlobalStylesRenderer"],"sources":["@wordpress/edit-site/src/components/global-styles-renderer/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStylesOutput } = unlock( blockEditorPrivateApis );\n\nfunction useGlobalStylesRenderer() {\n\tconst [ styles, settings ] = useGlobalStylesOutput();\n\tconst { getSettings } = useSelect( editSiteStore );\n\tconst { updateSettings } = useDispatch( editSiteStore );\n\n\tuseEffect( () => {\n\t\tif ( ! styles || ! settings ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentStoreSettings = getSettings();\n\t\tconst nonGlobalStyles = Object.values(\n\t\t\tcurrentStoreSettings.styles ?? []\n\t\t).filter( ( style ) => ! style.isGlobalStyles );\n\t\tupdateSettings( {\n\t\t\t...currentStoreSettings,\n\t\t\tstyles: [ ...nonGlobalStyles, ...styles ],\n\t\t\t__experimentalFeatures: settings,\n\t\t} );\n\t}, [ styles, settings, updateSettings, getSettings ] );\n}\n\nexport function GlobalStylesRenderer() {\n\tuseGlobalStylesRenderer();\n\n\treturn null;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAXA;AACA;AACA;;AAKA;AACA;AACA;;AAIA,MAAM;EAAEK;AAAsB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAElE,SAASC,uBAAuBA,CAAA,EAAG;EAClC,MAAM,CAAEC,MAAM,EAAEC,QAAQ,CAAE,GAAGL,qBAAqB,CAAC,CAAC;EACpD,MAAM;IAAEM;EAAY,CAAC,GAAG,IAAAC,eAAS,EAAEC,YAAc,CAAC;EAClD,MAAM;IAAEC;EAAe,CAAC,GAAG,IAAAC,iBAAW,EAAEF,YAAc,CAAC;EAEvD,IAAAG,kBAAS,EAAE,MAAM;IAAA,IAAAC,qBAAA;IAChB,IAAK,CAAER,MAAM,IAAI,CAAEC,QAAQ,EAAG;MAC7B;IACD;IAEA,MAAMQ,oBAAoB,GAAGP,WAAW,CAAC,CAAC;IAC1C,MAAMQ,eAAe,GAAGC,MAAM,CAACC,MAAM,EAAAJ,qBAAA,GACpCC,oBAAoB,CAACT,MAAM,cAAAQ,qBAAA,cAAAA,qBAAA,GAAI,EAChC,CAAC,CAACK,MAAM,CAAIC,KAAK,IAAM,CAAEA,KAAK,CAACC,cAAe,CAAC;IAC/CV,cAAc,CAAE;MACf,GAAGI,oBAAoB;MACvBT,MAAM,EAAE,CAAE,GAAGU,eAAe,EAAE,GAAGV,MAAM,CAAE;MACzCgB,sBAAsB,EAAEf;IACzB,CAAE,CAAC;EACJ,CAAC,EAAE,CAAED,MAAM,EAAEC,QAAQ,EAAEI,cAAc,EAAEH,WAAW,CAAG,CAAC;AACvD;AAEO,SAASe,oBAAoBA,CAAA,EAAG;EACtClB,uBAAuB,CAAC,CAAC;EAEzB,OAAO,IAAI;AACZ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_compose","require","_blockEditor","_data","_i18n","_icons","_components","_editor","_lockUnlock","DocumentTools","EditorDocumentTools","unlock","editorPrivateApis","blockEditorMode","hasFixedToolbar","isDistractionFree","isVisualMode","useSelect","select","getEditorMode","editorStore","__unstableSetEditorMode","useDispatch","blockEditorStore","setDeviceType","isLargeViewport","useViewportMatch","isZoomedOutViewExperimentEnabled","window","__experimentalEnableZoomedOutView","isZoomedOutView","_react","createElement","disableBlockTools","listViewLabel","__","ToolbarItem","as","Button","className","icon","chevronUpDown","isPressed","label","onClick","size"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/document-tools/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { chevronUpDown } from '@wordpress/icons';\nimport { Button, ToolbarItem } from '@wordpress/components';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { DocumentTools: EditorDocumentTools } = unlock( editorPrivateApis );\n\nexport default function DocumentTools( {\n\tblockEditorMode,\n\thasFixedToolbar,\n\tisDistractionFree,\n} ) {\n\tconst { isVisualMode } = useSelect( ( select ) => {\n\t\tconst { getEditorMode } = select( editorStore );\n\n\t\treturn {\n\t\t\tisVisualMode: getEditorMode() === 'visual',\n\t\t};\n\t}, [] );\n\tconst { __unstableSetEditorMode } = useDispatch( blockEditorStore );\n\tconst { setDeviceType } = useDispatch( editorStore );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isZoomedOutViewExperimentEnabled =\n\t\twindow?.__experimentalEnableZoomedOutView && isVisualMode;\n\tconst isZoomedOutView = blockEditorMode === 'zoom-out';\n\n\treturn (\n\t\t<EditorDocumentTools\n\t\t\tdisableBlockTools={ ! isVisualMode }\n\t\t\tlistViewLabel={ __( 'List View' ) }\n\t\t>\n\t\t\t{ isZoomedOutViewExperimentEnabled &&\n\t\t\t\tisLargeViewport &&\n\t\t\t\t! isDistractionFree &&\n\t\t\t\t! hasFixedToolbar && (\n\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__zoom-out-view-toggle\"\n\t\t\t\t\t\ticon={ chevronUpDown }\n\t\t\t\t\t\tisPressed={ isZoomedOutView }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'Zoom-out View' ) }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetDeviceType( 'Desktop' );\n\t\t\t\t\t\t\t__unstableSetEditorMode(\n\t\t\t\t\t\t\t\tisZoomedOutView ? 'edit' : 'zoom-out'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t</EditorDocumentTools>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAQA,IAAAO,WAAA,GAAAP,OAAA;AAjBA;AACA;AACA;;AAYA;AACA;AACA;;AAGA,MAAM;EAAEQ,aAAa,EAAEC;AAAoB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAE3D,SAASH,aAAaA,CAAE;EACtCI,eAAe;EACfC,eAAe;EACfC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACjD,MAAM;MAAEC;IAAc,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;IAE/C,OAAO;MACNJ,YAAY,EAAEG,aAAa,CAAC,CAAC,KAAK;IACnC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,MAAM;IAAEE;EAAwB,CAAC,GAAG,IAAAC,iBAAW,EAAEC,kBAAiB,CAAC;EACnE,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAF,iBAAW,EAAEF,aAAY,CAAC;EACpD,MAAMK,eAAe,GAAG,IAAAC,yBAAgB,EAAE,QAAS,CAAC;EACpD,MAAMC,gCAAgC,GACrCC,MAAM,EAAEC,iCAAiC,IAAIb,YAAY;EAC1D,MAAMc,eAAe,GAAGjB,eAAe,KAAK,UAAU;EAEtD,OACC,IAAAkB,MAAA,CAAAC,aAAA,EAACtB,mBAAmB;IACnBuB,iBAAiB,EAAG,CAAEjB,YAAc;IACpCkB,aAAa,EAAG,IAAAC,QAAE,EAAE,WAAY;EAAG,GAEjCR,gCAAgC,IACjCF,eAAe,IACf,CAAEV,iBAAiB,IACnB,CAAED,eAAe,IAChB,IAAAiB,MAAA,CAAAC,aAAA,EAAC1B,WAAA,CAAA8B,WAAW;IACXC,EAAE,EAAGC,kBAAQ;IACbC,SAAS,EAAC,kDAAkD;IAC5DC,IAAI,EAAGC,oBAAe;IACtBC,SAAS,EAAGZ;IACZ;IACAa,KAAK,EAAG,IAAAR,QAAE,EAAE,eAAgB,CAAG;IAC/BS,OAAO,EAAGA,CAAA,KAAM;MACfpB,aAAa,CAAE,SAAU,CAAC;MAC1BH,uBAAuB,CACtBS,eAAe,GAAG,MAAM,GAAG,UAC5B,CAAC;IACF,CAAG;IACHe,IAAI,EAAC;EAAS,CACd,CAEiB,CAAC;AAExB"}
|
|
1
|
+
{"version":3,"names":["_compose","require","_blockEditor","_data","_i18n","_icons","_components","_editor","_lockUnlock","DocumentTools","EditorDocumentTools","unlock","editorPrivateApis","blockEditorMode","hasFixedToolbar","isDistractionFree","isVisualMode","useSelect","select","getEditorMode","editorStore","__unstableSetEditorMode","useDispatch","blockEditorStore","setDeviceType","isLargeViewport","useViewportMatch","isZoomedOutViewExperimentEnabled","window","__experimentalEnableZoomedOutView","isZoomedOutView","_react","createElement","disableBlockTools","listViewLabel","__","ToolbarItem","as","Button","className","icon","chevronUpDown","isPressed","label","onClick","size"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/document-tools/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { chevronUpDown } from '@wordpress/icons';\nimport { Button, ToolbarItem } from '@wordpress/components';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst { DocumentTools: EditorDocumentTools } = unlock( editorPrivateApis );\n\nexport default function DocumentTools( {\n\tblockEditorMode,\n\thasFixedToolbar,\n\tisDistractionFree,\n} ) {\n\tconst { isVisualMode } = useSelect( ( select ) => {\n\t\tconst { getEditorMode } = select( editorStore );\n\n\t\treturn {\n\t\t\tisVisualMode: getEditorMode() === 'visual',\n\t\t};\n\t}, [] );\n\tconst { __unstableSetEditorMode } = useDispatch( blockEditorStore );\n\tconst { setDeviceType } = useDispatch( editorStore );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isZoomedOutViewExperimentEnabled =\n\t\twindow?.__experimentalEnableZoomedOutView && isVisualMode;\n\tconst isZoomedOutView = blockEditorMode === 'zoom-out';\n\n\treturn (\n\t\t<EditorDocumentTools\n\t\t\tdisableBlockTools={ ! isVisualMode }\n\t\t\tlistViewLabel={ __( 'List View' ) }\n\t\t>\n\t\t\t{ isZoomedOutViewExperimentEnabled &&\n\t\t\t\tisLargeViewport &&\n\t\t\t\t! isDistractionFree &&\n\t\t\t\t! hasFixedToolbar && (\n\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__zoom-out-view-toggle\"\n\t\t\t\t\t\ticon={ chevronUpDown }\n\t\t\t\t\t\tisPressed={ isZoomedOutView }\n\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\tlabel={ __( 'Zoom-out View' ) }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetDeviceType( 'Desktop' );\n\t\t\t\t\t\t\t__unstableSetEditorMode(\n\t\t\t\t\t\t\t\tisZoomedOutView ? 'edit' : 'zoom-out'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t</EditorDocumentTools>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAQA,IAAAO,WAAA,GAAAP,OAAA;AAjBA;AACA;AACA;;AAYA;AACA;AACA;;AAGA,MAAM;EAAEQ,aAAa,EAAEC;AAAoB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,mBAAkB,CAAC;AAE3D,SAASH,aAAaA,CAAE;EACtCI,eAAe;EACfC,eAAe;EACfC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IACjD,MAAM;MAAEC;IAAc,CAAC,GAAGD,MAAM,CAAEE,aAAY,CAAC;IAE/C,OAAO;MACNJ,YAAY,EAAEG,aAAa,CAAC,CAAC,KAAK;IACnC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,MAAM;IAAEE;EAAwB,CAAC,GAAG,IAAAC,iBAAW,EAAEC,kBAAiB,CAAC;EACnE,MAAM;IAAEC;EAAc,CAAC,GAAG,IAAAF,iBAAW,EAAEF,aAAY,CAAC;EACpD,MAAMK,eAAe,GAAG,IAAAC,yBAAgB,EAAE,QAAS,CAAC;EACpD,MAAMC,gCAAgC,GACrCC,MAAM,EAAEC,iCAAiC,IAAIb,YAAY;EAC1D,MAAMc,eAAe,GAAGjB,eAAe,KAAK,UAAU;EAEtD,OACC,IAAAkB,MAAA,CAAAC,aAAA,EAACtB,mBAAmB;IACnBuB,iBAAiB,EAAG,CAAEjB,YAAc;IACpCkB,aAAa,EAAG,IAAAC,QAAE,EAAE,WAAY;EAAG,GAEjCR,gCAAgC,IACjCF,eAAe,IACf,CAAEV,iBAAiB,IACnB,CAAED,eAAe,IAChB,IAAAiB,MAAA,CAAAC,aAAA,EAAC1B,WAAA,CAAA8B,WAAW;IACXC,EAAE,EAAGC,kBAAQ;IACbC,SAAS,EAAC,kDAAkD;IAC5DC,IAAI,EAAGC,oBAAe;IACtBC,SAAS,EAAGZ;IACZ;IACAa,KAAK,EAAG,IAAAR,QAAE,EAAE,eAAgB,CAAG;IAC/BS,OAAO,EAAGA,CAAA,KAAM;MACfpB,aAAa,CAAE,SAAU,CAAC;MAC1BH,uBAAuB,CACtBS,eAAe,GAAG,MAAM,GAAG,UAC5B,CAAC;IACF,CAAG;IACHe,IAAI,EAAC;EAAS,CACd,CAEiB,CAAC;AAExB","ignoreList":[]}
|
|
@@ -11,7 +11,6 @@ var _compose = require("@wordpress/compose");
|
|
|
11
11
|
var _blockEditor = require("@wordpress/block-editor");
|
|
12
12
|
var _data = require("@wordpress/data");
|
|
13
13
|
var _element = require("@wordpress/element");
|
|
14
|
-
var _interface = require("@wordpress/interface");
|
|
15
14
|
var _i18n = require("@wordpress/i18n");
|
|
16
15
|
var _icons = require("@wordpress/icons");
|
|
17
16
|
var _components = require("@wordpress/components");
|
|
@@ -41,7 +40,8 @@ const {
|
|
|
41
40
|
} = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
|
|
42
41
|
const {
|
|
43
42
|
PostViewLink,
|
|
44
|
-
PreviewDropdown
|
|
43
|
+
PreviewDropdown,
|
|
44
|
+
PinnedItems
|
|
45
45
|
} = (0, _lockUnlock.unlock)(_editor.privateApis);
|
|
46
46
|
function HeaderEditMode() {
|
|
47
47
|
const {
|
|
@@ -157,8 +157,8 @@ function HeaderEditMode() {
|
|
|
157
157
|
disabled: isFocusMode || !hasDefaultEditorCanvasView
|
|
158
158
|
})), (0, _react.createElement)(PostViewLink, null), (0, _react.createElement)(_saveButton.default, {
|
|
159
159
|
size: "compact"
|
|
160
|
-
}), !isDistractionFree && (0, _react.createElement)(
|
|
161
|
-
scope: "core
|
|
160
|
+
}), !isDistractionFree && (0, _react.createElement)(PinnedItems.Slot, {
|
|
161
|
+
scope: "core"
|
|
162
162
|
}), (0, _react.createElement)(_moreMenu.default, {
|
|
163
163
|
showIconLabels: showIconLabels
|
|
164
164
|
}))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_classnames","_interopRequireDefault","require","_compose","_blockEditor","_data","_element","_interface","_i18n","_icons","_components","_preferences","_editor","_moreMenu","_saveButton","_documentTools","_store","_editorCanvasContainer","_lockUnlock","_constants","useShowBlockTools","unlock","blockEditorPrivateApis","PostViewLink","PreviewDropdown","editorPrivateApis","HeaderEditMode","templateType","isDistractionFree","blockEditorMode","blockSelectionStart","showIconLabels","editorCanvasView","useSelect","select","getEditedPostType","editSiteStore","getBlockSelectionStart","__unstableGetEditorMode","blockEditorStore","get","getPreference","preferencesStore","getDeviceType","editorStore","deviceType","getEditorCanvasContainerView","isLargeViewport","useViewportMatch","showFixedToolbar","showTopToolbar","blockToolbarRef","useRef","disableMotion","useReducedMotion","hasDefaultEditorCanvasView","useHasEditorCanvasContainer","isFocusMode","FOCUSABLE_ENTITIES","includes","isZoomedOutView","isBlockToolsCollapsed","setIsBlockToolsCollapsed","useState","useEffect","toolbarVariants","y","isDistractionFreeHovering","view","edit","toolbarTransition","type","duration","ease","_react","createElement","className","classnames","__unstableMotion","div","variants","transition","default","Fragment","BlockToolbar","hideDragHandle","Popover","Slot","ref","name","Button","icon","next","previous","onClick","collapsed","label","__","size","getEditorCanvasContainerTitle","DocumentBar","disabled","PinnedItems","scope"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useViewportMatch, useReducedMotion } from '@wordpress/compose';\nimport {\n\tBlockToolbar,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { PinnedItems } from '@wordpress/interface';\nimport { __ } from '@wordpress/i18n';\nimport { next, previous } from '@wordpress/icons';\nimport {\n\tButton,\n\t__unstableMotion as motion,\n\tPopover,\n} from '@wordpress/components';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tDocumentBar,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport MoreMenu from './more-menu';\nimport SaveButton from '../save-button';\nimport DocumentTools from './document-tools';\nimport { store as editSiteStore } from '../../store';\nimport {\n\tgetEditorCanvasContainerTitle,\n\tuseHasEditorCanvasContainer,\n} from '../editor-canvas-container';\nimport { unlock } from '../../lock-unlock';\nimport { FOCUSABLE_ENTITIES } from '../../utils/constants';\n\nconst { useShowBlockTools } = unlock( blockEditorPrivateApis );\nconst { PostViewLink, PreviewDropdown } = unlock( editorPrivateApis );\n\nexport default function HeaderEditMode() {\n\tconst {\n\t\ttemplateType,\n\t\tisDistractionFree,\n\t\tblockEditorMode,\n\t\tblockSelectionStart,\n\t\tshowIconLabels,\n\t\teditorCanvasView,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditedPostType } = select( editSiteStore );\n\t\tconst { getBlockSelectionStart, __unstableGetEditorMode } =\n\t\t\tselect( blockEditorStore );\n\t\tconst { get: getPreference } = select( preferencesStore );\n\t\tconst { getDeviceType } = select( editorStore );\n\n\t\treturn {\n\t\t\tdeviceType: getDeviceType(),\n\t\t\ttemplateType: getEditedPostType(),\n\t\t\tblockEditorMode: __unstableGetEditorMode(),\n\t\t\tblockSelectionStart: getBlockSelectionStart(),\n\t\t\tshowIconLabels: getPreference( 'core', 'showIconLabels' ),\n\t\t\teditorCanvasView: unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView(),\n\t\t\tisDistractionFree: getPreference( 'core', 'distractionFree' ),\n\t\t};\n\t}, [] );\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst { showFixedToolbar } = useShowBlockTools();\n\tconst showTopToolbar = isLargeViewport && showFixedToolbar;\n\tconst blockToolbarRef = useRef();\n\tconst disableMotion = useReducedMotion();\n\n\tconst hasDefaultEditorCanvasView = ! useHasEditorCanvasContainer();\n\n\tconst isFocusMode = FOCUSABLE_ENTITIES.includes( templateType );\n\n\tconst isZoomedOutView = blockEditorMode === 'zoom-out';\n\n\tconst [ isBlockToolsCollapsed, setIsBlockToolsCollapsed ] =\n\t\tuseState( true );\n\n\tuseEffect( () => {\n\t\t// If we have a new block selection, show the block tools\n\t\tif ( blockSelectionStart ) {\n\t\t\tsetIsBlockToolsCollapsed( false );\n\t\t}\n\t}, [ blockSelectionStart ] );\n\n\tconst toolbarVariants = {\n\t\tisDistractionFree: { y: '-50px' },\n\t\tisDistractionFreeHovering: { y: 0 },\n\t\tview: { y: 0 },\n\t\tedit: { y: 0 },\n\t};\n\n\tconst toolbarTransition = {\n\t\ttype: 'tween',\n\t\tduration: disableMotion ? 0 : 0.2,\n\t\tease: 'easeOut',\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames( 'edit-site-header-edit-mode', {\n\t\t\t\t'show-icon-labels': showIconLabels,\n\t\t\t} ) }\n\t\t>\n\t\t\t{ hasDefaultEditorCanvasView && (\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"edit-site-header-edit-mode__start\"\n\t\t\t\t\tvariants={ toolbarVariants }\n\t\t\t\t\ttransition={ toolbarTransition }\n\t\t\t\t>\n\t\t\t\t\t<DocumentTools\n\t\t\t\t\t\tblockEditorMode={ blockEditorMode }\n\t\t\t\t\t\tisDistractionFree={ isDistractionFree }\n\t\t\t\t\t/>\n\t\t\t\t\t{ showTopToolbar && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\t'selected-block-tools-wrapper',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'is-collapsed': isBlockToolsCollapsed,\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Popover.Slot\n\t\t\t\t\t\t\t\tref={ blockToolbarRef }\n\t\t\t\t\t\t\t\tname=\"block-toolbar\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__block-tools-toggle\"\n\t\t\t\t\t\t\t\ticon={ isBlockToolsCollapsed ? next : previous }\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tsetIsBlockToolsCollapsed(\n\t\t\t\t\t\t\t\t\t\t( collapsed ) => ! collapsed\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\tisBlockToolsCollapsed\n\t\t\t\t\t\t\t\t\t\t? __( 'Show block tools' )\n\t\t\t\t\t\t\t\t\t\t: __( 'Hide block tools' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsize=\"compact\"\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</motion.div>\n\t\t\t) }\n\n\t\t\t{ ! isDistractionFree && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'edit-site-header-edit-mode__center',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'is-collapsed':\n\t\t\t\t\t\t\t\t! isBlockToolsCollapsed && showTopToolbar,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ ! hasDefaultEditorCanvasView ? (\n\t\t\t\t\t\tgetEditorCanvasContainerTitle( editorCanvasView )\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<DocumentBar />\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t<div className=\"edit-site-header-edit-mode__end\">\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"edit-site-header-edit-mode__actions\"\n\t\t\t\t\tvariants={ toolbarVariants }\n\t\t\t\t\ttransition={ toolbarTransition }\n\t\t\t\t>\n\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'edit-site-header-edit-mode__preview-options',\n\t\t\t\t\t\t\t\t{ 'is-zoomed-out': isZoomedOutView }\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PreviewDropdown\n\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\tisFocusMode || ! hasDefaultEditorCanvasView\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t\t<PostViewLink />\n\t\t\t\t\t<SaveButton size=\"compact\" />\n\t\t\t\t\t{ ! isDistractionFree && (\n\t\t\t\t\t\t<PinnedItems.Slot scope=\"core/edit-site\" />\n\t\t\t\t\t) }\n\t\t\t\t\t<M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AAQ,EACP5C,WAAW,IAAI,CAAEF;EACjB,CACD,CACG,CACL,EACD,IAAAmB,MAAA,CAAAC,aAAA,EAACpD,YAAY,MAAE,CAAC,EAChB,IAAAmD,MAAA,CAAAC,aAAA,EAAC7D,WAAA,CAAAoE,OAAU;IAACgB,IAAI,EAAC;EAAS,CAAE,CAAC,EAC3B,CAAEtE,iBAAiB,IACpB,IAAA8C,MAAA,CAAAC,aAAA,EAACpE,UAAA,CAAA+F,WAAW,CAACf,IAAI;IAACgB,KAAK,EAAC;EAAgB,CAAE,CAC1C,EACD,IAAA7B,MAAA,CAAAC,aAAA,EAAC9D,SAAA,CAAAqE,OAAQ;IAACnD,cAAc,EAAGA;EAAgB,CAAE,CAClC,CACR,CACD,CAAC;AAER"}
|
|
1
|
+
{"version":3,"names":["_classnames","_interopRequireDefault","require","_compose","_blockEditor","_data","_element","_i18n","_icons","_components","_preferences","_editor","_moreMenu","_saveButton","_documentTools","_store","_editorCanvasContainer","_lockUnlock","_constants","useShowBlockTools","unlock","blockEditorPrivateApis","PostViewLink","PreviewDropdown","PinnedItems","editorPrivateApis","HeaderEditMode","templateType","isDistractionFree","blockEditorMode","blockSelectionStart","showIconLabels","editorCanvasView","useSelect","select","getEditedPostType","editSiteStore","getBlockSelectionStart","__unstableGetEditorMode","blockEditorStore","get","getPreference","preferencesStore","getDeviceType","editorStore","deviceType","getEditorCanvasContainerView","isLargeViewport","useViewportMatch","showFixedToolbar","showTopToolbar","blockToolbarRef","useRef","disableMotion","useReducedMotion","hasDefaultEditorCanvasView","useHasEditorCanvasContainer","isFocusMode","FOCUSABLE_ENTITIES","includes","isZoomedOutView","isBlockToolsCollapsed","setIsBlockToolsCollapsed","useState","useEffect","toolbarVariants","y","isDistractionFreeHovering","view","edit","toolbarTransition","type","duration","ease","_react","createElement","className","classnames","__unstableMotion","div","variants","transition","default","Fragment","BlockToolbar","hideDragHandle","Popover","Slot","ref","name","Button","icon","next","previous","onClick","collapsed","label","__","size","getEditorCanvasContainerTitle","DocumentBar","disabled","scope"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useViewportMatch, useReducedMotion } from '@wordpress/compose';\nimport {\n\tBlockToolbar,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { next, previous } from '@wordpress/icons';\nimport {\n\tButton,\n\t__unstableMotion as motion,\n\tPopover,\n} from '@wordpress/components';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tDocumentBar,\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport MoreMenu from './more-menu';\nimport SaveButton from '../save-button';\nimport DocumentTools from './document-tools';\nimport { store as editSiteStore } from '../../store';\nimport {\n\tgetEditorCanvasContainerTitle,\n\tuseHasEditorCanvasContainer,\n} from '../editor-canvas-container';\nimport { unlock } from '../../lock-unlock';\nimport { FOCUSABLE_ENTITIES } from '../../utils/constants';\n\nconst { useShowBlockTools } = unlock( blockEditorPrivateApis );\nconst { PostViewLink, PreviewDropdown, PinnedItems } =\n\tunlock( editorPrivateApis );\n\nexport default function HeaderEditMode() {\n\tconst {\n\t\ttemplateType,\n\t\tisDistractionFree,\n\t\tblockEditorMode,\n\t\tblockSelectionStart,\n\t\tshowIconLabels,\n\t\teditorCanvasView,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditedPostType } = select( editSiteStore );\n\t\tconst { getBlockSelectionStart, __unstableGetEditorMode } =\n\t\t\tselect( blockEditorStore );\n\t\tconst { get: getPreference } = select( preferencesStore );\n\t\tconst { getDeviceType } = select( editorStore );\n\n\t\treturn {\n\t\t\tdeviceType: getDeviceType(),\n\t\t\ttemplateType: getEditedPostType(),\n\t\t\tblockEditorMode: __unstableGetEditorMode(),\n\t\t\tblockSelectionStart: getBlockSelectionStart(),\n\t\t\tshowIconLabels: getPreference( 'core', 'showIconLabels' ),\n\t\t\teditorCanvasView: unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView(),\n\t\t\tisDistractionFree: getPreference( 'core', 'distractionFree' ),\n\t\t};\n\t}, [] );\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst { showFixedToolbar } = useShowBlockTools();\n\tconst showTopToolbar = isLargeViewport && showFixedToolbar;\n\tconst blockToolbarRef = useRef();\n\tconst disableMotion = useReducedMotion();\n\n\tconst hasDefaultEditorCanvasView = ! useHasEditorCanvasContainer();\n\n\tconst isFocusMode = FOCUSABLE_ENTITIES.includes( templateType );\n\n\tconst isZoomedOutView = blockEditorMode === 'zoom-out';\n\n\tconst [ isBlockToolsCollapsed, setIsBlockToolsCollapsed ] =\n\t\tuseState( true );\n\n\tuseEffect( () => {\n\t\t// If we have a new block selection, show the block tools\n\t\tif ( blockSelectionStart ) {\n\t\t\tsetIsBlockToolsCollapsed( false );\n\t\t}\n\t}, [ blockSelectionStart ] );\n\n\tconst toolbarVariants = {\n\t\tisDistractionFree: { y: '-50px' },\n\t\tisDistractionFreeHovering: { y: 0 },\n\t\tview: { y: 0 },\n\t\tedit: { y: 0 },\n\t};\n\n\tconst toolbarTransition = {\n\t\ttype: 'tween',\n\t\tduration: disableMotion ? 0 : 0.2,\n\t\tease: 'easeOut',\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames( 'edit-site-header-edit-mode', {\n\t\t\t\t'show-icon-labels': showIconLabels,\n\t\t\t} ) }\n\t\t>\n\t\t\t{ hasDefaultEditorCanvasView && (\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"edit-site-header-edit-mode__start\"\n\t\t\t\t\tvariants={ toolbarVariants }\n\t\t\t\t\ttransition={ toolbarTransition }\n\t\t\t\t>\n\t\t\t\t\t<DocumentTools\n\t\t\t\t\t\tblockEditorMode={ blockEditorMode }\n\t\t\t\t\t\tisDistractionFree={ isDistractionFree }\n\t\t\t\t\t/>\n\t\t\t\t\t{ showTopToolbar && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\t'selected-block-tools-wrapper',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'is-collapsed': isBlockToolsCollapsed,\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<Popover.Slot\n\t\t\t\t\t\t\t\tref={ blockToolbarRef }\n\t\t\t\t\t\t\t\tname=\"block-toolbar\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"edit-site-header-edit-mode__block-tools-toggle\"\n\t\t\t\t\t\t\t\ticon={ isBlockToolsCollapsed ? next : previous }\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tsetIsBlockToolsCollapsed(\n\t\t\t\t\t\t\t\t\t\t( collapsed ) => ! collapsed\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\tisBlockToolsCollapsed\n\t\t\t\t\t\t\t\t\t\t? __( 'Show block tools' )\n\t\t\t\t\t\t\t\t\t\t: __( 'Hide block tools' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsize=\"compact\"\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</motion.div>\n\t\t\t) }\n\n\t\t\t{ ! isDistractionFree && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'edit-site-header-edit-mode__center',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'is-collapsed':\n\t\t\t\t\t\t\t\t! isBlockToolsCollapsed && showTopToolbar,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ ! hasDefaultEditorCanvasView ? (\n\t\t\t\t\t\tgetEditorCanvasContainerTitle( editorCanvasView )\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<DocumentBar />\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t<div className=\"edit-site-header-edit-mode__end\">\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"edit-site-header-edit-mode__actions\"\n\t\t\t\t\tvariants={ toolbarVariants }\n\t\t\t\t\ttransition={ toolbarTransition }\n\t\t\t\t>\n\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'edit-site-header-edit-mode__preview-options',\n\t\t\t\t\t\t\t\t{ 'is-zoomed-out': isZoomedOutView }\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PreviewDropdown\n\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\tisFocusMode || ! hasDefaultEditorCanvasView\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t\t<PostViewLink />\n\t\t\t\t\t<SaveButton size=\"compact\" />\n\t\t\t\t\t{ ! isDistractionFree && <PinnedItems.Slot scope=\"core\" /> }\n\t\t\t\t\t<MoreMenu showIconLabels={ showIconLabels } />\n\t\t\t\t</motion.div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;A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AE,CAAC,EAC3B,CAAEtE,iBAAiB,IAAI,IAAA8C,MAAA,CAAAC,aAAA,EAACnD,WAAW,CAAC+D,IAAI;IAACe,KAAK,EAAC;EAAM,CAAE,CAAC,EAC1D,IAAA5B,MAAA,CAAAC,aAAA,EAAC/D,SAAA,CAAAsE,OAAQ;IAACnD,cAAc,EAAGA;EAAgB,CAAE,CAClC,CACR,CACD,CAAC;AAER","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_data","_i18n","_compose","_notices","_coreData","_blocks","_store","CopyContentMenuItem","createNotice","useDispatch","noticesStore","getEditedPostId","getEditedPostType","useSelect","editSiteStore","getEditedEntityRecord","coreStore","getText","record","content","blocks","__unstableSerializeAndClean","onSuccess","__","isDismissible","type","ref","useCopyToClipboard","_react","createElement","MenuItem"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/more-menu/copy-content-menu-item.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __unstableSerializeAndClean } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../../store';\n\nexport default function CopyContentMenuItem() {\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst { getEditedPostId, getEditedPostType } = useSelect( editSiteStore );\n\tconst { getEditedEntityRecord } = useSelect( coreStore );\n\n\tfunction getText() {\n\t\tconst record = getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tgetEditedPostType(),\n\t\t\tgetEditedPostId()\n\t\t);\n\t\tif ( ! record ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif ( typeof record.content === 'function' ) {\n\t\t\treturn record.content( record );\n\t\t} else if ( record.blocks ) {\n\t\t\treturn __unstableSerializeAndClean( record.blocks );\n\t\t} else if ( record.content ) {\n\t\t\treturn record.content;\n\t\t}\n\t}\n\n\tfunction onSuccess() {\n\t\tcreateNotice( 'info', __( 'All content copied.' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t}\n\n\tconst ref = useCopyToClipboard( getText, onSuccess );\n\n\treturn <MenuItem ref={ ref }>{ __( 'Copy all blocks' ) }</MenuItem>;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAKA,IAAAO,MAAA,GAAAP,OAAA;AAdA;AACA;AACA;;AASA;AACA;AACA;;AAGe,SAASQ,mBAAmBA,CAAA,EAAG;EAC7C,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,iBAAW,EAAEC,cAAa,CAAC;EACpD,MAAM;IAAEC,eAAe;IAAEC;EAAkB,CAAC,GAAG,IAAAC,eAAS,EAAEC,YAAc,CAAC;EACzE,MAAM;IAAEC;EAAsB,CAAC,GAAG,IAAAF,eAAS,EAAEG,eAAU,CAAC;EAExD,SAASC,OAAOA,CAAA,EAAG;IAClB,MAAMC,MAAM,GAAGH,qBAAqB,CACnC,UAAU,EACVH,iBAAiB,CAAC,CAAC,EACnBD,eAAe,CAAC,CACjB,CAAC;IACD,IAAK,CAAEO,MAAM,EAAG;MACf,OAAO,EAAE;IACV;IAEA,IAAK,OAAOA,MAAM,CAACC,OAAO,KAAK,UAAU,EAAG;MAC3C,OAAOD,MAAM,CAACC,OAAO,CAAED,MAAO,CAAC;IAChC,CAAC,MAAM,IAAKA,MAAM,CAACE,MAAM,EAAG;MAC3B,OAAO,IAAAC,mCAA2B,EAAEH,MAAM,CAACE,MAAO,CAAC;IACpD,CAAC,MAAM,IAAKF,MAAM,CAACC,OAAO,EAAG;MAC5B,OAAOD,MAAM,CAACC,OAAO;IACtB;EACD;EAEA,SAASG,SAASA,CAAA,EAAG;IACpBd,YAAY,CAAE,MAAM,EAAE,IAAAe,QAAE,EAAE,qBAAsB,CAAC,EAAE;MAClDC,aAAa,EAAE,IAAI;MACnBC,IAAI,EAAE;IACP,CAAE,CAAC;EACJ;EAEA,MAAMC,GAAG,GAAG,IAAAC,2BAAkB,EAAEV,OAAO,EAAEK,SAAU,CAAC;EAEpD,OAAO,IAAAM,MAAA,CAAAC,aAAA,EAAC/B,WAAA,CAAAgC,QAAQ;IAACJ,GAAG,EAAGA;EAAK,GAAG,IAAAH,QAAE,EAAE,iBAAkB,CAAa,CAAC;AACpE"}
|
|
1
|
+
{"version":3,"names":["_components","require","_data","_i18n","_compose","_notices","_coreData","_blocks","_store","CopyContentMenuItem","createNotice","useDispatch","noticesStore","getEditedPostId","getEditedPostType","useSelect","editSiteStore","getEditedEntityRecord","coreStore","getText","record","content","blocks","__unstableSerializeAndClean","onSuccess","__","isDismissible","type","ref","useCopyToClipboard","_react","createElement","MenuItem"],"sources":["@wordpress/edit-site/src/components/header-edit-mode/more-menu/copy-content-menu-item.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __unstableSerializeAndClean } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../../store';\n\nexport default function CopyContentMenuItem() {\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst { getEditedPostId, getEditedPostType } = useSelect( editSiteStore );\n\tconst { getEditedEntityRecord } = useSelect( coreStore );\n\n\tfunction getText() {\n\t\tconst record = getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tgetEditedPostType(),\n\t\t\tgetEditedPostId()\n\t\t);\n\t\tif ( ! record ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif ( typeof record.content === 'function' ) {\n\t\t\treturn record.content( record );\n\t\t} else if ( record.blocks ) {\n\t\t\treturn __unstableSerializeAndClean( record.blocks );\n\t\t} else if ( record.content ) {\n\t\t\treturn record.content;\n\t\t}\n\t}\n\n\tfunction onSuccess() {\n\t\tcreateNotice( 'info', __( 'All content copied.' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t}\n\n\tconst ref = useCopyToClipboard( getText, onSuccess );\n\n\treturn <MenuItem ref={ ref }>{ __( 'Copy all blocks' ) }</MenuItem>;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAKA,IAAAO,MAAA,GAAAP,OAAA;AAdA;AACA;AACA;;AASA;AACA;AACA;;AAGe,SAASQ,mBAAmBA,CAAA,EAAG;EAC7C,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,iBAAW,EAAEC,cAAa,CAAC;EACpD,MAAM;IAAEC,eAAe;IAAEC;EAAkB,CAAC,GAAG,IAAAC,eAAS,EAAEC,YAAc,CAAC;EACzE,MAAM;IAAEC;EAAsB,CAAC,GAAG,IAAAF,eAAS,EAAEG,eAAU,CAAC;EAExD,SAASC,OAAOA,CAAA,EAAG;IAClB,MAAMC,MAAM,GAAGH,qBAAqB,CACnC,UAAU,EACVH,iBAAiB,CAAC,CAAC,EACnBD,eAAe,CAAC,CACjB,CAAC;IACD,IAAK,CAAEO,MAAM,EAAG;MACf,OAAO,EA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