@wordpress/edit-site 5.1.0 → 5.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 +8 -0
- package/LICENSE.md +1 -1
- package/build/components/add-new-template/add-custom-generic-template-modal.js +8 -10
- package/build/components/add-new-template/add-custom-generic-template-modal.js.map +1 -1
- package/build/components/add-new-template/add-custom-template-modal.js +0 -1
- package/build/components/add-new-template/add-custom-template-modal.js.map +1 -1
- package/build/components/add-new-template/new-template-part.js +5 -9
- package/build/components/add-new-template/new-template-part.js.map +1 -1
- package/build/components/app/index.js +2 -7
- package/build/components/app/index.js.map +1 -1
- package/build/components/block-editor/editor-canvas.js +0 -1
- package/build/components/block-editor/editor-canvas.js.map +1 -1
- package/build/components/block-editor/index.js +25 -59
- package/build/components/block-editor/index.js.map +1 -1
- package/build/components/block-editor/inserter-media-categories.js +237 -0
- package/build/components/block-editor/inserter-media-categories.js.map +1 -0
- package/build/components/block-editor/resize-handle.js +2 -1
- package/build/components/block-editor/resize-handle.js.map +1 -1
- package/build/components/canvas-spinner/index.js +20 -0
- package/build/components/canvas-spinner/index.js.map +1 -0
- package/build/components/create-template-part-modal/index.js +4 -2
- package/build/components/create-template-part-modal/index.js.map +1 -1
- package/build/components/editor/index.js +4 -2
- package/build/components/editor/index.js.map +1 -1
- package/build/components/error-boundary/index.js +2 -12
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/error-boundary/warning.js +5 -28
- package/build/components/error-boundary/warning.js.map +1 -1
- package/build/components/global-styles/block-preview-panel.js +10 -4
- package/build/components/global-styles/block-preview-panel.js.map +1 -1
- package/build/components/global-styles/border-panel.js +18 -9
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-palette-panel.js +13 -7
- package/build/components/global-styles/color-palette-panel.js.map +1 -1
- package/build/components/global-styles/context-menu.js +47 -4
- package/build/components/global-styles/context-menu.js.map +1 -1
- package/build/components/global-styles/custom-css.js +65 -14
- package/build/components/global-styles/custom-css.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +50 -27
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/global-styles-provider.js +13 -3
- package/build/components/global-styles/global-styles-provider.js.map +1 -1
- package/build/components/global-styles/gradients-palette-panel.js +17 -11
- package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build/components/global-styles/hooks.js +21 -142
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/index.js +0 -28
- package/build/components/global-styles/index.js.map +1 -1
- package/build/components/global-styles/palette.js +11 -4
- package/build/components/global-styles/palette.js.map +1 -1
- package/build/components/global-styles/preview.js +18 -15
- package/build/components/global-styles/preview.js.map +1 -1
- package/build/components/global-styles/screen-background-color.js +28 -13
- package/build/components/global-styles/screen-background-color.js.map +1 -1
- package/build/components/global-styles/screen-block-list.js +4 -1
- package/build/components/global-styles/screen-block-list.js.map +1 -1
- package/build/components/global-styles/screen-border.js +16 -4
- package/build/components/global-styles/screen-border.js.map +1 -1
- package/build/components/global-styles/screen-button-color.js +17 -9
- package/build/components/global-styles/screen-button-color.js.map +1 -1
- package/build/components/global-styles/screen-colors.js +59 -26
- package/build/components/global-styles/screen-colors.js.map +1 -1
- package/build/components/global-styles/screen-css.js +20 -8
- package/build/components/global-styles/screen-css.js.map +1 -1
- package/build/components/global-styles/screen-heading-color.js +24 -16
- package/build/components/global-styles/screen-heading-color.js.map +1 -1
- package/build/components/global-styles/screen-layout.js +9 -3
- package/build/components/global-styles/screen-layout.js.map +1 -1
- package/build/components/global-styles/screen-link-color.js +19 -11
- package/build/components/global-styles/screen-link-color.js.map +1 -1
- package/build/components/global-styles/screen-root.js +25 -9
- package/build/components/global-styles/screen-root.js.map +1 -1
- package/build/components/global-styles/screen-style-variations.js +8 -4
- package/build/components/global-styles/screen-style-variations.js.map +1 -1
- package/build/components/global-styles/screen-text-color.js +15 -7
- package/build/components/global-styles/screen-text-color.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +23 -11
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/screen-variations.js +71 -0
- package/build/components/global-styles/screen-variations.js.map +1 -0
- package/build/components/global-styles/shadow-panel.js +196 -0
- package/build/components/global-styles/shadow-panel.js.map +1 -0
- package/build/components/global-styles/typography-panel.js +37 -22
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/typography-preview.js +19 -9
- package/build/components/global-styles/typography-preview.js.map +1 -1
- package/build/components/global-styles/ui.js +139 -21
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles/utils.js +8 -290
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/global-styles/variations-panel.js +85 -0
- package/build/components/global-styles/variations-panel.js.map +1 -0
- package/build/components/global-styles-renderer/index.js +7 -5
- package/build/components/global-styles-renderer/index.js.map +1 -1
- package/build/components/header-edit-mode/document-actions/index.js +2 -2
- package/build/components/header-edit-mode/document-actions/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +0 -1
- package/build/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build/components/layout/index.js +86 -15
- package/build/components/layout/index.js.map +1 -1
- package/build/components/list/actions/rename-menu-item.js +8 -11
- package/build/components/list/actions/rename-menu-item.js.map +1 -1
- package/build/components/{sidebar-edit-mode/navigation-menu-sidebar/navigation-inspector.js → navigation-inspector/index.js} +3 -2
- package/build/components/navigation-inspector/index.js.map +1 -0
- package/build/components/{sidebar-edit-mode/navigation-menu-sidebar → navigation-inspector}/navigation-menu.js +13 -15
- package/build/components/navigation-inspector/navigation-menu.js.map +1 -0
- package/build/components/sidebar/index.js +3 -1
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js +3 -18
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build/components/sidebar-edit-mode/index.js +1 -14
- package/build/components/sidebar-edit-mode/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +3 -2
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/index.js +23 -1
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js +35 -0
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -0
- package/build/components/sidebar-navigation-screen-templates/index.js +3 -8
- package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build/components/site-hub/index.js +11 -11
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/site-icon/index.js +1 -1
- package/build/components/site-icon/index.js.map +1 -1
- package/build/components/style-book/index.js +7 -4
- package/build/components/style-book/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +54 -0
- package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -0
- package/build/components/template-details/edit-template-title.js +1 -0
- package/build/components/template-details/edit-template-title.js.map +1 -1
- package/build/components/template-details/template-part-area-selector.js +1 -0
- package/build/components/template-details/template-part-area-selector.js.map +1 -1
- package/build/components/template-part-converter/convert-to-template-part.js +5 -9
- package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build/experiments.js +19 -0
- package/build/experiments.js.map +1 -0
- package/build/hooks/push-changes-to-global-styles/index.js +68 -9
- package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build/index.js +53 -60
- package/build/index.js.map +1 -1
- package/build/store/reducer.js +1 -1
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +7 -27
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils.js +77 -0
- package/build/store/utils.js.map +1 -0
- package/build/utils/template-part-create.js +71 -0
- package/build/utils/template-part-create.js.map +1 -0
- package/build-module/components/add-new-template/add-custom-generic-template-modal.js +9 -11
- package/build-module/components/add-new-template/add-custom-generic-template-modal.js.map +1 -1
- package/build-module/components/add-new-template/add-custom-template-modal.js +0 -1
- package/build-module/components/add-new-template/add-custom-template-modal.js.map +1 -1
- package/build-module/components/add-new-template/new-template-part.js +5 -9
- package/build-module/components/add-new-template/new-template-part.js.map +1 -1
- package/build-module/components/app/index.js +2 -7
- package/build-module/components/app/index.js.map +1 -1
- package/build-module/components/block-editor/editor-canvas.js +0 -1
- package/build-module/components/block-editor/editor-canvas.js.map +1 -1
- package/build-module/components/block-editor/index.js +27 -57
- package/build-module/components/block-editor/index.js.map +1 -1
- package/build-module/components/block-editor/inserter-media-categories.js +225 -0
- package/build-module/components/block-editor/inserter-media-categories.js.map +1 -0
- package/build-module/components/block-editor/resize-handle.js +2 -1
- package/build-module/components/block-editor/resize-handle.js.map +1 -1
- package/build-module/components/canvas-spinner/index.js +12 -0
- package/build-module/components/canvas-spinner/index.js.map +1 -0
- package/build-module/components/create-template-part-modal/index.js +5 -3
- package/build-module/components/create-template-part-modal/index.js.map +1 -1
- package/build-module/components/editor/index.js +3 -2
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/error-boundary/index.js +2 -12
- package/build-module/components/error-boundary/index.js.map +1 -1
- package/build-module/components/error-boundary/warning.js +5 -28
- package/build-module/components/error-boundary/warning.js.map +1 -1
- package/build-module/components/global-styles/block-preview-panel.js +10 -4
- package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +18 -11
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-palette-panel.js +11 -7
- package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/context-menu.js +46 -8
- package/build-module/components/global-styles/context-menu.js.map +1 -1
- package/build-module/components/global-styles/custom-css.js +61 -15
- package/build-module/components/global-styles/custom-css.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +50 -28
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/global-styles-provider.js +7 -2
- package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
- package/build-module/components/global-styles/gradients-palette-panel.js +15 -11
- package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +23 -134
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/index.js +0 -2
- package/build-module/components/global-styles/index.js.map +1 -1
- package/build-module/components/global-styles/palette.js +10 -5
- package/build-module/components/global-styles/palette.js.map +1 -1
- package/build-module/components/global-styles/preview.js +18 -14
- package/build-module/components/global-styles/preview.js.map +1 -1
- package/build-module/components/global-styles/screen-background-color.js +27 -15
- package/build-module/components/global-styles/screen-background-color.js.map +1 -1
- package/build-module/components/global-styles/screen-block-list.js +3 -1
- package/build-module/components/global-styles/screen-block-list.js.map +1 -1
- package/build-module/components/global-styles/screen-border.js +14 -4
- package/build-module/components/global-styles/screen-border.js.map +1 -1
- package/build-module/components/global-styles/screen-button-color.js +17 -11
- package/build-module/components/global-styles/screen-button-color.js.map +1 -1
- package/build-module/components/global-styles/screen-colors.js +56 -27
- package/build-module/components/global-styles/screen-colors.js.map +1 -1
- package/build-module/components/global-styles/screen-css.js +21 -9
- package/build-module/components/global-styles/screen-css.js.map +1 -1
- package/build-module/components/global-styles/screen-heading-color.js +24 -18
- package/build-module/components/global-styles/screen-heading-color.js.map +1 -1
- package/build-module/components/global-styles/screen-layout.js +8 -3
- package/build-module/components/global-styles/screen-layout.js.map +1 -1
- package/build-module/components/global-styles/screen-link-color.js +19 -13
- package/build-module/components/global-styles/screen-link-color.js.map +1 -1
- package/build-module/components/global-styles/screen-root.js +23 -9
- package/build-module/components/global-styles/screen-root.js.map +1 -1
- package/build-module/components/global-styles/screen-style-variations.js +5 -2
- package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
- package/build-module/components/global-styles/screen-text-color.js +15 -9
- package/build-module/components/global-styles/screen-text-color.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js +19 -10
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/screen-variations.js +54 -0
- package/build-module/components/global-styles/screen-variations.js.map +1 -0
- package/build-module/components/global-styles/shadow-panel.js +177 -0
- package/build-module/components/global-styles/shadow-panel.js.map +1 -0
- package/build-module/components/global-styles/typography-panel.js +37 -24
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-preview.js +17 -9
- package/build-module/components/global-styles/typography-preview.js.map +1 -1
- package/build-module/components/global-styles/ui.js +132 -22
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles/utils.js +7 -277
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/global-styles/variations-panel.js +68 -0
- package/build-module/components/global-styles/variations-panel.js.map +1 -0
- package/build-module/components/global-styles-renderer/index.js +5 -5
- package/build-module/components/global-styles-renderer/index.js.map +1 -1
- package/build-module/components/header-edit-mode/document-actions/index.js +2 -2
- package/build-module/components/header-edit-mode/document-actions/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +1 -1
- package/build-module/components/layout/index.js +86 -17
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/list/actions/rename-menu-item.js +9 -12
- package/build-module/components/list/actions/rename-menu-item.js.map +1 -1
- package/build-module/components/{sidebar-edit-mode/navigation-menu-sidebar/navigation-inspector.js → navigation-inspector/index.js} +3 -2
- package/build-module/components/navigation-inspector/index.js.map +1 -0
- package/build-module/components/{sidebar-edit-mode/navigation-menu-sidebar → navigation-inspector}/navigation-menu.js +13 -16
- package/build-module/components/navigation-inspector/navigation-menu.js.map +1 -0
- package/build-module/components/sidebar/index.js +2 -1
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +6 -21
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/index.js +1 -13
- package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +3 -2
- package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +22 -2
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +23 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-templates/index.js +4 -9
- package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build-module/components/site-hub/index.js +12 -11
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/site-icon/index.js +1 -1
- package/build-module/components/site-icon/index.js.map +1 -1
- package/build-module/components/style-book/index.js +8 -5
- package/build-module/components/style-book/index.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +43 -0
- package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -0
- package/build-module/components/template-details/edit-template-title.js +1 -0
- package/build-module/components/template-details/edit-template-title.js.map +1 -1
- package/build-module/components/template-details/template-part-area-selector.js +1 -0
- package/build-module/components/template-details/template-part-area-selector.js.map +1 -1
- package/build-module/components/template-part-converter/convert-to-template-part.js +5 -9
- package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build-module/experiments.js +9 -0
- package/build-module/experiments.js.map +1 -0
- package/build-module/hooks/push-changes-to-global-styles/index.js +65 -6
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build-module/index.js +52 -60
- package/build-module/index.js.map +1 -1
- package/build-module/store/reducer.js +1 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +6 -26
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils.js +66 -0
- package/build-module/store/utils.js.map +1 -0
- package/build-module/utils/template-part-create.js +53 -0
- package/build-module/utils/template-part-create.js.map +1 -0
- package/build-style/style-rtl.css +448 -278
- package/build-style/style.css +448 -278
- package/package.json +32 -30
- package/src/components/add-new-template/add-custom-generic-template-modal.js +20 -28
- package/src/components/add-new-template/add-custom-template-modal.js +0 -1
- package/src/components/add-new-template/new-template-part.js +12 -11
- package/src/components/add-new-template/style.scss +0 -4
- package/src/components/app/index.js +2 -2
- package/src/components/block-editor/editor-canvas.js +0 -1
- package/src/components/block-editor/index.js +21 -77
- package/src/components/block-editor/inserter-media-categories.js +247 -0
- package/src/components/block-editor/resize-handle.js +6 -2
- package/src/components/block-editor/style.scss +55 -7
- package/src/components/canvas-spinner/index.js +12 -0
- package/src/components/canvas-spinner/style.scss +7 -0
- package/src/components/create-template-part-modal/index.js +75 -67
- package/src/components/create-template-part-modal/style.scss +0 -10
- package/src/components/editor/index.js +5 -3
- package/src/components/error-boundary/index.js +2 -10
- package/src/components/error-boundary/warning.js +6 -35
- package/src/components/global-styles/README.md +1 -75
- package/src/components/global-styles/block-preview-panel.js +16 -4
- package/src/components/global-styles/border-panel.js +22 -16
- package/src/components/global-styles/color-palette-panel.js +10 -7
- package/src/components/global-styles/context-menu.js +117 -41
- package/src/components/global-styles/custom-css.js +76 -19
- package/src/components/global-styles/dimensions-panel.js +58 -31
- package/src/components/global-styles/global-styles-provider.js +6 -2
- package/src/components/global-styles/gradients-palette-panel.js +17 -11
- package/src/components/global-styles/hooks.js +31 -155
- package/src/components/global-styles/index.js +0 -2
- package/src/components/global-styles/palette.js +9 -5
- package/src/components/global-styles/preview.js +19 -13
- package/src/components/global-styles/screen-background-color.js +42 -19
- package/src/components/global-styles/screen-block-list.js +6 -1
- package/src/components/global-styles/screen-border.js +13 -5
- package/src/components/global-styles/screen-button-color.js +21 -19
- package/src/components/global-styles/screen-colors.js +66 -22
- package/src/components/global-styles/screen-css.js +30 -14
- package/src/components/global-styles/screen-heading-color.js +32 -27
- package/src/components/global-styles/screen-layout.js +7 -4
- package/src/components/global-styles/screen-link-color.js +34 -22
- package/src/components/global-styles/screen-root.js +24 -9
- package/src/components/global-styles/screen-style-variations.js +7 -2
- package/src/components/global-styles/screen-text-color.js +15 -15
- package/src/components/global-styles/screen-typography.js +34 -12
- package/src/components/global-styles/screen-variations.js +47 -0
- package/src/components/global-styles/shadow-panel.js +174 -0
- package/src/components/global-styles/style.scss +94 -1
- package/src/components/global-styles/typography-panel.js +58 -23
- package/src/components/global-styles/typography-preview.js +28 -9
- package/src/components/global-styles/ui.js +130 -17
- package/src/components/global-styles/utils.js +7 -330
- package/src/components/global-styles/variations-panel.js +78 -0
- package/src/components/global-styles-renderer/index.js +3 -4
- package/src/components/header-edit-mode/document-actions/index.js +1 -1
- package/src/components/keyboard-shortcut-help-modal/index.js +0 -1
- package/src/components/layout/index.js +116 -21
- package/src/components/layout/style.scss +29 -5
- package/src/components/list/actions/rename-menu-item.js +14 -23
- package/src/components/list/style.scss +0 -4
- package/src/components/{sidebar-edit-mode/navigation-menu-sidebar/navigation-inspector.js → navigation-inspector/index.js} +3 -4
- package/src/components/{sidebar-edit-mode/navigation-menu-sidebar → navigation-inspector}/navigation-menu.js +10 -12
- package/src/components/{sidebar-edit-mode/navigation-menu-sidebar → navigation-inspector}/style.scss +4 -17
- package/src/components/sidebar/index.js +2 -0
- package/src/components/sidebar-edit-mode/global-styles-sidebar.js +8 -32
- package/src/components/sidebar-edit-mode/index.js +0 -11
- package/src/components/sidebar-edit-mode/settings-header/style.scss +8 -0
- package/src/components/sidebar-navigation-item/style.scss +28 -3
- package/src/components/sidebar-navigation-screen/index.js +4 -3
- package/src/components/sidebar-navigation-screen/style.scss +2 -0
- package/src/components/sidebar-navigation-screen-main/index.js +23 -1
- package/src/components/sidebar-navigation-screen-navigation-menus/index.js +25 -0
- package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +12 -0
- package/src/components/sidebar-navigation-screen-templates/index.js +12 -19
- package/src/components/site-hub/index.js +120 -109
- package/src/components/site-hub/style.scss +7 -1
- package/src/components/site-icon/index.js +1 -1
- package/src/components/site-icon/style.scss +2 -2
- package/src/components/style-book/index.js +10 -5
- package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +40 -0
- package/src/components/template-details/edit-template-title.js +1 -0
- package/src/components/template-details/template-part-area-selector.js +1 -0
- package/src/components/template-part-converter/convert-to-template-part.js +12 -10
- package/src/experiments.js +10 -0
- package/src/hooks/push-changes-to-global-styles/index.js +66 -8
- package/src/index.js +51 -59
- package/src/store/reducer.js +1 -1
- package/src/store/selectors.js +6 -26
- package/src/store/test/utils.js +181 -0
- package/src/store/utils.js +69 -0
- package/src/style.scss +4 -2
- package/src/utils/template-part-create.js +62 -0
- package/src/utils/test/template-part-create.js +63 -0
- package/build/components/global-styles/context.js +0 -22
- package/build/components/global-styles/context.js.map +0 -1
- package/build/components/global-styles/typography-utils.js +0 -92
- package/build/components/global-styles/typography-utils.js.map +0 -1
- package/build/components/global-styles/use-global-styles-output.js +0 -857
- package/build/components/global-styles/use-global-styles-output.js.map +0 -1
- package/build/components/sidebar-edit-mode/navigation-menu-sidebar/index.js +0 -42
- package/build/components/sidebar-edit-mode/navigation-menu-sidebar/index.js.map +0 -1
- package/build/components/sidebar-edit-mode/navigation-menu-sidebar/navigation-inspector.js.map +0 -1
- package/build/components/sidebar-edit-mode/navigation-menu-sidebar/navigation-menu.js.map +0 -1
- package/build-module/components/global-styles/context.js +0 -12
- package/build-module/components/global-styles/context.js.map +0 -1
- package/build-module/components/global-styles/typography-utils.js +0 -84
- package/build-module/components/global-styles/typography-utils.js.map +0 -1
- package/build-module/components/global-styles/use-global-styles-output.js +0 -815
- package/build-module/components/global-styles/use-global-styles-output.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/navigation-menu-sidebar/index.js +0 -28
- package/build-module/components/sidebar-edit-mode/navigation-menu-sidebar/index.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/navigation-menu-sidebar/navigation-inspector.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/navigation-menu-sidebar/navigation-menu.js.map +0 -1
- package/src/components/global-styles/context.js +0 -15
- package/src/components/global-styles/test/typography-utils.js +0 -393
- package/src/components/global-styles/test/use-global-styles-output.js +0 -814
- package/src/components/global-styles/test/utils.js +0 -206
- package/src/components/global-styles/typography-utils.js +0 -87
- package/src/components/global-styles/use-global-styles-output.js +0 -936
- package/src/components/sidebar-edit-mode/navigation-menu-sidebar/index.js +0 -37
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
__experimentalLetterSpacingControl as LetterSpacingControl,
|
|
9
9
|
__experimentalTextTransformControl as TextTransformControl,
|
|
10
10
|
__experimentalTextDecorationControl as TextDecorationControl,
|
|
11
|
+
experiments as blockEditorExperiments,
|
|
11
12
|
} from '@wordpress/block-editor';
|
|
12
13
|
import {
|
|
13
14
|
FontSizePicker,
|
|
@@ -19,7 +20,10 @@ import { __ } from '@wordpress/i18n';
|
|
|
19
20
|
/**
|
|
20
21
|
* Internal dependencies
|
|
21
22
|
*/
|
|
22
|
-
import { getSupportedGlobalStylesPanels
|
|
23
|
+
import { getSupportedGlobalStylesPanels } from './hooks';
|
|
24
|
+
import { unlock } from '../../experiments';
|
|
25
|
+
|
|
26
|
+
const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorExperiments );
|
|
23
27
|
|
|
24
28
|
export function useHasTypographyPanel( name ) {
|
|
25
29
|
const hasFontFamily = useHasFontFamilyControl( name );
|
|
@@ -38,14 +42,21 @@ export function useHasTypographyPanel( name ) {
|
|
|
38
42
|
|
|
39
43
|
function useHasFontFamilyControl( name ) {
|
|
40
44
|
const supports = getSupportedGlobalStylesPanels( name );
|
|
41
|
-
const [
|
|
45
|
+
const [ fontFamiliesPerOrigin ] = useGlobalSetting(
|
|
46
|
+
'typography.fontFamilies',
|
|
47
|
+
name
|
|
48
|
+
);
|
|
49
|
+
const fontFamilies =
|
|
50
|
+
fontFamiliesPerOrigin?.custom ||
|
|
51
|
+
fontFamiliesPerOrigin?.theme ||
|
|
52
|
+
fontFamiliesPerOrigin?.default;
|
|
42
53
|
return supports.includes( 'fontFamily' ) && !! fontFamilies?.length;
|
|
43
54
|
}
|
|
44
55
|
|
|
45
56
|
function useHasLineHeightControl( name ) {
|
|
46
57
|
const supports = getSupportedGlobalStylesPanels( name );
|
|
47
58
|
return (
|
|
48
|
-
|
|
59
|
+
useGlobalSetting( 'typography.lineHeight', name )[ 0 ] &&
|
|
49
60
|
supports.includes( 'lineHeight' )
|
|
50
61
|
);
|
|
51
62
|
}
|
|
@@ -53,10 +64,10 @@ function useHasLineHeightControl( name ) {
|
|
|
53
64
|
function useHasAppearanceControl( name ) {
|
|
54
65
|
const supports = getSupportedGlobalStylesPanels( name );
|
|
55
66
|
const hasFontStyles =
|
|
56
|
-
|
|
67
|
+
useGlobalSetting( 'typography.fontStyle', name )[ 0 ] &&
|
|
57
68
|
supports.includes( 'fontStyle' );
|
|
58
69
|
const hasFontWeights =
|
|
59
|
-
|
|
70
|
+
useGlobalSetting( 'typography.fontWeight', name )[ 0 ] &&
|
|
60
71
|
supports.includes( 'fontWeight' );
|
|
61
72
|
return hasFontStyles || hasFontWeights;
|
|
62
73
|
}
|
|
@@ -64,10 +75,10 @@ function useHasAppearanceControl( name ) {
|
|
|
64
75
|
function useAppearanceControlLabel( name ) {
|
|
65
76
|
const supports = getSupportedGlobalStylesPanels( name );
|
|
66
77
|
const hasFontStyles =
|
|
67
|
-
|
|
78
|
+
useGlobalSetting( 'typography.fontStyle', name )[ 0 ] &&
|
|
68
79
|
supports.includes( 'fontStyle' );
|
|
69
80
|
const hasFontWeights =
|
|
70
|
-
|
|
81
|
+
useGlobalSetting( 'typography.fontWeight', name )[ 0 ] &&
|
|
71
82
|
supports.includes( 'fontWeight' );
|
|
72
83
|
if ( ! hasFontStyles ) {
|
|
73
84
|
return __( 'Font weight' );
|
|
@@ -79,7 +90,7 @@ function useAppearanceControlLabel( name ) {
|
|
|
79
90
|
}
|
|
80
91
|
|
|
81
92
|
function useHasLetterSpacingControl( name, element ) {
|
|
82
|
-
const setting =
|
|
93
|
+
const setting = useGlobalSetting( 'typography.letterSpacing', name )[ 0 ];
|
|
83
94
|
if ( ! setting ) {
|
|
84
95
|
return false;
|
|
85
96
|
}
|
|
@@ -91,7 +102,7 @@ function useHasLetterSpacingControl( name, element ) {
|
|
|
91
102
|
}
|
|
92
103
|
|
|
93
104
|
function useHasTextTransformControl( name, element ) {
|
|
94
|
-
const setting =
|
|
105
|
+
const setting = useGlobalSetting( 'typography.textTransform', name )[ 0 ];
|
|
95
106
|
if ( ! setting ) {
|
|
96
107
|
return false;
|
|
97
108
|
}
|
|
@@ -110,16 +121,16 @@ function useHasTextDecorationControl( name, element ) {
|
|
|
110
121
|
}
|
|
111
122
|
|
|
112
123
|
function useStyleWithReset( path, blockName ) {
|
|
113
|
-
const [ style, setStyle ] =
|
|
114
|
-
const [ userStyle ] =
|
|
124
|
+
const [ style, setStyle ] = useGlobalStyle( path, blockName );
|
|
125
|
+
const [ userStyle ] = useGlobalStyle( path, blockName, 'user' );
|
|
115
126
|
const hasStyle = () => !! userStyle;
|
|
116
127
|
const resetStyle = () => setStyle( undefined );
|
|
117
128
|
return [ style, setStyle, hasStyle, resetStyle ];
|
|
118
129
|
}
|
|
119
130
|
|
|
120
131
|
function useFontSizeWithReset( path, blockName ) {
|
|
121
|
-
const [ fontSize, setStyleCallback ] =
|
|
122
|
-
const [ userStyle ] =
|
|
132
|
+
const [ fontSize, setStyleCallback ] = useGlobalStyle( path, blockName );
|
|
133
|
+
const [ userStyle ] = useGlobalStyle( path, blockName, 'user' );
|
|
123
134
|
const hasFontSize = () => !! userStyle;
|
|
124
135
|
const resetFontSize = () => setStyleCallback( undefined );
|
|
125
136
|
const setFontSize = ( newValue, metadata ) => {
|
|
@@ -138,20 +149,20 @@ function useFontSizeWithReset( path, blockName ) {
|
|
|
138
149
|
}
|
|
139
150
|
|
|
140
151
|
function useFontAppearance( prefix, name ) {
|
|
141
|
-
const [ fontStyle, setFontStyle ] =
|
|
152
|
+
const [ fontStyle, setFontStyle ] = useGlobalStyle(
|
|
142
153
|
prefix + 'typography.fontStyle',
|
|
143
154
|
name
|
|
144
155
|
);
|
|
145
|
-
const [ userFontStyle ] =
|
|
156
|
+
const [ userFontStyle ] = useGlobalStyle(
|
|
146
157
|
prefix + 'typography.fontStyle',
|
|
147
158
|
name,
|
|
148
159
|
'user'
|
|
149
160
|
);
|
|
150
|
-
const [ fontWeight, setFontWeight ] =
|
|
161
|
+
const [ fontWeight, setFontWeight ] = useGlobalStyle(
|
|
151
162
|
prefix + 'typography.fontWeight',
|
|
152
163
|
name
|
|
153
164
|
);
|
|
154
|
-
const [ userFontWeight ] =
|
|
165
|
+
const [ userFontWeight ] = useGlobalStyle(
|
|
155
166
|
prefix + 'typography.fontWeight',
|
|
156
167
|
name,
|
|
157
168
|
'user'
|
|
@@ -171,7 +182,12 @@ function useFontAppearance( prefix, name ) {
|
|
|
171
182
|
};
|
|
172
183
|
}
|
|
173
184
|
|
|
174
|
-
export default function TypographyPanel( {
|
|
185
|
+
export default function TypographyPanel( {
|
|
186
|
+
name,
|
|
187
|
+
element,
|
|
188
|
+
headingLevel,
|
|
189
|
+
variation = '',
|
|
190
|
+
} ) {
|
|
175
191
|
const supports = getSupportedGlobalStylesPanels( name );
|
|
176
192
|
let prefix = '';
|
|
177
193
|
if ( element === 'heading' ) {
|
|
@@ -179,18 +195,37 @@ export default function TypographyPanel( { name, element, headingLevel } ) {
|
|
|
179
195
|
} else if ( element && element !== 'text' ) {
|
|
180
196
|
prefix = `elements.${ element }.`;
|
|
181
197
|
}
|
|
182
|
-
|
|
198
|
+
if ( variation ) {
|
|
199
|
+
prefix = prefix
|
|
200
|
+
? `variations.${ variation }.${ prefix }`
|
|
201
|
+
: `variations.${ variation }`;
|
|
202
|
+
}
|
|
203
|
+
const [ fontSizesPerOrigin ] = useGlobalSetting(
|
|
204
|
+
'typography.fontSizes',
|
|
205
|
+
name
|
|
206
|
+
);
|
|
207
|
+
const fontSizes =
|
|
208
|
+
fontSizesPerOrigin?.custom ||
|
|
209
|
+
fontSizesPerOrigin?.theme ||
|
|
210
|
+
fontSizesPerOrigin?.default;
|
|
183
211
|
|
|
184
|
-
const disableCustomFontSizes = !
|
|
212
|
+
const disableCustomFontSizes = ! useGlobalSetting(
|
|
185
213
|
'typography.customFontSize',
|
|
186
214
|
name
|
|
187
215
|
)[ 0 ];
|
|
188
|
-
const [
|
|
216
|
+
const [ fontFamiliesPerOrigin ] = useGlobalSetting(
|
|
217
|
+
'typography.fontFamilies',
|
|
218
|
+
name
|
|
219
|
+
);
|
|
220
|
+
const fontFamilies =
|
|
221
|
+
fontFamiliesPerOrigin?.custom ||
|
|
222
|
+
fontFamiliesPerOrigin?.theme ||
|
|
223
|
+
fontFamiliesPerOrigin?.default;
|
|
189
224
|
const hasFontStyles =
|
|
190
|
-
|
|
225
|
+
useGlobalSetting( 'typography.fontStyle', name )[ 0 ] &&
|
|
191
226
|
supports.includes( 'fontStyle' );
|
|
192
227
|
const hasFontWeights =
|
|
193
|
-
|
|
228
|
+
useGlobalSetting( 'typography.fontWeight', name )[ 0 ] &&
|
|
194
229
|
supports.includes( 'fontWeight' );
|
|
195
230
|
const hasFontFamilyEnabled = useHasFontFamilyControl( name );
|
|
196
231
|
const hasLineHeightEnabled = useHasLineHeightControl( name );
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { experiments as blockEditorExperiments } from '@wordpress/block-editor';
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
7
|
* Internal dependencies
|
|
3
8
|
*/
|
|
4
|
-
import {
|
|
9
|
+
import { unlock } from '../../experiments';
|
|
10
|
+
|
|
11
|
+
const { useGlobalStyle } = unlock( blockEditorExperiments );
|
|
5
12
|
|
|
6
13
|
export default function TypographyPreview( { name, element, headingLevel } ) {
|
|
7
14
|
let prefix = '';
|
|
@@ -11,14 +18,26 @@ export default function TypographyPreview( { name, element, headingLevel } ) {
|
|
|
11
18
|
prefix = `elements.${ element }.`;
|
|
12
19
|
}
|
|
13
20
|
|
|
14
|
-
const [ fontFamily ] =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const [
|
|
19
|
-
const [
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
const [ fontFamily ] = useGlobalStyle(
|
|
22
|
+
prefix + 'typography.fontFamily',
|
|
23
|
+
name
|
|
24
|
+
);
|
|
25
|
+
const [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient', name );
|
|
26
|
+
const [ backgroundColor ] = useGlobalStyle(
|
|
27
|
+
prefix + 'color.background',
|
|
28
|
+
name
|
|
29
|
+
);
|
|
30
|
+
const [ color ] = useGlobalStyle( prefix + 'color.text', name );
|
|
31
|
+
const [ fontSize ] = useGlobalStyle( prefix + 'typography.fontSize', name );
|
|
32
|
+
const [ fontStyle ] = useGlobalStyle(
|
|
33
|
+
prefix + 'typography.fontStyle',
|
|
34
|
+
name
|
|
35
|
+
);
|
|
36
|
+
const [ fontWeight ] = useGlobalStyle(
|
|
37
|
+
prefix + 'typography.fontWeight',
|
|
38
|
+
name
|
|
39
|
+
);
|
|
40
|
+
const [ letterSpacing ] = useGlobalStyle(
|
|
22
41
|
prefix + 'typography.letterSpacing',
|
|
23
42
|
name
|
|
24
43
|
);
|
|
@@ -5,8 +5,15 @@ import {
|
|
|
5
5
|
__experimentalNavigatorProvider as NavigatorProvider,
|
|
6
6
|
__experimentalNavigatorScreen as NavigatorScreen,
|
|
7
7
|
__experimentalUseNavigator as useNavigator,
|
|
8
|
+
createSlotFill,
|
|
9
|
+
DropdownMenu,
|
|
8
10
|
} from '@wordpress/components';
|
|
9
|
-
import { getBlockTypes } from '@wordpress/blocks';
|
|
11
|
+
import { getBlockTypes, store as blocksStore } from '@wordpress/blocks';
|
|
12
|
+
import { useSelect, useDispatch } from '@wordpress/data';
|
|
13
|
+
import { experiments as blockEditorExperiments } from '@wordpress/block-editor';
|
|
14
|
+
import { __ } from '@wordpress/i18n';
|
|
15
|
+
import { store as preferencesStore } from '@wordpress/preferences';
|
|
16
|
+
import { moreVertical } from '@wordpress/icons';
|
|
10
17
|
|
|
11
18
|
/**
|
|
12
19
|
* Internal dependencies
|
|
@@ -25,9 +32,47 @@ import ScreenHeadingColor from './screen-heading-color';
|
|
|
25
32
|
import ScreenButtonColor from './screen-button-color';
|
|
26
33
|
import ScreenLayout from './screen-layout';
|
|
27
34
|
import ScreenStyleVariations from './screen-style-variations';
|
|
35
|
+
import { ScreenVariation } from './screen-variations';
|
|
28
36
|
import ScreenBorder from './screen-border';
|
|
29
37
|
import StyleBook from '../style-book';
|
|
30
38
|
import ScreenCSS from './screen-css';
|
|
39
|
+
import { unlock } from '../../experiments';
|
|
40
|
+
|
|
41
|
+
const SLOT_FILL_NAME = 'GlobalStylesMenu';
|
|
42
|
+
const { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =
|
|
43
|
+
createSlotFill( SLOT_FILL_NAME );
|
|
44
|
+
|
|
45
|
+
function GlobalStylesActionMenu() {
|
|
46
|
+
const { toggle } = useDispatch( preferencesStore );
|
|
47
|
+
const { useGlobalStylesReset } = unlock( blockEditorExperiments );
|
|
48
|
+
const [ canReset, onReset ] = useGlobalStylesReset();
|
|
49
|
+
const { goTo } = useNavigator();
|
|
50
|
+
const loadCustomCSS = () => goTo( '/css' );
|
|
51
|
+
return (
|
|
52
|
+
<GlobalStylesMenuFill>
|
|
53
|
+
<DropdownMenu
|
|
54
|
+
icon={ moreVertical }
|
|
55
|
+
label={ __( 'More Styles actions' ) }
|
|
56
|
+
controls={ [
|
|
57
|
+
{
|
|
58
|
+
title: __( 'Reset to defaults' ),
|
|
59
|
+
onClick: onReset,
|
|
60
|
+
isDisabled: ! canReset,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
title: __( 'Welcome Guide' ),
|
|
64
|
+
onClick: () =>
|
|
65
|
+
toggle( 'core/edit-site', 'welcomeGuideStyles' ),
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
title: __( 'Additional CSS' ),
|
|
69
|
+
onClick: loadCustomCSS,
|
|
70
|
+
},
|
|
71
|
+
] }
|
|
72
|
+
/>
|
|
73
|
+
</GlobalStylesMenuFill>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
31
76
|
|
|
32
77
|
function GlobalStylesNavigationScreen( { className, ...props } ) {
|
|
33
78
|
return (
|
|
@@ -43,14 +88,61 @@ function GlobalStylesNavigationScreen( { className, ...props } ) {
|
|
|
43
88
|
);
|
|
44
89
|
}
|
|
45
90
|
|
|
46
|
-
function
|
|
47
|
-
const
|
|
48
|
-
|
|
91
|
+
function BlockStyleVariationsScreens( { name } ) {
|
|
92
|
+
const blockStyleVariations = useSelect(
|
|
93
|
+
( select ) => {
|
|
94
|
+
const { getBlockStyles } = select( blocksStore );
|
|
95
|
+
return getBlockStyles( name );
|
|
96
|
+
},
|
|
97
|
+
[ name ]
|
|
98
|
+
);
|
|
99
|
+
if ( ! blockStyleVariations?.length ) {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return blockStyleVariations.map( ( variation ) => (
|
|
104
|
+
<ContextScreens
|
|
105
|
+
key={ variation.name + name }
|
|
106
|
+
name={ name }
|
|
107
|
+
parentMenu={
|
|
108
|
+
'/blocks/' +
|
|
109
|
+
encodeURIComponent( name ) +
|
|
110
|
+
'/variations/' +
|
|
111
|
+
encodeURIComponent( variation.name )
|
|
112
|
+
}
|
|
113
|
+
variation={ variation.name }
|
|
114
|
+
/>
|
|
115
|
+
) );
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function BlockStylesNavigationScreens( {
|
|
119
|
+
parentMenu,
|
|
120
|
+
blockStyles,
|
|
121
|
+
blockName,
|
|
122
|
+
} ) {
|
|
123
|
+
return blockStyles.map( ( style, index ) => (
|
|
124
|
+
<GlobalStylesNavigationScreen
|
|
125
|
+
key={ index }
|
|
126
|
+
path={ parentMenu + '/variations/' + style.name }
|
|
127
|
+
>
|
|
128
|
+
<ScreenVariation blockName={ blockName } style={ style } />
|
|
129
|
+
</GlobalStylesNavigationScreen>
|
|
130
|
+
) );
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function ContextScreens( { name, parentMenu = '', variation = '' } ) {
|
|
134
|
+
const blockStyleVariations = useSelect(
|
|
135
|
+
( select ) => {
|
|
136
|
+
const { getBlockStyles } = select( blocksStore );
|
|
137
|
+
return getBlockStyles( name );
|
|
138
|
+
},
|
|
139
|
+
[ name ]
|
|
140
|
+
);
|
|
49
141
|
|
|
50
142
|
return (
|
|
51
143
|
<>
|
|
52
144
|
<GlobalStylesNavigationScreen path={ parentMenu + '/typography' }>
|
|
53
|
-
<ScreenTypography name={ name } />
|
|
145
|
+
<ScreenTypography name={ name } variation={ variation } />
|
|
54
146
|
</GlobalStylesNavigationScreen>
|
|
55
147
|
|
|
56
148
|
<GlobalStylesNavigationScreen
|
|
@@ -78,7 +170,7 @@ function ContextScreens( { name } ) {
|
|
|
78
170
|
</GlobalStylesNavigationScreen>
|
|
79
171
|
|
|
80
172
|
<GlobalStylesNavigationScreen path={ parentMenu + '/colors' }>
|
|
81
|
-
<ScreenColors name={ name } />
|
|
173
|
+
<ScreenColors name={ name } variation={ variation } />
|
|
82
174
|
</GlobalStylesNavigationScreen>
|
|
83
175
|
|
|
84
176
|
<GlobalStylesNavigationScreen
|
|
@@ -90,36 +182,48 @@ function ContextScreens( { name } ) {
|
|
|
90
182
|
<GlobalStylesNavigationScreen
|
|
91
183
|
path={ parentMenu + '/colors/background' }
|
|
92
184
|
>
|
|
93
|
-
<ScreenBackgroundColor name={ name } />
|
|
185
|
+
<ScreenBackgroundColor name={ name } variation={ variation } />
|
|
94
186
|
</GlobalStylesNavigationScreen>
|
|
95
187
|
|
|
96
188
|
<GlobalStylesNavigationScreen path={ parentMenu + '/colors/text' }>
|
|
97
|
-
<ScreenTextColor name={ name } />
|
|
189
|
+
<ScreenTextColor name={ name } variation={ variation } />
|
|
98
190
|
</GlobalStylesNavigationScreen>
|
|
99
191
|
|
|
100
192
|
<GlobalStylesNavigationScreen path={ parentMenu + '/colors/link' }>
|
|
101
|
-
<ScreenLinkColor name={ name } />
|
|
193
|
+
<ScreenLinkColor name={ name } variation={ variation } />
|
|
102
194
|
</GlobalStylesNavigationScreen>
|
|
103
195
|
|
|
104
196
|
<GlobalStylesNavigationScreen
|
|
105
197
|
path={ parentMenu + '/colors/heading' }
|
|
106
198
|
>
|
|
107
|
-
<ScreenHeadingColor name={ name } />
|
|
199
|
+
<ScreenHeadingColor name={ name } variation={ variation } />
|
|
108
200
|
</GlobalStylesNavigationScreen>
|
|
109
201
|
|
|
110
202
|
<GlobalStylesNavigationScreen
|
|
111
203
|
path={ parentMenu + '/colors/button' }
|
|
112
204
|
>
|
|
113
|
-
<ScreenButtonColor name={ name } />
|
|
205
|
+
<ScreenButtonColor name={ name } variation={ variation } />
|
|
114
206
|
</GlobalStylesNavigationScreen>
|
|
115
207
|
|
|
116
208
|
<GlobalStylesNavigationScreen path={ parentMenu + '/border' }>
|
|
117
|
-
<ScreenBorder name={ name } />
|
|
209
|
+
<ScreenBorder name={ name } variation={ variation } />
|
|
118
210
|
</GlobalStylesNavigationScreen>
|
|
119
211
|
|
|
120
212
|
<GlobalStylesNavigationScreen path={ parentMenu + '/layout' }>
|
|
121
|
-
<ScreenLayout name={ name } />
|
|
213
|
+
<ScreenLayout name={ name } variation={ variation } />
|
|
122
214
|
</GlobalStylesNavigationScreen>
|
|
215
|
+
|
|
216
|
+
<GlobalStylesNavigationScreen path={ parentMenu + '/css' }>
|
|
217
|
+
<ScreenCSS name={ name } />
|
|
218
|
+
</GlobalStylesNavigationScreen>
|
|
219
|
+
|
|
220
|
+
{ !! blockStyleVariations?.length && (
|
|
221
|
+
<BlockStylesNavigationScreens
|
|
222
|
+
parentMenu={ parentMenu }
|
|
223
|
+
blockStyles={ blockStyleVariations }
|
|
224
|
+
blockName={ name }
|
|
225
|
+
/>
|
|
226
|
+
) }
|
|
123
227
|
</>
|
|
124
228
|
);
|
|
125
229
|
}
|
|
@@ -154,6 +258,7 @@ function GlobalStylesStyleBook( { onClose } ) {
|
|
|
154
258
|
|
|
155
259
|
function GlobalStylesUI( { isStyleBookOpened, onCloseStyleBook } ) {
|
|
156
260
|
const blocks = getBlockTypes();
|
|
261
|
+
|
|
157
262
|
return (
|
|
158
263
|
<NavigatorProvider
|
|
159
264
|
className="edit-site-global-styles-sidebar__navigator-provider"
|
|
@@ -186,17 +291,25 @@ function GlobalStylesUI( { isStyleBookOpened, onCloseStyleBook } ) {
|
|
|
186
291
|
<ContextScreens
|
|
187
292
|
key={ 'screens-block-' + block.name }
|
|
188
293
|
name={ block.name }
|
|
294
|
+
parentMenu={ '/blocks/' + encodeURIComponent( block.name ) }
|
|
189
295
|
/>
|
|
190
296
|
) ) }
|
|
191
297
|
|
|
298
|
+
{ blocks.map( ( block, index ) => {
|
|
299
|
+
return (
|
|
300
|
+
<BlockStyleVariationsScreens
|
|
301
|
+
key={ 'screens-block-styles-' + block.name + index }
|
|
302
|
+
name={ block.name }
|
|
303
|
+
/>
|
|
304
|
+
);
|
|
305
|
+
} ) }
|
|
192
306
|
{ isStyleBookOpened && (
|
|
193
307
|
<GlobalStylesStyleBook onClose={ onCloseStyleBook } />
|
|
194
308
|
) }
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
</GlobalStylesNavigationScreen>
|
|
309
|
+
|
|
310
|
+
<GlobalStylesActionMenu />
|
|
198
311
|
</NavigatorProvider>
|
|
199
312
|
);
|
|
200
313
|
}
|
|
201
|
-
|
|
314
|
+
export { GlobalStylesMenuSlot };
|
|
202
315
|
export default GlobalStylesUI;
|