@wordpress/edit-site 6.1.0 → 6.3.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 +10 -6
- package/build/components/add-new-pattern/index.js +31 -16
- package/build/components/add-new-pattern/index.js.map +1 -1
- package/build/components/{add-new-page → add-new-post}/index.js +28 -16
- package/build/components/add-new-post/index.js.map +1 -0
- package/build/components/block-editor/use-site-editor-settings.js +5 -3
- package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build/components/editor/index.js +32 -7
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor-canvas-container/index.js +18 -7
- package/build/components/editor-canvas-container/index.js.map +1 -1
- package/build/components/global-styles/background-panel.js +0 -5
- package/build/components/global-styles/background-panel.js.map +1 -1
- package/build/components/global-styles/font-families.js +17 -17
- package/build/components/global-styles/font-families.js.map +1 -1
- package/build/components/global-styles/font-library-modal/context.js +2 -2
- package/build/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-collection.js +13 -30
- package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build/components/global-styles/font-library-modal/installed-fonts.js +2 -2
- package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build/components/global-styles/hooks.js +0 -40
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/preview-typography.js +47 -0
- package/build/components/global-styles/preview-typography.js.map +1 -0
- package/build/components/global-styles/screen-block.js +14 -0
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-layout.js +5 -1
- package/build/components/global-styles/screen-layout.js.map +1 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
- package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build/components/global-styles/shadows-edit-panel.js +1 -2
- package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
- package/build/components/global-styles/style-variations-container.js +5 -5
- package/build/components/global-styles/style-variations-container.js.map +1 -1
- package/build/components/global-styles/typography-elements.js +0 -2
- package/build/components/global-styles/typography-elements.js.map +1 -1
- package/build/components/global-styles/variations/variation.js +28 -22
- package/build/components/global-styles/variations/variation.js.map +1 -1
- package/build/components/global-styles/variations/variations-color.js +5 -3
- package/build/components/global-styles/variations/variations-color.js.map +1 -1
- package/build/components/global-styles/variations/variations-typography.js +14 -27
- package/build/components/global-styles/variations/variations-typography.js.map +1 -1
- package/build/components/global-styles-sidebar/index.js +2 -2
- package/build/components/global-styles-sidebar/index.js.map +1 -1
- package/build/components/layout/index.js +16 -8
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/router.js +20 -41
- package/build/components/layout/router.js.map +1 -1
- package/build/components/page-patterns/index.js +51 -41
- package/build/components/page-patterns/index.js.map +1 -1
- package/build/components/page-patterns/rename-category-menu-item.js +3 -1
- package/build/components/page-patterns/rename-category-menu-item.js.map +1 -1
- package/build/components/page-patterns/search-items.js +29 -4
- package/build/components/page-patterns/search-items.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +22 -55
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/page-templates/index.js +27 -21
- package/build/components/page-templates/index.js.map +1 -1
- package/build/components/pagination/index.js +4 -4
- package/build/components/pagination/index.js.map +1 -1
- package/build/components/posts-app/index.js +11 -17
- package/build/components/posts-app/index.js.map +1 -1
- package/build/components/{page-pages/index.js → posts-app/posts-list.js} +165 -38
- package/build/components/posts-app/posts-list.js.map +1 -0
- package/build/components/posts-app/router.js +85 -0
- package/build/components/posts-app/router.js.map +1 -0
- package/build/components/revisions/index.js +10 -7
- package/build/components/revisions/index.js.map +1 -1
- package/build/components/save-panel/index.js +1 -1
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/sidebar-dataviews/add-new-view.js +4 -1
- package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
- package/build/components/sidebar-dataviews/custom-dataviews-list.js +6 -2
- package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
- package/build/components/sidebar-dataviews/default-views.js +98 -84
- package/build/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build/components/sidebar-dataviews/index.js +4 -1
- package/build/components/sidebar-dataviews/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/index.js +3 -3
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +5 -2
- package/build/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +3 -2
- package/build/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
- package/build/components/site-hub/index.js +81 -1
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +3 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build/deprecated.js +11 -0
- package/build/deprecated.js.map +1 -1
- package/build/hooks/commands/use-set-command-context.js +11 -0
- package/build/hooks/commands/use-set-command-context.js.map +1 -1
- package/build/hooks/push-changes-to-global-styles/index.js +1 -1
- 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 +65 -42
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build/index.js +6 -0
- package/build/index.js.map +1 -1
- package/build/lock-unlock.js +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/posts.js +57 -2
- package/build/posts.js.map +1 -1
- package/build/store/private-actions.js +7 -2
- package/build/store/private-actions.js.map +1 -1
- package/build-module/components/add-new-pattern/index.js +31 -16
- package/build-module/components/add-new-pattern/index.js.map +1 -1
- package/build-module/components/{add-new-page → add-new-post}/index.js +28 -16
- package/build-module/components/add-new-post/index.js.map +1 -0
- package/build-module/components/block-editor/use-site-editor-settings.js +5 -3
- package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build-module/components/editor/index.js +33 -8
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor-canvas-container/index.js +19 -8
- package/build-module/components/editor-canvas-container/index.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +0 -5
- package/build-module/components/global-styles/background-panel.js.map +1 -1
- package/build-module/components/global-styles/font-families.js +18 -18
- package/build-module/components/global-styles/font-families.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/context.js +2 -2
- 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 +14 -31
- package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js +2 -2
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +0 -38
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/preview-typography.js +39 -0
- package/build-module/components/global-styles/preview-typography.js.map +1 -0
- package/build-module/components/global-styles/screen-block.js +15 -0
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-layout.js +5 -1
- package/build-module/components/global-styles/screen-layout.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -1
- package/build-module/components/global-styles/shadows-edit-panel.js +1 -2
- package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
- package/build-module/components/global-styles/style-variations-container.js +6 -6
- package/build-module/components/global-styles/style-variations-container.js.map +1 -1
- package/build-module/components/global-styles/typography-elements.js +0 -2
- package/build-module/components/global-styles/typography-elements.js.map +1 -1
- package/build-module/components/global-styles/variations/variation.js +29 -23
- package/build-module/components/global-styles/variations/variation.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-color.js +5 -3
- package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-typography.js +16 -28
- package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
- package/build-module/components/global-styles-sidebar/index.js +2 -2
- package/build-module/components/global-styles-sidebar/index.js.map +1 -1
- package/build-module/components/layout/index.js +14 -8
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/router.js +20 -41
- package/build-module/components/layout/router.js.map +1 -1
- package/build-module/components/page-patterns/index.js +52 -42
- package/build-module/components/page-patterns/index.js.map +1 -1
- package/build-module/components/page-patterns/rename-category-menu-item.js +3 -1
- package/build-module/components/page-patterns/rename-category-menu-item.js.map +1 -1
- package/build-module/components/page-patterns/search-items.js +28 -4
- package/build-module/components/page-patterns/search-items.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +23 -56
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/page-templates/index.js +27 -21
- package/build-module/components/page-templates/index.js.map +1 -1
- package/build-module/components/pagination/index.js +4 -4
- package/build-module/components/pagination/index.js.map +1 -1
- package/build-module/components/posts-app/index.js +11 -17
- package/build-module/components/posts-app/index.js.map +1 -1
- package/build-module/components/{page-pages/index.js → posts-app/posts-list.js} +164 -37
- package/build-module/components/posts-app/posts-list.js.map +1 -0
- package/build-module/components/posts-app/router.js +77 -0
- package/build-module/components/posts-app/router.js.map +1 -0
- package/build-module/components/revisions/index.js +10 -7
- package/build-module/components/revisions/index.js.map +1 -1
- package/build-module/components/save-panel/index.js +1 -1
- package/build-module/components/save-panel/index.js.map +1 -1
- package/build-module/components/sidebar-dataviews/add-new-view.js +4 -1
- package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
- package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +6 -2
- package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
- package/build-module/components/sidebar-dataviews/default-views.js +97 -84
- package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build-module/components/sidebar-dataviews/index.js +5 -2
- package/build-module/components/sidebar-dataviews/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +3 -3
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +5 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menu/rename-modal.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +3 -2
- package/build-module/components/sidebar-navigation-screen-patterns/use-pattern-categories.js.map +1 -1
- package/build-module/components/site-hub/index.js +81 -1
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +3 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build-module/deprecated.js +11 -0
- package/build-module/deprecated.js.map +1 -1
- package/build-module/hooks/commands/use-set-command-context.js +11 -0
- package/build-module/hooks/commands/use-set-command-context.js.map +1 -1
- package/build-module/hooks/push-changes-to-global-styles/index.js +1 -1
- 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 +61 -38
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build-module/index.js +7 -2
- package/build-module/index.js.map +1 -1
- package/build-module/lock-unlock.js +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/posts.js +57 -2
- package/build-module/posts.js.map +1 -1
- package/build-module/store/private-actions.js +7 -2
- package/build-module/store/private-actions.js.map +1 -1
- package/build-style/posts-rtl.css +108 -28
- package/build-style/posts.css +108 -28
- package/build-style/style-rtl.css +127 -157
- package/build-style/style.css +127 -157
- package/lib/inflate.js +3188 -3937
- package/lib/lib-font.browser.js +32 -2
- package/lib/unbrotli.js +1818 -2458
- package/package.json +41 -41
- package/src/components/add-new-pattern/index.js +38 -23
- package/src/components/{add-new-page → add-new-post}/index.js +42 -18
- package/src/components/block-editor/style.scss +0 -11
- package/src/components/block-editor/use-site-editor-settings.js +33 -28
- package/src/components/editor/index.js +34 -20
- package/src/components/editor-canvas-container/index.js +20 -8
- package/src/components/global-styles/background-panel.js +0 -8
- package/src/components/global-styles/font-families.js +28 -19
- package/src/components/global-styles/font-library-modal/context.js +2 -2
- package/src/components/global-styles/font-library-modal/font-collection.js +17 -32
- package/src/components/global-styles/font-library-modal/installed-fonts.js +2 -2
- package/src/components/global-styles/font-library-modal/style.scss +17 -10
- package/src/components/global-styles/hooks.js +0 -41
- package/src/components/global-styles/preview-typography.js +39 -0
- package/src/components/global-styles/screen-block.js +22 -0
- package/src/components/global-styles/screen-layout.js +5 -1
- package/src/components/global-styles/screen-revisions/revisions-buttons.js +1 -1
- package/src/components/global-styles/shadows-edit-panel.js +1 -2
- package/src/components/global-styles/style-variations-container.js +10 -7
- package/src/components/global-styles/style.scss +2 -1
- package/src/components/global-styles/typography-elements.js +0 -4
- package/src/components/global-styles/variations/variation.js +41 -26
- package/src/components/global-styles/variations/variations-color.js +6 -3
- package/src/components/global-styles/variations/variations-typography.js +16 -32
- package/src/components/global-styles-sidebar/index.js +2 -2
- package/src/components/layout/index.js +13 -4
- package/src/components/layout/router.js +20 -36
- package/src/components/layout/style.scss +12 -0
- package/src/components/page-patterns/index.js +55 -58
- package/src/components/page-patterns/rename-category-menu-item.js +2 -0
- package/src/components/page-patterns/search-items.js +37 -3
- package/src/components/page-patterns/style.scss +1 -8
- package/src/components/page-patterns/use-patterns.js +43 -82
- package/src/components/page-templates/index.js +26 -21
- package/src/components/page-templates/style.scss +1 -6
- package/src/components/pagination/index.js +4 -4
- package/src/components/posts-app/index.js +9 -11
- package/src/components/{page-pages/index.js → posts-app/posts-list.js} +163 -42
- package/src/components/posts-app/router.js +69 -0
- package/src/components/{page-pages → posts-app}/style.scss +22 -8
- package/src/components/revisions/index.js +9 -1
- package/src/components/save-panel/index.js +1 -1
- package/src/components/sidebar/style.scss +6 -0
- package/src/components/sidebar-dataviews/add-new-view.js +2 -1
- package/src/components/sidebar-dataviews/custom-dataviews-list.js +6 -2
- package/src/components/sidebar-dataviews/default-views.js +119 -98
- package/src/components/sidebar-dataviews/index.js +3 -3
- package/src/components/sidebar-navigation-screen-global-styles/index.js +7 -6
- package/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js +8 -2
- package/src/components/sidebar-navigation-screen-patterns/use-pattern-categories.js +10 -2
- package/src/components/site-hub/index.js +84 -1
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +3 -2
- package/src/deprecated.js +14 -0
- package/src/hooks/commands/use-set-command-context.js +12 -0
- package/src/hooks/push-changes-to-global-styles/index.js +1 -1
- package/src/hooks/use-theme-style-variations/test/use-theme-style-variations-by-property.js +28 -24
- package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +72 -47
- package/src/index.js +8 -1
- package/src/lock-unlock.js +1 -1
- package/src/posts.js +63 -2
- package/src/posts.scss +9 -0
- package/src/store/private-actions.js +7 -3
- package/src/style.scss +14 -2
- package/build/components/add-new-page/index.js.map +0 -1
- package/build/components/page-pages/index.js.map +0 -1
- package/build/components/table/index.js +0 -35
- package/build/components/table/index.js.map +0 -1
- package/build-module/components/add-new-page/index.js.map +0 -1
- package/build-module/components/page-pages/index.js.map +0 -1
- package/build-module/components/table/index.js +0 -30
- package/build-module/components/table/index.js.map +0 -1
- package/src/components/table/index.js +0 -33
- package/src/components/table/style.scss +0 -38
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-site",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "Edit Site Page module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -29,45 +29,45 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@babel/runtime": "^7.16.0",
|
|
31
31
|
"@react-spring/web": "^9.4.5",
|
|
32
|
-
"@wordpress/a11y": "^4.
|
|
33
|
-
"@wordpress/api-fetch": "^7.
|
|
34
|
-
"@wordpress/blob": "^4.
|
|
35
|
-
"@wordpress/block-editor": "^13.
|
|
36
|
-
"@wordpress/block-library": "^9.
|
|
37
|
-
"@wordpress/blocks": "^13.
|
|
38
|
-
"@wordpress/commands": "^1.
|
|
39
|
-
"@wordpress/components": "^28.
|
|
40
|
-
"@wordpress/compose": "^7.
|
|
41
|
-
"@wordpress/core-commands": "^1.
|
|
42
|
-
"@wordpress/core-data": "^7.
|
|
43
|
-
"@wordpress/data": "^10.
|
|
44
|
-
"@wordpress/dataviews": "^
|
|
45
|
-
"@wordpress/date": "^5.
|
|
46
|
-
"@wordpress/deprecated": "^4.
|
|
47
|
-
"@wordpress/dom": "^4.
|
|
48
|
-
"@wordpress/editor": "^14.
|
|
49
|
-
"@wordpress/element": "^6.
|
|
50
|
-
"@wordpress/escape-html": "^3.
|
|
51
|
-
"@wordpress/hooks": "^4.
|
|
52
|
-
"@wordpress/html-entities": "^4.
|
|
53
|
-
"@wordpress/i18n": "^5.
|
|
54
|
-
"@wordpress/icons": "^10.
|
|
55
|
-
"@wordpress/keyboard-shortcuts": "^5.
|
|
56
|
-
"@wordpress/keycodes": "^4.
|
|
57
|
-
"@wordpress/notices": "^5.
|
|
58
|
-
"@wordpress/patterns": "^2.
|
|
59
|
-
"@wordpress/plugins": "^7.
|
|
60
|
-
"@wordpress/preferences": "^4.
|
|
61
|
-
"@wordpress/primitives": "^4.
|
|
62
|
-
"@wordpress/priority-queue": "^3.
|
|
63
|
-
"@wordpress/private-apis": "^1.
|
|
64
|
-
"@wordpress/reusable-blocks": "^5.
|
|
65
|
-
"@wordpress/router": "^1.
|
|
66
|
-
"@wordpress/style-engine": "^2.
|
|
67
|
-
"@wordpress/url": "^4.
|
|
68
|
-
"@wordpress/viewport": "^6.
|
|
69
|
-
"@wordpress/widgets": "^4.
|
|
70
|
-
"@wordpress/wordcount": "^4.
|
|
32
|
+
"@wordpress/a11y": "^4.3.0",
|
|
33
|
+
"@wordpress/api-fetch": "^7.3.0",
|
|
34
|
+
"@wordpress/blob": "^4.3.0",
|
|
35
|
+
"@wordpress/block-editor": "^13.3.0",
|
|
36
|
+
"@wordpress/block-library": "^9.3.0",
|
|
37
|
+
"@wordpress/blocks": "^13.3.0",
|
|
38
|
+
"@wordpress/commands": "^1.3.0",
|
|
39
|
+
"@wordpress/components": "^28.3.0",
|
|
40
|
+
"@wordpress/compose": "^7.3.0",
|
|
41
|
+
"@wordpress/core-commands": "^1.3.0",
|
|
42
|
+
"@wordpress/core-data": "^7.3.0",
|
|
43
|
+
"@wordpress/data": "^10.3.0",
|
|
44
|
+
"@wordpress/dataviews": "^3.0.0",
|
|
45
|
+
"@wordpress/date": "^5.3.0",
|
|
46
|
+
"@wordpress/deprecated": "^4.3.0",
|
|
47
|
+
"@wordpress/dom": "^4.3.0",
|
|
48
|
+
"@wordpress/editor": "^14.3.0",
|
|
49
|
+
"@wordpress/element": "^6.3.0",
|
|
50
|
+
"@wordpress/escape-html": "^3.3.0",
|
|
51
|
+
"@wordpress/hooks": "^4.3.0",
|
|
52
|
+
"@wordpress/html-entities": "^4.3.0",
|
|
53
|
+
"@wordpress/i18n": "^5.3.0",
|
|
54
|
+
"@wordpress/icons": "^10.3.0",
|
|
55
|
+
"@wordpress/keyboard-shortcuts": "^5.3.0",
|
|
56
|
+
"@wordpress/keycodes": "^4.3.0",
|
|
57
|
+
"@wordpress/notices": "^5.3.0",
|
|
58
|
+
"@wordpress/patterns": "^2.3.0",
|
|
59
|
+
"@wordpress/plugins": "^7.3.0",
|
|
60
|
+
"@wordpress/preferences": "^4.3.0",
|
|
61
|
+
"@wordpress/primitives": "^4.3.0",
|
|
62
|
+
"@wordpress/priority-queue": "^3.3.0",
|
|
63
|
+
"@wordpress/private-apis": "^1.3.0",
|
|
64
|
+
"@wordpress/reusable-blocks": "^5.3.0",
|
|
65
|
+
"@wordpress/router": "^1.3.0",
|
|
66
|
+
"@wordpress/style-engine": "^2.3.0",
|
|
67
|
+
"@wordpress/url": "^4.3.0",
|
|
68
|
+
"@wordpress/viewport": "^6.3.0",
|
|
69
|
+
"@wordpress/widgets": "^4.3.0",
|
|
70
|
+
"@wordpress/wordcount": "^4.3.0",
|
|
71
71
|
"change-case": "^4.1.2",
|
|
72
72
|
"clsx": "^2.1.1",
|
|
73
73
|
"colord": "^2.9.2",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"access": "public"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "122867d355ca4edc63d3a3bbd9411d3a2e1458df"
|
|
86
86
|
}
|
|
@@ -36,21 +36,30 @@ export default function AddNewPattern() {
|
|
|
36
36
|
const [ showPatternModal, setShowPatternModal ] = useState( false );
|
|
37
37
|
const [ showTemplatePartModal, setShowTemplatePartModal ] =
|
|
38
38
|
useState( false );
|
|
39
|
+
// eslint-disable-next-line @wordpress/no-unused-vars-before-return
|
|
39
40
|
const { createPatternFromFile } = unlock( useDispatch( patternsStore ) );
|
|
40
41
|
const { createSuccessNotice, createErrorNotice } =
|
|
41
42
|
useDispatch( noticesStore );
|
|
42
43
|
const patternUploadInputRef = useRef();
|
|
43
|
-
const {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
const {
|
|
45
|
+
isBlockBasedTheme,
|
|
46
|
+
addNewPatternLabel,
|
|
47
|
+
addNewTemplatePartLabel,
|
|
48
|
+
canCreatePattern,
|
|
49
|
+
canCreateTemplatePart,
|
|
50
|
+
} = useSelect( ( select ) => {
|
|
51
|
+
const { getCurrentTheme, getPostType, canUser } = select( coreStore );
|
|
52
|
+
return {
|
|
53
|
+
isBlockBasedTheme: getCurrentTheme()?.is_block_theme,
|
|
54
|
+
addNewPatternLabel: getPostType( PATTERN_TYPES.user )?.labels
|
|
55
|
+
?.add_new_item,
|
|
56
|
+
addNewTemplatePartLabel: getPostType( TEMPLATE_PART_POST_TYPE )
|
|
57
|
+
?.labels?.add_new_item,
|
|
58
|
+
// Blocks refers to the wp_block post type, this checks the ability to create a post of that type.
|
|
59
|
+
canCreatePattern: canUser( 'create', 'blocks' ),
|
|
60
|
+
canCreateTemplatePart: canUser( 'create', 'template-parts' ),
|
|
61
|
+
};
|
|
62
|
+
}, [] );
|
|
54
63
|
|
|
55
64
|
function handleCreatePattern( { pattern } ) {
|
|
56
65
|
setShowPatternModal( false );
|
|
@@ -78,15 +87,16 @@ export default function AddNewPattern() {
|
|
|
78
87
|
setShowTemplatePartModal( false );
|
|
79
88
|
}
|
|
80
89
|
|
|
81
|
-
const controls = [
|
|
82
|
-
|
|
90
|
+
const controls = [];
|
|
91
|
+
if ( canCreatePattern ) {
|
|
92
|
+
controls.push( {
|
|
83
93
|
icon: symbol,
|
|
84
94
|
onClick: () => setShowPatternModal( true ),
|
|
85
95
|
title: addNewPatternLabel,
|
|
86
|
-
}
|
|
87
|
-
|
|
96
|
+
} );
|
|
97
|
+
}
|
|
88
98
|
|
|
89
|
-
if ( isBlockBasedTheme ) {
|
|
99
|
+
if ( isBlockBasedTheme && canCreateTemplatePart ) {
|
|
90
100
|
controls.push( {
|
|
91
101
|
icon: symbolFilled,
|
|
92
102
|
onClick: () => setShowTemplatePartModal( true ),
|
|
@@ -94,15 +104,20 @@ export default function AddNewPattern() {
|
|
|
94
104
|
} );
|
|
95
105
|
}
|
|
96
106
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
107
|
+
if ( canCreatePattern ) {
|
|
108
|
+
controls.push( {
|
|
109
|
+
icon: upload,
|
|
110
|
+
onClick: () => {
|
|
111
|
+
patternUploadInputRef.current.click();
|
|
112
|
+
},
|
|
113
|
+
title: __( 'Import pattern from JSON' ),
|
|
114
|
+
} );
|
|
115
|
+
}
|
|
104
116
|
|
|
105
117
|
const { categoryMap, findOrCreateTerm } = useAddPatternCategory();
|
|
118
|
+
if ( controls.length === 0 ) {
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
106
121
|
return (
|
|
107
122
|
<>
|
|
108
123
|
{ addNewPatternLabel && (
|
|
@@ -9,35 +9,53 @@ import {
|
|
|
9
9
|
TextControl,
|
|
10
10
|
} from '@wordpress/components';
|
|
11
11
|
import { __, sprintf } from '@wordpress/i18n';
|
|
12
|
-
import { useDispatch } from '@wordpress/data';
|
|
12
|
+
import { useDispatch, useRegistry, useSelect } from '@wordpress/data';
|
|
13
13
|
import { useState } from '@wordpress/element';
|
|
14
14
|
import { store as coreStore } from '@wordpress/core-data';
|
|
15
15
|
import { store as noticesStore } from '@wordpress/notices';
|
|
16
16
|
import { decodeEntities } from '@wordpress/html-entities';
|
|
17
|
+
import { serialize, synchronizeBlocksWithTemplate } from '@wordpress/blocks';
|
|
17
18
|
|
|
18
|
-
export default function
|
|
19
|
-
const
|
|
19
|
+
export default function AddNewPostModal( { postType, onSave, onClose } ) {
|
|
20
|
+
const labels = useSelect(
|
|
21
|
+
( select ) => select( coreStore ).getPostType( postType )?.labels,
|
|
22
|
+
[ postType ]
|
|
23
|
+
);
|
|
24
|
+
const [ isCreatingPost, setIsCreatingPost ] = useState( false );
|
|
20
25
|
const [ title, setTitle ] = useState( '' );
|
|
21
26
|
|
|
22
27
|
const { saveEntityRecord } = useDispatch( coreStore );
|
|
23
28
|
const { createErrorNotice, createSuccessNotice } =
|
|
24
29
|
useDispatch( noticesStore );
|
|
30
|
+
const { resolveSelect } = useRegistry();
|
|
25
31
|
|
|
26
|
-
async function
|
|
32
|
+
async function createPost( event ) {
|
|
27
33
|
event.preventDefault();
|
|
28
34
|
|
|
29
|
-
if (
|
|
35
|
+
if ( isCreatingPost ) {
|
|
30
36
|
return;
|
|
31
37
|
}
|
|
32
|
-
|
|
38
|
+
setIsCreatingPost( true );
|
|
33
39
|
try {
|
|
40
|
+
const postTypeObject =
|
|
41
|
+
await resolveSelect( coreStore ).getPostType( postType );
|
|
34
42
|
const newPage = await saveEntityRecord(
|
|
35
43
|
'postType',
|
|
36
|
-
|
|
44
|
+
postType,
|
|
37
45
|
{
|
|
38
46
|
status: 'draft',
|
|
39
47
|
title,
|
|
40
48
|
slug: title || __( 'No title' ),
|
|
49
|
+
content:
|
|
50
|
+
!! postTypeObject.template &&
|
|
51
|
+
postTypeObject.template.length
|
|
52
|
+
? serialize(
|
|
53
|
+
synchronizeBlocksWithTemplate(
|
|
54
|
+
[],
|
|
55
|
+
postTypeObject.template
|
|
56
|
+
)
|
|
57
|
+
)
|
|
58
|
+
: undefined,
|
|
41
59
|
},
|
|
42
60
|
{ throwOnError: true }
|
|
43
61
|
);
|
|
@@ -46,35 +64,41 @@ export default function AddNewPageModal( { onSave, onClose } ) {
|
|
|
46
64
|
|
|
47
65
|
createSuccessNotice(
|
|
48
66
|
sprintf(
|
|
49
|
-
// translators: %s: Title of the created
|
|
67
|
+
// translators: %s: Title of the created post e.g: "Hello world".
|
|
50
68
|
__( '"%s" successfully created.' ),
|
|
51
69
|
decodeEntities( newPage.title?.rendered || title )
|
|
52
70
|
),
|
|
53
|
-
{
|
|
54
|
-
type: 'snackbar',
|
|
55
|
-
}
|
|
71
|
+
{ type: 'snackbar' }
|
|
56
72
|
);
|
|
57
73
|
} catch ( error ) {
|
|
58
74
|
const errorMessage =
|
|
59
75
|
error.message && error.code !== 'unknown_error'
|
|
60
76
|
? error.message
|
|
61
|
-
: __( 'An error occurred while creating the
|
|
77
|
+
: __( 'An error occurred while creating the item.' );
|
|
62
78
|
|
|
63
79
|
createErrorNotice( errorMessage, {
|
|
64
80
|
type: 'snackbar',
|
|
65
81
|
} );
|
|
66
82
|
} finally {
|
|
67
|
-
|
|
83
|
+
setIsCreatingPost( false );
|
|
68
84
|
}
|
|
69
85
|
}
|
|
70
86
|
|
|
71
87
|
return (
|
|
72
|
-
<Modal
|
|
73
|
-
|
|
88
|
+
<Modal
|
|
89
|
+
title={
|
|
90
|
+
// translators: %s: post type singular_name label e.g: "Page".
|
|
91
|
+
sprintf( __( 'Draft new: %s' ), labels?.singular_name )
|
|
92
|
+
}
|
|
93
|
+
onRequestClose={ onClose }
|
|
94
|
+
focusOnMount="firstContentElement"
|
|
95
|
+
size="small"
|
|
96
|
+
>
|
|
97
|
+
<form onSubmit={ createPost }>
|
|
74
98
|
<VStack spacing={ 3 }>
|
|
75
99
|
<TextControl
|
|
76
100
|
__next40pxDefaultSize
|
|
77
|
-
label={ __( '
|
|
101
|
+
label={ __( 'Title' ) }
|
|
78
102
|
onChange={ setTitle }
|
|
79
103
|
placeholder={ __( 'No title' ) }
|
|
80
104
|
value={ title }
|
|
@@ -91,8 +115,8 @@ export default function AddNewPageModal( { onSave, onClose } ) {
|
|
|
91
115
|
__next40pxDefaultSize
|
|
92
116
|
variant="primary"
|
|
93
117
|
type="submit"
|
|
94
|
-
isBusy={
|
|
95
|
-
aria-disabled={
|
|
118
|
+
isBusy={ isCreatingPost }
|
|
119
|
+
aria-disabled={ isCreatingPost }
|
|
96
120
|
>
|
|
97
121
|
{ __( 'Create draft' ) }
|
|
98
122
|
</Button>
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
/* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
|
|
2
|
-
::view-transition-old(frame),
|
|
3
|
-
::view-transition-new(frame) {
|
|
4
|
-
animation-duration: 0;
|
|
5
|
-
}
|
|
6
|
-
/* stylelint-enable */
|
|
7
|
-
|
|
8
1
|
.edit-site-visual-editor__editor-canvas {
|
|
9
|
-
/* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
|
|
10
|
-
view-transition-name: frame;
|
|
11
|
-
/* stylelint-enable */
|
|
12
|
-
|
|
13
2
|
&.is-focused {
|
|
14
3
|
outline: calc(2 * var(--wp-admin-border-width-focus)) solid var(--wp-admin-theme-color);
|
|
15
4
|
outline-offset: calc(-2 * var(--wp-admin-border-width-focus));
|
|
@@ -114,35 +114,40 @@ function useNavigateToPreviousEntityRecord() {
|
|
|
114
114
|
|
|
115
115
|
export function useSpecificEditorSettings() {
|
|
116
116
|
const onNavigateToEntityRecord = useNavigateToEntityRecord();
|
|
117
|
-
const {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
117
|
+
const {
|
|
118
|
+
templateSlug,
|
|
119
|
+
canvasMode,
|
|
120
|
+
settings,
|
|
121
|
+
shouldUseTemplateAsDefaultRenderingMode,
|
|
122
|
+
} = useSelect( ( select ) => {
|
|
123
|
+
const {
|
|
124
|
+
getEditedPostType,
|
|
125
|
+
getEditedPostId,
|
|
126
|
+
getEditedPostContext,
|
|
127
|
+
getCanvasMode,
|
|
128
|
+
getSettings,
|
|
129
|
+
} = unlock( select( editSiteStore ) );
|
|
130
|
+
const { getEditedEntityRecord } = select( coreStore );
|
|
131
|
+
const usedPostType = getEditedPostType();
|
|
132
|
+
const usedPostId = getEditedPostId();
|
|
133
|
+
const _record = getEditedEntityRecord(
|
|
134
|
+
'postType',
|
|
135
|
+
usedPostType,
|
|
136
|
+
usedPostId
|
|
137
|
+
);
|
|
138
|
+
const _context = getEditedPostContext();
|
|
139
|
+
return {
|
|
140
|
+
templateSlug: _record.slug,
|
|
141
|
+
canvasMode: getCanvasMode(),
|
|
142
|
+
settings: getSettings(),
|
|
143
|
+
// TODO: The `postType` check should be removed when the default rendering mode per post type is merged.
|
|
144
|
+
// @see https://github.com/WordPress/gutenberg/pull/62304/
|
|
145
|
+
shouldUseTemplateAsDefaultRenderingMode:
|
|
146
|
+
_context?.postId && _context?.postType !== 'post',
|
|
147
|
+
};
|
|
148
|
+
}, [] );
|
|
144
149
|
const archiveLabels = useArchiveLabel( templateSlug );
|
|
145
|
-
const defaultRenderingMode =
|
|
150
|
+
const defaultRenderingMode = shouldUseTemplateAsDefaultRenderingMode
|
|
146
151
|
? 'template-locked'
|
|
147
152
|
: 'post-only';
|
|
148
153
|
const onNavigateToPreviousEntityRecord =
|
|
@@ -36,20 +36,24 @@ import PluginTemplateSettingPanel from '../plugin-template-setting-panel';
|
|
|
36
36
|
import GlobalStylesSidebar from '../global-styles-sidebar';
|
|
37
37
|
import { isPreviewingTheme } from '../../utils/is-previewing-theme';
|
|
38
38
|
import {
|
|
39
|
-
|
|
39
|
+
getEditorCanvasContainerTitleAndIcon,
|
|
40
40
|
useHasEditorCanvasContainer,
|
|
41
41
|
} from '../editor-canvas-container';
|
|
42
42
|
import SaveButton from '../save-button';
|
|
43
|
+
import SavePanel from '../save-panel';
|
|
43
44
|
import SiteEditorMoreMenu from '../more-menu';
|
|
44
45
|
import SiteIcon from '../site-icon';
|
|
45
46
|
import useEditorIframeProps from '../block-editor/use-editor-iframe-props';
|
|
46
47
|
import useEditorTitle from './use-editor-title';
|
|
48
|
+
import { useIsSiteEditorLoading } from '../layout/hooks';
|
|
47
49
|
|
|
48
50
|
const { Editor, BackButton } = unlock( editorPrivateApis );
|
|
49
|
-
const { useHistory } = unlock( routerPrivateApis );
|
|
51
|
+
const { useHistory, useLocation } = unlock( routerPrivateApis );
|
|
50
52
|
const { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );
|
|
51
53
|
|
|
52
|
-
export default function EditSiteEditor( {
|
|
54
|
+
export default function EditSiteEditor( { isPostsList = false } ) {
|
|
55
|
+
const { params } = useLocation();
|
|
56
|
+
const isLoading = useIsSiteEditorLoading();
|
|
53
57
|
const {
|
|
54
58
|
editedPostType,
|
|
55
59
|
editedPostId,
|
|
@@ -63,6 +67,7 @@ export default function EditSiteEditor( { isLoading } ) {
|
|
|
63
67
|
currentPostIsTrashed,
|
|
64
68
|
} = useSelect( ( select ) => {
|
|
65
69
|
const {
|
|
70
|
+
getEditorCanvasContainerView,
|
|
66
71
|
getEditedPostContext,
|
|
67
72
|
getCanvasMode,
|
|
68
73
|
isPage,
|
|
@@ -84,9 +89,7 @@ export default function EditSiteEditor( { isLoading } ) {
|
|
|
84
89
|
isEditingPage: isPage(),
|
|
85
90
|
supportsGlobalStyles: getCurrentTheme()?.is_block_theme,
|
|
86
91
|
showIconLabels: get( 'core', 'showIconLabels' ),
|
|
87
|
-
editorCanvasView:
|
|
88
|
-
select( editSiteStore )
|
|
89
|
-
).getEditorCanvasContainerView(),
|
|
92
|
+
editorCanvasView: getEditorCanvasContainerView(),
|
|
90
93
|
currentPostIsTrashed:
|
|
91
94
|
select( editorStore ).getCurrentPostAttribute( 'status' ) ===
|
|
92
95
|
'trash',
|
|
@@ -110,14 +113,12 @@ export default function EditSiteEditor( { isLoading } ) {
|
|
|
110
113
|
{
|
|
111
114
|
// Forming a "block formatting context" to prevent margin collapsing.
|
|
112
115
|
// @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context
|
|
113
|
-
|
|
114
|
-
css: `body{${
|
|
116
|
+
css:
|
|
115
117
|
canvasMode === 'view'
|
|
116
|
-
? `min-height: 100vh; ${
|
|
118
|
+
? `body{min-height: 100vh; ${
|
|
117
119
|
currentPostIsTrashed ? '' : 'cursor: pointer;'
|
|
118
|
-
}`
|
|
119
|
-
:
|
|
120
|
-
}}}`,
|
|
120
|
+
}}`
|
|
121
|
+
: undefined,
|
|
121
122
|
},
|
|
122
123
|
],
|
|
123
124
|
[ settings.styles, canvasMode, currentPostIsTrashed ]
|
|
@@ -173,6 +174,10 @@ export default function EditSiteEditor( { isLoading } ) {
|
|
|
173
174
|
[ history, createSuccessNotice ]
|
|
174
175
|
);
|
|
175
176
|
|
|
177
|
+
// Replace the title and icon displayed in the DocumentBar when there's an overlay visible.
|
|
178
|
+
const { title, icon } =
|
|
179
|
+
getEditorCanvasContainerTitleAndIcon( editorCanvasView );
|
|
180
|
+
|
|
176
181
|
const isReady = ! isLoading;
|
|
177
182
|
|
|
178
183
|
return (
|
|
@@ -198,12 +203,10 @@ export default function EditSiteEditor( { isLoading } ) {
|
|
|
198
203
|
customSaveButton={
|
|
199
204
|
_isPreviewingTheme && <SaveButton size="compact" />
|
|
200
205
|
}
|
|
206
|
+
customSavePanel={ _isPreviewingTheme && <SavePanel /> }
|
|
201
207
|
forceDisableBlockTools={ ! hasDefaultEditorCanvasView }
|
|
202
|
-
title={
|
|
203
|
-
|
|
204
|
-
? getEditorCanvasContainerTitle( editorCanvasView )
|
|
205
|
-
: undefined
|
|
206
|
-
}
|
|
208
|
+
title={ title }
|
|
209
|
+
icon={ icon }
|
|
207
210
|
iframeProps={ iframeProps }
|
|
208
211
|
onActionPerformed={ onActionPerformed }
|
|
209
212
|
extraSidebarPanels={
|
|
@@ -217,9 +220,20 @@ export default function EditSiteEditor( { isLoading } ) {
|
|
|
217
220
|
<Button
|
|
218
221
|
label={ __( 'Open Navigation' ) }
|
|
219
222
|
className="edit-site-layout__view-mode-toggle"
|
|
220
|
-
onClick={ () =>
|
|
221
|
-
setCanvasMode( 'view' )
|
|
222
|
-
|
|
223
|
+
onClick={ () => {
|
|
224
|
+
setCanvasMode( 'view' );
|
|
225
|
+
// TODO: this is a temporary solution to navigate to the posts list if we are
|
|
226
|
+
// come here through `posts list` and are in focus mode editing a template, template part etc..
|
|
227
|
+
if (
|
|
228
|
+
isPostsList &&
|
|
229
|
+
params?.focusMode
|
|
230
|
+
) {
|
|
231
|
+
history.push( {
|
|
232
|
+
page: 'gutenberg-posts-dashboard',
|
|
233
|
+
postType: 'post',
|
|
234
|
+
} );
|
|
235
|
+
}
|
|
236
|
+
} }
|
|
223
237
|
>
|
|
224
238
|
<SiteIcon className="edit-site-layout__view-mode-toggle-icon" />
|
|
225
239
|
</Button>
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { ESCAPE } from '@wordpress/keycodes';
|
|
10
10
|
import { __ } from '@wordpress/i18n';
|
|
11
11
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
12
|
-
import { closeSmall } from '@wordpress/icons';
|
|
12
|
+
import { backup, closeSmall, seen } from '@wordpress/icons';
|
|
13
13
|
import { useFocusOnMount, useFocusReturn } from '@wordpress/compose';
|
|
14
14
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
15
15
|
import {
|
|
@@ -30,17 +30,26 @@ const { EditorContentSlotFill, ResizableEditor } = unlock( editorPrivateApis );
|
|
|
30
30
|
*
|
|
31
31
|
* @param {string} view Editor canvas container view.
|
|
32
32
|
*
|
|
33
|
-
* @return {
|
|
33
|
+
* @return {Object} Translated string for the view title and associated icon, both defaulting to ''.
|
|
34
34
|
*/
|
|
35
|
-
function
|
|
35
|
+
function getEditorCanvasContainerTitleAndIcon( view ) {
|
|
36
36
|
switch ( view ) {
|
|
37
37
|
case 'style-book':
|
|
38
|
-
return
|
|
38
|
+
return {
|
|
39
|
+
title: __( 'Style Book' ),
|
|
40
|
+
icon: seen,
|
|
41
|
+
};
|
|
39
42
|
case 'global-styles-revisions':
|
|
40
43
|
case 'global-styles-revisions:style-book':
|
|
41
|
-
return
|
|
44
|
+
return {
|
|
45
|
+
title: __( 'Style Revisions' ),
|
|
46
|
+
icon: backup,
|
|
47
|
+
};
|
|
42
48
|
default:
|
|
43
|
-
return
|
|
49
|
+
return {
|
|
50
|
+
title: '',
|
|
51
|
+
icon: '',
|
|
52
|
+
};
|
|
44
53
|
}
|
|
45
54
|
}
|
|
46
55
|
|
|
@@ -109,7 +118,9 @@ function EditorCanvasContainer( {
|
|
|
109
118
|
return null;
|
|
110
119
|
}
|
|
111
120
|
|
|
112
|
-
const title =
|
|
121
|
+
const { title } = getEditorCanvasContainerTitleAndIcon(
|
|
122
|
+
editorCanvasContainerView
|
|
123
|
+
);
|
|
113
124
|
const shouldShowCloseButton = onClose || closeButtonLabel;
|
|
114
125
|
|
|
115
126
|
return (
|
|
@@ -138,10 +149,11 @@ function EditorCanvasContainer( {
|
|
|
138
149
|
</EditorContentSlotFill.Fill>
|
|
139
150
|
);
|
|
140
151
|
}
|
|
152
|
+
|
|
141
153
|
function useHasEditorCanvasContainer() {
|
|
142
154
|
const fills = useSlotFills( EditorContentSlotFill.privateKey );
|
|
143
155
|
return !! fills?.length;
|
|
144
156
|
}
|
|
145
157
|
|
|
146
158
|
export default EditorCanvasContainer;
|
|
147
|
-
export { useHasEditorCanvasContainer,
|
|
159
|
+
export { useHasEditorCanvasContainer, getEditorCanvasContainerTitleAndIcon };
|
|
@@ -45,13 +45,6 @@ export default function BackgroundPanel() {
|
|
|
45
45
|
const _links = useGlobalStyleLinks();
|
|
46
46
|
const [ settings ] = useGlobalSetting( '' );
|
|
47
47
|
|
|
48
|
-
const defaultControls = {
|
|
49
|
-
backgroundImage: true,
|
|
50
|
-
backgroundSize:
|
|
51
|
-
hasBackgroundImageValue( style ) ||
|
|
52
|
-
hasBackgroundImageValue( inheritedStyle ),
|
|
53
|
-
};
|
|
54
|
-
|
|
55
48
|
return (
|
|
56
49
|
<StylesBackgroundPanel
|
|
57
50
|
inheritedValue={ inheritedStyle }
|
|
@@ -59,7 +52,6 @@ export default function BackgroundPanel() {
|
|
|
59
52
|
onChange={ setStyle }
|
|
60
53
|
settings={ settings }
|
|
61
54
|
defaultValues={ BACKGROUND_DEFAULT_VALUES }
|
|
62
|
-
defaultControls={ defaultControls }
|
|
63
55
|
themeFileURIs={ _links?.[ 'wp:theme-file' ] }
|
|
64
56
|
/>
|
|
65
57
|
);
|