@wordpress/edit-site 5.9.0 → 5.10.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 +2 -0
- package/build/components/add-new-template/add-custom-template-modal.js +21 -6
- package/build/components/add-new-template/add-custom-template-modal.js.map +1 -1
- package/build/components/add-new-template/new-template-part.js +8 -2
- package/build/components/add-new-template/new-template-part.js.map +1 -1
- package/build/components/add-new-template/new-template.js +6 -3
- package/build/components/add-new-template/new-template.js.map +1 -1
- package/build/components/app/index.js +8 -2
- package/build/components/app/index.js.map +1 -1
- package/build/components/block-editor/back-button.js +10 -3
- package/build/components/block-editor/back-button.js.map +1 -1
- package/build/components/block-editor/editor-canvas.js +39 -6
- package/build/components/block-editor/editor-canvas.js.map +1 -1
- package/build/components/editor/index.js +43 -9
- package/build/components/editor/index.js.map +1 -1
- package/build/components/editor-canvas-container/index.js +18 -4
- package/build/components/editor-canvas-container/index.js.map +1 -1
- package/build/components/global-styles/block-preview-panel.js +1 -1
- package/build/components/global-styles/block-preview-panel.js.map +1 -1
- package/build/components/global-styles/border-panel.js +3 -1
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-palette-panel.js +14 -3
- package/build/components/global-styles/color-palette-panel.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +17 -18
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/gradients-palette-panel.js +14 -3
- package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build/components/global-styles/root-menu.js +61 -0
- package/build/components/global-styles/root-menu.js.map +1 -0
- package/build/components/global-styles/screen-block-list.js +3 -1
- package/build/components/global-styles/screen-block-list.js.map +1 -1
- package/build/components/global-styles/screen-block.js +158 -7
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-colors.js +9 -26
- package/build/components/global-styles/screen-colors.js.map +1 -1
- package/build/components/global-styles/screen-css.js +20 -15
- package/build/components/global-styles/screen-css.js.map +1 -1
- package/build/components/global-styles/screen-layout.js +4 -17
- package/build/components/global-styles/screen-layout.js.map +1 -1
- package/build/components/global-styles/screen-revisions/index.js +148 -0
- package/build/components/global-styles/screen-revisions/index.js.map +1 -0
- package/build/components/global-styles/screen-revisions/revisions-buttons.js +132 -0
- package/build/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -0
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js +130 -0
- package/build/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -0
- package/build/components/global-styles/screen-root.js +2 -2
- package/build/components/global-styles/screen-root.js.map +1 -1
- package/build/components/global-styles/screen-typography-element.js +0 -3
- package/build/components/global-styles/screen-typography-element.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +11 -39
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/style-variations-container.js +3 -8
- package/build/components/global-styles/style-variations-container.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +7 -11
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/ui.js +61 -108
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles/variations-panel.js +4 -28
- package/build/components/global-styles/variations-panel.js.map +1 -1
- package/build/components/header-edit-mode/index.js +1 -1
- package/build/components/header-edit-mode/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/register.js +1 -1
- package/build/components/keyboard-shortcuts/register.js.map +1 -1
- package/build/components/layout/index.js +13 -7
- package/build/components/layout/index.js.map +1 -1
- package/build/components/list/index.js +9 -3
- package/build/components/list/index.js.map +1 -1
- package/build/components/list/table.js +1 -1
- package/build/components/list/table.js.map +1 -1
- package/build/components/plugin-template-setting-panel/index.js +44 -0
- package/build/components/plugin-template-setting-panel/index.js.map +1 -0
- package/build/components/revisions/index.js +95 -0
- package/build/components/revisions/index.js.map +1 -0
- package/build/components/routes/link.js +17 -2
- package/build/components/routes/link.js.map +1 -1
- package/build/components/routes/use-title.js +8 -2
- package/build/components/routes/use-title.js.map +1 -1
- package/build/components/save-button/index.js +31 -6
- package/build/components/save-button/index.js.map +1 -1
- package/build/components/save-hub/index.js +14 -31
- package/build/components/save-hub/index.js.map +1 -1
- package/build/components/save-panel/index.js +20 -7
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.js +2 -7
- package/build/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build/components/sidebar/index.js +16 -2
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js +9 -3
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build/components/sidebar-edit-mode/index.js +9 -2
- package/build/components/sidebar-edit-mode/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js +40 -0
- package/build/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -0
- package/build/components/sidebar-edit-mode/template-card/index.js +1 -8
- package/build/components/sidebar-edit-mode/template-card/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/{template-card/last-revision.js → template-revisions/index.js} +1 -1
- package/build/components/sidebar-edit-mode/template-revisions/index.js.map +1 -0
- package/build/components/sidebar-navigation-item/index.js +5 -7
- package/build/components/sidebar-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +14 -4
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/index.js +24 -7
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-item/index.js +1 -1
- package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js +17 -5
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +3 -3
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/index.js +67 -0
- package/build/components/sidebar-navigation-screen-page/index.js.map +1 -0
- package/build/components/sidebar-navigation-screen-pages/index.js +74 -0
- package/build/components/sidebar-navigation-screen-pages/index.js.map +1 -0
- package/build/components/sidebar-navigation-screen-templates/index.js +5 -3
- package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build/components/sidebar-navigation-subtitle/index.js +18 -0
- package/build/components/sidebar-navigation-subtitle/index.js.map +1 -0
- package/build/components/site-hub/index.js +36 -6
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/start-template-options/index.js +12 -16
- package/build/components/start-template-options/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +8 -2
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +9 -4
- package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
- package/build/components/sync-state-with-url/use-sync-path-with-url.js +17 -3
- package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
- package/build/components/template-details/template-areas.js +9 -3
- package/build/components/template-details/template-areas.js.map +1 -1
- package/build/hooks/template-part-edit.js +8 -2
- package/build/hooks/template-part-edit.js.map +1 -1
- package/build/index.js +8 -0
- package/build/index.js.map +1 -1
- package/build/utils/is-previewing-theme.js +27 -0
- package/build/utils/is-previewing-theme.js.map +1 -0
- package/build/utils/use-activate-theme.js +46 -0
- package/build/utils/use-activate-theme.js.map +1 -0
- package/build-module/components/add-new-template/add-custom-template-modal.js +21 -6
- 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 -1
- package/build-module/components/add-new-template/new-template-part.js.map +1 -1
- package/build-module/components/add-new-template/new-template.js +4 -1
- package/build-module/components/add-new-template/new-template.js.map +1 -1
- package/build-module/components/app/index.js +6 -2
- package/build-module/components/app/index.js.map +1 -1
- package/build-module/components/block-editor/back-button.js +6 -1
- package/build-module/components/block-editor/back-button.js.map +1 -1
- package/build-module/components/block-editor/editor-canvas.js +37 -6
- package/build-module/components/block-editor/editor-canvas.js.map +1 -1
- package/build-module/components/editor/index.js +45 -11
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/editor-canvas-container/index.js +21 -6
- package/build-module/components/editor-canvas-container/index.js.map +1 -1
- package/build-module/components/global-styles/block-preview-panel.js +1 -1
- package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +3 -1
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-palette-panel.js +13 -3
- package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +17 -18
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/gradients-palette-panel.js +13 -3
- package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/root-menu.js +47 -0
- package/build-module/components/global-styles/root-menu.js.map +1 -0
- package/build-module/components/global-styles/screen-block-list.js +4 -2
- package/build-module/components/global-styles/screen-block-list.js.map +1 -1
- package/build-module/components/global-styles/screen-block.js +151 -7
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-colors.js +9 -25
- package/build-module/components/global-styles/screen-colors.js.map +1 -1
- package/build-module/components/global-styles/screen-css.js +20 -15
- package/build-module/components/global-styles/screen-css.js.map +1 -1
- package/build-module/components/global-styles/screen-layout.js +4 -16
- package/build-module/components/global-styles/screen-layout.js.map +1 -1
- package/build-module/components/global-styles/screen-revisions/index.js +128 -0
- package/build-module/components/global-styles/screen-revisions/index.js.map +1 -0
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js +121 -0
- package/build-module/components/global-styles/screen-revisions/revisions-buttons.js.map +1 -0
- package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js +116 -0
- package/build-module/components/global-styles/screen-revisions/use-global-styles-revisions.js.map +1 -0
- package/build-module/components/global-styles/screen-root.js +2 -2
- package/build-module/components/global-styles/screen-root.js.map +1 -1
- package/build-module/components/global-styles/screen-typography-element.js +0 -3
- package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js +11 -37
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/style-variations-container.js +3 -7
- package/build-module/components/global-styles/style-variations-container.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +7 -11
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/ui.js +61 -105
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles/variations-panel.js +3 -22
- package/build-module/components/global-styles/variations-panel.js.map +1 -1
- package/build-module/components/header-edit-mode/index.js +2 -2
- package/build-module/components/header-edit-mode/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/register.js +1 -1
- package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
- package/build-module/components/layout/index.js +9 -3
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/list/index.js +5 -1
- package/build-module/components/list/index.js.map +1 -1
- package/build-module/components/list/table.js +1 -1
- package/build-module/components/list/table.js.map +1 -1
- package/build-module/components/plugin-template-setting-panel/index.js +35 -0
- package/build-module/components/plugin-template-setting-panel/index.js.map +1 -0
- package/build-module/components/revisions/index.js +77 -0
- package/build-module/components/revisions/index.js.map +1 -0
- package/build-module/components/routes/link.js +13 -1
- package/build-module/components/routes/link.js.map +1 -1
- package/build-module/components/routes/use-title.js +5 -1
- package/build-module/components/routes/use-title.js.map +1 -1
- package/build-module/components/save-button/index.js +28 -6
- package/build-module/components/save-button/index.js.map +1 -1
- package/build-module/components/save-hub/index.js +13 -32
- package/build-module/components/save-hub/index.js.map +1 -1
- package/build-module/components/save-panel/index.js +19 -7
- package/build-module/components/save-panel/index.js.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.js +3 -8
- package/build-module/components/secondary-sidebar/list-view-sidebar.js.map +1 -1
- package/build-module/components/sidebar/index.js +11 -1
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +9 -3
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/index.js +10 -5
- package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js +29 -0
- package/build-module/components/sidebar-edit-mode/sidebar-fixed-bottom.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/template-card/index.js +2 -7
- package/build-module/components/sidebar-edit-mode/template-card/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/{template-card/last-revision.js → template-revisions/index.js} +1 -1
- package/build-module/components/sidebar-edit-mode/template-revisions/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-item/index.js +6 -8
- package/build-module/components/sidebar-navigation-item/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +13 -5
- package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +25 -8
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +13 -3
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +3 -3
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/index.js +48 -0
- package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-pages/index.js +57 -0
- package/build-module/components/sidebar-navigation-screen-pages/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-templates/index.js +5 -3
- package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-subtitle/index.js +10 -0
- package/build-module/components/sidebar-navigation-subtitle/index.js.map +1 -0
- package/build-module/components/site-hub/index.js +34 -6
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/start-template-options/index.js +13 -17
- package/build-module/components/start-template-options/index.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +5 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +5 -1
- package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +13 -1
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
- package/build-module/components/template-details/template-areas.js +5 -1
- package/build-module/components/template-details/template-areas.js.map +1 -1
- package/build-module/hooks/template-part-edit.js +5 -1
- package/build-module/hooks/template-part-edit.js.map +1 -1
- package/build-module/index.js +1 -0
- package/build-module/index.js.map +1 -1
- package/build-module/utils/is-previewing-theme.js +17 -0
- package/build-module/utils/is-previewing-theme.js.map +1 -0
- package/build-module/utils/use-activate-theme.js +36 -0
- package/build-module/utils/use-activate-theme.js.map +1 -0
- package/build-style/style-rtl.css +199 -78
- package/build-style/style.css +199 -78
- package/package.json +36 -34
- package/src/components/add-new-template/add-custom-template-modal.js +31 -8
- package/src/components/add-new-template/new-template-part.js +4 -1
- package/src/components/add-new-template/new-template.js +3 -1
- package/src/components/add-new-template/style.scss +52 -48
- package/src/components/app/index.js +6 -3
- package/src/components/block-editor/back-button.js +4 -1
- package/src/components/block-editor/editor-canvas.js +36 -8
- package/src/components/block-editor/style.scss +15 -8
- package/src/components/editor/index.js +48 -7
- package/src/components/editor-canvas-container/index.js +30 -17
- package/src/components/global-styles/block-preview-panel.js +1 -1
- package/src/components/global-styles/border-panel.js +3 -1
- package/src/components/global-styles/color-palette-panel.js +9 -0
- package/src/components/global-styles/dimensions-panel.js +15 -15
- package/src/components/global-styles/gradients-palette-panel.js +8 -0
- package/src/components/global-styles/root-menu.js +66 -0
- package/src/components/global-styles/screen-block-list.js +2 -2
- package/src/components/global-styles/screen-block.js +184 -7
- package/src/components/global-styles/screen-colors.js +9 -16
- package/src/components/global-styles/screen-css.js +21 -21
- package/src/components/global-styles/screen-layout.js +5 -9
- package/src/components/global-styles/screen-revisions/index.js +177 -0
- package/src/components/global-styles/screen-revisions/revisions-buttons.js +131 -0
- package/src/components/global-styles/screen-revisions/style.scss +99 -0
- package/src/components/global-styles/screen-revisions/test/use-global-styles-revisions.js +125 -0
- package/src/components/global-styles/screen-revisions/use-global-styles-revisions.js +103 -0
- package/src/components/global-styles/screen-root.js +2 -2
- package/src/components/global-styles/screen-typography-element.js +1 -3
- package/src/components/global-styles/screen-typography.js +44 -79
- package/src/components/global-styles/style-variations-container.js +4 -10
- package/src/components/global-styles/style.scss +1 -23
- package/src/components/global-styles/typography-panel.js +12 -13
- package/src/components/global-styles/ui.js +72 -101
- package/src/components/global-styles/variations-panel.js +3 -26
- package/src/components/header-edit-mode/index.js +5 -2
- package/src/components/keyboard-shortcuts/register.js +1 -1
- package/src/components/layout/index.js +7 -3
- package/src/components/layout/style.scss +2 -4
- package/src/components/list/index.js +4 -1
- package/src/components/list/style.scss +4 -0
- package/src/components/list/table.js +3 -1
- package/src/components/plugin-template-setting-panel/index.js +33 -0
- package/src/components/revisions/index.js +104 -0
- package/src/components/routes/link.js +16 -1
- package/src/components/routes/use-title.js +4 -1
- package/src/components/save-button/index.js +27 -6
- package/src/components/save-hub/index.js +17 -35
- package/src/components/save-panel/index.js +15 -3
- package/src/components/secondary-sidebar/list-view-sidebar.js +2 -6
- package/src/components/sidebar/index.js +12 -1
- package/src/components/sidebar-edit-mode/global-styles-sidebar.js +9 -7
- package/src/components/sidebar-edit-mode/index.js +17 -6
- package/src/components/sidebar-edit-mode/sidebar-fixed-bottom.js +26 -0
- package/src/components/sidebar-edit-mode/style.scss +10 -0
- package/src/components/sidebar-edit-mode/template-card/index.js +1 -9
- package/src/components/sidebar-navigation-item/index.js +13 -14
- package/src/components/sidebar-navigation-item/style.scss +8 -1
- package/src/components/sidebar-navigation-screen/index.js +26 -5
- package/src/components/sidebar-navigation-screen-main/index.js +43 -22
- package/src/components/sidebar-navigation-screen-navigation-item/index.js +3 -9
- package/src/components/sidebar-navigation-screen-navigation-menus/index.js +13 -1
- package/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +3 -3
- package/src/components/sidebar-navigation-screen-page/index.js +59 -0
- package/src/components/sidebar-navigation-screen-pages/index.js +82 -0
- package/src/components/sidebar-navigation-screen-pages/style.scss +4 -0
- package/src/components/sidebar-navigation-screen-templates/index.js +5 -1
- package/src/components/sidebar-navigation-subtitle/index.js +5 -0
- package/src/components/sidebar-navigation-subtitle/style.scss +7 -0
- package/src/components/site-hub/index.js +89 -58
- package/src/components/site-hub/style.scss +8 -0
- package/src/components/start-template-options/index.js +19 -27
- package/src/components/start-template-options/style.scss +29 -21
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +4 -1
- package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +3 -1
- package/src/components/sync-state-with-url/use-sync-path-with-url.js +14 -1
- package/src/components/template-details/template-areas.js +4 -1
- package/src/hooks/template-part-edit.js +4 -1
- package/src/index.js +1 -0
- package/src/store/test/actions.js +6 -14
- package/src/style.scss +4 -1
- package/src/utils/is-previewing-theme.js +18 -0
- package/src/utils/use-activate-theme.js +38 -0
- package/build/components/global-styles/context-menu.js +0 -126
- package/build/components/global-styles/context-menu.js.map +0 -1
- package/build/components/global-styles/custom-css.js +0 -113
- package/build/components/global-styles/custom-css.js.map +0 -1
- package/build/components/global-styles/effects-panel.js +0 -53
- package/build/components/global-styles/effects-panel.js.map +0 -1
- package/build/components/global-styles/filters-panel.js +0 -50
- package/build/components/global-styles/filters-panel.js.map +0 -1
- package/build/components/global-styles/screen-border.js +0 -61
- package/build/components/global-styles/screen-border.js.map +0 -1
- package/build/components/global-styles/screen-effects.js +0 -61
- package/build/components/global-styles/screen-effects.js.map +0 -1
- package/build/components/global-styles/screen-filters.js +0 -46
- package/build/components/global-styles/screen-filters.js.map +0 -1
- package/build/components/global-styles/screen-variations.js +0 -71
- package/build/components/global-styles/screen-variations.js.map +0 -1
- package/build/components/routes/index.js +0 -60
- package/build/components/routes/index.js.map +0 -1
- package/build/components/sidebar-edit-mode/template-card/last-revision.js.map +0 -1
- package/build/hooks/commands/index.js +0 -19
- package/build/hooks/commands/index.js.map +0 -1
- package/build/hooks/commands/use-navigation-commands.js +0 -126
- package/build/hooks/commands/use-navigation-commands.js.map +0 -1
- package/build/hooks/commands/use-wp-admin-commands.js +0 -97
- package/build/hooks/commands/use-wp-admin-commands.js.map +0 -1
- package/build/utils/history.js +0 -41
- package/build/utils/history.js.map +0 -1
- package/build-module/components/global-styles/context-menu.js +0 -107
- package/build-module/components/global-styles/context-menu.js.map +0 -1
- package/build-module/components/global-styles/custom-css.js +0 -98
- package/build-module/components/global-styles/custom-css.js.map +0 -1
- package/build-module/components/global-styles/effects-panel.js +0 -43
- package/build-module/components/global-styles/effects-panel.js.map +0 -1
- package/build-module/components/global-styles/filters-panel.js +0 -40
- package/build-module/components/global-styles/filters-panel.js.map +0 -1
- package/build-module/components/global-styles/screen-border.js +0 -44
- package/build-module/components/global-styles/screen-border.js.map +0 -1
- package/build-module/components/global-styles/screen-effects.js +0 -44
- package/build-module/components/global-styles/screen-effects.js.map +0 -1
- package/build-module/components/global-styles/screen-filters.js +0 -33
- package/build-module/components/global-styles/screen-filters.js.map +0 -1
- package/build-module/components/global-styles/screen-variations.js +0 -54
- package/build-module/components/global-styles/screen-variations.js.map +0 -1
- package/build-module/components/routes/index.js +0 -47
- package/build-module/components/routes/index.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/template-card/last-revision.js.map +0 -1
- package/build-module/hooks/commands/index.js +0 -10
- package/build-module/hooks/commands/index.js.map +0 -1
- package/build-module/hooks/commands/use-navigation-commands.js +0 -109
- package/build-module/hooks/commands/use-navigation-commands.js.map +0 -1
- package/build-module/hooks/commands/use-wp-admin-commands.js +0 -81
- package/build-module/hooks/commands/use-wp-admin-commands.js.map +0 -1
- package/build-module/utils/history.js +0 -31
- package/build-module/utils/history.js.map +0 -1
- package/src/components/global-styles/context-menu.js +0 -175
- package/src/components/global-styles/custom-css.js +0 -131
- package/src/components/global-styles/effects-panel.js +0 -40
- package/src/components/global-styles/filters-panel.js +0 -39
- package/src/components/global-styles/screen-border.js +0 -35
- package/src/components/global-styles/screen-effects.js +0 -35
- package/src/components/global-styles/screen-filters.js +0 -27
- package/src/components/global-styles/screen-variations.js +0 -46
- package/src/components/routes/index.js +0 -53
- package/src/hooks/commands/index.js +0 -10
- package/src/hooks/commands/use-navigation-commands.js +0 -112
- package/src/hooks/commands/use-wp-admin-commands.js +0 -79
- package/src/utils/history.js +0 -39
- /package/src/components/sidebar-edit-mode/{template-card/last-revision.js → template-revisions/index.js} +0 -0
|
@@ -21,12 +21,8 @@ var _navigationButton = require("./navigation-button");
|
|
|
21
21
|
|
|
22
22
|
var _subtitle = _interopRequireDefault(require("./subtitle"));
|
|
23
23
|
|
|
24
|
-
var _typographyPanel = _interopRequireDefault(require("./typography-panel"));
|
|
25
|
-
|
|
26
24
|
var _blockPreviewPanel = _interopRequireDefault(require("./block-preview-panel"));
|
|
27
25
|
|
|
28
|
-
var _utils = require("./utils");
|
|
29
|
-
|
|
30
26
|
var _privateApis = require("../../private-apis");
|
|
31
27
|
|
|
32
28
|
/**
|
|
@@ -42,28 +38,21 @@ const {
|
|
|
42
38
|
|
|
43
39
|
function Item(_ref) {
|
|
44
40
|
let {
|
|
45
|
-
name,
|
|
46
41
|
parentMenu,
|
|
47
42
|
element,
|
|
48
43
|
label
|
|
49
44
|
} = _ref;
|
|
50
|
-
const hasSupport = !name;
|
|
51
45
|
const prefix = element === 'text' || !element ? '' : `elements.${element}.`;
|
|
52
46
|
const extraStyles = element === 'link' ? {
|
|
53
47
|
textDecoration: 'underline'
|
|
54
48
|
} : {};
|
|
55
|
-
const [fontFamily] = useGlobalStyle(prefix + 'typography.fontFamily'
|
|
56
|
-
const [fontStyle] = useGlobalStyle(prefix + 'typography.fontStyle'
|
|
57
|
-
const [fontWeight] = useGlobalStyle(prefix + 'typography.fontWeight'
|
|
58
|
-
const [letterSpacing] = useGlobalStyle(prefix + 'typography.letterSpacing'
|
|
59
|
-
const [backgroundColor] = useGlobalStyle(prefix + 'color.background'
|
|
60
|
-
const [gradientValue] = useGlobalStyle(prefix + 'color.gradient'
|
|
61
|
-
const [color] = useGlobalStyle(prefix + 'color.text'
|
|
62
|
-
|
|
63
|
-
if (!hasSupport) {
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
|
|
49
|
+
const [fontFamily] = useGlobalStyle(prefix + 'typography.fontFamily');
|
|
50
|
+
const [fontStyle] = useGlobalStyle(prefix + 'typography.fontStyle');
|
|
51
|
+
const [fontWeight] = useGlobalStyle(prefix + 'typography.fontWeight');
|
|
52
|
+
const [letterSpacing] = useGlobalStyle(prefix + 'typography.letterSpacing');
|
|
53
|
+
const [backgroundColor] = useGlobalStyle(prefix + 'color.background');
|
|
54
|
+
const [gradientValue] = useGlobalStyle(prefix + 'color.gradient');
|
|
55
|
+
const [color] = useGlobalStyle(prefix + 'color.text');
|
|
67
56
|
const navigationButtonLabel = (0, _i18n.sprintf)( // translators: %s: is a subset of Typography, e.g., 'text' or 'links'.
|
|
68
57
|
(0, _i18n.__)('Typography %s styles'), label);
|
|
69
58
|
return (0, _element.createElement)(_navigationButton.NavigationButtonAsItem, {
|
|
@@ -85,20 +74,12 @@ function Item(_ref) {
|
|
|
85
74
|
}, (0, _i18n.__)('Aa')), (0, _element.createElement)(_components.FlexItem, null, label)));
|
|
86
75
|
}
|
|
87
76
|
|
|
88
|
-
function ScreenTypography(
|
|
89
|
-
|
|
90
|
-
name,
|
|
91
|
-
variation = ''
|
|
92
|
-
} = _ref2;
|
|
93
|
-
const parentMenu = name === undefined ? '' : '/blocks/' + name;
|
|
94
|
-
const variationClassName = (0, _utils.getVariationClassName)(variation);
|
|
77
|
+
function ScreenTypography() {
|
|
78
|
+
const parentMenu = '';
|
|
95
79
|
return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_header.default, {
|
|
96
80
|
title: (0, _i18n.__)('Typography'),
|
|
97
81
|
description: (0, _i18n.__)('Manage the typography settings for different elements.')
|
|
98
|
-
}), (0, _element.createElement)(_blockPreviewPanel.default, {
|
|
99
|
-
name: name,
|
|
100
|
-
variation: variationClassName
|
|
101
|
-
}), !name && (0, _element.createElement)("div", {
|
|
82
|
+
}), (0, _element.createElement)(_blockPreviewPanel.default, null), (0, _element.createElement)("div", {
|
|
102
83
|
className: "edit-site-global-styles-screen-typography"
|
|
103
84
|
}, (0, _element.createElement)(_components.__experimentalVStack, {
|
|
104
85
|
spacing: 3
|
|
@@ -108,35 +89,26 @@ function ScreenTypography(_ref2) {
|
|
|
108
89
|
isBordered: true,
|
|
109
90
|
isSeparated: true
|
|
110
91
|
}, (0, _element.createElement)(Item, {
|
|
111
|
-
name: name,
|
|
112
92
|
parentMenu: parentMenu,
|
|
113
93
|
element: "text",
|
|
114
94
|
label: (0, _i18n.__)('Text')
|
|
115
95
|
}), (0, _element.createElement)(Item, {
|
|
116
|
-
name: name,
|
|
117
96
|
parentMenu: parentMenu,
|
|
118
97
|
element: "link",
|
|
119
98
|
label: (0, _i18n.__)('Links')
|
|
120
99
|
}), (0, _element.createElement)(Item, {
|
|
121
|
-
name: name,
|
|
122
100
|
parentMenu: parentMenu,
|
|
123
101
|
element: "heading",
|
|
124
102
|
label: (0, _i18n.__)('Headings')
|
|
125
103
|
}), (0, _element.createElement)(Item, {
|
|
126
|
-
name: name,
|
|
127
104
|
parentMenu: parentMenu,
|
|
128
105
|
element: "caption",
|
|
129
106
|
label: (0, _i18n.__)('Captions')
|
|
130
107
|
}), (0, _element.createElement)(Item, {
|
|
131
|
-
name: name,
|
|
132
108
|
parentMenu: parentMenu,
|
|
133
109
|
element: "button",
|
|
134
110
|
label: (0, _i18n.__)('Buttons')
|
|
135
|
-
}))))
|
|
136
|
-
name: name,
|
|
137
|
-
variation: variation,
|
|
138
|
-
element: "text"
|
|
139
|
-
}));
|
|
111
|
+
})))));
|
|
140
112
|
}
|
|
141
113
|
|
|
142
114
|
var _default = ScreenTypography;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-typography.js"],"names":["useGlobalStyle","blockEditorPrivateApis","Item","
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/screen-typography.js"],"names":["useGlobalStyle","blockEditorPrivateApis","Item","parentMenu","element","label","prefix","extraStyles","textDecoration","fontFamily","fontStyle","fontWeight","letterSpacing","backgroundColor","gradientValue","color","navigationButtonLabel","background","ScreenTypography"],"mappings":"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","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tFlexItem,\n} from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport Subtitle from './subtitle';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../private-apis';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction Item( { parentMenu, element, label } ) {\n\tconst prefix =\n\t\telement === 'text' || ! element ? '' : `elements.${ element }.`;\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\tconst [ fontFamily ] = useGlobalStyle( prefix + 'typography.fontFamily' );\n\tconst [ fontStyle ] = useGlobalStyle( prefix + 'typography.fontStyle' );\n\tconst [ fontWeight ] = useGlobalStyle( prefix + 'typography.fontWeight' );\n\tconst [ letterSpacing ] = useGlobalStyle(\n\t\tprefix + 'typography.letterSpacing'\n\t);\n\tconst [ backgroundColor ] = useGlobalStyle( prefix + 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient' );\n\tconst [ color ] = useGlobalStyle( prefix + 'color.text' );\n\n\tconst navigationButtonLabel = sprintf(\n\t\t// translators: %s: is a subset of Typography, e.g., 'text' or 'links'.\n\t\t__( 'Typography %s styles' ),\n\t\tlabel\n\t);\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ parentMenu + '/typography/' + element }\n\t\t\taria-label={ navigationButtonLabel }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem\n\t\t\t\t\tclassName=\"edit-site-global-styles-screen-typography__indicator\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\t\t\tbackground: gradientValue ?? backgroundColor,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tfontStyle,\n\t\t\t\t\t\tfontWeight,\n\t\t\t\t\t\tletterSpacing,\n\t\t\t\t\t\t...extraStyles,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Aa' ) }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>{ label }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction ScreenTypography() {\n\tconst parentMenu = '';\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Manage the typography settings for different elements.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<BlockPreviewPanel />\n\n\t\t\t<div className=\"edit-site-global-styles-screen-typography\">\n\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t<Subtitle level={ 3 }>{ __( 'Elements' ) }</Subtitle>\n\t\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"text\"\n\t\t\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"link\"\n\t\t\t\t\t\t\tlabel={ __( 'Links' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"heading\"\n\t\t\t\t\t\t\tlabel={ __( 'Headings' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"caption\"\n\t\t\t\t\t\t\tlabel={ __( 'Captions' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Item\n\t\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\t\telement=\"button\"\n\t\t\t\t\t\t\tlabel={ __( 'Buttons' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ItemGroup>\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenTypography;\n"]}
|
|
@@ -11,8 +11,6 @@ var _element = require("@wordpress/element");
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
-
var _es = _interopRequireDefault(require("fast-deep-equal/es6"));
|
|
15
|
-
|
|
16
14
|
var _coreData = require("@wordpress/core-data");
|
|
17
15
|
|
|
18
16
|
var _data = require("@wordpress/data");
|
|
@@ -43,13 +41,10 @@ var _privateApis = require("../../private-apis");
|
|
|
43
41
|
* Internal dependencies
|
|
44
42
|
*/
|
|
45
43
|
const {
|
|
46
|
-
GlobalStylesContext
|
|
44
|
+
GlobalStylesContext,
|
|
45
|
+
areGlobalStyleConfigsEqual
|
|
47
46
|
} = (0, _privateApis.unlock)(_blockEditor.privateApis);
|
|
48
47
|
|
|
49
|
-
function compareVariations(a, b) {
|
|
50
|
-
return (0, _es.default)(a.styles, b.styles) && (0, _es.default)(a.settings, b.settings);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
48
|
function Variation(_ref) {
|
|
54
49
|
let {
|
|
55
50
|
variation
|
|
@@ -91,7 +86,7 @@ function Variation(_ref) {
|
|
|
91
86
|
};
|
|
92
87
|
|
|
93
88
|
const isActive = (0, _element.useMemo)(() => {
|
|
94
|
-
return
|
|
89
|
+
return areGlobalStyleConfigsEqual(user, variation);
|
|
95
90
|
}, [user, variation]);
|
|
96
91
|
return (0, _element.createElement)(GlobalStylesContext.Provider, {
|
|
97
92
|
value: context
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/style-variations-container.js"],"names":["GlobalStylesContext","
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/style-variations-container.js"],"names":["GlobalStylesContext","areGlobalStyleConfigsEqual","blockEditorPrivateApis","Variation","variation","isFocused","setIsFocused","base","user","setUserConfig","context","settings","styles","merged","selectVariation","selectOnEnter","event","keyCode","ENTER","preventDefault","isActive","title","StyleVariationsContainer","variations","select","coreStore","__experimentalGetCurrentThemeGlobalStylesVariations","withEmptyVariation","map","index"],"mappings":"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","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo, useContext, useState } from '@wordpress/element';\nimport { ENTER } from '@wordpress/keycodes';\nimport { __experimentalGrid as Grid } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from './global-styles-provider';\nimport StylesPreview from './preview';\nimport { unlock } from '../../private-apis';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction Variation( { variation } ) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst { base, user, setUserConfig } = useContext( GlobalStylesContext );\n\tconst context = useMemo( () => {\n\t\treturn {\n\t\t\tuser: {\n\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\tstyles: variation.styles ?? {},\n\t\t\t},\n\t\t\tbase,\n\t\t\tmerged: mergeBaseAndUserConfigs( base, variation ),\n\t\t\tsetUserConfig: () => {},\n\t\t};\n\t}, [ variation, base ] );\n\n\tconst selectVariation = () => {\n\t\tsetUserConfig( () => {\n\t\t\treturn {\n\t\t\t\tsettings: variation.settings,\n\t\t\t\tstyles: variation.styles,\n\t\t\t};\n\t\t} );\n\t};\n\n\tconst selectOnEnter = ( event ) => {\n\t\tif ( event.keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\t\t\tselectVariation();\n\t\t}\n\t};\n\n\tconst isActive = useMemo( () => {\n\t\treturn areGlobalStyleConfigsEqual( user, variation );\n\t}, [ user, variation ] );\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ context }>\n\t\t\t<div\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'edit-site-global-styles-variations_item',\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-active': isActive,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\trole=\"button\"\n\t\t\t\tonClick={ selectVariation }\n\t\t\t\tonKeyDown={ selectOnEnter }\n\t\t\t\ttabIndex=\"0\"\n\t\t\t\taria-label={ variation?.title }\n\t\t\t\taria-current={ isActive }\n\t\t\t\tonFocus={ () => setIsFocused( true ) }\n\t\t\t\tonBlur={ () => setIsFocused( false ) }\n\t\t\t>\n\t\t\t\t<div className=\"edit-site-global-styles-variations_item-preview\">\n\t\t\t\t\t<StylesPreview\n\t\t\t\t\t\tlabel={ variation?.title }\n\t\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\t\twithHoverView\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n\nexport default function StyleVariationsContainer() {\n\tconst { variations } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tvariations:\n\t\t\t\tselect(\n\t\t\t\t\tcoreStore\n\t\t\t\t).__experimentalGetCurrentThemeGlobalStylesVariations() || [],\n\t\t};\n\t}, [] );\n\n\tconst withEmptyVariation = useMemo( () => {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttitle: __( 'Default' ),\n\t\t\t\tsettings: {},\n\t\t\t\tstyles: {},\n\t\t\t},\n\t\t\t...variations.map( ( variation ) => ( {\n\t\t\t\t...variation,\n\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\tstyles: variation.styles ?? {},\n\t\t\t} ) ),\n\t\t];\n\t}, [ variations ] );\n\n\treturn (\n\t\t<>\n\t\t\t<Grid\n\t\t\t\tcolumns={ 2 }\n\t\t\t\tclassName=\"edit-site-global-styles-style-variations-container\"\n\t\t\t>\n\t\t\t\t{ withEmptyVariation?.map( ( variation, index ) => (\n\t\t\t\t\t<Variation key={ index } variation={ variation } />\n\t\t\t\t) ) }\n\t\t\t</Grid>\n\t\t</>\n\t);\n}\n"]}
|
|
@@ -27,10 +27,8 @@ const {
|
|
|
27
27
|
|
|
28
28
|
function TypographyPanel(_ref) {
|
|
29
29
|
let {
|
|
30
|
-
name,
|
|
31
30
|
element,
|
|
32
|
-
headingLevel
|
|
33
|
-
variation = ''
|
|
31
|
+
headingLevel
|
|
34
32
|
} = _ref;
|
|
35
33
|
let prefixParts = [];
|
|
36
34
|
|
|
@@ -40,18 +38,16 @@ function TypographyPanel(_ref) {
|
|
|
40
38
|
prefixParts = prefixParts.concat(['elements', element]);
|
|
41
39
|
}
|
|
42
40
|
|
|
43
|
-
if (variation) {
|
|
44
|
-
prefixParts = ['variations', variation].concat(prefixParts);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
41
|
const prefix = prefixParts.join('.');
|
|
48
|
-
const [style] = useGlobalStyle(prefix,
|
|
49
|
-
|
|
42
|
+
const [style] = useGlobalStyle(prefix, undefined, 'user', {
|
|
43
|
+
shouldDecodeEncode: false
|
|
44
|
+
});
|
|
45
|
+
const [inheritedStyle, setStyle] = useGlobalStyle(prefix, undefined, 'all', {
|
|
50
46
|
shouldDecodeEncode: false
|
|
51
47
|
});
|
|
52
|
-
const [rawSettings] = useGlobalSetting(''
|
|
48
|
+
const [rawSettings] = useGlobalSetting('');
|
|
53
49
|
const usedElement = element === 'heading' ? headingLevel : element;
|
|
54
|
-
const settings = useSettingsForBlockElement(rawSettings,
|
|
50
|
+
const settings = useSettingsForBlockElement(rawSettings, undefined, usedElement);
|
|
55
51
|
return (0, _element.createElement)(StylesTypographyPanel, {
|
|
56
52
|
inheritedValue: inheritedStyle,
|
|
57
53
|
value: style,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/typography-panel.js"],"names":["useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","TypographyPanel","StylesTypographyPanel","blockEditorPrivateApis","
|
|
1
|
+
{"version":3,"sources":["@wordpress/edit-site/src/components/global-styles/typography-panel.js"],"names":["useGlobalStyle","useGlobalSetting","useSettingsForBlockElement","TypographyPanel","StylesTypographyPanel","blockEditorPrivateApis","element","headingLevel","prefixParts","concat","prefix","join","style","undefined","shouldDecodeEncode","inheritedStyle","setStyle","rawSettings","usedElement","settings"],"mappings":";;;;;;;;;AAGA;;AAKA;;AARA;AACA;AACA;;AAGA;AACA;AACA;AAGA,MAAM;AACLA,EAAAA,cADK;AAELC,EAAAA,gBAFK;AAGLC,EAAAA,0BAHK;AAILC,EAAAA,eAAe,EAAEC;AAJZ,IAKF,yBAAQC,wBAAR,CALJ;;AAOe,SAASF,eAAT,OAAsD;AAAA,MAA5B;AAAEG,IAAAA,OAAF;AAAWC,IAAAA;AAAX,GAA4B;AACpE,MAAIC,WAAW,GAAG,EAAlB;;AACA,MAAKF,OAAO,KAAK,SAAjB,EAA6B;AAC5BE,IAAAA,WAAW,GAAGA,WAAW,CAACC,MAAZ,CAAoB,CAAE,UAAF,EAAcF,YAAd,CAApB,CAAd;AACA,GAFD,MAEO,IAAKD,OAAO,IAAIA,OAAO,KAAK,MAA5B,EAAqC;AAC3CE,IAAAA,WAAW,GAAGA,WAAW,CAACC,MAAZ,CAAoB,CAAE,UAAF,EAAcH,OAAd,CAApB,CAAd;AACA;;AACD,QAAMI,MAAM,GAAGF,WAAW,CAACG,IAAZ,CAAkB,GAAlB,CAAf;AAEA,QAAM,CAAEC,KAAF,IAAYZ,cAAc,CAAEU,MAAF,EAAUG,SAAV,EAAqB,MAArB,EAA6B;AAC5DC,IAAAA,kBAAkB,EAAE;AADwC,GAA7B,CAAhC;AAGA,QAAM,CAAEC,cAAF,EAAkBC,QAAlB,IAA+BhB,cAAc,CAClDU,MADkD,EAElDG,SAFkD,EAGlD,KAHkD,EAIlD;AACCC,IAAAA,kBAAkB,EAAE;AADrB,GAJkD,CAAnD;AAQA,QAAM,CAAEG,WAAF,IAAkBhB,gBAAgB,CAAE,EAAF,CAAxC;AACA,QAAMiB,WAAW,GAAGZ,OAAO,KAAK,SAAZ,GAAwBC,YAAxB,GAAuCD,OAA3D;AACA,QAAMa,QAAQ,GAAGjB,0BAA0B,CAC1Ce,WAD0C,EAE1CJ,SAF0C,EAG1CK,WAH0C,CAA3C;AAMA,SACC,4BAAC,qBAAD;AACC,IAAA,cAAc,EAAGH,cADlB;AAEC,IAAA,KAAK,EAAGH,KAFT;AAGC,IAAA,QAAQ,EAAGI,QAHZ;AAIC,IAAA,QAAQ,EAAGG;AAJZ,IADD;AAQA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../private-apis';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tTypographyPanel: StylesTypographyPanel,\n} = unlock( blockEditorPrivateApis );\n\nexport default function TypographyPanel( { element, headingLevel } ) {\n\tlet prefixParts = [];\n\tif ( element === 'heading' ) {\n\t\tprefixParts = prefixParts.concat( [ 'elements', headingLevel ] );\n\t} else if ( element && element !== 'text' ) {\n\t\tprefixParts = prefixParts.concat( [ 'elements', element ] );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle(\n\t\tprefix,\n\t\tundefined,\n\t\t'all',\n\t\t{\n\t\t\tshouldDecodeEncode: false,\n\t\t}\n\t);\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst usedElement = element === 'heading' ? headingLevel : element;\n\tconst settings = useSettingsForBlockElement(\n\t\trawSettings,\n\t\tundefined,\n\t\tusedElement\n\t);\n\n\treturn (\n\t\t<StylesTypographyPanel\n\t\t\tinheritedValue={ inheritedStyle }\n\t\t\tvalue={ style }\n\t\t\tonChange={ setStyle }\n\t\t\tsettings={ settings }\n\t\t/>\n\t);\n}\n"]}
|
|
@@ -37,8 +37,6 @@ var _screenTypography = _interopRequireDefault(require("./screen-typography"));
|
|
|
37
37
|
|
|
38
38
|
var _screenTypographyElement = _interopRequireDefault(require("./screen-typography-element"));
|
|
39
39
|
|
|
40
|
-
var _screenFilters = _interopRequireDefault(require("./screen-filters"));
|
|
41
|
-
|
|
42
40
|
var _screenColors = _interopRequireDefault(require("./screen-colors"));
|
|
43
41
|
|
|
44
42
|
var _screenColorPalette = _interopRequireDefault(require("./screen-color-palette"));
|
|
@@ -47,17 +45,13 @@ var _screenLayout = _interopRequireDefault(require("./screen-layout"));
|
|
|
47
45
|
|
|
48
46
|
var _screenStyleVariations = _interopRequireDefault(require("./screen-style-variations"));
|
|
49
47
|
|
|
50
|
-
var _screenVariations = require("./screen-variations");
|
|
51
|
-
|
|
52
|
-
var _screenBorder = _interopRequireDefault(require("./screen-border"));
|
|
53
|
-
|
|
54
48
|
var _styleBook = _interopRequireDefault(require("../style-book"));
|
|
55
49
|
|
|
56
50
|
var _screenCss = _interopRequireDefault(require("./screen-css"));
|
|
57
51
|
|
|
58
|
-
var
|
|
52
|
+
var _screenRevisions = _interopRequireDefault(require("./screen-revisions"));
|
|
59
53
|
|
|
60
|
-
var
|
|
54
|
+
var _privateApis = require("../../private-apis");
|
|
61
55
|
|
|
62
56
|
var _store = require("../../store");
|
|
63
57
|
|
|
@@ -84,9 +78,10 @@ function GlobalStylesActionMenu() {
|
|
|
84
78
|
toggle
|
|
85
79
|
} = (0, _data.useDispatch)(_preferences.store);
|
|
86
80
|
const {
|
|
87
|
-
canEditCSS
|
|
81
|
+
canEditCSS,
|
|
82
|
+
revisionsCount
|
|
88
83
|
} = (0, _data.useSelect)(select => {
|
|
89
|
-
var _globalStyles$_links$, _globalStyles$_links;
|
|
84
|
+
var _globalStyles$_links$, _globalStyles$_links, _globalStyles$_links$2, _globalStyles$_links2, _globalStyles$_links3, _globalStyles$_links4;
|
|
90
85
|
|
|
91
86
|
const {
|
|
92
87
|
getEntityRecord,
|
|
@@ -97,7 +92,8 @@ function GlobalStylesActionMenu() {
|
|
|
97
92
|
|
|
98
93
|
const globalStyles = globalStylesId ? getEntityRecord('root', 'globalStyles', globalStylesId) : undefined;
|
|
99
94
|
return {
|
|
100
|
-
canEditCSS: (_globalStyles$_links$ = !!(globalStyles !== null && globalStyles !== void 0 && (_globalStyles$_links = globalStyles._links) !== null && _globalStyles$_links !== void 0 && _globalStyles$_links['wp:action-edit-css'])) !== null && _globalStyles$_links$ !== void 0 ? _globalStyles$_links$ : false
|
|
95
|
+
canEditCSS: (_globalStyles$_links$ = !!(globalStyles !== null && globalStyles !== void 0 && (_globalStyles$_links = globalStyles._links) !== null && _globalStyles$_links !== void 0 && _globalStyles$_links['wp:action-edit-css'])) !== null && _globalStyles$_links$ !== void 0 ? _globalStyles$_links$ : false,
|
|
96
|
+
revisionsCount: (_globalStyles$_links$2 = globalStyles === null || globalStyles === void 0 ? void 0 : (_globalStyles$_links2 = globalStyles._links) === null || _globalStyles$_links2 === void 0 ? void 0 : (_globalStyles$_links3 = _globalStyles$_links2['version-history']) === null || _globalStyles$_links3 === void 0 ? void 0 : (_globalStyles$_links4 = _globalStyles$_links3[0]) === null || _globalStyles$_links4 === void 0 ? void 0 : _globalStyles$_links4.count) !== null && _globalStyles$_links$2 !== void 0 ? _globalStyles$_links$2 : 0
|
|
101
97
|
};
|
|
102
98
|
}, []);
|
|
103
99
|
const {
|
|
@@ -107,9 +103,18 @@ function GlobalStylesActionMenu() {
|
|
|
107
103
|
const {
|
|
108
104
|
goTo
|
|
109
105
|
} = (0, _components.__experimentalUseNavigator)();
|
|
106
|
+
const {
|
|
107
|
+
setEditorCanvasContainerView
|
|
108
|
+
} = (0, _privateApis.unlock)((0, _data.useDispatch)(_store.store));
|
|
110
109
|
|
|
111
110
|
const loadCustomCSS = () => goTo('/css');
|
|
112
111
|
|
|
112
|
+
const loadRevisions = () => {
|
|
113
|
+
goTo('/revisions');
|
|
114
|
+
setEditorCanvasContainerView('global-styles-revisions');
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const hasRevisions = revisionsCount >= 2;
|
|
113
118
|
return (0, _element.createElement)(GlobalStylesMenuFill, null, (0, _element.createElement)(_components.DropdownMenu, {
|
|
114
119
|
icon: _icons.moreVertical,
|
|
115
120
|
label: (0, _i18n.__)('Styles actions'),
|
|
@@ -123,6 +128,11 @@ function GlobalStylesActionMenu() {
|
|
|
123
128
|
}, ...(canEditCSS ? [{
|
|
124
129
|
title: (0, _i18n.__)('Additional CSS'),
|
|
125
130
|
onClick: loadCustomCSS
|
|
131
|
+
}] : []), ...(hasRevisions ? [{
|
|
132
|
+
title: (0, _i18n.sprintf)(
|
|
133
|
+
/* translators: %d: number of revisions */
|
|
134
|
+
(0, _i18n._n)('%d Revision', '%d Revisions', revisionsCount), revisionsCount),
|
|
135
|
+
onClick: loadRevisions
|
|
126
136
|
}] : [])]
|
|
127
137
|
}));
|
|
128
138
|
}
|
|
@@ -137,50 +147,26 @@ function GlobalStylesNavigationScreen(_ref) {
|
|
|
137
147
|
}, props));
|
|
138
148
|
}
|
|
139
149
|
|
|
140
|
-
function
|
|
141
|
-
let {
|
|
142
|
-
name
|
|
143
|
-
} = _ref2;
|
|
144
|
-
const blockStyleVariations = (0, _data.useSelect)(select => {
|
|
145
|
-
const {
|
|
146
|
-
getBlockStyles
|
|
147
|
-
} = select(_blocks.store);
|
|
148
|
-
return getBlockStyles(name);
|
|
149
|
-
}, [name]);
|
|
150
|
-
|
|
151
|
-
if (!(blockStyleVariations !== null && blockStyleVariations !== void 0 && blockStyleVariations.length)) {
|
|
152
|
-
return null;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
return blockStyleVariations.map(variation => (0, _element.createElement)(ContextScreens, {
|
|
156
|
-
key: variation.name + name,
|
|
157
|
-
name: name,
|
|
158
|
-
parentMenu: '/blocks/' + encodeURIComponent(name) + '/variations/' + encodeURIComponent(variation.name),
|
|
159
|
-
variation: variation.name
|
|
160
|
-
}));
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
function BlockStylesNavigationScreens(_ref3) {
|
|
150
|
+
function BlockStylesNavigationScreens(_ref2) {
|
|
164
151
|
let {
|
|
165
152
|
parentMenu,
|
|
166
153
|
blockStyles,
|
|
167
154
|
blockName
|
|
168
|
-
} =
|
|
155
|
+
} = _ref2;
|
|
169
156
|
return blockStyles.map((style, index) => (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
170
157
|
key: index,
|
|
171
158
|
path: parentMenu + '/variations/' + style.name
|
|
172
|
-
}, (0, _element.createElement)(
|
|
173
|
-
|
|
174
|
-
|
|
159
|
+
}, (0, _element.createElement)(_screenBlock.default, {
|
|
160
|
+
name: blockName,
|
|
161
|
+
variation: style.name
|
|
175
162
|
})));
|
|
176
163
|
}
|
|
177
164
|
|
|
178
|
-
function ContextScreens(
|
|
165
|
+
function ContextScreens(_ref3) {
|
|
179
166
|
let {
|
|
180
167
|
name,
|
|
181
|
-
parentMenu = ''
|
|
182
|
-
|
|
183
|
-
} = _ref4;
|
|
168
|
+
parentMenu = ''
|
|
169
|
+
} = _ref3;
|
|
184
170
|
const blockStyleVariations = (0, _data.useSelect)(select => {
|
|
185
171
|
const {
|
|
186
172
|
getBlockStyles
|
|
@@ -188,67 +174,9 @@ function ContextScreens(_ref4) {
|
|
|
188
174
|
return getBlockStyles(name);
|
|
189
175
|
}, [name]);
|
|
190
176
|
return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
191
|
-
path: parentMenu + '/typography'
|
|
192
|
-
}, (0, _element.createElement)(_screenTypography.default, {
|
|
193
|
-
name: name,
|
|
194
|
-
variation: variation
|
|
195
|
-
})), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
196
|
-
path: parentMenu + '/typography/text'
|
|
197
|
-
}, (0, _element.createElement)(_screenTypographyElement.default, {
|
|
198
|
-
name: name,
|
|
199
|
-
element: "text"
|
|
200
|
-
})), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
201
|
-
path: parentMenu + '/typography/link'
|
|
202
|
-
}, (0, _element.createElement)(_screenTypographyElement.default, {
|
|
203
|
-
name: name,
|
|
204
|
-
element: "link"
|
|
205
|
-
})), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
206
|
-
path: parentMenu + '/typography/heading'
|
|
207
|
-
}, (0, _element.createElement)(_screenTypographyElement.default, {
|
|
208
|
-
name: name,
|
|
209
|
-
element: "heading"
|
|
210
|
-
})), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
211
|
-
path: parentMenu + '/typography/caption'
|
|
212
|
-
}, (0, _element.createElement)(_screenTypographyElement.default, {
|
|
213
|
-
name: name,
|
|
214
|
-
element: "caption"
|
|
215
|
-
})), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
216
|
-
path: parentMenu + '/typography/button'
|
|
217
|
-
}, (0, _element.createElement)(_screenTypographyElement.default, {
|
|
218
|
-
name: name,
|
|
219
|
-
element: "button"
|
|
220
|
-
})), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
221
|
-
path: parentMenu + '/colors'
|
|
222
|
-
}, (0, _element.createElement)(_screenColors.default, {
|
|
223
|
-
name: name,
|
|
224
|
-
variation: variation
|
|
225
|
-
})), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
226
177
|
path: parentMenu + '/colors/palette'
|
|
227
178
|
}, (0, _element.createElement)(_screenColorPalette.default, {
|
|
228
179
|
name: name
|
|
229
|
-
})), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
230
|
-
path: parentMenu + '/filters'
|
|
231
|
-
}, (0, _element.createElement)(_screenFilters.default, {
|
|
232
|
-
name: name
|
|
233
|
-
})), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
234
|
-
path: parentMenu + '/border'
|
|
235
|
-
}, (0, _element.createElement)(_screenBorder.default, {
|
|
236
|
-
name: name,
|
|
237
|
-
variation: variation
|
|
238
|
-
})), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
239
|
-
path: parentMenu + '/effects'
|
|
240
|
-
}, (0, _element.createElement)(_screenEffects.default, {
|
|
241
|
-
name: name,
|
|
242
|
-
variation: variation
|
|
243
|
-
})), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
244
|
-
path: parentMenu + '/layout'
|
|
245
|
-
}, (0, _element.createElement)(_screenLayout.default, {
|
|
246
|
-
name: name,
|
|
247
|
-
variation: variation
|
|
248
|
-
})), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
249
|
-
path: parentMenu + '/css'
|
|
250
|
-
}, (0, _element.createElement)(_screenCss.default, {
|
|
251
|
-
name: name
|
|
252
180
|
})), !!(blockStyleVariations !== null && blockStyleVariations !== void 0 && blockStyleVariations.length) && (0, _element.createElement)(BlockStylesNavigationScreens, {
|
|
253
181
|
parentMenu: parentMenu,
|
|
254
182
|
blockStyles: blockStyleVariations,
|
|
@@ -325,7 +253,37 @@ function GlobalStylesUI() {
|
|
|
325
253
|
path: "/variations"
|
|
326
254
|
}, (0, _element.createElement)(_screenStyleVariations.default, null)), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
327
255
|
path: "/blocks"
|
|
328
|
-
}, (0, _element.createElement)(_screenBlockList.default, null)),
|
|
256
|
+
}, (0, _element.createElement)(_screenBlockList.default, null)), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
257
|
+
path: "/typography"
|
|
258
|
+
}, (0, _element.createElement)(_screenTypography.default, null)), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
259
|
+
path: "/typography/text"
|
|
260
|
+
}, (0, _element.createElement)(_screenTypographyElement.default, {
|
|
261
|
+
element: "text"
|
|
262
|
+
})), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
263
|
+
path: "/typography/link"
|
|
264
|
+
}, (0, _element.createElement)(_screenTypographyElement.default, {
|
|
265
|
+
element: "link"
|
|
266
|
+
})), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
267
|
+
path: "/typography/heading"
|
|
268
|
+
}, (0, _element.createElement)(_screenTypographyElement.default, {
|
|
269
|
+
element: "heading"
|
|
270
|
+
})), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
271
|
+
path: "/typography/caption"
|
|
272
|
+
}, (0, _element.createElement)(_screenTypographyElement.default, {
|
|
273
|
+
element: "caption"
|
|
274
|
+
})), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
275
|
+
path: "/typography/button"
|
|
276
|
+
}, (0, _element.createElement)(_screenTypographyElement.default, {
|
|
277
|
+
element: "button"
|
|
278
|
+
})), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
279
|
+
path: "/colors"
|
|
280
|
+
}, (0, _element.createElement)(_screenColors.default, null)), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
281
|
+
path: "/layout"
|
|
282
|
+
}, (0, _element.createElement)(_screenLayout.default, null)), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
283
|
+
path: "/css"
|
|
284
|
+
}, (0, _element.createElement)(_screenCss.default, null)), (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
285
|
+
path: '/revisions'
|
|
286
|
+
}, (0, _element.createElement)(_screenRevisions.default, null)), blocks.map(block => (0, _element.createElement)(GlobalStylesNavigationScreen, {
|
|
329
287
|
key: 'menu-block-' + block.name,
|
|
330
288
|
path: '/blocks/' + encodeURIComponent(block.name)
|
|
331
289
|
}, (0, _element.createElement)(_screenBlock.default, {
|
|
@@ -334,12 +292,7 @@ function GlobalStylesUI() {
|
|
|
334
292
|
key: 'screens-block-' + block.name,
|
|
335
293
|
name: block.name,
|
|
336
294
|
parentMenu: '/blocks/' + encodeURIComponent(block.name)
|
|
337
|
-
})),
|
|
338
|
-
return (0, _element.createElement)(BlockStyleVariationsScreens, {
|
|
339
|
-
key: 'screens-block-styles-' + block.name + index,
|
|
340
|
-
name: block.name
|
|
341
|
-
});
|
|
342
|
-
}), 'style-book' === editorCanvasContainerView && (0, _element.createElement)(GlobalStylesStyleBook, null), (0, _element.createElement)(GlobalStylesActionMenu, null), (0, _element.createElement)(GlobalStylesBlockLink, null));
|
|
295
|
+
})), 'style-book' === editorCanvasContainerView && (0, _element.createElement)(GlobalStylesStyleBook, null), (0, _element.createElement)(GlobalStylesActionMenu, null), (0, _element.createElement)(GlobalStylesBlockLink, null));
|
|
343
296
|
}
|
|
344
297
|
|
|
345
298
|
var _default = GlobalStylesUI;
|