@wordpress/edit-site 6.17.1 → 6.19.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-pattern/index.js +0 -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 +3 -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 +0 -1
- package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build/components/add-new-template/index.js +0 -1
- package/build/components/add-new-template/index.js.map +1 -1
- package/build/components/add-new-template/utils.js +0 -1
- package/build/components/add-new-template/utils.js.map +1 -1
- package/build/components/editor/index.js +7 -5
- package/build/components/editor/index.js.map +1 -1
- package/build/components/{maybe-editor/index.js → editor/site-preview.js} +9 -25
- package/build/components/editor/site-preview.js.map +1 -0
- package/build/components/editor-canvas-container/index.js +0 -1
- package/build/components/editor-canvas-container/index.js.map +1 -1
- package/build/components/global-styles/font-families.js +0 -1
- package/build/components/global-styles/font-families.js.map +1 -1
- package/build/components/global-styles/font-library-modal/collection-font-variant.js +2 -5
- 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 +0 -1
- package/build/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-collection.js +0 -1
- 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 +0 -1
- package/build/components/global-styles/font-library-modal/font-demo.js.map +1 -1
- package/build/components/global-styles/font-library-modal/index.js +0 -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 +0 -1
- 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 +0 -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 +1 -5
- package/build/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
- package/build/components/global-styles/font-library-modal/upload-fonts.js +0 -1
- package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/filter-fonts.js +0 -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 +0 -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 +0 -1
- package/build/components/global-styles/font-library-modal/utils/index.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/make-families-from-faces.js +0 -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 +0 -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/toggleFont.js +0 -1
- package/build/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
- package/build/components/global-styles/font-sizes/font-size.js +0 -1
- package/build/components/global-styles/font-sizes/font-size.js.map +1 -1
- package/build/components/global-styles/font-sizes/font-sizes.js +0 -1
- package/build/components/global-styles/font-sizes/font-sizes.js.map +1 -1
- package/build/components/global-styles/highlighted-colors.js +0 -1
- package/build/components/global-styles/highlighted-colors.js.map +1 -1
- package/build/components/global-styles/hooks.js +0 -1
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/palette.js +0 -1
- package/build/components/global-styles/palette.js.map +1 -1
- package/build/components/global-styles/preset-colors.js +0 -1
- package/build/components/global-styles/preset-colors.js.map +1 -1
- package/build/components/global-styles/preview-styles.js +0 -1
- package/build/components/global-styles/preview-styles.js.map +1 -1
- package/build/components/global-styles/preview-wrapper.js +0 -1
- package/build/components/global-styles/preview-wrapper.js.map +1 -1
- package/build/components/global-styles/screen-block-list.js +9 -3
- package/build/components/global-styles/screen-block-list.js.map +1 -1
- package/build/components/global-styles/screen-css.js +9 -1
- package/build/components/global-styles/screen-css.js.map +1 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js +0 -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 +0 -1
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -1
- package/build/components/global-styles/screen-root.js +1 -0
- package/build/components/global-styles/screen-root.js.map +1 -1
- package/build/components/global-styles/shadow-utils.js +0 -1
- package/build/components/global-styles/shadow-utils.js.map +1 -1
- package/build/components/global-styles/shadows-edit-panel.js +0 -1
- package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
- package/build/components/global-styles/shadows-panel.js +0 -1
- package/build/components/global-styles/shadows-panel.js.map +1 -1
- package/build/components/global-styles/style-variations-container.js +0 -1
- package/build/components/global-styles/style-variations-container.js.map +1 -1
- package/build/components/global-styles/typeset.js +0 -1
- package/build/components/global-styles/typeset.js.map +1 -1
- package/build/components/global-styles/ui.js +0 -1
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles/utils.js +0 -1
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/global-styles/variations/variations-color.js +0 -1
- package/build/components/global-styles/variations/variations-color.js.map +1 -1
- package/build/components/global-styles/variations/variations-panel.js +0 -1
- package/build/components/global-styles/variations/variations-panel.js.map +1 -1
- package/build/components/global-styles/variations/variations-typography.js +0 -1
- package/build/components/global-styles/variations/variations-typography.js.map +1 -1
- package/build/components/global-styles-renderer/index.js +0 -1
- package/build/components/global-styles-renderer/index.js.map +1 -1
- package/build/components/media/index.js +2 -3
- package/build/components/media/index.js.map +1 -1
- package/build/components/page-patterns/fields.js +0 -1
- package/build/components/page-patterns/fields.js.map +1 -1
- package/build/components/page-patterns/header.js +0 -1
- package/build/components/page-patterns/header.js.map +1 -1
- package/build/components/page-patterns/index.js +0 -1
- package/build/components/page-patterns/index.js.map +1 -1
- package/build/components/page-patterns/search-items.js +0 -1
- package/build/components/page-patterns/search-items.js.map +1 -1
- package/build/components/page-patterns/use-pattern-settings.js +0 -1
- package/build/components/page-patterns/use-pattern-settings.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +0 -1
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/page-templates/index.js +0 -1
- package/build/components/page-templates/index.js.map +1 -1
- package/build/components/post-edit/index.js +0 -1
- package/build/components/post-edit/index.js.map +1 -1
- package/build/components/post-list/index.js +0 -1
- package/build/components/post-list/index.js.map +1 -1
- package/build/components/posts-app-routes/index.js +0 -1
- package/build/components/posts-app-routes/index.js.map +1 -1
- package/build/components/resizable-frame/index.js +1 -1
- package/build/components/resizable-frame/index.js.map +1 -1
- package/build/components/save-button/index.js +0 -1
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/save-hub/index.js +0 -1
- package/build/components/save-hub/index.js.map +1 -1
- package/build/components/save-keyboard-shortcut/index.js +0 -1
- package/build/components/save-keyboard-shortcut/index.js.map +1 -1
- package/build/components/save-panel/index.js +14 -9
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/sidebar/index.js +0 -1
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-dataviews/custom-dataviews-list.js +0 -1
- package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
- package/build/components/sidebar-dataviews/dataview-item.js +0 -1
- package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build/components/sidebar-dataviews/index.js +0 -1
- package/build/components/sidebar-dataviews/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +1 -7
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/index.js +12 -2
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/index.js +0 -1
- package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +0 -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 +0 -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 +0 -1
- package/build/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/content.js +0 -1
- package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
- package/build/components/site-editor-routes/home.js +3 -3
- package/build/components/site-editor-routes/home.js.map +1 -1
- package/build/components/site-editor-routes/index.js +2 -2
- package/build/components/site-editor-routes/index.js.map +1 -1
- package/build/components/site-editor-routes/navigation-item.js +1 -4
- package/build/components/site-editor-routes/navigation-item.js.map +1 -1
- package/build/components/site-editor-routes/notfound.js +41 -0
- package/build/components/site-editor-routes/notfound.js.map +1 -0
- package/build/components/site-editor-routes/patterns.js +21 -1
- package/build/components/site-editor-routes/patterns.js.map +1 -1
- package/build/components/site-editor-routes/template-item.js +3 -3
- package/build/components/site-editor-routes/template-item.js.map +1 -1
- package/build/components/site-editor-routes/template-part-item.js +3 -3
- package/build/components/site-editor-routes/template-part-item.js.map +1 -1
- package/build/components/site-hub/index.js +7 -5
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/style-book/categories.js +0 -1
- package/build/components/style-book/categories.js.map +1 -1
- package/build/components/style-book/color-examples.js +0 -1
- package/build/components/style-book/color-examples.js.map +1 -1
- package/build/components/style-book/duotone-examples.js +0 -1
- package/build/components/style-book/duotone-examples.js.map +1 -1
- package/build/components/style-book/examples.js +0 -1
- package/build/components/style-book/examples.js.map +1 -1
- package/build/components/style-book/index.js +7 -18
- package/build/components/style-book/index.js.map +1 -1
- package/build/components/welcome-guide/page.js +3 -1
- package/build/components/welcome-guide/page.js.map +1 -1
- package/build/index.js +0 -1
- package/build/index.js.map +1 -1
- package/build/posts.js +0 -1
- package/build/posts.js.map +1 -1
- package/build/store/reducer.js +0 -1
- package/build/store/reducer.js.map +1 -1
- package/build/utils/get-filtered-template-parts.js +0 -1
- package/build/utils/get-filtered-template-parts.js.map +1 -1
- package/build/utils/set-nested-value.js +0 -1
- package/build/utils/set-nested-value.js.map +1 -1
- package/build-module/components/add-new-pattern/index.js +0 -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 +3 -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 +0 -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 +0 -1
- package/build-module/components/add-new-template/index.js.map +1 -1
- package/build-module/components/add-new-template/utils.js +0 -1
- package/build-module/components/add-new-template/utils.js.map +1 -1
- package/build-module/components/editor/index.js +7 -5
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/{maybe-editor/index.js → editor/site-preview.js} +8 -25
- package/build-module/components/editor/site-preview.js.map +1 -0
- package/build-module/components/editor-canvas-container/index.js +0 -1
- package/build-module/components/editor-canvas-container/index.js.map +1 -1
- package/build-module/components/global-styles/font-families.js +0 -1
- package/build-module/components/global-styles/font-families.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/collection-font-variant.js +3 -6
- 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 +0 -1
- package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/font-collection.js +0 -1
- 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 +0 -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/index.js +0 -1
- 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 +0 -1
- 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 +0 -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 +3 -7
- package/build-module/components/global-styles/font-library-modal/library-font-variant.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/upload-fonts.js +0 -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/filter-fonts.js +0 -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 +0 -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 +0 -1
- package/build-module/components/global-styles/font-library-modal/utils/index.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/make-families-from-faces.js +0 -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 +0 -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/toggleFont.js +0 -1
- package/build-module/components/global-styles/font-library-modal/utils/toggleFont.js.map +1 -1
- package/build-module/components/global-styles/font-sizes/font-size.js +0 -1
- package/build-module/components/global-styles/font-sizes/font-size.js.map +1 -1
- package/build-module/components/global-styles/font-sizes/font-sizes.js +0 -1
- package/build-module/components/global-styles/font-sizes/font-sizes.js.map +1 -1
- package/build-module/components/global-styles/highlighted-colors.js +0 -1
- package/build-module/components/global-styles/highlighted-colors.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +0 -1
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/palette.js +0 -1
- package/build-module/components/global-styles/palette.js.map +1 -1
- package/build-module/components/global-styles/preset-colors.js +0 -1
- package/build-module/components/global-styles/preset-colors.js.map +1 -1
- package/build-module/components/global-styles/preview-styles.js +0 -1
- package/build-module/components/global-styles/preview-styles.js.map +1 -1
- package/build-module/components/global-styles/preview-wrapper.js +0 -1
- package/build-module/components/global-styles/preview-wrapper.js.map +1 -1
- package/build-module/components/global-styles/screen-block-list.js +10 -4
- package/build-module/components/global-styles/screen-block-list.js.map +1 -1
- package/build-module/components/global-styles/screen-css.js +9 -1
- package/build-module/components/global-styles/screen-css.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +0 -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 +0 -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 +1 -0
- package/build-module/components/global-styles/screen-root.js.map +1 -1
- package/build-module/components/global-styles/shadow-utils.js +0 -1
- package/build-module/components/global-styles/shadow-utils.js.map +1 -1
- package/build-module/components/global-styles/shadows-edit-panel.js +0 -1
- package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
- package/build-module/components/global-styles/shadows-panel.js +0 -1
- package/build-module/components/global-styles/shadows-panel.js.map +1 -1
- package/build-module/components/global-styles/style-variations-container.js +0 -1
- package/build-module/components/global-styles/style-variations-container.js.map +1 -1
- package/build-module/components/global-styles/typeset.js +0 -1
- package/build-module/components/global-styles/typeset.js.map +1 -1
- package/build-module/components/global-styles/ui.js +0 -1
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles/utils.js +0 -1
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-color.js +0 -1
- package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-panel.js +0 -1
- package/build-module/components/global-styles/variations/variations-panel.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-typography.js +0 -1
- package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
- package/build-module/components/global-styles-renderer/index.js +0 -1
- package/build-module/components/global-styles-renderer/index.js.map +1 -1
- package/build-module/components/media/index.js +2 -3
- package/build-module/components/media/index.js.map +1 -1
- package/build-module/components/page-patterns/fields.js +0 -1
- package/build-module/components/page-patterns/fields.js.map +1 -1
- package/build-module/components/page-patterns/header.js +0 -1
- package/build-module/components/page-patterns/header.js.map +1 -1
- package/build-module/components/page-patterns/index.js +0 -1
- package/build-module/components/page-patterns/index.js.map +1 -1
- package/build-module/components/page-patterns/search-items.js +0 -1
- package/build-module/components/page-patterns/search-items.js.map +1 -1
- package/build-module/components/page-patterns/use-pattern-settings.js +0 -1
- package/build-module/components/page-patterns/use-pattern-settings.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +0 -1
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/page-templates/index.js +0 -1
- package/build-module/components/page-templates/index.js.map +1 -1
- package/build-module/components/post-edit/index.js +0 -1
- package/build-module/components/post-edit/index.js.map +1 -1
- package/build-module/components/post-list/index.js +0 -1
- package/build-module/components/post-list/index.js.map +1 -1
- package/build-module/components/posts-app-routes/index.js +0 -1
- package/build-module/components/posts-app-routes/index.js.map +1 -1
- package/build-module/components/resizable-frame/index.js +1 -1
- package/build-module/components/resizable-frame/index.js.map +1 -1
- package/build-module/components/save-button/index.js +0 -1
- package/build-module/components/save-button/index.js.map +1 -1
- package/build-module/components/save-hub/index.js +0 -1
- package/build-module/components/save-hub/index.js.map +1 -1
- package/build-module/components/save-keyboard-shortcut/index.js +0 -1
- package/build-module/components/save-keyboard-shortcut/index.js.map +1 -1
- package/build-module/components/save-panel/index.js +14 -9
- package/build-module/components/save-panel/index.js.map +1 -1
- package/build-module/components/sidebar/index.js +0 -1
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +0 -1
- package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
- package/build-module/components/sidebar-dataviews/dataview-item.js +0 -1
- package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build-module/components/sidebar-dataviews/index.js +0 -1
- package/build-module/components/sidebar-dataviews/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +1 -7
- package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +12 -2
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.js +0 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +0 -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 +0 -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 +0 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-theme-patterns.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +0 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
- package/build-module/components/site-editor-routes/home.js +3 -3
- package/build-module/components/site-editor-routes/home.js.map +1 -1
- package/build-module/components/site-editor-routes/index.js +2 -2
- package/build-module/components/site-editor-routes/index.js.map +1 -1
- package/build-module/components/site-editor-routes/navigation-item.js +1 -4
- package/build-module/components/site-editor-routes/navigation-item.js.map +1 -1
- package/build-module/components/site-editor-routes/notfound.js +33 -0
- package/build-module/components/site-editor-routes/notfound.js.map +1 -0
- package/build-module/components/site-editor-routes/patterns.js +21 -1
- package/build-module/components/site-editor-routes/patterns.js.map +1 -1
- package/build-module/components/site-editor-routes/template-item.js +3 -3
- package/build-module/components/site-editor-routes/template-item.js.map +1 -1
- package/build-module/components/site-editor-routes/template-part-item.js +3 -3
- package/build-module/components/site-editor-routes/template-part-item.js.map +1 -1
- package/build-module/components/site-hub/index.js +9 -7
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/style-book/categories.js +0 -1
- package/build-module/components/style-book/categories.js.map +1 -1
- package/build-module/components/style-book/color-examples.js +0 -1
- package/build-module/components/style-book/color-examples.js.map +1 -1
- package/build-module/components/style-book/duotone-examples.js +0 -1
- package/build-module/components/style-book/duotone-examples.js.map +1 -1
- package/build-module/components/style-book/examples.js +0 -1
- package/build-module/components/style-book/examples.js.map +1 -1
- package/build-module/components/style-book/index.js +7 -18
- package/build-module/components/style-book/index.js.map +1 -1
- package/build-module/components/welcome-guide/page.js +3 -1
- package/build-module/components/welcome-guide/page.js.map +1 -1
- package/build-module/index.js +0 -1
- package/build-module/index.js.map +1 -1
- package/build-module/posts.js +0 -1
- package/build-module/posts.js.map +1 -1
- package/build-module/store/reducer.js +0 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/utils/get-filtered-template-parts.js +0 -1
- package/build-module/utils/get-filtered-template-parts.js.map +1 -1
- package/build-module/utils/set-nested-value.js +0 -1
- package/build-module/utils/set-nested-value.js.map +1 -1
- package/build-style/posts-rtl.css +9 -8
- package/build-style/posts.css +9 -8
- package/build-style/style-rtl.css +18 -28
- package/build-style/style.css +18 -28
- package/package.json +42 -42
- package/src/components/add-new-template/add-custom-generic-template-modal-content.js +1 -0
- package/src/components/editor/index.js +12 -6
- package/src/components/{maybe-editor/index.js → editor/site-preview.js} +7 -20
- package/src/components/global-styles/font-library-modal/collection-font-variant.js +3 -11
- package/src/components/global-styles/font-library-modal/library-font-variant.js +3 -12
- package/src/components/global-styles/screen-block-list.js +15 -6
- package/src/components/global-styles/screen-css.js +9 -0
- package/src/components/global-styles/screen-root.js +1 -0
- package/src/components/global-styles/style.scss +5 -0
- package/src/components/layout/style.scss +4 -0
- package/src/components/media/index.js +2 -2
- package/src/components/page-patterns/style.scss +2 -0
- package/src/components/page-templates/style.scss +2 -0
- package/src/components/resizable-frame/index.js +1 -1
- package/src/components/save-panel/index.js +16 -8
- package/src/components/sidebar-navigation-screen/index.js +2 -11
- package/src/components/sidebar-navigation-screen/style.scss +0 -23
- package/src/components/sidebar-navigation-screen-main/index.js +15 -10
- package/src/components/site-editor-routes/home.js +2 -2
- package/src/components/site-editor-routes/index.js +2 -0
- package/src/components/site-editor-routes/navigation-item.js +1 -4
- package/src/components/site-editor-routes/notfound.js +38 -0
- package/src/components/site-editor-routes/patterns.js +20 -1
- package/src/components/site-editor-routes/template-item.js +3 -3
- package/src/components/site-editor-routes/template-part-item.js +3 -3
- package/src/components/site-hub/index.js +17 -21
- package/src/components/style-book/index.js +1 -13
- package/src/components/welcome-guide/page.js +1 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/maybe-editor/index.js.map +0 -1
- package/build-module/components/maybe-editor/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_blocks","_colorExamples","_interopRequireDefault","_duotoneExamples","_constants","_jsxRuntime","getColorExamples","colors","examples","STYLE_BOOK_COLOR_GROUPS","forEach","group","palette","type","paletteFiltered","Array","isArray","find","origin","slug","undefined","example","name","title","category","content","jsx","default","duotones","push","getOverviewBlockExamples","themePalette","themeColorexample","__","templateColumns","itemHeight","typographyBlockExamples","getBlockType","headingBlock","createBlock","level","firstParagraphBlock","secondParagraphBlock","groupBlock","layout","columnCount","minimumColumnWidth","style","spacing","blockGap","length","blocks","otherBlockExamples","blockName","blockType","blockExample","getBlockFromExample","attributes","getExamples","nonHeadingBlockExamples","getBlockTypes","filter","supports","inserter","map","isHeadingBlockRegistered","headingsExample","sprintf","colorExamples","overviewBlockExamples"],"sources":["@wordpress/edit-site/src/components/style-book/examples.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tgetBlockType,\n\tgetBlockTypes,\n\tgetBlockFromExample,\n\tcreateBlock,\n\t// @wordpress/blocks imports are not typed.\n\t// @ts-expect-error\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tBlockExample,\n\tColorOrigin,\n\tMultiOriginPalettes,\n\tBlockType,\n} from './types';\nimport ColorExamples from './color-examples';\nimport DuotoneExamples from './duotone-examples';\nimport { STYLE_BOOK_COLOR_GROUPS } from './constants';\n\n/**\n * Returns examples color examples for each origin\n * e.g. Core (Default), Theme, and User.\n *\n * @param {MultiOriginPalettes} colors Global Styles color palettes per origin.\n * @return {BlockExample[]} An array of color block examples.\n */\nfunction getColorExamples( colors: MultiOriginPalettes ): BlockExample[] {\n\tif ( ! colors ) {\n\t\treturn [];\n\t}\n\n\tconst examples: BlockExample[] = [];\n\n\tSTYLE_BOOK_COLOR_GROUPS.forEach( ( group ) => {\n\t\tconst palette = colors[ group.type as keyof MultiOriginPalettes ];\n\t\tconst paletteFiltered = Array.isArray( palette )\n\t\t\t? palette.find(\n\t\t\t\t\t( origin: ColorOrigin ) => origin.slug === group.origin\n\t\t\t )\n\t\t\t: undefined;\n\n\t\tif ( paletteFiltered?.[ group.type ] ) {\n\t\t\tconst example: BlockExample = {\n\t\t\t\tname: group.slug,\n\t\t\t\ttitle: group.title,\n\t\t\t\tcategory: 'colors',\n\t\t\t};\n\t\t\tif ( group.type === 'duotones' ) {\n\t\t\t\texample.content = (\n\t\t\t\t\t<DuotoneExamples\n\t\t\t\t\t\tduotones={ paletteFiltered[ group.type ] }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t\texamples.push( example );\n\t\t\t} else {\n\t\t\t\texample.content = (\n\t\t\t\t\t<ColorExamples\n\t\t\t\t\t\tcolors={ paletteFiltered[ group.type ] }\n\t\t\t\t\t\ttype={ group.type }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t\texamples.push( example );\n\t\t\t}\n\t\t}\n\t} );\n\n\treturn examples;\n}\n\n/**\n * Returns examples for the overview page.\n *\n * @param {MultiOriginPalettes} colors Global Styles color palettes per origin.\n * @return {BlockExample[]} An array of block examples.\n */\nfunction getOverviewBlockExamples(\n\tcolors: MultiOriginPalettes\n): BlockExample[] {\n\tconst examples: BlockExample[] = [];\n\n\t// Get theme palette from colors if they exist.\n\tconst themePalette = Array.isArray( colors?.colors )\n\t\t? colors.colors.find(\n\t\t\t\t( origin: ColorOrigin ) => origin.slug === 'theme'\n\t\t )\n\t\t: undefined;\n\n\tif ( themePalette ) {\n\t\tconst themeColorexample: BlockExample = {\n\t\t\tname: 'theme-colors',\n\t\t\ttitle: __( 'Colors' ),\n\t\t\tcategory: 'overview',\n\t\t\tcontent: (\n\t\t\t\t<ColorExamples\n\t\t\t\t\tcolors={ themePalette.colors }\n\t\t\t\t\ttype=\"colors\"\n\t\t\t\t\ttemplateColumns=\"repeat(auto-fill, minmax( 200px, 1fr ))\"\n\t\t\t\t\titemHeight=\"32px\"\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\texamples.push( themeColorexample );\n\t}\n\n\t// Get examples for typography blocks.\n\tconst typographyBlockExamples: BlockType[] = [];\n\n\tif ( getBlockType( 'core/heading' ) ) {\n\t\tconst headingBlock = createBlock( 'core/heading', {\n\t\t\tcontent: __(\n\t\t\t\t`AaBbCcDdEeFfGgHhiiJjKkLIMmNnOoPpQakRrssTtUuVVWwXxxYyZzOl23356789X{(…)},2!*&:/A@HELFO™`\n\t\t\t),\n\t\t\tlevel: 1,\n\t\t} );\n\t\ttypographyBlockExamples.push( headingBlock );\n\t}\n\n\tif ( getBlockType( 'core/paragraph' ) ) {\n\t\tconst firstParagraphBlock = createBlock( 'core/paragraph', {\n\t\t\tcontent: __(\n\t\t\t\t`A paragraph in a website refers to a distinct block of text that is used to present and organize information. It is a fundamental unit of content in web design and is typically composed of a group of related sentences or thoughts focused on a particular topic or idea. Paragraphs play a crucial role in improving the readability and user experience of a website. They break down the text into smaller, manageable chunks, allowing readers to scan the content more easily.`\n\t\t\t),\n\t\t} );\n\t\tconst secondParagraphBlock = createBlock( 'core/paragraph', {\n\t\t\tcontent: __(\n\t\t\t\t`Additionally, paragraphs help structure the flow of information and provide logical breaks between different concepts or pieces of information. In terms of formatting, paragraphs in websites are commonly denoted by a vertical gap or indentation between each block of text. This visual separation helps visually distinguish one paragraph from another, creating a clear and organized layout that guides the reader through the content smoothly.`\n\t\t\t),\n\t\t} );\n\n\t\tif ( getBlockType( 'core/group' ) ) {\n\t\t\tconst groupBlock = createBlock(\n\t\t\t\t'core/group',\n\t\t\t\t{\n\t\t\t\t\tlayout: {\n\t\t\t\t\t\ttype: 'grid',\n\t\t\t\t\t\tcolumnCount: 2,\n\t\t\t\t\t\tminimumColumnWidth: '12rem',\n\t\t\t\t\t},\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tspacing: {\n\t\t\t\t\t\t\tblockGap: '1.5rem',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t[ firstParagraphBlock, secondParagraphBlock ]\n\t\t\t);\n\t\t\ttypographyBlockExamples.push( groupBlock );\n\t\t} else {\n\t\t\ttypographyBlockExamples.push( firstParagraphBlock );\n\t\t}\n\t}\n\n\tif ( !! typographyBlockExamples.length ) {\n\t\texamples.push( {\n\t\t\tname: 'typography',\n\t\t\ttitle: __( 'Typography' ),\n\t\t\tcategory: 'overview',\n\t\t\tblocks: typographyBlockExamples,\n\t\t} );\n\t}\n\n\tconst otherBlockExamples = [\n\t\t'core/image',\n\t\t'core/separator',\n\t\t'core/buttons',\n\t\t'core/pullquote',\n\t\t'core/search',\n\t];\n\n\t// Get examples for other blocks and put them in order of above array.\n\totherBlockExamples.forEach( ( blockName ) => {\n\t\tconst blockType = getBlockType( blockName );\n\t\tif ( blockType && blockType.example ) {\n\t\t\tconst blockExample: BlockExample = {\n\t\t\t\tname: blockName,\n\t\t\t\ttitle: blockType.title,\n\t\t\t\tcategory: 'overview',\n\t\t\t\t/*\n\t\t\t\t * CSS generated from style attributes will take precedence over global styles CSS,\n\t\t\t\t * so remove the style attribute from the example to ensure the example\n\t\t\t\t * demonstrates changes to global styles.\n\t\t\t\t */\n\t\t\t\tblocks: getBlockFromExample( blockName, {\n\t\t\t\t\t...blockType.example,\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\t...blockType.example.attributes,\n\t\t\t\t\t\tstyle: undefined,\n\t\t\t\t\t},\n\t\t\t\t} ),\n\t\t\t};\n\t\t\texamples.push( blockExample );\n\t\t}\n\t} );\n\n\treturn examples;\n}\n\n/**\n * Returns a list of examples for registered block types.\n *\n * @param {MultiOriginPalettes} colors Global styles colors grouped by origin e.g. Core, Theme, and User.\n * @return {BlockExample[]} An array of block examples.\n */\nexport function getExamples( colors: MultiOriginPalettes ): BlockExample[] {\n\tconst nonHeadingBlockExamples = getBlockTypes()\n\t\t.filter( ( blockType: BlockType ) => {\n\t\t\tconst { name, example, supports } = blockType;\n\t\t\treturn (\n\t\t\t\tname !== 'core/heading' &&\n\t\t\t\t!! example &&\n\t\t\t\tsupports?.inserter !== false\n\t\t\t);\n\t\t} )\n\t\t.map( ( blockType: BlockType ) => ( {\n\t\t\tname: blockType.name,\n\t\t\ttitle: blockType.title,\n\t\t\tcategory: blockType.category,\n\t\t\t/*\n\t\t\t * CSS generated from style attributes will take precedence over global styles CSS,\n\t\t\t * so remove the style attribute from the example to ensure the example\n\t\t\t * demonstrates changes to global styles.\n\t\t\t */\n\t\t\tblocks: getBlockFromExample( blockType.name, {\n\t\t\t\t...blockType.example,\n\t\t\t\tattributes: {\n\t\t\t\t\t...blockType.example.attributes,\n\t\t\t\t\tstyle: undefined,\n\t\t\t\t},\n\t\t\t} ),\n\t\t} ) );\n\tconst isHeadingBlockRegistered = !! getBlockType( 'core/heading' );\n\n\tif ( ! isHeadingBlockRegistered ) {\n\t\treturn nonHeadingBlockExamples;\n\t}\n\n\t// Use our own example for the Heading block so that we can show multiple\n\t// heading levels.\n\tconst headingsExample = {\n\t\tname: 'core/heading',\n\t\ttitle: __( 'Headings' ),\n\t\tcategory: 'text',\n\t\tblocks: [ 1, 2, 3, 4, 5, 6 ].map( ( level ) => {\n\t\t\treturn createBlock( 'core/heading', {\n\t\t\t\tcontent: sprintf(\n\t\t\t\t\t// translators: %d: heading level e.g: \"1\", \"2\", \"3\"\n\t\t\t\t\t__( 'Heading %d' ),\n\t\t\t\t\tlevel\n\t\t\t\t),\n\t\t\t\tlevel,\n\t\t\t} );\n\t\t} ),\n\t};\n\tconst colorExamples = getColorExamples( colors );\n\n\tconst overviewBlockExamples = getOverviewBlockExamples( colors );\n\n\treturn [\n\t\theadingsExample,\n\t\t...colorExamples,\n\t\t...nonHeadingBlockExamples,\n\t\t...overviewBlockExamples,\n\t];\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAkBA,IAAAE,cAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAAsD,IAAAM,WAAA,GAAAN,OAAA;AAxBtD;AACA;AACA;;AAWA;AACA;AACA;;AAWA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,SAASO,gBAAgBA,CAAEC,MAA2B,EAAmB;EACxE,IAAK,CAAEA,MAAM,EAAG;IACf,OAAO,EAAE;EACV;EAEA,MAAMC,QAAwB,GAAG,EAAE;EAEnCC,kCAAuB,CAACC,OAAO,CAAIC,KAAK,IAAM;IAC7C,MAAMC,OAAO,GAAGL,MAAM,CAAEI,KAAK,CAACE,IAAI,CAA+B;IACjE,MAAMC,eAAe,GAAGC,KAAK,CAACC,OAAO,CAAEJ,OAAQ,CAAC,GAC7CA,OAAO,CAACK,IAAI,CACVC,MAAmB,IAAMA,MAAM,CAACC,IAAI,KAAKR,KAAK,CAACO,MACjD,CAAC,GACDE,SAAS;IAEZ,IAAKN,eAAe,GAAIH,KAAK,CAACE,IAA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EhE,OAAO,CACN2D,eAAe,EACf,GAAGE,aAAa,EAChB,GAAGT,uBAAuB,EAC1B,GAAGU,qBAAqB,CACxB;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_i18n","require","_blocks","_colorExamples","_interopRequireDefault","_duotoneExamples","_constants","_jsxRuntime","getColorExamples","colors","examples","STYLE_BOOK_COLOR_GROUPS","forEach","group","palette","type","paletteFiltered","Array","isArray","find","origin","slug","undefined","example","name","title","category","content","jsx","default","duotones","push","getOverviewBlockExamples","themePalette","themeColorexample","__","templateColumns","itemHeight","typographyBlockExamples","getBlockType","headingBlock","createBlock","level","firstParagraphBlock","secondParagraphBlock","groupBlock","layout","columnCount","minimumColumnWidth","style","spacing","blockGap","length","blocks","otherBlockExamples","blockName","blockType","blockExample","getBlockFromExample","attributes","getExamples","nonHeadingBlockExamples","getBlockTypes","filter","supports","inserter","map","isHeadingBlockRegistered","headingsExample","sprintf","colorExamples","overviewBlockExamples"],"sources":["@wordpress/edit-site/src/components/style-book/examples.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tgetBlockType,\n\tgetBlockTypes,\n\tgetBlockFromExample,\n\tcreateBlock,\n\t// @wordpress/blocks imports are not typed.\n\t// @ts-expect-error\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tBlockExample,\n\tColorOrigin,\n\tMultiOriginPalettes,\n\tBlockType,\n} from './types';\nimport ColorExamples from './color-examples';\nimport DuotoneExamples from './duotone-examples';\nimport { STYLE_BOOK_COLOR_GROUPS } from './constants';\n\n/**\n * Returns examples color examples for each origin\n * e.g. Core (Default), Theme, and User.\n *\n * @param {MultiOriginPalettes} colors Global Styles color palettes per origin.\n * @return {BlockExample[]} An array of color block examples.\n */\nfunction getColorExamples( colors: MultiOriginPalettes ): BlockExample[] {\n\tif ( ! colors ) {\n\t\treturn [];\n\t}\n\n\tconst examples: BlockExample[] = [];\n\n\tSTYLE_BOOK_COLOR_GROUPS.forEach( ( group ) => {\n\t\tconst palette = colors[ group.type as keyof MultiOriginPalettes ];\n\t\tconst paletteFiltered = Array.isArray( palette )\n\t\t\t? palette.find(\n\t\t\t\t\t( origin: ColorOrigin ) => origin.slug === group.origin\n\t\t\t )\n\t\t\t: undefined;\n\n\t\tif ( paletteFiltered?.[ group.type ] ) {\n\t\t\tconst example: BlockExample = {\n\t\t\t\tname: group.slug,\n\t\t\t\ttitle: group.title,\n\t\t\t\tcategory: 'colors',\n\t\t\t};\n\t\t\tif ( group.type === 'duotones' ) {\n\t\t\t\texample.content = (\n\t\t\t\t\t<DuotoneExamples\n\t\t\t\t\t\tduotones={ paletteFiltered[ group.type ] }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t\texamples.push( example );\n\t\t\t} else {\n\t\t\t\texample.content = (\n\t\t\t\t\t<ColorExamples\n\t\t\t\t\t\tcolors={ paletteFiltered[ group.type ] }\n\t\t\t\t\t\ttype={ group.type }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t\texamples.push( example );\n\t\t\t}\n\t\t}\n\t} );\n\n\treturn examples;\n}\n\n/**\n * Returns examples for the overview page.\n *\n * @param {MultiOriginPalettes} colors Global Styles color palettes per origin.\n * @return {BlockExample[]} An array of block examples.\n */\nfunction getOverviewBlockExamples(\n\tcolors: MultiOriginPalettes\n): BlockExample[] {\n\tconst examples: BlockExample[] = [];\n\n\t// Get theme palette from colors if they exist.\n\tconst themePalette = Array.isArray( colors?.colors )\n\t\t? colors.colors.find(\n\t\t\t\t( origin: ColorOrigin ) => origin.slug === 'theme'\n\t\t )\n\t\t: undefined;\n\n\tif ( themePalette ) {\n\t\tconst themeColorexample: BlockExample = {\n\t\t\tname: 'theme-colors',\n\t\t\ttitle: __( 'Colors' ),\n\t\t\tcategory: 'overview',\n\t\t\tcontent: (\n\t\t\t\t<ColorExamples\n\t\t\t\t\tcolors={ themePalette.colors }\n\t\t\t\t\ttype=\"colors\"\n\t\t\t\t\ttemplateColumns=\"repeat(auto-fill, minmax( 200px, 1fr ))\"\n\t\t\t\t\titemHeight=\"32px\"\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\texamples.push( themeColorexample );\n\t}\n\n\t// Get examples for typography blocks.\n\tconst typographyBlockExamples: BlockType[] = [];\n\n\tif ( getBlockType( 'core/heading' ) ) {\n\t\tconst headingBlock = createBlock( 'core/heading', {\n\t\t\tcontent: __(\n\t\t\t\t`AaBbCcDdEeFfGgHhiiJjKkLIMmNnOoPpQakRrssTtUuVVWwXxxYyZzOl23356789X{(…)},2!*&:/A@HELFO™`\n\t\t\t),\n\t\t\tlevel: 1,\n\t\t} );\n\t\ttypographyBlockExamples.push( headingBlock );\n\t}\n\n\tif ( getBlockType( 'core/paragraph' ) ) {\n\t\tconst firstParagraphBlock = createBlock( 'core/paragraph', {\n\t\t\tcontent: __(\n\t\t\t\t`A paragraph in a website refers to a distinct block of text that is used to present and organize information. It is a fundamental unit of content in web design and is typically composed of a group of related sentences or thoughts focused on a particular topic or idea. Paragraphs play a crucial role in improving the readability and user experience of a website. They break down the text into smaller, manageable chunks, allowing readers to scan the content more easily.`\n\t\t\t),\n\t\t} );\n\t\tconst secondParagraphBlock = createBlock( 'core/paragraph', {\n\t\t\tcontent: __(\n\t\t\t\t`Additionally, paragraphs help structure the flow of information and provide logical breaks between different concepts or pieces of information. In terms of formatting, paragraphs in websites are commonly denoted by a vertical gap or indentation between each block of text. This visual separation helps visually distinguish one paragraph from another, creating a clear and organized layout that guides the reader through the content smoothly.`\n\t\t\t),\n\t\t} );\n\n\t\tif ( getBlockType( 'core/group' ) ) {\n\t\t\tconst groupBlock = createBlock(\n\t\t\t\t'core/group',\n\t\t\t\t{\n\t\t\t\t\tlayout: {\n\t\t\t\t\t\ttype: 'grid',\n\t\t\t\t\t\tcolumnCount: 2,\n\t\t\t\t\t\tminimumColumnWidth: '12rem',\n\t\t\t\t\t},\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tspacing: {\n\t\t\t\t\t\t\tblockGap: '1.5rem',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t[ firstParagraphBlock, secondParagraphBlock ]\n\t\t\t);\n\t\t\ttypographyBlockExamples.push( groupBlock );\n\t\t} else {\n\t\t\ttypographyBlockExamples.push( firstParagraphBlock );\n\t\t}\n\t}\n\n\tif ( !! typographyBlockExamples.length ) {\n\t\texamples.push( {\n\t\t\tname: 'typography',\n\t\t\ttitle: __( 'Typography' ),\n\t\t\tcategory: 'overview',\n\t\t\tblocks: typographyBlockExamples,\n\t\t} );\n\t}\n\n\tconst otherBlockExamples = [\n\t\t'core/image',\n\t\t'core/separator',\n\t\t'core/buttons',\n\t\t'core/pullquote',\n\t\t'core/search',\n\t];\n\n\t// Get examples for other blocks and put them in order of above array.\n\totherBlockExamples.forEach( ( blockName ) => {\n\t\tconst blockType = getBlockType( blockName );\n\t\tif ( blockType && blockType.example ) {\n\t\t\tconst blockExample: BlockExample = {\n\t\t\t\tname: blockName,\n\t\t\t\ttitle: blockType.title,\n\t\t\t\tcategory: 'overview',\n\t\t\t\t/*\n\t\t\t\t * CSS generated from style attributes will take precedence over global styles CSS,\n\t\t\t\t * so remove the style attribute from the example to ensure the example\n\t\t\t\t * demonstrates changes to global styles.\n\t\t\t\t */\n\t\t\t\tblocks: getBlockFromExample( blockName, {\n\t\t\t\t\t...blockType.example,\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\t...blockType.example.attributes,\n\t\t\t\t\t\tstyle: undefined,\n\t\t\t\t\t},\n\t\t\t\t} ),\n\t\t\t};\n\t\t\texamples.push( blockExample );\n\t\t}\n\t} );\n\n\treturn examples;\n}\n\n/**\n * Returns a list of examples for registered block types.\n *\n * @param {MultiOriginPalettes} colors Global styles colors grouped by origin e.g. Core, Theme, and User.\n * @return {BlockExample[]} An array of block examples.\n */\nexport function getExamples( colors: MultiOriginPalettes ): BlockExample[] {\n\tconst nonHeadingBlockExamples = getBlockTypes()\n\t\t.filter( ( blockType: BlockType ) => {\n\t\t\tconst { name, example, supports } = blockType;\n\t\t\treturn (\n\t\t\t\tname !== 'core/heading' &&\n\t\t\t\t!! example &&\n\t\t\t\tsupports?.inserter !== false\n\t\t\t);\n\t\t} )\n\t\t.map( ( blockType: BlockType ) => ( {\n\t\t\tname: blockType.name,\n\t\t\ttitle: blockType.title,\n\t\t\tcategory: blockType.category,\n\t\t\t/*\n\t\t\t * CSS generated from style attributes will take precedence over global styles CSS,\n\t\t\t * so remove the style attribute from the example to ensure the example\n\t\t\t * demonstrates changes to global styles.\n\t\t\t */\n\t\t\tblocks: getBlockFromExample( blockType.name, {\n\t\t\t\t...blockType.example,\n\t\t\t\tattributes: {\n\t\t\t\t\t...blockType.example.attributes,\n\t\t\t\t\tstyle: undefined,\n\t\t\t\t},\n\t\t\t} ),\n\t\t} ) );\n\tconst isHeadingBlockRegistered = !! getBlockType( 'core/heading' );\n\n\tif ( ! isHeadingBlockRegistered ) {\n\t\treturn nonHeadingBlockExamples;\n\t}\n\n\t// Use our own example for the Heading block so that we can show multiple\n\t// heading levels.\n\tconst headingsExample = {\n\t\tname: 'core/heading',\n\t\ttitle: __( 'Headings' ),\n\t\tcategory: 'text',\n\t\tblocks: [ 1, 2, 3, 4, 5, 6 ].map( ( level ) => {\n\t\t\treturn createBlock( 'core/heading', {\n\t\t\t\tcontent: sprintf(\n\t\t\t\t\t// translators: %d: heading level e.g: \"1\", \"2\", \"3\"\n\t\t\t\t\t__( 'Heading %d' ),\n\t\t\t\t\tlevel\n\t\t\t\t),\n\t\t\t\tlevel,\n\t\t\t} );\n\t\t} ),\n\t};\n\tconst colorExamples = getColorExamples( colors );\n\n\tconst overviewBlockExamples = getOverviewBlockExamples( colors );\n\n\treturn [\n\t\theadingsExample,\n\t\t...colorExamples,\n\t\t...nonHeadingBlockExamples,\n\t\t...overviewBlockExamples,\n\t];\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,I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AAC;EACN,MAAM6C,wBAAwB,GAAG,CAAC,CAAE,IAAA5B,oBAAY,EAAE,cAAe,CAAC;EAElE,IAAK,CAAE4B,wBAAwB,EAAG;IACjC,OAAON,uBAAuB;EAC/B;;EAEA;EACA;EACA,MAAMO,eAAe,GAAG;IACvB5C,IAAI,EAAE,cAAc;IACpBC,KAAK,EAAE,IAAAU,QAAE,EAAE,UAAW,CAAC;IACvBT,QAAQ,EAAE,MAAM;IAChB2B,MAAM,EAAE,CAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAE,CAACa,GAAG,CAAIxB,KAAK,IAAM;MAC9C,OAAO,IAAAD,mBAAW,EAAE,cAAc,EAAE;QACnCd,OAAO,EAAE,IAAA0C,aAAO;QACf;QACA,IAAAlC,QAAE,EAAE,YAAa,CAAC,EAClBO,KACD,CAAC;QACDA;MACD,CAAE,CAAC;IACJ,CAAE;EACH,CAAC;EACD,MAAM4B,aAAa,GAAG9D,gBAAgB,CAAEC,MAAO,CAAC;EAEhD,MAAM8D,qBAAqB,GAAGvC,wBAAwB,CAAEvB,MAAO,CAAC;EAEhE,OAAO,CACN2D,eAAe,EACf,GAAGE,aAAa,EAChB,GAAGT,uBAAuB,EAC1B,GAAGU,qBAAqB,CACxB;AACF","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* wp:polyfill */
|
|
2
1
|
"use strict";
|
|
3
2
|
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -13,7 +12,6 @@ var _i18n = require("@wordpress/i18n");
|
|
|
13
12
|
var _blockEditor = require("@wordpress/block-editor");
|
|
14
13
|
var _editor = require("@wordpress/editor");
|
|
15
14
|
var _data = require("@wordpress/data");
|
|
16
|
-
var _compose = require("@wordpress/compose");
|
|
17
15
|
var _element = require("@wordpress/element");
|
|
18
16
|
var _keycodes = require("@wordpress/keycodes");
|
|
19
17
|
var _mediaUtils = require("@wordpress/media-utils");
|
|
@@ -167,7 +165,6 @@ function StyleBook({
|
|
|
167
165
|
userConfig = {},
|
|
168
166
|
path = ''
|
|
169
167
|
}) {
|
|
170
|
-
const [resizeObserver, sizes] = (0, _compose.useResizeObserver)();
|
|
171
168
|
const [textColor] = useGlobalStyle('color.text');
|
|
172
169
|
const [backgroundColor] = useGlobalStyle('color.background');
|
|
173
170
|
const colors = useMultiOriginPalettes();
|
|
@@ -198,16 +195,15 @@ function StyleBook({
|
|
|
198
195
|
onClose: onClose,
|
|
199
196
|
enableResizing: enableResizing,
|
|
200
197
|
closeButtonLabel: showCloseButton ? (0, _i18n.__)('Close') : null,
|
|
201
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
198
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
202
199
|
className: (0, _clsx.default)('edit-site-style-book', {
|
|
203
|
-
'is-wide': sizes.width > 600,
|
|
204
200
|
'is-button': !!onClick
|
|
205
201
|
}),
|
|
206
202
|
style: {
|
|
207
203
|
color: textColor,
|
|
208
204
|
background: backgroundColor
|
|
209
205
|
},
|
|
210
|
-
children:
|
|
206
|
+
children: showTabs ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(Tabs, {
|
|
211
207
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
212
208
|
className: "edit-site-style-book__tablist-container",
|
|
213
209
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Tabs.TabList, {
|
|
@@ -231,7 +227,6 @@ function StyleBook({
|
|
|
231
227
|
isSelected: isSelected,
|
|
232
228
|
onSelect: onSelect,
|
|
233
229
|
settings: settings,
|
|
234
|
-
sizes: sizes,
|
|
235
230
|
title: tab.title,
|
|
236
231
|
goTo: goTo
|
|
237
232
|
})
|
|
@@ -245,9 +240,8 @@ function StyleBook({
|
|
|
245
240
|
onClick: onClick,
|
|
246
241
|
onSelect: onSelect,
|
|
247
242
|
settings: settings,
|
|
248
|
-
sizes: sizes,
|
|
249
243
|
goTo: goTo
|
|
250
|
-
})
|
|
244
|
+
})
|
|
251
245
|
})
|
|
252
246
|
});
|
|
253
247
|
}
|
|
@@ -299,7 +293,6 @@ const StyleBookPreview = ({
|
|
|
299
293
|
// Now go to the selected block.
|
|
300
294
|
onChangeSection(`/blocks/${encodeURIComponent(blockName)}`);
|
|
301
295
|
};
|
|
302
|
-
const [resizeObserver, sizes] = (0, _compose.useResizeObserver)();
|
|
303
296
|
const colors = useMultiOriginPalettes();
|
|
304
297
|
const examples = (0, _examples.getExamples)(colors);
|
|
305
298
|
const examplesForSinglePageUse = getExamplesForSinglePageUse(examples);
|
|
@@ -344,9 +337,9 @@ const StyleBookPreview = ({
|
|
|
344
337
|
styles: !isObjectEmpty(globalStyles) && !isObjectEmpty(userConfig) ? globalStyles : siteEditorSettings.styles,
|
|
345
338
|
isPreviewMode: true
|
|
346
339
|
}), [globalStyles, siteEditorSettings, userConfig]);
|
|
347
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
340
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
348
341
|
className: "edit-site-style-book",
|
|
349
|
-
children:
|
|
342
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_blockEditor.BlockEditorProvider, {
|
|
350
343
|
settings: settings,
|
|
351
344
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_globalStylesRenderer.GlobalStylesRenderer, {
|
|
352
345
|
disableRootPadding: true
|
|
@@ -354,11 +347,10 @@ const StyleBookPreview = ({
|
|
|
354
347
|
examples: displayedExamples,
|
|
355
348
|
settings: settings,
|
|
356
349
|
goTo: goTo,
|
|
357
|
-
sizes: sizes,
|
|
358
350
|
isSelected: !isStatic ? isSelected : null,
|
|
359
351
|
onSelect: !isStatic ? onSelect : null
|
|
360
352
|
})]
|
|
361
|
-
})
|
|
353
|
+
})
|
|
362
354
|
});
|
|
363
355
|
};
|
|
364
356
|
exports.StyleBookPreview = StyleBookPreview;
|
|
@@ -368,7 +360,6 @@ const StyleBookBody = ({
|
|
|
368
360
|
onClick,
|
|
369
361
|
onSelect,
|
|
370
362
|
settings,
|
|
371
|
-
sizes,
|
|
372
363
|
title,
|
|
373
364
|
goTo
|
|
374
365
|
}) => {
|
|
@@ -427,9 +418,7 @@ const StyleBookBody = ({
|
|
|
427
418
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("style", {
|
|
428
419
|
children: [_constants.STYLE_BOOK_IFRAME_STYLES, !!onClick && 'body { cursor: pointer; } body * { pointer-events: none; }']
|
|
429
420
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Examples, {
|
|
430
|
-
className:
|
|
431
|
-
'is-wide': sizes.width > 600
|
|
432
|
-
}),
|
|
421
|
+
className: "edit-site-style-book__examples",
|
|
433
422
|
filteredExamples: examples,
|
|
434
423
|
label: title ? (0, _i18n.sprintf)(
|
|
435
424
|
// translators: %s: Category of blocks, e.g. Text.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_i18n","_blockEditor","_editor","_data","_compose","_element","_keycodes","_mediaUtils","_coreData","_lockUnlock","_editorCanvasContainer","_constants","_categories","_examples","_store","_sidebarGlobalStylesWrapper","_globalStylesRenderer","_constants2","_jsxRuntime","ExperimentalBlockEditorProvider","useGlobalStyle","GlobalStylesContext","useGlobalStylesOutputWithConfig","unlock","blockEditorPrivateApis","mergeBaseAndUserConfigs","editorPrivateApis","Tabs","componentsPrivateApis","isObjectEmpty","object","Object","keys","length","scrollToSection","anchorId","iframe","contentDocument","element","body","getElementById","scrollIntoView","behavior","getStyleBookNavigationFromPath","path","startsWith","top","useMultiOriginPalettes","colors","gradients","useMultipleOriginColorsAndGradients","shouldDisplayDefaultDuotones","customDuotones","themeDuotones","defaultDuotones","useSettings","palettes","useMemo","result","duotones","push","name","_x","slug","getExamplesForSinglePageUse","examples","examplesForSinglePageUse","overviewCategoryExamples","getExamplesByCategory","otherExamples","filter","example","category","find","overviewExample","StyleBook","enableResizing","isSelected","onClick","onSelect","showCloseButton","onClose","showTabs","userConfig","resizeObserver","sizes","useResizeObserver","textColor","backgroundColor","getExamples","tabs","getTopLevelStyleBookCategories","some","base","baseConfig","useContext","goTo","mergedConfig","originalSettings","useSelect","select","blockEditorStore","getSettings","globalStyles","settings","styles","isPreviewMode","jsx","default","closeButtonLabel","__","children","jsxs","className","clsx","width","style","color","background","TabList","map","tab","Tab","tabId","title","categoryDefinition","_category","filteredExamples","TabPanel","focusable","StyleBookBody","StyleBookPreview","isStatic","siteEditorSettings","siteEditorStore","canUserUploadMedia","coreStore","canUser","kind","useEffect","dispatch","updateSettings","mediaUpload","uploadMedia","undefined","section","onChangeSection","useSection","blockName","encodeURIComponent","STYLE_BOOK_COLOR_GROUPS","group","previewCategory","includes","decodeURIComponent","split","STYLE_BOOK_PREVIEW_CATEGORIES","displayedExamples","BlockEditorProvider","GlobalStylesRenderer","disableRootPadding","exports","isFocused","setIsFocused","useState","hasIframeLoaded","setHasIframeLoaded","iframeRef","useRef","buttonModeProps","role","onFocus","onBlur","onKeyDown","event","defaultPrevented","keyCode","ENTER","SPACE","preventDefault","readonly","handleLoad","useLayoutEffect","current","__unstableIframe","onLoad","ref","tabIndex","__unstableEditorStyles","STYLE_BOOK_IFRAME_STYLES","Examples","label","sprintf","memo","Composite","orientation","Example","id","content","blocks","subcategories","subcategory","Group","GroupLabel","Subcategory","disabledExamples","focusMode","renderedBlocks","Array","isArray","disabledProps","disabled","accessibleWhenDisabled","Item","render","Disabled","value","BlockList","renderAppender","_default"],"sources":["@wordpress/edit-site/src/components/style-book/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tDisabled,\n\tComposite,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport {\n\tBlockList,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n\tuseSettings,\n\tBlockEditorProvider,\n\t__unstableEditorStyles as EditorStyles,\n\t__unstableIframe as Iframe,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n} from '@wordpress/block-editor';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { useSelect, dispatch } from '@wordpress/data';\nimport { useResizeObserver } from '@wordpress/compose';\nimport {\n\tuseMemo,\n\tuseState,\n\tmemo,\n\tuseContext,\n\tuseRef,\n\tuseLayoutEffect,\n\tuseEffect,\n} from '@wordpress/element';\nimport { ENTER, SPACE } from '@wordpress/keycodes';\nimport { uploadMedia } from '@wordpress/media-utils';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport EditorCanvasContainer from '../editor-canvas-container';\nimport { STYLE_BOOK_IFRAME_STYLES } from './constants';\nimport {\n\tgetExamplesByCategory,\n\tgetTopLevelStyleBookCategories,\n} from './categories';\nimport { getExamples } from './examples';\nimport { store as siteEditorStore } from '../../store';\nimport { useSection } from '../sidebar-global-styles-wrapper';\nimport { GlobalStylesRenderer } from '../global-styles-renderer';\nimport {\n\tSTYLE_BOOK_COLOR_GROUPS,\n\tSTYLE_BOOK_PREVIEW_CATEGORIES,\n} from '../style-book/constants';\n\nconst {\n\tExperimentalBlockEditorProvider,\n\tuseGlobalStyle,\n\tGlobalStylesContext,\n\tuseGlobalStylesOutputWithConfig,\n} = unlock( blockEditorPrivateApis );\nconst { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\n/**\n * Scrolls to a section within an iframe.\n *\n * @param {string} anchorId The id of the element to scroll to.\n * @param {HTMLIFrameElement} iframe The target iframe.\n */\nconst scrollToSection = ( anchorId, iframe ) => {\n\tif ( ! anchorId || ! iframe || ! iframe?.contentDocument ) {\n\t\treturn;\n\t}\n\n\tconst element =\n\t\tanchorId === 'top'\n\t\t\t? iframe.contentDocument.body\n\t\t\t: iframe.contentDocument.getElementById( anchorId );\n\tif ( element ) {\n\t\telement.scrollIntoView( {\n\t\t\tbehavior: 'smooth',\n\t\t} );\n\t}\n};\n\n/**\n * Parses a Block Editor navigation path to build a style book navigation path.\n * The object can be extended to include a category, representing a style book tab/section.\n *\n * @param {string} path An internal Block Editor navigation path.\n * @return {null|{block: string}} An object containing the example to navigate to.\n */\nconst getStyleBookNavigationFromPath = ( path ) => {\n\tif ( path && typeof path === 'string' ) {\n\t\tif (\n\t\t\tpath === '/' ||\n\t\t\tpath.startsWith( '/typography' ) ||\n\t\t\tpath.startsWith( '/colors' ) ||\n\t\t\tpath.startsWith( '/blocks' )\n\t\t) {\n\t\t\treturn {\n\t\t\t\ttop: true,\n\t\t\t};\n\t\t}\n\t}\n\treturn null;\n};\n\n/**\n * Retrieves colors, gradients, and duotone filters from Global Styles.\n * The inclusion of default (Core) palettes is controlled by the relevant\n * theme.json property e.g. defaultPalette, defaultGradients, defaultDuotone.\n *\n * @return {Object} Object containing properties for each type of palette.\n */\nfunction useMultiOriginPalettes() {\n\tconst { colors, gradients } = useMultipleOriginColorsAndGradients();\n\n\t// Add duotone filters to the palettes data.\n\tconst [\n\t\tshouldDisplayDefaultDuotones,\n\t\tcustomDuotones,\n\t\tthemeDuotones,\n\t\tdefaultDuotones,\n\t] = useSettings(\n\t\t'color.defaultDuotone',\n\t\t'color.duotone.custom',\n\t\t'color.duotone.theme',\n\t\t'color.duotone.default'\n\t);\n\n\tconst palettes = useMemo( () => {\n\t\tconst result = { colors, gradients, duotones: [] };\n\n\t\tif ( themeDuotones && themeDuotones.length ) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Theme',\n\t\t\t\t\t'Indicates these duotone filters come from the theme.'\n\t\t\t\t),\n\t\t\t\tslug: 'theme',\n\t\t\t\tduotones: themeDuotones,\n\t\t\t} );\n\t\t}\n\n\t\tif (\n\t\t\tshouldDisplayDefaultDuotones &&\n\t\t\tdefaultDuotones &&\n\t\t\tdefaultDuotones.length\n\t\t) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Default',\n\t\t\t\t\t'Indicates these duotone filters come from WordPress.'\n\t\t\t\t),\n\t\t\t\tslug: 'default',\n\t\t\t\tduotones: defaultDuotones,\n\t\t\t} );\n\t\t}\n\t\tif ( customDuotones && customDuotones.length ) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Custom',\n\t\t\t\t\t'Indicates these doutone filters are created by the user.'\n\t\t\t\t),\n\t\t\t\tslug: 'custom',\n\t\t\t\tduotones: customDuotones,\n\t\t\t} );\n\t\t}\n\n\t\treturn result;\n\t}, [\n\t\tcolors,\n\t\tgradients,\n\t\tcustomDuotones,\n\t\tthemeDuotones,\n\t\tdefaultDuotones,\n\t\tshouldDisplayDefaultDuotones,\n\t] );\n\n\treturn palettes;\n}\n\n/**\n * Get deduped examples for single page stylebook.\n * @param {Array} examples Array of examples.\n * @return {Array} Deduped examples.\n */\nexport function getExamplesForSinglePageUse( examples ) {\n\tconst examplesForSinglePageUse = [];\n\tconst overviewCategoryExamples = getExamplesByCategory(\n\t\t{ slug: 'overview' },\n\t\texamples\n\t);\n\texamplesForSinglePageUse.push( ...overviewCategoryExamples.examples );\n\tconst otherExamples = examples.filter( ( example ) => {\n\t\treturn (\n\t\t\texample.category !== 'overview' &&\n\t\t\t! overviewCategoryExamples.examples.find(\n\t\t\t\t( overviewExample ) => overviewExample.name === example.name\n\t\t\t)\n\t\t);\n\t} );\n\texamplesForSinglePageUse.push( ...otherExamples );\n\n\treturn examplesForSinglePageUse;\n}\n\nfunction StyleBook( {\n\tenableResizing = true,\n\tisSelected,\n\tonClick,\n\tonSelect,\n\tshowCloseButton = true,\n\tonClose,\n\tshowTabs = true,\n\tuserConfig = {},\n\tpath = '',\n} ) {\n\tconst [ resizeObserver, sizes ] = useResizeObserver();\n\tconst [ textColor ] = useGlobalStyle( 'color.text' );\n\tconst [ backgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst colors = useMultiOriginPalettes();\n\tconst examples = useMemo( () => getExamples( colors ), [ colors ] );\n\tconst tabs = useMemo(\n\t\t() =>\n\t\t\tgetTopLevelStyleBookCategories().filter( ( category ) =>\n\t\t\t\texamples.some(\n\t\t\t\t\t( example ) => example.category === category.slug\n\t\t\t\t)\n\t\t\t),\n\t\t[ examples ]\n\t);\n\n\tconst examplesForSinglePageUse = getExamplesForSinglePageUse( examples );\n\n\tconst { base: baseConfig } = useContext( GlobalStylesContext );\n\tconst goTo = getStyleBookNavigationFromPath( path );\n\n\tconst mergedConfig = useMemo( () => {\n\t\tif ( ! isObjectEmpty( userConfig ) && ! isObjectEmpty( baseConfig ) ) {\n\t\t\treturn mergeBaseAndUserConfigs( baseConfig, userConfig );\n\t\t}\n\t\treturn {};\n\t}, [ baseConfig, userConfig ] );\n\n\t// Copied from packages/edit-site/src/components/revisions/index.js\n\t// could we create a shared hook?\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst [ globalStyles ] = useGlobalStylesOutputWithConfig( mergedConfig );\n\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...originalSettings,\n\t\t\tstyles:\n\t\t\t\t! isObjectEmpty( globalStyles ) && ! isObjectEmpty( userConfig )\n\t\t\t\t\t? globalStyles\n\t\t\t\t\t: originalSettings.styles,\n\t\t\tisPreviewMode: true,\n\t\t} ),\n\t\t[ globalStyles, originalSettings, userConfig ]\n\t);\n\n\treturn (\n\t\t<EditorCanvasContainer\n\t\t\tonClose={ onClose }\n\t\t\tenableResizing={ enableResizing }\n\t\t\tcloseButtonLabel={ showCloseButton ? __( 'Close' ) : null }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'edit-site-style-book', {\n\t\t\t\t\t'is-wide': sizes.width > 600,\n\t\t\t\t\t'is-button': !! onClick,\n\t\t\t\t} ) }\n\t\t\t\tstyle={ {\n\t\t\t\t\tcolor: textColor,\n\t\t\t\t\tbackground: backgroundColor,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ resizeObserver }\n\t\t\t\t{ showTabs ? (\n\t\t\t\t\t<Tabs>\n\t\t\t\t\t\t<div className=\"edit-site-style-book__tablist-container\">\n\t\t\t\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t\t\t\t{ tabs.map( ( tab ) => (\n\t\t\t\t\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\t\t\t\t\ttabId={ tab.slug }\n\t\t\t\t\t\t\t\t\t\tkey={ tab.slug }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ tab.title }\n\t\t\t\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t</Tabs.TabList>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{ tabs.map( ( tab ) => {\n\t\t\t\t\t\t\tconst categoryDefinition = tab.slug\n\t\t\t\t\t\t\t\t? getTopLevelStyleBookCategories().find(\n\t\t\t\t\t\t\t\t\t\t( _category ) =>\n\t\t\t\t\t\t\t\t\t\t\t_category.slug === tab.slug\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t: null;\n\t\t\t\t\t\t\tconst filteredExamples = categoryDefinition\n\t\t\t\t\t\t\t\t? getExamplesByCategory(\n\t\t\t\t\t\t\t\t\t\tcategoryDefinition,\n\t\t\t\t\t\t\t\t\t\texamples\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t: { examples };\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\t\t\t\t\tkey={ tab.slug }\n\t\t\t\t\t\t\t\t\ttabId={ tab.slug }\n\t\t\t\t\t\t\t\t\tfocusable={ false }\n\t\t\t\t\t\t\t\t\tclassName=\"edit-site-style-book__tabpanel\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<StyleBookBody\n\t\t\t\t\t\t\t\t\t\tcategory={ tab.slug }\n\t\t\t\t\t\t\t\t\t\texamples={ filteredExamples }\n\t\t\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\t\t\tsizes={ sizes }\n\t\t\t\t\t\t\t\t\t\ttitle={ tab.title }\n\t\t\t\t\t\t\t\t\t\tgoTo={ goTo }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</Tabs>\n\t\t\t\t) : (\n\t\t\t\t\t<StyleBookBody\n\t\t\t\t\t\texamples={ { examples: examplesForSinglePageUse } }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\tsizes={ sizes }\n\t\t\t\t\t\tgoTo={ goTo }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</EditorCanvasContainer>\n\t);\n}\n\n/**\n * Style Book Preview component renders the stylebook without the Editor dependency.\n *\n * @param {Object} props Component props.\n * @param {Object} props.userConfig User configuration.\n * @param {boolean} props.isStatic Whether the stylebook is static or clickable.\n * @return {Object} Style Book Preview component.\n */\nexport const StyleBookPreview = ( { userConfig = {}, isStatic = false } ) => {\n\tconst siteEditorSettings = useSelect(\n\t\t( select ) => select( siteEditorStore ).getSettings(),\n\t\t[]\n\t);\n\n\tconst canUserUploadMedia = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).canUser( 'create', {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'media',\n\t\t\t} ),\n\t\t[]\n\t);\n\n\t// Update block editor settings because useMultipleOriginColorsAndGradients fetch colours from there.\n\tuseEffect( () => {\n\t\tdispatch( blockEditorStore ).updateSettings( {\n\t\t\t...siteEditorSettings,\n\t\t\tmediaUpload: canUserUploadMedia ? uploadMedia : undefined,\n\t\t} );\n\t}, [ siteEditorSettings, canUserUploadMedia ] );\n\n\tconst [ section, onChangeSection ] = useSection();\n\n\tconst isSelected = ( blockName ) => {\n\t\t// Match '/blocks/core%2Fbutton' and\n\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t// '/blocks/core%2Fbuttons'.\n\t\treturn (\n\t\t\tsection === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\tsection.startsWith(\n\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t)\n\t\t);\n\t};\n\n\tconst onSelect = ( blockName ) => {\n\t\tif (\n\t\t\tSTYLE_BOOK_COLOR_GROUPS.find(\n\t\t\t\t( group ) => group.slug === blockName\n\t\t\t)\n\t\t) {\n\t\t\t// Go to color palettes Global Styles.\n\t\t\tonChangeSection( '/colors/palette' );\n\t\t\treturn;\n\t\t}\n\t\tif ( blockName === 'typography' ) {\n\t\t\t// Go to typography Global Styles.\n\t\t\tonChangeSection( '/typography' );\n\t\t\treturn;\n\t\t}\n\n\t\t// Now go to the selected block.\n\t\tonChangeSection( `/blocks/${ encodeURIComponent( blockName ) }` );\n\t};\n\n\tconst [ resizeObserver, sizes ] = useResizeObserver();\n\tconst colors = useMultiOriginPalettes();\n\tconst examples = getExamples( colors );\n\tconst examplesForSinglePageUse = getExamplesForSinglePageUse( examples );\n\n\tlet previewCategory = null;\n\tif ( section.includes( '/colors' ) ) {\n\t\tpreviewCategory = 'colors';\n\t} else if ( section.includes( '/typography' ) ) {\n\t\tpreviewCategory = 'text';\n\t} else if ( section.includes( '/blocks' ) ) {\n\t\tpreviewCategory = 'blocks';\n\t\tconst blockName =\n\t\t\tdecodeURIComponent( section ).split( '/blocks/' )[ 1 ];\n\t\tif (\n\t\t\tblockName &&\n\t\t\texamples.find( ( example ) => example.name === blockName )\n\t\t) {\n\t\t\tpreviewCategory = blockName;\n\t\t}\n\t} else if ( ! isStatic ) {\n\t\tpreviewCategory = 'overview';\n\t}\n\tconst categoryDefinition = STYLE_BOOK_PREVIEW_CATEGORIES.find(\n\t\t( category ) => category.slug === previewCategory\n\t);\n\n\t// If there's no category definition there may be a single block.\n\tconst filteredExamples = categoryDefinition\n\t\t? getExamplesByCategory( categoryDefinition, examples )\n\t\t: {\n\t\t\t\texamples: [\n\t\t\t\t\texamples.find(\n\t\t\t\t\t\t( example ) => example.name === previewCategory\n\t\t\t\t\t),\n\t\t\t\t],\n\t\t };\n\n\t// If there's no preview category, show all examples.\n\tconst displayedExamples = previewCategory\n\t\t? filteredExamples\n\t\t: { examples: examplesForSinglePageUse };\n\n\tconst { base: baseConfig } = useContext( GlobalStylesContext );\n\tconst goTo = getStyleBookNavigationFromPath( section );\n\n\tconst mergedConfig = useMemo( () => {\n\t\tif ( ! isObjectEmpty( userConfig ) && ! isObjectEmpty( baseConfig ) ) {\n\t\t\treturn mergeBaseAndUserConfigs( baseConfig, userConfig );\n\t\t}\n\t\treturn {};\n\t}, [ baseConfig, userConfig ] );\n\n\tconst [ globalStyles ] = useGlobalStylesOutputWithConfig( mergedConfig );\n\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...siteEditorSettings,\n\t\t\tstyles:\n\t\t\t\t! isObjectEmpty( globalStyles ) && ! isObjectEmpty( userConfig )\n\t\t\t\t\t? globalStyles\n\t\t\t\t\t: siteEditorSettings.styles,\n\t\t\tisPreviewMode: true,\n\t\t} ),\n\t\t[ globalStyles, siteEditorSettings, userConfig ]\n\t);\n\n\treturn (\n\t\t<div className=\"edit-site-style-book\">\n\t\t\t{ resizeObserver }\n\t\t\t<BlockEditorProvider settings={ settings }>\n\t\t\t\t<GlobalStylesRenderer disableRootPadding />\n\t\t\t\t<StyleBookBody\n\t\t\t\t\texamples={ displayedExamples }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tgoTo={ goTo }\n\t\t\t\t\tsizes={ sizes }\n\t\t\t\t\tisSelected={ ! isStatic ? isSelected : null }\n\t\t\t\t\tonSelect={ ! isStatic ? onSelect : null }\n\t\t\t\t/>\n\t\t\t</BlockEditorProvider>\n\t\t</div>\n\t);\n};\n\nexport const StyleBookBody = ( {\n\texamples,\n\tisSelected,\n\tonClick,\n\tonSelect,\n\tsettings,\n\tsizes,\n\ttitle,\n\tgoTo,\n} ) => {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst [ hasIframeLoaded, setHasIframeLoaded ] = useState( false );\n\tconst iframeRef = useRef( null );\n\t// The presence of an `onClick` prop indicates that the Style Book is being used as a button.\n\t// In this case, add additional props to the iframe to make it behave like a button.\n\tconst buttonModeProps = {\n\t\trole: 'button',\n\t\tonFocus: () => setIsFocused( true ),\n\t\tonBlur: () => setIsFocused( false ),\n\t\tonKeyDown: ( event ) => {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { keyCode } = event;\n\t\t\tif ( onClick && ( keyCode === ENTER || keyCode === SPACE ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonClick( event );\n\t\t\t}\n\t\t},\n\t\tonClick: ( event ) => {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( onClick ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonClick( event );\n\t\t\t}\n\t\t},\n\t\treadonly: true,\n\t};\n\n\tconst handleLoad = () => setHasIframeLoaded( true );\n\tuseLayoutEffect( () => {\n\t\tif ( hasIframeLoaded && iframeRef?.current ) {\n\t\t\tif ( goTo?.top ) {\n\t\t\t\tscrollToSection( 'top', iframeRef?.current );\n\t\t\t}\n\t\t}\n\t}, [ iframeRef?.current, goTo, scrollToSection, hasIframeLoaded ] );\n\n\treturn (\n\t\t<Iframe\n\t\t\tonLoad={ handleLoad }\n\t\t\tref={ iframeRef }\n\t\t\tclassName={ clsx( 'edit-site-style-book__iframe', {\n\t\t\t\t'is-focused': isFocused && !! onClick,\n\t\t\t\t'is-button': !! onClick,\n\t\t\t} ) }\n\t\t\tname=\"style-book-canvas\"\n\t\t\ttabIndex={ 0 }\n\t\t\t{ ...( onClick ? buttonModeProps : {} ) }\n\t\t>\n\t\t\t<EditorStyles styles={ settings.styles } />\n\t\t\t<style>\n\t\t\t\t{ STYLE_BOOK_IFRAME_STYLES }\n\t\t\t\t{ !! onClick &&\n\t\t\t\t\t'body { cursor: pointer; } body * { pointer-events: none; }' }\n\t\t\t</style>\n\t\t\t<Examples\n\t\t\t\tclassName={ clsx( 'edit-site-style-book__examples', {\n\t\t\t\t\t'is-wide': sizes.width > 600,\n\t\t\t\t} ) }\n\t\t\t\tfilteredExamples={ examples }\n\t\t\t\tlabel={\n\t\t\t\t\ttitle\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Category of blocks, e.g. Text.\n\t\t\t\t\t\t\t\t__( 'Examples of blocks in the %s category' ),\n\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: __( 'Examples of blocks' )\n\t\t\t\t}\n\t\t\t\tisSelected={ isSelected }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t\tkey={ title }\n\t\t\t/>\n\t\t</Iframe>\n\t);\n};\n\nconst Examples = memo(\n\t( { className, filteredExamples, label, isSelected, onSelect } ) => {\n\t\treturn (\n\t\t\t<Composite\n\t\t\t\torientation=\"vertical\"\n\t\t\t\tclassName={ className }\n\t\t\t\taria-label={ label }\n\t\t\t\trole=\"grid\"\n\t\t\t>\n\t\t\t\t{ !! filteredExamples?.examples?.length &&\n\t\t\t\t\tfilteredExamples.examples.map( ( example ) => (\n\t\t\t\t\t\t<Example\n\t\t\t\t\t\t\tkey={ example.name }\n\t\t\t\t\t\t\tid={ `example-${ example.name }` }\n\t\t\t\t\t\t\ttitle={ example.title }\n\t\t\t\t\t\t\tcontent={ example.content }\n\t\t\t\t\t\t\tblocks={ example.blocks }\n\t\t\t\t\t\t\tisSelected={ isSelected?.( example.name ) }\n\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\t!! onSelect\n\t\t\t\t\t\t\t\t\t? () => onSelect( example.name )\n\t\t\t\t\t\t\t\t\t: null\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{ !! filteredExamples?.subcategories?.length &&\n\t\t\t\t\tfilteredExamples.subcategories.map( ( subcategory ) => (\n\t\t\t\t\t\t<Composite.Group\n\t\t\t\t\t\t\tclassName=\"edit-site-style-book__subcategory\"\n\t\t\t\t\t\t\tkey={ `subcategory-${ subcategory.slug }` }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Composite.GroupLabel>\n\t\t\t\t\t\t\t\t<h2 className=\"edit-site-style-book__subcategory-title\">\n\t\t\t\t\t\t\t\t\t{ subcategory.title }\n\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t</Composite.GroupLabel>\n\t\t\t\t\t\t\t<Subcategory\n\t\t\t\t\t\t\t\texamples={ subcategory.examples }\n\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Composite.Group>\n\t\t\t\t\t) ) }\n\t\t\t</Composite>\n\t\t);\n\t}\n);\n\nconst Subcategory = ( { examples, isSelected, onSelect } ) => {\n\treturn (\n\t\t!! examples?.length &&\n\t\texamples.map( ( example ) => (\n\t\t\t<Example\n\t\t\t\tkey={ example.name }\n\t\t\t\tid={ `example-${ example.name }` }\n\t\t\t\ttitle={ example.title }\n\t\t\t\tcontent={ example.content }\n\t\t\t\tblocks={ example.blocks }\n\t\t\t\tisSelected={ isSelected?.( example.name ) }\n\t\t\t\tonClick={ !! onSelect ? () => onSelect( example.name ) : null }\n\t\t\t/>\n\t\t) )\n\t);\n};\n\nconst disabledExamples = [ 'example-duotones' ];\n\nconst Example = ( { id, title, blocks, isSelected, onClick, content } ) => {\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...originalSettings,\n\t\t\tfocusMode: false, // Disable \"Spotlight mode\".\n\t\t\tisPreviewMode: true,\n\t\t} ),\n\t\t[ originalSettings ]\n\t);\n\n\t// Cache the list of blocks to avoid additional processing when the component is re-rendered.\n\tconst renderedBlocks = useMemo(\n\t\t() => ( Array.isArray( blocks ) ? blocks : [ blocks ] ),\n\t\t[ blocks ]\n\t);\n\n\tconst disabledProps =\n\t\tdisabledExamples.includes( id ) || ! onClick\n\t\t\t? {\n\t\t\t\t\tdisabled: true,\n\t\t\t\t\taccessibleWhenDisabled: !! onClick,\n\t\t\t }\n\t\t\t: {};\n\n\treturn (\n\t\t<div role=\"row\">\n\t\t\t<div role=\"gridcell\">\n\t\t\t\t<Composite.Item\n\t\t\t\t\tclassName={ clsx( 'edit-site-style-book__example', {\n\t\t\t\t\t\t'is-selected': isSelected,\n\t\t\t\t\t\t'is-disabled-example': !! disabledProps?.disabled,\n\t\t\t\t\t} ) }\n\t\t\t\t\tid={ id }\n\t\t\t\t\taria-label={\n\t\t\t\t\t\t!! onClick\n\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t// translators: %s: Title of a block, e.g. Heading.\n\t\t\t\t\t\t\t\t\t__( 'Open %s styles in Styles panel' ),\n\t\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\trender={ <div /> }\n\t\t\t\t\trole={ !! onClick ? 'button' : null }\n\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t{ ...disabledProps }\n\t\t\t\t>\n\t\t\t\t\t<span className=\"edit-site-style-book__example-title\">\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</span>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"edit-site-style-book__example-preview\"\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t>\n\t\t\t\t\t\t<Disabled className=\"edit-site-style-book__example-preview__content\">\n\t\t\t\t\t\t\t{ content ? (\n\t\t\t\t\t\t\t\tcontent\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<ExperimentalBlockEditorProvider\n\t\t\t\t\t\t\t\t\tvalue={ renderedBlocks }\n\t\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<EditorStyles />\n\t\t\t\t\t\t\t\t\t<BlockList renderAppender={ false } />\n\t\t\t\t\t\t\t\t</ExperimentalBlockEditorProvider>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Disabled>\n\t\t\t\t\t</div>\n\t\t\t\t</Composite.Item>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default StyleBook;\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAUA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AASA,IAAAQ,SAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AAKA,IAAAW,WAAA,GAAAX,OAAA;AACA,IAAAY,sBAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,UAAA,GAAAb,OAAA;AACA,IAAAc,WAAA,GAAAd,OAAA;AAIA,IAAAe,SAAA,GAAAf,OAAA;AAC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AAY,IAAE,CAAC,eAChB,IAAA1K,WAAA,CAAAyF,GAAA,EAAC1G,YAAA,CAAAwN,SAAS;gBAACC,cAAc,EAAG;cAAO,CAAE,CAAC;YAAA,CACN;UACjC,CACQ;QAAC,CACP,CAAC;MAAA,CACS;IAAC,CACb;EAAC,CACF,CAAC;AAER,CAAC;AAAC,IAAAC,QAAA,GAAA1D,OAAA,CAAArD,OAAA,GAEajC,SAAS","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_i18n","_blockEditor","_editor","_data","_element","_keycodes","_mediaUtils","_coreData","_lockUnlock","_editorCanvasContainer","_constants","_categories","_examples","_store","_sidebarGlobalStylesWrapper","_globalStylesRenderer","_constants2","_jsxRuntime","ExperimentalBlockEditorProvider","useGlobalStyle","GlobalStylesContext","useGlobalStylesOutputWithConfig","unlock","blockEditorPrivateApis","mergeBaseAndUserConfigs","editorPrivateApis","Tabs","componentsPrivateApis","isObjectEmpty","object","Object","keys","length","scrollToSection","anchorId","iframe","contentDocument","element","body","getElementById","scrollIntoView","behavior","getStyleBookNavigationFromPath","path","startsWith","top","useMultiOriginPalettes","colors","gradients","useMultipleOriginColorsAndGradients","shouldDisplayDefaultDuotones","customDuotones","themeDuotones","defaultDuotones","useSettings","palettes","useMemo","result","duotones","push","name","_x","slug","getExamplesForSinglePageUse","examples","examplesForSinglePageUse","overviewCategoryExamples","getExamplesByCategory","otherExamples","filter","example","category","find","overviewExample","StyleBook","enableResizing","isSelected","onClick","onSelect","showCloseButton","onClose","showTabs","userConfig","textColor","backgroundColor","getExamples","tabs","getTopLevelStyleBookCategories","some","base","baseConfig","useContext","goTo","mergedConfig","originalSettings","useSelect","select","blockEditorStore","getSettings","globalStyles","settings","styles","isPreviewMode","jsx","default","closeButtonLabel","__","children","className","clsx","style","color","background","jsxs","TabList","map","tab","Tab","tabId","title","categoryDefinition","_category","filteredExamples","TabPanel","focusable","StyleBookBody","StyleBookPreview","isStatic","siteEditorSettings","siteEditorStore","canUserUploadMedia","coreStore","canUser","kind","useEffect","dispatch","updateSettings","mediaUpload","uploadMedia","undefined","section","onChangeSection","useSection","blockName","encodeURIComponent","STYLE_BOOK_COLOR_GROUPS","group","previewCategory","includes","decodeURIComponent","split","STYLE_BOOK_PREVIEW_CATEGORIES","displayedExamples","BlockEditorProvider","GlobalStylesRenderer","disableRootPadding","exports","isFocused","setIsFocused","useState","hasIframeLoaded","setHasIframeLoaded","iframeRef","useRef","buttonModeProps","role","onFocus","onBlur","onKeyDown","event","defaultPrevented","keyCode","ENTER","SPACE","preventDefault","readonly","handleLoad","useLayoutEffect","current","__unstableIframe","onLoad","ref","tabIndex","__unstableEditorStyles","STYLE_BOOK_IFRAME_STYLES","Examples","label","sprintf","memo","Composite","orientation","Example","id","content","blocks","subcategories","subcategory","Group","GroupLabel","Subcategory","disabledExamples","focusMode","renderedBlocks","Array","isArray","disabledProps","disabled","accessibleWhenDisabled","Item","render","Disabled","value","BlockList","renderAppender","_default"],"sources":["@wordpress/edit-site/src/components/style-book/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tDisabled,\n\tComposite,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport {\n\tBlockList,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n\tuseSettings,\n\tBlockEditorProvider,\n\t__unstableEditorStyles as EditorStyles,\n\t__unstableIframe as Iframe,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n} from '@wordpress/block-editor';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { useSelect, dispatch } from '@wordpress/data';\nimport {\n\tuseMemo,\n\tuseState,\n\tmemo,\n\tuseContext,\n\tuseRef,\n\tuseLayoutEffect,\n\tuseEffect,\n} from '@wordpress/element';\nimport { ENTER, SPACE } from '@wordpress/keycodes';\nimport { uploadMedia } from '@wordpress/media-utils';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport EditorCanvasContainer from '../editor-canvas-container';\nimport { STYLE_BOOK_IFRAME_STYLES } from './constants';\nimport {\n\tgetExamplesByCategory,\n\tgetTopLevelStyleBookCategories,\n} from './categories';\nimport { getExamples } from './examples';\nimport { store as siteEditorStore } from '../../store';\nimport { useSection } from '../sidebar-global-styles-wrapper';\nimport { GlobalStylesRenderer } from '../global-styles-renderer';\nimport {\n\tSTYLE_BOOK_COLOR_GROUPS,\n\tSTYLE_BOOK_PREVIEW_CATEGORIES,\n} from '../style-book/constants';\n\nconst {\n\tExperimentalBlockEditorProvider,\n\tuseGlobalStyle,\n\tGlobalStylesContext,\n\tuseGlobalStylesOutputWithConfig,\n} = unlock( blockEditorPrivateApis );\nconst { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\n/**\n * Scrolls to a section within an iframe.\n *\n * @param {string} anchorId The id of the element to scroll to.\n * @param {HTMLIFrameElement} iframe The target iframe.\n */\nconst scrollToSection = ( anchorId, iframe ) => {\n\tif ( ! anchorId || ! iframe || ! iframe?.contentDocument ) {\n\t\treturn;\n\t}\n\n\tconst element =\n\t\tanchorId === 'top'\n\t\t\t? iframe.contentDocument.body\n\t\t\t: iframe.contentDocument.getElementById( anchorId );\n\tif ( element ) {\n\t\telement.scrollIntoView( {\n\t\t\tbehavior: 'smooth',\n\t\t} );\n\t}\n};\n\n/**\n * Parses a Block Editor navigation path to build a style book navigation path.\n * The object can be extended to include a category, representing a style book tab/section.\n *\n * @param {string} path An internal Block Editor navigation path.\n * @return {null|{block: string}} An object containing the example to navigate to.\n */\nconst getStyleBookNavigationFromPath = ( path ) => {\n\tif ( path && typeof path === 'string' ) {\n\t\tif (\n\t\t\tpath === '/' ||\n\t\t\tpath.startsWith( '/typography' ) ||\n\t\t\tpath.startsWith( '/colors' ) ||\n\t\t\tpath.startsWith( '/blocks' )\n\t\t) {\n\t\t\treturn {\n\t\t\t\ttop: true,\n\t\t\t};\n\t\t}\n\t}\n\treturn null;\n};\n\n/**\n * Retrieves colors, gradients, and duotone filters from Global Styles.\n * The inclusion of default (Core) palettes is controlled by the relevant\n * theme.json property e.g. defaultPalette, defaultGradients, defaultDuotone.\n *\n * @return {Object} Object containing properties for each type of palette.\n */\nfunction useMultiOriginPalettes() {\n\tconst { colors, gradients } = useMultipleOriginColorsAndGradients();\n\n\t// Add duotone filters to the palettes data.\n\tconst [\n\t\tshouldDisplayDefaultDuotones,\n\t\tcustomDuotones,\n\t\tthemeDuotones,\n\t\tdefaultDuotones,\n\t] = useSettings(\n\t\t'color.defaultDuotone',\n\t\t'color.duotone.custom',\n\t\t'color.duotone.theme',\n\t\t'color.duotone.default'\n\t);\n\n\tconst palettes = useMemo( () => {\n\t\tconst result = { colors, gradients, duotones: [] };\n\n\t\tif ( themeDuotones && themeDuotones.length ) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Theme',\n\t\t\t\t\t'Indicates these duotone filters come from the theme.'\n\t\t\t\t),\n\t\t\t\tslug: 'theme',\n\t\t\t\tduotones: themeDuotones,\n\t\t\t} );\n\t\t}\n\n\t\tif (\n\t\t\tshouldDisplayDefaultDuotones &&\n\t\t\tdefaultDuotones &&\n\t\t\tdefaultDuotones.length\n\t\t) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Default',\n\t\t\t\t\t'Indicates these duotone filters come from WordPress.'\n\t\t\t\t),\n\t\t\t\tslug: 'default',\n\t\t\t\tduotones: defaultDuotones,\n\t\t\t} );\n\t\t}\n\t\tif ( customDuotones && customDuotones.length ) {\n\t\t\tresult.duotones.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Custom',\n\t\t\t\t\t'Indicates these doutone filters are created by the user.'\n\t\t\t\t),\n\t\t\t\tslug: 'custom',\n\t\t\t\tduotones: customDuotones,\n\t\t\t} );\n\t\t}\n\n\t\treturn result;\n\t}, [\n\t\tcolors,\n\t\tgradients,\n\t\tcustomDuotones,\n\t\tthemeDuotones,\n\t\tdefaultDuotones,\n\t\tshouldDisplayDefaultDuotones,\n\t] );\n\n\treturn palettes;\n}\n\n/**\n * Get deduped examples for single page stylebook.\n * @param {Array} examples Array of examples.\n * @return {Array} Deduped examples.\n */\nexport function getExamplesForSinglePageUse( examples ) {\n\tconst examplesForSinglePageUse = [];\n\tconst overviewCategoryExamples = getExamplesByCategory(\n\t\t{ slug: 'overview' },\n\t\texamples\n\t);\n\texamplesForSinglePageUse.push( ...overviewCategoryExamples.examples );\n\tconst otherExamples = examples.filter( ( example ) => {\n\t\treturn (\n\t\t\texample.category !== 'overview' &&\n\t\t\t! overviewCategoryExamples.examples.find(\n\t\t\t\t( overviewExample ) => overviewExample.name === example.name\n\t\t\t)\n\t\t);\n\t} );\n\texamplesForSinglePageUse.push( ...otherExamples );\n\n\treturn examplesForSinglePageUse;\n}\n\nfunction StyleBook( {\n\tenableResizing = true,\n\tisSelected,\n\tonClick,\n\tonSelect,\n\tshowCloseButton = true,\n\tonClose,\n\tshowTabs = true,\n\tuserConfig = {},\n\tpath = '',\n} ) {\n\tconst [ textColor ] = useGlobalStyle( 'color.text' );\n\tconst [ backgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst colors = useMultiOriginPalettes();\n\tconst examples = useMemo( () => getExamples( colors ), [ colors ] );\n\tconst tabs = useMemo(\n\t\t() =>\n\t\t\tgetTopLevelStyleBookCategories().filter( ( category ) =>\n\t\t\t\texamples.some(\n\t\t\t\t\t( example ) => example.category === category.slug\n\t\t\t\t)\n\t\t\t),\n\t\t[ examples ]\n\t);\n\n\tconst examplesForSinglePageUse = getExamplesForSinglePageUse( examples );\n\n\tconst { base: baseConfig } = useContext( GlobalStylesContext );\n\tconst goTo = getStyleBookNavigationFromPath( path );\n\n\tconst mergedConfig = useMemo( () => {\n\t\tif ( ! isObjectEmpty( userConfig ) && ! isObjectEmpty( baseConfig ) ) {\n\t\t\treturn mergeBaseAndUserConfigs( baseConfig, userConfig );\n\t\t}\n\t\treturn {};\n\t}, [ baseConfig, userConfig ] );\n\n\t// Copied from packages/edit-site/src/components/revisions/index.js\n\t// could we create a shared hook?\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst [ globalStyles ] = useGlobalStylesOutputWithConfig( mergedConfig );\n\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...originalSettings,\n\t\t\tstyles:\n\t\t\t\t! isObjectEmpty( globalStyles ) && ! isObjectEmpty( userConfig )\n\t\t\t\t\t? globalStyles\n\t\t\t\t\t: originalSettings.styles,\n\t\t\tisPreviewMode: true,\n\t\t} ),\n\t\t[ globalStyles, originalSettings, userConfig ]\n\t);\n\n\treturn (\n\t\t<EditorCanvasContainer\n\t\t\tonClose={ onClose }\n\t\t\tenableResizing={ enableResizing }\n\t\t\tcloseButtonLabel={ showCloseButton ? __( 'Close' ) : null }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'edit-site-style-book', {\n\t\t\t\t\t'is-button': !! onClick,\n\t\t\t\t} ) }\n\t\t\t\tstyle={ {\n\t\t\t\t\tcolor: textColor,\n\t\t\t\t\tbackground: backgroundColor,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ showTabs ? (\n\t\t\t\t\t<Tabs>\n\t\t\t\t\t\t<div className=\"edit-site-style-book__tablist-container\">\n\t\t\t\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t\t\t\t{ tabs.map( ( tab ) => (\n\t\t\t\t\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\t\t\t\t\ttabId={ tab.slug }\n\t\t\t\t\t\t\t\t\t\tkey={ tab.slug }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ tab.title }\n\t\t\t\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t</Tabs.TabList>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{ tabs.map( ( tab ) => {\n\t\t\t\t\t\t\tconst categoryDefinition = tab.slug\n\t\t\t\t\t\t\t\t? getTopLevelStyleBookCategories().find(\n\t\t\t\t\t\t\t\t\t\t( _category ) =>\n\t\t\t\t\t\t\t\t\t\t\t_category.slug === tab.slug\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t: null;\n\t\t\t\t\t\t\tconst filteredExamples = categoryDefinition\n\t\t\t\t\t\t\t\t? getExamplesByCategory(\n\t\t\t\t\t\t\t\t\t\tcategoryDefinition,\n\t\t\t\t\t\t\t\t\t\texamples\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t: { examples };\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\t\t\t\t\tkey={ tab.slug }\n\t\t\t\t\t\t\t\t\ttabId={ tab.slug }\n\t\t\t\t\t\t\t\t\tfocusable={ false }\n\t\t\t\t\t\t\t\t\tclassName=\"edit-site-style-book__tabpanel\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<StyleBookBody\n\t\t\t\t\t\t\t\t\t\tcategory={ tab.slug }\n\t\t\t\t\t\t\t\t\t\texamples={ filteredExamples }\n\t\t\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\t\t\ttitle={ tab.title }\n\t\t\t\t\t\t\t\t\t\tgoTo={ goTo }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</Tabs>\n\t\t\t\t) : (\n\t\t\t\t\t<StyleBookBody\n\t\t\t\t\t\texamples={ { examples: examplesForSinglePageUse } }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\tgoTo={ goTo }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</EditorCanvasContainer>\n\t);\n}\n\n/**\n * Style Book Preview component renders the stylebook without the Editor dependency.\n *\n * @param {Object} props Component props.\n * @param {Object} props.userConfig User configuration.\n * @param {boolean} props.isStatic Whether the stylebook is static or clickable.\n * @return {Object} Style Book Preview component.\n */\nexport const StyleBookPreview = ( { userConfig = {}, isStatic = false } ) => {\n\tconst siteEditorSettings = useSelect(\n\t\t( select ) => select( siteEditorStore ).getSettings(),\n\t\t[]\n\t);\n\n\tconst canUserUploadMedia = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).canUser( 'create', {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'media',\n\t\t\t} ),\n\t\t[]\n\t);\n\n\t// Update block editor settings because useMultipleOriginColorsAndGradients fetch colours from there.\n\tuseEffect( () => {\n\t\tdispatch( blockEditorStore ).updateSettings( {\n\t\t\t...siteEditorSettings,\n\t\t\tmediaUpload: canUserUploadMedia ? uploadMedia : undefined,\n\t\t} );\n\t}, [ siteEditorSettings, canUserUploadMedia ] );\n\n\tconst [ section, onChangeSection ] = useSection();\n\n\tconst isSelected = ( blockName ) => {\n\t\t// Match '/blocks/core%2Fbutton' and\n\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t// '/blocks/core%2Fbuttons'.\n\t\treturn (\n\t\t\tsection === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\tsection.startsWith(\n\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t)\n\t\t);\n\t};\n\n\tconst onSelect = ( blockName ) => {\n\t\tif (\n\t\t\tSTYLE_BOOK_COLOR_GROUPS.find(\n\t\t\t\t( group ) => group.slug === blockName\n\t\t\t)\n\t\t) {\n\t\t\t// Go to color palettes Global Styles.\n\t\t\tonChangeSection( '/colors/palette' );\n\t\t\treturn;\n\t\t}\n\t\tif ( blockName === 'typography' ) {\n\t\t\t// Go to typography Global Styles.\n\t\t\tonChangeSection( '/typography' );\n\t\t\treturn;\n\t\t}\n\n\t\t// Now go to the selected block.\n\t\tonChangeSection( `/blocks/${ encodeURIComponent( blockName ) }` );\n\t};\n\n\tconst colors = useMultiOriginPalettes();\n\tconst examples = getExamples( colors );\n\tconst examplesForSinglePageUse = getExamplesForSinglePageUse( examples );\n\n\tlet previewCategory = null;\n\tif ( section.includes( '/colors' ) ) {\n\t\tpreviewCategory = 'colors';\n\t} else if ( section.includes( '/typography' ) ) {\n\t\tpreviewCategory = 'text';\n\t} else if ( section.includes( '/blocks' ) ) {\n\t\tpreviewCategory = 'blocks';\n\t\tconst blockName =\n\t\t\tdecodeURIComponent( section ).split( '/blocks/' )[ 1 ];\n\t\tif (\n\t\t\tblockName &&\n\t\t\texamples.find( ( example ) => example.name === blockName )\n\t\t) {\n\t\t\tpreviewCategory = blockName;\n\t\t}\n\t} else if ( ! isStatic ) {\n\t\tpreviewCategory = 'overview';\n\t}\n\tconst categoryDefinition = STYLE_BOOK_PREVIEW_CATEGORIES.find(\n\t\t( category ) => category.slug === previewCategory\n\t);\n\n\t// If there's no category definition there may be a single block.\n\tconst filteredExamples = categoryDefinition\n\t\t? getExamplesByCategory( categoryDefinition, examples )\n\t\t: {\n\t\t\t\texamples: [\n\t\t\t\t\texamples.find(\n\t\t\t\t\t\t( example ) => example.name === previewCategory\n\t\t\t\t\t),\n\t\t\t\t],\n\t\t };\n\n\t// If there's no preview category, show all examples.\n\tconst displayedExamples = previewCategory\n\t\t? filteredExamples\n\t\t: { examples: examplesForSinglePageUse };\n\n\tconst { base: baseConfig } = useContext( GlobalStylesContext );\n\tconst goTo = getStyleBookNavigationFromPath( section );\n\n\tconst mergedConfig = useMemo( () => {\n\t\tif ( ! isObjectEmpty( userConfig ) && ! isObjectEmpty( baseConfig ) ) {\n\t\t\treturn mergeBaseAndUserConfigs( baseConfig, userConfig );\n\t\t}\n\t\treturn {};\n\t}, [ baseConfig, userConfig ] );\n\n\tconst [ globalStyles ] = useGlobalStylesOutputWithConfig( mergedConfig );\n\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...siteEditorSettings,\n\t\t\tstyles:\n\t\t\t\t! isObjectEmpty( globalStyles ) && ! isObjectEmpty( userConfig )\n\t\t\t\t\t? globalStyles\n\t\t\t\t\t: siteEditorSettings.styles,\n\t\t\tisPreviewMode: true,\n\t\t} ),\n\t\t[ globalStyles, siteEditorSettings, userConfig ]\n\t);\n\n\treturn (\n\t\t<div className=\"edit-site-style-book\">\n\t\t\t<BlockEditorProvider settings={ settings }>\n\t\t\t\t<GlobalStylesRenderer disableRootPadding />\n\t\t\t\t<StyleBookBody\n\t\t\t\t\texamples={ displayedExamples }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tgoTo={ goTo }\n\t\t\t\t\tisSelected={ ! isStatic ? isSelected : null }\n\t\t\t\t\tonSelect={ ! isStatic ? onSelect : null }\n\t\t\t\t/>\n\t\t\t</BlockEditorProvider>\n\t\t</div>\n\t);\n};\n\nexport const StyleBookBody = ( {\n\texamples,\n\tisSelected,\n\tonClick,\n\tonSelect,\n\tsettings,\n\ttitle,\n\tgoTo,\n} ) => {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst [ hasIframeLoaded, setHasIframeLoaded ] = useState( false );\n\tconst iframeRef = useRef( null );\n\t// The presence of an `onClick` prop indicates that the Style Book is being used as a button.\n\t// In this case, add additional props to the iframe to make it behave like a button.\n\tconst buttonModeProps = {\n\t\trole: 'button',\n\t\tonFocus: () => setIsFocused( true ),\n\t\tonBlur: () => setIsFocused( false ),\n\t\tonKeyDown: ( event ) => {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { keyCode } = event;\n\t\t\tif ( onClick && ( keyCode === ENTER || keyCode === SPACE ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonClick( event );\n\t\t\t}\n\t\t},\n\t\tonClick: ( event ) => {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( onClick ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonClick( event );\n\t\t\t}\n\t\t},\n\t\treadonly: true,\n\t};\n\n\tconst handleLoad = () => setHasIframeLoaded( true );\n\tuseLayoutEffect( () => {\n\t\tif ( hasIframeLoaded && iframeRef?.current ) {\n\t\t\tif ( goTo?.top ) {\n\t\t\t\tscrollToSection( 'top', iframeRef?.current );\n\t\t\t}\n\t\t}\n\t}, [ iframeRef?.current, goTo, scrollToSection, hasIframeLoaded ] );\n\n\treturn (\n\t\t<Iframe\n\t\t\tonLoad={ handleLoad }\n\t\t\tref={ iframeRef }\n\t\t\tclassName={ clsx( 'edit-site-style-book__iframe', {\n\t\t\t\t'is-focused': isFocused && !! onClick,\n\t\t\t\t'is-button': !! onClick,\n\t\t\t} ) }\n\t\t\tname=\"style-book-canvas\"\n\t\t\ttabIndex={ 0 }\n\t\t\t{ ...( onClick ? buttonModeProps : {} ) }\n\t\t>\n\t\t\t<EditorStyles styles={ settings.styles } />\n\t\t\t<style>\n\t\t\t\t{ STYLE_BOOK_IFRAME_STYLES }\n\t\t\t\t{ !! onClick &&\n\t\t\t\t\t'body { cursor: pointer; } body * { pointer-events: none; }' }\n\t\t\t</style>\n\t\t\t<Examples\n\t\t\t\tclassName=\"edit-site-style-book__examples\"\n\t\t\t\tfilteredExamples={ examples }\n\t\t\t\tlabel={\n\t\t\t\t\ttitle\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Category of blocks, e.g. Text.\n\t\t\t\t\t\t\t\t__( 'Examples of blocks in the %s category' ),\n\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: __( 'Examples of blocks' )\n\t\t\t\t}\n\t\t\t\tisSelected={ isSelected }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t\tkey={ title }\n\t\t\t/>\n\t\t</Iframe>\n\t);\n};\n\nconst Examples = memo(\n\t( { className, filteredExamples, label, isSelected, onSelect } ) => {\n\t\treturn (\n\t\t\t<Composite\n\t\t\t\torientation=\"vertical\"\n\t\t\t\tclassName={ className }\n\t\t\t\taria-label={ label }\n\t\t\t\trole=\"grid\"\n\t\t\t>\n\t\t\t\t{ !! filteredExamples?.examples?.length &&\n\t\t\t\t\tfilteredExamples.examples.map( ( example ) => (\n\t\t\t\t\t\t<Example\n\t\t\t\t\t\t\tkey={ example.name }\n\t\t\t\t\t\t\tid={ `example-${ example.name }` }\n\t\t\t\t\t\t\ttitle={ example.title }\n\t\t\t\t\t\t\tcontent={ example.content }\n\t\t\t\t\t\t\tblocks={ example.blocks }\n\t\t\t\t\t\t\tisSelected={ isSelected?.( example.name ) }\n\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\t!! onSelect\n\t\t\t\t\t\t\t\t\t? () => onSelect( example.name )\n\t\t\t\t\t\t\t\t\t: null\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{ !! filteredExamples?.subcategories?.length &&\n\t\t\t\t\tfilteredExamples.subcategories.map( ( subcategory ) => (\n\t\t\t\t\t\t<Composite.Group\n\t\t\t\t\t\t\tclassName=\"edit-site-style-book__subcategory\"\n\t\t\t\t\t\t\tkey={ `subcategory-${ subcategory.slug }` }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Composite.GroupLabel>\n\t\t\t\t\t\t\t\t<h2 className=\"edit-site-style-book__subcategory-title\">\n\t\t\t\t\t\t\t\t\t{ subcategory.title }\n\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t</Composite.GroupLabel>\n\t\t\t\t\t\t\t<Subcategory\n\t\t\t\t\t\t\t\texamples={ subcategory.examples }\n\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Composite.Group>\n\t\t\t\t\t) ) }\n\t\t\t</Composite>\n\t\t);\n\t}\n);\n\nconst Subcategory = ( { examples, isSelected, onSelect } ) => {\n\treturn (\n\t\t!! examples?.length &&\n\t\texamples.map( ( example ) => (\n\t\t\t<Example\n\t\t\t\tkey={ example.name }\n\t\t\t\tid={ `example-${ example.name }` }\n\t\t\t\ttitle={ example.title }\n\t\t\t\tcontent={ example.content }\n\t\t\t\tblocks={ example.blocks }\n\t\t\t\tisSelected={ isSelected?.( example.name ) }\n\t\t\t\tonClick={ !! onSelect ? () => onSelect( example.name ) : null }\n\t\t\t/>\n\t\t) )\n\t);\n};\n\nconst disabledExamples = [ 'example-duotones' ];\n\nconst Example = ( { id, title, blocks, isSelected, onClick, content } ) => {\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...originalSettings,\n\t\t\tfocusMode: false, // Disable \"Spotlight mode\".\n\t\t\tisPreviewMode: true,\n\t\t} ),\n\t\t[ originalSettings ]\n\t);\n\n\t// Cache the list of blocks to avoid additional processing when the component is re-rendered.\n\tconst renderedBlocks = useMemo(\n\t\t() => ( Array.isArray( blocks ) ? blocks : [ blocks ] ),\n\t\t[ blocks ]\n\t);\n\n\tconst disabledProps =\n\t\tdisabledExamples.includes( id ) || ! onClick\n\t\t\t? {\n\t\t\t\t\tdisabled: true,\n\t\t\t\t\taccessibleWhenDisabled: !! onClick,\n\t\t\t }\n\t\t\t: {};\n\n\treturn (\n\t\t<div role=\"row\">\n\t\t\t<div role=\"gridcell\">\n\t\t\t\t<Composite.Item\n\t\t\t\t\tclassName={ clsx( 'edit-site-style-book__example', {\n\t\t\t\t\t\t'is-selected': isSelected,\n\t\t\t\t\t\t'is-disabled-example': !! disabledProps?.disabled,\n\t\t\t\t\t} ) }\n\t\t\t\t\tid={ id }\n\t\t\t\t\taria-label={\n\t\t\t\t\t\t!! onClick\n\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t// translators: %s: Title of a block, e.g. Heading.\n\t\t\t\t\t\t\t\t\t__( 'Open %s styles in Styles panel' ),\n\t\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\trender={ <div /> }\n\t\t\t\t\trole={ !! onClick ? 'button' : null }\n\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t{ ...disabledProps }\n\t\t\t\t>\n\t\t\t\t\t<span className=\"edit-site-style-book__example-title\">\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</span>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"edit-site-style-book__example-preview\"\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t>\n\t\t\t\t\t\t<Disabled className=\"edit-site-style-book__example-preview__content\">\n\t\t\t\t\t\t\t{ content ? (\n\t\t\t\t\t\t\t\tcontent\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<ExperimentalBlockEditorProvider\n\t\t\t\t\t\t\t\t\tvalue={ renderedBlocks }\n\t\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<EditorStyles />\n\t\t\t\t\t\t\t\t\t<BlockList renderAppender={ false } />\n\t\t\t\t\t\t\t\t</ExperimentalBlockEditorProvider>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Disabled>\n\t\t\t\t\t</div>\n\t\t\t\t</Composite.Item>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default StyleBook;\n"],"mappings":";;;;;;;;AAG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AAA,gBAErB,IAAA1F,WAAA,CAAAsF,GAAA,EAACtG,YAAA,CAAAsL,sBAAY,IAAE,CAAC,eAChB,IAAAtK,WAAA,CAAAsF,GAAA,EAACtG,YAAA,CAAAmN,SAAS;gBAACC,cAAc,EAAG;cAAO,CAAE,CAAC;YAAA,CACN;UACjC,CACQ;QAAC,CACP,CAAC;MAAA,CACS;IAAC,CACb;EAAC,CACF,CAAC;AAER,CAAC;AAAC,IAAAC,QAAA,GAAA1D,OAAA,CAAApD,OAAA,GAEa9B,SAAS","ignoreList":[]}
|
|
@@ -50,7 +50,9 @@ function WelcomeGuidePage() {
|
|
|
50
50
|
children: heading
|
|
51
51
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
52
52
|
className: "edit-site-welcome-guide__text",
|
|
53
|
-
children: (0, _i18n.__)(
|
|
53
|
+
children: (0, _i18n.__)(
|
|
54
|
+
// eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts
|
|
55
|
+
'It’s now possible to edit page content in the site editor. To customise other parts of the page like the header and footer switch to editing the template using the settings sidebar.')
|
|
54
56
|
})]
|
|
55
57
|
})
|
|
56
58
|
}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_data","require","_components","_i18n","_preferences","_jsxRuntime","WelcomeGuidePage","toggle","useDispatch","preferencesStore","isVisible","useSelect","select","isPageActive","get","isEditorActive","heading","__","jsx","Guide","className","contentLabel","finishButtonText","onFinish","pages","image","autoPlay","loop","muted","width","height","children","src","type","content","jsxs","Fragment"],"sources":["@wordpress/edit-site/src/components/welcome-guide/page.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\nexport default function WelcomeGuidePage() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst isPageActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuidePage'\n\t\t);\n\t\tconst isEditorActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuide'\n\t\t);\n\t\treturn isPageActive && ! isEditorActive;\n\t}, [] );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst heading = __( 'Editing a page' );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-site-welcome-guide guide-page\"\n\t\t\tcontentLabel={ heading }\n\t\t\tfinishButtonText={ __( 'Continue' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-site', 'welcomeGuidePage' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<video\n\t\t\t\t\t\t\tclassName=\"edit-site-welcome-guide__video\"\n\t\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\t\tloop\n\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\twidth=\"312\"\n\t\t\t\t\t\t\theight=\"240\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<source\n\t\t\t\t\t\t\t\tsrc=\"https://s.w.org/images/block-editor/editing-your-page.mp4\"\n\t\t\t\t\t\t\t\ttype=\"video/mp4\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</video>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ heading }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'It’s now possible to edit page content in the site editor. To customise other parts of the page like the header and footer switch to editing the template using the settings sidebar.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t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C,MAAM,EAAC,KAAK;QAAAC,QAAA,eAEZ,IAAA1B,WAAA,CAAAa,GAAA;UACCc,GAAG,EAAC,2DAA2D;UAC/DC,IAAI,EAAC;QAAW,CAChB;MAAC,CACI,CACP;MACDC,OAAO,eACN,IAAA7B,WAAA,CAAA8B,IAAA,EAAA9B,WAAA,CAAA+B,QAAA;QAAAL,QAAA,gBACC,IAAA1B,WAAA,CAAAa,GAAA;UAAIE,SAAS,EAAC,kCAAkC;UAAAW,QAAA,EAC7Cf;QAAO,CACN,CAAC,eACL,IAAAX,WAAA,CAAAa,GAAA;UAAGE,SAAS,EAAC,+BAA+B;UAAAW,QAAA,EACzC,IAAAd,QAAE,
|
|
1
|
+
{"version":3,"names":["_data","require","_components","_i18n","_preferences","_jsxRuntime","WelcomeGuidePage","toggle","useDispatch","preferencesStore","isVisible","useSelect","select","isPageActive","get","isEditorActive","heading","__","jsx","Guide","className","contentLabel","finishButtonText","onFinish","pages","image","autoPlay","loop","muted","width","height","children","src","type","content","jsxs","Fragment"],"sources":["@wordpress/edit-site/src/components/welcome-guide/page.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\nexport default function WelcomeGuidePage() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst isPageActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuidePage'\n\t\t);\n\t\tconst isEditorActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuide'\n\t\t);\n\t\treturn isPageActive && ! isEditorActive;\n\t}, [] );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst heading = __( 'Editing a page' );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-site-welcome-guide guide-page\"\n\t\t\tcontentLabel={ heading }\n\t\t\tfinishButtonText={ __( 'Continue' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-site', 'welcomeGuidePage' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<video\n\t\t\t\t\t\t\tclassName=\"edit-site-welcome-guide__video\"\n\t\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\t\tloop\n\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\twidth=\"312\"\n\t\t\t\t\t\t\theight=\"240\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<source\n\t\t\t\t\t\t\t\tsrc=\"https://s.w.org/images/block-editor/editing-your-page.mp4\"\n\t\t\t\t\t\t\t\ttype=\"video/mp4\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</video>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ heading }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t// eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts\n\t\t\t\t\t\t\t\t\t'It’s now possible to edit page content in the site editor. To customise other parts of the page like the header and footer switch to editing the template using the settings sidebar.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t] }\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAAmE,IAAAI,WAAA,GAAAJ,OAAA;AANnE;AACA;AACA;;AAMe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AAa,GAAA;UAAIE,SAAS,EAAC,kCAAkC;UAAAW,QAAA,EAC7Cf;QAAO,CACN,CAAC,eACL,IAAAX,WAAA,CAAAa,GAAA;UAAGE,SAAS,EAAC,+BAA+B;UAAAW,QAAA,EACzC,IAAAd,QAAE;UACH;UACA,uLACD;QAAC,CACC,CAAC;MAAA,CACH;IAEJ,CAAC;EACC,CACH,CAAC;AAEJ","ignoreList":[]}
|
package/build/index.js
CHANGED
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_blocks","require","_blockLibrary","_data","_deprecated","_interopRequireDefault","_element","_editor","_preferences","_widgets","_store","_lockUnlock","_app","_jsxRuntime","_pluginTemplateSettingPanel","_deprecated2","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_posts","registerCoreBlockBindingsSources","unlock","editorPrivateApis","initializeEditor","id","settings","target","document","getElementById","root","createRoot","dispatch","blocksStore","reapplyBlockTypeFilters","coreBlocks","__experimentalGetCoreBlocks","filter","name","registerCoreBlocks","setFreeformFallbackBlockName","registerLegacyWidgetBlock","inserter","registerWidgetGroupBlock","globalThis","IS_GUTENBERG_PLUGIN","__experimentalRegisterExperimentalCoreBlocks","enableFSEBlocks","preferencesStore","setDefaults","welcomeGuide","welcomeGuideStyles","welcomeGuidePage","welcomeGuideTemplate","allowRightClickOverrides","distractionFree","editorMode","editorTool","fixedToolbar","focusMode","inactivePanels","keepCaretInsideBlock","openPanels","showBlockBreadcrumbs","showListViewByDefault","enableChoosePatternModal","window","__experimentalMediaProcessing","requireApproval","optimizeOnUpload","editSiteStore","updateSettings","addEventListener","e","preventDefault","render","jsx","StrictMode","children","default","reinitializeEditor","deprecated","since","version"],"sources":["@wordpress/edit-site/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport { store as editSiteStore } from './store';\nimport { unlock } from './lock-unlock';\nimport App from './components/app';\n\nconst { registerCoreBlockBindingsSources } = unlock( editorPrivateApis );\n\n/**\n * Initializes the site editor screen.\n *\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializeEditor( id, settings ) {\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tregisterCoreBlockBindingsSources();\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\teditorTool: 'edit',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t} );\n\n\tif ( window.__experimentalMediaProcessing ) {\n\t\tdispatch( preferencesStore ).setDefaults( 'core/media', {\n\t\t\trequireApproval: true,\n\t\t\toptimizeOnUpload: true,\n\t\t} );\n\t}\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<App />\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editSite.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as PluginTemplateSettingPanel } from './components/plugin-template-setting-panel';\nexport { store } from './store';\nexport * from './deprecated';\n\n// Temporary: While the posts dashboard is being iterated on\n// it's being built in the same package as the site editor.\nexport { initializePostsDashboard } from './posts';\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_blocks","require","_blockLibrary","_data","_deprecated","_interopRequireDefault","_element","_editor","_preferences","_widgets","_store","_lockUnlock","_app","_jsxRuntime","_pluginTemplateSettingPanel","_deprecated2","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_posts","registerCoreBlockBindingsSources","unlock","editorPrivateApis","initializeEditor","id","settings","target","document","getElementById","root","createRoot","dispatch","blocksStore","reapplyBlockTypeFilters","coreBlocks","__experimentalGetCoreBlocks","filter","name","registerCoreBlocks","setFreeformFallbackBlockName","registerLegacyWidgetBlock","inserter","registerWidgetGroupBlock","globalThis","IS_GUTENBERG_PLUGIN","__experimentalRegisterExperimentalCoreBlocks","enableFSEBlocks","preferencesStore","setDefaults","welcomeGuide","welcomeGuideStyles","welcomeGuidePage","welcomeGuideTemplate","allowRightClickOverrides","distractionFree","editorMode","editorTool","fixedToolbar","focusMode","inactivePanels","keepCaretInsideBlock","openPanels","showBlockBreadcrumbs","showListViewByDefault","enableChoosePatternModal","window","__experimentalMediaProcessing","requireApproval","optimizeOnUpload","editSiteStore","updateSettings","addEventListener","e","preventDefault","render","jsx","StrictMode","children","default","reinitializeEditor","deprecated","since","version"],"sources":["@wordpress/edit-site/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport { store as editSiteStore } from './store';\nimport { unlock } from './lock-unlock';\nimport App from './components/app';\n\nconst { registerCoreBlockBindingsSources } = unlock( editorPrivateApis );\n\n/**\n * Initializes the site editor screen.\n *\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializeEditor( id, settings ) {\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tregisterCoreBlockBindingsSources();\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\teditorTool: 'edit',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t} );\n\n\tif ( window.__experimentalMediaProcessing ) {\n\t\tdispatch( preferencesStore ).setDefaults( 'core/media', {\n\t\t\trequireApproval: true,\n\t\t\toptimizeOnUpload: true,\n\t\t} );\n\t}\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<App />\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editSite.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as PluginTemplateSettingPanel } from './components/plugin-template-setting-panel';\nexport { store } from './store';\nexport * from './deprecated';\n\n// Temporary: While the posts dashboard is being iterated on\n// it's being built in the same package as the site editor.\nexport { init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;IAC7BC,oBAAoB,EAAE,IAAI;IAC1BC,qBAAqB,EAAE,KAAK;IAC5BC,wBAAwB,EAAE;EAC3B,CAAE,CAAC;EAEH,IAAKC,MAAM,CAACC,6BAA6B,EAAG;IAC3C,IAAAnC,cAAQ,EAAEgB,kBAAiB,CAAC,CAACC,WAAW,CAAE,YAAY,EAAE;MACvDmB,eAAe,EAAE,IAAI;MACrBC,gBAAgB,EAAE;IACnB,CAAE,CAAC;EACJ;EAEA,IAAArC,cAAQ,EAAEsC,YAAc,CAAC,CAACC,cAAc,CAAE7C,QAAS,CAAC;;EAEpD;EACAwC,MAAM,CAACM,gBAAgB,CAAE,UAAU,EAAIC,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EACzER,MAAM,CAACM,gBAAgB,CAAE,MAAM,EAAIC,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EAErE5C,IAAI,CAAC6C,MAAM,cACV,IAAAtE,WAAA,CAAAuE,GAAA,EAAC9E,QAAA,CAAA+E,UAAU;IAAAC,QAAA,eACV,IAAAzE,WAAA,CAAAuE,GAAA,EAACxE,IAAA,CAAA2E,OAAG,IAAE;EAAC,CACI,CACb,CAAC;EAED,OAAOjD,IAAI;AACZ;AAEO,SAASkD,kBAAkBA,CAAA,EAAG;EACpC,IAAAC,mBAAU,EAAE,gCAAgC,EAAE;IAC7CC,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ;;AAMA;AACA","ignoreList":[]}
|
package/build/posts.js
CHANGED
package/build/posts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_blocks","require","_blockLibrary","_data","_element","_preferences","_widgets","_store","_postsApp","_interopRequireDefault","_jsxRuntime","initializePostsDashboard","id","settings","globalThis","IS_GUTENBERG_PLUGIN","target","document","getElementById","root","createRoot","dispatch","blocksStore","reapplyBlockTypeFilters","coreBlocks","__experimentalGetCoreBlocks","filter","name","registerCoreBlocks","setFreeformFallbackBlockName","registerLegacyWidgetBlock","inserter","registerWidgetGroupBlock","__experimentalRegisterExperimentalCoreBlocks","enableFSEBlocks","preferencesStore","setDefaults","welcomeGuide","welcomeGuideStyles","welcomeGuidePage","welcomeGuideTemplate","allowRightClickOverrides","distractionFree","editorMode","editorTool","fixedToolbar","focusMode","inactivePanels","keepCaretInsideBlock","openPanels","showBlockBreadcrumbs","showListViewByDefault","enableChoosePatternModal","editSiteStore","updateSettings","window","addEventListener","e","preventDefault","render","jsx","StrictMode","children","default"],"sources":["@wordpress/edit-site/src/posts.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport { store as editSiteStore } from './store';\n\n/**\n * Internal dependencies\n */\nimport PostsApp from './components/posts-app';\n\n/**\n * Initializes the \"Posts Dashboard\"\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializePostsDashboard( id, settings ) {\n\tif ( ! globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\treturn;\n\t}\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\teditorTool: 'edit',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t} );\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<PostsApp />\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_blocks","require","_blockLibrary","_data","_element","_preferences","_widgets","_store","_postsApp","_interopRequireDefault","_jsxRuntime","initializePostsDashboard","id","settings","globalThis","IS_GUTENBERG_PLUGIN","target","document","getElementById","root","createRoot","dispatch","blocksStore","reapplyBlockTypeFilters","coreBlocks","__experimentalGetCoreBlocks","filter","name","registerCoreBlocks","setFreeformFallbackBlockName","registerLegacyWidgetBlock","inserter","registerWidgetGroupBlock","__experimentalRegisterExperimentalCoreBlocks","enableFSEBlocks","preferencesStore","setDefaults","welcomeGuide","welcomeGuideStyles","welcomeGuidePage","welcomeGuideTemplate","allowRightClickOverrides","distractionFree","editorMode","editorTool","fixedToolbar","focusMode","inactivePanels","keepCaretInsideBlock","openPanels","showBlockBreadcrumbs","showListViewByDefault","enableChoosePatternModal","editSiteStore","updateSettings","window","addEventListener","e","preventDefault","render","jsx","StrictMode","children","default"],"sources":["@wordpress/edit-site/src/posts.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport { store as editSiteStore } from './store';\n\n/**\n * Internal dependencies\n */\nimport PostsApp from './components/posts-app';\n\n/**\n * Initializes the \"Posts Dashboard\"\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializePostsDashboard( id, settings ) {\n\tif ( ! globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\treturn;\n\t}\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\teditorTool: 'edit',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\n\t\tenableChoosePatternModal: true,\n\t} );\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<PostsApp />\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAKA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAQAA,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAKA,IAAAO,SAAA,GAAAC,sBAAA,CAAAR,OAAA;AAA8C,IAAAS,WAAA,GAAAT,OAAA;AA1B9C;AACA;AACA;;AAeA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACO,SAASU,wBAAwBA,CAAEC,EAAE,EAAEC,QAAQ,EAAG;EACxD,IAAK,CAAEC,UAAU,CAACC,mBAAmB,E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,oBAAoB,EAAE,IAAI;IAC1BC,qBAAqB,EAAE,KAAK;IAC5BC,wBAAwB,EAAE;EAC3B,CAAE,CAAC;EAEH,IAAA/B,cAAQ,EAAEgC,YAAc,CAAC,CAACC,cAAc,CAAEzC,QAAS,CAAC;;EAEpD;EACA0C,MAAM,CAACC,gBAAgB,CAAE,UAAU,EAAIC,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EACzEH,MAAM,CAACC,gBAAgB,CAAE,MAAM,EAAIC,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EAErEvC,IAAI,CAACwC,MAAM,cACV,IAAAjD,WAAA,CAAAkD,GAAA,EAACxD,QAAA,CAAAyD,UAAU;IAAAC,QAAA,eACV,IAAApD,WAAA,CAAAkD,GAAA,EAACpD,SAAA,CAAAuD,OAAQ,IAAE;EAAC,CACD,CACb,CAAC;EAED,OAAO5C,IAAI;AACZ","ignoreList":[]}
|
package/build/store/reducer.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_data","require","settings","state","action","type","editedPost","postType","id","context","saveViewPanel","isOpen","editorCanvasContainerView","undefined","view","routes","route","filter","name","_default","exports","default","combineReducers"],"sources":["@wordpress/edit-site/src/store/reducer.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Reducer returning the settings.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function settings( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_SETTINGS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t...action.settings,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer keeping track of the currently edited Post Type,\n * Post Id and the context provided to fill the content of the block editor.\n *\n * @param {Object} state Current edited post.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function editedPost( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn {\n\t\t\t\tpostType: action.postType,\n\t\t\t\tid: action.id,\n\t\t\t\tcontext: action.context,\n\t\t\t};\n\t\tcase 'SET_EDITED_POST_CONTEXT':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tcontext: action.context,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer to set the save view panel open or closed.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function saveViewPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_SAVE_VIEW_OPENED':\n\t\t\treturn action.isOpen;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer used to track the site editor canvas container view.\n * Default is `undefined`, denoting the default, visual block editor.\n * This could be, for example, `'style-book'` (the style book).\n *\n * @param {string|undefined} state Current state.\n * @param {Object} action Dispatched action.\n */\nfunction editorCanvasContainerView( state = undefined, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITOR_CANVAS_CONTAINER_VIEW':\n\t\t\treturn action.view;\n\t}\n\n\treturn state;\n}\n\nfunction routes( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REGISTER_ROUTE':\n\t\t\treturn [ ...state, action.route ];\n\t\tcase 'UNREGISTER_ROUTE':\n\t\t\treturn state.filter( ( route ) => route.name !== action.name );\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tsettings,\n\teditedPost,\n\tsaveViewPanel,\n\teditorCanvasContainerView,\n\troutes,\n} );\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_data","require","settings","state","action","type","editedPost","postType","id","context","saveViewPanel","isOpen","editorCanvasContainerView","undefined","view","routes","route","filter","name","_default","exports","default","combineReducers"],"sources":["@wordpress/edit-site/src/store/reducer.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Reducer returning the settings.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function settings( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_SETTINGS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t...action.settings,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer keeping track of the currently edited Post Type,\n * Post Id and the context provided to fill the content of the block editor.\n *\n * @param {Object} state Current edited post.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function editedPost( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn {\n\t\t\t\tpostType: action.postType,\n\t\t\t\tid: action.id,\n\t\t\t\tcontext: action.context,\n\t\t\t};\n\t\tcase 'SET_EDITED_POST_CONTEXT':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tcontext: action.context,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer to set the save view panel open or closed.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function saveViewPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_SAVE_VIEW_OPENED':\n\t\t\treturn action.isOpen;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer used to track the site editor canvas container view.\n * Default is `undefined`, denoting the default, visual block editor.\n * This could be, for example, `'style-book'` (the style book).\n *\n * @param {string|undefined} state Current state.\n * @param {Object} action Dispatched action.\n */\nfunction editorCanvasContainerView( state = undefined, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITOR_CANVAS_CONTAINER_VIEW':\n\t\t\treturn action.view;\n\t}\n\n\treturn state;\n}\n\nfunction routes( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REGISTER_ROUTE':\n\t\t\treturn [ ...state, action.route ];\n\t\tcase 'UNREGISTER_ROUTE':\n\t\t\treturn state.filter( ( route ) => route.name !== action.name );\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tsettings,\n\teditedPost,\n\tsaveViewPanel,\n\teditorCanvasContainerView,\n\troutes,\n} );\n"],"mappings":";;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,QAAQA,CAAEC,KAAK,GAAG,CAAC,CAAC,EAAEC,MAAM,EAAG;EAC9C,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,iBAAiB;MACrB,OAAO;QACN,GAAGF,KAAK;QACR,GAAGC,MAAM,CAACF;MACX,CAAC;EACH;EAEA,OAAOC,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,UAAUA,CAAEH,KAAK,GAAG,CAAC,CAAC,EAAEC,MAAM,EAAG;EAChD,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,iBAAiB;MACrB,OAAO;QACNE,QAAQ,EAAEH,MAAM,CAACG,QAAQ;QACzBC,EAAE,EAAEJ,MAAM,CAACI,EAAE;QACbC,OAAO,EAAEL,MAAM,CAACK;MACjB,CAAC;IACF,KAAK,yBAAyB;MAC7B,OAAO;QACN,GAAGN,KAAK;QACRM,OAAO,EAAEL,MAAM,CAACK;MACjB,CAAC;EACH;EAEA,OAAON,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASO,aAAaA,CAAEP,KAAK,GAAG,KAAK,EAAEC,MAAM,EAAG;EACtD,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,yBAAyB;MAC7B,OAAOD,MAAM,CAACO,MAAM;EACtB;EACA,OAAOR,KAAK;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASS,yBAAyBA,CAAET,KAAK,GAAGU,SAAS,EAAET,MAAM,EAAG;EAC/D,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,kCAAkC;MACtC,OAAOD,MAAM,CAACU,IAAI;EACpB;EAEA,OAAOX,KAAK;AACb;AAEA,SAASY,MAAMA,CAAEZ,KAAK,GAAG,EAAE,EAAEC,MAAM,EAAG;EACrC,QAASA,MAAM,CAACC,IAAI;IACnB,KAAK,gBAAgB;MACpB,OAAO,CAAE,GAAGF,KAAK,EAAEC,MAAM,CAACY,KAAK,CAAE;IAClC,KAAK,kBAAkB;MACtB,OAAOb,KAAK,CAACc,MAAM,CAAID,KAAK,IAAMA,KAAK,CAACE,IAAI,KAAKd,MAAM,CAACc,IAAK,CAAC;EAChE;EAEA,OAAOf,KAAK;AACb;AAAC,IAAAgB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,qBAAe,EAAE;EAC/BpB,QAAQ;EACRI,UAAU;EACVI,aAAa;EACbE,yBAAyB;EACzBG;AACD,CAAE,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_blocks","require","EMPTY_ARRAY","getFilteredTemplatePartBlocks","blocks","templateParts","templatePartsById","reduce","newTemplateParts","part","id","result","stack","length","innerBlocks","block","shift","unshift","isTemplatePart","attributes","theme","slug","templatePartId","templatePart","push"],"sources":["@wordpress/edit-site/src/utils/get-filtered-template-parts.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { isTemplatePart } from '@wordpress/blocks';\n\nconst EMPTY_ARRAY = [];\n\n/**\n * Get a flattened and filtered list of template parts and the matching block for that template part.\n *\n * Takes a list of blocks defined within a template, and a list of template parts, and returns a\n * flattened list of template parts and the matching block for that template part.\n *\n * @param {Array} blocks Blocks to flatten.\n * @param {?Array} templateParts Available template parts.\n * @return {Array} An array of template parts and their blocks.\n */\nexport default function getFilteredTemplatePartBlocks(\n\tblocks = EMPTY_ARRAY,\n\ttemplateParts\n) {\n\tconst templatePartsById = templateParts\n\t\t? // Key template parts by their ID.\n\t\t templateParts.reduce(\n\t\t\t\t( newTemplateParts, part ) => ( {\n\t\t\t\t\t...newTemplateParts,\n\t\t\t\t\t[ part.id ]: part,\n\t\t\t\t} ),\n\t\t\t\t{}\n\t\t )\n\t\t: {};\n\n\tconst result = [];\n\n\t// Iterate over all blocks, recursing into inner blocks.\n\t// Output will be based on a depth-first traversal.\n\tconst stack = [ ...blocks ];\n\twhile ( stack.length ) {\n\t\tconst { innerBlocks, ...block } = stack.shift();\n\t\t// Place inner blocks at the beginning of the stack to preserve order.\n\t\tstack.unshift( ...innerBlocks );\n\n\t\tif ( isTemplatePart( block ) ) {\n\t\t\tconst {\n\t\t\t\tattributes: { theme, slug },\n\t\t\t} = block;\n\t\t\tconst templatePartId = `${ theme }//${ slug }`;\n\t\t\tconst templatePart = templatePartsById[ templatePartId ];\n\n\t\t\t// Only add to output if the found template part block is in the list of available template parts.\n\t\t\tif ( templatePart ) {\n\t\t\t\tresult.push( {\n\t\t\t\t\ttemplatePart,\n\t\t\t\t\tblock,\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_blocks","require","EMPTY_ARRAY","getFilteredTemplatePartBlocks","blocks","templateParts","templatePartsById","reduce","newTemplateParts","part","id","result","stack","length","innerBlocks","block","shift","unshift","isTemplatePart","attributes","theme","slug","templatePartId","templatePart","push"],"sources":["@wordpress/edit-site/src/utils/get-filtered-template-parts.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { isTemplatePart } from '@wordpress/blocks';\n\nconst EMPTY_ARRAY = [];\n\n/**\n * Get a flattened and filtered list of template parts and the matching block for that template part.\n *\n * Takes a list of blocks defined within a template, and a list of template parts, and returns a\n * flattened list of template parts and the matching block for that template part.\n *\n * @param {Array} blocks Blocks to flatten.\n * @param {?Array} templateParts Available template parts.\n * @return {Array} An array of template parts and their blocks.\n */\nexport default function getFilteredTemplatePartBlocks(\n\tblocks = EMPTY_ARRAY,\n\ttemplateParts\n) {\n\tconst templatePartsById = templateParts\n\t\t? // Key template parts by their ID.\n\t\t templateParts.reduce(\n\t\t\t\t( newTemplateParts, part ) => ( {\n\t\t\t\t\t...newTemplateParts,\n\t\t\t\t\t[ part.id ]: part,\n\t\t\t\t} ),\n\t\t\t\t{}\n\t\t )\n\t\t: {};\n\n\tconst result = [];\n\n\t// Iterate over all blocks, recursing into inner blocks.\n\t// Output will be based on a depth-first traversal.\n\tconst stack = [ ...blocks ];\n\twhile ( stack.length ) {\n\t\tconst { innerBlocks, ...block } = stack.shift();\n\t\t// Place inner blocks at the beginning of the stack to preserve order.\n\t\tstack.unshift( ...innerBlocks );\n\n\t\tif ( isTemplatePart( block ) ) {\n\t\t\tconst {\n\t\t\t\tattributes: { theme, slug },\n\t\t\t} = block;\n\t\t\tconst templatePartId = `${ theme }//${ slug }`;\n\t\t\tconst templatePart = templatePartsById[ templatePartId ];\n\n\t\t\t// Only add to output if the found template part block is in the list of available template parts.\n\t\t\tif ( templatePart ) {\n\t\t\t\tresult.push( {\n\t\t\t\t\ttemplatePart,\n\t\t\t\t\tblock,\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA,MAAMC,WAAW,GAAG,EAAE;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,6BAA6BA,CACpDC,MAAM,GAAGF,WAAW,EACpBG,aAAa,EACZ;EACD,MAAMC,iBAAiB,GAAGD,aAAa;EACpC;EACAA,aAAa,CAACE,MAAM,CACpB,CAAEC,gBAAgB,EAAEC,IAAI,MAAQ;IAC/B,GAAGD,gBAAgB;IACnB,CAAEC,IAAI,CAACC,EAAE,GAAID;EACd,CAAC,CAAE,EACH,CAAC,CACD,CAAC,GACD,CAAC,CAAC;EAEL,MAAME,MAAM,GAAG,EAAE;;EAEjB;EACA;EACA,MAAMC,KAAK,GAAG,CAAE,GAAGR,MAAM,CAAE;EAC3B,OAAQQ,KAAK,C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