@wordpress/edit-site 6.3.0 → 6.5.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 +14 -3
- package/build/components/add-new-pattern/index.js.map +1 -1
- package/build/components/add-new-post/index.js +2 -1
- package/build/components/add-new-post/index.js.map +1 -1
- package/build/components/add-new-template/index.js +3 -1
- package/build/components/add-new-template/index.js.map +1 -1
- package/build/components/add-new-template/utils.js +2 -2
- package/build/components/add-new-template/utils.js.map +1 -1
- package/build/components/block-editor/use-site-editor-settings.js +1 -82
- package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build/components/editor/index.js +71 -20
- package/build/components/editor/index.js.map +1 -1
- package/build/components/global-styles/block-preview-panel.js +14 -5
- package/build/components/global-styles/block-preview-panel.js.map +1 -1
- package/build/components/global-styles/font-families.js +40 -22
- package/build/components/global-styles/font-families.js.map +1 -1
- package/build/components/global-styles/font-library-modal/context.js +0 -5
- package/build/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-collection.js +25 -5
- package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build/components/global-styles/font-library-modal/index.js +5 -12
- package/build/components/global-styles/font-library-modal/index.js.map +1 -1
- package/build/components/global-styles/font-library-modal/installed-fonts.js +78 -15
- package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build/components/global-styles/font-library-modal/upload-fonts.js +2 -3
- package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
- package/build/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +39 -0
- package/build/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js.map +1 -0
- package/build/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +39 -0
- package/build/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js.map +1 -0
- package/build/components/global-styles/font-sizes/font-size-preview.js +44 -0
- package/build/components/global-styles/font-sizes/font-size-preview.js.map +1 -0
- package/build/components/global-styles/font-sizes/font-size.js +213 -0
- package/build/components/global-styles/font-sizes/font-size.js.map +1 -0
- package/build/components/global-styles/font-sizes/font-sizes-count.js +50 -0
- package/build/components/global-styles/font-sizes/font-sizes-count.js.map +1 -0
- package/build/components/global-styles/font-sizes/font-sizes.js +163 -0
- package/build/components/global-styles/font-sizes/font-sizes.js.map +1 -0
- package/build/components/global-styles/font-sizes/rename-font-size-dialog.js +67 -0
- package/build/components/global-styles/font-sizes/rename-font-size-dialog.js.map +1 -0
- package/build/components/global-styles/screen-block.js +10 -8
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-style-variations.js +2 -2
- package/build/components/global-styles/screen-style-variations.js.map +1 -1
- package/build/components/global-styles/screen-typeset.js +40 -0
- package/build/components/global-styles/screen-typeset.js.map +1 -0
- package/build/components/global-styles/screen-typography-element.js +14 -0
- package/build/components/global-styles/screen-typography-element.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +5 -6
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/shadows-edit-panel.js +50 -59
- package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
- package/build/components/global-styles/size-control/index.js +85 -0
- package/build/components/global-styles/size-control/index.js.map +1 -0
- package/build/components/global-styles/style-variations-container.js +3 -0
- package/build/components/global-styles/style-variations-container.js.map +1 -1
- package/build/components/global-styles/typeset-button.js +97 -0
- package/build/components/global-styles/typeset-button.js.map +1 -0
- package/build/components/global-styles/typeset.js +80 -0
- package/build/components/global-styles/typeset.js.map +1 -0
- package/build/components/global-styles/ui.js +12 -0
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles/utils.js +10 -1
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/global-styles/variations/variations-color.js.map +1 -1
- package/build/components/global-styles/variations/variations-typography.js +1 -1
- package/build/components/global-styles/variations/variations-typography.js.map +1 -1
- package/build/components/layout/index.js +6 -0
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/router.js +14 -6
- package/build/components/layout/router.js.map +1 -1
- package/build/components/page-patterns/fields.js +230 -0
- package/build/components/page-patterns/fields.js.map +1 -0
- package/build/components/page-patterns/header.js +1 -1
- package/build/components/page-patterns/header.js.map +1 -1
- package/build/components/page-patterns/index.js +21 -227
- package/build/components/page-patterns/index.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +26 -1
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/page-templates/fields.js +169 -0
- package/build/components/page-templates/fields.js.map +1 -0
- package/build/components/page-templates/index.js +38 -198
- package/build/components/page-templates/index.js.map +1 -1
- package/build/components/post-edit/index.js +117 -0
- package/build/components/post-edit/index.js.map +1 -0
- package/build/components/post-fields/index.js +318 -0
- package/build/components/post-fields/index.js.map +1 -0
- package/build/components/post-list/index.js +339 -0
- package/build/components/post-list/index.js.map +1 -0
- package/build/components/posts-app/router.js +3 -3
- package/build/components/posts-app/router.js.map +1 -1
- package/build/components/sidebar-dataviews/add-new-view.js +2 -2
- package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
- package/build/components/sidebar-dataviews/dataview-item.js +2 -3
- package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build/components/sidebar-dataviews/default-views.js +103 -91
- package/build/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build/components/sidebar-dataviews/index.js +2 -2
- package/build/components/sidebar-dataviews/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/content.js +64 -0
- package/build/components/sidebar-navigation-screen-global-styles/content.js.map +1 -0
- package/build/components/sidebar-navigation-screen-global-styles/index.js +2 -47
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build/components/site-hub/index.js +6 -3
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/style-book/index.js +22 -25
- package/build/components/style-book/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +5 -0
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build/hooks/push-changes-to-global-styles/index.js +3 -4
- package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -4
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build/index.js +4 -2
- package/build/index.js.map +1 -1
- package/build/store/selectors.js +34 -6
- package/build/store/selectors.js.map +1 -1
- package/build/utils/get-filtered-template-parts.js +64 -0
- package/build/utils/get-filtered-template-parts.js.map +1 -0
- package/build-module/components/add-new-pattern/index.js +14 -3
- package/build-module/components/add-new-pattern/index.js.map +1 -1
- package/build-module/components/add-new-post/index.js +2 -1
- package/build-module/components/add-new-post/index.js.map +1 -1
- package/build-module/components/add-new-template/index.js +3 -1
- package/build-module/components/add-new-template/index.js.map +1 -1
- package/build-module/components/add-new-template/utils.js +2 -2
- package/build-module/components/add-new-template/utils.js.map +1 -1
- package/build-module/components/block-editor/use-site-editor-settings.js +1 -82
- package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build-module/components/editor/index.js +73 -22
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/global-styles/block-preview-panel.js +14 -5
- package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
- package/build-module/components/global-styles/font-families.js +42 -24
- package/build-module/components/global-styles/font-families.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/context.js +0 -5
- 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 +26 -6
- package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/index.js +5 -12
- 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 +81 -18
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/upload-fonts.js +2 -3
- package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
- package/build-module/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +32 -0
- package/build-module/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js.map +1 -0
- package/build-module/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +32 -0
- package/build-module/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js.map +1 -0
- package/build-module/components/global-styles/font-sizes/font-size-preview.js +37 -0
- package/build-module/components/global-styles/font-sizes/font-size-preview.js.map +1 -0
- package/build-module/components/global-styles/font-sizes/font-size.js +207 -0
- package/build-module/components/global-styles/font-sizes/font-size.js.map +1 -0
- package/build-module/components/global-styles/font-sizes/font-sizes-count.js +43 -0
- package/build-module/components/global-styles/font-sizes/font-sizes-count.js.map +1 -0
- package/build-module/components/global-styles/font-sizes/font-sizes.js +157 -0
- package/build-module/components/global-styles/font-sizes/font-sizes.js.map +1 -0
- package/build-module/components/global-styles/font-sizes/rename-font-size-dialog.js +61 -0
- package/build-module/components/global-styles/font-sizes/rename-font-size-dialog.js.map +1 -0
- package/build-module/components/global-styles/screen-block.js +10 -8
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-style-variations.js +2 -2
- package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
- package/build-module/components/global-styles/screen-typeset.js +34 -0
- package/build-module/components/global-styles/screen-typeset.js.map +1 -0
- package/build-module/components/global-styles/screen-typography-element.js +14 -0
- package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js +5 -6
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/shadows-edit-panel.js +51 -60
- package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
- package/build-module/components/global-styles/size-control/index.js +79 -0
- package/build-module/components/global-styles/size-control/index.js.map +1 -0
- package/build-module/components/global-styles/style-variations-container.js +3 -0
- package/build-module/components/global-styles/style-variations-container.js.map +1 -1
- package/build-module/components/global-styles/typeset-button.js +89 -0
- package/build-module/components/global-styles/typeset-button.js.map +1 -0
- package/build-module/components/global-styles/typeset.js +71 -0
- package/build-module/components/global-styles/typeset.js.map +1 -0
- package/build-module/components/global-styles/ui.js +12 -0
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles/utils.js +10 -1
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-color.js +1 -1
- package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-typography.js +1 -2
- package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
- package/build-module/components/layout/index.js +6 -0
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/router.js +14 -6
- package/build-module/components/layout/router.js.map +1 -1
- package/build-module/components/page-patterns/fields.js +223 -0
- package/build-module/components/page-patterns/fields.js.map +1 -0
- package/build-module/components/page-patterns/header.js +1 -1
- package/build-module/components/page-patterns/header.js.map +1 -1
- package/build-module/components/page-patterns/index.js +24 -230
- package/build-module/components/page-patterns/index.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +26 -1
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/page-templates/fields.js +160 -0
- package/build-module/components/page-templates/fields.js.map +1 -0
- package/build-module/components/page-templates/index.js +39 -199
- package/build-module/components/page-templates/index.js.map +1 -1
- package/build-module/components/post-edit/index.js +110 -0
- package/build-module/components/post-edit/index.js.map +1 -0
- package/build-module/components/post-fields/index.js +310 -0
- package/build-module/components/post-fields/index.js.map +1 -0
- package/build-module/components/post-list/index.js +333 -0
- package/build-module/components/post-list/index.js.map +1 -0
- package/build-module/components/posts-app/router.js +3 -3
- package/build-module/components/posts-app/router.js.map +1 -1
- package/build-module/components/sidebar-dataviews/add-new-view.js +2 -2
- package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
- package/build-module/components/sidebar-dataviews/dataview-item.js +2 -3
- package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build-module/components/sidebar-dataviews/default-views.js +102 -90
- package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build-module/components/sidebar-dataviews/index.js +5 -5
- package/build-module/components/sidebar-dataviews/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/content.js +57 -0
- package/build-module/components/sidebar-navigation-screen-global-styles/content.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +2 -47
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build-module/components/site-hub/index.js +7 -4
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/style-book/index.js +23 -26
- package/build-module/components/style-book/index.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +5 -0
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build-module/hooks/push-changes-to-global-styles/index.js +3 -4
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -3
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build-module/index.js +4 -2
- package/build-module/index.js.map +1 -1
- package/build-module/store/selectors.js +35 -7
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/get-filtered-template-parts.js +57 -0
- package/build-module/utils/get-filtered-template-parts.js.map +1 -0
- package/build-style/posts-rtl.css +749 -492
- package/build-style/posts.css +749 -492
- package/build-style/style-rtl.css +956 -613
- package/build-style/style.css +956 -613
- package/package.json +41 -41
- package/src/components/add-new-pattern/index.js +16 -5
- package/src/components/add-new-post/index.js +2 -1
- package/src/components/add-new-template/index.js +4 -1
- package/src/components/add-new-template/style.scss +4 -6
- package/src/components/add-new-template/utils.js +10 -6
- package/src/components/block-editor/use-site-editor-settings.js +15 -111
- package/src/components/editor/index.js +80 -22
- package/src/components/editor/style.scss +59 -1
- package/src/components/global-styles/block-preview-panel.js +22 -9
- package/src/components/global-styles/font-families.js +65 -32
- package/src/components/global-styles/font-library-modal/context.js +0 -5
- package/src/components/global-styles/font-library-modal/font-collection.js +34 -10
- package/src/components/global-styles/font-library-modal/index.js +6 -9
- package/src/components/global-styles/font-library-modal/installed-fonts.js +115 -16
- package/src/components/global-styles/font-library-modal/style.scss +9 -0
- package/src/components/global-styles/font-library-modal/upload-fonts.js +2 -2
- package/src/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +43 -0
- package/src/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +37 -0
- package/src/components/global-styles/font-sizes/font-size-preview.js +43 -0
- package/src/components/global-styles/font-sizes/font-size.js +250 -0
- package/src/components/global-styles/font-sizes/font-sizes-count.js +40 -0
- package/src/components/global-styles/font-sizes/font-sizes.js +263 -0
- package/src/components/global-styles/font-sizes/rename-font-size-dialog.js +70 -0
- package/src/components/global-styles/screen-block.js +12 -14
- package/src/components/global-styles/screen-style-variations.js +2 -2
- package/src/components/global-styles/screen-typeset.js +42 -0
- package/src/components/global-styles/screen-typography-element.js +14 -0
- package/src/components/global-styles/screen-typography.js +7 -6
- package/src/components/global-styles/shadows-edit-panel.js +66 -73
- package/src/components/global-styles/size-control/index.js +86 -0
- package/src/components/global-styles/style-variations-container.js +4 -0
- package/src/components/global-styles/style.scss +17 -10
- package/src/components/global-styles/typeset-button.js +93 -0
- package/src/components/global-styles/typeset.js +73 -0
- package/src/components/global-styles/ui.js +15 -0
- package/src/components/global-styles/utils.js +13 -1
- package/src/components/global-styles/variations/variations-color.js +1 -1
- package/src/components/global-styles/variations/variations-typography.js +1 -2
- package/src/components/layout/index.js +11 -0
- package/src/components/layout/router.js +13 -5
- package/src/components/layout/style.scss +34 -8
- package/src/components/page-patterns/fields.js +251 -0
- package/src/components/page-patterns/header.js +1 -1
- package/src/components/page-patterns/index.js +24 -246
- package/src/components/page-patterns/style.scss +82 -85
- package/src/components/page-patterns/use-patterns.js +31 -1
- package/src/components/page-templates/fields.js +157 -0
- package/src/components/page-templates/index.js +46 -192
- package/src/components/page-templates/style.scss +19 -8
- package/src/components/post-edit/index.js +115 -0
- package/src/components/post-edit/style.scss +9 -0
- package/src/components/post-fields/index.js +357 -0
- package/src/components/post-list/index.js +386 -0
- package/src/components/{posts-app → post-list}/style.scss +12 -9
- package/src/components/posts-app/router.js +3 -3
- package/src/components/sidebar-dataviews/add-new-view.js +2 -4
- package/src/components/sidebar-dataviews/dataview-item.js +2 -2
- package/src/components/sidebar-dataviews/default-views.js +116 -104
- package/src/components/sidebar-dataviews/index.js +4 -3
- package/src/components/sidebar-navigation-screen-global-styles/content.js +55 -0
- package/src/components/sidebar-navigation-screen-global-styles/index.js +1 -55
- package/src/components/site-hub/index.js +11 -2
- package/src/components/site-icon/style.scss +4 -1
- package/src/components/style-book/index.js +27 -32
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +5 -0
- package/src/hooks/push-changes-to-global-styles/index.js +3 -4
- package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -3
- package/src/index.js +6 -2
- package/src/posts.scss +1 -1
- package/src/store/selectors.js +53 -14
- package/src/store/test/selectors.js +1 -26
- package/src/style.scss +2 -1
- package/src/utils/get-filtered-template-parts.js +61 -0
- package/src/utils/test/get-filtered-template-parts.js +127 -0
- package/build/components/global-styles/screen-background.js +0 -36
- package/build/components/global-styles/screen-background.js.map +0 -1
- package/build/components/posts-app/posts-list.js +0 -568
- package/build/components/posts-app/posts-list.js.map +0 -1
- package/build/utils/clone-deep.js +0 -15
- package/build/utils/clone-deep.js.map +0 -1
- package/build-module/components/global-styles/screen-background.js +0 -30
- package/build-module/components/global-styles/screen-background.js.map +0 -1
- package/build-module/components/posts-app/posts-list.js +0 -560
- package/build-module/components/posts-app/posts-list.js.map +0 -1
- package/build-module/utils/clone-deep.js +0 -9
- package/build-module/utils/clone-deep.js.map +0 -1
- package/src/components/global-styles/screen-background.js +0 -29
- package/src/components/posts-app/posts-list.js +0 -651
- package/src/utils/clone-deep.js +0 -8
|
@@ -26,17 +26,31 @@ import {
|
|
|
26
26
|
OPERATOR_IS_ANY,
|
|
27
27
|
} from '../../utils/constants';
|
|
28
28
|
|
|
29
|
-
export const
|
|
29
|
+
export const defaultLayouts = {
|
|
30
30
|
[ LAYOUT_TABLE ]: {
|
|
31
|
-
|
|
31
|
+
layout: {
|
|
32
|
+
primaryField: 'title',
|
|
33
|
+
styles: {
|
|
34
|
+
'featured-image': {
|
|
35
|
+
width: '1%',
|
|
36
|
+
},
|
|
37
|
+
title: {
|
|
38
|
+
maxWidth: 300,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
32
42
|
},
|
|
33
43
|
[ LAYOUT_GRID ]: {
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
layout: {
|
|
45
|
+
mediaField: 'featured-image',
|
|
46
|
+
primaryField: 'title',
|
|
47
|
+
},
|
|
36
48
|
},
|
|
37
49
|
[ LAYOUT_LIST ]: {
|
|
38
|
-
|
|
39
|
-
|
|
50
|
+
layout: {
|
|
51
|
+
primaryField: 'title',
|
|
52
|
+
mediaField: 'featured-image',
|
|
53
|
+
},
|
|
40
54
|
},
|
|
41
55
|
};
|
|
42
56
|
|
|
@@ -51,9 +65,7 @@ const DEFAULT_POST_BASE = {
|
|
|
51
65
|
direction: 'desc',
|
|
52
66
|
},
|
|
53
67
|
fields: [ 'title', 'author', 'status' ],
|
|
54
|
-
layout:
|
|
55
|
-
...DEFAULT_CONFIG_PER_VIEW_TYPE[ LAYOUT_LIST ],
|
|
56
|
-
},
|
|
68
|
+
layout: defaultLayouts[ LAYOUT_LIST ].layout,
|
|
57
69
|
};
|
|
58
70
|
|
|
59
71
|
export function useDefaultViews( { postType } ) {
|
|
@@ -65,105 +77,105 @@ export function useDefaultViews( { postType } ) {
|
|
|
65
77
|
[ postType ]
|
|
66
78
|
);
|
|
67
79
|
return useMemo( () => {
|
|
68
|
-
return
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
],
|
|
89
|
-
},
|
|
80
|
+
return [
|
|
81
|
+
{
|
|
82
|
+
title: labels?.all_items || __( 'All items' ),
|
|
83
|
+
slug: 'all',
|
|
84
|
+
icon: pages,
|
|
85
|
+
view: DEFAULT_POST_BASE,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
title: __( 'Published' ),
|
|
89
|
+
slug: 'published',
|
|
90
|
+
icon: published,
|
|
91
|
+
view: {
|
|
92
|
+
...DEFAULT_POST_BASE,
|
|
93
|
+
filters: [
|
|
94
|
+
{
|
|
95
|
+
field: 'status',
|
|
96
|
+
operator: OPERATOR_IS_ANY,
|
|
97
|
+
value: 'publish',
|
|
98
|
+
},
|
|
99
|
+
],
|
|
90
100
|
},
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
title: __( 'Scheduled' ),
|
|
104
|
+
slug: 'future',
|
|
105
|
+
icon: scheduled,
|
|
106
|
+
view: {
|
|
107
|
+
...DEFAULT_POST_BASE,
|
|
108
|
+
filters: [
|
|
109
|
+
{
|
|
110
|
+
field: 'status',
|
|
111
|
+
operator: OPERATOR_IS_ANY,
|
|
112
|
+
value: 'future',
|
|
113
|
+
},
|
|
114
|
+
],
|
|
105
115
|
},
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
title: __( 'Drafts' ),
|
|
119
|
+
slug: 'drafts',
|
|
120
|
+
icon: drafts,
|
|
121
|
+
view: {
|
|
122
|
+
...DEFAULT_POST_BASE,
|
|
123
|
+
filters: [
|
|
124
|
+
{
|
|
125
|
+
field: 'status',
|
|
126
|
+
operator: OPERATOR_IS_ANY,
|
|
127
|
+
value: 'draft',
|
|
128
|
+
},
|
|
129
|
+
],
|
|
120
130
|
},
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
title: __( 'Pending' ),
|
|
134
|
+
slug: 'pending',
|
|
135
|
+
icon: pending,
|
|
136
|
+
view: {
|
|
137
|
+
...DEFAULT_POST_BASE,
|
|
138
|
+
filters: [
|
|
139
|
+
{
|
|
140
|
+
field: 'status',
|
|
141
|
+
operator: OPERATOR_IS_ANY,
|
|
142
|
+
value: 'pending',
|
|
143
|
+
},
|
|
144
|
+
],
|
|
135
145
|
},
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
title: __( 'Private' ),
|
|
149
|
+
slug: 'private',
|
|
150
|
+
icon: notAllowed,
|
|
151
|
+
view: {
|
|
152
|
+
...DEFAULT_POST_BASE,
|
|
153
|
+
filters: [
|
|
154
|
+
{
|
|
155
|
+
field: 'status',
|
|
156
|
+
operator: OPERATOR_IS_ANY,
|
|
157
|
+
value: 'private',
|
|
158
|
+
},
|
|
159
|
+
],
|
|
150
160
|
},
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
title: __( 'Trash' ),
|
|
164
|
+
slug: 'trash',
|
|
165
|
+
icon: trash,
|
|
166
|
+
view: {
|
|
167
|
+
...DEFAULT_POST_BASE,
|
|
168
|
+
type: LAYOUT_TABLE,
|
|
169
|
+
layout: defaultLayouts[ LAYOUT_TABLE ].layout,
|
|
170
|
+
filters: [
|
|
171
|
+
{
|
|
172
|
+
field: 'status',
|
|
173
|
+
operator: OPERATOR_IS_ANY,
|
|
174
|
+
value: 'trash',
|
|
175
|
+
},
|
|
176
|
+
],
|
|
165
177
|
},
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}, [ labels
|
|
178
|
+
},
|
|
179
|
+
];
|
|
180
|
+
}, [ labels ] );
|
|
169
181
|
}
|
|
@@ -9,15 +9,16 @@ import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
|
9
9
|
*/
|
|
10
10
|
import { useDefaultViews } from './default-views';
|
|
11
11
|
import { unlock } from '../../lock-unlock';
|
|
12
|
-
const { useLocation } = unlock( routerPrivateApis );
|
|
13
12
|
import DataViewItem from './dataview-item';
|
|
14
13
|
import CustomDataViewsList from './custom-dataviews-list';
|
|
15
14
|
|
|
15
|
+
const { useLocation } = unlock( routerPrivateApis );
|
|
16
|
+
|
|
16
17
|
export default function DataViewsSidebarContent() {
|
|
17
18
|
const {
|
|
18
19
|
params: { postType, activeView = 'all', isCustom = 'false' },
|
|
19
20
|
} = useLocation();
|
|
20
|
-
const
|
|
21
|
+
const defaultViews = useDefaultViews( { postType } );
|
|
21
22
|
if ( ! postType ) {
|
|
22
23
|
return null;
|
|
23
24
|
}
|
|
@@ -26,7 +27,7 @@ export default function DataViewsSidebarContent() {
|
|
|
26
27
|
return (
|
|
27
28
|
<>
|
|
28
29
|
<ItemGroup>
|
|
29
|
-
{
|
|
30
|
+
{ defaultViews.map( ( dataview ) => {
|
|
30
31
|
return (
|
|
31
32
|
<DataViewItem
|
|
32
33
|
key={ dataview.slug }
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
import { useSelect } from '@wordpress/data';
|
|
6
|
+
import { __experimentalVStack as VStack } from '@wordpress/components';
|
|
7
|
+
import { BlockEditorProvider } from '@wordpress/block-editor';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Internal dependencies
|
|
11
|
+
*/
|
|
12
|
+
import StyleVariationsContainer from '../global-styles/style-variations-container';
|
|
13
|
+
import { unlock } from '../../lock-unlock';
|
|
14
|
+
import { store as editSiteStore } from '../../store';
|
|
15
|
+
import ColorVariations from '../global-styles/variations/variations-color';
|
|
16
|
+
import TypographyVariations from '../global-styles/variations/variations-typography';
|
|
17
|
+
|
|
18
|
+
const noop = () => {};
|
|
19
|
+
|
|
20
|
+
export default function SidebarNavigationScreenGlobalStylesContent() {
|
|
21
|
+
const { storedSettings } = useSelect( ( select ) => {
|
|
22
|
+
const { getSettings } = unlock( select( editSiteStore ) );
|
|
23
|
+
|
|
24
|
+
return {
|
|
25
|
+
storedSettings: getSettings(),
|
|
26
|
+
};
|
|
27
|
+
}, [] );
|
|
28
|
+
|
|
29
|
+
const gap = 3;
|
|
30
|
+
|
|
31
|
+
// Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are
|
|
32
|
+
// loaded. This is necessary because the Iframe component waits until
|
|
33
|
+
// the block editor store's `__internalIsInitialized` is true before
|
|
34
|
+
// rendering the iframe. Without this, the iframe previews will not render
|
|
35
|
+
// in mobile viewport sizes, where the editor canvas is hidden.
|
|
36
|
+
return (
|
|
37
|
+
<BlockEditorProvider
|
|
38
|
+
settings={ storedSettings }
|
|
39
|
+
onChange={ noop }
|
|
40
|
+
onInput={ noop }
|
|
41
|
+
>
|
|
42
|
+
<VStack
|
|
43
|
+
spacing={ 10 }
|
|
44
|
+
className="edit-site-global-styles-variation-container"
|
|
45
|
+
>
|
|
46
|
+
<StyleVariationsContainer gap={ gap } />
|
|
47
|
+
<ColorVariations title={ __( 'Palettes' ) } gap={ gap } />
|
|
48
|
+
<TypographyVariations
|
|
49
|
+
title={ __( 'Typography' ) }
|
|
50
|
+
gap={ gap }
|
|
51
|
+
/>
|
|
52
|
+
</VStack>
|
|
53
|
+
</BlockEditorProvider>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
@@ -5,9 +5,7 @@ import { __ } from '@wordpress/i18n';
|
|
|
5
5
|
import { edit, seen } from '@wordpress/icons';
|
|
6
6
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
7
7
|
import { store as coreStore } from '@wordpress/core-data';
|
|
8
|
-
import { __experimentalVStack as VStack } from '@wordpress/components';
|
|
9
8
|
import { useViewportMatch } from '@wordpress/compose';
|
|
10
|
-
import { BlockEditorProvider } from '@wordpress/block-editor';
|
|
11
9
|
import { useCallback } from '@wordpress/element';
|
|
12
10
|
import { store as editorStore } from '@wordpress/editor';
|
|
13
11
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
@@ -16,7 +14,6 @@ import { store as preferencesStore } from '@wordpress/preferences';
|
|
|
16
14
|
* Internal dependencies
|
|
17
15
|
*/
|
|
18
16
|
import SidebarNavigationScreen from '../sidebar-navigation-screen';
|
|
19
|
-
import StyleVariationsContainer from '../global-styles/style-variations-container';
|
|
20
17
|
import { unlock } from '../../lock-unlock';
|
|
21
18
|
import { store as editSiteStore } from '../../store';
|
|
22
19
|
import SidebarButton from '../sidebar-button';
|
|
@@ -24,11 +21,7 @@ import SidebarNavigationItem from '../sidebar-navigation-item';
|
|
|
24
21
|
import StyleBook from '../style-book';
|
|
25
22
|
import useGlobalStylesRevisions from '../global-styles/screen-revisions/use-global-styles-revisions';
|
|
26
23
|
import SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';
|
|
27
|
-
import
|
|
28
|
-
import TypographyVariations from '../global-styles/variations/variations-typography';
|
|
29
|
-
import { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';
|
|
30
|
-
|
|
31
|
-
const noop = () => {};
|
|
24
|
+
import SidebarNavigationScreenGlobalStylesContent from './content';
|
|
32
25
|
|
|
33
26
|
export function SidebarNavigationItemGlobalStyles( props ) {
|
|
34
27
|
const { openGeneralSidebar } = useDispatch( editSiteStore );
|
|
@@ -63,53 +56,6 @@ export function SidebarNavigationItemGlobalStyles( props ) {
|
|
|
63
56
|
);
|
|
64
57
|
}
|
|
65
58
|
|
|
66
|
-
function SidebarNavigationScreenGlobalStylesContent() {
|
|
67
|
-
const { storedSettings } = useSelect( ( select ) => {
|
|
68
|
-
const { getSettings } = unlock( select( editSiteStore ) );
|
|
69
|
-
|
|
70
|
-
return {
|
|
71
|
-
storedSettings: getSettings(),
|
|
72
|
-
};
|
|
73
|
-
}, [] );
|
|
74
|
-
|
|
75
|
-
const colorVariations = useCurrentMergeThemeStyleVariationsWithUserConfig( [
|
|
76
|
-
'color',
|
|
77
|
-
] );
|
|
78
|
-
const typographyVariations =
|
|
79
|
-
useCurrentMergeThemeStyleVariationsWithUserConfig( [ 'typography' ] );
|
|
80
|
-
|
|
81
|
-
const gap = 3;
|
|
82
|
-
|
|
83
|
-
// Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are
|
|
84
|
-
// loaded. This is necessary because the Iframe component waits until
|
|
85
|
-
// the block editor store's `__internalIsInitialized` is true before
|
|
86
|
-
// rendering the iframe. Without this, the iframe previews will not render
|
|
87
|
-
// in mobile viewport sizes, where the editor canvas is hidden.
|
|
88
|
-
return (
|
|
89
|
-
<BlockEditorProvider
|
|
90
|
-
settings={ storedSettings }
|
|
91
|
-
onChange={ noop }
|
|
92
|
-
onInput={ noop }
|
|
93
|
-
>
|
|
94
|
-
<VStack
|
|
95
|
-
spacing={ 10 }
|
|
96
|
-
className="edit-site-global-styles-variation-container"
|
|
97
|
-
>
|
|
98
|
-
<StyleVariationsContainer gap={ gap } />
|
|
99
|
-
{ colorVariations?.length && (
|
|
100
|
-
<ColorVariations title={ __( 'Palettes' ) } gap={ gap } />
|
|
101
|
-
) }
|
|
102
|
-
{ typographyVariations?.length && (
|
|
103
|
-
<TypographyVariations
|
|
104
|
-
title={ __( 'Typography' ) }
|
|
105
|
-
gap={ gap }
|
|
106
|
-
/>
|
|
107
|
-
) }
|
|
108
|
-
</VStack>
|
|
109
|
-
</BlockEditorProvider>
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
59
|
export default function SidebarNavigationScreenGlobalStyles( { backPath } ) {
|
|
114
60
|
const { revisions, isLoading: isLoadingRevisions } =
|
|
115
61
|
useGlobalStylesRevisions();
|
|
@@ -7,7 +7,11 @@ import clsx from 'clsx';
|
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
9
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
Button,
|
|
12
|
+
__experimentalHStack as HStack,
|
|
13
|
+
VisuallyHidden,
|
|
14
|
+
} from '@wordpress/components';
|
|
11
15
|
import { __ } from '@wordpress/i18n';
|
|
12
16
|
import { store as coreStore } from '@wordpress/core-data';
|
|
13
17
|
import { decodeEntities } from '@wordpress/html-entities';
|
|
@@ -80,9 +84,14 @@ const SiteHub = memo(
|
|
|
80
84
|
variant="link"
|
|
81
85
|
href={ homeUrl }
|
|
82
86
|
target="_blank"
|
|
83
|
-
label={ __( 'View site (opens in a new tab)' ) }
|
|
84
87
|
>
|
|
85
88
|
{ decodeEntities( siteTitle ) }
|
|
89
|
+
<VisuallyHidden as="span">
|
|
90
|
+
{
|
|
91
|
+
/* translators: accessibility text */
|
|
92
|
+
__( '(opens in a new tab)' )
|
|
93
|
+
}
|
|
94
|
+
</VisuallyHidden>
|
|
86
95
|
</Button>
|
|
87
96
|
</div>
|
|
88
97
|
<HStack
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
.edit-site-site-icon__icon {
|
|
2
2
|
fill: currentColor;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
3
5
|
|
|
4
6
|
.edit-site-layout.is-full-canvas & {
|
|
5
7
|
// Make the WordPress icon not so big in full canvas.
|
|
6
|
-
padding: $grid-unit-15
|
|
8
|
+
padding: $grid-unit-15;
|
|
7
9
|
}
|
|
8
10
|
}
|
|
9
11
|
|
|
@@ -12,6 +14,7 @@
|
|
|
12
14
|
height: 100%;
|
|
13
15
|
object-fit: cover;
|
|
14
16
|
background: #333;
|
|
17
|
+
aspect-ratio: 1 / 1;
|
|
15
18
|
|
|
16
19
|
.edit-site-layout.is-full-canvas & {
|
|
17
20
|
border-radius: 0;
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
import { __, sprintf } from '@wordpress/i18n';
|
|
14
14
|
import {
|
|
15
15
|
getCategories,
|
|
16
|
+
getBlockType,
|
|
16
17
|
getBlockTypes,
|
|
17
18
|
getBlockFromExample,
|
|
18
19
|
createBlock,
|
|
@@ -128,37 +129,7 @@ function isObjectEmpty( object ) {
|
|
|
128
129
|
}
|
|
129
130
|
|
|
130
131
|
function getExamples() {
|
|
131
|
-
|
|
132
|
-
// heading levels.
|
|
133
|
-
const headingsExample = {
|
|
134
|
-
name: 'core/heading',
|
|
135
|
-
title: __( 'Headings' ),
|
|
136
|
-
category: 'text',
|
|
137
|
-
blocks: [
|
|
138
|
-
createBlock( 'core/heading', {
|
|
139
|
-
content: __( 'Code Is Poetry' ),
|
|
140
|
-
level: 1,
|
|
141
|
-
} ),
|
|
142
|
-
createBlock( 'core/heading', {
|
|
143
|
-
content: __( 'Code Is Poetry' ),
|
|
144
|
-
level: 2,
|
|
145
|
-
} ),
|
|
146
|
-
createBlock( 'core/heading', {
|
|
147
|
-
content: __( 'Code Is Poetry' ),
|
|
148
|
-
level: 3,
|
|
149
|
-
} ),
|
|
150
|
-
createBlock( 'core/heading', {
|
|
151
|
-
content: __( 'Code Is Poetry' ),
|
|
152
|
-
level: 4,
|
|
153
|
-
} ),
|
|
154
|
-
createBlock( 'core/heading', {
|
|
155
|
-
content: __( 'Code Is Poetry' ),
|
|
156
|
-
level: 5,
|
|
157
|
-
} ),
|
|
158
|
-
],
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
const otherExamples = getBlockTypes()
|
|
132
|
+
const nonHeadingBlockExamples = getBlockTypes()
|
|
162
133
|
.filter( ( blockType ) => {
|
|
163
134
|
const { name, example, supports } = blockType;
|
|
164
135
|
return (
|
|
@@ -174,7 +145,31 @@ function getExamples() {
|
|
|
174
145
|
blocks: getBlockFromExample( blockType.name, blockType.example ),
|
|
175
146
|
} ) );
|
|
176
147
|
|
|
177
|
-
|
|
148
|
+
const isHeadingBlockRegistered = !! getBlockType( 'core/heading' );
|
|
149
|
+
|
|
150
|
+
if ( ! isHeadingBlockRegistered ) {
|
|
151
|
+
return nonHeadingBlockExamples;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// Use our own example for the Heading block so that we can show multiple
|
|
155
|
+
// heading levels.
|
|
156
|
+
const headingsExample = {
|
|
157
|
+
name: 'core/heading',
|
|
158
|
+
title: __( 'Headings' ),
|
|
159
|
+
category: 'text',
|
|
160
|
+
blocks: [ 1, 2, 3, 4, 5, 6 ].map( ( level ) => {
|
|
161
|
+
return createBlock( 'core/heading', {
|
|
162
|
+
content: sprintf(
|
|
163
|
+
// translators: %d: heading level e.g: "1", "2", "3"
|
|
164
|
+
__( 'Heading %d' ),
|
|
165
|
+
level
|
|
166
|
+
),
|
|
167
|
+
level,
|
|
168
|
+
} );
|
|
169
|
+
} ),
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
return [ headingsExample, ...nonHeadingBlockExamples ];
|
|
178
173
|
}
|
|
179
174
|
|
|
180
175
|
function StyleBook( {
|
|
@@ -90,6 +90,11 @@ function useResolveEditedEntityAndContext( { postId, postType } ) {
|
|
|
90
90
|
return undefined;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
// Don't trigger resolution for multi-selected posts.
|
|
94
|
+
if ( postId && postId.includes( ',' ) ) {
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
|
|
93
98
|
const {
|
|
94
99
|
getEditedEntityRecord,
|
|
95
100
|
getEntityRecords,
|
|
@@ -26,7 +26,6 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
26
26
|
*/
|
|
27
27
|
import { useSupportedStyles } from '../../components/global-styles/hooks';
|
|
28
28
|
import { unlock } from '../../lock-unlock';
|
|
29
|
-
import cloneDeep from '../../utils/clone-deep';
|
|
30
29
|
import setNestedValue from '../../utils/set-nested-value';
|
|
31
30
|
|
|
32
31
|
const { cleanEmptyObject, GlobalStylesContext } = unlock(
|
|
@@ -259,8 +258,8 @@ function PushChangesToGlobalStylesControl( {
|
|
|
259
258
|
if ( changes.length > 0 ) {
|
|
260
259
|
const { style: blockStyles } = attributes;
|
|
261
260
|
|
|
262
|
-
const newBlockStyles =
|
|
263
|
-
const newUserConfig =
|
|
261
|
+
const newBlockStyles = structuredClone( blockStyles );
|
|
262
|
+
const newUserConfig = structuredClone( userConfig );
|
|
264
263
|
|
|
265
264
|
for ( const { path, value } of changes ) {
|
|
266
265
|
setNestedValue( newBlockStyles, path, undefined );
|
|
@@ -375,7 +374,7 @@ function PushChangesToGlobalStyles( props ) {
|
|
|
375
374
|
const withPushChangesToGlobalStyles = createHigherOrderComponent(
|
|
376
375
|
( BlockEdit ) => ( props ) => (
|
|
377
376
|
<>
|
|
378
|
-
<BlockEdit { ...props } />
|
|
377
|
+
<BlockEdit key="edit" { ...props } />
|
|
379
378
|
{ props.isSelected && <PushChangesToGlobalStyles { ...props } /> }
|
|
380
379
|
</>
|
|
381
380
|
)
|
|
@@ -11,7 +11,6 @@ import { __ } from '@wordpress/i18n';
|
|
|
11
11
|
/**
|
|
12
12
|
* Internal dependencies
|
|
13
13
|
*/
|
|
14
|
-
import cloneDeep from '../../utils/clone-deep';
|
|
15
14
|
import { unlock } from '../../lock-unlock';
|
|
16
15
|
|
|
17
16
|
const { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(
|
|
@@ -91,7 +90,7 @@ export function useCurrentMergeThemeStyleVariationsWithUserConfig(
|
|
|
91
90
|
const propertiesAsString = properties.toString();
|
|
92
91
|
|
|
93
92
|
return useMemo( () => {
|
|
94
|
-
const clonedUserVariation =
|
|
93
|
+
const clonedUserVariation = structuredClone( userVariation );
|
|
95
94
|
|
|
96
95
|
// Get user variation and remove the settings for the given property.
|
|
97
96
|
const userVariationWithoutProperties = removePropertiesFromObject(
|
|
@@ -167,7 +166,7 @@ export const filterObjectByProperties = ( object, properties ) => {
|
|
|
167
166
|
*/
|
|
168
167
|
export function isVariationWithProperties( variation, properties ) {
|
|
169
168
|
const variationWithProperties = filterObjectByProperties(
|
|
170
|
-
|
|
169
|
+
structuredClone( variation ),
|
|
171
170
|
properties
|
|
172
171
|
);
|
|
173
172
|
|
package/src/index.js
CHANGED
|
@@ -28,7 +28,10 @@ import { store as editSiteStore } from './store';
|
|
|
28
28
|
import { unlock } from './lock-unlock';
|
|
29
29
|
import App from './components/app';
|
|
30
30
|
|
|
31
|
-
const {
|
|
31
|
+
const {
|
|
32
|
+
registerCoreBlockBindingsSources,
|
|
33
|
+
bootstrapBlockBindingsSourcesFromServer,
|
|
34
|
+
} = unlock( editorPrivateApis );
|
|
32
35
|
|
|
33
36
|
/**
|
|
34
37
|
* Initializes the site editor screen.
|
|
@@ -45,6 +48,8 @@ export function initializeEditor( id, settings ) {
|
|
|
45
48
|
( { name } ) => name !== 'core/freeform'
|
|
46
49
|
);
|
|
47
50
|
registerCoreBlocks( coreBlocks );
|
|
51
|
+
bootstrapBlockBindingsSourcesFromServer( settings?.blockBindingsSources );
|
|
52
|
+
registerCoreBlockBindingsSources();
|
|
48
53
|
dispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );
|
|
49
54
|
registerLegacyWidgetBlock( { inserter: false } );
|
|
50
55
|
registerWidgetGroupBlock( { inserter: false } );
|
|
@@ -53,7 +58,6 @@ export function initializeEditor( id, settings ) {
|
|
|
53
58
|
enableFSEBlocks: true,
|
|
54
59
|
} );
|
|
55
60
|
}
|
|
56
|
-
registerDefaultActions();
|
|
57
61
|
|
|
58
62
|
// We dispatch actions and update the store synchronously before rendering
|
|
59
63
|
// so that we won't trigger unnecessary re-renders with useEffect.
|
package/src/posts.scss
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
@import "./components/site-hub/style.scss";
|
|
8
8
|
@import "./components/site-icon/style.scss";
|
|
9
9
|
@import "./components/editor-canvas-container/style.scss";
|
|
10
|
-
@import "./components/
|
|
10
|
+
@import "./components/post-list/style.scss";
|
|
11
11
|
@import "./components/resizable-frame/style.scss";
|
|
12
12
|
|
|
13
13
|
@include wordpress-admin-schemes();
|