@wordpress/edit-site 5.31.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 +4 -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 +23 -7
- 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 +20 -5
- 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 +47 -11
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor-canvas-container/index.js +1 -2
- 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 +50 -0
- package/build/components/global-styles/background-panel.js.map +1 -0
- 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 +2 -2
- 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 +88 -31
- 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 +20 -2
- 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 +3 -1
- package/build/components/global-styles/palette.js.map +1 -1
- package/build/components/global-styles/preview-colors.js +2 -2
- 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 +8 -2
- package/build/components/global-styles/root-menu.js.map +1 -1
- package/build/components/global-styles/screen-background.js +34 -0
- package/build/components/global-styles/screen-background.js.map +1 -0
- 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 +2 -2
- package/build/components/global-styles/screen-color-palette.js.map +1 -1
- package/build/components/global-styles/screen-colors.js +6 -4
- 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 +3 -37
- 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 +6 -6
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/style-variations-container.js +5 -2
- 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 +5 -2
- 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 +10 -3
- 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 +9 -2
- 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 +130 -0
- package/build/components/layout/animation.js.map +1 -0
- package/build/components/layout/hooks.js.map +1 -1
- package/build/components/layout/index.js +21 -64
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/router.js +92 -23
- 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 +33 -33
- 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 +136 -39
- 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 +18 -59
- 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 +35 -80
- 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 +12 -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 +45 -16
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/save-hub/index.js +8 -112
- 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 -79
- 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 +2 -2
- package/build/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build/components/sidebar-dataviews/index.js +2 -2
- 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 +30 -56
- package/build/components/sidebar-edit-mode/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/index.js +26 -15
- package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-content.js +7 -5
- 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 +11 -17
- 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 +5 -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 +11 -7
- 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 +34 -32
- 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 +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 +16 -7
- 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 +0 -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 +1 -9
- 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 +24 -8
- 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 +20 -5
- 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 +48 -12
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor-canvas-container/index.js +1 -2
- 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 +44 -0
- package/build-module/components/global-styles/background-panel.js.map +1 -0
- 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 +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 +87 -31
- 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 +20 -2
- 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 +3 -1
- package/build-module/components/global-styles/palette.js.map +1 -1
- package/build-module/components/global-styles/preview-colors.js +2 -2
- 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 +9 -3
- package/build-module/components/global-styles/root-menu.js.map +1 -1
- package/build-module/components/global-styles/screen-background.js +26 -0
- package/build-module/components/global-styles/screen-background.js.map +1 -0
- 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 +2 -2
- package/build-module/components/global-styles/screen-color-palette.js.map +1 -1
- package/build-module/components/global-styles/screen-colors.js +6 -4
- 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 +4 -38
- 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 +6 -6
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/style-variations-container.js +5 -2
- 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 +4 -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 +10 -3
- 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 +9 -2
- 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 +123 -0
- package/build-module/components/layout/animation.js.map +1 -0
- package/build-module/components/layout/hooks.js.map +1 -1
- package/build-module/components/layout/index.js +21 -64
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/router.js +92 -23
- 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 +32 -32
- 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 +139 -42
- 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 +17 -57
- 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 +36 -81
- 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 +12 -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 +46 -17
- package/build-module/components/save-button/index.js.map +1 -1
- package/build-module/components/save-hub/index.js +10 -114
- 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 -79
- 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 +2 -2
- package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build-module/components/sidebar-dataviews/index.js +2 -2
- 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 +29 -55
- package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/index.js +29 -18
- 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 +7 -5
- 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 +12 -18
- 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 +5 -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 +12 -8
- 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 +35 -33
- 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 +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 +16 -7
- 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 +0 -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 +1 -9
- 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 +287 -688
- package/build-style/style.css +287 -688
- package/package.json +44 -45
- 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 +59 -23
- package/src/components/block-editor/site-editor-canvas.js +16 -8
- package/src/components/editor/index.js +61 -17
- package/src/components/editor-canvas-container/index.js +0 -1
- package/src/components/global-styles/background-panel.js +50 -0
- package/src/components/global-styles/block-preview-panel.js +6 -1
- package/src/components/global-styles/font-families.js +1 -1
- package/src/components/global-styles/font-library-modal/context.js +104 -50
- 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 +32 -14
- package/src/components/global-styles/font-library-modal/utils/index.js +17 -4
- package/src/components/global-styles/highlighted-colors.js +1 -1
- package/src/components/global-styles/hooks.js +20 -3
- package/src/components/global-styles/palette.js +3 -1
- package/src/components/global-styles/preview-colors.js +2 -2
- package/src/components/global-styles/root-menu.js +12 -1
- package/src/components/global-styles/screen-background.js +29 -0
- package/src/components/global-styles/screen-color-palette.js +2 -2
- package/src/components/global-styles/screen-colors.js +4 -4
- package/src/components/global-styles/screen-revisions/index.js +1 -1
- package/src/components/global-styles/screen-style-variations.js +4 -36
- package/src/components/global-styles/screen-typography.js +6 -9
- package/src/components/global-styles/style-variations-container.js +2 -1
- package/src/components/global-styles/style.scss +14 -12
- package/src/components/global-styles/ui.js +5 -0
- package/src/components/global-styles/variations/style.scss +32 -17
- package/src/components/global-styles/variations/variations-color.js +4 -2
- package/src/components/global-styles/variations/variations-typography.js +4 -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 +29 -18
- 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 +125 -0
- package/src/components/layout/index.js +21 -74
- package/src/components/layout/router.js +99 -30
- package/src/components/layout/style.scss +17 -37
- package/src/components/page/index.js +7 -2
- package/src/components/page-pages/index.js +59 -65
- 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 +182 -78
- package/src/components/page-patterns/search-items.js +16 -58
- 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 +44 -103
- package/src/components/page-templates-template-parts/style.scss +5 -0
- package/src/components/pattern-modal/duplicate.js +2 -1
- package/src/components/pattern-modal/rename.js +2 -1
- package/src/components/plugin-template-setting-panel/index.js +14 -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-button/index.js +55 -26
- package/src/components/save-hub/index.js +20 -164
- package/src/components/save-panel/index.js +2 -2
- package/src/components/sidebar/index.js +52 -105
- package/src/components/sidebar/style.scss +41 -6
- package/src/components/sidebar-dataviews/default-views.js +2 -2
- package/src/components/sidebar-dataviews/index.js +2 -2
- 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 -77
- package/src/components/sidebar-edit-mode/page-panels/index.js +52 -60
- package/src/components/sidebar-edit-mode/page-panels/page-content.js +10 -10
- 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 +24 -34
- package/src/components/sidebar-edit-mode/template-panel/style.scss +1 -29
- 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 +13 -30
- package/src/components/sidebar-navigation-screen-details-footer/index.js +6 -2
- package/src/components/sidebar-navigation-screen-global-styles/index.js +9 -24
- 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 -67
- 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/style-book/index.js +1 -3
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +52 -37
- 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/index.js +0 -1
- 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/selectors.js +3 -15
- package/src/store/test/actions.js +7 -2
- package/src/style.scss +0 -3
- package/src/utils/constants.js +1 -0
- package/src/utils/set-nested-value.js +39 -0
- package/build/components/actions/index.js +0 -319
- package/build/components/actions/index.js.map +0 -1
- 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 -116
- 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 -194
- 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-edit-mode/sidebar-card/index.js +0 -48
- package/build/components/sidebar-edit-mode/sidebar-card/index.js.map +0 -1
- package/build/components/sidebar-edit-mode/template-panel/template-areas.js +0 -70
- package/build/components/sidebar-edit-mode/template-panel/template-areas.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/sidebar-navigation-screen-pages/index.js +0 -175
- package/build/components/sidebar-navigation-screen-pages/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/hooks/template-part-edit.js +0 -82
- package/build/hooks/template-part-edit.js.map +0 -1
- package/build/store/utils.js +0 -71
- package/build/store/utils.js.map +0 -1
- package/build-module/components/actions/index.js +0 -308
- package/build-module/components/actions/index.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 -107
- 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 -185
- 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-edit-mode/sidebar-card/index.js +0 -40
- package/build-module/components/sidebar-edit-mode/sidebar-card/index.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/template-panel/template-areas.js +0 -63
- package/build-module/components/sidebar-edit-mode/template-panel/template-areas.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/sidebar-navigation-screen-pages/index.js +0 -167
- package/build-module/components/sidebar-navigation-screen-pages/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/build-module/hooks/template-part-edit.js +0 -75
- package/build-module/hooks/template-part-edit.js.map +0 -1
- package/build-module/store/utils.js +0 -64
- package/build-module/store/utils.js.map +0 -1
- package/src/components/actions/index.js +0 -409
- 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 -147
- 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 -262
- 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-edit-mode/sidebar-card/index.js +0 -53
- package/src/components/sidebar-edit-mode/sidebar-card/style.scss +0 -36
- package/src/components/sidebar-edit-mode/template-panel/template-areas.js +0 -86
- package/src/components/sidebar-navigation-screen-navigation-item/index.js +0 -59
- package/src/components/sidebar-navigation-screen-pages/index.js +0 -238
- package/src/components/sync-state-with-url/use-sync-path-with-url.js +0 -147
- package/src/hooks/template-part-edit.js +0 -89
- package/src/store/test/utils.js +0 -191
- package/src/store/utils.js +0 -69
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Component","__","doAction","ErrorBoundaryWarning","ErrorBoundary","constructor","arguments","state","error","componentDidCatch","getDerivedStateFromError","render","props","children","createElement","message"],"sources":["@wordpress/edit-site/src/components/error-boundary/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { doAction } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport ErrorBoundaryWarning from './warning';\n\nexport default class ErrorBoundary extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\terror: null,\n\t\t};\n\t}\n\n\tcomponentDidCatch( error ) {\n\t\tdoAction( 'editor.ErrorBoundary.errorLogged', error );\n\t}\n\n\tstatic getDerivedStateFromError( error ) {\n\t\treturn { error };\n\t}\n\n\trender() {\n\t\tif ( ! this.state.error ) {\n\t\t\treturn this.props.children;\n\t\t}\n\n\t\treturn (\n\t\t\t<ErrorBoundaryWarning\n\t\t\t\tmessage={ __(\n\t\t\t\t\t'The editor has encountered an unexpected error.'\n\t\t\t\t) }\n\t\t\t\terror={ this.state.error }\n\t\t\t/>\n\t\t);\n\t}\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,QAAQ,kBAAkB;;AAE3C;AACA;AACA;AACA,OAAOC,oBAAoB,MAAM,WAAW;AAE5C,eAAe,MAAMC,aAAa,SAASJ,SAAS,CAAC;EACpDK,WAAWA,CAAA,EAAG;IACb,KAAK,CAAE,GAAGC,SAAU,CAAC;IAErB,IAAI,CAACC,KAAK,GAAG;MACZC,KAAK,EAAE;IACR,CAAC;EACF;EAEAC,iBAAiBA,CAAED,KAAK,EAAG;IAC1BN,QAAQ,CAAE,kCAAkC,EAAEM,KAAM,CAAC;EACtD;EAEA,OAAOE,wBAAwBA,CAAEF,KAAK,EAAG;IACxC,OAAO;MAAEA;IAAM,CAAC;EACjB;EAEAG,MAAMA,CAAA,EAAG;IACR,IAAK,CAAE,IAAI,CAACJ,KAAK,CAACC,KAAK,EAAG;MACzB,OAAO,IAAI,CAACI,KAAK,CAACC,QAAQ;IAC3B;IAEA,OACCC,aAAA,CAACX,oBAAoB;MACpBY,OAAO,EAAGd,EAAE,CACX,iDACD,CAAG;MACHO,KAAK,EAAG,IAAI,CAACD,KAAK,CAACC;IAAO,CAC1B,CAAC;EAEJ;AACD"}
|
|
1
|
+
{"version":3,"names":["Component","__","doAction","ErrorBoundaryWarning","ErrorBoundary","constructor","arguments","state","error","componentDidCatch","getDerivedStateFromError","render","props","children","createElement","message"],"sources":["@wordpress/edit-site/src/components/error-boundary/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { doAction } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport ErrorBoundaryWarning from './warning';\n\nexport default class ErrorBoundary extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\terror: null,\n\t\t};\n\t}\n\n\tcomponentDidCatch( error ) {\n\t\tdoAction( 'editor.ErrorBoundary.errorLogged', error );\n\t}\n\n\tstatic getDerivedStateFromError( error ) {\n\t\treturn { error };\n\t}\n\n\trender() {\n\t\tif ( ! this.state.error ) {\n\t\t\treturn this.props.children;\n\t\t}\n\n\t\treturn (\n\t\t\t<ErrorBoundaryWarning\n\t\t\t\tmessage={ __(\n\t\t\t\t\t'The editor has encountered an unexpected error.'\n\t\t\t\t) }\n\t\t\t\terror={ this.state.error }\n\t\t\t/>\n\t\t);\n\t}\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,QAAQ,kBAAkB;;AAE3C;AACA;AACA;AACA,OAAOC,oBAAoB,MAAM,WAAW;AAE5C,eAAe,MAAMC,aAAa,SAASJ,SAAS,CAAC;EACpDK,WAAWA,CAAA,EAAG;IACb,KAAK,CAAE,GAAGC,SAAU,CAAC;IAErB,IAAI,CAACC,KAAK,GAAG;MACZC,KAAK,EAAE;IACR,CAAC;EACF;EAEAC,iBAAiBA,CAAED,KAAK,EAAG;IAC1BN,QAAQ,CAAE,kCAAkC,EAAEM,KAAM,CAAC;EACtD;EAEA,OAAOE,wBAAwBA,CAAEF,KAAK,EAAG;IACxC,OAAO;MAAEA;IAAM,CAAC;EACjB;EAEAG,MAAMA,CAAA,EAAG;IACR,IAAK,CAAE,IAAI,CAACJ,KAAK,CAACC,KAAK,EAAG;MACzB,OAAO,IAAI,CAACI,KAAK,CAACC,QAAQ;IAC3B;IAEA,OACCC,aAAA,CAACX,oBAAoB;MACpBY,OAAO,EAAGd,EAAE,CACX,iDACD,CAAG;MACHO,KAAK,EAAG,IAAI,CAACD,KAAK,CAACC;IAAO,CAC1B,CAAC;EAEJ;AACD","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","Button","Warning","useCopyToClipboard","CopyButton","text","children","ref","createElement","variant","ErrorBoundaryWarning","message","error","actions","key","stack","className"],"sources":["@wordpress/edit-site/src/components/error-boundary/warning.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { Warning } from '@wordpress/block-editor';\nimport { useCopyToClipboard } from '@wordpress/compose';\n\nfunction CopyButton( { text, children } ) {\n\tconst ref = useCopyToClipboard( text );\n\treturn (\n\t\t<Button variant=\"secondary\" ref={ ref }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\nexport default function ErrorBoundaryWarning( { message, error } ) {\n\tconst actions = [\n\t\t<CopyButton key=\"copy-error\" text={ error.stack }>\n\t\t\t{ __( 'Copy Error' ) }\n\t\t</CopyButton>,\n\t];\n\n\treturn (\n\t\t<Warning className=\"editor-error-boundary\" actions={ actions }>\n\t\t\t{ message }\n\t\t</Warning>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,OAAO,QAAQ,yBAAyB;AACjD,SAASC,kBAAkB,QAAQ,oBAAoB;AAEvD,SAASC,UAAUA,CAAE;EAAEC,IAAI;EAAEC;AAAS,CAAC,EAAG;EACzC,MAAMC,GAAG,GAAGJ,kBAAkB,CAAEE,IAAK,CAAC;EACtC,OACCG,aAAA,CAACP,MAAM;IAACQ,OAAO,EAAC,WAAW;IAACF,GAAG,EAAGA;EAAK,GACpCD,QACK,CAAC;AAEX;AAEA,eAAe,SAASI,oBAAoBA,CAAE;EAAEC,OAAO;EAAEC;AAAM,CAAC,EAAG;EAClE,MAAMC,OAAO,GAAG,CACfL,aAAA,CAACJ,UAAU;IAACU,GAAG,EAAC,YAAY;IAACT,IAAI,EAAGO,KAAK,CAACG;EAAO,GAC9Cf,EAAE,CAAE,YAAa,CACR,CAAC,CACb;EAED,OACCQ,aAAA,CAACN,OAAO;IAACc,SAAS,EAAC,uBAAuB;IAACH,OAAO,EAAGA;EAAS,GAC3DF,OACM,CAAC;AAEZ"}
|
|
1
|
+
{"version":3,"names":["__","Button","Warning","useCopyToClipboard","CopyButton","text","children","ref","createElement","variant","ErrorBoundaryWarning","message","error","actions","key","stack","className"],"sources":["@wordpress/edit-site/src/components/error-boundary/warning.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { Warning } from '@wordpress/block-editor';\nimport { useCopyToClipboard } from '@wordpress/compose';\n\nfunction CopyButton( { text, children } ) {\n\tconst ref = useCopyToClipboard( text );\n\treturn (\n\t\t<Button variant=\"secondary\" ref={ ref }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\nexport default function ErrorBoundaryWarning( { message, error } ) {\n\tconst actions = [\n\t\t<CopyButton key=\"copy-error\" text={ error.stack }>\n\t\t\t{ __( 'Copy Error' ) }\n\t\t</CopyButton>,\n\t];\n\n\treturn (\n\t\t<Warning className=\"editor-error-boundary\" actions={ actions }>\n\t\t\t{ message }\n\t\t</Warning>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,OAAO,QAAQ,yBAAyB;AACjD,SAASC,kBAAkB,QAAQ,oBAAoB;AAEvD,SAASC,UAAUA,CAAE;EAAEC,IAAI;EAAEC;AAAS,CAAC,EAAG;EACzC,MAAMC,GAAG,GAAGJ,kBAAkB,CAAEE,IAAK,CAAC;EACtC,OACCG,aAAA,CAACP,MAAM;IAACQ,OAAO,EAAC,WAAW;IAACF,GAAG,EAAGA;EAAK,GACpCD,QACK,CAAC;AAEX;AAEA,eAAe,SAASI,oBAAoBA,CAAE;EAAEC,OAAO;EAAEC;AAAM,CAAC,EAAG;EAClE,MAAMC,OAAO,GAAG,CACfL,aAAA,CAACJ,UAAU;IAACU,GAAG,EAAC,YAAY;IAACT,IAAI,EAAGO,KAAK,CAACG;EAAO,GAC9Cf,EAAE,CAAE,YAAa,CACR,CAAC,CACb;EAED,OACCQ,aAAA,CAACN,OAAO;IAACc,SAAS,EAAC,uBAAuB;IAACH,OAAO,EAAGA;EAAS,GAC3DF,OACM,CAAC;AAEZ","ignoreList":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { createElement } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* WordPress dependencies
|
|
4
|
+
*/
|
|
5
|
+
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
6
|
+
import { __ } from '@wordpress/i18n';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Internal dependencies
|
|
10
|
+
*/
|
|
11
|
+
import { unlock } from '../../lock-unlock';
|
|
12
|
+
|
|
13
|
+
// Initial control values where no block style is set.
|
|
14
|
+
const BACKGROUND_DEFAULT_VALUES = {
|
|
15
|
+
backgroundSize: 'auto'
|
|
16
|
+
};
|
|
17
|
+
const {
|
|
18
|
+
useGlobalStyle,
|
|
19
|
+
useGlobalSetting,
|
|
20
|
+
BackgroundPanel: StylesBackgroundPanel
|
|
21
|
+
} = unlock(blockEditorPrivateApis);
|
|
22
|
+
export default function BackgroundPanel() {
|
|
23
|
+
const [style] = useGlobalStyle('', undefined, 'user', {
|
|
24
|
+
shouldDecodeEncode: false
|
|
25
|
+
});
|
|
26
|
+
const [inheritedStyle, setStyle] = useGlobalStyle('', undefined, 'all', {
|
|
27
|
+
shouldDecodeEncode: false
|
|
28
|
+
});
|
|
29
|
+
const [settings] = useGlobalSetting('');
|
|
30
|
+
const defaultControls = {
|
|
31
|
+
backgroundImage: true,
|
|
32
|
+
backgroundSize: !!style?.background?.backgroundImage && !!inheritedStyle?.background?.backgroundImage
|
|
33
|
+
};
|
|
34
|
+
return createElement(StylesBackgroundPanel, {
|
|
35
|
+
inheritedValue: inheritedStyle,
|
|
36
|
+
value: style,
|
|
37
|
+
onChange: setStyle,
|
|
38
|
+
settings: settings,
|
|
39
|
+
headerLabel: __('Image'),
|
|
40
|
+
defaultValues: BACKGROUND_DEFAULT_VALUES,
|
|
41
|
+
defaultControls: defaultControls
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=background-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["privateApis","blockEditorPrivateApis","__","unlock","BACKGROUND_DEFAULT_VALUES","backgroundSize","useGlobalStyle","useGlobalSetting","BackgroundPanel","StylesBackgroundPanel","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","settings","defaultControls","backgroundImage","background","createElement","inheritedValue","value","onChange","headerLabel","defaultValues"],"sources":["@wordpress/edit-site/src/components/global-styles/background-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\n// Initial control values where no block style is set.\nconst BACKGROUND_DEFAULT_VALUES = {\n\tbackgroundSize: 'auto',\n};\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tBackgroundPanel: StylesBackgroundPanel,\n} = unlock( blockEditorPrivateApis );\n\nexport default function BackgroundPanel() {\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ settings ] = useGlobalSetting( '' );\n\n\tconst defaultControls = {\n\t\tbackgroundImage: true,\n\t\tbackgroundSize:\n\t\t\t!! style?.background?.backgroundImage &&\n\t\t\t!! inheritedStyle?.background?.backgroundImage,\n\t};\n\n\treturn (\n\t\t<StylesBackgroundPanel\n\t\t\tinheritedValue={ inheritedStyle }\n\t\t\tvalue={ style }\n\t\t\tonChange={ setStyle }\n\t\t\tsettings={ settings }\n\t\t\theaderLabel={ __( 'Image' ) }\n\t\t\tdefaultValues={ BACKGROUND_DEFAULT_VALUES }\n\t\t\tdefaultControls={ defaultControls }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;AAC/E,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;;AAE1C;AACA,MAAMC,yBAAyB,GAAG;EACjCC,cAAc,EAAE;AACjB,CAAC;AAED,MAAM;EACLC,cAAc;EACdC,gBAAgB;EAChBC,eAAe,EAAEC;AAClB,CAAC,GAAGN,MAAM,CAAEF,sBAAuB,CAAC;AAEpC,eAAe,SAASO,eAAeA,CAAA,EAAG;EACzC,MAAM,CAAEE,KAAK,CAAE,GAAGJ,cAAc,CAAE,EAAE,EAAEK,SAAS,EAAE,MAAM,EAAE;IACxDC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEC,cAAc,EAAEC,QAAQ,CAAE,GAAGR,cAAc,CAAE,EAAE,EAAEK,SAAS,EAAE,KAAK,EAAE;IAC1EC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEG,QAAQ,CAAE,GAAGR,gBAAgB,CAAE,EAAG,CAAC;EAE3C,MAAMS,eAAe,GAAG;IACvBC,eAAe,EAAE,IAAI;IACrBZ,cAAc,EACb,CAAC,CAAEK,KAAK,EAAEQ,UAAU,EAAED,eAAe,IACrC,CAAC,CAAEJ,cAAc,EAAEK,UAAU,EAAED;EACjC,CAAC;EAED,OACCE,aAAA,CAACV,qBAAqB;IACrBW,cAAc,EAAGP,cAAgB;IACjCQ,KAAK,EAAGX,KAAO;IACfY,QAAQ,EAAGR,QAAU;IACrBC,QAAQ,EAAGA,QAAU;IACrBQ,WAAW,EAAGrB,EAAE,CAAE,OAAQ,CAAG;IAC7BsB,aAAa,EAAGpB,yBAA2B;IAC3CY,eAAe,EAAGA;EAAiB,CACnC,CAAC;AAEJ","ignoreList":[]}
|
|
@@ -6,6 +6,11 @@ import { BlockPreview } from '@wordpress/block-editor';
|
|
|
6
6
|
import { getBlockType, getBlockFromExample } from '@wordpress/blocks';
|
|
7
7
|
import { __experimentalSpacer as Spacer } from '@wordpress/components';
|
|
8
8
|
import { useMemo } from '@wordpress/element';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Internal dependencies
|
|
12
|
+
*/
|
|
13
|
+
import { getVariationClassName } from './utils';
|
|
9
14
|
const BlockPreviewPanel = ({
|
|
10
15
|
name,
|
|
11
16
|
variation = ''
|
|
@@ -22,7 +27,7 @@ const BlockPreviewPanel = ({
|
|
|
22
27
|
...example,
|
|
23
28
|
attributes: {
|
|
24
29
|
...example.attributes,
|
|
25
|
-
className:
|
|
30
|
+
className: getVariationClassName(variation)
|
|
26
31
|
}
|
|
27
32
|
};
|
|
28
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BlockPreview","getBlockType","getBlockFromExample","__experimentalSpacer","Spacer","useMemo","BlockPreviewPanel","name","variation","_blockExample$viewpor","blockExample","example","blocks","attributes","className","viewportWidth","previewHeight","createElement","marginX","marginBottom","style","maxHeight","boxSizing","minHeight","additionalStyles","css"],"sources":["@wordpress/edit-site/src/components/global-styles/block-preview-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { BlockPreview } from '@wordpress/block-editor';\nimport { getBlockType, getBlockFromExample } from '@wordpress/blocks';\nimport { __experimentalSpacer as Spacer } from '@wordpress/components';\nimport { useMemo } from '@wordpress/element';\n\nconst BlockPreviewPanel = ( { name, variation = '' } ) => {\n\tconst blockExample = getBlockType( name )?.example;\n\tconst blocks = useMemo( () => {\n\t\tif ( ! blockExample ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet example = blockExample;\n\t\tif ( variation ) {\n\t\t\texample = {\n\t\t\t\t...example,\n\t\t\t\tattributes: {\n\t\t\t\t\t...example.attributes,\n\t\t\t\t\tclassName:
|
|
1
|
+
{"version":3,"names":["BlockPreview","getBlockType","getBlockFromExample","__experimentalSpacer","Spacer","useMemo","getVariationClassName","BlockPreviewPanel","name","variation","_blockExample$viewpor","blockExample","example","blocks","attributes","className","viewportWidth","previewHeight","createElement","marginX","marginBottom","style","maxHeight","boxSizing","minHeight","additionalStyles","css"],"sources":["@wordpress/edit-site/src/components/global-styles/block-preview-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { BlockPreview } from '@wordpress/block-editor';\nimport { getBlockType, getBlockFromExample } from '@wordpress/blocks';\nimport { __experimentalSpacer as Spacer } from '@wordpress/components';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getVariationClassName } from './utils';\n\nconst BlockPreviewPanel = ( { name, variation = '' } ) => {\n\tconst blockExample = getBlockType( name )?.example;\n\tconst blocks = useMemo( () => {\n\t\tif ( ! blockExample ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet example = blockExample;\n\t\tif ( variation ) {\n\t\t\texample = {\n\t\t\t\t...example,\n\t\t\t\tattributes: {\n\t\t\t\t\t...example.attributes,\n\t\t\t\t\tclassName: getVariationClassName( variation ),\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\n\t\treturn getBlockFromExample( name, example );\n\t}, [ name, blockExample, variation ] );\n\n\tconst viewportWidth = blockExample?.viewportWidth ?? null;\n\tconst previewHeight = 150;\n\n\tif ( ! blockExample ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Spacer marginX={ 4 } marginBottom={ 4 }>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-site-global-styles__block-preview-panel\"\n\t\t\t\tstyle={ { maxHeight: previewHeight, boxSizing: 'initial' } }\n\t\t\t>\n\t\t\t\t<BlockPreview\n\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\tviewportWidth={ viewportWidth }\n\t\t\t\t\tminHeight={ previewHeight }\n\t\t\t\t\tadditionalStyles={ [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcss: `\n\t\t\t\t\t\t\t\tbody{\n\t\t\t\t\t\t\t\t\tmin-height:${ previewHeight }px;\n\t\t\t\t\t\t\t\t\tdisplay:flex;align-items:center;justify-content:center;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t},\n\t\t\t\t\t] }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</Spacer>\n\t);\n};\n\nexport default BlockPreviewPanel;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,yBAAyB;AACtD,SAASC,YAAY,EAAEC,mBAAmB,QAAQ,mBAAmB;AACrE,SAASC,oBAAoB,IAAIC,MAAM,QAAQ,uBAAuB;AACtE,SAASC,OAAO,QAAQ,oBAAoB;;AAE5C;AACA;AACA;AACA,SAASC,qBAAqB,QAAQ,SAAS;AAE/C,MAAMC,iBAAiB,GAAGA,CAAE;EAAEC,IAAI;EAAEC,SAAS,GAAG;AAAG,CAAC,KAAM;EAAA,IAAAC,qBAAA;EACzD,MAAMC,YAAY,GAAGV,YAAY,CAAEO,IAAK,CAAC,EAAEI,OAAO;EAClD,MAAMC,MAAM,GAAGR,OAAO,CAAE,MAAM;IAC7B,IAAK,CAAEM,YAAY,EAAG;MACrB,OAAO,IAAI;IACZ;IAEA,IAAIC,OAAO,GAAGD,YAAY;IAC1B,IAAKF,SAAS,EAAG;MAChBG,OAAO,GAAG;QACT,GAAGA,OAAO;QACVE,UAAU,EAAE;UACX,GAAGF,OAAO,CAACE,UAAU;UACrBC,SAAS,EAAET,qBAAqB,CAAEG,SAAU;QAC7C;MACD,CAAC;IACF;IAEA,OAAOP,mBAAmB,CAAEM,IAAI,EAAEI,OAAQ,CAAC;EAC5C,CAAC,EAAE,CAAEJ,IAAI,EAAEG,YAAY,EAAEF,SAAS,CAAG,CAAC;EAEtC,MAAMO,aAAa,IAAAN,qBAAA,GAAGC,YAAY,EAAEK,aAAa,cAAAN,qBAAA,cAAAA,qBAAA,GAAI,IAAI;EACzD,MAAMO,aAAa,GAAG,GAAG;EAEzB,IAAK,CAAEN,YAAY,EAAG;IACrB,OAAO,IAAI;EACZ;EAEA,OACCO,aAAA,CAACd,MAAM;IAACe,OAAO,EAAG,CAAG;IAACC,YAAY,EAAG;EAAG,GACvCF,aAAA;IACCH,SAAS,EAAC,8CAA8C;IACxDM,KAAK,EAAG;MAAEC,SAAS,EAAEL,aAAa;MAAEM,SAAS,EAAE;IAAU;EAAG,GAE5DL,aAAA,CAAClB,YAAY;IACZa,MAAM,EAAGA,MAAQ;IACjBG,aAAa,EAAGA,aAAe;IAC/BQ,SAAS,EAAGP,aAAe;IAC3BQ,gBAAgB,EAAG,CAClB;MACCC,GAAG,EAAG;AACb;AACA,sBAAuBT,aAAe;AACtC;AACA;AACA;IACM,CAAC;EACC,CACH,CACG,CACE,CAAC;AAEX,CAAC;AAED,eAAeV,iBAAiB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","Flex","ColorIndicatorWrapper","className","props","createElement"],"sources":["@wordpress/edit-site/src/components/global-styles/color-indicator-wrapper.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Flex } from '@wordpress/components';\n\nfunction ColorIndicatorWrapper( { className, ...props } ) {\n\treturn (\n\t\t<Flex\n\t\t\tclassName={ classnames(\n\t\t\t\t'edit-site-global-styles__color-indicator-wrapper',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport default ColorIndicatorWrapper;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,IAAI,QAAQ,uBAAuB;AAE5C,SAASC,qBAAqBA,CAAE;EAAEC,SAAS;EAAE,GAAGC;AAAM,CAAC,EAAG;EACzD,OACCC,aAAA,CAACJ,IAAI;IACJE,SAAS,EAAGH,UAAU,CACrB,kDAAkD,EAClDG,SACD,CAAG;IAAA,GACEC;EAAK,CACV,CAAC;AAEJ;AAEA,eAAeF,qBAAqB"}
|
|
1
|
+
{"version":3,"names":["classnames","Flex","ColorIndicatorWrapper","className","props","createElement"],"sources":["@wordpress/edit-site/src/components/global-styles/color-indicator-wrapper.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Flex } from '@wordpress/components';\n\nfunction ColorIndicatorWrapper( { className, ...props } ) {\n\treturn (\n\t\t<Flex\n\t\t\tclassName={ classnames(\n\t\t\t\t'edit-site-global-styles__color-indicator-wrapper',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport default ColorIndicatorWrapper;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,IAAI,QAAQ,uBAAuB;AAE5C,SAASC,qBAAqBA,CAAE;EAAEC,SAAS;EAAE,GAAGC;AAAM,CAAC,EAAG;EACzD,OACCC,aAAA,CAACJ,IAAI;IACJE,SAAS,EAAGH,UAAU,CACrB,kDAAkD,EAClDG,SACD,CAAG;IAAA,GACEC;EAAK,CACV,CAAC;AAEJ;AAEA,eAAeF,qBAAqB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useViewportMatch","__experimentalPaletteEdit","PaletteEdit","__experimentalVStack","VStack","__","privateApis","blockEditorPrivateApis","unlock","useGlobalSetting","mobilePopoverProps","placement","offset","ColorPalettePanel","name","themeColors","setThemeColors","baseThemeColors","defaultColors","setDefaultColors","baseDefaultColors","customColors","setCustomColors","defaultPaletteEnabled","isMobileViewport","popoverProps","undefined","createElement","className","spacing","length","canReset","canOnlyChangeValues","colors","onChange","paletteLabel","paletteLabelHeadingLevel","emptyMessage","slugPrefix"],"sources":["@wordpress/edit-site/src/components/global-styles/color-palette-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\t__experimentalPaletteEdit as PaletteEdit,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\nconst mobilePopoverProps = { placement: 'bottom-start', offset: 8 };\n\nexport default function ColorPalettePanel( { name } ) {\n\tconst [ themeColors, setThemeColors ] = useGlobalSetting(\n\t\t'color.palette.theme',\n\t\tname\n\t);\n\tconst [ baseThemeColors ] = useGlobalSetting(\n\t\t'color.palette.theme',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ defaultColors, setDefaultColors ] = useGlobalSetting(\n\t\t'color.palette.default',\n\t\tname\n\t);\n\tconst [ baseDefaultColors ] = useGlobalSetting(\n\t\t'color.palette.default',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ customColors, setCustomColors ] = useGlobalSetting(\n\t\t'color.palette.custom',\n\t\tname\n\t);\n\n\tconst [ defaultPaletteEnabled ] = useGlobalSetting(\n\t\t'color.defaultPalette',\n\t\tname\n\t);\n\tconst isMobileViewport = useViewportMatch( 'small', '<' );\n\tconst popoverProps = isMobileViewport ? mobilePopoverProps : undefined;\n\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"edit-site-global-styles-color-palette-panel\"\n\t\t\tspacing={ 10 }\n\t\t>\n\t\t\t{ !! themeColors && !! themeColors.length && (\n\t\t\t\t<PaletteEdit\n\t\t\t\t\tcanReset={ themeColors !== baseThemeColors }\n\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\tcolors={ themeColors }\n\t\t\t\t\tonChange={ setThemeColors }\n\t\t\t\t\tpaletteLabel={ __( 'Theme' ) }\n\t\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ !! defaultColors &&\n\t\t\t\t!! defaultColors.length &&\n\t\t\t\t!! defaultPaletteEnabled && (\n\t\t\t\t\t<PaletteEdit\n\t\t\t\t\t\tcanReset={ defaultColors !== baseDefaultColors }\n\t\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\t\tcolors={ defaultColors }\n\t\t\t\t\t\tonChange={ setDefaultColors }\n\t\t\t\t\t\tpaletteLabel={ __( 'Default' ) }\n\t\t\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t<PaletteEdit\n\t\t\t\tcolors={ customColors }\n\t\t\t\tonChange={ setCustomColors }\n\t\t\t\tpaletteLabel={ __( 'Custom' ) }\n\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\temptyMessage={ __(\n\t\t\t\t\t'Custom colors are empty! Add some colors to create your own color palette.'\n\t\t\t\t) }\n\t\t\t\tslugPrefix=\"custom-\"\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t/>\n\t\t</VStack>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,gBAAgB,QAAQ,oBAAoB;AACrD,SACCC,yBAAyB,IAAIC,WAAW,EACxCC,oBAAoB,IAAIC,MAAM,QACxB,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EAAEC;AAAiB,CAAC,GAAGD,MAAM,CAAED,sBAAuB,CAAC;AAC7D,MAAMG,kBAAkB,GAAG;EAAEC,SAAS,EAAE,cAAc;EAAEC,MAAM,EAAE;AAAE,CAAC;AAEnE,eAAe,SAASC,iBAAiBA,CAAE;EAAEC;AAAK,CAAC,EAAG;EACrD,MAAM,CAAEC,WAAW,EAAEC,cAAc,CAAE,GAAGP,gBAAgB,CACvD,qBAAqB,EACrBK,IACD,CAAC;EACD,MAAM,CAAEG,eAAe,CAAE,GAAGR,gBAAgB,CAC3C,qBAAqB,EACrBK,IAAI,EACJ,MACD,CAAC;EACD,MAAM,CAAEI,aAAa,EAAEC,gBAAgB,CAAE,GAAGV,gBAAgB,CAC3D,uBAAuB,EACvBK,IACD,CAAC;EACD,MAAM,CAAEM,iBAAiB,CAAE,GAAGX,gBAAgB,CAC7C,uBAAuB,EACvBK,IAAI,EACJ,MACD,CAAC;EACD,MAAM,CAAEO,YAAY,EAAEC,eAAe,CAAE,GAAGb,gBAAgB,CACzD,sBAAsB,EACtBK,IACD,CAAC;EAED,MAAM,CAAES,qBAAqB,CAAE,GAAGd,gBAAgB,CACjD,sBAAsB,EACtBK,IACD,CAAC;EACD,MAAMU,gBAAgB,GAAGxB,gBAAgB,CAAE,OAAO,EAAE,GAAI,CAAC;EACzD,MAAMyB,YAAY,GAAGD,gBAAgB,GAAGd,kBAAkB,GAAGgB,SAAS;EAEtE,OACCC,aAAA,CAACvB,MAAM;IACNwB,SAAS,EAAC,6CAA6C;IACvDC,OAAO,EAAG;EAAI,GAEZ,CAAC,CAAEd,WAAW,IAAI,CAAC,CAAEA,WAAW,CAACe,MAAM,IACxCH,aAAA,CAACzB,WAAW;IACX6B,QAAQ,EAAGhB,WAAW,KAAKE,eAAiB;IAC5Ce,mBAAmB;IACnBC,MAAM,EAAGlB,WAAa;IACtBmB,QAAQ,EAAGlB,cAAgB;IAC3BmB,YAAY,EAAG9B,EAAE,CAAE,OAAQ,CAAG;IAC9B+B,wBAAwB,EAAG,CAAG;IAC9BX,YAAY,EAAGA;EAAc,CAC7B,CACD,EACC,CAAC,CAAEP,aAAa,IACjB,CAAC,CAAEA,aAAa,CAACY,MAAM,IACvB,CAAC,CAAEP,qBAAqB,IACvBI,aAAA,CAACzB,WAAW;IACX6B,QAAQ,EAAGb,aAAa,KAAKE,iBAAmB;IAChDY,mBAAmB;IACnBC,MAAM,EAAGf,aAAe;IACxBgB,QAAQ,EAAGf,gBAAkB;IAC7BgB,YAAY,EAAG9B,EAAE,CAAE,SAAU,CAAG;IAChC+B,wBAAwB,EAAG,CAAG;IAC9BX,YAAY,EAAGA;EAAc,CAC7B,CACD,EACFE,aAAA,CAACzB,WAAW;IACX+B,MAAM,EAAGZ,YAAc;IACvBa,QAAQ,EAAGZ,eAAiB;IAC5Ba,YAAY,EAAG9B,EAAE,CAAE,QAAS,CAAG;IAC/B+B,wBAAwB,EAAG,CAAG;IAC9BC,YAAY,EAAGhC,EAAE,CAChB,4EACD,CAAG;IACHiC,UAAU,EAAC,SAAS;IACpBb,YAAY,EAAGA;EAAc,CAC7B,CACM,CAAC;AAEX"}
|
|
1
|
+
{"version":3,"names":["useViewportMatch","__experimentalPaletteEdit","PaletteEdit","__experimentalVStack","VStack","__","privateApis","blockEditorPrivateApis","unlock","useGlobalSetting","mobilePopoverProps","placement","offset","ColorPalettePanel","name","themeColors","setThemeColors","baseThemeColors","defaultColors","setDefaultColors","baseDefaultColors","customColors","setCustomColors","defaultPaletteEnabled","isMobileViewport","popoverProps","undefined","createElement","className","spacing","length","canReset","canOnlyChangeValues","colors","onChange","paletteLabel","paletteLabelHeadingLevel","emptyMessage","slugPrefix"],"sources":["@wordpress/edit-site/src/components/global-styles/color-palette-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\t__experimentalPaletteEdit as PaletteEdit,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\nconst mobilePopoverProps = { placement: 'bottom-start', offset: 8 };\n\nexport default function ColorPalettePanel( { name } ) {\n\tconst [ themeColors, setThemeColors ] = useGlobalSetting(\n\t\t'color.palette.theme',\n\t\tname\n\t);\n\tconst [ baseThemeColors ] = useGlobalSetting(\n\t\t'color.palette.theme',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ defaultColors, setDefaultColors ] = useGlobalSetting(\n\t\t'color.palette.default',\n\t\tname\n\t);\n\tconst [ baseDefaultColors ] = useGlobalSetting(\n\t\t'color.palette.default',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ customColors, setCustomColors ] = useGlobalSetting(\n\t\t'color.palette.custom',\n\t\tname\n\t);\n\n\tconst [ defaultPaletteEnabled ] = useGlobalSetting(\n\t\t'color.defaultPalette',\n\t\tname\n\t);\n\tconst isMobileViewport = useViewportMatch( 'small', '<' );\n\tconst popoverProps = isMobileViewport ? mobilePopoverProps : undefined;\n\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"edit-site-global-styles-color-palette-panel\"\n\t\t\tspacing={ 10 }\n\t\t>\n\t\t\t{ !! themeColors && !! themeColors.length && (\n\t\t\t\t<PaletteEdit\n\t\t\t\t\tcanReset={ themeColors !== baseThemeColors }\n\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\tcolors={ themeColors }\n\t\t\t\t\tonChange={ setThemeColors }\n\t\t\t\t\tpaletteLabel={ __( 'Theme' ) }\n\t\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ !! defaultColors &&\n\t\t\t\t!! defaultColors.length &&\n\t\t\t\t!! defaultPaletteEnabled && (\n\t\t\t\t\t<PaletteEdit\n\t\t\t\t\t\tcanReset={ defaultColors !== baseDefaultColors }\n\t\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\t\tcolors={ defaultColors }\n\t\t\t\t\t\tonChange={ setDefaultColors }\n\t\t\t\t\t\tpaletteLabel={ __( 'Default' ) }\n\t\t\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t<PaletteEdit\n\t\t\t\tcolors={ customColors }\n\t\t\t\tonChange={ setCustomColors }\n\t\t\t\tpaletteLabel={ __( 'Custom' ) }\n\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\temptyMessage={ __(\n\t\t\t\t\t'Custom colors are empty! Add some colors to create your own color palette.'\n\t\t\t\t) }\n\t\t\t\tslugPrefix=\"custom-\"\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t/>\n\t\t</VStack>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,gBAAgB,QAAQ,oBAAoB;AACrD,SACCC,yBAAyB,IAAIC,WAAW,EACxCC,oBAAoB,IAAIC,MAAM,QACxB,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EAAEC;AAAiB,CAAC,GAAGD,MAAM,CAAED,sBAAuB,CAAC;AAC7D,MAAMG,kBAAkB,GAAG;EAAEC,SAAS,EAAE,cAAc;EAAEC,MAAM,EAAE;AAAE,CAAC;AAEnE,eAAe,SAASC,iBAAiBA,CAAE;EAAEC;AAAK,CAAC,EAAG;EACrD,MAAM,CAAEC,WAAW,EAAEC,cAAc,CAAE,GAAGP,gBAAgB,CACvD,qBAAqB,EACrBK,IACD,CAAC;EACD,MAAM,CAAEG,eAAe,CAAE,GAAGR,gBAAgB,CAC3C,qBAAqB,EACrBK,IAAI,EACJ,MACD,CAAC;EACD,MAAM,CAAEI,aAAa,EAAEC,gBAAgB,CAAE,GAAGV,gBAAgB,CAC3D,uBAAuB,EACvBK,IACD,CAAC;EACD,MAAM,CAAEM,iBAAiB,CAAE,GAAGX,gBAAgB,CAC7C,uBAAuB,EACvBK,IAAI,EACJ,MACD,CAAC;EACD,MAAM,CAAEO,YAAY,EAAEC,eAAe,CAAE,GAAGb,gBAAgB,CACzD,sBAAsB,EACtBK,IACD,CAAC;EAED,MAAM,CAAES,qBAAqB,CAAE,GAAGd,gBAAgB,CACjD,sBAAsB,EACtBK,IACD,CAAC;EACD,MAAMU,gBAAgB,GAAGxB,gBAAgB,CAAE,OAAO,EAAE,GAAI,CAAC;EACzD,MAAMyB,YAAY,GAAGD,gBAAgB,GAAGd,kBAAkB,GAAGgB,SAAS;EAEtE,OACCC,aAAA,CAACvB,MAAM;IACNwB,SAAS,EAAC,6CAA6C;IACvDC,OAAO,EAAG;EAAI,GAEZ,CAAC,CAAEd,WAAW,IAAI,CAAC,CAAEA,WAAW,CAACe,MAAM,IACxCH,aAAA,CAACzB,WAAW;IACX6B,QAAQ,EAAGhB,WAAW,KAAKE,eAAiB;IAC5Ce,mBAAmB;IACnBC,MAAM,EAAGlB,WAAa;IACtBmB,QAAQ,EAAGlB,cAAgB;IAC3BmB,YAAY,EAAG9B,EAAE,CAAE,OAAQ,CAAG;IAC9B+B,wBAAwB,EAAG,CAAG;IAC9BX,YAAY,EAAGA;EAAc,CAC7B,CACD,EACC,CAAC,CAAEP,aAAa,IACjB,CAAC,CAAEA,aAAa,CAACY,MAAM,IACvB,CAAC,CAAEP,qBAAqB,IACvBI,aAAA,CAACzB,WAAW;IACX6B,QAAQ,EAAGb,aAAa,KAAKE,iBAAmB;IAChDY,mBAAmB;IACnBC,MAAM,EAAGf,aAAe;IACxBgB,QAAQ,EAAGf,gBAAkB;IAC7BgB,YAAY,EAAG9B,EAAE,CAAE,SAAU,CAAG;IAChC+B,wBAAwB,EAAG,CAAG;IAC9BX,YAAY,EAAGA;EAAc,CAC7B,CACD,EACFE,aAAA,CAACzB,WAAW;IACX+B,MAAM,EAAGZ,YAAc;IACvBa,QAAQ,EAAGZ,eAAiB;IAC5Ba,YAAY,EAAG9B,EAAE,CAAE,QAAS,CAAG;IAC/B+B,wBAAwB,EAAG,CAAG;IAC9BC,YAAY,EAAGhC,EAAE,CAChB,4EACD,CAAG;IACHiC,UAAU,EAAC,SAAS;IACpBb,YAAY,EAAGA;EAAc,CAC7B,CACM,CAAC;AAEX","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["privateApis","blockEditorPrivateApis","useMemo","unlock","useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","DimensionsPanel","StylesDimensionsPanel","DEFAULT_CONTROLS","contentSize","wideSize","padding","margin","blockGap","minHeight","childLayout","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","userSettings","rawSettings","setSettings","settings","inheritedStyleWithLayout","layout","styleWithLayout","onChange","newStyle","updatedStyle","updatedSettings","definitions","createElement","inheritedValue","value","includeLayoutControls","defaultControls"],"sources":["@wordpress/edit-site/src/components/global-styles/dimensions-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tDimensionsPanel: StylesDimensionsPanel,\n} = unlock( blockEditorPrivateApis );\n\nconst DEFAULT_CONTROLS = {\n\tcontentSize: true,\n\twideSize: true,\n\tpadding: true,\n\tmargin: true,\n\tblockGap: true,\n\tminHeight: true,\n\tchildLayout: false,\n};\n\nexport default function DimensionsPanel() {\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ userSettings ] = useGlobalSetting( '', undefined, 'user' );\n\tconst [ rawSettings, setSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\n\t// These intermediary objects are needed because the \"layout\" property is stored\n\t// in settings rather than styles.\n\tconst inheritedStyleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...inheritedStyle,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ inheritedStyle, settings.layout ] );\n\n\tconst styleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...style,\n\t\t\tlayout: userSettings.layout,\n\t\t};\n\t}, [ style, userSettings.layout ] );\n\n\tconst onChange = ( newStyle ) => {\n\t\tconst updatedStyle = { ...newStyle };\n\t\tdelete updatedStyle.layout;\n\t\tsetStyle( updatedStyle );\n\n\t\tif ( newStyle.layout !== userSettings.layout ) {\n\t\t\tconst updatedSettings = {\n\t\t\t\t...userSettings,\n\t\t\t\tlayout: newStyle.layout,\n\t\t\t};\n\n\t\t\t// Ensure any changes to layout definitions are not persisted.\n\t\t\tif ( updatedSettings.layout?.definitions ) {\n\t\t\t\tdelete updatedSettings.layout.definitions;\n\t\t\t}\n\n\t\t\tsetSettings( updatedSettings );\n\t\t}\n\t};\n\n\treturn (\n\t\t<StylesDimensionsPanel\n\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\tvalue={ styleWithLayout }\n\t\t\tonChange={ onChange }\n\t\t\tsettings={ settings }\n\t\t\tincludeLayoutControls\n\t\t\tdefaultControls={ DEFAULT_CONTROLS }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;AAC/E,SAASC,OAAO,QAAQ,oBAAoB;;AAE5C;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EACLC,cAAc;EACdC,gBAAgB;EAChBC,0BAA0B;EAC1BC,eAAe,EAAEC;AAClB,CAAC,GAAGL,MAAM,CAAEF,sBAAuB,CAAC;AAEpC,MAAMQ,gBAAgB,GAAG;EACxBC,WAAW,EAAE,IAAI;EACjBC,QAAQ,EAAE,IAAI;EACdC,OAAO,EAAE,IAAI;EACbC,MAAM,EAAE,IAAI;EACZC,QAAQ,EAAE,IAAI;EACdC,SAAS,EAAE,IAAI;EACfC,WAAW,EAAE;AACd,CAAC;AAED,eAAe,SAAST,eAAeA,CAAA,EAAG;EACzC,MAAM,CAAEU,KAAK,CAAE,GAAGb,cAAc,CAAE,EAAE,EAAEc,SAAS,EAAE,MAAM,EAAE;IACxDC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEC,cAAc,EAAEC,QAAQ,CAAE,GAAGjB,cAAc,CAAE,EAAE,EAAEc,SAAS,EAAE,KAAK,EAAE;IAC1EC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEG,YAAY,CAAE,GAAGjB,gBAAgB,CAAE,EAAE,EAAEa,SAAS,EAAE,MAAO,CAAC;EAClE,MAAM,CAAEK,WAAW,EAAEC,WAAW,CAAE,GAAGnB,gBAAgB,CAAE,EAAG,CAAC;EAC3D,MAAMoB,QAAQ,GAAGnB,0BAA0B,CAAEiB,WAAY,CAAC;;EAE1D;EACA;EACA,MAAMG,wBAAwB,GAAGxB,OAAO,CAAE,MAAM;IAC/C,OAAO;MACN,GAAGkB,cAAc;MACjBO,MAAM,EAAEF,QAAQ,CAACE;IAClB,CAAC;EACF,CAAC,EAAE,CAAEP,cAAc,EAAEK,QAAQ,CAACE,MAAM,CAAG,CAAC;EAExC,MAAMC,eAAe,GAAG1B,OAAO,CAAE,MAAM;IACtC,OAAO;MACN,GAAGe,KAAK;MACRU,MAAM,EAAEL,YAAY,CAACK;IACtB,CAAC;EACF,CAAC,EAAE,CAAEV,KAAK,EAAEK,YAAY,CAACK,MAAM,CAAG,CAAC;EAEnC,MAAME,QAAQ,GAAKC,QAAQ,IAAM;IAChC,MAAMC,YAAY,GAAG;MAAE,GAAGD;IAAS,CAAC;IACpC,OAAOC,YAAY,CAACJ,MAAM;IAC1BN,QAAQ,CAAEU,YAAa,CAAC;IAExB,IAAKD,QAAQ,CAACH,MAAM,KAAKL,YAAY,CAACK,MAAM,EAAG;MAC9C,MAAMK,eAAe,GAAG;QACvB,GAAGV,YAAY;QACfK,MAAM,EAAEG,QAAQ,CAACH;MAClB,CAAC;;MAED;MACA,IAAKK,eAAe,CAACL,MAAM,EAAEM,WAAW,EAAG;QAC1C,OAAOD,eAAe,CAACL,MAAM,CAACM,WAAW;MAC1C;MAEAT,WAAW,CAAEQ,eAAgB,CAAC;IAC/B;EACD,CAAC;EAED,OACCE,aAAA,CAAC1B,qBAAqB;IACrB2B,cAAc,EAAGT,wBAA0B;IAC3CU,KAAK,EAAGR,eAAiB;IACzBC,QAAQ,EAAGA,QAAU;IACrBJ,QAAQ,EAAGA,QAAU;IACrBY,qBAAqB;IACrBC,eAAe,EAAG7B;EAAkB,CACpC,CAAC;AAEJ"}
|
|
1
|
+
{"version":3,"names":["privateApis","blockEditorPrivateApis","useMemo","unlock","useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","DimensionsPanel","StylesDimensionsPanel","DEFAULT_CONTROLS","contentSize","wideSize","padding","margin","blockGap","minHeight","childLayout","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","userSettings","rawSettings","setSettings","settings","inheritedStyleWithLayout","layout","styleWithLayout","onChange","newStyle","updatedStyle","updatedSettings","definitions","createElement","inheritedValue","value","includeLayoutControls","defaultControls"],"sources":["@wordpress/edit-site/src/components/global-styles/dimensions-panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tDimensionsPanel: StylesDimensionsPanel,\n} = unlock( blockEditorPrivateApis );\n\nconst DEFAULT_CONTROLS = {\n\tcontentSize: true,\n\twideSize: true,\n\tpadding: true,\n\tmargin: true,\n\tblockGap: true,\n\tminHeight: true,\n\tchildLayout: false,\n};\n\nexport default function DimensionsPanel() {\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ userSettings ] = useGlobalSetting( '', undefined, 'user' );\n\tconst [ rawSettings, setSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\n\t// These intermediary objects are needed because the \"layout\" property is stored\n\t// in settings rather than styles.\n\tconst inheritedStyleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...inheritedStyle,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ inheritedStyle, settings.layout ] );\n\n\tconst styleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...style,\n\t\t\tlayout: userSettings.layout,\n\t\t};\n\t}, [ style, userSettings.layout ] );\n\n\tconst onChange = ( newStyle ) => {\n\t\tconst updatedStyle = { ...newStyle };\n\t\tdelete updatedStyle.layout;\n\t\tsetStyle( updatedStyle );\n\n\t\tif ( newStyle.layout !== userSettings.layout ) {\n\t\t\tconst updatedSettings = {\n\t\t\t\t...userSettings,\n\t\t\t\tlayout: newStyle.layout,\n\t\t\t};\n\n\t\t\t// Ensure any changes to layout definitions are not persisted.\n\t\t\tif ( updatedSettings.layout?.definitions ) {\n\t\t\t\tdelete updatedSettings.layout.definitions;\n\t\t\t}\n\n\t\t\tsetSettings( updatedSettings );\n\t\t}\n\t};\n\n\treturn (\n\t\t<StylesDimensionsPanel\n\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\tvalue={ styleWithLayout }\n\t\t\tonChange={ onChange }\n\t\t\tsettings={ settings }\n\t\t\tincludeLayoutControls\n\t\t\tdefaultControls={ DEFAULT_CONTROLS }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;AAC/E,SAASC,OAAO,QAAQ,oBAAoB;;AAE5C;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EACLC,cAAc;EACdC,gBAAgB;EAChBC,0BAA0B;EAC1BC,eAAe,EAAEC;AAClB,CAAC,GAAGL,MAAM,CAAEF,sBAAuB,CAAC;AAEpC,MAAMQ,gBAAgB,GAAG;EACxBC,WAAW,EAAE,IAAI;EACjBC,QAAQ,EAAE,IAAI;EACdC,OAAO,EAAE,IAAI;EACbC,MAAM,EAAE,IAAI;EACZC,QAAQ,EAAE,IAAI;EACdC,SAAS,EAAE,IAAI;EACfC,WAAW,EAAE;AACd,CAAC;AAED,eAAe,SAAST,eAAeA,CAAA,EAAG;EACzC,MAAM,CAAEU,KAAK,CAAE,GAAGb,cAAc,CAAE,EAAE,EAAEc,SAAS,EAAE,MAAM,EAAE;IACxDC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEC,cAAc,EAAEC,QAAQ,CAAE,GAAGjB,cAAc,CAAE,EAAE,EAAEc,SAAS,EAAE,KAAK,EAAE;IAC1EC,kBAAkB,EAAE;EACrB,CAAE,CAAC;EACH,MAAM,CAAEG,YAAY,CAAE,GAAGjB,gBAAgB,CAAE,EAAE,EAAEa,SAAS,EAAE,MAAO,CAAC;EAClE,MAAM,CAAEK,WAAW,EAAEC,WAAW,CAAE,GAAGnB,gBAAgB,CAAE,EAAG,CAAC;EAC3D,MAAMoB,QAAQ,GAAGnB,0BAA0B,CAAEiB,WAAY,CAAC;;EAE1D;EACA;EACA,MAAMG,wBAAwB,GAAGxB,OAAO,CAAE,MAAM;IAC/C,OAAO;MACN,GAAGkB,cAAc;MACjBO,MAAM,EAAEF,QAAQ,CAACE;IAClB,CAAC;EACF,CAAC,EAAE,CAAEP,cAAc,EAAEK,QAAQ,CAACE,MAAM,CAAG,CAAC;EAExC,MAAMC,eAAe,GAAG1B,OAAO,CAAE,MAAM;IACtC,OAAO;MACN,GAAGe,KAAK;MACRU,MAAM,EAAEL,YAAY,CAACK;IACtB,CAAC;EACF,CAAC,EAAE,CAAEV,KAAK,EAAEK,YAAY,CAACK,MAAM,CAAG,CAAC;EAEnC,MAAME,QAAQ,GAAKC,QAAQ,IAAM;IAChC,MAAMC,YAAY,GAAG;MAAE,GAAGD;IAAS,CAAC;IACpC,OAAOC,YAAY,CAACJ,MAAM;IAC1BN,QAAQ,CAAEU,YAAa,CAAC;IAExB,IAAKD,QAAQ,CAACH,MAAM,KAAKL,YAAY,CAACK,MAAM,EAAG;MAC9C,MAAMK,eAAe,GAAG;QACvB,GAAGV,YAAY;QACfK,MAAM,EAAEG,QAAQ,CAACH;MAClB,CAAC;;MAED;MACA,IAAKK,eAAe,CAACL,MAAM,EAAEM,WAAW,EAAG;QAC1C,OAAOD,eAAe,CAACL,MAAM,CAACM,WAAW;MAC1C;MAEAT,WAAW,CAAEQ,eAAgB,CAAC;IAC/B;EACD,CAAC;EAED,OACCE,aAAA,CAAC1B,qBAAqB;IACrB2B,cAAc,EAAGT,wBAA0B;IAC3CU,KAAK,EAAGR,eAAiB;IACzBC,QAAQ,EAAGA,QAAU;IACrBJ,QAAQ,EAAGA,QAAU;IACrBY,qBAAqB;IACrBC,eAAe,EAAG7B;EAAkB,CACpC,CAAC;AAEJ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","__experimentalItemGroup","ItemGroup","__experimentalVStack","VStack","__experimentalHStack","HStack","Button","Tooltip","settings","useContext","FontLibraryProvider","FontLibraryContext","FontLibraryModal","FontFamilyItem","Subtitle","FontFamilies","modalTabOpen","toggleModal","themeFonts","customFonts","hasFonts","length","createElement","Fragment","onRequestClose","defaultTabId","spacing","justify","level","text","onClick","icon","size","isBordered","isSeparated","map","font","key","slug","className","variant","props"],"sources":["@wordpress/edit-site/src/components/global-styles/font-families.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tButton,\n\tTooltip,\n} from '@wordpress/components';\nimport { settings } from '@wordpress/icons';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport FontLibraryProvider, {\n\tFontLibraryContext,\n} from './font-library-modal/context';\nimport FontLibraryModal from './font-library-modal';\nimport FontFamilyItem from './font-family-item';\nimport Subtitle from './subtitle';\n\nfunction FontFamilies() {\n\tconst { modalTabOpen, toggleModal, themeFonts, customFonts } =\n\t\tuseContext( FontLibraryContext );\n\n\tconst hasFonts = 0 < customFonts.length || 0 < themeFonts.length;\n\n\treturn (\n\t\t<>\n\t\t\t{ !! modalTabOpen && (\n\t\t\t\t<FontLibraryModal\n\t\t\t\t\tonRequestClose={ () => toggleModal() }\n\t\t\t\t\tdefaultTabId={ modalTabOpen }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t<VStack spacing={
|
|
1
|
+
{"version":3,"names":["__","__experimentalItemGroup","ItemGroup","__experimentalVStack","VStack","__experimentalHStack","HStack","Button","Tooltip","settings","useContext","FontLibraryProvider","FontLibraryContext","FontLibraryModal","FontFamilyItem","Subtitle","FontFamilies","modalTabOpen","toggleModal","themeFonts","customFonts","hasFonts","length","createElement","Fragment","onRequestClose","defaultTabId","spacing","justify","level","text","onClick","icon","size","isBordered","isSeparated","map","font","key","slug","className","variant","props"],"sources":["@wordpress/edit-site/src/components/global-styles/font-families.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tButton,\n\tTooltip,\n} from '@wordpress/components';\nimport { settings } from '@wordpress/icons';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport FontLibraryProvider, {\n\tFontLibraryContext,\n} from './font-library-modal/context';\nimport FontLibraryModal from './font-library-modal';\nimport FontFamilyItem from './font-family-item';\nimport Subtitle from './subtitle';\n\nfunction FontFamilies() {\n\tconst { modalTabOpen, toggleModal, themeFonts, customFonts } =\n\t\tuseContext( FontLibraryContext );\n\n\tconst hasFonts = 0 < customFonts.length || 0 < themeFonts.length;\n\n\treturn (\n\t\t<>\n\t\t\t{ !! modalTabOpen && (\n\t\t\t\t<FontLibraryModal\n\t\t\t\t\tonRequestClose={ () => toggleModal() }\n\t\t\t\t\tdefaultTabId={ modalTabOpen }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t<VStack spacing={ 2 }>\n\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t<Subtitle level={ 3 }>{ __( 'Fonts' ) }</Subtitle>\n\t\t\t\t\t<HStack justify=\"flex-end\">\n\t\t\t\t\t\t<Tooltip text={ __( 'Manage fonts' ) }>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\ttoggleModal( 'installed-fonts' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-label={ __( 'Manage fonts' ) }\n\t\t\t\t\t\t\t\ticon={ settings }\n\t\t\t\t\t\t\t\tsize={ 'small' }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t</HStack>\n\t\t\t\t</HStack>\n\t\t\t\t{ hasFonts ? (\n\t\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t\t{ customFonts.map( ( font ) => (\n\t\t\t\t\t\t\t<FontFamilyItem key={ font.slug } font={ font } />\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t{ themeFonts.map( ( font ) => (\n\t\t\t\t\t\t\t<FontFamilyItem key={ font.slug } font={ font } />\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</ItemGroup>\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ __( 'No fonts installed.' ) }\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-font-families__add-fonts\"\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\tonClick={ () => toggleModal( 'upload-fonts' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Add fonts' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</VStack>\n\t\t</>\n\t);\n}\n\nexport default ( { ...props } ) => (\n\t<FontLibraryProvider>\n\t\t<FontFamilies { ...props } />\n\t</FontLibraryProvider>\n);\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SACCC,uBAAuB,IAAIC,SAAS,EACpCC,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,MAAM,EACNC,OAAO,QACD,uBAAuB;AAC9B,SAASC,QAAQ,QAAQ,kBAAkB;AAC3C,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,mBAAmB,IACzBC,kBAAkB,QACZ,8BAA8B;AACrC,OAAOC,gBAAgB,MAAM,sBAAsB;AACnD,OAAOC,cAAc,MAAM,oBAAoB;AAC/C,OAAOC,QAAQ,MAAM,YAAY;AAEjC,SAASC,YAAYA,CAAA,EAAG;EACvB,MAAM;IAAEC,YAAY;IAAEC,WAAW;IAAEC,UAAU;IAAEC;EAAY,CAAC,GAC3DV,UAAU,CAAEE,kBAAmB,CAAC;EAEjC,MAAMS,QAAQ,GAAG,CAAC,GAAGD,WAAW,CAACE,MAAM,IAAI,CAAC,GAAGH,UAAU,CAACG,MAAM;EAEhE,OACCC,aAAA,CAAAC,QAAA,QACG,CAAC,CAAEP,YAAY,IAChBM,aAAA,CAACV,gBAAgB;IAChBY,cAAc,EAAGA,CAAA,KAAMP,WAAW,CAAC,CAAG;IACtCQ,YAAY,EAAGT;EAAc,CAC7B,CACD,EAEDM,aAAA,CAACnB,MAAM;IAACuB,OAAO,EAAG;EAAG,GACpBJ,aAAA,CAACjB,MAAM;IAACsB,OAAO,EAAC;EAAe,GAC9BL,aAAA,CAACR,QAAQ;IAACc,KAAK,EAAG;EAAG,GAAG7B,EAAE,CAAE,OAAQ,CAAa,CAAC,EAClDuB,aAAA,CAACjB,MAAM;IAACsB,OAAO,EAAC;EAAU,GACzBL,aAAA,CAACf,OAAO;IAACsB,IAAI,EAAG9B,EAAE,CAAE,cAAe;EAAG,GACrCuB,aAAA,CAAChB,MAAM;IACNwB,OAAO,EAAGA,CAAA,KACTb,WAAW,CAAE,iBAAkB,CAC/B;IACD,cAAalB,EAAE,CAAE,cAAe,CAAG;IACnCgC,IAAI,EAAGvB,QAAU;IACjBwB,IAAI,EAAG;EAAS,CAChB,CACO,CACF,CACD,CAAC,EACPZ,QAAQ,GACTE,aAAA,CAACrB,SAAS;IAACgC,UAAU;IAACC,WAAW;EAAA,GAC9Bf,WAAW,CAACgB,GAAG,CAAIC,IAAI,IACxBd,aAAA,CAACT,cAAc;IAACwB,GAAG,EAAGD,IAAI,CAACE,IAAM;IAACF,IAAI,EAAGA;EAAM,CAAE,CAChD,CAAC,EACDlB,UAAU,CAACiB,GAAG,CAAIC,IAAI,IACvBd,aAAA,CAACT,cAAc;IAACwB,GAAG,EAAGD,IAAI,CAACE,IAAM;IAACF,IAAI,EAAGA;EAAM,CAAE,CAChD,CACQ,CAAC,GAEZd,aAAA,CAAAC,QAAA,QACGxB,EAAE,CAAE,qBAAsB,CAAC,EAC7BuB,aAAA,CAAChB,MAAM;IACNiC,SAAS,EAAC,kDAAkD;IAC5DC,OAAO,EAAC,WAAW;IACnBV,OAAO,EAAGA,CAAA,KAAMb,WAAW,CAAE,cAAe;EAAG,GAE7ClB,EAAE,CAAE,WAAY,CACX,CACP,CAEI,CACP,CAAC;AAEL;AAEA,gBAAe,CAAE;EAAE,GAAG0C;AAAM,CAAC,KAC5BnB,aAAA,CAACZ,mBAAmB,QACnBY,aAAA,CAACP,YAAY;EAAA,GAAM0B;AAAK,CAAI,CACR,CACrB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_n","sprintf","__experimentalHStack","HStack","__experimentalItem","Item","FlexItem","useContext","FontLibraryContext","getFamilyPreviewStyle","FontFamilyItem","font","handleSetLibraryFontSelected","toggleModal","variantsCount","fontFace","length","handleClick","previewStyle","createElement","onClick","justify","style","name","className"],"sources":["@wordpress/edit-site/src/components/global-styles/font-family-item.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { _n, sprintf } from '@wordpress/i18n';\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalItem as Item,\n\tFlexItem,\n} from '@wordpress/components';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { FontLibraryContext } from './font-library-modal/context';\nimport { getFamilyPreviewStyle } from './font-library-modal/utils/preview-styles';\n\nfunction FontFamilyItem( { font } ) {\n\tconst { handleSetLibraryFontSelected, toggleModal } =\n\t\tuseContext( FontLibraryContext );\n\n\tconst variantsCount = font?.fontFace?.length || 1;\n\n\tconst handleClick = () => {\n\t\thandleSetLibraryFontSelected( font );\n\t\ttoggleModal( 'installed-fonts' );\n\t};\n\n\tconst previewStyle = getFamilyPreviewStyle( font );\n\n\treturn (\n\t\t<Item onClick={ handleClick }>\n\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t<FlexItem style={ previewStyle }>{ font.name }</FlexItem>\n\t\t\t\t<FlexItem className=\"edit-site-global-styles-screen-typography__font-variants-count\">\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t/* translators: %d: Number of font variants. */\n\t\t\t\t\t\t_n( '%d variant', '%d variants', variantsCount ),\n\t\t\t\t\t\tvariantsCount\n\t\t\t\t\t) }\n\t\t\t\t</FlexItem>\n\t\t\t</HStack>\n\t\t</Item>\n\t);\n}\n\nexport default FontFamilyItem;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SACCC,oBAAoB,IAAIC,MAAM,EAC9BC,kBAAkB,IAAIC,IAAI,EAC1BC,QAAQ,QACF,uBAAuB;AAC9B,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,SAASC,kBAAkB,QAAQ,8BAA8B;AACjE,SAASC,qBAAqB,QAAQ,2CAA2C;AAEjF,SAASC,cAAcA,CAAE;EAAEC;AAAK,CAAC,EAAG;EACnC,MAAM;IAAEC,4BAA4B;IAAEC;EAAY,CAAC,GAClDN,UAAU,CAAEC,kBAAmB,CAAC;EAEjC,MAAMM,aAAa,GAAGH,IAAI,EAAEI,QAAQ,EAAEC,MAAM,IAAI,CAAC;EAEjD,MAAMC,WAAW,GAAGA,CAAA,KAAM;IACzBL,4BAA4B,CAAED,IAAK,CAAC;IACpCE,WAAW,CAAE,iBAAkB,CAAC;EACjC,CAAC;EAED,MAAMK,YAAY,GAAGT,qBAAqB,CAAEE,IAAK,CAAC;EAElD,OACCQ,aAAA,CAACd,IAAI;IAACe,OAAO,EAAGH;EAAa,GAC5BE,aAAA,CAAChB,MAAM;IAACkB,OAAO,EAAC;EAAe,GAC9BF,aAAA,CAACb,QAAQ;IAACgB,KAAK,EAAGJ;EAAc,GAAGP,IAAI,CAACY,IAAgB,CAAC,EACzDJ,aAAA,CAACb,QAAQ;IAACkB,SAAS,EAAC;EAAgE,GACjFvB,OAAO,EACR;EACAD,EAAE,CAAE,YAAY,EAAE,aAAa,EAAEc,aAAc,CAAC,EAChDA,aACD,CACS,CACH,CACH,CAAC;AAET;AAEA,eAAeJ,cAAc"}
|
|
1
|
+
{"version":3,"names":["_n","sprintf","__experimentalHStack","HStack","__experimentalItem","Item","FlexItem","useContext","FontLibraryContext","getFamilyPreviewStyle","FontFamilyItem","font","handleSetLibraryFontSelected","toggleModal","variantsCount","fontFace","length","handleClick","previewStyle","createElement","onClick","justify","style","name","className"],"sources":["@wordpress/edit-site/src/components/global-styles/font-family-item.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { _n, sprintf } from '@wordpress/i18n';\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalItem as Item,\n\tFlexItem,\n} from '@wordpress/components';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { FontLibraryContext } from './font-library-modal/context';\nimport { getFamilyPreviewStyle } from './font-library-modal/utils/preview-styles';\n\nfunction FontFamilyItem( { font } ) {\n\tconst { handleSetLibraryFontSelected, toggleModal } =\n\t\tuseContext( FontLibraryContext );\n\n\tconst variantsCount = font?.fontFace?.length || 1;\n\n\tconst handleClick = () => {\n\t\thandleSetLibraryFontSelected( font );\n\t\ttoggleModal( 'installed-fonts' );\n\t};\n\n\tconst previewStyle = getFamilyPreviewStyle( font );\n\n\treturn (\n\t\t<Item onClick={ handleClick }>\n\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t<FlexItem style={ previewStyle }>{ font.name }</FlexItem>\n\t\t\t\t<FlexItem className=\"edit-site-global-styles-screen-typography__font-variants-count\">\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t/* translators: %d: Number of font variants. */\n\t\t\t\t\t\t_n( '%d variant', '%d variants', variantsCount ),\n\t\t\t\t\t\tvariantsCount\n\t\t\t\t\t) }\n\t\t\t\t</FlexItem>\n\t\t\t</HStack>\n\t\t</Item>\n\t);\n}\n\nexport default FontFamilyItem;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SACCC,oBAAoB,IAAIC,MAAM,EAC9BC,kBAAkB,IAAIC,IAAI,EAC1BC,QAAQ,QACF,uBAAuB;AAC9B,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,SAASC,kBAAkB,QAAQ,8BAA8B;AACjE,SAASC,qBAAqB,QAAQ,2CAA2C;AAEjF,SAASC,cAAcA,CAAE;EAAEC;AAAK,CAAC,EAAG;EACnC,MAAM;IAAEC,4BAA4B;IAAEC;EAAY,CAAC,GAClDN,UAAU,CAAEC,kBAAmB,CAAC;EAEjC,MAAMM,aAAa,GAAGH,IAAI,EAAEI,QAAQ,EAAEC,MAAM,IAAI,CAAC;EAEjD,MAAMC,WAAW,GAAGA,CAAA,KAAM;IACzBL,4BAA4B,CAAED,IAAK,CAAC;IACpCE,WAAW,CAAE,iBAAkB,CAAC;EACjC,CAAC;EAED,MAAMK,YAAY,GAAGT,qBAAqB,CAAEE,IAAK,CAAC;EAElD,OACCQ,aAAA,CAACd,IAAI;IAACe,OAAO,EAAGH;EAAa,GAC5BE,aAAA,CAAChB,MAAM;IAACkB,OAAO,EAAC;EAAe,GAC9BF,aAAA,CAACb,QAAQ;IAACgB,KAAK,EAAGJ;EAAc,GAAGP,IAAI,CAACY,IAAgB,CAAC,EACzDJ,aAAA,CAACb,QAAQ;IAACkB,SAAS,EAAC;EAAgE,GACjFvB,OAAO,EACR;EACAD,EAAE,CAAE,YAAY,EAAE,aAAa,EAAEc,aAAc,CAAC,EAChDA,aACD,CACS,CACH,CACH,CAAC;AAET;AAEA,eAAeJ,cAAc","ignoreList":[]}
|
package/build-module/components/global-styles/font-library-modal/collection-font-variant.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CheckboxControl","Flex","privateApis","componentsPrivateApis","getFontFaceVariantName","FontDemo","unlock","CollectionFontVariant","face","font","handleToggleVariant","selected","handleToggleActivation","fontFace","displayName","name","kebabCase","checkboxId","slug","createElement","className","justify","align","gap","checked","onChange","__nextHasNoMarginBottom","id","htmlFor","text","onClick"],"sources":["@wordpress/edit-site/src/components/global-styles/font-library-modal/collection-font-variant.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tCheckboxControl,\n\tFlex,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { getFontFaceVariantName } from './utils';\nimport FontDemo from './font-demo';\nimport { unlock } from '../../../lock-unlock';\n\nfunction CollectionFontVariant( {\n\tface,\n\tfont,\n\thandleToggleVariant,\n\tselected,\n} ) {\n\tconst handleToggleActivation = () => {\n\t\tif ( font?.fontFace ) {\n\t\t\thandleToggleVariant( font, face );\n\t\t\treturn;\n\t\t}\n\t\thandleToggleVariant( font );\n\t};\n\n\tconst displayName = font.name + ' ' + getFontFaceVariantName( face );\n\tconst { kebabCase } = unlock( componentsPrivateApis );\n\tconst checkboxId = kebabCase(\n\t\t`${ font.slug }-${ getFontFaceVariantName( face ) }`\n\t);\n\n\treturn (\n\t\t<div className=\"font-library-modal__font-card\">\n\t\t\t<Flex justify=\"flex-start\" align=\"center\" gap=\"1rem\">\n\t\t\t\t<CheckboxControl\n\t\t\t\t\tchecked={ selected }\n\t\t\t\t\tonChange={ handleToggleActivation }\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tid={ checkboxId }\n\t\t\t\t/>\n\t\t\t\t<label htmlFor={ checkboxId }>\n\t\t\t\t\t<FontDemo\n\t\t\t\t\t\tfont={ face }\n\t\t\t\t\t\ttext={ displayName }\n\t\t\t\t\t\tonClick={ handleToggleActivation }\n\t\t\t\t\t/>\n\t\t\t\t</label>\n\t\t\t</Flex>\n\t\t</div>\n\t);\n}\n\nexport default CollectionFontVariant;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,eAAe,EACfC,IAAI,EACJC,WAAW,IAAIC,qBAAqB,QAC9B,uBAAuB;;AAE9B;AACA;AACA;AACA,SAASC,sBAAsB,QAAQ,SAAS;AAChD,OAAOC,QAAQ,MAAM,aAAa;AAClC,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,SAASC,qBAAqBA,CAAE;EAC/BC,IAAI;EACJC,IAAI;EACJC,mBAAmB;EACnBC;AACD,CAAC,EAAG;EACH,MAAMC,sBAAsB,GAAGA,CAAA,KAAM;IACpC,IAAKH,IAAI,EAAEI,QAAQ,EAAG;MACrBH,mBAAmB,CAAED,IAAI,EAAED,IAAK,CAAC;MACjC;IACD;IACAE,mBAAmB,CAAED,IAAK,CAAC;EAC5B,CAAC;EAED,MAAMK,WAAW,GAAGL,IAAI,CAACM,IAAI,GAAG,GAAG,GAAGX,sBAAsB,CAAEI,IAAK,CAAC;EACpE,MAAM;IAAEQ;EAAU,CAAC,GAAGV,MAAM,CAAEH,qBAAsB,CAAC;EACrD,MAAMc,UAAU,GAAGD,SAAS,CAC1B,GAAGP,IAAI,CAACS,IAAM,IAAId,sBAAsB,CAAEI,IAAK,CAAG,EACpD,CAAC;EAED,OACCW,aAAA;IAAKC,SAAS,EAAC;EAA+B,GAC7CD,aAAA,CAAClB,IAAI;IAACoB,OAAO,EAAC,YAAY;IAACC,KAAK,EAAC,QAAQ;IAACC,GAAG,EAAC;EAAM,GACnDJ,aAAA,CAACnB,eAAe;IACfwB,OAAO,EAAGb,QAAU;IACpBc,QAAQ,EAAGb,sBAAwB;IACnCc,uBAAuB;IACvBC,EAAE,EAAGV;EAAY,CACjB,CAAC,EACFE,aAAA;IAAOS,OAAO,EAAGX;EAAY,GAC5BE,aAAA,CAACd,QAAQ;IACRI,IAAI,EAAGD,IAAM;IACbqB,IAAI,EAAGf,WAAa;IACpBgB,OAAO,EAAGlB;EAAwB,CAClC,CACK,CACF,CACF,CAAC;AAER;AAEA,eAAeL,qBAAqB"}
|
|
1
|
+
{"version":3,"names":["CheckboxControl","Flex","privateApis","componentsPrivateApis","getFontFaceVariantName","FontDemo","unlock","CollectionFontVariant","face","font","handleToggleVariant","selected","handleToggleActivation","fontFace","displayName","name","kebabCase","checkboxId","slug","createElement","className","justify","align","gap","checked","onChange","__nextHasNoMarginBottom","id","htmlFor","text","onClick"],"sources":["@wordpress/edit-site/src/components/global-styles/font-library-modal/collection-font-variant.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tCheckboxControl,\n\tFlex,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { getFontFaceVariantName } from './utils';\nimport FontDemo from './font-demo';\nimport { unlock } from '../../../lock-unlock';\n\nfunction CollectionFontVariant( {\n\tface,\n\tfont,\n\thandleToggleVariant,\n\tselected,\n} ) {\n\tconst handleToggleActivation = () => {\n\t\tif ( font?.fontFace ) {\n\t\t\thandleToggleVariant( font, face );\n\t\t\treturn;\n\t\t}\n\t\thandleToggleVariant( font );\n\t};\n\n\tconst displayName = font.name + ' ' + getFontFaceVariantName( face );\n\tconst { kebabCase } = unlock( componentsPrivateApis );\n\tconst checkboxId = kebabCase(\n\t\t`${ font.slug }-${ getFontFaceVariantName( face ) }`\n\t);\n\n\treturn (\n\t\t<div className=\"font-library-modal__font-card\">\n\t\t\t<Flex justify=\"flex-start\" align=\"center\" gap=\"1rem\">\n\t\t\t\t<CheckboxControl\n\t\t\t\t\tchecked={ selected }\n\t\t\t\t\tonChange={ handleToggleActivation }\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tid={ checkboxId }\n\t\t\t\t/>\n\t\t\t\t<label htmlFor={ checkboxId }>\n\t\t\t\t\t<FontDemo\n\t\t\t\t\t\tfont={ face }\n\t\t\t\t\t\ttext={ displayName }\n\t\t\t\t\t\tonClick={ handleToggleActivation }\n\t\t\t\t\t/>\n\t\t\t\t</label>\n\t\t\t</Flex>\n\t\t</div>\n\t);\n}\n\nexport default CollectionFontVariant;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,eAAe,EACfC,IAAI,EACJC,WAAW,IAAIC,qBAAqB,QAC9B,uBAAuB;;AAE9B;AACA;AACA;AACA,SAASC,sBAAsB,QAAQ,SAAS;AAChD,OAAOC,QAAQ,MAAM,aAAa;AAClC,SAASC,MAAM,QAAQ,sBAAsB;AAE7C,SAASC,qBAAqBA,CAAE;EAC/BC,IAAI;EACJC,IAAI;EACJC,mBAAmB;EACnBC;AACD,CAAC,EAAG;EACH,MAAMC,sBAAsB,GAAGA,CAAA,KAAM;IACpC,IAAKH,IAAI,EAAEI,QAAQ,EAAG;MACrBH,mBAAmB,CAAED,IAAI,EAAED,IAAK,CAAC;MACjC;IACD;IACAE,mBAAmB,CAAED,IAAK,CAAC;EAC5B,CAAC;EAED,MAAMK,WAAW,GAAGL,IAAI,CAACM,IAAI,GAAG,GAAG,GAAGX,sBAAsB,CAAEI,IAAK,CAAC;EACpE,MAAM;IAAEQ;EAAU,CAAC,GAAGV,MAAM,CAAEH,qBAAsB,CAAC;EACrD,MAAMc,UAAU,GAAGD,SAAS,CAC1B,GAAGP,IAAI,CAACS,IAAM,IAAId,sBAAsB,CAAEI,IAAK,CAAG,EACpD,CAAC;EAED,OACCW,aAAA;IAAKC,SAAS,EAAC;EAA+B,GAC7CD,aAAA,CAAClB,IAAI;IAACoB,OAAO,EAAC,YAAY;IAACC,KAAK,EAAC,QAAQ;IAACC,GAAG,EAAC;EAAM,GACnDJ,aAAA,CAACnB,eAAe;IACfwB,OAAO,EAAGb,QAAU;IACpBc,QAAQ,EAAGb,sBAAwB;IACnCc,uBAAuB;IACvBC,EAAE,EAAGV;EAAY,CACjB,CAAC,EACFE,aAAA;IAAOS,OAAO,EAAGX;EAAY,GAC5BE,aAAA,CAACd,QAAQ;IACRI,IAAI,EAAGD,IAAM;IACbqB,IAAI,EAAGf,WAAa;IACpBgB,OAAO,EAAGlB;EAAwB,CAClC,CACK,CACF,CACF,CAAC;AAER;AAEA,eAAeL,qBAAqB","ignoreList":[]}
|
|
@@ -18,12 +18,13 @@ const {
|
|
|
18
18
|
} = unlock(blockEditorPrivateApis);
|
|
19
19
|
import { setUIValuesNeeded, mergeFontFamilies, loadFontFaceInBrowser, unloadFontFaceInBrowser, getDisplaySrcFromFontFace, makeFontFacesFormData, makeFontFamilyFormData, batchInstallFontFaces, checkFontFaceInstalled } from './utils';
|
|
20
20
|
import { toggleFont } from './utils/toggleFont';
|
|
21
|
+
import setNestedValue from '../../../utils/set-nested-value';
|
|
21
22
|
export const FontLibraryContext = createContext({});
|
|
22
23
|
function FontLibraryProvider({
|
|
23
24
|
children
|
|
24
25
|
}) {
|
|
25
26
|
const {
|
|
26
|
-
|
|
27
|
+
saveEntityRecord
|
|
27
28
|
} = useDispatch(coreStore);
|
|
28
29
|
const {
|
|
29
30
|
globalStylesId
|
|
@@ -64,20 +65,47 @@ function FontLibraryProvider({
|
|
|
64
65
|
// theme.json file font families
|
|
65
66
|
const [baseFontFamilies] = useGlobalSetting('typography.fontFamilies', undefined, 'base');
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
/*
|
|
69
|
+
* Save the font families to the database.
|
|
70
|
+
* This function is called when the user activates or deactivates a font family.
|
|
71
|
+
* It only updates the global styles post content in the database for new font families.
|
|
72
|
+
* This avoids saving other styles/settings changed by the user using other parts of the editor.
|
|
73
|
+
*
|
|
74
|
+
* It uses the font families from the param to avoid using the font families from an outdated state.
|
|
75
|
+
*
|
|
76
|
+
* @param {Array} fonts - The font families that will be saved to the database.
|
|
77
|
+
*/
|
|
78
|
+
const saveFontFamilies = async fonts => {
|
|
79
|
+
// Gets the global styles database post content.
|
|
80
|
+
const updatedGlobalStyles = globalStyles.record;
|
|
81
|
+
|
|
82
|
+
// Updates the database version of global styles with the edited font families in the client.
|
|
83
|
+
setNestedValue(updatedGlobalStyles, ['settings', 'typography', 'fontFamilies'], fonts);
|
|
84
|
+
|
|
85
|
+
// Saves a new version of the global styles in the database.
|
|
86
|
+
await saveEntityRecord('root', 'globalStyles', updatedGlobalStyles);
|
|
70
87
|
};
|
|
71
88
|
|
|
72
89
|
// Library Fonts
|
|
73
90
|
const [modalTabOpen, setModalTabOpen] = useState(false);
|
|
74
91
|
const [libraryFontSelected, setLibraryFontSelected] = useState(null);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
})).sort((a, b) => a.name.localeCompare(b.name)) : [];
|
|
92
|
+
|
|
93
|
+
// Themes Fonts are the fonts defined in the global styles (database persisted theme.json data).
|
|
78
94
|
const themeFonts = fontFamilies?.theme ? fontFamilies.theme.map(f => setUIValuesNeeded(f, {
|
|
79
95
|
source: 'theme'
|
|
80
96
|
})).sort((a, b) => a.name.localeCompare(b.name)) : [];
|
|
97
|
+
const themeFontsSlugs = new Set(themeFonts.map(f => f.slug));
|
|
98
|
+
|
|
99
|
+
/*
|
|
100
|
+
* Base Theme Fonts are the fonts defined in the theme.json *file*.
|
|
101
|
+
*
|
|
102
|
+
* Uses the fonts from global styles + the ones from the theme.json file that hasn't repeated slugs.
|
|
103
|
+
* Avoids inconsistencies with the fonts listed in the font library modal as base (inactivated).
|
|
104
|
+
* These inconsistencies can happen when the active theme fonts in global styles aren't defined in theme.json file as when a theme style variation is applied.
|
|
105
|
+
*/
|
|
106
|
+
const baseThemeFonts = baseFontFamilies?.theme ? themeFonts.concat(baseFontFamilies.theme.filter(f => !themeFontsSlugs.has(f.slug)).map(f => setUIValuesNeeded(f, {
|
|
107
|
+
source: 'theme'
|
|
108
|
+
})).sort((a, b) => a.name.localeCompare(b.name))) : [];
|
|
81
109
|
const customFonts = fontFamilies?.custom ? fontFamilies.custom.map(f => setUIValuesNeeded(f, {
|
|
82
110
|
source: 'custom'
|
|
83
111
|
})).sort((a, b) => a.name.localeCompare(b.name)) : [];
|
|
@@ -97,7 +125,7 @@ function FontLibraryProvider({
|
|
|
97
125
|
setLibraryFontSelected(null);
|
|
98
126
|
return;
|
|
99
127
|
}
|
|
100
|
-
const fonts = font.source === 'theme' ?
|
|
128
|
+
const fonts = font.source === 'theme' ? themeFonts : baseCustomFonts;
|
|
101
129
|
|
|
102
130
|
// Tries to find the font in the installed fonts
|
|
103
131
|
const fontSelected = fonts.find(f => f.slug === font.slug);
|
|
@@ -167,19 +195,21 @@ function FontLibraryProvider({
|
|
|
167
195
|
}
|
|
168
196
|
|
|
169
197
|
// Install the fonts (upload the font files to the server and create the post in the database).
|
|
170
|
-
let
|
|
171
|
-
let
|
|
198
|
+
let successfullyInstalledFontFaces = [];
|
|
199
|
+
let unsuccessfullyInstalledFontFaces = [];
|
|
172
200
|
if (fontFamilyToInstall?.fontFace?.length > 0) {
|
|
173
201
|
const response = await batchInstallFontFaces(installedFontFamily.id, makeFontFacesFormData(fontFamilyToInstall));
|
|
174
|
-
|
|
175
|
-
|
|
202
|
+
successfullyInstalledFontFaces = response?.successes;
|
|
203
|
+
unsuccessfullyInstalledFontFaces = response?.errors;
|
|
176
204
|
}
|
|
177
205
|
|
|
178
|
-
// Use the
|
|
206
|
+
// Use the successfully installed font faces
|
|
179
207
|
// As well as any font faces that were already installed (those will be activated)
|
|
180
|
-
if (
|
|
181
|
-
|
|
182
|
-
|
|
208
|
+
if (successfullyInstalledFontFaces?.length > 0 || alreadyInstalledFontFaces?.length > 0) {
|
|
209
|
+
// Use font data from REST API not from client to ensure
|
|
210
|
+
// correct font information is used.
|
|
211
|
+
installedFontFamily.fontFace = [...successfullyInstalledFontFaces];
|
|
212
|
+
fontFamiliesToActivate.push(installedFontFamily);
|
|
183
213
|
}
|
|
184
214
|
|
|
185
215
|
// If it's a system font but was installed successfully, activate it.
|
|
@@ -188,18 +218,17 @@ function FontLibraryProvider({
|
|
|
188
218
|
}
|
|
189
219
|
|
|
190
220
|
// If the font family is new and is not a system font, delete it to avoid having font families without font faces.
|
|
191
|
-
if (isANewFontFamily && fontFamilyToInstall?.fontFace?.length > 0 &&
|
|
221
|
+
if (isANewFontFamily && fontFamilyToInstall?.fontFace?.length > 0 && successfullyInstalledFontFaces?.length === 0) {
|
|
192
222
|
await fetchUninstallFontFamily(installedFontFamily.id);
|
|
193
223
|
}
|
|
194
|
-
installationErrors = installationErrors.concat(
|
|
224
|
+
installationErrors = installationErrors.concat(unsuccessfullyInstalledFontFaces);
|
|
195
225
|
}
|
|
196
226
|
installationErrors = installationErrors.reduce((unique, item) => unique.includes(item.message) ? unique : [...unique, item.message], []);
|
|
197
227
|
if (fontFamiliesToActivate.length > 0) {
|
|
198
228
|
// Activate the font family (add the font family to the global styles).
|
|
199
|
-
activateCustomFontFamilies(fontFamiliesToActivate);
|
|
200
|
-
|
|
229
|
+
const activeFonts = activateCustomFontFamilies(fontFamiliesToActivate);
|
|
201
230
|
// Save the global styles to the database.
|
|
202
|
-
await
|
|
231
|
+
await saveFontFamilies(activeFonts);
|
|
203
232
|
refreshLibrary();
|
|
204
233
|
}
|
|
205
234
|
if (installationErrors.length > 0) {
|
|
@@ -220,9 +249,9 @@ function FontLibraryProvider({
|
|
|
220
249
|
// Deactivate the font family if delete request is successful
|
|
221
250
|
// (Removes the font family from the global styles).
|
|
222
251
|
if (uninstalledFontFamily.deleted) {
|
|
223
|
-
deactivateFontFamily(fontFamilyToUninstall);
|
|
252
|
+
const activeFonts = deactivateFontFamily(fontFamilyToUninstall);
|
|
224
253
|
// Save the global styles to the database.
|
|
225
|
-
await
|
|
254
|
+
await saveFontFamilies(activeFonts);
|
|
226
255
|
}
|
|
227
256
|
|
|
228
257
|
// Refresh the library (the library font families from database).
|
|
@@ -240,25 +269,51 @@ function FontLibraryProvider({
|
|
|
240
269
|
// We want to save as active all the theme fonts at the beginning
|
|
241
270
|
const initialCustomFonts = (_fontFamilies$font$so = fontFamilies?.[font.source]) !== null && _fontFamilies$font$so !== void 0 ? _fontFamilies$font$so : [];
|
|
242
271
|
const newCustomFonts = initialCustomFonts.filter(f => f.slug !== font.slug);
|
|
243
|
-
|
|
272
|
+
const activeFonts = {
|
|
244
273
|
...fontFamilies,
|
|
245
274
|
[font.source]: newCustomFonts
|
|
246
|
-
}
|
|
275
|
+
};
|
|
276
|
+
setFontFamilies(activeFonts);
|
|
247
277
|
if (font.fontFace) {
|
|
248
278
|
font.fontFace.forEach(face => {
|
|
249
279
|
unloadFontFaceInBrowser(face, 'all');
|
|
250
280
|
});
|
|
251
281
|
}
|
|
282
|
+
return activeFonts;
|
|
252
283
|
};
|
|
253
284
|
const activateCustomFontFamilies = fontsToAdd => {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
setFontFamilies({
|
|
285
|
+
const fontsToActivate = cleanFontsForSave(fontsToAdd);
|
|
286
|
+
const activeFonts = {
|
|
257
287
|
...fontFamilies,
|
|
258
|
-
|
|
259
|
-
|
|
288
|
+
// Merge the existing custom fonts with the new fonts.
|
|
289
|
+
custom: mergeFontFamilies(fontFamilies?.custom, fontsToActivate)
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
// Activate the fonts by set the new custom fonts array.
|
|
293
|
+
setFontFamilies(activeFonts);
|
|
294
|
+
loadFontsInBrowser(fontsToActivate);
|
|
295
|
+
return activeFonts;
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
// Removes the id from the families and faces to avoid saving that to global styles post content.
|
|
299
|
+
const cleanFontsForSave = fonts => {
|
|
300
|
+
return fonts.map(({
|
|
301
|
+
id: _familyDbId,
|
|
302
|
+
fontFace,
|
|
303
|
+
...font
|
|
304
|
+
}) => ({
|
|
305
|
+
...font,
|
|
306
|
+
...(fontFace && fontFace.length > 0 ? {
|
|
307
|
+
fontFace: fontFace.map(({
|
|
308
|
+
id: _faceDbId,
|
|
309
|
+
...face
|
|
310
|
+
}) => face)
|
|
311
|
+
} : {})
|
|
312
|
+
}));
|
|
313
|
+
};
|
|
314
|
+
const loadFontsInBrowser = fonts => {
|
|
260
315
|
// Add custom fonts to the browser.
|
|
261
|
-
|
|
316
|
+
fonts.forEach(font => {
|
|
262
317
|
if (font.fontFace) {
|
|
263
318
|
font.fontFace.forEach(face => {
|
|
264
319
|
// Load font faces just in the iframe because they already are in the document.
|
|
@@ -328,6 +383,7 @@ function FontLibraryProvider({
|
|
|
328
383
|
value: {
|
|
329
384
|
libraryFontSelected,
|
|
330
385
|
handleSetLibraryFontSelected,
|
|
386
|
+
fontFamilies,
|
|
331
387
|
themeFonts,
|
|
332
388
|
baseThemeFonts,
|
|
333
389
|
customFonts,
|